kalong 0.5.7__py3-none-any.whl → 0.6.0__py3-none-any.whl

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.
@@ -0,0 +1,166 @@
1
+ function n$(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function W1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Dy={exports:{}},Tu={};var xT;function i$(){if(xT)return Tu;xT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:t,type:i,key:a,ref:r!==void 0?r:null,props:s}}return Tu.Fragment=e,Tu.jsx=n,Tu.jsxs=n,Tu}var ST;function r$(){return ST||(ST=1,Dy.exports=i$()),Dy.exports}var x=r$(),Py={exports:{}},_e={};var wT;function o$(){if(wT)return _e;wT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),v=Symbol.iterator;function b(q){return q===null||typeof q!="object"?null:(q=v&&q[v]||q["@@iterator"],typeof q=="function"?q:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(q,G,se){this.props=q,this.context=G,this.refs=C,this.updater=se||O}E.prototype.isReactComponent={},E.prototype.setState=function(q,G){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,G,"setState")},E.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function $(){}$.prototype=E.prototype;function z(q,G,se){this.props=q,this.context=G,this.refs=C,this.updater=se||O}var P=z.prototype=new $;P.constructor=z,S(P,E.prototype),P.isPureReactComponent=!0;var R=Array.isArray;function L(){}var M={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function _(q,G,se){var ue=se.ref;return{$$typeof:t,type:q,key:G,ref:ue!==void 0?ue:null,props:se}}function A(q,G){return _(q.type,G,q.props)}function Q(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function T(q){var G={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(se){return G[se]})}var H=/\/+/g;function I(q,G){return typeof q=="object"&&q!==null&&q.key!=null?T(""+q.key):G.toString(36)}function V(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(L,L):(q.status="pending",q.then(function(G){q.status==="pending"&&(q.status="fulfilled",q.value=G)},function(G){q.status==="pending"&&(q.status="rejected",q.reason=G)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function N(q,G,se,ue,Z){var ie=typeof q;(ie==="undefined"||ie==="boolean")&&(q=null);var de=!1;if(q===null)de=!0;else switch(ie){case"bigint":case"string":case"number":de=!0;break;case"object":switch(q.$$typeof){case t:case e:de=!0;break;case p:return de=q._init,N(de(q._payload),G,se,ue,Z)}}if(de)return Z=Z(q),de=ue===""?"."+I(q,0):ue,R(Z)?(se="",de!=null&&(se=de.replace(H,"$&/")+"/"),N(Z,G,se,"",function(ke){return ke})):Z!=null&&(Q(Z)&&(Z=A(Z,se+(Z.key==null||q&&q.key===Z.key?"":(""+Z.key).replace(H,"$&/")+"/")+de)),G.push(Z)),1;de=0;var Te=ue===""?".":ue+":";if(R(q))for(var Ae=0;Ae<q.length;Ae++)ue=q[Ae],ie=Te+I(ue,Ae),de+=N(ue,G,se,ie,Z);else if(Ae=b(q),typeof Ae=="function")for(q=Ae.call(q),Ae=0;!(ue=q.next()).done;)ue=ue.value,ie=Te+I(ue,Ae++),de+=N(ue,G,se,ie,Z);else if(ie==="object"){if(typeof q.then=="function")return N(V(q),G,se,ue,Z);throw G=String(q),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return de}function X(q,G,se){if(q==null)return q;var ue=[],Z=0;return N(q,ue,"","",function(ie){return G.call(se,ie,Z++)}),ue}function Y(q){if(q._status===-1){var G=q._result;G=G(),G.then(function(se){(q._status===0||q._status===-1)&&(q._status=1,q._result=se)},function(se){(q._status===0||q._status===-1)&&(q._status=2,q._result=se)}),q._status===-1&&(q._status=0,q._result=G)}if(q._status===1)return q._result.default;throw q._result}var K=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},le={map:X,forEach:function(q,G,se){X(q,function(){G.apply(this,arguments)},se)},count:function(q){var G=0;return X(q,function(){G++}),G},toArray:function(q){return X(q,function(G){return G})||[]},only:function(q){if(!Q(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return _e.Activity=m,_e.Children=le,_e.Component=E,_e.Fragment=n,_e.Profiler=r,_e.PureComponent=z,_e.StrictMode=i,_e.Suspense=f,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,_e.__COMPILER_RUNTIME={__proto__:null,c:function(q){return M.H.useMemoCache(q)}},_e.cache=function(q){return function(){return q.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(q,G,se){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var ue=S({},q.props),Z=q.key;if(G!=null)for(ie in G.key!==void 0&&(Z=""+G.key),G)!B.call(G,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&G.ref===void 0||(ue[ie]=G[ie]);var ie=arguments.length-2;if(ie===1)ue.children=se;else if(1<ie){for(var de=Array(ie),Te=0;Te<ie;Te++)de[Te]=arguments[Te+2];ue.children=de}return _(q.type,Z,ue)},_e.createContext=function(q){return q={$$typeof:a,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:s,_context:q},q},_e.createElement=function(q,G,se){var ue,Z={},ie=null;if(G!=null)for(ue in G.key!==void 0&&(ie=""+G.key),G)B.call(G,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(Z[ue]=G[ue]);var de=arguments.length-2;if(de===1)Z.children=se;else if(1<de){for(var Te=Array(de),Ae=0;Ae<de;Ae++)Te[Ae]=arguments[Ae+2];Z.children=Te}if(q&&q.defaultProps)for(ue in de=q.defaultProps,de)Z[ue]===void 0&&(Z[ue]=de[ue]);return _(q,ie,Z)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(q){return{$$typeof:c,render:q}},_e.isValidElement=Q,_e.lazy=function(q){return{$$typeof:p,_payload:{_status:-1,_result:q},_init:Y}},_e.memo=function(q,G){return{$$typeof:h,type:q,compare:G===void 0?null:G}},_e.startTransition=function(q){var G=M.T,se={};M.T=se;try{var ue=q(),Z=M.S;Z!==null&&Z(se,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(L,K)}catch(ie){K(ie)}finally{G!==null&&se.types!==null&&(G.types=se.types),M.T=G}},_e.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},_e.use=function(q){return M.H.use(q)},_e.useActionState=function(q,G,se){return M.H.useActionState(q,G,se)},_e.useCallback=function(q,G){return M.H.useCallback(q,G)},_e.useContext=function(q){return M.H.useContext(q)},_e.useDebugValue=function(){},_e.useDeferredValue=function(q,G){return M.H.useDeferredValue(q,G)},_e.useEffect=function(q,G){return M.H.useEffect(q,G)},_e.useEffectEvent=function(q){return M.H.useEffectEvent(q)},_e.useId=function(){return M.H.useId()},_e.useImperativeHandle=function(q,G,se){return M.H.useImperativeHandle(q,G,se)},_e.useInsertionEffect=function(q,G){return M.H.useInsertionEffect(q,G)},_e.useLayoutEffect=function(q,G){return M.H.useLayoutEffect(q,G)},_e.useMemo=function(q,G){return M.H.useMemo(q,G)},_e.useOptimistic=function(q,G){return M.H.useOptimistic(q,G)},_e.useReducer=function(q,G,se){return M.H.useReducer(q,G,se)},_e.useRef=function(q){return M.H.useRef(q)},_e.useState=function(q){return M.H.useState(q)},_e.useSyncExternalStore=function(q,G,se){return M.H.useSyncExternalStore(q,G,se)},_e.useTransition=function(){return M.H.useTransition()},_e.version="19.2.4",_e}var CT;function Vs(){return CT||(CT=1,Py.exports=o$()),Py.exports}var k=Vs();const Ri=W1(k),Gp=n$({__proto__:null,default:Ri},[k]);var zy={exports:{}},ku={},$y={exports:{}},By={};var TT;function s$(){return TT||(TT=1,(function(t){function e(N,X){var Y=N.length;N.push(X);e:for(;0<Y;){var K=Y-1>>>1,le=N[K];if(0<r(le,X))N[K]=X,N[Y]=le,Y=K;else break e}}function n(N){return N.length===0?null:N[0]}function i(N){if(N.length===0)return null;var X=N[0],Y=N.pop();if(Y!==X){N[0]=Y;e:for(var K=0,le=N.length,q=le>>>1;K<q;){var G=2*(K+1)-1,se=N[G],ue=G+1,Z=N[ue];if(0>r(se,Y))ue<le&&0>r(Z,se)?(N[K]=Z,N[ue]=Y,K=ue):(N[K]=se,N[G]=Y,K=G);else if(ue<le&&0>r(Z,Y))N[K]=Z,N[ue]=Y,K=ue;else break e}}return X}function r(N,X){var Y=N.sortIndex-X.sortIndex;return Y!==0?Y:N.id-X.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var f=[],h=[],p=1,m=null,v=3,b=!1,O=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function P(N){for(var X=n(h);X!==null;){if(X.callback===null)i(h);else if(X.startTime<=N)i(h),X.sortIndex=X.expirationTime,e(f,X);else break;X=n(h)}}function R(N){if(S=!1,P(N),!O)if(n(f)!==null)O=!0,L||(L=!0,T());else{var X=n(h);X!==null&&V(R,X.startTime-N)}}var L=!1,M=-1,B=5,_=-1;function A(){return C?!0:!(t.unstable_now()-_<B)}function Q(){if(C=!1,L){var N=t.unstable_now();_=N;var X=!0;try{e:{O=!1,S&&(S=!1,$(M),M=-1),b=!0;var Y=v;try{t:{for(P(N),m=n(f);m!==null&&!(m.expirationTime>N&&A());){var K=m.callback;if(typeof K=="function"){m.callback=null,v=m.priorityLevel;var le=K(m.expirationTime<=N);if(N=t.unstable_now(),typeof le=="function"){m.callback=le,P(N),X=!0;break t}m===n(f)&&i(f),P(N)}else i(f);m=n(f)}if(m!==null)X=!0;else{var q=n(h);q!==null&&V(R,q.startTime-N),X=!1}}break e}finally{m=null,v=Y,b=!1}X=void 0}}finally{X?T():L=!1}}}var T;if(typeof z=="function")T=function(){z(Q)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,I=H.port2;H.port1.onmessage=Q,T=function(){I.postMessage(null)}}else T=function(){E(Q,0)};function V(N,X){M=E(function(){N(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<N?Math.floor(1e3/N):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(N){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var Y=v;v=X;try{return N()}finally{v=Y}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(N,X){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var Y=v;v=N;try{return X()}finally{v=Y}},t.unstable_scheduleCallback=function(N,X,Y){var K=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?K+Y:K):Y=K,N){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=Y+le,N={id:p++,callback:X,priorityLevel:N,startTime:Y,expirationTime:le,sortIndex:-1},Y>K?(N.sortIndex=Y,e(h,N),n(f)===null&&N===n(h)&&(S?($(M),M=-1):S=!0,V(R,Y-K))):(N.sortIndex=le,e(f,N),O||b||(O=!0,L||(L=!0,T()))),N},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(N){var X=v;return function(){var Y=v;v=X;try{return N.apply(this,arguments)}finally{v=Y}}}})(By)),By}var kT;function l$(){return kT||(kT=1,$y.exports=s$()),$y.exports}var Ly={exports:{}},_n={};var ET;function a$(){if(ET)return _n;ET=1;var t=Vs();function e(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");function s(f,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:m==null?null:""+m,children:f,containerInfo:h,implementation:p}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_n.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return s(f,h,null,p)},_n.flushSync=function(f){var h=a.T,p=i.p;try{if(a.T=null,i.p=2,f)return f()}finally{a.T=h,i.p=p,i.d.f()}},_n.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(f,h))},_n.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},_n.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?i.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:v,fetchPriority:b}):p==="script"&&i.d.X(f,{crossOrigin:m,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_n.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);i.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(f)},_n.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin);i.d.L(f,p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_n.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=c(h.as,h.crossOrigin);i.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(f)},_n.requestFormReset=function(f){i.d.r(f)},_n.unstable_batchedUpdates=function(f,h){return f(h)},_n.useFormState=function(f,h,p){return a.H.useFormState(f,h,p)},_n.useFormStatus=function(){return a.H.useHostTransitionStatus()},_n.version="19.2.4",_n}var AT;function aR(){if(AT)return Ly.exports;AT=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Ly.exports=a$(),Ly.exports}var RT;function c$(){if(RT)return ku;RT=1;var t=l$(),e=Vs(),n=aR();function i(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)l+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var l=o,u=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(u=l.return),o=l.return;while(o)}return l.tag===3?u:null}function a(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function f(o){if(s(o)!==o)throw Error(i(188))}function h(o){var l=o.alternate;if(!l){if(l=s(o),l===null)throw Error(i(188));return l!==o?null:o}for(var u=o,d=l;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===u)return f(g),o;if(y===d)return f(g),l;y=y.sibling}throw Error(i(188))}if(u.return!==d.return)u=g,d=y;else{for(var w=!1,D=g.child;D;){if(D===u){w=!0,u=g,d=y;break}if(D===d){w=!0,d=g,u=y;break}D=D.sibling}if(!w){for(D=y.child;D;){if(D===u){w=!0,u=y,d=g;break}if(D===d){w=!0,d=y,u=g;break}D=D.sibling}if(!w)throw Error(i(189))}}if(u.alternate!==d)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?o:l}function p(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=p(o),l!==null)return l;o=o.sibling}return null}var m=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),z=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),A=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function T(o){return o===null||typeof o!="object"?null:(o=Q&&o[Q]||o["@@iterator"],typeof o=="function"?o:null)}var H=Symbol.for("react.client.reference");function I(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===H?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case R:return"Suspense";case L:return"SuspenseList";case _:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case O:return"Portal";case z:return o.displayName||"Context";case $:return(o._context.displayName||"Context")+".Consumer";case P:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return l=o.displayName||null,l!==null?l:I(o.type)||"Memo";case B:l=o._payload,o=o._init;try{return I(o(l))}catch{}}return null}var V=Array.isArray,N=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},K=[],le=-1;function q(o){return{current:o}}function G(o){0>le||(o.current=K[le],K[le]=null,le--)}function se(o,l){le++,K[le]=o.current,o.current=l}var ue=q(null),Z=q(null),ie=q(null),de=q(null);function Te(o,l){switch(se(ie,l),se(Z,o),se(ue,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?UC(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=UC(l),o=WC(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}G(ue),se(ue,o)}function Ae(){G(ue),G(Z),G(ie)}function ke(o){o.memoizedState!==null&&se(de,o);var l=ue.current,u=WC(l,o.type);l!==u&&(se(Z,o),se(ue,u))}function Me(o){Z.current===o&&(G(ue),G(Z)),de.current===o&&(G(de),xu._currentValue=Y)}var Re,vt;function Be(o){if(Re===void 0)try{throw Error()}catch(u){var l=u.stack.trim().match(/\n( *(at )?)/);Re=l&&l[1]||"",vt=-1<u.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Re+o+vt}var Se=!1;function Xe(o,l){if(!o||Se)return"";Se=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(l){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ne){var te=ne}Reflect.construct(o,[],fe)}else{try{fe.call()}catch(ne){te=ne}o.call(fe.prototype)}}else{try{throw Error()}catch(ne){te=ne}(fe=o())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.stack,te.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=d.DetermineComponentFrameRoot(),w=y[0],D=y[1];if(w&&D){var U=w.split(`
4
+ `),ee=D.split(`
5
+ `);for(g=d=0;d<U.length&&!U[d].includes("DetermineComponentFrameRoot");)d++;for(;g<ee.length&&!ee[g].includes("DetermineComponentFrameRoot");)g++;if(d===U.length||g===ee.length)for(d=U.length-1,g=ee.length-1;1<=d&&0<=g&&U[d]!==ee[g];)g--;for(;1<=d&&0<=g;d--,g--)if(U[d]!==ee[g]){if(d!==1||g!==1)do if(d--,g--,0>g||U[d]!==ee[g]){var re=`
6
+ `+U[d].replace(" at new "," at ");return o.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",o.displayName)),re}while(1<=d&&0<=g);break}}}finally{Se=!1,Error.prepareStackTrace=u}return(u=o?o.displayName||o.name:"")?Be(u):""}function $e(o,l){switch(o.tag){case 26:case 27:case 5:return Be(o.type);case 16:return Be("Lazy");case 13:return o.child!==l&&l!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return Xe(o.type,!1);case 11:return Xe(o.type.render,!1);case 1:return Xe(o.type,!0);case 31:return Be("Activity");default:return""}}function je(o){try{var l="",u=null;do l+=$e(o,u),u=o,o=o.return;while(o);return l}catch(d){return`
7
+ Error generating stack: `+d.message+`
8
+ `+d.stack}}var Ie=Object.prototype.hasOwnProperty,at=t.unstable_scheduleCallback,Ye=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,$i=t.unstable_requestPaint,Lt=t.unstable_now,hr=t.unstable_getCurrentPriorityLevel,Wt=t.unstable_ImmediatePriority,ut=t.unstable_UserBlockingPriority,jt=t.unstable_NormalPriority,on=t.unstable_LowPriority,Bi=t.unstable_IdlePriority,wn=t.log,Pr=t.unstable_setDisableYieldValue,Wn=null,Vt=null;function Vn(o){if(typeof wn=="function"&&Pr(o),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(Wn,o)}catch{}}var gn=Math.clz32?Math.clz32:Ko,zc=Math.log,uo=Math.LN2;function Ko(o){return o>>>=0,o===0?32:31-(zc(o)/uo|0)|0}var Zo=256,Jo=262144,zr=4194304;function pr(o){var l=o&42;if(l!==0)return l;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function es(o,l,u){var d=o.pendingLanes;if(d===0)return 0;var g=0,y=o.suspendedLanes,w=o.pingedLanes;o=o.warmLanes;var D=d&134217727;return D!==0?(d=D&~y,d!==0?g=pr(d):(w&=D,w!==0?g=pr(w):u||(u=D&~o,u!==0&&(g=pr(u))))):(D=d&~y,D!==0?g=pr(D):w!==0?g=pr(w):u||(u=d&~o,u!==0&&(g=pr(u)))),g===0?0:l!==0&&l!==g&&(l&y)===0&&(y=g&-g,u=l&-l,y>=u||y===32&&(u&4194048)!==0)?l:g}function fo(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function $c(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Qe(){var o=zr;return zr<<=1,(zr&62914560)===0&&(zr=4194304),o}function Jn(o){for(var l=[],u=0;31>u;u++)l.push(o);return l}function Oe(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Pe(o,l,u,d,g,y){var w=o.pendingLanes;o.pendingLanes=u,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=u,o.entangledLanes&=u,o.errorRecoveryDisabledLanes&=u,o.shellSuspendCounter=0;var D=o.entanglements,U=o.expirationTimes,ee=o.hiddenUpdates;for(u=w&~u;0<u;){var re=31-gn(u),fe=1<<re;D[re]=0,U[re]=-1;var te=ee[re];if(te!==null)for(ee[re]=null,re=0;re<te.length;re++){var ne=te[re];ne!==null&&(ne.lane&=-536870913)}u&=~fe}d!==0&&dt(o,d,0),y!==0&&g===0&&o.tag!==0&&(o.suspendedLanes|=y&~(w&~l))}function dt(o,l,u){o.pendingLanes|=l,o.suspendedLanes&=~l;var d=31-gn(l);o.entangledLanes|=l,o.entanglements[d]=o.entanglements[d]|1073741824|u&261930}function ct(o,l){var u=o.entangledLanes|=l;for(o=o.entanglements;u;){var d=31-gn(u),g=1<<d;g&l|o[d]&l&&(o[d]|=l),u&=~g}}function Ht(o,l){var u=l&-l;return u=(u&42)!==0?1:ei(u),(u&(o.suspendedLanes|l))!==0?0:u}function ei(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function mr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function ts(){var o=X.p;return o!==0?o:(o=window.event,o===void 0?32:pT(o.type))}function Bc(o,l){var u=X.p;try{return X.p=o,l()}finally{X.p=u}}var Li=Math.random().toString(36).slice(2),Rn="__reactFiber$"+Li,ti="__reactProps$"+Li,Gl="__reactContainer$"+Li,Sg="__reactEvents$"+Li,Wz="__reactListeners$"+Li,Vz="__reactHandles$"+Li,Dx="__reactResources$"+Li,Lc="__reactMarker$"+Li;function wg(o){delete o[Rn],delete o[ti],delete o[Sg],delete o[Wz],delete o[Vz]}function Fl(o){var l=o[Rn];if(l)return l;for(var u=o.parentNode;u;){if(l=u[Gl]||u[Rn]){if(u=l.alternate,l.child!==null||u!==null&&u.child!==null)for(o=ZC(o);o!==null;){if(u=o[Rn])return u;o=ZC(o)}return l}o=u,u=o.parentNode}return null}function Yl(o){if(o=o[Rn]||o[Gl]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function jc(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(i(33))}function Kl(o){var l=o[Dx];return l||(l=o[Dx]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Cn(o){o[Lc]=!0}var Px=new Set,zx={};function Ys(o,l){Zl(o,l),Zl(o+"Capture",l)}function Zl(o,l){for(zx[o]=l,o=0;o<l.length;o++)Px.add(l[o])}var Xz=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]*$"),$x={},Bx={};function Gz(o){return Ie.call(Bx,o)?!0:Ie.call($x,o)?!1:Xz.test(o)?Bx[o]=!0:($x[o]=!0,!1)}function yd(o,l,u){if(Gz(l))if(u===null)o.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var d=l.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+u)}}function vd(o,l,u){if(u===null)o.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+u)}}function ho(o,l,u,d){if(d===null)o.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttributeNS(l,u,""+d)}}function ji(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Lx(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Fz(o,l,u){var d=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,y=d.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return g.call(this)},set:function(w){u=""+w,y.call(this,w)}}),Object.defineProperty(o,l,{enumerable:d.enumerable}),{getValue:function(){return u},setValue:function(w){u=""+w},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Cg(o){if(!o._valueTracker){var l=Lx(o)?"checked":"value";o._valueTracker=Fz(o,l,""+o[l])}}function jx(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var u=l.getValue(),d="";return o&&(d=Lx(o)?o.checked?"true":"false":o.value),o=d,o!==u?(l.setValue(o),!0):!1}function bd(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Yz=/[\n"\\]/g;function Ni(o){return o.replace(Yz,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Tg(o,l,u,d,g,y,w,D){o.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?o.type=w:o.removeAttribute("type"),l!=null?w==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+ji(l)):o.value!==""+ji(l)&&(o.value=""+ji(l)):w!=="submit"&&w!=="reset"||o.removeAttribute("value"),l!=null?kg(o,w,ji(l)):u!=null?kg(o,w,ji(u)):d!=null&&o.removeAttribute("value"),g==null&&y!=null&&(o.defaultChecked=!!y),g!=null&&(o.checked=g&&typeof g!="function"&&typeof g!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?o.name=""+ji(D):o.removeAttribute("name")}function Nx(o,l,u,d,g,y,w,D){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(o.type=y),l!=null||u!=null){if(!(y!=="submit"&&y!=="reset"||l!=null)){Cg(o);return}u=u!=null?""+ji(u):"",l=l!=null?""+ji(l):u,D||l===o.value||(o.value=l),o.defaultValue=l}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,o.checked=D?o.checked:!!d,o.defaultChecked=!!d,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(o.name=w),Cg(o)}function kg(o,l,u){l==="number"&&bd(o.ownerDocument)===o||o.defaultValue===""+u||(o.defaultValue=""+u)}function Jl(o,l,u,d){if(o=o.options,l){l={};for(var g=0;g<u.length;g++)l["$"+u[g]]=!0;for(u=0;u<o.length;u++)g=l.hasOwnProperty("$"+o[u].value),o[u].selected!==g&&(o[u].selected=g),g&&d&&(o[u].defaultSelected=!0)}else{for(u=""+ji(u),l=null,g=0;g<o.length;g++){if(o[g].value===u){o[g].selected=!0,d&&(o[g].defaultSelected=!0);return}l!==null||o[g].disabled||(l=o[g])}l!==null&&(l.selected=!0)}}function Qx(o,l,u){if(l!=null&&(l=""+ji(l),l!==o.value&&(o.value=l),u==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=u!=null?""+ji(u):""}function _x(o,l,u,d){if(l==null){if(d!=null){if(u!=null)throw Error(i(92));if(V(d)){if(1<d.length)throw Error(i(93));d=d[0]}u=d}u==null&&(u=""),l=u}u=ji(l),o.defaultValue=u,d=o.textContent,d===u&&d!==""&&d!==null&&(o.value=d),Cg(o)}function ea(o,l){if(l){var u=o.firstChild;if(u&&u===o.lastChild&&u.nodeType===3){u.nodeValue=l;return}}o.textContent=l}var Kz=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 qx(o,l,u){var d=l.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?d?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":d?o.setProperty(l,u):typeof u!="number"||u===0||Kz.has(l)?l==="float"?o.cssFloat=u:o[l]=(""+u).trim():o[l]=u+"px"}function Ix(o,l,u){if(l!=null&&typeof l!="object")throw Error(i(62));if(o=o.style,u!=null){for(var d in u)!u.hasOwnProperty(d)||l!=null&&l.hasOwnProperty(d)||(d.indexOf("--")===0?o.setProperty(d,""):d==="float"?o.cssFloat="":o[d]="");for(var g in l)d=l[g],l.hasOwnProperty(g)&&u[g]!==d&&qx(o,g,d)}else for(var y in l)l.hasOwnProperty(y)&&qx(o,y,l[y])}function Eg(o){if(o.indexOf("-")===-1)return!1;switch(o){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 Zz=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"]]),Jz=/^[\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 Od(o){return Jz.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function po(){}var Ag=null;function Rg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ta=null,na=null;function Hx(o){var l=Yl(o);if(l&&(o=l.stateNode)){var u=o[ti]||null;e:switch(o=l.stateNode,l.type){case"input":if(Tg(o,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),l=u.name,u.type==="radio"&&l!=null){for(u=o;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Ni(""+l)+'"][type="radio"]'),l=0;l<u.length;l++){var d=u[l];if(d!==o&&d.form===o.form){var g=d[ti]||null;if(!g)throw Error(i(90));Tg(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(l=0;l<u.length;l++)d=u[l],d.form===o.form&&jx(d)}break e;case"textarea":Qx(o,u.value,u.defaultValue);break e;case"select":l=u.value,l!=null&&Jl(o,!!u.multiple,l,!1)}}}var Mg=!1;function Ux(o,l,u){if(Mg)return o(l,u);Mg=!0;try{var d=o(l);return d}finally{if(Mg=!1,(ta!==null||na!==null)&&(lh(),ta&&(l=ta,o=na,na=ta=null,Hx(l),o)))for(l=0;l<o.length;l++)Hx(o[l])}}function Nc(o,l){var u=o.stateNode;if(u===null)return null;var d=u[ti]||null;if(d===null)return null;u=d[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(o=o.type,d=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!d;break e;default:o=!1}if(o)return null;if(u&&typeof u!="function")throw Error(i(231,l,typeof u));return u}var mo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dg=!1;if(mo)try{var Qc={};Object.defineProperty(Qc,"passive",{get:function(){Dg=!0}}),window.addEventListener("test",Qc,Qc),window.removeEventListener("test",Qc,Qc)}catch{Dg=!1}var ns=null,Pg=null,xd=null;function Wx(){if(xd)return xd;var o,l=Pg,u=l.length,d,g="value"in ns?ns.value:ns.textContent,y=g.length;for(o=0;o<u&&l[o]===g[o];o++);var w=u-o;for(d=1;d<=w&&l[u-d]===g[y-d];d++);return xd=g.slice(o,1<d?1-d:void 0)}function Sd(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function wd(){return!0}function Vx(){return!1}function ni(o){function l(u,d,g,y,w){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var D in o)o.hasOwnProperty(D)&&(u=o[D],this[D]=u?u(y):y[D]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?wd:Vx,this.isPropagationStopped=Vx,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=wd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=wd)},persist:function(){},isPersistent:wd}),l}var Ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cd=ni(Ks),_c=m({},Ks,{view:0,detail:0}),e4=ni(_c),zg,$g,qc,Td=m({},_c,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==qc&&(qc&&o.type==="mousemove"?(zg=o.screenX-qc.screenX,$g=o.screenY-qc.screenY):$g=zg=0,qc=o),zg)},movementY:function(o){return"movementY"in o?o.movementY:$g}}),Xx=ni(Td),t4=m({},Td,{dataTransfer:0}),n4=ni(t4),i4=m({},_c,{relatedTarget:0}),Bg=ni(i4),r4=m({},Ks,{animationName:0,elapsedTime:0,pseudoElement:0}),o4=ni(r4),s4=m({},Ks,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),l4=ni(s4),a4=m({},Ks,{data:0}),Gx=ni(a4),c4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},u4={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"},f4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function d4(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=f4[o])?!!l[o]:!1}function Lg(){return d4}var h4=m({},_c,{key:function(o){if(o.key){var l=c4[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Sd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?u4[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lg,charCode:function(o){return o.type==="keypress"?Sd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Sd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),p4=ni(h4),m4=m({},Td,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fx=ni(m4),g4=m({},_c,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lg}),y4=ni(g4),v4=m({},Ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),b4=ni(v4),O4=m({},Td,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),x4=ni(O4),S4=m({},Ks,{newState:0,oldState:0}),w4=ni(S4),C4=[9,13,27,32],jg=mo&&"CompositionEvent"in window,Ic=null;mo&&"documentMode"in document&&(Ic=document.documentMode);var T4=mo&&"TextEvent"in window&&!Ic,Yx=mo&&(!jg||Ic&&8<Ic&&11>=Ic),Kx=" ",Zx=!1;function Jx(o,l){switch(o){case"keyup":return C4.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eS(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ia=!1;function k4(o,l){switch(o){case"compositionend":return eS(l);case"keypress":return l.which!==32?null:(Zx=!0,Kx);case"textInput":return o=l.data,o===Kx&&Zx?null:o;default:return null}}function E4(o,l){if(ia)return o==="compositionend"||!jg&&Jx(o,l)?(o=Wx(),xd=Pg=ns=null,ia=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Yx&&l.locale!=="ko"?null:l.data;default:return null}}var A4={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 tS(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!A4[o.type]:l==="textarea"}function nS(o,l,u,d){ta?na?na.push(d):na=[d]:ta=d,l=ph(l,"onChange"),0<l.length&&(u=new Cd("onChange","change",null,u,d),o.push({event:u,listeners:l}))}var Hc=null,Uc=null;function R4(o){NC(o,0)}function kd(o){var l=jc(o);if(jx(l))return o}function iS(o,l){if(o==="change")return l}var rS=!1;if(mo){var Ng;if(mo){var Qg="oninput"in document;if(!Qg){var oS=document.createElement("div");oS.setAttribute("oninput","return;"),Qg=typeof oS.oninput=="function"}Ng=Qg}else Ng=!1;rS=Ng&&(!document.documentMode||9<document.documentMode)}function sS(){Hc&&(Hc.detachEvent("onpropertychange",lS),Uc=Hc=null)}function lS(o){if(o.propertyName==="value"&&kd(Uc)){var l=[];nS(l,Uc,o,Rg(o)),Ux(R4,l)}}function M4(o,l,u){o==="focusin"?(sS(),Hc=l,Uc=u,Hc.attachEvent("onpropertychange",lS)):o==="focusout"&&sS()}function D4(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return kd(Uc)}function P4(o,l){if(o==="click")return kd(l)}function z4(o,l){if(o==="input"||o==="change")return kd(l)}function $4(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var yi=typeof Object.is=="function"?Object.is:$4;function Wc(o,l){if(yi(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var u=Object.keys(o),d=Object.keys(l);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!Ie.call(l,g)||!yi(o[g],l[g]))return!1}return!0}function aS(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function cS(o,l){var u=aS(o);o=0;for(var d;u;){if(u.nodeType===3){if(d=o+u.textContent.length,o<=l&&d>=l)return{node:u,offset:l-o};o=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=aS(u)}}function uS(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?uS(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function fS(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=bd(o.document);l instanceof o.HTMLIFrameElement;){try{var u=typeof l.contentWindow.location.href=="string"}catch{u=!1}if(u)o=l.contentWindow;else break;l=bd(o.document)}return l}function _g(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var B4=mo&&"documentMode"in document&&11>=document.documentMode,ra=null,qg=null,Vc=null,Ig=!1;function dS(o,l,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ig||ra==null||ra!==bd(d)||(d=ra,"selectionStart"in d&&_g(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Vc&&Wc(Vc,d)||(Vc=d,d=ph(qg,"onSelect"),0<d.length&&(l=new Cd("onSelect","select",null,l,u),o.push({event:l,listeners:d}),l.target=ra)))}function Zs(o,l){var u={};return u[o.toLowerCase()]=l.toLowerCase(),u["Webkit"+o]="webkit"+l,u["Moz"+o]="moz"+l,u}var oa={animationend:Zs("Animation","AnimationEnd"),animationiteration:Zs("Animation","AnimationIteration"),animationstart:Zs("Animation","AnimationStart"),transitionrun:Zs("Transition","TransitionRun"),transitionstart:Zs("Transition","TransitionStart"),transitioncancel:Zs("Transition","TransitionCancel"),transitionend:Zs("Transition","TransitionEnd")},Hg={},hS={};mo&&(hS=document.createElement("div").style,"AnimationEvent"in window||(delete oa.animationend.animation,delete oa.animationiteration.animation,delete oa.animationstart.animation),"TransitionEvent"in window||delete oa.transitionend.transition);function Js(o){if(Hg[o])return Hg[o];if(!oa[o])return o;var l=oa[o],u;for(u in l)if(l.hasOwnProperty(u)&&u in hS)return Hg[o]=l[u];return o}var pS=Js("animationend"),mS=Js("animationiteration"),gS=Js("animationstart"),L4=Js("transitionrun"),j4=Js("transitionstart"),N4=Js("transitioncancel"),yS=Js("transitionend"),vS=new Map,Ug="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(" ");Ug.push("scrollEnd");function gr(o,l){vS.set(o,l),Ys(l,[o])}var Ed=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Qi=[],sa=0,Wg=0;function Ad(){for(var o=sa,l=Wg=sa=0;l<o;){var u=Qi[l];Qi[l++]=null;var d=Qi[l];Qi[l++]=null;var g=Qi[l];Qi[l++]=null;var y=Qi[l];if(Qi[l++]=null,d!==null&&g!==null){var w=d.pending;w===null?g.next=g:(g.next=w.next,w.next=g),d.pending=g}y!==0&&bS(u,g,y)}}function Rd(o,l,u,d){Qi[sa++]=o,Qi[sa++]=l,Qi[sa++]=u,Qi[sa++]=d,Wg|=d,o.lanes|=d,o=o.alternate,o!==null&&(o.lanes|=d)}function Vg(o,l,u,d){return Rd(o,l,u,d),Md(o)}function el(o,l){return Rd(o,null,null,l),Md(o)}function bS(o,l,u){o.lanes|=u;var d=o.alternate;d!==null&&(d.lanes|=u);for(var g=!1,y=o.return;y!==null;)y.childLanes|=u,d=y.alternate,d!==null&&(d.childLanes|=u),y.tag===22&&(o=y.stateNode,o===null||o._visibility&1||(g=!0)),o=y,y=y.return;return o.tag===3?(y=o.stateNode,g&&l!==null&&(g=31-gn(u),o=y.hiddenUpdates,d=o[g],d===null?o[g]=[l]:d.push(l),l.lane=u|536870912),y):null}function Md(o){if(50<pu)throw pu=0,ty=null,Error(i(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var la={};function Q4(o,l,u,d){this.tag=o,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vi(o,l,u,d){return new Q4(o,l,u,d)}function Xg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function go(o,l){var u=o.alternate;return u===null?(u=vi(o.tag,l,o.key,o.mode),u.elementType=o.elementType,u.type=o.type,u.stateNode=o.stateNode,u.alternate=o,o.alternate=u):(u.pendingProps=l,u.type=o.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=o.flags&65011712,u.childLanes=o.childLanes,u.lanes=o.lanes,u.child=o.child,u.memoizedProps=o.memoizedProps,u.memoizedState=o.memoizedState,u.updateQueue=o.updateQueue,l=o.dependencies,u.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},u.sibling=o.sibling,u.index=o.index,u.ref=o.ref,u.refCleanup=o.refCleanup,u}function OS(o,l){o.flags&=65011714;var u=o.alternate;return u===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,l=u.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function Dd(o,l,u,d,g,y){var w=0;if(d=o,typeof o=="function")Xg(o)&&(w=1);else if(typeof o=="string")w=U3(o,u,ue.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case _:return o=vi(31,u,l,g),o.elementType=_,o.lanes=y,o;case S:return tl(u.children,g,y,l);case C:w=8,g|=24;break;case E:return o=vi(12,u,l,g|2),o.elementType=E,o.lanes=y,o;case R:return o=vi(13,u,l,g),o.elementType=R,o.lanes=y,o;case L:return o=vi(19,u,l,g),o.elementType=L,o.lanes=y,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case z:w=10;break e;case $:w=9;break e;case P:w=11;break e;case M:w=14;break e;case B:w=16,d=null;break e}w=29,u=Error(i(130,o===null?"null":typeof o,"")),d=null}return l=vi(w,u,l,g),l.elementType=o,l.type=d,l.lanes=y,l}function tl(o,l,u,d){return o=vi(7,o,d,l),o.lanes=u,o}function Gg(o,l,u){return o=vi(6,o,null,l),o.lanes=u,o}function xS(o){var l=vi(18,null,null,0);return l.stateNode=o,l}function Fg(o,l,u){return l=vi(4,o.children!==null?o.children:[],o.key,l),l.lanes=u,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var SS=new WeakMap;function _i(o,l){if(typeof o=="object"&&o!==null){var u=SS.get(o);return u!==void 0?u:(l={value:o,source:l,stack:je(l)},SS.set(o,l),l)}return{value:o,source:l,stack:je(l)}}var aa=[],ca=0,Pd=null,Xc=0,qi=[],Ii=0,is=null,$r=1,Br="";function yo(o,l){aa[ca++]=Xc,aa[ca++]=Pd,Pd=o,Xc=l}function wS(o,l,u){qi[Ii++]=$r,qi[Ii++]=Br,qi[Ii++]=is,is=o;var d=$r;o=Br;var g=32-gn(d)-1;d&=~(1<<g),u+=1;var y=32-gn(l)+g;if(30<y){var w=g-g%5;y=(d&(1<<w)-1).toString(32),d>>=w,g-=w,$r=1<<32-gn(l)+g|u<<g|d,Br=y+o}else $r=1<<y|u<<g|d,Br=o}function Yg(o){o.return!==null&&(yo(o,1),wS(o,1,0))}function Kg(o){for(;o===Pd;)Pd=aa[--ca],aa[ca]=null,Xc=aa[--ca],aa[ca]=null;for(;o===is;)is=qi[--Ii],qi[Ii]=null,Br=qi[--Ii],qi[Ii]=null,$r=qi[--Ii],qi[Ii]=null}function CS(o,l){qi[Ii++]=$r,qi[Ii++]=Br,qi[Ii++]=is,$r=l.id,Br=l.overflow,is=o}var Mn=null,Nt=null,st=!1,rs=null,Hi=!1,Zg=Error(i(519));function os(o){var l=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gc(_i(l,o)),Zg}function TS(o){var l=o.stateNode,u=o.type,d=o.memoizedProps;switch(l[Rn]=o,l[ti]=d,u){case"dialog":Je("cancel",l),Je("close",l);break;case"iframe":case"object":case"embed":Je("load",l);break;case"video":case"audio":for(u=0;u<gu.length;u++)Je(gu[u],l);break;case"source":Je("error",l);break;case"img":case"image":case"link":Je("error",l),Je("load",l);break;case"details":Je("toggle",l);break;case"input":Je("invalid",l),Nx(l,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Je("invalid",l);break;case"textarea":Je("invalid",l),_x(l,d.value,d.defaultValue,d.children)}u=d.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||l.textContent===""+u||d.suppressHydrationWarning===!0||IC(l.textContent,u)?(d.popover!=null&&(Je("beforetoggle",l),Je("toggle",l)),d.onScroll!=null&&Je("scroll",l),d.onScrollEnd!=null&&Je("scrollend",l),d.onClick!=null&&(l.onclick=po),l=!0):l=!1,l||os(o,!0)}function kS(o){for(Mn=o.return;Mn;)switch(Mn.tag){case 5:case 31:case 13:Hi=!1;return;case 27:case 3:Hi=!0;return;default:Mn=Mn.return}}function ua(o){if(o!==Mn)return!1;if(!st)return kS(o),st=!0,!1;var l=o.tag,u;if((u=l!==3&&l!==27)&&((u=l===5)&&(u=o.type,u=!(u!=="form"&&u!=="button")||gy(o.type,o.memoizedProps)),u=!u),u&&Nt&&os(o),kS(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));Nt=KC(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));Nt=KC(o)}else l===27?(l=Nt,bs(o.type)?(o=xy,xy=null,Nt=o):Nt=l):Nt=Mn?Wi(o.stateNode.nextSibling):null;return!0}function nl(){Nt=Mn=null,st=!1}function Jg(){var o=rs;return o!==null&&(si===null?si=o:si.push.apply(si,o),rs=null),o}function Gc(o){rs===null?rs=[o]:rs.push(o)}var e0=q(null),il=null,vo=null;function ss(o,l,u){se(e0,l._currentValue),l._currentValue=u}function bo(o){o._currentValue=e0.current,G(e0)}function t0(o,l,u){for(;o!==null;){var d=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,d!==null&&(d.childLanes|=l)):d!==null&&(d.childLanes&l)!==l&&(d.childLanes|=l),o===u)break;o=o.return}}function n0(o,l,u,d){var g=o.child;for(g!==null&&(g.return=o);g!==null;){var y=g.dependencies;if(y!==null){var w=g.child;y=y.firstContext;e:for(;y!==null;){var D=y;y=g;for(var U=0;U<l.length;U++)if(D.context===l[U]){y.lanes|=u,D=y.alternate,D!==null&&(D.lanes|=u),t0(y.return,u,o),d||(w=null);break e}y=D.next}}else if(g.tag===18){if(w=g.return,w===null)throw Error(i(341));w.lanes|=u,y=w.alternate,y!==null&&(y.lanes|=u),t0(w,u,o),w=null}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===o){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}}function fa(o,l,u,d){o=null;for(var g=l,y=!1;g!==null;){if(!y){if((g.flags&524288)!==0)y=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var w=g.alternate;if(w===null)throw Error(i(387));if(w=w.memoizedProps,w!==null){var D=g.type;yi(g.pendingProps.value,w.value)||(o!==null?o.push(D):o=[D])}}else if(g===de.current){if(w=g.alternate,w===null)throw Error(i(387));w.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(o!==null?o.push(xu):o=[xu])}g=g.return}o!==null&&n0(l,o,u,d),l.flags|=262144}function zd(o){for(o=o.firstContext;o!==null;){if(!yi(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function rl(o){il=o,vo=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Dn(o){return ES(il,o)}function $d(o,l){return il===null&&rl(o),ES(o,l)}function ES(o,l){var u=l._currentValue;if(l={context:l,memoizedValue:u,next:null},vo===null){if(o===null)throw Error(i(308));vo=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else vo=vo.next=l;return u}var _4=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(u,d){o.push(d)}};this.abort=function(){l.aborted=!0,o.forEach(function(u){return u()})}},q4=t.unstable_scheduleCallback,I4=t.unstable_NormalPriority,sn={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function i0(){return{controller:new _4,data:new Map,refCount:0}}function Fc(o){o.refCount--,o.refCount===0&&q4(I4,function(){o.controller.abort()})}var Yc=null,r0=0,da=0,ha=null;function H4(o,l){if(Yc===null){var u=Yc=[];r0=0,da=ly(),ha={status:"pending",value:void 0,then:function(d){u.push(d)}}}return r0++,l.then(AS,AS),l}function AS(){if(--r0===0&&Yc!==null){ha!==null&&(ha.status="fulfilled");var o=Yc;Yc=null,da=0,ha=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function U4(o,l){var u=[],d={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return o.then(function(){d.status="fulfilled",d.value=l;for(var g=0;g<u.length;g++)(0,u[g])(l)},function(g){for(d.status="rejected",d.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),d}var RS=N.S;N.S=function(o,l){dC=Lt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&H4(o,l),RS!==null&&RS(o,l)};var ol=q(null);function o0(){var o=ol.current;return o!==null?o:Dt.pooledCache}function Bd(o,l){l===null?se(ol,ol.current):se(ol,l.pool)}function MS(){var o=o0();return o===null?null:{parent:sn._currentValue,pool:o}}var pa=Error(i(460)),s0=Error(i(474)),Ld=Error(i(542)),jd={then:function(){}};function DS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function PS(o,l,u){switch(u=o[u],u===void 0?o.push(l):u!==l&&(l.then(po,po),l=u),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,$S(o),o;default:if(typeof l.status=="string")l.then(po,po);else{if(o=Dt,o!==null&&100<o.shellSuspendCounter)throw Error(i(482));o=l,o.status="pending",o.then(function(d){if(l.status==="pending"){var g=l;g.status="fulfilled",g.value=d}},function(d){if(l.status==="pending"){var g=l;g.status="rejected",g.reason=d}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,$S(o),o}throw ll=l,pa}}function sl(o){try{var l=o._init;return l(o._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ll=u,pa):u}}var ll=null;function zS(){if(ll===null)throw Error(i(459));var o=ll;return ll=null,o}function $S(o){if(o===pa||o===Ld)throw Error(i(483))}var ma=null,Kc=0;function Nd(o){var l=Kc;return Kc+=1,ma===null&&(ma=[]),PS(ma,o,l)}function Zc(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Qd(o,l){throw l.$$typeof===v?Error(i(525)):(o=Object.prototype.toString.call(l),Error(i(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function BS(o){function l(F,W){if(o){var J=F.deletions;J===null?(F.deletions=[W],F.flags|=16):J.push(W)}}function u(F,W){if(!o)return null;for(;W!==null;)l(F,W),W=W.sibling;return null}function d(F){for(var W=new Map;F!==null;)F.key!==null?W.set(F.key,F):W.set(F.index,F),F=F.sibling;return W}function g(F,W){return F=go(F,W),F.index=0,F.sibling=null,F}function y(F,W,J){return F.index=J,o?(J=F.alternate,J!==null?(J=J.index,J<W?(F.flags|=67108866,W):J):(F.flags|=67108866,W)):(F.flags|=1048576,W)}function w(F){return o&&F.alternate===null&&(F.flags|=67108866),F}function D(F,W,J,ae){return W===null||W.tag!==6?(W=Gg(J,F.mode,ae),W.return=F,W):(W=g(W,J),W.return=F,W)}function U(F,W,J,ae){var De=J.type;return De===S?re(F,W,J.props.children,ae,J.key):W!==null&&(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===B&&sl(De)===W.type)?(W=g(W,J.props),Zc(W,J),W.return=F,W):(W=Dd(J.type,J.key,J.props,null,F.mode,ae),Zc(W,J),W.return=F,W)}function ee(F,W,J,ae){return W===null||W.tag!==4||W.stateNode.containerInfo!==J.containerInfo||W.stateNode.implementation!==J.implementation?(W=Fg(J,F.mode,ae),W.return=F,W):(W=g(W,J.children||[]),W.return=F,W)}function re(F,W,J,ae,De){return W===null||W.tag!==7?(W=tl(J,F.mode,ae,De),W.return=F,W):(W=g(W,J),W.return=F,W)}function fe(F,W,J){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Gg(""+W,F.mode,J),W.return=F,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return J=Dd(W.type,W.key,W.props,null,F.mode,J),Zc(J,W),J.return=F,J;case O:return W=Fg(W,F.mode,J),W.return=F,W;case B:return W=sl(W),fe(F,W,J)}if(V(W)||T(W))return W=tl(W,F.mode,J,null),W.return=F,W;if(typeof W.then=="function")return fe(F,Nd(W),J);if(W.$$typeof===z)return fe(F,$d(F,W),J);Qd(F,W)}return null}function te(F,W,J,ae){var De=W!==null?W.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return De!==null?null:D(F,W,""+J,ae);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return J.key===De?U(F,W,J,ae):null;case O:return J.key===De?ee(F,W,J,ae):null;case B:return J=sl(J),te(F,W,J,ae)}if(V(J)||T(J))return De!==null?null:re(F,W,J,ae,null);if(typeof J.then=="function")return te(F,W,Nd(J),ae);if(J.$$typeof===z)return te(F,W,$d(F,J),ae);Qd(F,J)}return null}function ne(F,W,J,ae,De){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return F=F.get(J)||null,D(W,F,""+ae,De);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return F=F.get(ae.key===null?J:ae.key)||null,U(W,F,ae,De);case O:return F=F.get(ae.key===null?J:ae.key)||null,ee(W,F,ae,De);case B:return ae=sl(ae),ne(F,W,J,ae,De)}if(V(ae)||T(ae))return F=F.get(J)||null,re(W,F,ae,De,null);if(typeof ae.then=="function")return ne(F,W,J,Nd(ae),De);if(ae.$$typeof===z)return ne(F,W,J,$d(W,ae),De);Qd(W,ae)}return null}function xe(F,W,J,ae){for(var De=null,ht=null,Ce=W,Ge=W=0,rt=null;Ce!==null&&Ge<J.length;Ge++){Ce.index>Ge?(rt=Ce,Ce=null):rt=Ce.sibling;var pt=te(F,Ce,J[Ge],ae);if(pt===null){Ce===null&&(Ce=rt);break}o&&Ce&&pt.alternate===null&&l(F,Ce),W=y(pt,W,Ge),ht===null?De=pt:ht.sibling=pt,ht=pt,Ce=rt}if(Ge===J.length)return u(F,Ce),st&&yo(F,Ge),De;if(Ce===null){for(;Ge<J.length;Ge++)Ce=fe(F,J[Ge],ae),Ce!==null&&(W=y(Ce,W,Ge),ht===null?De=Ce:ht.sibling=Ce,ht=Ce);return st&&yo(F,Ge),De}for(Ce=d(Ce);Ge<J.length;Ge++)rt=ne(Ce,F,Ge,J[Ge],ae),rt!==null&&(o&&rt.alternate!==null&&Ce.delete(rt.key===null?Ge:rt.key),W=y(rt,W,Ge),ht===null?De=rt:ht.sibling=rt,ht=rt);return o&&Ce.forEach(function(Cs){return l(F,Cs)}),st&&yo(F,Ge),De}function ze(F,W,J,ae){if(J==null)throw Error(i(151));for(var De=null,ht=null,Ce=W,Ge=W=0,rt=null,pt=J.next();Ce!==null&&!pt.done;Ge++,pt=J.next()){Ce.index>Ge?(rt=Ce,Ce=null):rt=Ce.sibling;var Cs=te(F,Ce,pt.value,ae);if(Cs===null){Ce===null&&(Ce=rt);break}o&&Ce&&Cs.alternate===null&&l(F,Ce),W=y(Cs,W,Ge),ht===null?De=Cs:ht.sibling=Cs,ht=Cs,Ce=rt}if(pt.done)return u(F,Ce),st&&yo(F,Ge),De;if(Ce===null){for(;!pt.done;Ge++,pt=J.next())pt=fe(F,pt.value,ae),pt!==null&&(W=y(pt,W,Ge),ht===null?De=pt:ht.sibling=pt,ht=pt);return st&&yo(F,Ge),De}for(Ce=d(Ce);!pt.done;Ge++,pt=J.next())pt=ne(Ce,F,Ge,pt.value,ae),pt!==null&&(o&&pt.alternate!==null&&Ce.delete(pt.key===null?Ge:pt.key),W=y(pt,W,Ge),ht===null?De=pt:ht.sibling=pt,ht=pt);return o&&Ce.forEach(function(t$){return l(F,t$)}),st&&yo(F,Ge),De}function Et(F,W,J,ae){if(typeof J=="object"&&J!==null&&J.type===S&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case b:e:{for(var De=J.key;W!==null;){if(W.key===De){if(De=J.type,De===S){if(W.tag===7){u(F,W.sibling),ae=g(W,J.props.children),ae.return=F,F=ae;break e}}else if(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===B&&sl(De)===W.type){u(F,W.sibling),ae=g(W,J.props),Zc(ae,J),ae.return=F,F=ae;break e}u(F,W);break}else l(F,W);W=W.sibling}J.type===S?(ae=tl(J.props.children,F.mode,ae,J.key),ae.return=F,F=ae):(ae=Dd(J.type,J.key,J.props,null,F.mode,ae),Zc(ae,J),ae.return=F,F=ae)}return w(F);case O:e:{for(De=J.key;W!==null;){if(W.key===De)if(W.tag===4&&W.stateNode.containerInfo===J.containerInfo&&W.stateNode.implementation===J.implementation){u(F,W.sibling),ae=g(W,J.children||[]),ae.return=F,F=ae;break e}else{u(F,W);break}else l(F,W);W=W.sibling}ae=Fg(J,F.mode,ae),ae.return=F,F=ae}return w(F);case B:return J=sl(J),Et(F,W,J,ae)}if(V(J))return xe(F,W,J,ae);if(T(J)){if(De=T(J),typeof De!="function")throw Error(i(150));return J=De.call(J),ze(F,W,J,ae)}if(typeof J.then=="function")return Et(F,W,Nd(J),ae);if(J.$$typeof===z)return Et(F,W,$d(F,J),ae);Qd(F,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,W!==null&&W.tag===6?(u(F,W.sibling),ae=g(W,J),ae.return=F,F=ae):(u(F,W),ae=Gg(J,F.mode,ae),ae.return=F,F=ae),w(F)):u(F,W)}return function(F,W,J,ae){try{Kc=0;var De=Et(F,W,J,ae);return ma=null,De}catch(Ce){if(Ce===pa||Ce===Ld)throw Ce;var ht=vi(29,Ce,null,F.mode);return ht.lanes=ae,ht.return=F,ht}}}var al=BS(!0),LS=BS(!1),ls=!1;function l0(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function a0(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function as(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function cs(o,l,u){var d=o.updateQueue;if(d===null)return null;if(d=d.shared,(mt&2)!==0){var g=d.pending;return g===null?l.next=l:(l.next=g.next,g.next=l),d.pending=l,l=Md(o),bS(o,null,u),l}return Rd(o,d,l,u),Md(o)}function Jc(o,l,u){if(l=l.updateQueue,l!==null&&(l=l.shared,(u&4194048)!==0)){var d=l.lanes;d&=o.pendingLanes,u|=d,l.lanes=u,ct(o,u)}}function c0(o,l){var u=o.updateQueue,d=o.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var w={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};y===null?g=y=w:y=y.next=w,u=u.next}while(u!==null);y===null?g=y=l:y=y.next=l}else g=y=l;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,callbacks:d.callbacks},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=l:o.next=l,u.lastBaseUpdate=l}var u0=!1;function eu(){if(u0){var o=ha;if(o!==null)throw o}}function tu(o,l,u,d){u0=!1;var g=o.updateQueue;ls=!1;var y=g.firstBaseUpdate,w=g.lastBaseUpdate,D=g.shared.pending;if(D!==null){g.shared.pending=null;var U=D,ee=U.next;U.next=null,w===null?y=ee:w.next=ee,w=U;var re=o.alternate;re!==null&&(re=re.updateQueue,D=re.lastBaseUpdate,D!==w&&(D===null?re.firstBaseUpdate=ee:D.next=ee,re.lastBaseUpdate=U))}if(y!==null){var fe=g.baseState;w=0,re=ee=U=null,D=y;do{var te=D.lane&-536870913,ne=te!==D.lane;if(ne?(it&te)===te:(d&te)===te){te!==0&&te===da&&(u0=!0),re!==null&&(re=re.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var xe=o,ze=D;te=l;var Et=u;switch(ze.tag){case 1:if(xe=ze.payload,typeof xe=="function"){fe=xe.call(Et,fe,te);break e}fe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ze.payload,te=typeof xe=="function"?xe.call(Et,fe,te):xe,te==null)break e;fe=m({},fe,te);break e;case 2:ls=!0}}te=D.callback,te!==null&&(o.flags|=64,ne&&(o.flags|=8192),ne=g.callbacks,ne===null?g.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:D.tag,payload:D.payload,callback:D.callback,next:null},re===null?(ee=re=ne,U=fe):re=re.next=ne,w|=te;if(D=D.next,D===null){if(D=g.shared.pending,D===null)break;ne=D,D=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);re===null&&(U=fe),g.baseState=U,g.firstBaseUpdate=ee,g.lastBaseUpdate=re,y===null&&(g.shared.lanes=0),ps|=w,o.lanes=w,o.memoizedState=fe}}function jS(o,l){if(typeof o!="function")throw Error(i(191,o));o.call(l)}function NS(o,l){var u=o.callbacks;if(u!==null)for(o.callbacks=null,o=0;o<u.length;o++)jS(u[o],l)}var ga=q(null),_d=q(0);function QS(o,l){o=Ao,se(_d,o),se(ga,l),Ao=o|l.baseLanes}function f0(){se(_d,Ao),se(ga,ga.current)}function d0(){Ao=_d.current,G(ga),G(_d)}var bi=q(null),Ui=null;function us(o){var l=o.alternate;se(en,en.current&1),se(bi,o),Ui===null&&(l===null||ga.current!==null||l.memoizedState!==null)&&(Ui=o)}function h0(o){se(en,en.current),se(bi,o),Ui===null&&(Ui=o)}function _S(o){o.tag===22?(se(en,en.current),se(bi,o),Ui===null&&(Ui=o)):fs()}function fs(){se(en,en.current),se(bi,bi.current)}function Oi(o){G(bi),Ui===o&&(Ui=null),G(en)}var en=q(0);function qd(o){for(var l=o;l!==null;){if(l.tag===13){var u=l.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||by(u)||Oy(u)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Oo=0,We=null,Tt=null,ln=null,Id=!1,ya=!1,cl=!1,Hd=0,nu=0,va=null,W4=0;function Xt(){throw Error(i(321))}function p0(o,l){if(l===null)return!1;for(var u=0;u<l.length&&u<o.length;u++)if(!yi(o[u],l[u]))return!1;return!0}function m0(o,l,u,d,g,y){return Oo=y,We=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,N.H=o===null||o.memoizedState===null?ww:M0,cl=!1,y=u(d,g),cl=!1,ya&&(y=IS(l,u,d,g)),qS(o),y}function qS(o){N.H=ou;var l=Tt!==null&&Tt.next!==null;if(Oo=0,ln=Tt=We=null,Id=!1,nu=0,va=null,l)throw Error(i(300));o===null||an||(o=o.dependencies,o!==null&&zd(o)&&(an=!0))}function IS(o,l,u,d){We=o;var g=0;do{if(ya&&(va=null),nu=0,ya=!1,25<=g)throw Error(i(301));if(g+=1,ln=Tt=null,o.updateQueue!=null){var y=o.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}N.H=Cw,y=l(u,d)}while(ya);return y}function V4(){var o=N.H,l=o.useState()[0];return l=typeof l.then=="function"?iu(l):l,o=o.useState()[0],(Tt!==null?Tt.memoizedState:null)!==o&&(We.flags|=1024),l}function g0(){var o=Hd!==0;return Hd=0,o}function y0(o,l,u){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~u}function v0(o){if(Id){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Id=!1}Oo=0,ln=Tt=We=null,ya=!1,nu=Hd=0,va=null}function Xn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ln===null?We.memoizedState=ln=o:ln=ln.next=o,ln}function tn(){if(Tt===null){var o=We.alternate;o=o!==null?o.memoizedState:null}else o=Tt.next;var l=ln===null?We.memoizedState:ln.next;if(l!==null)ln=l,Tt=o;else{if(o===null)throw We.alternate===null?Error(i(467)):Error(i(310));Tt=o,o={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},ln===null?We.memoizedState=ln=o:ln=ln.next=o}return ln}function Ud(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function iu(o){var l=nu;return nu+=1,va===null&&(va=[]),o=PS(va,o,l),l=We,(ln===null?l.memoizedState:ln.next)===null&&(l=l.alternate,N.H=l===null||l.memoizedState===null?ww:M0),o}function Wd(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return iu(o);if(o.$$typeof===z)return Dn(o)}throw Error(i(438,String(o)))}function b0(o){var l=null,u=We.updateQueue;if(u!==null&&(l=u.memoCache),l==null){var d=We.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(l={data:d.data.map(function(g){return g.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),u===null&&(u=Ud(),We.updateQueue=u),u.memoCache=l,u=l.data[l.index],u===void 0)for(u=l.data[l.index]=Array(o),d=0;d<o;d++)u[d]=A;return l.index++,u}function xo(o,l){return typeof l=="function"?l(o):l}function Vd(o){var l=tn();return O0(l,Tt,o)}function O0(o,l,u){var d=o.queue;if(d===null)throw Error(i(311));d.lastRenderedReducer=u;var g=o.baseQueue,y=d.pending;if(y!==null){if(g!==null){var w=g.next;g.next=y.next,y.next=w}l.baseQueue=g=y,d.pending=null}if(y=o.baseState,g===null)o.memoizedState=y;else{l=g.next;var D=w=null,U=null,ee=l,re=!1;do{var fe=ee.lane&-536870913;if(fe!==ee.lane?(it&fe)===fe:(Oo&fe)===fe){var te=ee.revertLane;if(te===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),fe===da&&(re=!0);else if((Oo&te)===te){ee=ee.next,te===da&&(re=!0);continue}else fe={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},U===null?(D=U=fe,w=y):U=U.next=fe,We.lanes|=te,ps|=te;fe=ee.action,cl&&u(y,fe),y=ee.hasEagerState?ee.eagerState:u(y,fe)}else te={lane:fe,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},U===null?(D=U=te,w=y):U=U.next=te,We.lanes|=fe,ps|=fe;ee=ee.next}while(ee!==null&&ee!==l);if(U===null?w=y:U.next=D,!yi(y,o.memoizedState)&&(an=!0,re&&(u=ha,u!==null)))throw u;o.memoizedState=y,o.baseState=w,o.baseQueue=U,d.lastRenderedState=y}return g===null&&(d.lanes=0),[o.memoizedState,d.dispatch]}function x0(o){var l=tn(),u=l.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var d=u.dispatch,g=u.pending,y=l.memoizedState;if(g!==null){u.pending=null;var w=g=g.next;do y=o(y,w.action),w=w.next;while(w!==g);yi(y,l.memoizedState)||(an=!0),l.memoizedState=y,l.baseQueue===null&&(l.baseState=y),u.lastRenderedState=y}return[y,d]}function HS(o,l,u){var d=We,g=tn(),y=st;if(y){if(u===void 0)throw Error(i(407));u=u()}else u=l();var w=!yi((Tt||g).memoizedState,u);if(w&&(g.memoizedState=u,an=!0),g=g.queue,C0(VS.bind(null,d,g,o),[o]),g.getSnapshot!==l||w||ln!==null&&ln.memoizedState.tag&1){if(d.flags|=2048,ba(9,{destroy:void 0},WS.bind(null,d,g,u,l),null),Dt===null)throw Error(i(349));y||(Oo&127)!==0||US(d,l,u)}return u}function US(o,l,u){o.flags|=16384,o={getSnapshot:l,value:u},l=We.updateQueue,l===null?(l=Ud(),We.updateQueue=l,l.stores=[o]):(u=l.stores,u===null?l.stores=[o]:u.push(o))}function WS(o,l,u,d){l.value=u,l.getSnapshot=d,XS(l)&&GS(o)}function VS(o,l,u){return u(function(){XS(l)&&GS(o)})}function XS(o){var l=o.getSnapshot;o=o.value;try{var u=l();return!yi(o,u)}catch{return!0}}function GS(o){var l=el(o,2);l!==null&&li(l,o,2)}function S0(o){var l=Xn();if(typeof o=="function"){var u=o;if(o=u(),cl){Vn(!0);try{u()}finally{Vn(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xo,lastRenderedState:o},l}function FS(o,l,u,d){return o.baseState=u,O0(o,Tt,typeof d=="function"?d:xo)}function X4(o,l,u,d,g){if(Fd(o))throw Error(i(485));if(o=l.action,o!==null){var y={payload:g,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){y.listeners.push(w)}};N.T!==null?u(!0):y.isTransition=!1,d(y),u=l.pending,u===null?(y.next=l.pending=y,YS(l,y)):(y.next=u.next,l.pending=u.next=y)}}function YS(o,l){var u=l.action,d=l.payload,g=o.state;if(l.isTransition){var y=N.T,w={};N.T=w;try{var D=u(g,d),U=N.S;U!==null&&U(w,D),KS(o,l,D)}catch(ee){w0(o,l,ee)}finally{y!==null&&w.types!==null&&(y.types=w.types),N.T=y}}else try{y=u(g,d),KS(o,l,y)}catch(ee){w0(o,l,ee)}}function KS(o,l,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(d){ZS(o,l,d)},function(d){return w0(o,l,d)}):ZS(o,l,u)}function ZS(o,l,u){l.status="fulfilled",l.value=u,JS(l),o.state=u,l=o.pending,l!==null&&(u=l.next,u===l?o.pending=null:(u=u.next,l.next=u,YS(o,u)))}function w0(o,l,u){var d=o.pending;if(o.pending=null,d!==null){d=d.next;do l.status="rejected",l.reason=u,JS(l),l=l.next;while(l!==d)}o.action=null}function JS(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function ew(o,l){return l}function tw(o,l){if(st){var u=Dt.formState;if(u!==null){e:{var d=We;if(st){if(Nt){t:{for(var g=Nt,y=Hi;g.nodeType!==8;){if(!y){g=null;break t}if(g=Wi(g.nextSibling),g===null){g=null;break t}}y=g.data,g=y==="F!"||y==="F"?g:null}if(g){Nt=Wi(g.nextSibling),d=g.data==="F!";break e}}os(d)}d=!1}d&&(l=u[0])}}return u=Xn(),u.memoizedState=u.baseState=l,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ew,lastRenderedState:l},u.queue=d,u=Ow.bind(null,We,d),d.dispatch=u,d=S0(!1),y=R0.bind(null,We,!1,d.queue),d=Xn(),g={state:l,dispatch:null,action:o,pending:null},d.queue=g,u=X4.bind(null,We,g,y,u),g.dispatch=u,d.memoizedState=o,[l,u,!1]}function nw(o){var l=tn();return iw(l,Tt,o)}function iw(o,l,u){if(l=O0(o,l,ew)[0],o=Vd(xo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var d=iu(l)}catch(w){throw w===pa?Ld:w}else d=l;l=tn();var g=l.queue,y=g.dispatch;return u!==l.memoizedState&&(We.flags|=2048,ba(9,{destroy:void 0},G4.bind(null,g,u),null)),[d,y,o]}function G4(o,l){o.action=l}function rw(o){var l=tn(),u=Tt;if(u!==null)return iw(l,u,o);tn(),l=l.memoizedState,u=tn();var d=u.queue.dispatch;return u.memoizedState=o,[l,d,!1]}function ba(o,l,u,d){return o={tag:o,create:u,deps:d,inst:l,next:null},l=We.updateQueue,l===null&&(l=Ud(),We.updateQueue=l),u=l.lastEffect,u===null?l.lastEffect=o.next=o:(d=u.next,u.next=o,o.next=d,l.lastEffect=o),o}function ow(){return tn().memoizedState}function Xd(o,l,u,d){var g=Xn();We.flags|=o,g.memoizedState=ba(1|l,{destroy:void 0},u,d===void 0?null:d)}function Gd(o,l,u,d){var g=tn();d=d===void 0?null:d;var y=g.memoizedState.inst;Tt!==null&&d!==null&&p0(d,Tt.memoizedState.deps)?g.memoizedState=ba(l,y,u,d):(We.flags|=o,g.memoizedState=ba(1|l,y,u,d))}function sw(o,l){Xd(8390656,8,o,l)}function C0(o,l){Gd(2048,8,o,l)}function F4(o){We.flags|=4;var l=We.updateQueue;if(l===null)l=Ud(),We.updateQueue=l,l.events=[o];else{var u=l.events;u===null?l.events=[o]:u.push(o)}}function lw(o){var l=tn().memoizedState;return F4({ref:l,nextImpl:o}),function(){if((mt&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}function aw(o,l){return Gd(4,2,o,l)}function cw(o,l){return Gd(4,4,o,l)}function uw(o,l){if(typeof l=="function"){o=o();var u=l(o);return function(){typeof u=="function"?u():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function fw(o,l,u){u=u!=null?u.concat([o]):null,Gd(4,4,uw.bind(null,l,o),u)}function T0(){}function dw(o,l){var u=tn();l=l===void 0?null:l;var d=u.memoizedState;return l!==null&&p0(l,d[1])?d[0]:(u.memoizedState=[o,l],o)}function hw(o,l){var u=tn();l=l===void 0?null:l;var d=u.memoizedState;if(l!==null&&p0(l,d[1]))return d[0];if(d=o(),cl){Vn(!0);try{o()}finally{Vn(!1)}}return u.memoizedState=[d,l],d}function k0(o,l,u){return u===void 0||(Oo&1073741824)!==0&&(it&261930)===0?o.memoizedState=l:(o.memoizedState=u,o=pC(),We.lanes|=o,ps|=o,u)}function pw(o,l,u,d){return yi(u,l)?u:ga.current!==null?(o=k0(o,u,d),yi(o,l)||(an=!0),o):(Oo&42)===0||(Oo&1073741824)!==0&&(it&261930)===0?(an=!0,o.memoizedState=u):(o=pC(),We.lanes|=o,ps|=o,l)}function mw(o,l,u,d,g){var y=X.p;X.p=y!==0&&8>y?y:8;var w=N.T,D={};N.T=D,R0(o,!1,l,u);try{var U=g(),ee=N.S;if(ee!==null&&ee(D,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var re=U4(U,d);ru(o,l,re,wi(o))}else ru(o,l,d,wi(o))}catch(fe){ru(o,l,{then:function(){},status:"rejected",reason:fe},wi())}finally{X.p=y,w!==null&&D.types!==null&&(w.types=D.types),N.T=w}}function Y4(){}function E0(o,l,u,d){if(o.tag!==5)throw Error(i(476));var g=gw(o).queue;mw(o,g,l,Y,u===null?Y4:function(){return yw(o),u(d)})}function gw(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xo,lastRenderedState:Y},next:null};var u={};return l.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xo,lastRenderedState:u},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function yw(o){var l=gw(o);l.next===null&&(l=o.alternate.memoizedState),ru(o,l.next.queue,{},wi())}function A0(){return Dn(xu)}function vw(){return tn().memoizedState}function bw(){return tn().memoizedState}function K4(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var u=wi();o=as(u);var d=cs(l,o,u);d!==null&&(li(d,l,u),Jc(d,l,u)),l={cache:i0()},o.payload=l;return}l=l.return}}function Z4(o,l,u){var d=wi();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Fd(o)?xw(l,u):(u=Vg(o,l,u,d),u!==null&&(li(u,o,d),Sw(u,l,d)))}function Ow(o,l,u){var d=wi();ru(o,l,u,d)}function ru(o,l,u,d){var g={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Fd(o))xw(l,g);else{var y=o.alternate;if(o.lanes===0&&(y===null||y.lanes===0)&&(y=l.lastRenderedReducer,y!==null))try{var w=l.lastRenderedState,D=y(w,u);if(g.hasEagerState=!0,g.eagerState=D,yi(D,w))return Rd(o,l,g,0),Dt===null&&Ad(),!1}catch{}if(u=Vg(o,l,g,d),u!==null)return li(u,o,d),Sw(u,l,d),!0}return!1}function R0(o,l,u,d){if(d={lane:2,revertLane:ly(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Fd(o)){if(l)throw Error(i(479))}else l=Vg(o,u,d,2),l!==null&&li(l,o,2)}function Fd(o){var l=o.alternate;return o===We||l!==null&&l===We}function xw(o,l){ya=Id=!0;var u=o.pending;u===null?l.next=l:(l.next=u.next,u.next=l),o.pending=l}function Sw(o,l,u){if((u&4194048)!==0){var d=l.lanes;d&=o.pendingLanes,u|=d,l.lanes=u,ct(o,u)}}var ou={readContext:Dn,use:Wd,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};ou.useEffectEvent=Xt;var ww={readContext:Dn,use:Wd,useCallback:function(o,l){return Xn().memoizedState=[o,l===void 0?null:l],o},useContext:Dn,useEffect:sw,useImperativeHandle:function(o,l,u){u=u!=null?u.concat([o]):null,Xd(4194308,4,uw.bind(null,l,o),u)},useLayoutEffect:function(o,l){return Xd(4194308,4,o,l)},useInsertionEffect:function(o,l){Xd(4,2,o,l)},useMemo:function(o,l){var u=Xn();l=l===void 0?null:l;var d=o();if(cl){Vn(!0);try{o()}finally{Vn(!1)}}return u.memoizedState=[d,l],d},useReducer:function(o,l,u){var d=Xn();if(u!==void 0){var g=u(l);if(cl){Vn(!0);try{u(l)}finally{Vn(!1)}}}else g=l;return d.memoizedState=d.baseState=g,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:g},d.queue=o,o=o.dispatch=Z4.bind(null,We,o),[d.memoizedState,o]},useRef:function(o){var l=Xn();return o={current:o},l.memoizedState=o},useState:function(o){o=S0(o);var l=o.queue,u=Ow.bind(null,We,l);return l.dispatch=u,[o.memoizedState,u]},useDebugValue:T0,useDeferredValue:function(o,l){var u=Xn();return k0(u,o,l)},useTransition:function(){var o=S0(!1);return o=mw.bind(null,We,o.queue,!0,!1),Xn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,u){var d=We,g=Xn();if(st){if(u===void 0)throw Error(i(407));u=u()}else{if(u=l(),Dt===null)throw Error(i(349));(it&127)!==0||US(d,l,u)}g.memoizedState=u;var y={value:u,getSnapshot:l};return g.queue=y,sw(VS.bind(null,d,y,o),[o]),d.flags|=2048,ba(9,{destroy:void 0},WS.bind(null,d,y,u,l),null),u},useId:function(){var o=Xn(),l=Dt.identifierPrefix;if(st){var u=Br,d=$r;u=(d&~(1<<32-gn(d)-1)).toString(32)+u,l="_"+l+"R_"+u,u=Hd++,0<u&&(l+="H"+u.toString(32)),l+="_"}else u=W4++,l="_"+l+"r_"+u.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:A0,useFormState:tw,useActionState:tw,useOptimistic:function(o){var l=Xn();l.memoizedState=l.baseState=o;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=u,l=R0.bind(null,We,!0,u),u.dispatch=l,[o,l]},useMemoCache:b0,useCacheRefresh:function(){return Xn().memoizedState=K4.bind(null,We)},useEffectEvent:function(o){var l=Xn(),u={impl:o};return l.memoizedState=u,function(){if((mt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},M0={readContext:Dn,use:Wd,useCallback:dw,useContext:Dn,useEffect:C0,useImperativeHandle:fw,useInsertionEffect:aw,useLayoutEffect:cw,useMemo:hw,useReducer:Vd,useRef:ow,useState:function(){return Vd(xo)},useDebugValue:T0,useDeferredValue:function(o,l){var u=tn();return pw(u,Tt.memoizedState,o,l)},useTransition:function(){var o=Vd(xo)[0],l=tn().memoizedState;return[typeof o=="boolean"?o:iu(o),l]},useSyncExternalStore:HS,useId:vw,useHostTransitionStatus:A0,useFormState:nw,useActionState:nw,useOptimistic:function(o,l){var u=tn();return FS(u,Tt,o,l)},useMemoCache:b0,useCacheRefresh:bw};M0.useEffectEvent=lw;var Cw={readContext:Dn,use:Wd,useCallback:dw,useContext:Dn,useEffect:C0,useImperativeHandle:fw,useInsertionEffect:aw,useLayoutEffect:cw,useMemo:hw,useReducer:x0,useRef:ow,useState:function(){return x0(xo)},useDebugValue:T0,useDeferredValue:function(o,l){var u=tn();return Tt===null?k0(u,o,l):pw(u,Tt.memoizedState,o,l)},useTransition:function(){var o=x0(xo)[0],l=tn().memoizedState;return[typeof o=="boolean"?o:iu(o),l]},useSyncExternalStore:HS,useId:vw,useHostTransitionStatus:A0,useFormState:rw,useActionState:rw,useOptimistic:function(o,l){var u=tn();return Tt!==null?FS(u,Tt,o,l):(u.baseState=o,[o,u.queue.dispatch])},useMemoCache:b0,useCacheRefresh:bw};Cw.useEffectEvent=lw;function D0(o,l,u,d){l=o.memoizedState,u=u(d,l),u=u==null?l:m({},l,u),o.memoizedState=u,o.lanes===0&&(o.updateQueue.baseState=u)}var P0={enqueueSetState:function(o,l,u){o=o._reactInternals;var d=wi(),g=as(d);g.payload=l,u!=null&&(g.callback=u),l=cs(o,g,d),l!==null&&(li(l,o,d),Jc(l,o,d))},enqueueReplaceState:function(o,l,u){o=o._reactInternals;var d=wi(),g=as(d);g.tag=1,g.payload=l,u!=null&&(g.callback=u),l=cs(o,g,d),l!==null&&(li(l,o,d),Jc(l,o,d))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var u=wi(),d=as(u);d.tag=2,l!=null&&(d.callback=l),l=cs(o,d,u),l!==null&&(li(l,o,u),Jc(l,o,u))}};function Tw(o,l,u,d,g,y,w){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(d,y,w):l.prototype&&l.prototype.isPureReactComponent?!Wc(u,d)||!Wc(g,y):!0}function kw(o,l,u,d){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(u,d),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(u,d),l.state!==o&&P0.enqueueReplaceState(l,l.state,null)}function ul(o,l){var u=l;if("ref"in l){u={};for(var d in l)d!=="ref"&&(u[d]=l[d])}if(o=o.defaultProps){u===l&&(u=m({},u));for(var g in o)u[g]===void 0&&(u[g]=o[g])}return u}function Ew(o){Ed(o)}function Aw(o){console.error(o)}function Rw(o){Ed(o)}function Yd(o,l){try{var u=o.onUncaughtError;u(l.value,{componentStack:l.stack})}catch(d){setTimeout(function(){throw d})}}function Mw(o,l,u){try{var d=o.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function z0(o,l,u){return u=as(u),u.tag=3,u.payload={element:null},u.callback=function(){Yd(o,l)},u}function Dw(o){return o=as(o),o.tag=3,o}function Pw(o,l,u,d){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var y=d.value;o.payload=function(){return g(y)},o.callback=function(){Mw(l,u,d)}}var w=u.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(o.callback=function(){Mw(l,u,d),typeof g!="function"&&(ms===null?ms=new Set([this]):ms.add(this));var D=d.stack;this.componentDidCatch(d.value,{componentStack:D!==null?D:""})})}function J4(o,l,u,d,g){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(l=u.alternate,l!==null&&fa(l,u,g,!0),u=bi.current,u!==null){switch(u.tag){case 31:case 13:return Ui===null?ah():u.alternate===null&&Gt===0&&(Gt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,d===jd?u.flags|=16384:(l=u.updateQueue,l===null?u.updateQueue=new Set([d]):l.add(d),ry(o,d,g)),!1;case 22:return u.flags|=65536,d===jd?u.flags|=16384:(l=u.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=l):(u=l.retryQueue,u===null?l.retryQueue=new Set([d]):u.add(d)),ry(o,d,g)),!1}throw Error(i(435,u.tag))}return ry(o,d,g),ah(),!1}if(st)return l=bi.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=g,d!==Zg&&(o=Error(i(422),{cause:d}),Gc(_i(o,u)))):(d!==Zg&&(l=Error(i(423),{cause:d}),Gc(_i(l,u))),o=o.current.alternate,o.flags|=65536,g&=-g,o.lanes|=g,d=_i(d,u),g=z0(o.stateNode,d,g),c0(o,g),Gt!==4&&(Gt=2)),!1;var y=Error(i(520),{cause:d});if(y=_i(y,u),hu===null?hu=[y]:hu.push(y),Gt!==4&&(Gt=2),l===null)return!0;d=_i(d,u),u=l;do{switch(u.tag){case 3:return u.flags|=65536,o=g&-g,u.lanes|=o,o=z0(u.stateNode,d,o),c0(u,o),!1;case 1:if(l=u.type,y=u.stateNode,(u.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ms===null||!ms.has(y))))return u.flags|=65536,g&=-g,u.lanes|=g,g=Dw(g),Pw(g,o,u,d),c0(u,g),!1}u=u.return}while(u!==null);return!1}var $0=Error(i(461)),an=!1;function Pn(o,l,u,d){l.child=o===null?LS(l,null,u,d):al(l,o.child,u,d)}function zw(o,l,u,d,g){u=u.render;var y=l.ref;if("ref"in d){var w={};for(var D in d)D!=="ref"&&(w[D]=d[D])}else w=d;return rl(l),d=m0(o,l,u,w,y,g),D=g0(),o!==null&&!an?(y0(o,l,g),So(o,l,g)):(st&&D&&Yg(l),l.flags|=1,Pn(o,l,d,g),l.child)}function $w(o,l,u,d,g){if(o===null){var y=u.type;return typeof y=="function"&&!Xg(y)&&y.defaultProps===void 0&&u.compare===null?(l.tag=15,l.type=y,Bw(o,l,y,d,g)):(o=Dd(u.type,null,d,l,l.mode,g),o.ref=l.ref,o.return=l,l.child=o)}if(y=o.child,!I0(o,g)){var w=y.memoizedProps;if(u=u.compare,u=u!==null?u:Wc,u(w,d)&&o.ref===l.ref)return So(o,l,g)}return l.flags|=1,o=go(y,d),o.ref=l.ref,o.return=l,l.child=o}function Bw(o,l,u,d,g){if(o!==null){var y=o.memoizedProps;if(Wc(y,d)&&o.ref===l.ref)if(an=!1,l.pendingProps=d=y,I0(o,g))(o.flags&131072)!==0&&(an=!0);else return l.lanes=o.lanes,So(o,l,g)}return B0(o,l,u,d,g)}function Lw(o,l,u,d){var g=d.children,y=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((l.flags&128)!==0){if(y=y!==null?y.baseLanes|u:u,o!==null){for(d=l.child=o.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~y}else d=0,l.child=null;return jw(o,l,y,u,d)}if((u&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&Bd(l,y!==null?y.cachePool:null),y!==null?QS(l,y):f0(),_S(l);else return d=l.lanes=536870912,jw(o,l,y!==null?y.baseLanes|u:u,u,d)}else y!==null?(Bd(l,y.cachePool),QS(l,y),fs(),l.memoizedState=null):(o!==null&&Bd(l,null),f0(),fs());return Pn(o,l,g,u),l.child}function su(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function jw(o,l,u,d,g){var y=o0();return y=y===null?null:{parent:sn._currentValue,pool:y},l.memoizedState={baseLanes:u,cachePool:y},o!==null&&Bd(l,null),f0(),_S(l),o!==null&&fa(o,l,d,!0),l.childLanes=g,null}function Kd(o,l){return l=Jd({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function Nw(o,l,u){return al(l,o.child,null,u),o=Kd(l,l.pendingProps),o.flags|=2,Oi(l),l.memoizedState=null,o}function e3(o,l,u){var d=l.pendingProps,g=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(st){if(d.mode==="hidden")return o=Kd(l,d),l.lanes=536870912,su(null,o);if(h0(l),(o=Nt)?(o=YC(o,Hi),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:is!==null?{id:$r,overflow:Br}:null,retryLane:536870912,hydrationErrors:null},u=xS(o),u.return=l,l.child=u,Mn=l,Nt=null)):o=null,o===null)throw os(l);return l.lanes=536870912,null}return Kd(l,d)}var y=o.memoizedState;if(y!==null){var w=y.dehydrated;if(h0(l),g)if(l.flags&256)l.flags&=-257,l=Nw(o,l,u);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(i(558));else if(an||fa(o,l,u,!1),g=(u&o.childLanes)!==0,an||g){if(d=Dt,d!==null&&(w=Ht(d,u),w!==0&&w!==y.retryLane))throw y.retryLane=w,el(o,w),li(d,o,w),$0;ah(),l=Nw(o,l,u)}else o=y.treeContext,Nt=Wi(w.nextSibling),Mn=l,st=!0,rs=null,Hi=!1,o!==null&&CS(l,o),l=Kd(l,d),l.flags|=4096;return l}return o=go(o.child,{mode:d.mode,children:d.children}),o.ref=l.ref,l.child=o,o.return=l,o}function Zd(o,l){var u=l.ref;if(u===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(o===null||o.ref!==u)&&(l.flags|=4194816)}}function B0(o,l,u,d,g){return rl(l),u=m0(o,l,u,d,void 0,g),d=g0(),o!==null&&!an?(y0(o,l,g),So(o,l,g)):(st&&d&&Yg(l),l.flags|=1,Pn(o,l,u,g),l.child)}function Qw(o,l,u,d,g,y){return rl(l),l.updateQueue=null,u=IS(l,d,u,g),qS(o),d=g0(),o!==null&&!an?(y0(o,l,y),So(o,l,y)):(st&&d&&Yg(l),l.flags|=1,Pn(o,l,u,y),l.child)}function _w(o,l,u,d,g){if(rl(l),l.stateNode===null){var y=la,w=u.contextType;typeof w=="object"&&w!==null&&(y=Dn(w)),y=new u(d,y),l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=P0,l.stateNode=y,y._reactInternals=l,y=l.stateNode,y.props=d,y.state=l.memoizedState,y.refs={},l0(l),w=u.contextType,y.context=typeof w=="object"&&w!==null?Dn(w):la,y.state=l.memoizedState,w=u.getDerivedStateFromProps,typeof w=="function"&&(D0(l,u,w,d),y.state=l.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(w=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),w!==y.state&&P0.enqueueReplaceState(y,y.state,null),tu(l,d,y,g),eu(),y.state=l.memoizedState),typeof y.componentDidMount=="function"&&(l.flags|=4194308),d=!0}else if(o===null){y=l.stateNode;var D=l.memoizedProps,U=ul(u,D);y.props=U;var ee=y.context,re=u.contextType;w=la,typeof re=="object"&&re!==null&&(w=Dn(re));var fe=u.getDerivedStateFromProps;re=typeof fe=="function"||typeof y.getSnapshotBeforeUpdate=="function",D=l.pendingProps!==D,re||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(D||ee!==w)&&kw(l,y,d,w),ls=!1;var te=l.memoizedState;y.state=te,tu(l,d,y,g),eu(),ee=l.memoizedState,D||te!==ee||ls?(typeof fe=="function"&&(D0(l,u,fe,d),ee=l.memoizedState),(U=ls||Tw(l,u,U,d,te,ee,w))?(re||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(l.flags|=4194308)):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=d,l.memoizedState=ee),y.props=d,y.state=ee,y.context=w,d=U):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),d=!1)}else{y=l.stateNode,a0(o,l),w=l.memoizedProps,re=ul(u,w),y.props=re,fe=l.pendingProps,te=y.context,ee=u.contextType,U=la,typeof ee=="object"&&ee!==null&&(U=Dn(ee)),D=u.getDerivedStateFromProps,(ee=typeof D=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(w!==fe||te!==U)&&kw(l,y,d,U),ls=!1,te=l.memoizedState,y.state=te,tu(l,d,y,g),eu();var ne=l.memoizedState;w!==fe||te!==ne||ls||o!==null&&o.dependencies!==null&&zd(o.dependencies)?(typeof D=="function"&&(D0(l,u,D,d),ne=l.memoizedState),(re=ls||Tw(l,u,re,d,te,ne,U)||o!==null&&o.dependencies!==null&&zd(o.dependencies))?(ee||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(d,ne,U),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(d,ne,U)),typeof y.componentDidUpdate=="function"&&(l.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof y.componentDidUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=1024),l.memoizedProps=d,l.memoizedState=ne),y.props=d,y.state=ne,y.context=U,d=re):(typeof y.componentDidUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===o.memoizedProps&&te===o.memoizedState||(l.flags|=1024),d=!1)}return y=d,Zd(o,l),d=(l.flags&128)!==0,y||d?(y=l.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:y.render(),l.flags|=1,o!==null&&d?(l.child=al(l,o.child,null,g),l.child=al(l,null,u,g)):Pn(o,l,u,g),l.memoizedState=y.state,o=l.child):o=So(o,l,g),o}function qw(o,l,u,d){return nl(),l.flags|=256,Pn(o,l,u,d),l.child}var L0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function j0(o){return{baseLanes:o,cachePool:MS()}}function N0(o,l,u){return o=o!==null?o.childLanes&~u:0,l&&(o|=Si),o}function Iw(o,l,u){var d=l.pendingProps,g=!1,y=(l.flags&128)!==0,w;if((w=y)||(w=o!==null&&o.memoizedState===null?!1:(en.current&2)!==0),w&&(g=!0,l.flags&=-129),w=(l.flags&32)!==0,l.flags&=-33,o===null){if(st){if(g?us(l):fs(),(o=Nt)?(o=YC(o,Hi),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:is!==null?{id:$r,overflow:Br}:null,retryLane:536870912,hydrationErrors:null},u=xS(o),u.return=l,l.child=u,Mn=l,Nt=null)):o=null,o===null)throw os(l);return Oy(o)?l.lanes=32:l.lanes=536870912,null}var D=d.children;return d=d.fallback,g?(fs(),g=l.mode,D=Jd({mode:"hidden",children:D},g),d=tl(d,g,u,null),D.return=l,d.return=l,D.sibling=d,l.child=D,d=l.child,d.memoizedState=j0(u),d.childLanes=N0(o,w,u),l.memoizedState=L0,su(null,d)):(us(l),Q0(l,D))}var U=o.memoizedState;if(U!==null&&(D=U.dehydrated,D!==null)){if(y)l.flags&256?(us(l),l.flags&=-257,l=_0(o,l,u)):l.memoizedState!==null?(fs(),l.child=o.child,l.flags|=128,l=null):(fs(),D=d.fallback,g=l.mode,d=Jd({mode:"visible",children:d.children},g),D=tl(D,g,u,null),D.flags|=2,d.return=l,D.return=l,d.sibling=D,l.child=d,al(l,o.child,null,u),d=l.child,d.memoizedState=j0(u),d.childLanes=N0(o,w,u),l.memoizedState=L0,l=su(null,d));else if(us(l),Oy(D)){if(w=D.nextSibling&&D.nextSibling.dataset,w)var ee=w.dgst;w=ee,d=Error(i(419)),d.stack="",d.digest=w,Gc({value:d,source:null,stack:null}),l=_0(o,l,u)}else if(an||fa(o,l,u,!1),w=(u&o.childLanes)!==0,an||w){if(w=Dt,w!==null&&(d=Ht(w,u),d!==0&&d!==U.retryLane))throw U.retryLane=d,el(o,d),li(w,o,d),$0;by(D)||ah(),l=_0(o,l,u)}else by(D)?(l.flags|=192,l.child=o.child,l=null):(o=U.treeContext,Nt=Wi(D.nextSibling),Mn=l,st=!0,rs=null,Hi=!1,o!==null&&CS(l,o),l=Q0(l,d.children),l.flags|=4096);return l}return g?(fs(),D=d.fallback,g=l.mode,U=o.child,ee=U.sibling,d=go(U,{mode:"hidden",children:d.children}),d.subtreeFlags=U.subtreeFlags&65011712,ee!==null?D=go(ee,D):(D=tl(D,g,u,null),D.flags|=2),D.return=l,d.return=l,d.sibling=D,l.child=d,su(null,d),d=l.child,D=o.child.memoizedState,D===null?D=j0(u):(g=D.cachePool,g!==null?(U=sn._currentValue,g=g.parent!==U?{parent:U,pool:U}:g):g=MS(),D={baseLanes:D.baseLanes|u,cachePool:g}),d.memoizedState=D,d.childLanes=N0(o,w,u),l.memoizedState=L0,su(o.child,d)):(us(l),u=o.child,o=u.sibling,u=go(u,{mode:"visible",children:d.children}),u.return=l,u.sibling=null,o!==null&&(w=l.deletions,w===null?(l.deletions=[o],l.flags|=16):w.push(o)),l.child=u,l.memoizedState=null,u)}function Q0(o,l){return l=Jd({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function Jd(o,l){return o=vi(22,o,null,l),o.lanes=0,o}function _0(o,l,u){return al(l,o.child,null,u),o=Q0(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Hw(o,l,u){o.lanes|=l;var d=o.alternate;d!==null&&(d.lanes|=l),t0(o.return,l,u)}function q0(o,l,u,d,g,y){var w=o.memoizedState;w===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g,treeForkCount:y}:(w.isBackwards=l,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=u,w.tailMode=g,w.treeForkCount=y)}function Uw(o,l,u){var d=l.pendingProps,g=d.revealOrder,y=d.tail;d=d.children;var w=en.current,D=(w&2)!==0;if(D?(w=w&1|2,l.flags|=128):w&=1,se(en,w),Pn(o,l,d,u),d=st?Xc:0,!D&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Hw(o,u,l);else if(o.tag===19)Hw(o,u,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(g){case"forwards":for(u=l.child,g=null;u!==null;)o=u.alternate,o!==null&&qd(o)===null&&(g=u),u=u.sibling;u=g,u===null?(g=l.child,l.child=null):(g=u.sibling,u.sibling=null),q0(l,!1,g,u,y,d);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=l.child,l.child=null;g!==null;){if(o=g.alternate,o!==null&&qd(o)===null){l.child=g;break}o=g.sibling,g.sibling=u,u=g,g=o}q0(l,!0,u,null,y,d);break;case"together":q0(l,!1,null,null,void 0,d);break;default:l.memoizedState=null}return l.child}function So(o,l,u){if(o!==null&&(l.dependencies=o.dependencies),ps|=l.lanes,(u&l.childLanes)===0)if(o!==null){if(fa(o,l,u,!1),(u&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(i(153));if(l.child!==null){for(o=l.child,u=go(o,o.pendingProps),l.child=u,u.return=l;o.sibling!==null;)o=o.sibling,u=u.sibling=go(o,o.pendingProps),u.return=l;u.sibling=null}return l.child}function I0(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&zd(o)))}function t3(o,l,u){switch(l.tag){case 3:Te(l,l.stateNode.containerInfo),ss(l,sn,o.memoizedState.cache),nl();break;case 27:case 5:ke(l);break;case 4:Te(l,l.stateNode.containerInfo);break;case 10:ss(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,h0(l),null;break;case 13:var d=l.memoizedState;if(d!==null)return d.dehydrated!==null?(us(l),l.flags|=128,null):(u&l.child.childLanes)!==0?Iw(o,l,u):(us(l),o=So(o,l,u),o!==null?o.sibling:null);us(l);break;case 19:var g=(o.flags&128)!==0;if(d=(u&l.childLanes)!==0,d||(fa(o,l,u,!1),d=(u&l.childLanes)!==0),g){if(d)return Uw(o,l,u);l.flags|=128}if(g=l.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),se(en,en.current),d)break;return null;case 22:return l.lanes=0,Lw(o,l,u,l.pendingProps);case 24:ss(l,sn,o.memoizedState.cache)}return So(o,l,u)}function Ww(o,l,u){if(o!==null)if(o.memoizedProps!==l.pendingProps)an=!0;else{if(!I0(o,u)&&(l.flags&128)===0)return an=!1,t3(o,l,u);an=(o.flags&131072)!==0}else an=!1,st&&(l.flags&1048576)!==0&&wS(l,Xc,l.index);switch(l.lanes=0,l.tag){case 16:e:{var d=l.pendingProps;if(o=sl(l.elementType),l.type=o,typeof o=="function")Xg(o)?(d=ul(o,d),l.tag=1,l=_w(null,l,o,d,u)):(l.tag=0,l=B0(null,l,o,d,u));else{if(o!=null){var g=o.$$typeof;if(g===P){l.tag=11,l=zw(null,l,o,d,u);break e}else if(g===M){l.tag=14,l=$w(null,l,o,d,u);break e}}throw l=I(o)||o,Error(i(306,l,""))}}return l;case 0:return B0(o,l,l.type,l.pendingProps,u);case 1:return d=l.type,g=ul(d,l.pendingProps),_w(o,l,d,g,u);case 3:e:{if(Te(l,l.stateNode.containerInfo),o===null)throw Error(i(387));d=l.pendingProps;var y=l.memoizedState;g=y.element,a0(o,l),tu(l,d,null,u);var w=l.memoizedState;if(d=w.cache,ss(l,sn,d),d!==y.cache&&n0(l,[sn],u,!0),eu(),d=w.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:w.cache},l.updateQueue.baseState=y,l.memoizedState=y,l.flags&256){l=qw(o,l,d,u);break e}else if(d!==g){g=_i(Error(i(424)),l),Gc(g),l=qw(o,l,d,u);break e}else for(o=l.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,Nt=Wi(o.firstChild),Mn=l,st=!0,rs=null,Hi=!0,u=LS(l,null,d,u),l.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(nl(),d===g){l=So(o,l,u);break e}Pn(o,l,d,u)}l=l.child}return l;case 26:return Zd(o,l),o===null?(u=nT(l.type,null,l.pendingProps,null))?l.memoizedState=u:st||(u=l.type,o=l.pendingProps,d=mh(ie.current).createElement(u),d[Rn]=l,d[ti]=o,zn(d,u,o),Cn(d),l.stateNode=d):l.memoizedState=nT(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return ke(l),o===null&&st&&(d=l.stateNode=JC(l.type,l.pendingProps,ie.current),Mn=l,Hi=!0,g=Nt,bs(l.type)?(xy=g,Nt=Wi(d.firstChild)):Nt=g),Pn(o,l,l.pendingProps.children,u),Zd(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&st&&((g=d=Nt)&&(d=D3(d,l.type,l.pendingProps,Hi),d!==null?(l.stateNode=d,Mn=l,Nt=Wi(d.firstChild),Hi=!1,g=!0):g=!1),g||os(l)),ke(l),g=l.type,y=l.pendingProps,w=o!==null?o.memoizedProps:null,d=y.children,gy(g,y)?d=null:w!==null&&gy(g,w)&&(l.flags|=32),l.memoizedState!==null&&(g=m0(o,l,V4,null,null,u),xu._currentValue=g),Zd(o,l),Pn(o,l,d,u),l.child;case 6:return o===null&&st&&((o=u=Nt)&&(u=P3(u,l.pendingProps,Hi),u!==null?(l.stateNode=u,Mn=l,Nt=null,o=!0):o=!1),o||os(l)),null;case 13:return Iw(o,l,u);case 4:return Te(l,l.stateNode.containerInfo),d=l.pendingProps,o===null?l.child=al(l,null,d,u):Pn(o,l,d,u),l.child;case 11:return zw(o,l,l.type,l.pendingProps,u);case 7:return Pn(o,l,l.pendingProps,u),l.child;case 8:return Pn(o,l,l.pendingProps.children,u),l.child;case 12:return Pn(o,l,l.pendingProps.children,u),l.child;case 10:return d=l.pendingProps,ss(l,l.type,d.value),Pn(o,l,d.children,u),l.child;case 9:return g=l.type._context,d=l.pendingProps.children,rl(l),g=Dn(g),d=d(g),l.flags|=1,Pn(o,l,d,u),l.child;case 14:return $w(o,l,l.type,l.pendingProps,u);case 15:return Bw(o,l,l.type,l.pendingProps,u);case 19:return Uw(o,l,u);case 31:return e3(o,l,u);case 22:return Lw(o,l,u,l.pendingProps);case 24:return rl(l),d=Dn(sn),o===null?(g=o0(),g===null&&(g=Dt,y=i0(),g.pooledCache=y,y.refCount++,y!==null&&(g.pooledCacheLanes|=u),g=y),l.memoizedState={parent:d,cache:g},l0(l),ss(l,sn,g)):((o.lanes&u)!==0&&(a0(o,l),tu(l,null,null,u),eu()),g=o.memoizedState,y=l.memoizedState,g.parent!==d?(g={parent:d,cache:d},l.memoizedState=g,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=g),ss(l,sn,d)):(d=y.cache,ss(l,sn,d),d!==g.cache&&n0(l,[sn],u,!0))),Pn(o,l,l.pendingProps.children,u),l.child;case 29:throw l.pendingProps}throw Error(i(156,l.tag))}function wo(o){o.flags|=4}function H0(o,l,u,d,g){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(g&335544128)===g)if(o.stateNode.complete)o.flags|=8192;else if(vC())o.flags|=8192;else throw ll=jd,s0}else o.flags&=-16777217}function Vw(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!lT(l))if(vC())o.flags|=8192;else throw ll=jd,s0}function eh(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?Qe():536870912,o.lanes|=l,wa|=l)}function lu(o,l){if(!st)switch(o.tailMode){case"hidden":l=o.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?o.tail=null:u.sibling=null;break;case"collapsed":u=o.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:d.sibling=null}}function Qt(o){var l=o.alternate!==null&&o.alternate.child===o.child,u=0,d=0;if(l)for(var g=o.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=o,g=g.sibling;else for(g=o.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=o,g=g.sibling;return o.subtreeFlags|=d,o.childLanes=u,l}function n3(o,l,u){var d=l.pendingProps;switch(Kg(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(l),null;case 1:return Qt(l),null;case 3:return u=l.stateNode,d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),bo(sn),Ae(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(o===null||o.child===null)&&(ua(l)?wo(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Jg())),Qt(l),null;case 26:var g=l.type,y=l.memoizedState;return o===null?(wo(l),y!==null?(Qt(l),Vw(l,y)):(Qt(l),H0(l,g,null,d,u))):y?y!==o.memoizedState?(wo(l),Qt(l),Vw(l,y)):(Qt(l),l.flags&=-16777217):(o=o.memoizedProps,o!==d&&wo(l),Qt(l),H0(l,g,o,d,u)),null;case 27:if(Me(l),u=ie.current,g=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==d&&wo(l);else{if(!d){if(l.stateNode===null)throw Error(i(166));return Qt(l),null}o=ue.current,ua(l)?TS(l):(o=JC(g,d,u),l.stateNode=o,wo(l))}return Qt(l),null;case 5:if(Me(l),g=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==d&&wo(l);else{if(!d){if(l.stateNode===null)throw Error(i(166));return Qt(l),null}if(y=ue.current,ua(l))TS(l);else{var w=mh(ie.current);switch(y){case 1:y=w.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:y=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":y=w.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":y=w.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":y=w.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof d.is=="string"?w.createElement("select",{is:d.is}):w.createElement("select"),d.multiple?y.multiple=!0:d.size&&(y.size=d.size);break;default:y=typeof d.is=="string"?w.createElement(g,{is:d.is}):w.createElement(g)}}y[Rn]=l,y[ti]=d;e:for(w=l.child;w!==null;){if(w.tag===5||w.tag===6)y.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===l)break e;for(;w.sibling===null;){if(w.return===null||w.return===l)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}l.stateNode=y;e:switch(zn(y,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&wo(l)}}return Qt(l),H0(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,u),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==d&&wo(l);else{if(typeof d!="string"&&l.stateNode===null)throw Error(i(166));if(o=ie.current,ua(l)){if(o=l.stateNode,u=l.memoizedProps,d=null,g=Mn,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}o[Rn]=l,o=!!(o.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||IC(o.nodeValue,u)),o||os(l,!0)}else o=mh(o).createTextNode(d),o[Rn]=l,l.stateNode=o}return Qt(l),null;case 31:if(u=l.memoizedState,o===null||o.memoizedState!==null){if(d=ua(l),u!==null){if(o===null){if(!d)throw Error(i(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(557));o[Rn]=l}else nl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),o=!1}else u=Jg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=u),o=!0;if(!o)return l.flags&256?(Oi(l),l):(Oi(l),null);if((l.flags&128)!==0)throw Error(i(558))}return Qt(l),null;case 13:if(d=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(g=ua(l),d!==null&&d.dehydrated!==null){if(o===null){if(!g)throw Error(i(318));if(g=l.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(i(317));g[Rn]=l}else nl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),g=!1}else g=Jg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=g),g=!0;if(!g)return l.flags&256?(Oi(l),l):(Oi(l),null)}return Oi(l),(l.flags&128)!==0?(l.lanes=u,l):(u=d!==null,o=o!==null&&o.memoizedState!==null,u&&(d=l.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),y=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool),y!==g&&(d.flags|=2048)),u!==o&&u&&(l.child.flags|=8192),eh(l,l.updateQueue),Qt(l),null);case 4:return Ae(),o===null&&fy(l.stateNode.containerInfo),Qt(l),null;case 10:return bo(l.type),Qt(l),null;case 19:if(G(en),d=l.memoizedState,d===null)return Qt(l),null;if(g=(l.flags&128)!==0,y=d.rendering,y===null)if(g)lu(d,!1);else{if(Gt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(y=qd(o),y!==null){for(l.flags|=128,lu(d,!1),o=y.updateQueue,l.updateQueue=o,eh(l,o),l.subtreeFlags=0,o=u,u=l.child;u!==null;)OS(u,o),u=u.sibling;return se(en,en.current&1|2),st&&yo(l,d.treeForkCount),l.child}o=o.sibling}d.tail!==null&&Lt()>oh&&(l.flags|=128,g=!0,lu(d,!1),l.lanes=4194304)}else{if(!g)if(o=qd(y),o!==null){if(l.flags|=128,g=!0,o=o.updateQueue,l.updateQueue=o,eh(l,o),lu(d,!0),d.tail===null&&d.tailMode==="hidden"&&!y.alternate&&!st)return Qt(l),null}else 2*Lt()-d.renderingStartTime>oh&&u!==536870912&&(l.flags|=128,g=!0,lu(d,!1),l.lanes=4194304);d.isBackwards?(y.sibling=l.child,l.child=y):(o=d.last,o!==null?o.sibling=y:l.child=y,d.last=y)}return d.tail!==null?(o=d.tail,d.rendering=o,d.tail=o.sibling,d.renderingStartTime=Lt(),o.sibling=null,u=en.current,se(en,g?u&1|2:u&1),st&&yo(l,d.treeForkCount),o):(Qt(l),null);case 22:case 23:return Oi(l),d0(),d=l.memoizedState!==null,o!==null?o.memoizedState!==null!==d&&(l.flags|=8192):d&&(l.flags|=8192),d?(u&536870912)!==0&&(l.flags&128)===0&&(Qt(l),l.subtreeFlags&6&&(l.flags|=8192)):Qt(l),u=l.updateQueue,u!==null&&eh(l,u.retryQueue),u=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==u&&(l.flags|=2048),o!==null&&G(ol),null;case 24:return u=null,o!==null&&(u=o.memoizedState.cache),l.memoizedState.cache!==u&&(l.flags|=2048),bo(sn),Qt(l),null;case 25:return null;case 30:return null}throw Error(i(156,l.tag))}function i3(o,l){switch(Kg(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return bo(sn),Ae(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return Me(l),null;case 31:if(l.memoizedState!==null){if(Oi(l),l.alternate===null)throw Error(i(340));nl()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(Oi(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(i(340));nl()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return G(en),null;case 4:return Ae(),null;case 10:return bo(l.type),null;case 22:case 23:return Oi(l),d0(),o!==null&&G(ol),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return bo(sn),null;case 25:return null;default:return null}}function Xw(o,l){switch(Kg(l),l.tag){case 3:bo(sn),Ae();break;case 26:case 27:case 5:Me(l);break;case 4:Ae();break;case 31:l.memoizedState!==null&&Oi(l);break;case 13:Oi(l);break;case 19:G(en);break;case 10:bo(l.type);break;case 22:case 23:Oi(l),d0(),o!==null&&G(ol);break;case 24:bo(sn)}}function au(o,l){try{var u=l.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var g=d.next;u=g;do{if((u.tag&o)===o){d=void 0;var y=u.create,w=u.inst;d=y(),w.destroy=d}u=u.next}while(u!==g)}}catch(D){xt(l,l.return,D)}}function ds(o,l,u){try{var d=l.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var y=g.next;d=y;do{if((d.tag&o)===o){var w=d.inst,D=w.destroy;if(D!==void 0){w.destroy=void 0,g=l;var U=u,ee=D;try{ee()}catch(re){xt(g,U,re)}}}d=d.next}while(d!==y)}}catch(re){xt(l,l.return,re)}}function Gw(o){var l=o.updateQueue;if(l!==null){var u=o.stateNode;try{NS(l,u)}catch(d){xt(o,o.return,d)}}}function Fw(o,l,u){u.props=ul(o.type,o.memoizedProps),u.state=o.memoizedState;try{u.componentWillUnmount()}catch(d){xt(o,l,d)}}function cu(o,l){try{var u=o.ref;if(u!==null){switch(o.tag){case 26:case 27:case 5:var d=o.stateNode;break;case 30:d=o.stateNode;break;default:d=o.stateNode}typeof u=="function"?o.refCleanup=u(d):u.current=d}}catch(g){xt(o,l,g)}}function Lr(o,l){var u=o.ref,d=o.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(g){xt(o,l,g)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){xt(o,l,g)}else u.current=null}function Yw(o){var l=o.type,u=o.memoizedProps,d=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":u.autoFocus&&d.focus();break e;case"img":u.src?d.src=u.src:u.srcSet&&(d.srcset=u.srcSet)}}catch(g){xt(o,o.return,g)}}function U0(o,l,u){try{var d=o.stateNode;T3(d,o.type,u,l),d[ti]=l}catch(g){xt(o,o.return,g)}}function Kw(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&bs(o.type)||o.tag===4}function W0(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Kw(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&bs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function V0(o,l,u){var d=o.tag;if(d===5||d===6)o=o.stateNode,l?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(o,l):(l=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,l.appendChild(o),u=u._reactRootContainer,u!=null||l.onclick!==null||(l.onclick=po));else if(d!==4&&(d===27&&bs(o.type)&&(u=o.stateNode,l=null),o=o.child,o!==null))for(V0(o,l,u),o=o.sibling;o!==null;)V0(o,l,u),o=o.sibling}function th(o,l,u){var d=o.tag;if(d===5||d===6)o=o.stateNode,l?u.insertBefore(o,l):u.appendChild(o);else if(d!==4&&(d===27&&bs(o.type)&&(u=o.stateNode),o=o.child,o!==null))for(th(o,l,u),o=o.sibling;o!==null;)th(o,l,u),o=o.sibling}function Zw(o){var l=o.stateNode,u=o.memoizedProps;try{for(var d=o.type,g=l.attributes;g.length;)l.removeAttributeNode(g[0]);zn(l,d,u),l[Rn]=o,l[ti]=u}catch(y){xt(o,o.return,y)}}var Co=!1,cn=!1,X0=!1,Jw=typeof WeakSet=="function"?WeakSet:Set,Tn=null;function r3(o,l){if(o=o.containerInfo,py=Sh,o=fS(o),_g(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var w=0,D=-1,U=-1,ee=0,re=0,fe=o,te=null;t:for(;;){for(var ne;fe!==u||g!==0&&fe.nodeType!==3||(D=w+g),fe!==y||d!==0&&fe.nodeType!==3||(U=w+d),fe.nodeType===3&&(w+=fe.nodeValue.length),(ne=fe.firstChild)!==null;)te=fe,fe=ne;for(;;){if(fe===o)break t;if(te===u&&++ee===g&&(D=w),te===y&&++re===d&&(U=w),(ne=fe.nextSibling)!==null)break;fe=te,te=fe.parentNode}fe=ne}u=D===-1||U===-1?null:{start:D,end:U}}else u=null}u=u||{start:0,end:0}}else u=null;for(my={focusedElem:o,selectionRange:u},Sh=!1,Tn=l;Tn!==null;)if(l=Tn,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Tn=o;else for(;Tn!==null;){switch(l=Tn,y=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(u=0;u<o.length;u++)g=o[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&y!==null){o=void 0,u=l,g=y.memoizedProps,y=y.memoizedState,d=u.stateNode;try{var xe=ul(u.type,g);o=d.getSnapshotBeforeUpdate(xe,y),d.__reactInternalSnapshotBeforeUpdate=o}catch(ze){xt(u,u.return,ze)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,u=o.nodeType,u===9)vy(o);else if(u===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":vy(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(i(163))}if(o=l.sibling,o!==null){o.return=l.return,Tn=o;break}Tn=l.return}}function eC(o,l,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:ko(o,u),d&4&&au(5,u);break;case 1:if(ko(o,u),d&4)if(o=u.stateNode,l===null)try{o.componentDidMount()}catch(w){xt(u,u.return,w)}else{var g=ul(u.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(g,l,o.__reactInternalSnapshotBeforeUpdate)}catch(w){xt(u,u.return,w)}}d&64&&Gw(u),d&512&&cu(u,u.return);break;case 3:if(ko(o,u),d&64&&(o=u.updateQueue,o!==null)){if(l=null,u.child!==null)switch(u.child.tag){case 27:case 5:l=u.child.stateNode;break;case 1:l=u.child.stateNode}try{NS(o,l)}catch(w){xt(u,u.return,w)}}break;case 27:l===null&&d&4&&Zw(u);case 26:case 5:ko(o,u),l===null&&d&4&&Yw(u),d&512&&cu(u,u.return);break;case 12:ko(o,u);break;case 31:ko(o,u),d&4&&iC(o,u);break;case 13:ko(o,u),d&4&&rC(o,u),d&64&&(o=u.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(u=h3.bind(null,u),z3(o,u))));break;case 22:if(d=u.memoizedState!==null||Co,!d){l=l!==null&&l.memoizedState!==null||cn,g=Co;var y=cn;Co=d,(cn=l)&&!y?Eo(o,u,(u.subtreeFlags&8772)!==0):ko(o,u),Co=g,cn=y}break;case 30:break;default:ko(o,u)}}function tC(o){var l=o.alternate;l!==null&&(o.alternate=null,tC(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&wg(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var _t=null,ii=!1;function To(o,l,u){for(u=u.child;u!==null;)nC(o,l,u),u=u.sibling}function nC(o,l,u){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Wn,u)}catch{}switch(u.tag){case 26:cn||Lr(u,l),To(o,l,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:cn||Lr(u,l);var d=_t,g=ii;bs(u.type)&&(_t=u.stateNode,ii=!1),To(o,l,u),vu(u.stateNode),_t=d,ii=g;break;case 5:cn||Lr(u,l);case 6:if(d=_t,g=ii,_t=null,To(o,l,u),_t=d,ii=g,_t!==null)if(ii)try{(_t.nodeType===9?_t.body:_t.nodeName==="HTML"?_t.ownerDocument.body:_t).removeChild(u.stateNode)}catch(y){xt(u,l,y)}else try{_t.removeChild(u.stateNode)}catch(y){xt(u,l,y)}break;case 18:_t!==null&&(ii?(o=_t,GC(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,u.stateNode),Da(o)):GC(_t,u.stateNode));break;case 4:d=_t,g=ii,_t=u.stateNode.containerInfo,ii=!0,To(o,l,u),_t=d,ii=g;break;case 0:case 11:case 14:case 15:ds(2,u,l),cn||ds(4,u,l),To(o,l,u);break;case 1:cn||(Lr(u,l),d=u.stateNode,typeof d.componentWillUnmount=="function"&&Fw(u,l,d)),To(o,l,u);break;case 21:To(o,l,u);break;case 22:cn=(d=cn)||u.memoizedState!==null,To(o,l,u),cn=d;break;default:To(o,l,u)}}function iC(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Da(o)}catch(u){xt(l,l.return,u)}}}function rC(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Da(o)}catch(u){xt(l,l.return,u)}}function o3(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new Jw),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new Jw),l;default:throw Error(i(435,o.tag))}}function nh(o,l){var u=o3(o);l.forEach(function(d){if(!u.has(d)){u.add(d);var g=p3.bind(null,o,d);d.then(g,g)}})}function ri(o,l){var u=l.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d],y=o,w=l,D=w;e:for(;D!==null;){switch(D.tag){case 27:if(bs(D.type)){_t=D.stateNode,ii=!1;break e}break;case 5:_t=D.stateNode,ii=!1;break e;case 3:case 4:_t=D.stateNode.containerInfo,ii=!0;break e}D=D.return}if(_t===null)throw Error(i(160));nC(y,w,g),_t=null,ii=!1,y=g.alternate,y!==null&&(y.return=null),g.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)oC(l,o),l=l.sibling}var yr=null;function oC(o,l){var u=o.alternate,d=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:ri(l,o),oi(o),d&4&&(ds(3,o,o.return),au(3,o),ds(5,o,o.return));break;case 1:ri(l,o),oi(o),d&512&&(cn||u===null||Lr(u,u.return)),d&64&&Co&&(o=o.updateQueue,o!==null&&(d=o.callbacks,d!==null&&(u=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=u===null?d:u.concat(d))));break;case 26:var g=yr;if(ri(l,o),oi(o),d&512&&(cn||u===null||Lr(u,u.return)),d&4){var y=u!==null?u.memoizedState:null;if(d=o.memoizedState,u===null)if(d===null)if(o.stateNode===null){e:{d=o.type,u=o.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":y=g.getElementsByTagName("title")[0],(!y||y[Lc]||y[Rn]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=g.createElement(d),g.head.insertBefore(y,g.querySelector("head > title"))),zn(y,d,u),y[Rn]=o,Cn(y),d=y;break e;case"link":var w=oT("link","href",g).get(d+(u.href||""));if(w){for(var D=0;D<w.length;D++)if(y=w[D],y.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&y.getAttribute("rel")===(u.rel==null?null:u.rel)&&y.getAttribute("title")===(u.title==null?null:u.title)&&y.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){w.splice(D,1);break t}}y=g.createElement(d),zn(y,d,u),g.head.appendChild(y);break;case"meta":if(w=oT("meta","content",g).get(d+(u.content||""))){for(D=0;D<w.length;D++)if(y=w[D],y.getAttribute("content")===(u.content==null?null:""+u.content)&&y.getAttribute("name")===(u.name==null?null:u.name)&&y.getAttribute("property")===(u.property==null?null:u.property)&&y.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&y.getAttribute("charset")===(u.charSet==null?null:u.charSet)){w.splice(D,1);break t}}y=g.createElement(d),zn(y,d,u),g.head.appendChild(y);break;default:throw Error(i(468,d))}y[Rn]=o,Cn(y),d=y}o.stateNode=d}else sT(g,o.type,o.stateNode);else o.stateNode=rT(g,d,o.memoizedProps);else y!==d?(y===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):y.count--,d===null?sT(g,o.type,o.stateNode):rT(g,d,o.memoizedProps)):d===null&&o.stateNode!==null&&U0(o,o.memoizedProps,u.memoizedProps)}break;case 27:ri(l,o),oi(o),d&512&&(cn||u===null||Lr(u,u.return)),u!==null&&d&4&&U0(o,o.memoizedProps,u.memoizedProps);break;case 5:if(ri(l,o),oi(o),d&512&&(cn||u===null||Lr(u,u.return)),o.flags&32){g=o.stateNode;try{ea(g,"")}catch(xe){xt(o,o.return,xe)}}d&4&&o.stateNode!=null&&(g=o.memoizedProps,U0(o,g,u!==null?u.memoizedProps:g)),d&1024&&(X0=!0);break;case 6:if(ri(l,o),oi(o),d&4){if(o.stateNode===null)throw Error(i(162));d=o.memoizedProps,u=o.stateNode;try{u.nodeValue=d}catch(xe){xt(o,o.return,xe)}}break;case 3:if(vh=null,g=yr,yr=gh(l.containerInfo),ri(l,o),yr=g,oi(o),d&4&&u!==null&&u.memoizedState.isDehydrated)try{Da(l.containerInfo)}catch(xe){xt(o,o.return,xe)}X0&&(X0=!1,sC(o));break;case 4:d=yr,yr=gh(o.stateNode.containerInfo),ri(l,o),oi(o),yr=d;break;case 12:ri(l,o),oi(o);break;case 31:ri(l,o),oi(o),d&4&&(d=o.updateQueue,d!==null&&(o.updateQueue=null,nh(o,d)));break;case 13:ri(l,o),oi(o),o.child.flags&8192&&o.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(rh=Lt()),d&4&&(d=o.updateQueue,d!==null&&(o.updateQueue=null,nh(o,d)));break;case 22:g=o.memoizedState!==null;var U=u!==null&&u.memoizedState!==null,ee=Co,re=cn;if(Co=ee||g,cn=re||U,ri(l,o),cn=re,Co=ee,oi(o),d&8192)e:for(l=o.stateNode,l._visibility=g?l._visibility&-2:l._visibility|1,g&&(u===null||U||Co||cn||fl(o)),u=null,l=o;;){if(l.tag===5||l.tag===26){if(u===null){U=u=l;try{if(y=U.stateNode,g)w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{D=U.stateNode;var fe=U.memoizedProps.style,te=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;D.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(xe){xt(U,U.return,xe)}}}else if(l.tag===6){if(u===null){U=l;try{U.stateNode.nodeValue=g?"":U.memoizedProps}catch(xe){xt(U,U.return,xe)}}}else if(l.tag===18){if(u===null){U=l;try{var ne=U.stateNode;g?FC(ne,!0):FC(U.stateNode,!1)}catch(xe){xt(U,U.return,xe)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;u===l&&(u=null),l=l.return}u===l&&(u=null),l.sibling.return=l.return,l=l.sibling}d&4&&(d=o.updateQueue,d!==null&&(u=d.retryQueue,u!==null&&(d.retryQueue=null,nh(o,u))));break;case 19:ri(l,o),oi(o),d&4&&(d=o.updateQueue,d!==null&&(o.updateQueue=null,nh(o,d)));break;case 30:break;case 21:break;default:ri(l,o),oi(o)}}function oi(o){var l=o.flags;if(l&2){try{for(var u,d=o.return;d!==null;){if(Kw(d)){u=d;break}d=d.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var g=u.stateNode,y=W0(o);th(o,y,g);break;case 5:var w=u.stateNode;u.flags&32&&(ea(w,""),u.flags&=-33);var D=W0(o);th(o,D,w);break;case 3:case 4:var U=u.stateNode.containerInfo,ee=W0(o);V0(o,ee,U);break;default:throw Error(i(161))}}catch(re){xt(o,o.return,re)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function sC(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;sC(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function ko(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)eC(o,l.alternate,l),l=l.sibling}function fl(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:ds(4,l,l.return),fl(l);break;case 1:Lr(l,l.return);var u=l.stateNode;typeof u.componentWillUnmount=="function"&&Fw(l,l.return,u),fl(l);break;case 27:vu(l.stateNode);case 26:case 5:Lr(l,l.return),fl(l);break;case 22:l.memoizedState===null&&fl(l);break;case 30:fl(l);break;default:fl(l)}o=o.sibling}}function Eo(o,l,u){for(u=u&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var d=l.alternate,g=o,y=l,w=y.flags;switch(y.tag){case 0:case 11:case 15:Eo(g,y,u),au(4,y);break;case 1:if(Eo(g,y,u),d=y,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(ee){xt(d,d.return,ee)}if(d=y,g=d.updateQueue,g!==null){var D=d.stateNode;try{var U=g.shared.hiddenCallbacks;if(U!==null)for(g.shared.hiddenCallbacks=null,g=0;g<U.length;g++)jS(U[g],D)}catch(ee){xt(d,d.return,ee)}}u&&w&64&&Gw(y),cu(y,y.return);break;case 27:Zw(y);case 26:case 5:Eo(g,y,u),u&&d===null&&w&4&&Yw(y),cu(y,y.return);break;case 12:Eo(g,y,u);break;case 31:Eo(g,y,u),u&&w&4&&iC(g,y);break;case 13:Eo(g,y,u),u&&w&4&&rC(g,y);break;case 22:y.memoizedState===null&&Eo(g,y,u),cu(y,y.return);break;case 30:break;default:Eo(g,y,u)}l=l.sibling}}function G0(o,l){var u=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==u&&(o!=null&&o.refCount++,u!=null&&Fc(u))}function F0(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Fc(o))}function vr(o,l,u,d){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)lC(o,l,u,d),l=l.sibling}function lC(o,l,u,d){var g=l.flags;switch(l.tag){case 0:case 11:case 15:vr(o,l,u,d),g&2048&&au(9,l);break;case 1:vr(o,l,u,d);break;case 3:vr(o,l,u,d),g&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Fc(o)));break;case 12:if(g&2048){vr(o,l,u,d),o=l.stateNode;try{var y=l.memoizedProps,w=y.id,D=y.onPostCommit;typeof D=="function"&&D(w,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(U){xt(l,l.return,U)}}else vr(o,l,u,d);break;case 31:vr(o,l,u,d);break;case 13:vr(o,l,u,d);break;case 23:break;case 22:y=l.stateNode,w=l.alternate,l.memoizedState!==null?y._visibility&2?vr(o,l,u,d):uu(o,l):y._visibility&2?vr(o,l,u,d):(y._visibility|=2,Oa(o,l,u,d,(l.subtreeFlags&10256)!==0||!1)),g&2048&&G0(w,l);break;case 24:vr(o,l,u,d),g&2048&&F0(l.alternate,l);break;default:vr(o,l,u,d)}}function Oa(o,l,u,d,g){for(g=g&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var y=o,w=l,D=u,U=d,ee=w.flags;switch(w.tag){case 0:case 11:case 15:Oa(y,w,D,U,g),au(8,w);break;case 23:break;case 22:var re=w.stateNode;w.memoizedState!==null?re._visibility&2?Oa(y,w,D,U,g):uu(y,w):(re._visibility|=2,Oa(y,w,D,U,g)),g&&ee&2048&&G0(w.alternate,w);break;case 24:Oa(y,w,D,U,g),g&&ee&2048&&F0(w.alternate,w);break;default:Oa(y,w,D,U,g)}l=l.sibling}}function uu(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var u=o,d=l,g=d.flags;switch(d.tag){case 22:uu(u,d),g&2048&&G0(d.alternate,d);break;case 24:uu(u,d),g&2048&&F0(d.alternate,d);break;default:uu(u,d)}l=l.sibling}}var fu=8192;function xa(o,l,u){if(o.subtreeFlags&fu)for(o=o.child;o!==null;)aC(o,l,u),o=o.sibling}function aC(o,l,u){switch(o.tag){case 26:xa(o,l,u),o.flags&fu&&o.memoizedState!==null&&W3(u,yr,o.memoizedState,o.memoizedProps);break;case 5:xa(o,l,u);break;case 3:case 4:var d=yr;yr=gh(o.stateNode.containerInfo),xa(o,l,u),yr=d;break;case 22:o.memoizedState===null&&(d=o.alternate,d!==null&&d.memoizedState!==null?(d=fu,fu=16777216,xa(o,l,u),fu=d):xa(o,l,u));break;default:xa(o,l,u)}}function cC(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function du(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var d=l[u];Tn=d,fC(d,o)}cC(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)uC(o),o=o.sibling}function uC(o){switch(o.tag){case 0:case 11:case 15:du(o),o.flags&2048&&ds(9,o,o.return);break;case 3:du(o);break;case 12:du(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,ih(o)):du(o);break;default:du(o)}}function ih(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var d=l[u];Tn=d,fC(d,o)}cC(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:ds(8,l,l.return),ih(l);break;case 22:u=l.stateNode,u._visibility&2&&(u._visibility&=-3,ih(l));break;default:ih(l)}o=o.sibling}}function fC(o,l){for(;Tn!==null;){var u=Tn;switch(u.tag){case 0:case 11:case 15:ds(8,u,l);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var d=u.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Fc(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,Tn=d;else e:for(u=o;Tn!==null;){d=Tn;var g=d.sibling,y=d.return;if(tC(d),d===u){Tn=null;break e}if(g!==null){g.return=y,Tn=g;break e}Tn=y}}}var s3={getCacheForType:function(o){var l=Dn(sn),u=l.data.get(o);return u===void 0&&(u=o(),l.data.set(o,u)),u},cacheSignal:function(){return Dn(sn).controller.signal}},l3=typeof WeakMap=="function"?WeakMap:Map,mt=0,Dt=null,Ze=null,it=0,Ot=0,xi=null,hs=!1,Sa=!1,Y0=!1,Ao=0,Gt=0,ps=0,dl=0,K0=0,Si=0,wa=0,hu=null,si=null,Z0=!1,rh=0,dC=0,oh=1/0,sh=null,ms=null,yn=0,gs=null,Ca=null,Ro=0,J0=0,ey=null,hC=null,pu=0,ty=null;function wi(){return(mt&2)!==0&&it!==0?it&-it:N.T!==null?ly():ts()}function pC(){if(Si===0)if((it&536870912)===0||st){var o=Jo;Jo<<=1,(Jo&3932160)===0&&(Jo=262144),Si=o}else Si=536870912;return o=bi.current,o!==null&&(o.flags|=32),Si}function li(o,l,u){(o===Dt&&(Ot===2||Ot===9)||o.cancelPendingCommit!==null)&&(Ta(o,0),ys(o,it,Si,!1)),Oe(o,u),((mt&2)===0||o!==Dt)&&(o===Dt&&((mt&2)===0&&(dl|=u),Gt===4&&ys(o,it,Si,!1)),jr(o))}function mC(o,l,u){if((mt&6)!==0)throw Error(i(327));var d=!u&&(l&127)===0&&(l&o.expiredLanes)===0||fo(o,l),g=d?u3(o,l):iy(o,l,!0),y=d;do{if(g===0){Sa&&!d&&ys(o,l,0,!1);break}else{if(u=o.current.alternate,y&&!a3(u)){g=iy(o,l,!1),y=!1;continue}if(g===2){if(y=l,o.errorRecoveryDisabledLanes&y)var w=0;else w=o.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){l=w;e:{var D=o;g=hu;var U=D.current.memoizedState.isDehydrated;if(U&&(Ta(D,w).flags|=256),w=iy(D,w,!1),w!==2){if(Y0&&!U){D.errorRecoveryDisabledLanes|=y,dl|=y,g=4;break e}y=si,si=g,y!==null&&(si===null?si=y:si.push.apply(si,y))}g=w}if(y=!1,g!==2)continue}}if(g===1){Ta(o,0),ys(o,l,0,!0);break}e:{switch(d=o,y=g,y){case 0:case 1:throw Error(i(345));case 4:if((l&4194048)!==l)break;case 6:ys(d,l,Si,!hs);break e;case 2:si=null;break;case 3:case 5:break;default:throw Error(i(329))}if((l&62914560)===l&&(g=rh+300-Lt(),10<g)){if(ys(d,l,Si,!hs),es(d,0,!0)!==0)break e;Ro=l,d.timeoutHandle=VC(gC.bind(null,d,u,si,sh,Z0,l,Si,dl,wa,hs,y,"Throttled",-0,0),g);break e}gC(d,u,si,sh,Z0,l,Si,dl,wa,hs,y,null,-0,0)}}break}while(!0);jr(o)}function gC(o,l,u,d,g,y,w,D,U,ee,re,fe,te,ne){if(o.timeoutHandle=-1,fe=l.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:po},aC(l,y,fe);var xe=(y&62914560)===y?rh-Lt():(y&4194048)===y?dC-Lt():0;if(xe=V3(fe,xe),xe!==null){Ro=y,o.cancelPendingCommit=xe(CC.bind(null,o,l,y,u,d,g,w,D,U,re,fe,null,te,ne)),ys(o,y,w,!ee);return}}CC(o,l,y,u,d,g,w,D,U)}function a3(o){for(var l=o;;){var u=l.tag;if((u===0||u===11||u===15)&&l.flags&16384&&(u=l.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var d=0;d<u.length;d++){var g=u[d],y=g.getSnapshot;g=g.value;try{if(!yi(y(),g))return!1}catch{return!1}}if(u=l.child,l.subtreeFlags&16384&&u!==null)u.return=l,l=u;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ys(o,l,u,d){l&=~K0,l&=~dl,o.suspendedLanes|=l,o.pingedLanes&=~l,d&&(o.warmLanes|=l),d=o.expirationTimes;for(var g=l;0<g;){var y=31-gn(g),w=1<<y;d[y]=-1,g&=~w}u!==0&&dt(o,u,l)}function lh(){return(mt&6)===0?(mu(0),!1):!0}function ny(){if(Ze!==null){if(Ot===0)var o=Ze.return;else o=Ze,vo=il=null,v0(o),ma=null,Kc=0,o=Ze;for(;o!==null;)Xw(o.alternate,o),o=o.return;Ze=null}}function Ta(o,l){var u=o.timeoutHandle;u!==-1&&(o.timeoutHandle=-1,A3(u)),u=o.cancelPendingCommit,u!==null&&(o.cancelPendingCommit=null,u()),Ro=0,ny(),Dt=o,Ze=u=go(o.current,null),it=l,Ot=0,xi=null,hs=!1,Sa=fo(o,l),Y0=!1,wa=Si=K0=dl=ps=Gt=0,si=hu=null,Z0=!1,(l&8)!==0&&(l|=l&32);var d=o.entangledLanes;if(d!==0)for(o=o.entanglements,d&=l;0<d;){var g=31-gn(d),y=1<<g;l|=o[g],d&=~y}return Ao=l,Ad(),u}function yC(o,l){We=null,N.H=ou,l===pa||l===Ld?(l=zS(),Ot=3):l===s0?(l=zS(),Ot=4):Ot=l===$0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,xi=l,Ze===null&&(Gt=1,Yd(o,_i(l,o.current)))}function vC(){var o=bi.current;return o===null?!0:(it&4194048)===it?Ui===null:(it&62914560)===it||(it&536870912)!==0?o===Ui:!1}function bC(){var o=N.H;return N.H=ou,o===null?ou:o}function OC(){var o=N.A;return N.A=s3,o}function ah(){Gt=4,hs||(it&4194048)!==it&&bi.current!==null||(Sa=!0),(ps&134217727)===0&&(dl&134217727)===0||Dt===null||ys(Dt,it,Si,!1)}function iy(o,l,u){var d=mt;mt|=2;var g=bC(),y=OC();(Dt!==o||it!==l)&&(sh=null,Ta(o,l)),l=!1;var w=Gt;e:do try{if(Ot!==0&&Ze!==null){var D=Ze,U=xi;switch(Ot){case 8:ny(),w=6;break e;case 3:case 2:case 9:case 6:bi.current===null&&(l=!0);var ee=Ot;if(Ot=0,xi=null,ka(o,D,U,ee),u&&Sa){w=0;break e}break;default:ee=Ot,Ot=0,xi=null,ka(o,D,U,ee)}}c3(),w=Gt;break}catch(re){yC(o,re)}while(!0);return l&&o.shellSuspendCounter++,vo=il=null,mt=d,N.H=g,N.A=y,Ze===null&&(Dt=null,it=0,Ad()),w}function c3(){for(;Ze!==null;)xC(Ze)}function u3(o,l){var u=mt;mt|=2;var d=bC(),g=OC();Dt!==o||it!==l?(sh=null,oh=Lt()+500,Ta(o,l)):Sa=fo(o,l);e:do try{if(Ot!==0&&Ze!==null){l=Ze;var y=xi;t:switch(Ot){case 1:Ot=0,xi=null,ka(o,l,y,1);break;case 2:case 9:if(DS(y)){Ot=0,xi=null,SC(l);break}l=function(){Ot!==2&&Ot!==9||Dt!==o||(Ot=7),jr(o)},y.then(l,l);break e;case 3:Ot=7;break e;case 4:Ot=5;break e;case 7:DS(y)?(Ot=0,xi=null,SC(l)):(Ot=0,xi=null,ka(o,l,y,7));break;case 5:var w=null;switch(Ze.tag){case 26:w=Ze.memoizedState;case 5:case 27:var D=Ze;if(w?lT(w):D.stateNode.complete){Ot=0,xi=null;var U=D.sibling;if(U!==null)Ze=U;else{var ee=D.return;ee!==null?(Ze=ee,ch(ee)):Ze=null}break t}}Ot=0,xi=null,ka(o,l,y,5);break;case 6:Ot=0,xi=null,ka(o,l,y,6);break;case 8:ny(),Gt=6;break e;default:throw Error(i(462))}}f3();break}catch(re){yC(o,re)}while(!0);return vo=il=null,N.H=d,N.A=g,mt=u,Ze!==null?0:(Dt=null,it=0,Ad(),Gt)}function f3(){for(;Ze!==null&&!Ee();)xC(Ze)}function xC(o){var l=Ww(o.alternate,o,Ao);o.memoizedProps=o.pendingProps,l===null?ch(o):Ze=l}function SC(o){var l=o,u=l.alternate;switch(l.tag){case 15:case 0:l=Qw(u,l,l.pendingProps,l.type,void 0,it);break;case 11:l=Qw(u,l,l.pendingProps,l.type.render,l.ref,it);break;case 5:v0(l);default:Xw(u,l),l=Ze=OS(l,Ao),l=Ww(u,l,Ao)}o.memoizedProps=o.pendingProps,l===null?ch(o):Ze=l}function ka(o,l,u,d){vo=il=null,v0(l),ma=null,Kc=0;var g=l.return;try{if(J4(o,g,l,u,it)){Gt=1,Yd(o,_i(u,o.current)),Ze=null;return}}catch(y){if(g!==null)throw Ze=g,y;Gt=1,Yd(o,_i(u,o.current)),Ze=null;return}l.flags&32768?(st||d===1?o=!0:Sa||(it&536870912)!==0?o=!1:(hs=o=!0,(d===2||d===9||d===3||d===6)&&(d=bi.current,d!==null&&d.tag===13&&(d.flags|=16384))),wC(l,o)):ch(l)}function ch(o){var l=o;do{if((l.flags&32768)!==0){wC(l,hs);return}o=l.return;var u=n3(l.alternate,l,Ao);if(u!==null){Ze=u;return}if(l=l.sibling,l!==null){Ze=l;return}Ze=l=o}while(l!==null);Gt===0&&(Gt=5)}function wC(o,l){do{var u=i3(o.alternate,o);if(u!==null){u.flags&=32767,Ze=u;return}if(u=o.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!l&&(o=o.sibling,o!==null)){Ze=o;return}Ze=o=u}while(o!==null);Gt=6,Ze=null}function CC(o,l,u,d,g,y,w,D,U){o.cancelPendingCommit=null;do uh();while(yn!==0);if((mt&6)!==0)throw Error(i(327));if(l!==null){if(l===o.current)throw Error(i(177));if(y=l.lanes|l.childLanes,y|=Wg,Pe(o,u,y,w,D,U),o===Dt&&(Ze=Dt=null,it=0),Ca=l,gs=o,Ro=u,J0=y,ey=g,hC=d,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,m3(jt,function(){return RC(),null})):(o.callbackNode=null,o.callbackPriority=0),d=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||d){d=N.T,N.T=null,g=X.p,X.p=2,w=mt,mt|=4;try{r3(o,l,u)}finally{mt=w,X.p=g,N.T=d}}yn=1,TC(),kC(),EC()}}function TC(){if(yn===1){yn=0;var o=gs,l=Ca,u=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||u){u=N.T,N.T=null;var d=X.p;X.p=2;var g=mt;mt|=4;try{oC(l,o);var y=my,w=fS(o.containerInfo),D=y.focusedElem,U=y.selectionRange;if(w!==D&&D&&D.ownerDocument&&uS(D.ownerDocument.documentElement,D)){if(U!==null&&_g(D)){var ee=U.start,re=U.end;if(re===void 0&&(re=ee),"selectionStart"in D)D.selectionStart=ee,D.selectionEnd=Math.min(re,D.value.length);else{var fe=D.ownerDocument||document,te=fe&&fe.defaultView||window;if(te.getSelection){var ne=te.getSelection(),xe=D.textContent.length,ze=Math.min(U.start,xe),Et=U.end===void 0?ze:Math.min(U.end,xe);!ne.extend&&ze>Et&&(w=Et,Et=ze,ze=w);var F=cS(D,ze),W=cS(D,Et);if(F&&W&&(ne.rangeCount!==1||ne.anchorNode!==F.node||ne.anchorOffset!==F.offset||ne.focusNode!==W.node||ne.focusOffset!==W.offset)){var J=fe.createRange();J.setStart(F.node,F.offset),ne.removeAllRanges(),ze>Et?(ne.addRange(J),ne.extend(W.node,W.offset)):(J.setEnd(W.node,W.offset),ne.addRange(J))}}}}for(fe=[],ne=D;ne=ne.parentNode;)ne.nodeType===1&&fe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<fe.length;D++){var ae=fe[D];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Sh=!!py,my=py=null}finally{mt=g,X.p=d,N.T=u}}o.current=l,yn=2}}function kC(){if(yn===2){yn=0;var o=gs,l=Ca,u=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||u){u=N.T,N.T=null;var d=X.p;X.p=2;var g=mt;mt|=4;try{eC(o,l.alternate,l)}finally{mt=g,X.p=d,N.T=u}}yn=3}}function EC(){if(yn===4||yn===3){yn=0,$i();var o=gs,l=Ca,u=Ro,d=hC;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?yn=5:(yn=0,Ca=gs=null,AC(o,o.pendingLanes));var g=o.pendingLanes;if(g===0&&(ms=null),mr(u),l=l.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(Wn,l,void 0,(l.current.flags&128)===128)}catch{}if(d!==null){l=N.T,g=X.p,X.p=2,N.T=null;try{for(var y=o.onRecoverableError,w=0;w<d.length;w++){var D=d[w];y(D.value,{componentStack:D.stack})}}finally{N.T=l,X.p=g}}(Ro&3)!==0&&uh(),jr(o),g=o.pendingLanes,(u&261930)!==0&&(g&42)!==0?o===ty?pu++:(pu=0,ty=o):pu=0,mu(0)}}function AC(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,Fc(l)))}function uh(){return TC(),kC(),EC(),RC()}function RC(){if(yn!==5)return!1;var o=gs,l=J0;J0=0;var u=mr(Ro),d=N.T,g=X.p;try{X.p=32>u?32:u,N.T=null,u=ey,ey=null;var y=gs,w=Ro;if(yn=0,Ca=gs=null,Ro=0,(mt&6)!==0)throw Error(i(331));var D=mt;if(mt|=4,uC(y.current),lC(y,y.current,w,u),mt=D,mu(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(Wn,y)}catch{}return!0}finally{X.p=g,N.T=d,AC(o,l)}}function MC(o,l,u){l=_i(u,l),l=z0(o.stateNode,l,2),o=cs(o,l,2),o!==null&&(Oe(o,2),jr(o))}function xt(o,l,u){if(o.tag===3)MC(o,o,u);else for(;l!==null;){if(l.tag===3){MC(l,o,u);break}else if(l.tag===1){var d=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ms===null||!ms.has(d))){o=_i(u,o),u=Dw(2),d=cs(l,u,2),d!==null&&(Pw(u,d,l,o),Oe(d,2),jr(d));break}}l=l.return}}function ry(o,l,u){var d=o.pingCache;if(d===null){d=o.pingCache=new l3;var g=new Set;d.set(l,g)}else g=d.get(l),g===void 0&&(g=new Set,d.set(l,g));g.has(u)||(Y0=!0,g.add(u),o=d3.bind(null,o,l,u),l.then(o,o))}function d3(o,l,u){var d=o.pingCache;d!==null&&d.delete(l),o.pingedLanes|=o.suspendedLanes&u,o.warmLanes&=~u,Dt===o&&(it&u)===u&&(Gt===4||Gt===3&&(it&62914560)===it&&300>Lt()-rh?(mt&2)===0&&Ta(o,0):K0|=u,wa===it&&(wa=0)),jr(o)}function DC(o,l){l===0&&(l=Qe()),o=el(o,l),o!==null&&(Oe(o,l),jr(o))}function h3(o){var l=o.memoizedState,u=0;l!==null&&(u=l.retryLane),DC(o,u)}function p3(o,l){var u=0;switch(o.tag){case 31:case 13:var d=o.stateNode,g=o.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=o.stateNode;break;case 22:d=o.stateNode._retryCache;break;default:throw Error(i(314))}d!==null&&d.delete(l),DC(o,u)}function m3(o,l){return at(o,l)}var fh=null,Ea=null,oy=!1,dh=!1,sy=!1,vs=0;function jr(o){o!==Ea&&o.next===null&&(Ea===null?fh=Ea=o:Ea=Ea.next=o),dh=!0,oy||(oy=!0,y3())}function mu(o,l){if(!sy&&dh){sy=!0;do for(var u=!1,d=fh;d!==null;){if(o!==0){var g=d.pendingLanes;if(g===0)var y=0;else{var w=d.suspendedLanes,D=d.pingedLanes;y=(1<<31-gn(42|o)+1)-1,y&=g&~(w&~D),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(u=!0,BC(d,y))}else y=it,y=es(d,d===Dt?y:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(y&3)===0||fo(d,y)||(u=!0,BC(d,y));d=d.next}while(u);sy=!1}}function g3(){PC()}function PC(){dh=oy=!1;var o=0;vs!==0&&E3()&&(o=vs);for(var l=Lt(),u=null,d=fh;d!==null;){var g=d.next,y=zC(d,l);y===0?(d.next=null,u===null?fh=g:u.next=g,g===null&&(Ea=u)):(u=d,(o!==0||(y&3)!==0)&&(dh=!0)),d=g}yn!==0&&yn!==5||mu(o),vs!==0&&(vs=0)}function zC(o,l){for(var u=o.suspendedLanes,d=o.pingedLanes,g=o.expirationTimes,y=o.pendingLanes&-62914561;0<y;){var w=31-gn(y),D=1<<w,U=g[w];U===-1?((D&u)===0||(D&d)!==0)&&(g[w]=$c(D,l)):U<=l&&(o.expiredLanes|=D),y&=~D}if(l=Dt,u=it,u=es(o,o===l?u:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),d=o.callbackNode,u===0||o===l&&(Ot===2||Ot===9)||o.cancelPendingCommit!==null)return d!==null&&d!==null&&Ye(d),o.callbackNode=null,o.callbackPriority=0;if((u&3)===0||fo(o,u)){if(l=u&-u,l===o.callbackPriority)return l;switch(d!==null&&Ye(d),mr(u)){case 2:case 8:u=ut;break;case 32:u=jt;break;case 268435456:u=Bi;break;default:u=jt}return d=$C.bind(null,o),u=at(u,d),o.callbackPriority=l,o.callbackNode=u,l}return d!==null&&d!==null&&Ye(d),o.callbackPriority=2,o.callbackNode=null,2}function $C(o,l){if(yn!==0&&yn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var u=o.callbackNode;if(uh()&&o.callbackNode!==u)return null;var d=it;return d=es(o,o===Dt?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),d===0?null:(mC(o,d,l),zC(o,Lt()),o.callbackNode!=null&&o.callbackNode===u?$C.bind(null,o):null)}function BC(o,l){if(uh())return null;mC(o,l,!0)}function y3(){R3(function(){(mt&6)!==0?at(Wt,g3):PC()})}function ly(){if(vs===0){var o=da;o===0&&(o=Zo,Zo<<=1,(Zo&261888)===0&&(Zo=256)),vs=o}return vs}function LC(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Od(""+o)}function jC(o,l){var u=l.ownerDocument.createElement("input");return u.name=l.name,u.value=l.value,o.id&&u.setAttribute("form",o.id),l.parentNode.insertBefore(u,l),o=new FormData(o),u.parentNode.removeChild(u),o}function v3(o,l,u,d,g){if(l==="submit"&&u&&u.stateNode===g){var y=LC((g[ti]||null).action),w=d.submitter;w&&(l=(l=w[ti]||null)?LC(l.formAction):w.getAttribute("formAction"),l!==null&&(y=l,w=null));var D=new Cd("action","action",null,d,g);o.push({event:D,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(vs!==0){var U=w?jC(g,w):new FormData(g);E0(u,{pending:!0,data:U,method:g.method,action:y},null,U)}}else typeof y=="function"&&(D.preventDefault(),U=w?jC(g,w):new FormData(g),E0(u,{pending:!0,data:U,method:g.method,action:y},y,U))},currentTarget:g}]})}}for(var ay=0;ay<Ug.length;ay++){var cy=Ug[ay],b3=cy.toLowerCase(),O3=cy[0].toUpperCase()+cy.slice(1);gr(b3,"on"+O3)}gr(pS,"onAnimationEnd"),gr(mS,"onAnimationIteration"),gr(gS,"onAnimationStart"),gr("dblclick","onDoubleClick"),gr("focusin","onFocus"),gr("focusout","onBlur"),gr(L4,"onTransitionRun"),gr(j4,"onTransitionStart"),gr(N4,"onTransitionCancel"),gr(yS,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),Ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ys("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ys("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gu="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(" "),x3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gu));function NC(o,l){l=(l&4)!==0;for(var u=0;u<o.length;u++){var d=o[u],g=d.event;d=d.listeners;e:{var y=void 0;if(l)for(var w=d.length-1;0<=w;w--){var D=d[w],U=D.instance,ee=D.currentTarget;if(D=D.listener,U!==y&&g.isPropagationStopped())break e;y=D,g.currentTarget=ee;try{y(g)}catch(re){Ed(re)}g.currentTarget=null,y=U}else for(w=0;w<d.length;w++){if(D=d[w],U=D.instance,ee=D.currentTarget,D=D.listener,U!==y&&g.isPropagationStopped())break e;y=D,g.currentTarget=ee;try{y(g)}catch(re){Ed(re)}g.currentTarget=null,y=U}}}}function Je(o,l){var u=l[Sg];u===void 0&&(u=l[Sg]=new Set);var d=o+"__bubble";u.has(d)||(QC(l,o,2,!1),u.add(d))}function uy(o,l,u){var d=0;l&&(d|=4),QC(u,o,d,l)}var hh="_reactListening"+Math.random().toString(36).slice(2);function fy(o){if(!o[hh]){o[hh]=!0,Px.forEach(function(u){u!=="selectionchange"&&(x3.has(u)||uy(u,!1,o),uy(u,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[hh]||(l[hh]=!0,uy("selectionchange",!1,l))}}function QC(o,l,u,d){switch(pT(l)){case 2:var g=F3;break;case 8:g=Y3;break;default:g=ky}u=g.bind(null,l,u,o),g=void 0,!Dg||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(g=!0),d?g!==void 0?o.addEventListener(l,u,{capture:!0,passive:g}):o.addEventListener(l,u,!0):g!==void 0?o.addEventListener(l,u,{passive:g}):o.addEventListener(l,u,!1)}function dy(o,l,u,d,g){var y=d;if((l&1)===0&&(l&2)===0&&d!==null)e:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var D=d.stateNode.containerInfo;if(D===g)break;if(w===4)for(w=d.return;w!==null;){var U=w.tag;if((U===3||U===4)&&w.stateNode.containerInfo===g)return;w=w.return}for(;D!==null;){if(w=Fl(D),w===null)return;if(U=w.tag,U===5||U===6||U===26||U===27){d=y=w;continue e}D=D.parentNode}}d=d.return}Ux(function(){var ee=y,re=Rg(u),fe=[];e:{var te=vS.get(o);if(te!==void 0){var ne=Cd,xe=o;switch(o){case"keypress":if(Sd(u)===0)break e;case"keydown":case"keyup":ne=p4;break;case"focusin":xe="focus",ne=Bg;break;case"focusout":xe="blur",ne=Bg;break;case"beforeblur":case"afterblur":ne=Bg;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Xx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=n4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=y4;break;case pS:case mS:case gS:ne=o4;break;case yS:ne=b4;break;case"scroll":case"scrollend":ne=e4;break;case"wheel":ne=x4;break;case"copy":case"cut":case"paste":ne=l4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Fx;break;case"toggle":case"beforetoggle":ne=w4}var ze=(l&4)!==0,Et=!ze&&(o==="scroll"||o==="scrollend"),F=ze?te!==null?te+"Capture":null:te;ze=[];for(var W=ee,J;W!==null;){var ae=W;if(J=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||J===null||F===null||(ae=Nc(W,F),ae!=null&&ze.push(yu(W,ae,J))),Et)break;W=W.return}0<ze.length&&(te=new ne(te,xe,null,u,re),fe.push({event:te,listeners:ze}))}}if((l&7)===0){e:{if(te=o==="mouseover"||o==="pointerover",ne=o==="mouseout"||o==="pointerout",te&&u!==Ag&&(xe=u.relatedTarget||u.fromElement)&&(Fl(xe)||xe[Gl]))break e;if((ne||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(xe=u.relatedTarget||u.toElement,ne=ee,xe=xe?Fl(xe):null,xe!==null&&(Et=s(xe),ze=xe.tag,xe!==Et||ze!==5&&ze!==27&&ze!==6)&&(xe=null)):(ne=null,xe=ee),ne!==xe)){if(ze=Xx,ae="onMouseLeave",F="onMouseEnter",W="mouse",(o==="pointerout"||o==="pointerover")&&(ze=Fx,ae="onPointerLeave",F="onPointerEnter",W="pointer"),Et=ne==null?te:jc(ne),J=xe==null?te:jc(xe),te=new ze(ae,W+"leave",ne,u,re),te.target=Et,te.relatedTarget=J,ae=null,Fl(re)===ee&&(ze=new ze(F,W+"enter",xe,u,re),ze.target=J,ze.relatedTarget=Et,ae=ze),Et=ae,ne&&xe)t:{for(ze=S3,F=ne,W=xe,J=0,ae=F;ae;ae=ze(ae))J++;ae=0;for(var De=W;De;De=ze(De))ae++;for(;0<J-ae;)F=ze(F),J--;for(;0<ae-J;)W=ze(W),ae--;for(;J--;){if(F===W||W!==null&&F===W.alternate){ze=F;break t}F=ze(F),W=ze(W)}ze=null}else ze=null;ne!==null&&_C(fe,te,ne,ze,!1),xe!==null&&Et!==null&&_C(fe,Et,xe,ze,!0)}}e:{if(te=ee?jc(ee):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var ht=iS;else if(tS(te))if(rS)ht=z4;else{ht=D4;var Ce=M4}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&Eg(ee.elementType)&&(ht=iS):ht=P4;if(ht&&(ht=ht(o,ee))){nS(fe,ht,u,re);break e}Ce&&Ce(o,te,ee),o==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&kg(te,"number",te.value)}switch(Ce=ee?jc(ee):window,o){case"focusin":(tS(Ce)||Ce.contentEditable==="true")&&(ra=Ce,qg=ee,Vc=null);break;case"focusout":Vc=qg=ra=null;break;case"mousedown":Ig=!0;break;case"contextmenu":case"mouseup":case"dragend":Ig=!1,dS(fe,u,re);break;case"selectionchange":if(B4)break;case"keydown":case"keyup":dS(fe,u,re)}var Ge;if(jg)e:{switch(o){case"compositionstart":var rt="onCompositionStart";break e;case"compositionend":rt="onCompositionEnd";break e;case"compositionupdate":rt="onCompositionUpdate";break e}rt=void 0}else ia?Jx(o,u)&&(rt="onCompositionEnd"):o==="keydown"&&u.keyCode===229&&(rt="onCompositionStart");rt&&(Yx&&u.locale!=="ko"&&(ia||rt!=="onCompositionStart"?rt==="onCompositionEnd"&&ia&&(Ge=Wx()):(ns=re,Pg="value"in ns?ns.value:ns.textContent,ia=!0)),Ce=ph(ee,rt),0<Ce.length&&(rt=new Gx(rt,o,null,u,re),fe.push({event:rt,listeners:Ce}),Ge?rt.data=Ge:(Ge=eS(u),Ge!==null&&(rt.data=Ge)))),(Ge=T4?k4(o,u):E4(o,u))&&(rt=ph(ee,"onBeforeInput"),0<rt.length&&(Ce=new Gx("onBeforeInput","beforeinput",null,u,re),fe.push({event:Ce,listeners:rt}),Ce.data=Ge)),v3(fe,o,ee,u,re)}NC(fe,l)})}function yu(o,l,u){return{instance:o,listener:l,currentTarget:u}}function ph(o,l){for(var u=l+"Capture",d=[];o!==null;){var g=o,y=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||y===null||(g=Nc(o,u),g!=null&&d.unshift(yu(o,g,y)),g=Nc(o,l),g!=null&&d.push(yu(o,g,y))),o.tag===3)return d;o=o.return}return[]}function S3(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function _C(o,l,u,d,g){for(var y=l._reactName,w=[];u!==null&&u!==d;){var D=u,U=D.alternate,ee=D.stateNode;if(D=D.tag,U!==null&&U===d)break;D!==5&&D!==26&&D!==27||ee===null||(U=ee,g?(ee=Nc(u,y),ee!=null&&w.unshift(yu(u,ee,U))):g||(ee=Nc(u,y),ee!=null&&w.push(yu(u,ee,U)))),u=u.return}w.length!==0&&o.push({event:l,listeners:w})}var w3=/\r\n?/g,C3=/\u0000|\uFFFD/g;function qC(o){return(typeof o=="string"?o:""+o).replace(w3,`
9
+ `).replace(C3,"")}function IC(o,l){return l=qC(l),qC(o)===l}function kt(o,l,u,d,g,y){switch(u){case"children":typeof d=="string"?l==="body"||l==="textarea"&&d===""||ea(o,d):(typeof d=="number"||typeof d=="bigint")&&l!=="body"&&ea(o,""+d);break;case"className":vd(o,"class",d);break;case"tabIndex":vd(o,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":vd(o,u,d);break;case"style":Ix(o,d,y);break;case"data":if(l!=="object"){vd(o,"data",d);break}case"src":case"href":if(d===""&&(l!=="a"||u!=="href")){o.removeAttribute(u);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){o.removeAttribute(u);break}d=Od(""+d),o.setAttribute(u,d);break;case"action":case"formAction":if(typeof d=="function"){o.setAttribute(u,"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 y=="function"&&(u==="formAction"?(l!=="input"&&kt(o,l,"name",g.name,g,null),kt(o,l,"formEncType",g.formEncType,g,null),kt(o,l,"formMethod",g.formMethod,g,null),kt(o,l,"formTarget",g.formTarget,g,null)):(kt(o,l,"encType",g.encType,g,null),kt(o,l,"method",g.method,g,null),kt(o,l,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){o.removeAttribute(u);break}d=Od(""+d),o.setAttribute(u,d);break;case"onClick":d!=null&&(o.onclick=po);break;case"onScroll":d!=null&&Je("scroll",o);break;case"onScrollEnd":d!=null&&Je("scrollend",o);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=u}}break;case"multiple":o.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":o.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){o.removeAttribute("xlink:href");break}u=Od(""+d),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(u,""+d):o.removeAttribute(u);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":d&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(u,""):o.removeAttribute(u);break;case"capture":case"download":d===!0?o.setAttribute(u,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(u,d):o.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?o.setAttribute(u,d):o.removeAttribute(u);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?o.removeAttribute(u):o.setAttribute(u,d);break;case"popover":Je("beforetoggle",o),Je("toggle",o),yd(o,"popover",d);break;case"xlinkActuate":ho(o,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":ho(o,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":ho(o,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":ho(o,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":ho(o,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":ho(o,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":ho(o,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":ho(o,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":ho(o,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":yd(o,"is",d);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Zz.get(u)||u,yd(o,u,d))}}function hy(o,l,u,d,g,y){switch(u){case"style":Ix(o,d,y);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=u}}break;case"children":typeof d=="string"?ea(o,d):(typeof d=="number"||typeof d=="bigint")&&ea(o,""+d);break;case"onScroll":d!=null&&Je("scroll",o);break;case"onScrollEnd":d!=null&&Je("scrollend",o);break;case"onClick":d!=null&&(o.onclick=po);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zx.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),l=u.slice(2,g?u.length-7:void 0),y=o[ti]||null,y=y!=null?y[u]:null,typeof y=="function"&&o.removeEventListener(l,y,g),typeof d=="function")){typeof y!="function"&&y!==null&&(u in o?o[u]=null:o.hasAttribute(u)&&o.removeAttribute(u)),o.addEventListener(l,d,g);break e}u in o?o[u]=d:d===!0?o.setAttribute(u,""):yd(o,u,d)}}}function zn(o,l,u){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",o),Je("load",o);var d=!1,g=!1,y;for(y in u)if(u.hasOwnProperty(y)){var w=u[y];if(w!=null)switch(y){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:kt(o,l,y,w,u,null)}}g&&kt(o,l,"srcSet",u.srcSet,u,null),d&&kt(o,l,"src",u.src,u,null);return;case"input":Je("invalid",o);var D=y=w=g=null,U=null,ee=null;for(d in u)if(u.hasOwnProperty(d)){var re=u[d];if(re!=null)switch(d){case"name":g=re;break;case"type":w=re;break;case"checked":U=re;break;case"defaultChecked":ee=re;break;case"value":y=re;break;case"defaultValue":D=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,l));break;default:kt(o,l,d,re,u,null)}}Nx(o,y,D,U,ee,w,g,!1);return;case"select":Je("invalid",o),d=w=y=null;for(g in u)if(u.hasOwnProperty(g)&&(D=u[g],D!=null))switch(g){case"value":y=D;break;case"defaultValue":w=D;break;case"multiple":d=D;default:kt(o,l,g,D,u,null)}l=y,u=w,o.multiple=!!d,l!=null?Jl(o,!!d,l,!1):u!=null&&Jl(o,!!d,u,!0);return;case"textarea":Je("invalid",o),y=g=d=null;for(w in u)if(u.hasOwnProperty(w)&&(D=u[w],D!=null))switch(w){case"value":d=D;break;case"defaultValue":g=D;break;case"children":y=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(i(91));break;default:kt(o,l,w,D,u,null)}_x(o,d,g,y);return;case"option":for(U in u)u.hasOwnProperty(U)&&(d=u[U],d!=null)&&(U==="selected"?o.selected=d&&typeof d!="function"&&typeof d!="symbol":kt(o,l,U,d,u,null));return;case"dialog":Je("beforetoggle",o),Je("toggle",o),Je("cancel",o),Je("close",o);break;case"iframe":case"object":Je("load",o);break;case"video":case"audio":for(d=0;d<gu.length;d++)Je(gu[d],o);break;case"image":Je("error",o),Je("load",o);break;case"details":Je("toggle",o);break;case"embed":case"source":case"link":Je("error",o),Je("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in u)if(u.hasOwnProperty(ee)&&(d=u[ee],d!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:kt(o,l,ee,d,u,null)}return;default:if(Eg(l)){for(re in u)u.hasOwnProperty(re)&&(d=u[re],d!==void 0&&hy(o,l,re,d,u,void 0));return}}for(D in u)u.hasOwnProperty(D)&&(d=u[D],d!=null&&kt(o,l,D,d,u,null))}function T3(o,l,u,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,y=null,w=null,D=null,U=null,ee=null,re=null;for(ne in u){var fe=u[ne];if(u.hasOwnProperty(ne)&&fe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":U=fe;default:d.hasOwnProperty(ne)||kt(o,l,ne,null,d,fe)}}for(var te in d){var ne=d[te];if(fe=u[te],d.hasOwnProperty(te)&&(ne!=null||fe!=null))switch(te){case"type":y=ne;break;case"name":g=ne;break;case"checked":ee=ne;break;case"defaultChecked":re=ne;break;case"value":w=ne;break;case"defaultValue":D=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(i(137,l));break;default:ne!==fe&&kt(o,l,te,ne,d,fe)}}Tg(o,w,D,U,ee,re,y,g);return;case"select":ne=w=D=te=null;for(y in u)if(U=u[y],u.hasOwnProperty(y)&&U!=null)switch(y){case"value":break;case"multiple":ne=U;default:d.hasOwnProperty(y)||kt(o,l,y,null,d,U)}for(g in d)if(y=d[g],U=u[g],d.hasOwnProperty(g)&&(y!=null||U!=null))switch(g){case"value":te=y;break;case"defaultValue":D=y;break;case"multiple":w=y;default:y!==U&&kt(o,l,g,y,d,U)}l=D,u=w,d=ne,te!=null?Jl(o,!!u,te,!1):!!d!=!!u&&(l!=null?Jl(o,!!u,l,!0):Jl(o,!!u,u?[]:"",!1));return;case"textarea":ne=te=null;for(D in u)if(g=u[D],u.hasOwnProperty(D)&&g!=null&&!d.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:kt(o,l,D,null,d,g)}for(w in d)if(g=d[w],y=u[w],d.hasOwnProperty(w)&&(g!=null||y!=null))switch(w){case"value":te=g;break;case"defaultValue":ne=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(i(91));break;default:g!==y&&kt(o,l,w,g,d,y)}Qx(o,te,ne);return;case"option":for(var xe in u)te=u[xe],u.hasOwnProperty(xe)&&te!=null&&!d.hasOwnProperty(xe)&&(xe==="selected"?o.selected=!1:kt(o,l,xe,null,d,te));for(U in d)te=d[U],ne=u[U],d.hasOwnProperty(U)&&te!==ne&&(te!=null||ne!=null)&&(U==="selected"?o.selected=te&&typeof te!="function"&&typeof te!="symbol":kt(o,l,U,te,d,ne));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 ze in u)te=u[ze],u.hasOwnProperty(ze)&&te!=null&&!d.hasOwnProperty(ze)&&kt(o,l,ze,null,d,te);for(ee in d)if(te=d[ee],ne=u[ee],d.hasOwnProperty(ee)&&te!==ne&&(te!=null||ne!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,l));break;default:kt(o,l,ee,te,d,ne)}return;default:if(Eg(l)){for(var Et in u)te=u[Et],u.hasOwnProperty(Et)&&te!==void 0&&!d.hasOwnProperty(Et)&&hy(o,l,Et,void 0,d,te);for(re in d)te=d[re],ne=u[re],!d.hasOwnProperty(re)||te===ne||te===void 0&&ne===void 0||hy(o,l,re,te,d,ne);return}}for(var F in u)te=u[F],u.hasOwnProperty(F)&&te!=null&&!d.hasOwnProperty(F)&&kt(o,l,F,null,d,te);for(fe in d)te=d[fe],ne=u[fe],!d.hasOwnProperty(fe)||te===ne||te==null&&ne==null||kt(o,l,fe,te,d,ne)}function HC(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k3(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,u=performance.getEntriesByType("resource"),d=0;d<u.length;d++){var g=u[d],y=g.transferSize,w=g.initiatorType,D=g.duration;if(y&&D&&HC(w)){for(w=0,D=g.responseEnd,d+=1;d<u.length;d++){var U=u[d],ee=U.startTime;if(ee>D)break;var re=U.transferSize,fe=U.initiatorType;re&&HC(fe)&&(U=U.responseEnd,w+=re*(U<D?1:(D-ee)/(U-ee)))}if(--d,l+=8*(y+w)/(g.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var py=null,my=null;function mh(o){return o.nodeType===9?o:o.ownerDocument}function UC(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function WC(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function gy(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var yy=null;function E3(){var o=window.event;return o&&o.type==="popstate"?o===yy?!1:(yy=o,!0):(yy=null,!1)}var VC=typeof setTimeout=="function"?setTimeout:void 0,A3=typeof clearTimeout=="function"?clearTimeout:void 0,XC=typeof Promise=="function"?Promise:void 0,R3=typeof queueMicrotask=="function"?queueMicrotask:typeof XC<"u"?function(o){return XC.resolve(null).then(o).catch(M3)}:VC;function M3(o){setTimeout(function(){throw o})}function bs(o){return o==="head"}function GC(o,l){var u=l,d=0;do{var g=u.nextSibling;if(o.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(d===0){o.removeChild(g),Da(l);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")vu(o.ownerDocument.documentElement);else if(u==="head"){u=o.ownerDocument.head,vu(u);for(var y=u.firstChild;y;){var w=y.nextSibling,D=y.nodeName;y[Lc]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&y.rel.toLowerCase()==="stylesheet"||u.removeChild(y),y=w}}else u==="body"&&vu(o.ownerDocument.body);u=g}while(u);Da(l)}function FC(o,l){var u=o;o=0;do{var d=u.nextSibling;if(u.nodeType===1?l?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(l?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),d&&d.nodeType===8)if(u=d.data,u==="/$"){if(o===0)break;o--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||o++;u=d}while(u)}function vy(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var u=l;switch(l=l.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":vy(u),wg(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}o.removeChild(u)}}function D3(o,l,u,d){for(;o.nodeType===1;){var g=u;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!d&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(d){if(!o[Lc])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(y=o.getAttribute("rel"),y==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(y!==g.rel||o.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||o.getAttribute("title")!==(g.title==null?null:g.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(y=o.getAttribute("src"),(y!==(g.src==null?null:g.src)||o.getAttribute("type")!==(g.type==null?null:g.type)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&y&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var y=g.name==null?null:""+g.name;if(g.type==="hidden"&&o.getAttribute("name")===y)return o}else return o;if(o=Wi(o.nextSibling),o===null)break}return null}function P3(o,l,u){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=Wi(o.nextSibling),o===null))return null;return o}function YC(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=Wi(o.nextSibling),o===null))return null;return o}function by(o){return o.data==="$?"||o.data==="$~"}function Oy(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function z3(o,l){var u=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||u.readyState!=="loading")l();else{var d=function(){l(),u.removeEventListener("DOMContentLoaded",d)};u.addEventListener("DOMContentLoaded",d),o._reactRetry=d}}function Wi(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var xy=null;function KC(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var u=o.data;if(u==="/$"||u==="/&"){if(l===0)return Wi(o.nextSibling);l--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||l++}o=o.nextSibling}return null}function ZC(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var u=o.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(l===0)return o;l--}else u!=="/$"&&u!=="/&"||l++}o=o.previousSibling}return null}function JC(o,l,u){switch(l=mh(u),o){case"html":if(o=l.documentElement,!o)throw Error(i(452));return o;case"head":if(o=l.head,!o)throw Error(i(453));return o;case"body":if(o=l.body,!o)throw Error(i(454));return o;default:throw Error(i(451))}}function vu(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);wg(o)}var Vi=new Map,eT=new Set;function gh(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Mo=X.d;X.d={f:$3,r:B3,D:L3,C:j3,L:N3,m:Q3,X:q3,S:_3,M:I3};function $3(){var o=Mo.f(),l=lh();return o||l}function B3(o){var l=Yl(o);l!==null&&l.tag===5&&l.type==="form"?yw(l):Mo.r(o)}var Aa=typeof document>"u"?null:document;function tT(o,l,u){var d=Aa;if(d&&typeof l=="string"&&l){var g=Ni(l);g='link[rel="'+o+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),eT.has(g)||(eT.add(g),o={rel:o,crossOrigin:u,href:l},d.querySelector(g)===null&&(l=d.createElement("link"),zn(l,"link",o),Cn(l),d.head.appendChild(l)))}}function L3(o){Mo.D(o),tT("dns-prefetch",o,null)}function j3(o,l){Mo.C(o,l),tT("preconnect",o,l)}function N3(o,l,u){Mo.L(o,l,u);var d=Aa;if(d&&o&&l){var g='link[rel="preload"][as="'+Ni(l)+'"]';l==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+Ni(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+Ni(u.imageSizes)+'"]')):g+='[href="'+Ni(o)+'"]';var y=g;switch(l){case"style":y=Ra(o);break;case"script":y=Ma(o)}Vi.has(y)||(o=m({rel:"preload",href:l==="image"&&u&&u.imageSrcSet?void 0:o,as:l},u),Vi.set(y,o),d.querySelector(g)!==null||l==="style"&&d.querySelector(bu(y))||l==="script"&&d.querySelector(Ou(y))||(l=d.createElement("link"),zn(l,"link",o),Cn(l),d.head.appendChild(l)))}}function Q3(o,l){Mo.m(o,l);var u=Aa;if(u&&o){var d=l&&typeof l.as=="string"?l.as:"script",g='link[rel="modulepreload"][as="'+Ni(d)+'"][href="'+Ni(o)+'"]',y=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ma(o)}if(!Vi.has(y)&&(o=m({rel:"modulepreload",href:o},l),Vi.set(y,o),u.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Ou(y)))return}d=u.createElement("link"),zn(d,"link",o),Cn(d),u.head.appendChild(d)}}}function _3(o,l,u){Mo.S(o,l,u);var d=Aa;if(d&&o){var g=Kl(d).hoistableStyles,y=Ra(o);l=l||"default";var w=g.get(y);if(!w){var D={loading:0,preload:null};if(w=d.querySelector(bu(y)))D.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":l},u),(u=Vi.get(y))&&Sy(o,u);var U=w=d.createElement("link");Cn(U),zn(U,"link",o),U._p=new Promise(function(ee,re){U.onload=ee,U.onerror=re}),U.addEventListener("load",function(){D.loading|=1}),U.addEventListener("error",function(){D.loading|=2}),D.loading|=4,yh(w,l,d)}w={type:"stylesheet",instance:w,count:1,state:D},g.set(y,w)}}}function q3(o,l){Mo.X(o,l);var u=Aa;if(u&&o){var d=Kl(u).hoistableScripts,g=Ma(o),y=d.get(g);y||(y=u.querySelector(Ou(g)),y||(o=m({src:o,async:!0},l),(l=Vi.get(g))&&wy(o,l),y=u.createElement("script"),Cn(y),zn(y,"link",o),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},d.set(g,y))}}function I3(o,l){Mo.M(o,l);var u=Aa;if(u&&o){var d=Kl(u).hoistableScripts,g=Ma(o),y=d.get(g);y||(y=u.querySelector(Ou(g)),y||(o=m({src:o,async:!0,type:"module"},l),(l=Vi.get(g))&&wy(o,l),y=u.createElement("script"),Cn(y),zn(y,"link",o),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},d.set(g,y))}}function nT(o,l,u,d){var g=(g=ie.current)?gh(g):null;if(!g)throw Error(i(446));switch(o){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(l=Ra(u.href),u=Kl(g).hoistableStyles,d=u.get(l),d||(d={type:"style",instance:null,count:0,state:null},u.set(l,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){o=Ra(u.href);var y=Kl(g).hoistableStyles,w=y.get(o);if(w||(g=g.ownerDocument||g,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(o,w),(y=g.querySelector(bu(o)))&&!y._p&&(w.instance=y,w.state.loading=5),Vi.has(o)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Vi.set(o,u),y||H3(g,o,u,w.state))),l&&d===null)throw Error(i(528,""));return w}if(l&&d!==null)throw Error(i(529,""));return null;case"script":return l=u.async,u=u.src,typeof u=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ma(u),u=Kl(g).hoistableScripts,d=u.get(l),d||(d={type:"script",instance:null,count:0,state:null},u.set(l,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,o))}}function Ra(o){return'href="'+Ni(o)+'"'}function bu(o){return'link[rel="stylesheet"]['+o+"]"}function iT(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function H3(o,l,u,d){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?d.loading=1:(l=o.createElement("link"),d.preload=l,l.addEventListener("load",function(){return d.loading|=1}),l.addEventListener("error",function(){return d.loading|=2}),zn(l,"link",u),Cn(l),o.head.appendChild(l))}function Ma(o){return'[src="'+Ni(o)+'"]'}function Ou(o){return"script[async]"+o}function rT(o,l,u){if(l.count++,l.instance===null)switch(l.type){case"style":var d=o.querySelector('style[data-href~="'+Ni(u.href)+'"]');if(d)return l.instance=d,Cn(d),d;var g=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return d=(o.ownerDocument||o).createElement("style"),Cn(d),zn(d,"style",g),yh(d,u.precedence,o),l.instance=d;case"stylesheet":g=Ra(u.href);var y=o.querySelector(bu(g));if(y)return l.state.loading|=4,l.instance=y,Cn(y),y;d=iT(u),(g=Vi.get(g))&&Sy(d,g),y=(o.ownerDocument||o).createElement("link"),Cn(y);var w=y;return w._p=new Promise(function(D,U){w.onload=D,w.onerror=U}),zn(y,"link",d),l.state.loading|=4,yh(y,u.precedence,o),l.instance=y;case"script":return y=Ma(u.src),(g=o.querySelector(Ou(y)))?(l.instance=g,Cn(g),g):(d=u,(g=Vi.get(y))&&(d=m({},u),wy(d,g)),o=o.ownerDocument||o,g=o.createElement("script"),Cn(g),zn(g,"link",d),o.head.appendChild(g),l.instance=g);case"void":return null;default:throw Error(i(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(d=l.instance,l.state.loading|=4,yh(d,u.precedence,o));return l.instance}function yh(o,l,u){for(var d=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,y=g,w=0;w<d.length;w++){var D=d[w];if(D.dataset.precedence===l)y=D;else if(y!==g)break}y?y.parentNode.insertBefore(o,y.nextSibling):(l=u.nodeType===9?u.head:u,l.insertBefore(o,l.firstChild))}function Sy(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function wy(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var vh=null;function oT(o,l,u){if(vh===null){var d=new Map,g=vh=new Map;g.set(u,d)}else g=vh,d=g.get(u),d||(d=new Map,g.set(u,d));if(d.has(o))return d;for(d.set(o,null),u=u.getElementsByTagName(o),g=0;g<u.length;g++){var y=u[g];if(!(y[Lc]||y[Rn]||o==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var w=y.getAttribute(l)||"";w=o+w;var D=d.get(w);D?D.push(y):d.set(w,[y])}}return d}function sT(o,l,u){o=o.ownerDocument||o,o.head.insertBefore(u,l==="title"?o.querySelector("head > title"):null)}function U3(o,l,u){if(u===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(o=l.disabled,typeof l.precedence=="string"&&o==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function lT(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function W3(o,l,u,d){if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=Ra(d.href),y=l.querySelector(bu(g));if(y){l=y._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=bh.bind(o),l.then(o,o)),u.state.loading|=4,u.instance=y,Cn(y);return}y=l.ownerDocument||l,d=iT(d),(g=Vi.get(g))&&Sy(d,g),y=y.createElement("link"),Cn(y);var w=y;w._p=new Promise(function(D,U){w.onload=D,w.onerror=U}),zn(y,"link",d),u.instance=y}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(u,l),(l=u.state.preload)&&(u.state.loading&3)===0&&(o.count++,u=bh.bind(o),l.addEventListener("load",u),l.addEventListener("error",u))}}var Cy=0;function V3(o,l){return o.stylesheets&&o.count===0&&xh(o,o.stylesheets),0<o.count||0<o.imgCount?function(u){var d=setTimeout(function(){if(o.stylesheets&&xh(o,o.stylesheets),o.unsuspend){var y=o.unsuspend;o.unsuspend=null,y()}},6e4+l);0<o.imgBytes&&Cy===0&&(Cy=62500*k3());var g=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&xh(o,o.stylesheets),o.unsuspend)){var y=o.unsuspend;o.unsuspend=null,y()}},(o.imgBytes>Cy?50:800)+l);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function bh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xh(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Oh=null;function xh(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Oh=new Map,l.forEach(X3,o),Oh=null,bh.call(o))}function X3(o,l){if(!(l.state.loading&4)){var u=Oh.get(o);if(u)var d=u.get(null);else{u=new Map,Oh.set(o,u);for(var g=o.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<g.length;y++){var w=g[y];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(u.set(w.dataset.precedence,w),d=w)}d&&u.set(null,d)}g=l.instance,w=g.getAttribute("data-precedence"),y=u.get(w)||d,y===d&&u.set(null,g),u.set(w,g),this.count++,d=bh.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),y?y.parentNode.insertBefore(g,y.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(g,o.firstChild)),l.state.loading|=4}}var xu={$$typeof:z,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function G3(o,l,u,d,g,y,w,D,U){this.tag=1,this.containerInfo=o,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=Jn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jn(0),this.hiddenUpdates=Jn(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=y,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function aT(o,l,u,d,g,y,w,D,U,ee,re,fe){return o=new G3(o,l,u,w,U,ee,re,fe,D),l=1,y===!0&&(l|=24),y=vi(3,null,null,l),o.current=y,y.stateNode=o,l=i0(),l.refCount++,o.pooledCache=l,l.refCount++,y.memoizedState={element:d,isDehydrated:u,cache:l},l0(y),o}function cT(o){return o?(o=la,o):la}function uT(o,l,u,d,g,y){g=cT(g),d.context===null?d.context=g:d.pendingContext=g,d=as(l),d.payload={element:u},y=y===void 0?null:y,y!==null&&(d.callback=y),u=cs(o,d,l),u!==null&&(li(u,o,l),Jc(u,o,l))}function fT(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var u=o.retryLane;o.retryLane=u!==0&&u<l?u:l}}function Ty(o,l){fT(o,l),(o=o.alternate)&&fT(o,l)}function dT(o){if(o.tag===13||o.tag===31){var l=el(o,67108864);l!==null&&li(l,o,67108864),Ty(o,67108864)}}function hT(o){if(o.tag===13||o.tag===31){var l=wi();l=ei(l);var u=el(o,l);u!==null&&li(u,o,l),Ty(o,l)}}var Sh=!0;function F3(o,l,u,d){var g=N.T;N.T=null;var y=X.p;try{X.p=2,ky(o,l,u,d)}finally{X.p=y,N.T=g}}function Y3(o,l,u,d){var g=N.T;N.T=null;var y=X.p;try{X.p=8,ky(o,l,u,d)}finally{X.p=y,N.T=g}}function ky(o,l,u,d){if(Sh){var g=Ey(d);if(g===null)dy(o,l,d,wh,u),mT(o,d);else if(Z3(g,o,l,u,d))d.stopPropagation();else if(mT(o,d),l&4&&-1<K3.indexOf(o)){for(;g!==null;){var y=Yl(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var w=pr(y.pendingLanes);if(w!==0){var D=y;for(D.pendingLanes|=2,D.entangledLanes|=2;w;){var U=1<<31-gn(w);D.entanglements[1]|=U,w&=~U}jr(y),(mt&6)===0&&(oh=Lt()+500,mu(0))}}break;case 31:case 13:D=el(y,2),D!==null&&li(D,y,2),lh(),Ty(y,2)}if(y=Ey(d),y===null&&dy(o,l,d,wh,u),y===g)break;g=y}g!==null&&d.stopPropagation()}else dy(o,l,d,null,u)}}function Ey(o){return o=Rg(o),Ay(o)}var wh=null;function Ay(o){if(wh=null,o=Fl(o),o!==null){var l=s(o);if(l===null)o=null;else{var u=l.tag;if(u===13){if(o=a(l),o!==null)return o;o=null}else if(u===31){if(o=c(l),o!==null)return o;o=null}else if(u===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return wh=o,null}function pT(o){switch(o){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(hr()){case Wt:return 2;case ut:return 8;case jt:case on:return 32;case Bi:return 268435456;default:return 32}default:return 32}}var Ry=!1,Os=null,xs=null,Ss=null,Su=new Map,wu=new Map,ws=[],K3="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 mT(o,l){switch(o){case"focusin":case"focusout":Os=null;break;case"dragenter":case"dragleave":xs=null;break;case"mouseover":case"mouseout":Ss=null;break;case"pointerover":case"pointerout":Su.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":wu.delete(l.pointerId)}}function Cu(o,l,u,d,g,y){return o===null||o.nativeEvent!==y?(o={blockedOn:l,domEventName:u,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},l!==null&&(l=Yl(l),l!==null&&dT(l)),o):(o.eventSystemFlags|=d,l=o.targetContainers,g!==null&&l.indexOf(g)===-1&&l.push(g),o)}function Z3(o,l,u,d,g){switch(l){case"focusin":return Os=Cu(Os,o,l,u,d,g),!0;case"dragenter":return xs=Cu(xs,o,l,u,d,g),!0;case"mouseover":return Ss=Cu(Ss,o,l,u,d,g),!0;case"pointerover":var y=g.pointerId;return Su.set(y,Cu(Su.get(y)||null,o,l,u,d,g)),!0;case"gotpointercapture":return y=g.pointerId,wu.set(y,Cu(wu.get(y)||null,o,l,u,d,g)),!0}return!1}function gT(o){var l=Fl(o.target);if(l!==null){var u=s(l);if(u!==null){if(l=u.tag,l===13){if(l=a(u),l!==null){o.blockedOn=l,Bc(o.priority,function(){hT(u)});return}}else if(l===31){if(l=c(u),l!==null){o.blockedOn=l,Bc(o.priority,function(){hT(u)});return}}else if(l===3&&u.stateNode.current.memoizedState.isDehydrated){o.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Ch(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var u=Ey(o.nativeEvent);if(u===null){u=o.nativeEvent;var d=new u.constructor(u.type,u);Ag=d,u.target.dispatchEvent(d),Ag=null}else return l=Yl(u),l!==null&&dT(l),o.blockedOn=u,!1;l.shift()}return!0}function yT(o,l,u){Ch(o)&&u.delete(l)}function J3(){Ry=!1,Os!==null&&Ch(Os)&&(Os=null),xs!==null&&Ch(xs)&&(xs=null),Ss!==null&&Ch(Ss)&&(Ss=null),Su.forEach(yT),wu.forEach(yT)}function Th(o,l){o.blockedOn===l&&(o.blockedOn=null,Ry||(Ry=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,J3)))}var kh=null;function vT(o){kh!==o&&(kh=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){kh===o&&(kh=null);for(var l=0;l<o.length;l+=3){var u=o[l],d=o[l+1],g=o[l+2];if(typeof d!="function"){if(Ay(d||u)===null)continue;break}var y=Yl(u);y!==null&&(o.splice(l,3),l-=3,E0(y,{pending:!0,data:g,method:u.method,action:d},d,g))}}))}function Da(o){function l(U){return Th(U,o)}Os!==null&&Th(Os,o),xs!==null&&Th(xs,o),Ss!==null&&Th(Ss,o),Su.forEach(l),wu.forEach(l);for(var u=0;u<ws.length;u++){var d=ws[u];d.blockedOn===o&&(d.blockedOn=null)}for(;0<ws.length&&(u=ws[0],u.blockedOn===null);)gT(u),u.blockedOn===null&&ws.shift();if(u=(o.ownerDocument||o).$$reactFormReplay,u!=null)for(d=0;d<u.length;d+=3){var g=u[d],y=u[d+1],w=g[ti]||null;if(typeof y=="function")w||vT(u);else if(w){var D=null;if(y&&y.hasAttribute("formAction")){if(g=y,w=y[ti]||null)D=w.formAction;else if(Ay(g)!==null)continue}else D=w.action;typeof D=="function"?u[d+1]=D:(u.splice(d,3),d-=3),vT(u)}}}function bT(){function o(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(w){return g=w})},focusReset:"manual",scroll:"manual"})}function l(){g!==null&&(g(),g=null),d||setTimeout(u,20)}function u(){if(!d&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(u,100),function(){d=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),g!==null&&(g(),g=null)}}}function My(o){this._internalRoot=o}Eh.prototype.render=My.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(i(409));var u=l.current,d=wi();uT(u,d,o,l,null,null)},Eh.prototype.unmount=My.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;uT(o.current,2,null,o,null,null),lh(),l[Gl]=null}};function Eh(o){this._internalRoot=o}Eh.prototype.unstable_scheduleHydration=function(o){if(o){var l=ts();o={blockedOn:null,target:o,priority:l};for(var u=0;u<ws.length&&l!==0&&l<ws[u].priority;u++);ws.splice(u,0,o),u===0&&gT(o)}};var OT=e.version;if(OT!=="19.2.4")throw Error(i(527,OT,"19.2.4"));X.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(i(188)):(o=Object.keys(o).join(","),Error(i(268,o)));return o=h(l),o=o!==null?p(o):null,o=o===null?null:o.stateNode,o};var e$={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ah=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ah.isDisabled&&Ah.supportsFiber)try{Wn=Ah.inject(e$),Vt=Ah}catch{}}return ku.createRoot=function(o,l){if(!r(o))throw Error(i(299));var u=!1,d="",g=Ew,y=Aw,w=Rw;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(d=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=aT(o,1,!1,null,null,u,d,null,g,y,w,bT),o[Gl]=l.current,fy(o),new My(l)},ku.hydrateRoot=function(o,l,u){if(!r(o))throw Error(i(299));var d=!1,g="",y=Ew,w=Aw,D=Rw,U=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(w=u.onCaughtError),u.onRecoverableError!==void 0&&(D=u.onRecoverableError),u.formState!==void 0&&(U=u.formState)),l=aT(o,1,!0,l,u??null,d,g,U,y,w,D,bT),l.context=cT(null),u=l.current,d=wi(),d=ei(d),g=as(d),g.callback=null,cs(u,g,d),u=d,l.current.lanes=u,Oe(l,u),jr(l),o[Gl]=l.current,fy(o),new Eh(l)},ku.version="19.2.4",ku}var MT;function u$(){if(MT)return zy.exports;MT=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),zy.exports=c$(),zy.exports}var f$=u$(),jy={exports:{}},Ny={};var DT;function d$(){if(DT)return Ny;DT=1;var t=Vs();function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:e,i=t.useSyncExternalStore,r=t.useRef,s=t.useEffect,a=t.useMemo,c=t.useDebugValue;return Ny.useSyncExternalStoreWithSelector=function(f,h,p,m,v){var b=r(null);if(b.current===null){var O={hasValue:!1,value:null};b.current=O}else O=b.current;b=a(function(){function C(R){if(!E){if(E=!0,$=R,R=m(R),v!==void 0&&O.hasValue){var L=O.value;if(v(L,R))return z=L}return z=R}if(L=z,n($,R))return L;var M=m(R);return v!==void 0&&v(L,M)?($=R,L):($=R,z=M)}var E=!1,$,z,P=p===void 0?null:p;return[function(){return C(h())},P===null?void 0:function(){return C(P())}]},[h,p,m,v]);var S=i(f,b[0],b[1]);return s(function(){O.hasValue=!0,O.value=S},[S]),c(S),S},Ny}var PT;function h$(){return PT||(PT=1,jy.exports=d$()),jy.exports}var p$=h$();function m$(t){t()}function g$(){let t=null,e=null;return{clear(){t=null,e=null},notify(){m$(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let i=t;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0;const r=e={callback:n,next:null,prev:e};return r.prev?r.prev.next=r:t=r,function(){!i||t===null||(i=!1,r.next?r.next.prev=r.prev:e=r.prev,r.prev?r.prev.next=r.next:t=r.next)}}}}var zT={notify(){},get:()=>[]};function y$(t,e){let n,i=zT,r=0,s=!1;function a(S){p();const C=i.subscribe(S);let E=!1;return()=>{E||(E=!0,C(),m())}}function c(){i.notify()}function f(){O.onStateChange&&O.onStateChange()}function h(){return s}function p(){r++,n||(n=t.subscribe(f),i=g$())}function m(){r--,n&&r===0&&(n(),n=void 0,i.clear(),i=zT)}function v(){s||(s=!0,p())}function b(){s&&(s=!1,m())}const O={addNestedSub:a,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>i};return O}var v$=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b$=v$(),O$=()=>typeof navigator<"u"&&navigator.product==="ReactNative",x$=O$(),S$=()=>b$||x$?k.useLayoutEffect:k.useEffect,w$=S$(),C$=Symbol.for("react-redux-context"),T$=typeof globalThis<"u"?globalThis:{};function k$(){if(!k.createContext)return{};const t=T$[C$]??=new Map;let e=t.get(k.createContext);return e||(e=k.createContext(null),t.set(k.createContext,e)),e}var Ls=k$();function E$(t){const{children:e,context:n,serverState:i,store:r}=t,s=k.useMemo(()=>{const f=y$(r);return{store:r,subscription:f,getServerState:i?()=>i:void 0}},[r,i]),a=k.useMemo(()=>r.getState(),[r]);w$(()=>{const{subscription:f}=s;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),a!==r.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[s,a]);const c=n||Ls;return k.createElement(c.Provider,{value:s},e)}var A$=E$;function V1(t=Ls){return function(){return k.useContext(t)}}var cR=V1();function uR(t=Ls){const e=t===Ls?cR:V1(t),n=()=>{const{store:i}=e();return i};return Object.assign(n,{withTypes:()=>n}),n}var R$=uR();function M$(t=Ls){const e=t===Ls?R$:uR(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Xs=M$(),D$=(t,e)=>t===e;function P$(t=Ls){const e=t===Ls?cR:V1(t),n=(i,r={})=>{const{equalityFn:s=D$}=typeof r=="function"?{equalityFn:r}:r,a=e(),{store:c,subscription:f,getServerState:h}=a;k.useRef(!0);const p=k.useCallback({[i.name](v){return i(v)}}[i.name],[i]),m=p$.useSyncExternalStoreWithSelector(f.addNestedSub,c.getState,h||c.getState,p,s);return k.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var zt=P$();function $n(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var z$=typeof Symbol=="function"&&Symbol.observable||"@@observable",$T=z$,Qy=()=>Math.random().toString(36).substring(7).split("").join("."),$$={INIT:`@@redux/INIT${Qy()}`,REPLACE:`@@redux/REPLACE${Qy()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qy()}`},Fp=$$;function B$(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function fR(t,e,n){if(typeof t!="function")throw new Error($n(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($n(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($n(1));return n(fR)(t,e)}let i=t,r=e,s=new Map,a=s,c=0,f=!1;function h(){a===s&&(a=new Map,s.forEach((C,E)=>{a.set(E,C)}))}function p(){if(f)throw new Error($n(3));return r}function m(C){if(typeof C!="function")throw new Error($n(4));if(f)throw new Error($n(5));let E=!0;h();const $=c++;return a.set($,C),function(){if(E){if(f)throw new Error($n(6));E=!1,h(),a.delete($),s=null}}}function v(C){if(!B$(C))throw new Error($n(7));if(typeof C.type>"u")throw new Error($n(8));if(typeof C.type!="string")throw new Error($n(17));if(f)throw new Error($n(9));try{f=!0,r=i(r,C)}finally{f=!1}return(s=a).forEach($=>{$()}),C}function b(C){if(typeof C!="function")throw new Error($n(10));i=C,v({type:Fp.REPLACE})}function O(){const C=m;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error($n(11));function $(){const P=E;P.next&&P.next(p())}return $(),{unsubscribe:C($)}},[$T](){return this}}}return v({type:Fp.INIT}),{dispatch:v,subscribe:m,getState:p,replaceReducer:b,[$T]:O}}function L$(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Fp.INIT})>"u")throw new Error($n(12));if(typeof n(void 0,{type:Fp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($n(13))})}function j$(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const a=e[s];typeof t[a]=="function"&&(n[a]=t[a])}const i=Object.keys(n);let r;try{L$(n)}catch(s){r=s}return function(a={},c){if(r)throw r;let f=!1;const h={};for(let p=0;p<i.length;p++){const m=i[p],v=n[m],b=a[m],O=v(b,c);if(typeof O>"u")throw c&&c.type,new Error($n(14));h[m]=O,f=f||O!==b}return f=f||i.length!==Object.keys(a).length,f?h:a}}function dR(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function N$(...t){return e=>(n,i)=>{const r=e(n,i);let s=()=>{throw new Error($n(15))};const a={getState:r.getState,dispatch:(f,...h)=>s(f,...h)},c=t.map(f=>f(a));return s=dR(...c)(r.dispatch),{...r,dispatch:s}}}const Q$="HELLO",_$=()=>({type:Q$,remote:!0}),hR="SET_INFO",pR="PAUSE",q$="SET_TITLE",I$="SET_THEME",mR="SET_SPACING",H$=t=>({type:mR,spacing:t}),X1="SET_FRAMES",U$="GET_FILE",W$=t=>({type:U$,filename:t,remote:!0}),gR="DO_COMMAND",Sb=(t,e)=>({type:gR,command:t,frame:e,remote:!0}),V$="SET_FILE",yR="SET_ACTIVE_FRAME",vR=t=>({type:yR,key:t}),zm="SET_PROMPT",_y=(t,e,n,i,r=0)=>({type:zm,key:t,prompt:e,command:n,frame:i,level:r,remote:!0}),bR="REFRESH_PROMPT",OR=(t,e,n,i)=>({type:bR,key:t,prompt:e,command:n,frame:i,remote:!0}),xR="REMOVE_PROMPT_ANSWER",SR=t=>({type:xR,key:t}),wR="SET_CONNECTION_STATE",BT=t=>({type:wR,state:t}),CR="REQUEST_INSPECT",X$=(t,e)=>({type:CR,key:t,id:e,remote:!0}),G$="SET_ANSWER",TR="SET_WATCHING",F$=(t,e)=>({type:TR,key:t,watching:e}),kR="CLEAR_SCROLLBACK",Y$=()=>({type:kR}),K$="REQUEST_SUGGESTION",Z$=(t,e,n,i,r)=>({type:K$,prompt:t,from:e,to:n,cursor:i,frame:r,remote:!0}),J$="SET_SUGGESTION",eB="CLEAR_SUGGESTION",tB=(t={},e)=>e.type===hR?e.config:t,nB=(t="Initializing",e)=>e.type===q$?e.title:t,iB=(t=[],e)=>e.type===X1?e.frames:t,rB=(t={},e)=>e.type===V$?{...t,[e.filename]:e.source}:t,oB=(t=null,e)=>{let n;switch(e.type){case X1:return n=e.frames.find(({active:i})=>i),n?n.key:t;case yR:return e.key;default:return t}},sB=(t=[],e)=>{switch(e.type){case zm:return[...t,{key:e.key,prompt:`${e.prompt}…`,command:e.command,frame:e.frame,level:e.level,answer:null}];case bR:return t.map(n=>e.key===n.key?{...n,prompt:`${e.prompt}…`,frame:e.frame||n.frame}:n);case xR:return t.filter(n=>e.key!==n.key);case CR:return[...t,{key:e.key,prompt:`${e.id}…`,answer:null}];case G$:return t.map(n=>e.key===n.key?{...n,key:e.key,prompt:e.prompt,command:e.command,answer:e.answer,frame:e.frame,duration:e.duration}:n);case TR:return t.map(n=>e.key===n.key?{...n,watching:e.watching}:n);case kR:return[];default:return t}},lB=(t={state:"connecting"},e)=>e.type===wR?{...t,state:e.state}:t,aB=(t=0,e)=>e.remote?t+1:e.local?t-1:t,cB=(t=0,e)=>{switch(e.type){case zm:return e.command==="recursive_debug"?t+1:t;case pR:return e.recursive?t-1:t;default:return t}},uB=(t=!1,e)=>e.type===gR?!0:e.type===pR?!1:t,fB=(t=[],e)=>{switch(e.type){case zm:{if(e.command==="help")return t;const n=e.command&&e.command!=="condition"?`?${e.command} ${e.prompt}`:e.prompt;return[n,...t.filter(i=>i!==n)]}default:return t}},dB=(t={},e)=>{switch(e.type){case J$:return{prompt:e.prompt,from:e.from,to:e.to,suggestion:e.suggestion};case eB:return{};default:return t}},hB=(t="init",e)=>e.type===I$?e.theme:t,pB=(t={},e)=>e.type===mR?e.spacing:t,mB=(t=!0,e)=>e.type===hR?e.main:t,gB=j$({config:tB,title:nB,frames:iB,files:rB,activeFrame:oB,scrollback:sB,history:fB,suggestions:dB,theme:hB,spacing:pB,connection:lB,loadingLevel:aB,recursionLevel:cB,running:uB,main:mB});function yB(t){let e=!1;const n=["debug","info"].includes(t.getState().config.log),i=[],r=()=>{const a=new URL(window.location.href);return a.protocol=a.protocol==="http:"?"ws:":"wss:",window.KALONG_WS_HOST&&(a.hostname=window.KALONG_WS_HOST||void 0),window.KALONG_WS_PORT&&(a.port=window.KALONG_WS_PORT||void 0),new WebSocket(a)};let s=window.ws=r();return s.onopen=()=>{for(t.dispatch(BT("open"));i.length;)s.send(i.shift())},s.onmessage=({data:a})=>{const c=JSON.parse(a);if(n){const{type:f,...h}=c;console&&console.log("->",f,h)}t.dispatch(c)},s.onclose=()=>{t.dispatch(BT("closed")),setTimeout(()=>e||window.close(),10)},window.addEventListener("beforeunload",function(a){if(delete a.returnValue,s.readyState===WebSocket.OPEN)try{e=!0,s.close()}catch(c){console.error(c)}}),a=>c=>{if(c.remote){const f=JSON.stringify(c);if(s.readyState===1){if(n){const{type:h,...p}=c;console&&console.log("<-",h,p)}s.send(f)}else{if(n){const{type:h,...p}=c;console&&console.log("><",h,p)}i.push(f),s.readyState===3&&(s=window.ws=r())}}return a(c)}}function vB(t){return e=>n=>{const i=e(n);if(n.type===X1){const{scrollback:r,activeFrame:s}=t.getState();r.forEach(({key:a,prompt:c,command:f,frame:h,watching:p})=>{(p==="all"||p==="frame"&&s===h)&&t.dispatch(OR(a,c,f,h))})}return i}}let ER,AR;try{AR=localStorage.getItem("spacing")||"compact",ER=JSON.parse(localStorage.getItem("history")||"[]")}catch(t){console.warn("Failed to load from localStorage:",t)}const bf=fR(gB,{history:ER,spacing:AR},(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||dR)(N$(yB,vB)));function Nl(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(i=>n.searchParams.append("args[]",i)),`Minified MUI error #${t}; visit ${n} for the full message.`}const wr="$$material";function Of(){return Of=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Of.apply(null,arguments)}function bB(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function OB(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var RR=(function(){function t(n){var i=this;this._insertTag=function(r){var s;i.tags.length===0?i.insertionPoint?s=i.insertionPoint.nextSibling:i.prepend?s=i.container.firstChild:s=i.before:s=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,s),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(OB(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=bB(r);try{s.insertRule(i,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t})(),qn="-ms-",Yp="-moz-",gt="-webkit-",MR="comm",G1="rule",F1="decl",xB="@import",DR="@keyframes",SB="@layer",wB=Math.abs,$m=String.fromCharCode,CB=Object.assign;function TB(t,e){return Ln(t,0)^45?(((e<<2^Ln(t,0))<<2^Ln(t,1))<<2^Ln(t,2))<<2^Ln(t,3):0}function PR(t){return t.trim()}function kB(t,e){return(t=e.exec(t))?t[0]:t}function yt(t,e,n){return t.replace(e,n)}function wb(t,e){return t.indexOf(e)}function Ln(t,e){return t.charCodeAt(e)|0}function xf(t,e,n){return t.slice(e,n)}function Wr(t){return t.length}function Y1(t){return t.length}function Rh(t,e){return e.push(t),t}function EB(t,e){return t.map(e).join("")}var Bm=1,lc=1,zR=0,gi=0,fn=0,Cc="";function Lm(t,e,n,i,r,s,a){return{value:t,root:e,parent:n,type:i,props:r,children:s,line:Bm,column:lc,length:a,return:""}}function Eu(t,e){return CB(Lm("",null,null,"",null,null,0),t,{length:-t.length},e)}function AB(){return fn}function RB(){return fn=gi>0?Ln(Cc,--gi):0,lc--,fn===10&&(lc=1,Bm--),fn}function Di(){return fn=gi<zR?Ln(Cc,gi++):0,lc++,fn===10&&(lc=1,Bm++),fn}function to(){return Ln(Cc,gi)}function Ep(){return gi}function Kf(t,e){return xf(Cc,t,e)}function Sf(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $R(t){return Bm=lc=1,zR=Wr(Cc=t),gi=0,[]}function BR(t){return Cc="",t}function Ap(t){return PR(Kf(gi-1,Cb(t===91?t+2:t===40?t+1:t)))}function MB(t){for(;(fn=to())&&fn<33;)Di();return Sf(t)>2||Sf(fn)>3?"":" "}function DB(t,e){for(;--e&&Di()&&!(fn<48||fn>102||fn>57&&fn<65||fn>70&&fn<97););return Kf(t,Ep()+(e<6&&to()==32&&Di()==32))}function Cb(t){for(;Di();)switch(fn){case t:return gi;case 34:case 39:t!==34&&t!==39&&Cb(fn);break;case 40:t===41&&Cb(t);break;case 92:Di();break}return gi}function PB(t,e){for(;Di()&&t+fn!==57;)if(t+fn===84&&to()===47)break;return"/*"+Kf(e,gi-1)+"*"+$m(t===47?t:Di())}function zB(t){for(;!Sf(to());)Di();return Kf(t,gi)}function $B(t){return BR(Rp("",null,null,null,[""],t=$R(t),0,[0],t))}function Rp(t,e,n,i,r,s,a,c,f){for(var h=0,p=0,m=a,v=0,b=0,O=0,S=1,C=1,E=1,$=0,z="",P=r,R=s,L=i,M=z;C;)switch(O=$,$=Di()){case 40:if(O!=108&&Ln(M,m-1)==58){wb(M+=yt(Ap($),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:M+=Ap($);break;case 9:case 10:case 13:case 32:M+=MB(O);break;case 92:M+=DB(Ep()-1,7);continue;case 47:switch(to()){case 42:case 47:Rh(BB(PB(Di(),Ep()),e,n),f);break;default:M+="/"}break;case 123*S:c[h++]=Wr(M)*E;case 125*S:case 59:case 0:switch($){case 0:case 125:C=0;case 59+p:E==-1&&(M=yt(M,/\f/g,"")),b>0&&Wr(M)-m&&Rh(b>32?jT(M+";",i,n,m-1):jT(yt(M," ","")+";",i,n,m-2),f);break;case 59:M+=";";default:if(Rh(L=LT(M,e,n,h,p,r,c,z,P=[],R=[],m),s),$===123)if(p===0)Rp(M,e,L,L,P,s,m,c,R);else switch(v===99&&Ln(M,3)===110?100:v){case 100:case 108:case 109:case 115:Rp(t,L,L,i&&Rh(LT(t,L,L,0,0,r,c,z,r,P=[],m),R),r,R,m,c,i?P:R);break;default:Rp(M,L,L,L,[""],R,0,c,R)}}h=p=b=0,S=E=1,z=M="",m=a;break;case 58:m=1+Wr(M),b=O;default:if(S<1){if($==123)--S;else if($==125&&S++==0&&RB()==125)continue}switch(M+=$m($),$*S){case 38:E=p>0?1:(M+="\f",-1);break;case 44:c[h++]=(Wr(M)-1)*E,E=1;break;case 64:to()===45&&(M+=Ap(Di())),v=to(),p=m=Wr(z=M+=zB(Ep())),$++;break;case 45:O===45&&Wr(M)==2&&(S=0)}}return s}function LT(t,e,n,i,r,s,a,c,f,h,p){for(var m=r-1,v=r===0?s:[""],b=Y1(v),O=0,S=0,C=0;O<i;++O)for(var E=0,$=xf(t,m+1,m=wB(S=a[O])),z=t;E<b;++E)(z=PR(S>0?v[E]+" "+$:yt($,/&\f/g,v[E])))&&(f[C++]=z);return Lm(t,e,n,r===0?G1:c,f,h,p)}function BB(t,e,n){return Lm(t,e,n,MR,$m(AB()),xf(t,2,-2),0)}function jT(t,e,n,i){return Lm(t,e,n,F1,xf(t,0,i),xf(t,i+1,-1),i)}function Ya(t,e){for(var n="",i=Y1(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function LB(t,e,n,i){switch(t.type){case SB:if(t.children.length)break;case xB:case F1:return t.return=t.return||t.value;case MR:return"";case DR:return t.return=t.value+"{"+Ya(t.children,i)+"}";case G1:t.value=t.props.join(",")}return Wr(n=Ya(t.children,i))?t.return=t.value+"{"+n+"}":""}function jB(t){var e=Y1(t);return function(n,i,r,s){for(var a="",c=0;c<e;c++)a+=t[c](n,i,r,s)||"";return a}}function NB(t){return function(e){e.root||(e=e.return)&&t(e)}}function LR(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var QB=function(e,n,i){for(var r=0,s=0;r=s,s=to(),r===38&&s===12&&(n[i]=1),!Sf(s);)Di();return Kf(e,gi)},_B=function(e,n){var i=-1,r=44;do switch(Sf(r)){case 0:r===38&&to()===12&&(n[i]=1),e[i]+=QB(gi-1,n,i);break;case 2:e[i]+=Ap(r);break;case 4:if(r===44){e[++i]=to()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=$m(r)}while(r=Di());return e},qB=function(e,n){return BR(_B($R(e),n))},NT=new WeakMap,IB=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!NT.get(i))&&!r){NT.set(e,!0);for(var s=[],a=qB(n,s),c=i.props,f=0,h=0;f<a.length;f++)for(var p=0;p<c.length;p++,h++)e.props[h]=s[f]?a[f].replace(/&\f/g,c[p]):c[p]+" "+a[f]}}},HB=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function jR(t,e){switch(TB(t,e)){case 5103:return gt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return gt+t+Yp+t+qn+t+t;case 6828:case 4268:return gt+t+qn+t+t;case 6165:return gt+t+qn+"flex-"+t+t;case 5187:return gt+t+yt(t,/(\w+).+(:[^]+)/,gt+"box-$1$2"+qn+"flex-$1$2")+t;case 5443:return gt+t+qn+"flex-item-"+yt(t,/flex-|-self/,"")+t;case 4675:return gt+t+qn+"flex-line-pack"+yt(t,/align-content|flex-|-self/,"")+t;case 5548:return gt+t+qn+yt(t,"shrink","negative")+t;case 5292:return gt+t+qn+yt(t,"basis","preferred-size")+t;case 6060:return gt+"box-"+yt(t,"-grow","")+gt+t+qn+yt(t,"grow","positive")+t;case 4554:return gt+yt(t,/([^-])(transform)/g,"$1"+gt+"$2")+t;case 6187:return yt(yt(yt(t,/(zoom-|grab)/,gt+"$1"),/(image-set)/,gt+"$1"),t,"")+t;case 5495:case 3959:return yt(t,/(image-set\([^]*)/,gt+"$1$`$1");case 4968:return yt(yt(t,/(.+:)(flex-)?(.*)/,gt+"box-pack:$3"+qn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gt+t+t;case 4095:case 3583:case 4068:case 2532:return yt(t,/(.+)-inline(.+)/,gt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Wr(t)-1-e>6)switch(Ln(t,e+1)){case 109:if(Ln(t,e+4)!==45)break;case 102:return yt(t,/(.+:)(.+)-([^]+)/,"$1"+gt+"$2-$3$1"+Yp+(Ln(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~wb(t,"stretch")?jR(yt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Ln(t,e+1)!==115)break;case 6444:switch(Ln(t,Wr(t)-3-(~wb(t,"!important")&&10))){case 107:return yt(t,":",":"+gt)+t;case 101:return yt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gt+(Ln(t,14)===45?"inline-":"")+"box$3$1"+gt+"$2$3$1"+qn+"$2box$3")+t}break;case 5936:switch(Ln(t,e+11)){case 114:return gt+t+qn+yt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return gt+t+qn+yt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return gt+t+qn+yt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return gt+t+qn+t+t}return t}var UB=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case F1:e.return=jR(e.value,e.length);break;case DR:return Ya([Eu(e,{value:yt(e.value,"@","@"+gt)})],r);case G1:if(e.length)return EB(e.props,function(s){switch(kB(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ya([Eu(e,{props:[yt(s,/:(read-\w+)/,":"+Yp+"$1")]})],r);case"::placeholder":return Ya([Eu(e,{props:[yt(s,/:(plac\w+)/,":"+gt+"input-$1")]}),Eu(e,{props:[yt(s,/:(plac\w+)/,":"+Yp+"$1")]}),Eu(e,{props:[yt(s,/:(plac\w+)/,qn+"input-$1")]})],r)}return""})}},WB=[UB],NR=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(S){var C=S.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var r=e.stylisPlugins||WB,s={},a,c=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var C=S.getAttribute("data-emotion").split(" "),E=1;E<C.length;E++)s[C[E]]=!0;c.push(S)});var f,h=[IB,HB];{var p,m=[LB,NB(function(S){p.insert(S)})],v=jB(h.concat(r,m)),b=function(C){return Ya($B(C),v)};f=function(C,E,$,z){p=$,b(C?C+"{"+E.styles+"}":E.styles),z&&(O.inserted[E.name]=!0)}}var O={key:n,sheet:new RR({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:f};return O.sheet.hydrate(c),O},qy={exports:{}},bt={};var QT;function VB(){if(QT)return bt;QT=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,r=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,f=t?Symbol.for("react.async_mode"):60111,h=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,m=t?Symbol.for("react.suspense"):60113,v=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,O=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.block"):60121,C=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,$=t?Symbol.for("react.scope"):60119;function z(R){if(typeof R=="object"&&R!==null){var L=R.$$typeof;switch(L){case e:switch(R=R.type,R){case f:case h:case i:case s:case r:case m:return R;default:switch(R=R&&R.$$typeof,R){case c:case p:case O:case b:case a:return R;default:return L}}case n:return L}}}function P(R){return z(R)===h}return bt.AsyncMode=f,bt.ConcurrentMode=h,bt.ContextConsumer=c,bt.ContextProvider=a,bt.Element=e,bt.ForwardRef=p,bt.Fragment=i,bt.Lazy=O,bt.Memo=b,bt.Portal=n,bt.Profiler=s,bt.StrictMode=r,bt.Suspense=m,bt.isAsyncMode=function(R){return P(R)||z(R)===f},bt.isConcurrentMode=P,bt.isContextConsumer=function(R){return z(R)===c},bt.isContextProvider=function(R){return z(R)===a},bt.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===e},bt.isForwardRef=function(R){return z(R)===p},bt.isFragment=function(R){return z(R)===i},bt.isLazy=function(R){return z(R)===O},bt.isMemo=function(R){return z(R)===b},bt.isPortal=function(R){return z(R)===n},bt.isProfiler=function(R){return z(R)===s},bt.isStrictMode=function(R){return z(R)===r},bt.isSuspense=function(R){return z(R)===m},bt.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===i||R===h||R===s||R===r||R===m||R===v||typeof R=="object"&&R!==null&&(R.$$typeof===O||R.$$typeof===b||R.$$typeof===a||R.$$typeof===c||R.$$typeof===p||R.$$typeof===C||R.$$typeof===E||R.$$typeof===$||R.$$typeof===S)},bt.typeOf=z,bt}var _T;function XB(){return _T||(_T=1,qy.exports=VB()),qy.exports}var Iy,qT;function GB(){if(qT)return Iy;qT=1;var t=XB(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[t.ForwardRef]=i,s[t.Memo]=r;function a(O){return t.isMemo(O)?r:s[O.$$typeof]||e}var c=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,v=Object.prototype;function b(O,S,C){if(typeof S!="string"){if(v){var E=m(S);E&&E!==v&&b(O,E,C)}var $=f(S);h&&($=$.concat(h(S)));for(var z=a(O),P=a(S),R=0;R<$.length;++R){var L=$[R];if(!n[L]&&!(C&&C[L])&&!(P&&P[L])&&!(z&&z[L])){var M=p(S,L);try{c(O,L,M)}catch{}}}}return O}return Iy=b,Iy}GB();var FB=!0;function QR(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var K1=function(e,n,i){var r=e.key+"-"+n.name;(i===!1||FB===!1)&&e.registered[r]===void 0&&(e.registered[r]=n.styles)},Z1=function(e,n,i){K1(e,n,i);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+r:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function YB(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var KB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ZB=/[A-Z]|^ms/g,JB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_R=function(e){return e.charCodeAt(1)===45},IT=function(e){return e!=null&&typeof e!="boolean"},Hy=LR(function(t){return _R(t)?t:t.replace(ZB,"-$&").toLowerCase()}),HT=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(JB,function(i,r,s){return Vr={name:r,styles:s,next:Vr},r})}return KB[e]!==1&&!_R(e)&&typeof n=="number"&&n!==0?n+"px":n};function wf(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Vr={name:r.name,styles:r.styles,next:Vr},r.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)Vr={name:a.name,styles:a.styles,next:Vr},a=a.next;var c=s.styles+";";return c}return eL(t,e,n)}case"function":{if(t!==void 0){var f=Vr,h=n(t);return Vr=f,wf(t,e,h)}break}}var p=n;if(e==null)return p;var m=e[p];return m!==void 0?m:p}function eL(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=wf(t,e,n[r])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var c=a;e!=null&&e[c]!==void 0?i+=s+"{"+e[c]+"}":IT(c)&&(i+=Hy(s)+":"+HT(s,c)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var f=0;f<a.length;f++)IT(a[f])&&(i+=Hy(s)+":"+HT(s,a[f])+";");else{var h=wf(t,e,a);switch(s){case"animation":case"animationName":{i+=Hy(s)+":"+h+";";break}default:i+=s+"{"+h+"}"}}}return i}var UT=/label:\s*([^\s;{]+)\s*(;|$)/g,Vr;function Zf(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";Vr=void 0;var s=t[0];if(s==null||s.raw===void 0)i=!1,r+=wf(n,e,s);else{var a=s;r+=a[0]}for(var c=1;c<t.length;c++)if(r+=wf(n,e,t[c]),i){var f=s;r+=f[c]}UT.lastIndex=0;for(var h="",p;(p=UT.exec(r))!==null;)h+="-"+p[1];var m=YB(r)+h;return{name:m,styles:r,next:Vr}}var tL=function(e){return e()},qR=Gp.useInsertionEffect?Gp.useInsertionEffect:!1,IR=qR||tL,WT=qR||k.useLayoutEffect,HR=k.createContext(typeof HTMLElement<"u"?NR({key:"css"}):null),nL=HR.Provider,J1=function(e){return k.forwardRef(function(n,i){var r=k.useContext(HR);return e(n,r,i)})},Jf=k.createContext({}),eO={}.hasOwnProperty,Tb="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",iL=function(e,n){var i={};for(var r in n)eO.call(n,r)&&(i[r]=n[r]);return i[Tb]=e,i},rL=function(e){var n=e.cache,i=e.serialized,r=e.isStringTag;return K1(n,i,r),IR(function(){return Z1(n,i,r)}),null},oL=J1(function(t,e,n){var i=t.css;typeof i=="string"&&e.registered[i]!==void 0&&(i=e.registered[i]);var r=t[Tb],s=[i],a="";typeof t.className=="string"?a=QR(e.registered,s,t.className):t.className!=null&&(a=t.className+" ");var c=Zf(s,void 0,k.useContext(Jf));a+=e.key+"-"+c.name;var f={};for(var h in t)eO.call(t,h)&&h!=="css"&&h!==Tb&&(f[h]=t[h]);return f.className=a,n&&(f.ref=n),k.createElement(k.Fragment,null,k.createElement(rL,{cache:e,serialized:c,isStringTag:typeof r=="string"}),k.createElement(r,f))}),sL=oL,VT=function(e,n){var i=arguments;if(n==null||!eO.call(n,"css"))return k.createElement.apply(void 0,i);var r=i.length,s=new Array(r);s[0]=sL,s[1]=iL(e,n);for(var a=2;a<r;a++)s[a]=i[a];return k.createElement.apply(null,s)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(VT||(VT={}));var lL=J1(function(t,e){var n=t.styles,i=Zf([n],void 0,k.useContext(Jf)),r=k.useRef();return WT(function(){var s=e.key+"-global",a=new e.sheet.constructor({key:s,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),c=!1,f=document.querySelector('style[data-emotion="'+s+" "+i.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),f!==null&&(c=!0,f.setAttribute("data-emotion",s),a.hydrate([f])),r.current=[a,c],function(){a.flush()}},[e]),WT(function(){var s=r.current,a=s[0],c=s[1];if(c){s[1]=!1;return}if(i.next!==void 0&&Z1(e,i.next,!0),a.tags.length){var f=a.tags[a.tags.length-1].nextElementSibling;a.before=f,a.flush()}e.insert("",i,a,!1)},[e,i.name]),null});function tO(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Zf(e)}function ed(){var t=tO.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var aL=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,cL=LR(function(t){return aL.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),uL=cL,fL=function(e){return e!=="theme"},XT=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?uL:fL},GT=function(e,n,i){var r;if(n){var s=n.shouldForwardProp;r=e.__emotion_forwardProp&&s?function(a){return e.__emotion_forwardProp(a)&&s(a)}:s}return typeof r!="function"&&i&&(r=e.__emotion_forwardProp),r},dL=function(e){var n=e.cache,i=e.serialized,r=e.isStringTag;return K1(n,i,r),IR(function(){return Z1(n,i,r)}),null},hL=function t(e,n){var i=e.__emotion_real===e,r=i&&e.__emotion_base||e,s,a;n!==void 0&&(s=n.label,a=n.target);var c=GT(e,n,i),f=c||XT(r),h=!f("as");return function(){var p=arguments,m=i&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&m.push("label:"+s+";"),p[0]==null||p[0].raw===void 0)m.push.apply(m,p);else{var v=p[0];m.push(v[0]);for(var b=p.length,O=1;O<b;O++)m.push(p[O],v[O])}var S=J1(function(C,E,$){var z=h&&C.as||r,P="",R=[],L=C;if(C.theme==null){L={};for(var M in C)L[M]=C[M];L.theme=k.useContext(Jf)}typeof C.className=="string"?P=QR(E.registered,R,C.className):C.className!=null&&(P=C.className+" ");var B=Zf(m.concat(R),E.registered,L);P+=E.key+"-"+B.name,a!==void 0&&(P+=" "+a);var _=h&&c===void 0?XT(z):f,A={};for(var Q in C)h&&Q==="as"||_(Q)&&(A[Q]=C[Q]);return A.className=P,$&&(A.ref=$),k.createElement(k.Fragment,null,k.createElement(dL,{cache:E,serialized:B,isStringTag:typeof z=="string"}),k.createElement(z,A))});return S.displayName=s!==void 0?s:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",S.defaultProps=e.defaultProps,S.__emotion_real=S,S.__emotion_base=r,S.__emotion_styles=m,S.__emotion_forwardProp=c,Object.defineProperty(S,"toString",{value:function(){return"."+a}}),S.withComponent=function(C,E){var $=t(C,Of({},n,E,{shouldForwardProp:GT(S,E,!0)}));return $.apply(void 0,m)},S}},pL=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],kb=hL.bind(null);pL.forEach(function(t){kb[t]=kb(t)});var Uy={exports:{}},Wy,FT;function mL(){if(FT)return Wy;FT=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wy=t,Wy}var Vy,YT;function gL(){if(YT)return Vy;YT=1;var t=mL();function e(){}function n(){}return n.resetWarningCache=e,Vy=function(){function i(a,c,f,h,p,m){if(m!==t){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}i.isRequired=i;function r(){return i}var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},Vy}var KT;function yL(){return KT||(KT=1,Uy.exports=gL()()),Uy.exports}const Xy=new Map,vL=(t,e)=>{const n=NR(t);return n.sheet=new e({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n};let Ts;if(typeof document=="object"&&(Ts=document.querySelector('[name="emotion-insertion-point"]'),!Ts)){Ts=document.createElement("meta"),Ts.setAttribute("name","emotion-insertion-point"),Ts.setAttribute("content","");const t=document.querySelector("head");t&&t.prepend(Ts)}function bL(t,e){if(t||e){class n extends RR{insert(s,a){return this.key&&this.key.endsWith("global")&&(this.before=Ts),super.insert(s,a)}}const i=vL({key:"css",insertionPoint:t?Ts:void 0},n);if(e){const r=i.insert;i.insert=(...s)=>(s[1].styles.match(/^@layer\s+[^{]*$/)||(s[1].styles=`@layer mui {${s[1].styles}}`),r(...s))}return i}}function OL(t){const{injectFirst:e,enableCssLayer:n,children:i}=t,r=k.useMemo(()=>{const s=`${e}-${n}`;if(typeof document=="object"&&Xy.has(s))return Xy.get(s);const a=bL(e,n);return Xy.set(s,a),a},[e,n]);return r?x.jsx(nL,{value:r,children:i}):i}function xL(t){return t==null||Object.keys(t).length===0}function UR(t){const{styles:e,defaultTheme:n={}}=t,i=typeof e=="function"?r=>e(xL(r)?n:r):e;return x.jsx(lL,{styles:i})}function WR(t,e){return kb(t,e)}function SL(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const ZT=[];function zs(t){return ZT[0]=t,Zf(ZT)}var Gy={exports:{}},At={};var JT;function wL(){if(JT)return At;JT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function O(S){if(typeof S=="object"&&S!==null){var C=S.$$typeof;switch(C){case t:switch(S=S.type,S){case n:case r:case i:case f:case h:case v:return S;default:switch(S=S&&S.$$typeof,S){case a:case c:case m:case p:return S;case s:return S;default:return C}}case e:return C}}}return At.ContextConsumer=s,At.ContextProvider=a,At.Element=t,At.ForwardRef=c,At.Fragment=n,At.Lazy=m,At.Memo=p,At.Portal=e,At.Profiler=r,At.StrictMode=i,At.Suspense=f,At.SuspenseList=h,At.isContextConsumer=function(S){return O(S)===s},At.isContextProvider=function(S){return O(S)===a},At.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},At.isForwardRef=function(S){return O(S)===c},At.isFragment=function(S){return O(S)===n},At.isLazy=function(S){return O(S)===m},At.isMemo=function(S){return O(S)===p},At.isPortal=function(S){return O(S)===e},At.isProfiler=function(S){return O(S)===r},At.isStrictMode=function(S){return O(S)===i},At.isSuspense=function(S){return O(S)===f},At.isSuspenseList=function(S){return O(S)===h},At.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===r||S===i||S===f||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===p||S.$$typeof===a||S.$$typeof===s||S.$$typeof===c||S.$$typeof===b||S.getModuleId!==void 0)},At.typeOf=O,At}var ek;function CL(){return ek||(ek=1,Gy.exports=wL()),Gy.exports}var VR=CL();function Gr(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function XR(t){if(k.isValidElement(t)||VR.isValidElementType(t)||!Gr(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=XR(t[n])}),e}function Pi(t,e,n={clone:!0}){const i=n.clone?{...t}:t;return Gr(t)&&Gr(e)&&Object.keys(e).forEach(r=>{k.isValidElement(e[r])||VR.isValidElementType(e[r])?i[r]=e[r]:Gr(e[r])&&Object.prototype.hasOwnProperty.call(t,r)&&Gr(t[r])?i[r]=Pi(t[r],e[r],n):n.clone?i[r]=Gr(e[r])?XR(e[r]):e[r]:i[r]=e[r]}),i}const TL=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,i)=>n.val-i.val),e.reduce((n,i)=>({...n,[i.key]:i.val}),{})};function kL(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:i=5,...r}=t,s=TL(e),a=Object.keys(s);function c(v){return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${n})`}function f(v){return`@media (max-width:${(typeof e[v]=="number"?e[v]:v)-i/100}${n})`}function h(v,b){const O=a.indexOf(b);return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${n}) and (max-width:${(O!==-1&&typeof e[a[O]]=="number"?e[a[O]]:b)-i/100}${n})`}function p(v){return a.indexOf(v)+1<a.length?h(v,a[a.indexOf(v)+1]):c(v)}function m(v){const b=a.indexOf(v);return b===0?c(a[1]):b===a.length-1?f(a[b]):h(v,a[a.indexOf(v)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:c,down:f,between:h,only:p,not:m,unit:n,...r}}function tk(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(i=>i.startsWith("@container")).sort((i,r)=>{const s=/min-width:\s*([0-9.]+)/;return+(i.match(s)?.[1]||0)-+(r.match(s)?.[1]||0)});return n.length?n.reduce((i,r)=>{const s=e[r];return delete i[r],i[r]=s,i},{...e}):e}function EL(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function AL(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,i,r]=n,s=Number.isNaN(+i)?i||0:+i;return t.containerQueries(r).up(s)}function RL(t){const e=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function n(s,a){s.up=(...c)=>e(t.breakpoints.up(...c),a),s.down=(...c)=>e(t.breakpoints.down(...c),a),s.between=(...c)=>e(t.breakpoints.between(...c),a),s.only=(...c)=>e(t.breakpoints.only(...c),a),s.not=(...c)=>{const f=e(t.breakpoints.not(...c),a);return f.includes("not all and")?f.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):f}}const i={},r=s=>(n(i,s),i);return n(r),{...t,containerQueries:r}}const ML={borderRadius:4};function lf(t,e){return e?Pi(t,e,{clone:!1}):t}const jm={xs:0,sm:600,md:900,lg:1200,xl:1536},nk={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${jm[t]}px)`},DL={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:jm[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function Wo(t,e,n){const i=t.theme||{};if(Array.isArray(e)){const s=i.breakpoints||nk;return e.reduce((a,c,f)=>(a[s.up(s.keys[f])]=n(e[f]),a),{})}if(typeof e=="object"){const s=i.breakpoints||nk;return Object.keys(e).reduce((a,c)=>{if(EL(s.keys,c)){const f=AL(i.containerQueries?i:DL,c);f&&(a[f]=n(e[c],c))}else if(Object.keys(s.values||jm).includes(c)){const f=s.up(c);a[f]=n(e[c],c)}else{const f=c;a[f]=e[f]}return a},{})}return n(e)}function PL(t={}){return t.keys?.reduce((n,i)=>{const r=t.up(i);return n[r]={},n},{})||{}}function ik(t,e){return t.reduce((n,i)=>{const r=n[i];return(!r||Object.keys(r).length===0)&&delete n[i],n},e)}function pe(t){if(typeof t!="string")throw new Error(Nl(7));return t.charAt(0).toUpperCase()+t.slice(1)}function Xr(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const i=`vars.${e}`.split(".").reduce((r,s)=>r&&r[s]?r[s]:null,t);if(i!=null)return i}return e.split(".").reduce((i,r)=>i&&i[r]!=null?i[r]:null,t)}function Kp(t,e,n,i=n){let r;return typeof t=="function"?r=t(n):Array.isArray(t)?r=t[n]||i:r=Xr(t,n)||i,e&&(r=e(r,i,t)),r}function rn(t){const{prop:e,cssProperty:n=t.prop,themeKey:i,transform:r}=t,s=a=>{if(a[e]==null)return null;const c=a[e],f=a.theme,h=Xr(f,i)||{};return Wo(a,c,m=>{let v=Kp(h,r,m);return m===v&&typeof m=="string"&&(v=Kp(h,r,`${e}${m==="default"?"":pe(m)}`,m)),n===!1?v:{[n]:v}})};return s.propTypes={},s.filterProps=[e],s}function zL(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const $L={m:"margin",p:"padding"},BL={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},rk={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},LL=zL(t=>{if(t.length>2)if(rk[t])t=rk[t];else return[t];const[e,n]=t.split(""),i=$L[e],r=BL[n]||"";return Array.isArray(r)?r.map(s=>i+s):[i+r]}),nO=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],iO=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...nO,...iO];function td(t,e,n,i){const r=Xr(t,e,!0)??n;return typeof r=="number"||typeof r=="string"?s=>typeof s=="string"?s:typeof r=="string"?r.startsWith("var(")&&s===0?0:r.startsWith("var(")&&s===1?r:`calc(${s} * ${r})`:r*s:Array.isArray(r)?s=>{if(typeof s=="string")return s;const a=Math.abs(s),c=r[a];return s>=0?c:typeof c=="number"?-c:typeof c=="string"&&c.startsWith("var(")?`calc(-1 * ${c})`:`-${c}`}:typeof r=="function"?r:()=>{}}function rO(t){return td(t,"spacing",8)}function nd(t,e){return typeof e=="string"||e==null?e:t(e)}function jL(t,e){return n=>t.reduce((i,r)=>(i[r]=nd(e,n),i),{})}function NL(t,e,n,i){if(!e.includes(n))return null;const r=LL(n),s=jL(r,i),a=t[n];return Wo(t,a,s)}function GR(t,e){const n=rO(t.theme);return Object.keys(t).map(i=>NL(t,e,i,n)).reduce(lf,{})}function Ft(t){return GR(t,nO)}Ft.propTypes={};Ft.filterProps=nO;function Yt(t){return GR(t,iO)}Yt.propTypes={};Yt.filterProps=iO;function FR(t=8,e=rO({spacing:t})){if(t.mui)return t;const n=(...i)=>(i.length===0?[1]:i).map(s=>{const a=e(s);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function Nm(...t){const e=t.reduce((i,r)=>(r.filterProps.forEach(s=>{i[s]=r}),i),{}),n=i=>Object.keys(i).reduce((r,s)=>e[s]?lf(r,e[s](i)):r,{});return n.propTypes={},n.filterProps=t.reduce((i,r)=>i.concat(r.filterProps),[]),n}function Zi(t){return typeof t!="number"?t:`${t}px solid`}function ur(t,e){return rn({prop:t,themeKey:"borders",transform:e})}const QL=ur("border",Zi),_L=ur("borderTop",Zi),qL=ur("borderRight",Zi),IL=ur("borderBottom",Zi),HL=ur("borderLeft",Zi),UL=ur("borderColor"),WL=ur("borderTopColor"),VL=ur("borderRightColor"),XL=ur("borderBottomColor"),GL=ur("borderLeftColor"),FL=ur("outline",Zi),YL=ur("outlineColor"),Qm=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=td(t.theme,"shape.borderRadius",4),n=i=>({borderRadius:nd(e,i)});return Wo(t,t.borderRadius,n)}return null};Qm.propTypes={};Qm.filterProps=["borderRadius"];Nm(QL,_L,qL,IL,HL,UL,WL,VL,XL,GL,Qm,FL,YL);const _m=t=>{if(t.gap!==void 0&&t.gap!==null){const e=td(t.theme,"spacing",8),n=i=>({gap:nd(e,i)});return Wo(t,t.gap,n)}return null};_m.propTypes={};_m.filterProps=["gap"];const qm=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=td(t.theme,"spacing",8),n=i=>({columnGap:nd(e,i)});return Wo(t,t.columnGap,n)}return null};qm.propTypes={};qm.filterProps=["columnGap"];const Im=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=td(t.theme,"spacing",8),n=i=>({rowGap:nd(e,i)});return Wo(t,t.rowGap,n)}return null};Im.propTypes={};Im.filterProps=["rowGap"];const KL=rn({prop:"gridColumn"}),ZL=rn({prop:"gridRow"}),JL=rn({prop:"gridAutoFlow"}),ej=rn({prop:"gridAutoColumns"}),tj=rn({prop:"gridAutoRows"}),nj=rn({prop:"gridTemplateColumns"}),ij=rn({prop:"gridTemplateRows"}),rj=rn({prop:"gridTemplateAreas"}),oj=rn({prop:"gridArea"});Nm(_m,qm,Im,KL,ZL,JL,ej,tj,nj,ij,rj,oj);function Ka(t,e){return e==="grey"?e:t}const sj=rn({prop:"color",themeKey:"palette",transform:Ka}),lj=rn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ka}),aj=rn({prop:"backgroundColor",themeKey:"palette",transform:Ka});Nm(sj,lj,aj);function Ai(t){return t<=1&&t!==0?`${t*100}%`:t}const cj=rn({prop:"width",transform:Ai}),oO=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{const i=t.theme?.breakpoints?.values?.[n]||jm[n];return i?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Ai(n)}};return Wo(t,t.maxWidth,e)}return null};oO.filterProps=["maxWidth"];const uj=rn({prop:"minWidth",transform:Ai}),fj=rn({prop:"height",transform:Ai}),dj=rn({prop:"maxHeight",transform:Ai}),hj=rn({prop:"minHeight",transform:Ai});rn({prop:"size",cssProperty:"width",transform:Ai});rn({prop:"size",cssProperty:"height",transform:Ai});const pj=rn({prop:"boxSizing"});Nm(cj,oO,uj,fj,dj,hj,pj);const id={border:{themeKey:"borders",transform:Zi},borderTop:{themeKey:"borders",transform:Zi},borderRight:{themeKey:"borders",transform:Zi},borderBottom:{themeKey:"borders",transform:Zi},borderLeft:{themeKey:"borders",transform:Zi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Zi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Qm},color:{themeKey:"palette",transform:Ka},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ka},backgroundColor:{themeKey:"palette",transform:Ka},p:{style:Yt},pt:{style:Yt},pr:{style:Yt},pb:{style:Yt},pl:{style:Yt},px:{style:Yt},py:{style:Yt},padding:{style:Yt},paddingTop:{style:Yt},paddingRight:{style:Yt},paddingBottom:{style:Yt},paddingLeft:{style:Yt},paddingX:{style:Yt},paddingY:{style:Yt},paddingInline:{style:Yt},paddingInlineStart:{style:Yt},paddingInlineEnd:{style:Yt},paddingBlock:{style:Yt},paddingBlockStart:{style:Yt},paddingBlockEnd:{style:Yt},m:{style:Ft},mt:{style:Ft},mr:{style:Ft},mb:{style:Ft},ml:{style:Ft},mx:{style:Ft},my:{style:Ft},margin:{style:Ft},marginTop:{style:Ft},marginRight:{style:Ft},marginBottom:{style:Ft},marginLeft:{style:Ft},marginX:{style:Ft},marginY:{style:Ft},marginInline:{style:Ft},marginInlineStart:{style:Ft},marginInlineEnd:{style:Ft},marginBlock:{style:Ft},marginBlockStart:{style:Ft},marginBlockEnd:{style:Ft},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:_m},rowGap:{style:Im},columnGap:{style:qm},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ai},maxWidth:{style:oO},minWidth:{transform:Ai},height:{transform:Ai},maxHeight:{transform:Ai},minHeight:{transform:Ai},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function mj(...t){const e=t.reduce((i,r)=>i.concat(Object.keys(r)),[]),n=new Set(e);return t.every(i=>n.size===Object.keys(i).length)}function gj(t,e){return typeof t=="function"?t(e):t}function yj(){function t(n,i,r,s){const a={[n]:i,theme:r},c=s[n];if(!c)return{[n]:i};const{cssProperty:f=n,themeKey:h,transform:p,style:m}=c;if(i==null)return null;if(h==="typography"&&i==="inherit")return{[n]:i};const v=Xr(r,h)||{};return m?m(a):Wo(a,i,O=>{let S=Kp(v,p,O);return O===S&&typeof O=="string"&&(S=Kp(v,p,`${n}${O==="default"?"":pe(O)}`,O)),f===!1?S:{[f]:S}})}function e(n){const{sx:i,theme:r={},nested:s}=n||{};if(!i)return null;const a=r.unstable_sxConfig??id;function c(f){let h=f;if(typeof f=="function")h=f(r);else if(typeof f!="object")return f;if(!h)return null;const p=PL(r.breakpoints),m=Object.keys(p);let v=p;return Object.keys(h).forEach(b=>{const O=gj(h[b],r);if(O!=null)if(typeof O=="object")if(a[b])v=lf(v,t(b,O,r,a));else{const S=Wo({theme:r},O,C=>({[b]:C}));mj(S,O)?v[b]=e({sx:O,theme:r,nested:!0}):v=lf(v,S)}else v=lf(v,t(b,O,r,a))}),!s&&r.modularCssLayers?{"@layer sx":tk(r,ik(m,v))}:tk(r,ik(m,v))}return Array.isArray(i)?i.map(c):c(i)}return e}const js=yj();js.filterProps=["sx"];function vj(t,e){const n=this;if(n.vars){if(!n.colorSchemes?.[t]||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(t);return i==="&"?e:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:e})}return n.palette.mode===t?e:{}}function Hm(t={},...e){const{breakpoints:n={},palette:i={},spacing:r,shape:s={},...a}=t,c=kL(n),f=FR(r);let h=Pi({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...i},spacing:f,shape:{...ML,...s}},a);return h=RL(h),h.applyStyles=vj,h=e.reduce((p,m)=>Pi(p,m),h),h.unstable_sxConfig={...id,...a?.unstable_sxConfig},h.unstable_sx=function(m){return js({sx:m,theme:this})},h}function bj(t){return Object.keys(t).length===0}function Um(t=null){const e=k.useContext(Jf);return!e||bj(e)?t:e}const Oj=Hm();function rd(t=Oj){return Um(t)}function Fy(t){const e=zs(t);return t!==e&&e.styles?(e.styles.match(/^@layer\s+[^{]*$/)||(e.styles=`@layer global{${e.styles}}`),e):t}function YR({styles:t,themeId:e,defaultTheme:n={}}){const i=rd(n),r=e&&i[e]||i;let s=typeof t=="function"?t(r):t;return r.modularCssLayers&&(Array.isArray(s)?s=s.map(a=>Fy(typeof a=="function"?a(r):a)):s=Fy(s)),x.jsx(UR,{styles:s})}const xj=t=>{const e={systemProps:{},otherProps:{}},n=t?.theme?.unstable_sxConfig??id;return Object.keys(t).forEach(i=>{n[i]?e.systemProps[i]=t[i]:e.otherProps[i]=t[i]}),e};function sO(t){const{sx:e,...n}=t,{systemProps:i,otherProps:r}=xj(n);let s;return Array.isArray(e)?s=[i,...e]:typeof e=="function"?s=(...a)=>{const c=e(...a);return Gr(c)?{...i,...c}:i}:s={...i,...e},{...r,sx:s}}const ok=t=>t,Sj=()=>{let t=ok;return{configure(e){t=e},generate(e){return t(e)},reset(){t=ok}}},KR=Sj();function ZR(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=ZR(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ye(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=ZR(t))&&(i&&(i+=" "),i+=e);return i}function wj(t={}){const{themeId:e,defaultTheme:n,defaultClassName:i="MuiBox-root",generateClassName:r}=t,s=WR("div",{shouldForwardProp:c=>c!=="theme"&&c!=="sx"&&c!=="as"})(js);return k.forwardRef(function(f,h){const p=rd(n),{className:m,component:v="div",...b}=sO(f);return x.jsx(s,{as:v,ref:h,className:ye(m,r?r(i):i),theme:e&&p[e]||p,...b})})}const Cj={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function He(t,e,n="Mui"){const i=Cj[e];return i?`${n}-${i}`:`${KR.generate(t)}-${e}`}function Ue(t,e,n="Mui"){const i={};return e.forEach(r=>{i[r]=He(t,r,n)}),i}function JR(t){const{variants:e,...n}=t,i={variants:e,style:zs(n),isProcessed:!0};return i.style===n||e&&e.forEach(r=>{typeof r.style!="function"&&(r.style=zs(r.style))}),i}const Tj=Hm();function Yy(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function kl(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function kj(t){return t?(e,n)=>n[t]:null}function Ej(t,e,n){t.theme=Rj(t.theme)?n:t.theme[e]||t.theme}function Mp(t,e,n){const i=typeof e=="function"?e(t):e;if(Array.isArray(i))return i.flatMap(r=>Mp(t,r,n));if(Array.isArray(i?.variants)){let r;if(i.isProcessed)r=n?kl(i.style,n):i.style;else{const{variants:s,...a}=i;r=n?kl(zs(a),n):a}return eM(t,i.variants,[r],n)}return i?.isProcessed?n?kl(zs(i.style),n):i.style:n?kl(zs(i),n):i}function eM(t,e,n=[],i=void 0){let r;e:for(let s=0;s<e.length;s+=1){const a=e[s];if(typeof a.props=="function"){if(r??={...t,...t.ownerState,ownerState:t.ownerState},!a.props(r))continue}else for(const c in a.props)if(t[c]!==a.props[c]&&t.ownerState?.[c]!==a.props[c])continue e;typeof a.style=="function"?(r??={...t,...t.ownerState,ownerState:t.ownerState},n.push(i?kl(zs(a.style(r)),i):a.style(r))):n.push(i?kl(zs(a.style),i):a.style)}return n}function tM(t={}){const{themeId:e,defaultTheme:n=Tj,rootShouldForwardProp:i=Yy,slotShouldForwardProp:r=Yy}=t;function s(c){Ej(c,e,n)}return(c,f={})=>{SL(c,L=>L.filter(M=>M!==js));const{name:h,slot:p,skipVariantsResolver:m,skipSx:v,overridesResolver:b=kj(Dj(p)),...O}=f,S=h&&h.startsWith("Mui")||p?"components":"custom",C=m!==void 0?m:p&&p!=="Root"&&p!=="root"||!1,E=v||!1;let $=Yy;p==="Root"||p==="root"?$=i:p?$=r:Mj(c)&&($=void 0);const z=WR(c,{shouldForwardProp:$,label:Aj(),...O}),P=L=>{if(L.__emotion_real===L)return L;if(typeof L=="function")return function(B){return Mp(B,L,B.theme.modularCssLayers?S:void 0)};if(Gr(L)){const M=JR(L);return function(_){return M.variants?Mp(_,M,_.theme.modularCssLayers?S:void 0):_.theme.modularCssLayers?kl(M.style,S):M.style}}return L},R=(...L)=>{const M=[],B=L.map(P),_=[];if(M.push(s),h&&b&&_.push(function(H){const V=H.theme.components?.[h]?.styleOverrides;if(!V)return null;const N={};for(const X in V)N[X]=Mp(H,V[X],H.theme.modularCssLayers?"theme":void 0);return b(H,N)}),h&&!C&&_.push(function(H){const V=H.theme?.components?.[h]?.variants;return V?eM(H,V,[],H.theme.modularCssLayers?"theme":void 0):null}),E||_.push(js),Array.isArray(B[0])){const T=B.shift(),H=new Array(M.length).fill(""),I=new Array(_.length).fill("");let V;V=[...H,...T,...I],V.raw=[...H,...T.raw,...I],M.unshift(V)}const A=[...M,...B,..._],Q=z(...A);return c.muiName&&(Q.muiName=c.muiName),Q};return z.withConfig&&(R.withConfig=z.withConfig),R}}function Aj(t,e){return void 0}function Rj(t){for(const e in t)return!1;return!0}function Mj(t){return typeof t=="string"&&t.charCodeAt(0)>96}function Dj(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const Pj=tM();function Cf(t,e,n=!1){const i={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=r;if(s==="components"||s==="slots")i[s]={...t[s],...i[s]};else if(s==="componentsProps"||s==="slotProps"){const a=t[s],c=e[s];if(!c)i[s]=a||{};else if(!a)i[s]=c;else{i[s]={...c};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const h=f;i[s][h]=Cf(a[h],c[h],n)}}}else s==="className"&&n&&e.className?i.className=ye(t?.className,e?.className):s==="style"&&n&&e.style?i.style={...t?.style,...e?.style}:i[s]===void 0&&(i[s]=t[s])}return i}function nM(t){const{theme:e,name:n,props:i}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?i:Cf(e.components[n].defaultProps,i)}function zj({props:t,name:e,defaultTheme:n,themeId:i}){let r=rd(n);return i&&(r=r[i]||r),nM({theme:r,name:e,props:t})}const sr=typeof window<"u"?k.useLayoutEffect:k.useEffect;function $j(t,e,n,i,r){const[s,a]=k.useState(()=>r&&n?n(t).matches:i?i(t).matches:e);return sr(()=>{if(!n)return;const c=n(t),f=()=>{a(c.matches)};return f(),c.addEventListener("change",f),()=>{c.removeEventListener("change",f)}},[t,n]),s}const Bj={...Gp},iM=Bj.useSyncExternalStore;function Lj(t,e,n,i,r){const s=k.useCallback(()=>e,[e]),a=k.useMemo(()=>{if(r&&n)return()=>n(t).matches;if(i!==null){const{matches:p}=i(t);return()=>p}return s},[s,t,i,r,n]),[c,f]=k.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const p=n(t);return[()=>p.matches,m=>(p.addEventListener("change",m),()=>{p.removeEventListener("change",m)})]},[s,n,t]);return iM(f,c,a)}function rM(t={}){const{themeId:e}=t;return function(i,r={}){let s=Um();s&&e&&(s=s[e]||s);const a=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:c=!1,matchMedia:f=a?window.matchMedia:null,ssrMatchMedia:h=null,noSsr:p=!1}=nM({name:"MuiUseMediaQuery",props:r,theme:s});let m=typeof i=="function"?i(s):i;return m=m.replace(/^@media( ?)/m,""),m.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
10
+ `)),(iM!==void 0?Lj:$j)(m,c,f,h,p)}}rM();function jj(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function lO(t,e=0,n=1){return jj(t,e,n)}function Nj(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(i=>i+i)),n?`rgb${n.length===4?"a":""}(${n.map((i,r)=>r<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function Ns(t){if(t.type)return t;if(t.charAt(0)==="#")return Ns(Nj(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Nl(9,t));let i=t.substring(e+1,t.length-1),r;if(n==="color"){if(i=i.split(" "),r=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(Nl(10,r))}else i=i.split(",");return i=i.map(s=>parseFloat(s)),{type:n,values:i,colorSpace:r}}const Qj=t=>{const e=Ns(t);return e.values.slice(0,3).map((n,i)=>e.type.includes("hsl")&&i!==0?`${n}%`:n).join(" ")},Fu=(t,e)=>{try{return Qj(t)}catch{return t}};function Wm(t){const{type:e,colorSpace:n}=t;let{values:i}=t;return e.includes("rgb")?i=i.map((r,s)=>s<3?parseInt(r,10):r):e.includes("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),e.includes("color")?i=`${n} ${i.join(" ")}`:i=`${i.join(", ")}`,`${e}(${i})`}function oM(t){t=Ns(t);const{values:e}=t,n=e[0],i=e[1]/100,r=e[2]/100,s=i*Math.min(r,1-r),a=(h,p=(h+n/30)%12)=>r-s*Math.max(Math.min(p-3,9-p,1),-1);let c="rgb";const f=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return t.type==="hsla"&&(c+="a",f.push(e[3])),Wm({type:c,values:f})}function Eb(t){t=Ns(t);let e=t.type==="hsl"||t.type==="hsla"?Ns(oM(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function _j(t,e){const n=Eb(t),i=Eb(e);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}function Tf(t,e){return t=Ns(t),e=lO(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,Wm(t)}function hl(t,e,n){try{return Tf(t,e)}catch{return t}}function Vm(t,e){if(t=Ns(t),e=lO(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return Wm(t)}function St(t,e,n){try{return Vm(t,e)}catch{return t}}function Xm(t,e){if(t=Ns(t),e=lO(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return Wm(t)}function wt(t,e,n){try{return Xm(t,e)}catch{return t}}function qj(t,e=.15){return Eb(t)>.5?Vm(t,e):Xm(t,e)}function Mh(t,e,n){try{return qj(t,e)}catch{return t}}const sM=k.createContext(null);function aO(){return k.useContext(sM)}const Ij=typeof Symbol=="function"&&Symbol.for,Hj=Ij?Symbol.for("mui.nested"):"__THEME_NESTED__";function Uj(t,e){return typeof e=="function"?e(t):{...t,...e}}function Wj(t){const{children:e,theme:n}=t,i=aO(),r=k.useMemo(()=>{const s=i===null?{...n}:Uj(i,n);return s!=null&&(s[Hj]=i!==null),s},[n,i]);return x.jsx(sM.Provider,{value:r,children:e})}const lM=k.createContext();function Vj({value:t,...e}){return x.jsx(lM.Provider,{value:t??!0,...e})}const Tc=()=>k.useContext(lM)??!1,aM=k.createContext(void 0);function Xj({value:t,children:e}){return x.jsx(aM.Provider,{value:t,children:e})}function Gj(t){const{theme:e,name:n,props:i}=t;if(!e||!e.components||!e.components[n])return i;const r=e.components[n];return r.defaultProps?Cf(r.defaultProps,i,e.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?Cf(r,i,e.components.mergeClassNameAndStyle):i}function Fj({props:t,name:e}){const n=k.useContext(aM);return Gj({props:t,name:e,theme:{components:n}})}let sk=0;function Yj(t){const[e,n]=k.useState(t),i=t||e;return k.useEffect(()=>{e==null&&(sk+=1,n(`mui-${sk}`))},[e]),i}const Kj={...Gp},lk=Kj.useId;function Gm(t){if(lk!==void 0){const e=lk();return t??e}return Yj(t)}function Zj(t){const e=Um(),n=Gm()||"",{modularCssLayers:i}=t;let r="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!i||e!==null?r="":typeof i=="string"?r=i.replace(/mui(?!\.)/g,r):r=`@layer ${r};`,sr(()=>{const s=document.querySelector("head");if(!s)return;const a=s.firstChild;if(r){if(a&&a.hasAttribute?.("data-mui-layer-order")&&a.getAttribute("data-mui-layer-order")===n)return;const c=document.createElement("style");c.setAttribute("data-mui-layer-order",n),c.textContent=r,s.prepend(c)}else s.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[r,n]),r?x.jsx(YR,{styles:r}):null}const ak={};function ck(t,e,n,i=!1){return k.useMemo(()=>{const r=t&&e[t]||e;if(typeof n=="function"){const s=n(r),a=t?{...e,[t]:s}:s;return i?()=>a:a}return t?{...e,[t]:n}:{...e,...n}},[t,e,n,i])}function cM(t){const{children:e,theme:n,themeId:i}=t,r=Um(ak),s=aO()||ak,a=ck(i,r,n),c=ck(i,s,n,!0),f=(i?a[i]:a).direction==="rtl",h=Zj(a);return x.jsx(Wj,{theme:c,children:x.jsx(Jf.Provider,{value:a,children:x.jsx(Vj,{value:f,children:x.jsxs(Xj,{value:i?a[i].components:a.components,children:[h,e]})})})})}const uk={theme:void 0};function Jj(t){let e,n;return function(r){let s=e;return(s===void 0||r.theme!==n)&&(uk.theme=r.theme,s=JR(t(uk)),e=s,n=r.theme),s}}const cO="mode",uO="color-scheme",eN="data-color-scheme";function tN(t){const{defaultMode:e="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:i="dark",modeStorageKey:r=cO,colorSchemeStorageKey:s=uO,attribute:a=eN,colorSchemeNode:c="document.documentElement",nonce:f}=t||{};let h="",p=a;if(a==="class"&&(p=".%s"),a==="data"&&(p="[data-%s]"),p.startsWith(".")){const v=p.substring(1);h+=`${c}.classList.remove('${v}'.replace('%s', light), '${v}'.replace('%s', dark));
11
+ ${c}.classList.add('${v}'.replace('%s', colorScheme));`}const m=p.match(/\[([^[\]]+)\]/);if(m){const[v,b]=m[1].split("=");b||(h+=`${c}.removeAttribute('${v}'.replace('%s', light));
12
+ ${c}.removeAttribute('${v}'.replace('%s', dark));`),h+=`
13
+ ${c}.setAttribute('${v}'.replace('%s', colorScheme), ${b?`${b}.replace('%s', colorScheme)`:'""'});`}else p!==".%s"&&(h+=`${c}.setAttribute('${p}', colorScheme);`);return x.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(function() {
14
+ try {
15
+ let colorScheme = '';
16
+ const mode = localStorage.getItem('${r}') || '${e}';
17
+ const dark = localStorage.getItem('${s}-dark') || '${i}';
18
+ const light = localStorage.getItem('${s}-light') || '${n}';
19
+ if (mode === 'system') {
20
+ // handle system mode
21
+ const mql = window.matchMedia('(prefers-color-scheme: dark)');
22
+ if (mql.matches) {
23
+ colorScheme = dark
24
+ } else {
25
+ colorScheme = light
26
+ }
27
+ }
28
+ if (mode === 'light') {
29
+ colorScheme = light;
30
+ }
31
+ if (mode === 'dark') {
32
+ colorScheme = dark;
33
+ }
34
+ if (colorScheme) {
35
+ ${h}
36
+ }
37
+ } catch(e){}})();`}},"mui-color-scheme-init")}function nN(){}const iN=({key:t,storageWindow:e})=>(!e&&typeof window<"u"&&(e=window),{get(n){if(typeof window>"u")return;if(!e)return n;let i;try{i=e.localStorage.getItem(t)}catch{}return i||n},set:n=>{if(e)try{e.localStorage.setItem(t,n)}catch{}},subscribe:n=>{if(!e)return nN;const i=r=>{const s=r.newValue;r.key===t&&n(s)};return e.addEventListener("storage",i),()=>{e.removeEventListener("storage",i)}}});function Ky(){}function fk(t){if(typeof window<"u"&&typeof window.matchMedia=="function"&&t==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function uM(t,e){if(t.mode==="light"||t.mode==="system"&&t.systemMode==="light")return e("light");if(t.mode==="dark"||t.mode==="system"&&t.systemMode==="dark")return e("dark")}function rN(t){return uM(t,e=>{if(e==="light")return t.lightColorScheme;if(e==="dark")return t.darkColorScheme})}function oN(t){const{defaultMode:e="light",defaultLightColorScheme:n,defaultDarkColorScheme:i,supportedColorSchemes:r=[],modeStorageKey:s=cO,colorSchemeStorageKey:a=uO,storageWindow:c=typeof window>"u"?void 0:window,storageManager:f=iN,noSsr:h=!1}=t,p=r.join(","),m=r.length>1,v=k.useMemo(()=>f?.({key:s,storageWindow:c}),[f,s,c]),b=k.useMemo(()=>f?.({key:`${a}-light`,storageWindow:c}),[f,a,c]),O=k.useMemo(()=>f?.({key:`${a}-dark`,storageWindow:c}),[f,a,c]),[S,C]=k.useState(()=>{const B=v?.get(e)||e,_=b?.get(n)||n,A=O?.get(i)||i;return{mode:B,systemMode:fk(B),lightColorScheme:_,darkColorScheme:A}}),[E,$]=k.useState(h||!m);k.useEffect(()=>{$(!0)},[]);const z=rN(S),P=k.useCallback(B=>{C(_=>{if(B===_.mode)return _;const A=B??e;return v?.set(A),{..._,mode:A,systemMode:fk(A)}})},[v,e]),R=k.useCallback(B=>{B?typeof B=="string"?B&&!p.includes(B)?console.error(`\`${B}\` does not exist in \`theme.colorSchemes\`.`):C(_=>{const A={..._};return uM(_,Q=>{Q==="light"&&(b?.set(B),A.lightColorScheme=B),Q==="dark"&&(O?.set(B),A.darkColorScheme=B)}),A}):C(_=>{const A={..._},Q=B.light===null?n:B.light,T=B.dark===null?i:B.dark;return Q&&(p.includes(Q)?(A.lightColorScheme=Q,b?.set(Q)):console.error(`\`${Q}\` does not exist in \`theme.colorSchemes\`.`)),T&&(p.includes(T)?(A.darkColorScheme=T,O?.set(T)):console.error(`\`${T}\` does not exist in \`theme.colorSchemes\`.`)),A}):C(_=>(b?.set(n),O?.set(i),{..._,lightColorScheme:n,darkColorScheme:i}))},[p,b,O,n,i]),L=k.useCallback(B=>{S.mode==="system"&&C(_=>{const A=B?.matches?"dark":"light";return _.systemMode===A?_:{..._,systemMode:A}})},[S.mode]),M=k.useRef(L);return M.current=L,k.useEffect(()=>{if(typeof window.matchMedia!="function"||!m)return;const B=(...A)=>M.current(...A),_=window.matchMedia("(prefers-color-scheme: dark)");return _.addListener(B),B(_),()=>{_.removeListener(B)}},[m]),k.useEffect(()=>{if(m){const B=v?.subscribe(Q=>{(!Q||["light","dark","system"].includes(Q))&&P(Q||e)})||Ky,_=b?.subscribe(Q=>{(!Q||p.match(Q))&&R({light:Q})})||Ky,A=O?.subscribe(Q=>{(!Q||p.match(Q))&&R({dark:Q})})||Ky;return()=>{B(),_(),A()}}},[R,P,p,e,c,m,v,b,O]),{...S,mode:E?S.mode:void 0,systemMode:E?S.systemMode:void 0,colorScheme:E?z:void 0,setMode:P,setColorScheme:R}}const sN="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function lN(t){const{themeId:e,theme:n={},modeStorageKey:i=cO,colorSchemeStorageKey:r=uO,disableTransitionOnChange:s=!1,defaultColorScheme:a,resolveTheme:c}=t,f={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},h=k.createContext(void 0),p=()=>k.useContext(h)||f,m={},v={};function b(E){const{children:$,theme:z,modeStorageKey:P=i,colorSchemeStorageKey:R=r,disableTransitionOnChange:L=s,storageManager:M,storageWindow:B=typeof window>"u"?void 0:window,documentNode:_=typeof document>"u"?void 0:document,colorSchemeNode:A=typeof document>"u"?void 0:document.documentElement,disableNestedContext:Q=!1,disableStyleSheetGeneration:T=!1,defaultMode:H="system",forceThemeRerender:I=!1,noSsr:V}=E,N=k.useRef(!1),X=aO(),Y=k.useContext(h),K=!!Y&&!Q,le=k.useMemo(()=>z||(typeof n=="function"?n():n),[z]),q=le[e],G=q||le,{colorSchemes:se=m,components:ue=v,cssVarPrefix:Z}=G,ie=Object.keys(se).filter(Wt=>!!se[Wt]).join(","),de=k.useMemo(()=>ie.split(","),[ie]),Te=typeof a=="string"?a:a.light,Ae=typeof a=="string"?a:a.dark,ke=se[Te]&&se[Ae]?H:se[G.defaultColorScheme]?.palette?.mode||G.palette?.mode,{mode:Me,setMode:Re,systemMode:vt,lightColorScheme:Be,darkColorScheme:Se,colorScheme:Xe,setColorScheme:$e}=oN({supportedColorSchemes:de,defaultLightColorScheme:Te,defaultDarkColorScheme:Ae,modeStorageKey:P,colorSchemeStorageKey:R,defaultMode:ke,storageManager:M,storageWindow:B,noSsr:V});let je=Me,Ie=Xe;K&&(je=Y.mode,Ie=Y.colorScheme);let at=Ie||G.defaultColorScheme;G.vars&&!I&&(at=G.defaultColorScheme);const Ye=k.useMemo(()=>{const Wt=G.generateThemeVars?.()||G.vars,ut={...G,components:ue,colorSchemes:se,cssVarPrefix:Z,vars:Wt};if(typeof ut.generateSpacing=="function"&&(ut.spacing=ut.generateSpacing()),at){const jt=se[at];jt&&typeof jt=="object"&&Object.keys(jt).forEach(on=>{jt[on]&&typeof jt[on]=="object"?ut[on]={...ut[on],...jt[on]}:ut[on]=jt[on]})}return c?c(ut):ut},[G,at,ue,se,Z]),Ee=G.colorSchemeSelector;sr(()=>{if(Ie&&A&&Ee&&Ee!=="media"){const Wt=Ee;let ut=Ee;if(Wt==="class"&&(ut=".%s"),Wt==="data"&&(ut="[data-%s]"),Wt?.startsWith("data-")&&!Wt.includes("%s")&&(ut=`[${Wt}="%s"]`),ut.startsWith("."))A.classList.remove(...de.map(jt=>ut.substring(1).replace("%s",jt))),A.classList.add(ut.substring(1).replace("%s",Ie));else{const jt=ut.replace("%s",Ie).match(/\[([^\]]+)\]/);if(jt){const[on,Bi]=jt[1].split("=");Bi||de.forEach(wn=>{A.removeAttribute(on.replace(Ie,wn))}),A.setAttribute(on,Bi?Bi.replace(/"|'/g,""):"")}else A.setAttribute(ut,Ie)}}},[Ie,Ee,A,de]),k.useEffect(()=>{let Wt;if(L&&N.current&&_){const ut=_.createElement("style");ut.appendChild(_.createTextNode(sN)),_.head.appendChild(ut),window.getComputedStyle(_.body),Wt=setTimeout(()=>{_.head.removeChild(ut)},1)}return()=>{clearTimeout(Wt)}},[Ie,L,_]),k.useEffect(()=>(N.current=!0,()=>{N.current=!1}),[]);const $i=k.useMemo(()=>({allColorSchemes:de,colorScheme:Ie,darkColorScheme:Se,lightColorScheme:Be,mode:je,setColorScheme:$e,setMode:Re,systemMode:vt}),[de,Ie,Se,Be,je,$e,Re,vt,Ye.colorSchemeSelector]);let Lt=!0;(T||G.cssVariables===!1||K&&X?.cssVarPrefix===Z)&&(Lt=!1);const hr=x.jsxs(k.Fragment,{children:[x.jsx(cM,{themeId:q?e:void 0,theme:Ye,children:$}),Lt&&x.jsx(UR,{styles:Ye.generateStyleSheets?.()||[]})]});return K?hr:x.jsx(h.Provider,{value:$i,children:hr})}const O=typeof a=="string"?a:a.light,S=typeof a=="string"?a:a.dark;return{CssVarsProvider:b,useColorScheme:p,getInitColorSchemeScript:E=>tN({colorSchemeStorageKey:r,defaultLightColorScheme:O,defaultDarkColorScheme:S,modeStorageKey:i,...E})}}function aN(t=""){function e(...i){if(!i.length)return"";const r=i[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${r}${e(...i.slice(1))})`:`, ${r}`}return(i,...r)=>`var(--${t?`${t}-`:""}${i}${e(...r)})`}const dk=(t,e,n,i=[])=>{let r=t;e.forEach((s,a)=>{a===e.length-1?Array.isArray(r)?r[Number(s)]=n:r&&typeof r=="object"&&(r[s]=n):r&&typeof r=="object"&&(r[s]||(r[s]=i.includes(s)?[]:{}),r=r[s])})},cN=(t,e,n)=>{function i(r,s=[],a=[]){Object.entries(r).forEach(([c,f])=>{(!n||n&&!n([...s,c]))&&f!=null&&(typeof f=="object"&&Object.keys(f).length>0?i(f,[...s,c],Array.isArray(f)?[...a,c]:a):e([...s,c],f,a))})}i(t)},uN=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(i=>t.includes(i))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function Zy(t,e){const{prefix:n,shouldSkipGeneratingVar:i}=e||{},r={},s={},a={};return cN(t,(c,f,h)=>{if((typeof f=="string"||typeof f=="number")&&(!i||!i(c,f))){const p=`--${n?`${n}-`:""}${c.join("-")}`,m=uN(c,f);Object.assign(r,{[p]:m}),dk(s,c,`var(${p})`,h),dk(a,c,`var(${p}, ${m})`,h)}},c=>c[0]==="vars"),{css:r,vars:s,varsWithDefaults:a}}function fN(t,e={}){const{getSelector:n=E,disableCssColorScheme:i,colorSchemeSelector:r,enableContrastVars:s}=e,{colorSchemes:a={},components:c,defaultColorScheme:f="light",...h}=t,{vars:p,css:m,varsWithDefaults:v}=Zy(h,e);let b=v;const O={},{[f]:S,...C}=a;if(Object.entries(C||{}).forEach(([P,R])=>{const{vars:L,css:M,varsWithDefaults:B}=Zy(R,e);b=Pi(b,B),O[P]={css:M,vars:L}}),S){const{css:P,vars:R,varsWithDefaults:L}=Zy(S,e);b=Pi(b,L),O[f]={css:P,vars:R}}function E(P,R){let L=r;if(r==="class"&&(L=".%s"),r==="data"&&(L="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(L=`[${r}="%s"]`),P){if(L==="media")return t.defaultColorScheme===P?":root":{[`@media (prefers-color-scheme: ${a[P]?.palette?.mode||P})`]:{":root":R}};if(L)return t.defaultColorScheme===P?`:root, ${L.replace("%s",String(P))}`:L.replace("%s",String(P))}return":root"}return{vars:b,generateThemeVars:()=>{let P={...p};return Object.entries(O).forEach(([,{vars:R}])=>{P=Pi(P,R)}),P},generateStyleSheets:()=>{const P=[],R=t.defaultColorScheme||"light";function L(_,A){Object.keys(A).length&&P.push(typeof _=="string"?{[_]:{...A}}:_)}L(n(void 0,{...m}),m);const{[R]:M,...B}=O;if(M){const{css:_}=M,A=a[R]?.palette?.mode,Q=!i&&A?{colorScheme:A,..._}:{..._};L(n(R,{...Q}),Q)}return Object.entries(B).forEach(([_,{css:A}])=>{const Q=a[_]?.palette?.mode,T=!i&&Q?{colorScheme:Q,...A}:{...A};L(n(_,{...T}),T)}),s&&P.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),P}}}function dN(t){return function(n){return t==="media"?`@media (prefers-color-scheme: ${n})`:t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}function Ve(t,e,n=void 0){const i={};for(const r in t){const s=t[r];let a="",c=!0;for(let f=0;f<s.length;f+=1){const h=s[f];h&&(a+=(c===!0?"":" ")+e(h),c=!1,n&&n[h]&&(a+=" "+n[h]))}i[r]=a}return i}function fM(t,e){return k.isValidElement(t)&&e.indexOf(t.type.muiName??t.type?._payload?.value?.muiName)!==-1}const hN=(t,e)=>t.filter(n=>e.includes(n)),kc=(t,e,n)=>{const i=t.keys[0];Array.isArray(e)?e.forEach((r,s)=>{n((a,c)=>{s<=t.keys.length-1&&(s===0?Object.assign(a,c):a[t.up(t.keys[s])]=c)},r)}):e&&typeof e=="object"?(Object.keys(e).length>t.keys.length?t.keys:hN(t.keys,Object.keys(e))).forEach(s=>{if(t.keys.includes(s)){const a=e[s];a!==void 0&&n((c,f)=>{i===s?Object.assign(c,f):c[t.up(s)]=f},a)}}):(typeof e=="number"||typeof e=="string")&&n((r,s)=>{Object.assign(r,s)},e)};function Zp(t){return`--Grid-${t}Spacing`}function Fm(t){return`--Grid-parent-${t}Spacing`}const hk="--Grid-columns",Za="--Grid-parent-columns",pN=({theme:t,ownerState:e})=>{const n={};return kc(t.breakpoints,e.size,(i,r)=>{let s={};r==="grow"&&(s={flexBasis:0,flexGrow:1,maxWidth:"100%"}),r==="auto"&&(s={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof r=="number"&&(s={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${r} / var(${Za}) - (var(${Za}) - ${r}) * (var(${Fm("column")}) / var(${Za})))`}),i(n,s)}),n},mN=({theme:t,ownerState:e})=>{const n={};return kc(t.breakpoints,e.offset,(i,r)=>{let s={};r==="auto"&&(s={marginLeft:"auto"}),typeof r=="number"&&(s={marginLeft:r===0?"0px":`calc(100% * ${r} / var(${Za}) + var(${Fm("column")}) * ${r} / var(${Za}))`}),i(n,s)}),n},gN=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={[hk]:12};return kc(t.breakpoints,e.columns,(i,r)=>{const s=r??12;i(n,{[hk]:s,"> *":{[Za]:s}})}),n},yN=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return kc(t.breakpoints,e.rowSpacing,(i,r)=>{const s=typeof r=="string"?r:t.spacing?.(r);i(n,{[Zp("row")]:s,"> *":{[Fm("row")]:s}})}),n},vN=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return kc(t.breakpoints,e.columnSpacing,(i,r)=>{const s=typeof r=="string"?r:t.spacing?.(r);i(n,{[Zp("column")]:s,"> *":{[Fm("column")]:s}})}),n},bN=({theme:t,ownerState:e})=>{if(!e.container)return{};const n={};return kc(t.breakpoints,e.direction,(i,r)=>{i(n,{flexDirection:r})}),n},ON=({ownerState:t})=>({minWidth:0,boxSizing:"border-box",...t.container&&{display:"flex",flexWrap:"wrap",...t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},gap:`var(${Zp("row")}) var(${Zp("column")})`}}),xN=t=>{const e=[];return Object.entries(t).forEach(([n,i])=>{i!==!1&&i!==void 0&&e.push(`grid-${n}-${String(i)}`)}),e},SN=(t,e="xs")=>{function n(i){return i===void 0?!1:typeof i=="string"&&!Number.isNaN(Number(i))||typeof i=="number"&&i>0}if(n(t))return[`spacing-${e}-${String(t)}`];if(typeof t=="object"&&!Array.isArray(t)){const i=[];return Object.entries(t).forEach(([r,s])=>{n(s)&&i.push(`spacing-${r}-${String(s)}`)}),i}return[]},wN=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,n])=>`direction-${e}-${n}`):[`direction-xs-${String(t)}`];function CN(t,e){t.item!==void 0&&delete t.item,t.zeroMinWidth!==void 0&&delete t.zeroMinWidth,e.keys.forEach(n=>{t[n]!==void 0&&delete t[n]})}const TN=Hm(),kN=Pj("div",{name:"MuiGrid",slot:"Root"});function EN(t){return zj({props:t,name:"MuiGrid",defaultTheme:TN})}function AN(t={}){const{createStyledComponent:e=kN,useThemeProps:n=EN,useTheme:i=rd,componentName:r="MuiGrid"}=t,s=(h,p)=>{const{container:m,direction:v,spacing:b,wrap:O,size:S}=h,C={root:["root",m&&"container",O!=="wrap"&&`wrap-xs-${String(O)}`,...wN(v),...xN(S),...m?SN(b,p.breakpoints.keys[0]):[]]};return Ve(C,E=>He(r,E),{})};function a(h,p,m=()=>!0){const v={};return h===null||(Array.isArray(h)?h.forEach((b,O)=>{b!==null&&m(b)&&p.keys[O]&&(v[p.keys[O]]=b)}):typeof h=="object"?Object.keys(h).forEach(b=>{const O=h[b];O!=null&&m(O)&&(v[b]=O)}):v[p.keys[0]]=h),v}const c=e(gN,vN,yN,pN,bN,ON,mN),f=k.forwardRef(function(p,m){const v=i(),b=n(p),O=sO(b);CN(O,v.breakpoints);const{className:S,children:C,columns:E=12,container:$=!1,component:z="div",direction:P="row",wrap:R="wrap",size:L={},offset:M={},spacing:B=0,rowSpacing:_=B,columnSpacing:A=B,unstable_level:Q=0,...T}=O,H=a(L,v.breakpoints,q=>q!==!1),I=a(M,v.breakpoints),V=p.columns??(Q?void 0:E),N=p.spacing??(Q?void 0:B),X=p.rowSpacing??p.spacing??(Q?void 0:_),Y=p.columnSpacing??p.spacing??(Q?void 0:A),K={...O,level:Q,columns:V,container:$,direction:P,wrap:R,spacing:N,rowSpacing:X,columnSpacing:Y,size:H,offset:I},le=s(K,v);return x.jsx(c,{ref:m,as:z,ownerState:K,className:ye(le.root,S),...T,children:k.Children.map(C,q=>k.isValidElement(q)&&fM(q,["Grid"])&&$&&q.props.container?k.cloneElement(q,{unstable_level:q.props?.unstable_level??Q+1}):q)})});return f.muiName="Grid",f}const kf={black:"#000",white:"#fff"},Yu={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Pa={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},bl={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828",900:"#b71c1c"},Au={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ks={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",500:"#2196f3",700:"#1976d2",800:"#1565c0"},za={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Es={300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function dM(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:kf.white,default:kf.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const hM=dM();function pM(){return{text:{primary:kf.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:kf.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Ab=pM();function pk(t,e,n,i){const r=i.light||i,s=i.dark||i*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Xm(t.main,r):e==="dark"&&(t.dark=Vm(t.main,s)))}function mk(t,e,n,i,r){const s=r.light||r,a=r.dark||r*1.5;e[n]||(e.hasOwnProperty(i)?e[n]=e[i]:n==="light"?e.light=`color-mix(in ${t}, ${e.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(e.dark=`color-mix(in ${t}, ${e.main}, #000 ${(a*100).toFixed(0)}%)`))}function RN(t="light"){return t==="dark"?{main:ks[200],light:ks[50],dark:ks[400]}:{main:ks[700],light:ks[400],dark:ks[800]}}function MN(t="light"){return t==="dark"?{main:Pa[200],light:Pa[50],dark:Pa[400]}:{main:Pa[500],light:Pa[300],dark:Pa[700]}}function DN(t="light"){return t==="dark"?{main:bl[500],light:bl[300],dark:bl[700]}:{main:bl[700],light:bl[400],dark:bl[800]}}function PN(t="light"){return t==="dark"?{main:za[400],light:za[300],dark:za[700]}:{main:za[700],light:za[500],dark:za[900]}}function zN(t="light"){return t==="dark"?{main:Es[400],light:Es[300],dark:Es[700]}:{main:Es[800],light:Es[500],dark:Es[900]}}function $N(t="light"){return t==="dark"?{main:Au[400],light:Au[300],dark:Au[700]}:{main:"#ed6c02",light:Au[500],dark:Au[900]}}function BN(t){return`oklch(from ${t} var(--__l) 0 h / var(--__a))`}function fO(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:i=.2,colorSpace:r,...s}=t,a=t.primary||RN(e),c=t.secondary||MN(e),f=t.error||DN(e),h=t.info||PN(e),p=t.success||zN(e),m=t.warning||$N(e);function v(C){return r?BN(C):_j(C,Ab.text.primary)>=n?Ab.text.primary:hM.text.primary}const b=({color:C,name:E,mainShade:$=500,lightShade:z=300,darkShade:P=700})=>{if(C={...C},!C.main&&C[$]&&(C.main=C[$]),!C.hasOwnProperty("main"))throw new Error(Nl(11,E?` (${E})`:"",$));if(typeof C.main!="string")throw new Error(Nl(12,E?` (${E})`:"",JSON.stringify(C.main)));return r?(mk(r,C,"light",z,i),mk(r,C,"dark",P,i)):(pk(C,"light",z,i),pk(C,"dark",P,i)),C.contrastText||(C.contrastText=v(C.main)),C};let O;return e==="light"?O=dM():e==="dark"&&(O=pM()),Pi({common:{...kf},mode:e,primary:b({color:a,name:"primary"}),secondary:b({color:c,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:f,name:"error"}),warning:b({color:m,name:"warning"}),info:b({color:h,name:"info"}),success:b({color:p,name:"success"}),grey:Yu,contrastThreshold:n,getContrastText:v,augmentColor:b,tonalOffset:i,...O},s)}function LN(t){const e={};return Object.entries(t).forEach(i=>{const[r,s]=i;typeof s=="object"&&(e[r]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),e}function jN(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function NN(t){return Math.round(t*1e5)/1e5}const gk={textTransform:"uppercase"},yk='"Roboto", "Helvetica", "Arial", sans-serif';function mM(t,e){const{fontFamily:n=yk,fontSize:i=14,fontWeightLight:r=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:f=16,allVariants:h,pxToRem:p,...m}=typeof e=="function"?e(t):e,v=i/14,b=p||(C=>`${C/f*v}rem`),O=(C,E,$,z,P)=>({fontFamily:n,fontWeight:C,fontSize:b(E),lineHeight:$,...n===yk?{letterSpacing:`${NN(z/E)}em`}:{},...P,...h}),S={h1:O(r,96,1.167,-1.5),h2:O(r,60,1.2,-.5),h3:O(s,48,1.167,0),h4:O(s,34,1.235,.25),h5:O(s,24,1.334,0),h6:O(a,20,1.6,.15),subtitle1:O(s,16,1.75,.15),subtitle2:O(a,14,1.57,.1),body1:O(s,16,1.5,.15),body2:O(s,14,1.43,.15),button:O(a,14,1.75,.4,gk),caption:O(s,12,1.66,.4),overline:O(s,12,2.66,1,gk),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Pi({htmlFontSize:f,pxToRem:b,fontFamily:n,fontSize:i,fontWeightLight:r,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:c,...S},m,{clone:!1})}const QN=.2,_N=.14,qN=.12;function qt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${QN})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${_N})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${qN})`].join(",")}const IN=["none",qt(0,2,1,-1,0,1,1,0,0,1,3,0),qt(0,3,1,-2,0,2,2,0,0,1,5,0),qt(0,3,3,-2,0,3,4,0,0,1,8,0),qt(0,2,4,-1,0,4,5,0,0,1,10,0),qt(0,3,5,-1,0,5,8,0,0,1,14,0),qt(0,3,5,-1,0,6,10,0,0,1,18,0),qt(0,4,5,-2,0,7,10,1,0,2,16,1),qt(0,5,5,-3,0,8,10,1,0,3,14,2),qt(0,5,6,-3,0,9,12,1,0,3,16,2),qt(0,6,6,-3,0,10,14,1,0,4,18,3),qt(0,6,7,-4,0,11,15,1,0,4,20,3),qt(0,7,8,-4,0,12,17,2,0,5,22,4),qt(0,7,8,-4,0,13,19,2,0,5,24,4),qt(0,7,9,-4,0,14,21,2,0,5,26,4),qt(0,8,9,-5,0,15,22,2,0,6,28,5),qt(0,8,10,-5,0,16,24,2,0,6,30,5),qt(0,8,11,-5,0,17,26,2,0,6,32,5),qt(0,9,11,-5,0,18,28,2,0,7,34,6),qt(0,9,12,-6,0,19,29,2,0,7,36,6),qt(0,10,13,-6,0,20,31,3,0,8,38,7),qt(0,10,13,-6,0,21,33,3,0,8,40,7),qt(0,10,14,-6,0,22,35,3,0,8,42,7),qt(0,11,14,-7,0,23,36,3,0,9,44,8),qt(0,11,15,-7,0,24,38,3,0,9,46,8)],HN={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},gM={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function vk(t){return`${Math.round(t)}ms`}function UN(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function WN(t){const e={...HN,...t.easing},n={...gM,...t.duration};return{getAutoHeightDuration:UN,create:(r=["all"],s={})=>{const{duration:a=n.standard,easing:c=e.easeInOut,delay:f=0,...h}=s;return(Array.isArray(r)?r:[r]).map(p=>`${p} ${typeof a=="string"?a:vk(a)} ${c} ${typeof f=="string"?f:vk(f)}`).join(",")},...t,easing:e,duration:n}}const VN={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function XN(t){return Gr(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function yM(t={}){const e={...t};function n(i){const r=Object.entries(i);for(let s=0;s<r.length;s++){const[a,c]=r[s];!XN(c)||a.startsWith("unstable_")?delete i[a]:Gr(c)&&(i[a]={...c},n(i[a]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
38
+
39
+ const theme = ${JSON.stringify(e,null,2)};
40
+
41
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
42
+ theme.transitions = createTransitions(theme.transitions || {});
43
+
44
+ export default theme;`}function bk(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const GN=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let n=0;for(let i=0;i<e.length;i+=1)n+=+e[i];return n};function FN(t){Object.assign(t,{alpha(e,n){const i=this||t;return i.colorSpace?`oklch(from ${e} l c h / ${typeof n=="string"?`calc(${n})`:n})`:i.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:Tf(e,GN(n))},lighten(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #fff ${bk(n)})`:Xm(e,n)},darken(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #000 ${bk(n)})`:Vm(e,n)}})}function Rb(t={},...e){const{breakpoints:n,mixins:i={},spacing:r,palette:s={},transitions:a={},typography:c={},shape:f,colorSpace:h,...p}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(Nl(20));const m=fO({...s,colorSpace:h}),v=Hm(t);let b=Pi(v,{mixins:jN(v.breakpoints,i),palette:m,shadows:IN.slice(),typography:mM(m,c),transitions:WN(a),zIndex:{...VN}});return b=Pi(b,p),b=e.reduce((O,S)=>Pi(O,S),b),b.unstable_sxConfig={...id,...p?.unstable_sxConfig},b.unstable_sx=function(S){return js({sx:S,theme:this})},b.toRuntimeSource=yM,FN(b),b}function Mb(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const YN=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=Mb(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function vM(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function bM(t){return t==="dark"?YN:[]}function KN(t){const{palette:e={mode:"light"},opacity:n,overlays:i,colorSpace:r,...s}=t,a=fO({...e,colorSpace:r});return{palette:a,opacity:{...vM(a.mode),...n},overlays:i||bM(a.mode),...s}}function ZN(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const JN=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],eQ=t=>(e,n)=>{const i=t.rootSelector||":root",r=t.colorSchemeSelector;let s=r;if(r==="class"&&(s=".%s"),r==="data"&&(s="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(s=`[${r}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const a={};return JN(t.cssVarPrefix).forEach(c=>{a[c]=n[c],delete n[c]}),s==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:a}}:s?{[s.replace("%s",e)]:a,[`${i}, ${s.replace("%s",e)}`]:n}:{[i]:{...n,...a}}}if(s&&s!=="media")return`${i}, ${s.replace("%s",String(e))}`}else if(e){if(s==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[i]:n}};if(s)return s.replace("%s",String(e))}return i};function tQ(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function oe(t,e,n){!t[e]&&n&&(t[e]=n)}function Ku(t){return typeof t!="string"||!t.startsWith("hsl")?t:oM(t)}function Do(t,e){`${e}Channel`in t||(t[`${e}Channel`]=Fu(Ku(t[e])))}function nQ(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const Nr=t=>{try{return t()}catch{}},iQ=(t="mui")=>aN(t);function Jy(t,e,n,i,r){if(!n)return;n=n===!0?{}:n;const s=r==="dark"?"dark":"light";if(!i){e[r]=KN({...n,palette:{mode:s,...n?.palette},colorSpace:t});return}const{palette:a,...c}=Rb({...i,palette:{mode:s,...n?.palette},colorSpace:t});return e[r]={...n,palette:a,opacity:{...vM(s),...n?.opacity},overlays:n?.overlays||bM(s)},c}function rQ(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:r=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:c=ZN,colorSchemeSelector:f=n.light&&n.dark?"media":void 0,rootSelector:h=":root",...p}=t,m=Object.keys(n)[0],v=i||(n.light&&m!=="light"?"light":m),b=iQ(s),{[v]:O,light:S,dark:C,...E}=n,$={...E};let z=O;if((v==="dark"&&!("dark"in n)||v==="light"&&!("light"in n))&&(z=!0),!z)throw new Error(Nl(21,v));let P;a&&(P="oklch");const R=Jy(P,$,z,p,v);S&&!$.light&&Jy(P,$,S,void 0,"light"),C&&!$.dark&&Jy(P,$,C,void 0,"dark");let L={defaultColorScheme:v,...R,cssVarPrefix:s,colorSchemeSelector:f,rootSelector:h,getCssVar:b,colorSchemes:$,font:{...LN(R.typography),...R.font},spacing:nQ(p.spacing)};Object.keys(L.colorSchemes).forEach(Q=>{const T=L.colorSchemes[Q].palette,H=V=>{const N=V.split("-"),X=N[1],Y=N[2];return b(V,T[X][Y])};T.mode==="light"&&(oe(T.common,"background","#fff"),oe(T.common,"onBackground","#000")),T.mode==="dark"&&(oe(T.common,"background","#000"),oe(T.common,"onBackground","#fff"));function I(V,N,X){if(P){let Y;return V===hl&&(Y=`transparent ${((1-X)*100).toFixed(0)}%`),V===St&&(Y=`#000 ${(X*100).toFixed(0)}%`),V===wt&&(Y=`#fff ${(X*100).toFixed(0)}%`),`color-mix(in ${P}, ${N}, ${Y})`}return V(N,X)}if(tQ(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){oe(T.Alert,"errorColor",I(St,T.error.light,.6)),oe(T.Alert,"infoColor",I(St,T.info.light,.6)),oe(T.Alert,"successColor",I(St,T.success.light,.6)),oe(T.Alert,"warningColor",I(St,T.warning.light,.6)),oe(T.Alert,"errorFilledBg",H("palette-error-main")),oe(T.Alert,"infoFilledBg",H("palette-info-main")),oe(T.Alert,"successFilledBg",H("palette-success-main")),oe(T.Alert,"warningFilledBg",H("palette-warning-main")),oe(T.Alert,"errorFilledColor",Nr(()=>T.getContrastText(T.error.main))),oe(T.Alert,"infoFilledColor",Nr(()=>T.getContrastText(T.info.main))),oe(T.Alert,"successFilledColor",Nr(()=>T.getContrastText(T.success.main))),oe(T.Alert,"warningFilledColor",Nr(()=>T.getContrastText(T.warning.main))),oe(T.Alert,"errorStandardBg",I(wt,T.error.light,.9)),oe(T.Alert,"infoStandardBg",I(wt,T.info.light,.9)),oe(T.Alert,"successStandardBg",I(wt,T.success.light,.9)),oe(T.Alert,"warningStandardBg",I(wt,T.warning.light,.9)),oe(T.Alert,"errorIconColor",H("palette-error-main")),oe(T.Alert,"infoIconColor",H("palette-info-main")),oe(T.Alert,"successIconColor",H("palette-success-main")),oe(T.Alert,"warningIconColor",H("palette-warning-main")),oe(T.AppBar,"defaultBg",H("palette-grey-100")),oe(T.Avatar,"defaultBg",H("palette-grey-400")),oe(T.Button,"inheritContainedBg",H("palette-grey-300")),oe(T.Button,"inheritContainedHoverBg",H("palette-grey-A100")),oe(T.Chip,"defaultBorder",H("palette-grey-400")),oe(T.Chip,"defaultAvatarColor",H("palette-grey-700")),oe(T.Chip,"defaultIconColor",H("palette-grey-700")),oe(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),oe(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),oe(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),oe(T.LinearProgress,"primaryBg",I(wt,T.primary.main,.62)),oe(T.LinearProgress,"secondaryBg",I(wt,T.secondary.main,.62)),oe(T.LinearProgress,"errorBg",I(wt,T.error.main,.62)),oe(T.LinearProgress,"infoBg",I(wt,T.info.main,.62)),oe(T.LinearProgress,"successBg",I(wt,T.success.main,.62)),oe(T.LinearProgress,"warningBg",I(wt,T.warning.main,.62)),oe(T.Skeleton,"bg",P?I(hl,T.text.primary,.11):`rgba(${H("palette-text-primaryChannel")} / 0.11)`),oe(T.Slider,"primaryTrack",I(wt,T.primary.main,.62)),oe(T.Slider,"secondaryTrack",I(wt,T.secondary.main,.62)),oe(T.Slider,"errorTrack",I(wt,T.error.main,.62)),oe(T.Slider,"infoTrack",I(wt,T.info.main,.62)),oe(T.Slider,"successTrack",I(wt,T.success.main,.62)),oe(T.Slider,"warningTrack",I(wt,T.warning.main,.62));const V=P?I(St,T.background.default,.6825):Mh(T.background.default,.8);oe(T.SnackbarContent,"bg",V),oe(T.SnackbarContent,"color",Nr(()=>P?Ab.text.primary:T.getContrastText(V))),oe(T.SpeedDialAction,"fabHoverBg",Mh(T.background.paper,.15)),oe(T.StepConnector,"border",H("palette-grey-400")),oe(T.StepContent,"border",H("palette-grey-400")),oe(T.Switch,"defaultColor",H("palette-common-white")),oe(T.Switch,"defaultDisabledColor",H("palette-grey-100")),oe(T.Switch,"primaryDisabledColor",I(wt,T.primary.main,.62)),oe(T.Switch,"secondaryDisabledColor",I(wt,T.secondary.main,.62)),oe(T.Switch,"errorDisabledColor",I(wt,T.error.main,.62)),oe(T.Switch,"infoDisabledColor",I(wt,T.info.main,.62)),oe(T.Switch,"successDisabledColor",I(wt,T.success.main,.62)),oe(T.Switch,"warningDisabledColor",I(wt,T.warning.main,.62)),oe(T.TableCell,"border",I(wt,I(hl,T.divider,1),.88)),oe(T.Tooltip,"bg",I(hl,T.grey[700],.92))}if(T.mode==="dark"){oe(T.Alert,"errorColor",I(wt,T.error.light,.6)),oe(T.Alert,"infoColor",I(wt,T.info.light,.6)),oe(T.Alert,"successColor",I(wt,T.success.light,.6)),oe(T.Alert,"warningColor",I(wt,T.warning.light,.6)),oe(T.Alert,"errorFilledBg",H("palette-error-dark")),oe(T.Alert,"infoFilledBg",H("palette-info-dark")),oe(T.Alert,"successFilledBg",H("palette-success-dark")),oe(T.Alert,"warningFilledBg",H("palette-warning-dark")),oe(T.Alert,"errorFilledColor",Nr(()=>T.getContrastText(T.error.dark))),oe(T.Alert,"infoFilledColor",Nr(()=>T.getContrastText(T.info.dark))),oe(T.Alert,"successFilledColor",Nr(()=>T.getContrastText(T.success.dark))),oe(T.Alert,"warningFilledColor",Nr(()=>T.getContrastText(T.warning.dark))),oe(T.Alert,"errorStandardBg",I(St,T.error.light,.9)),oe(T.Alert,"infoStandardBg",I(St,T.info.light,.9)),oe(T.Alert,"successStandardBg",I(St,T.success.light,.9)),oe(T.Alert,"warningStandardBg",I(St,T.warning.light,.9)),oe(T.Alert,"errorIconColor",H("palette-error-main")),oe(T.Alert,"infoIconColor",H("palette-info-main")),oe(T.Alert,"successIconColor",H("palette-success-main")),oe(T.Alert,"warningIconColor",H("palette-warning-main")),oe(T.AppBar,"defaultBg",H("palette-grey-900")),oe(T.AppBar,"darkBg",H("palette-background-paper")),oe(T.AppBar,"darkColor",H("palette-text-primary")),oe(T.Avatar,"defaultBg",H("palette-grey-600")),oe(T.Button,"inheritContainedBg",H("palette-grey-800")),oe(T.Button,"inheritContainedHoverBg",H("palette-grey-700")),oe(T.Chip,"defaultBorder",H("palette-grey-700")),oe(T.Chip,"defaultAvatarColor",H("palette-grey-300")),oe(T.Chip,"defaultIconColor",H("palette-grey-300")),oe(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),oe(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),oe(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),oe(T.LinearProgress,"primaryBg",I(St,T.primary.main,.5)),oe(T.LinearProgress,"secondaryBg",I(St,T.secondary.main,.5)),oe(T.LinearProgress,"errorBg",I(St,T.error.main,.5)),oe(T.LinearProgress,"infoBg",I(St,T.info.main,.5)),oe(T.LinearProgress,"successBg",I(St,T.success.main,.5)),oe(T.LinearProgress,"warningBg",I(St,T.warning.main,.5)),oe(T.Skeleton,"bg",P?I(hl,T.text.primary,.13):`rgba(${H("palette-text-primaryChannel")} / 0.13)`),oe(T.Slider,"primaryTrack",I(St,T.primary.main,.5)),oe(T.Slider,"secondaryTrack",I(St,T.secondary.main,.5)),oe(T.Slider,"errorTrack",I(St,T.error.main,.5)),oe(T.Slider,"infoTrack",I(St,T.info.main,.5)),oe(T.Slider,"successTrack",I(St,T.success.main,.5)),oe(T.Slider,"warningTrack",I(St,T.warning.main,.5));const V=P?I(wt,T.background.default,.985):Mh(T.background.default,.98);oe(T.SnackbarContent,"bg",V),oe(T.SnackbarContent,"color",Nr(()=>P?hM.text.primary:T.getContrastText(V))),oe(T.SpeedDialAction,"fabHoverBg",Mh(T.background.paper,.15)),oe(T.StepConnector,"border",H("palette-grey-600")),oe(T.StepContent,"border",H("palette-grey-600")),oe(T.Switch,"defaultColor",H("palette-grey-300")),oe(T.Switch,"defaultDisabledColor",H("palette-grey-600")),oe(T.Switch,"primaryDisabledColor",I(St,T.primary.main,.55)),oe(T.Switch,"secondaryDisabledColor",I(St,T.secondary.main,.55)),oe(T.Switch,"errorDisabledColor",I(St,T.error.main,.55)),oe(T.Switch,"infoDisabledColor",I(St,T.info.main,.55)),oe(T.Switch,"successDisabledColor",I(St,T.success.main,.55)),oe(T.Switch,"warningDisabledColor",I(St,T.warning.main,.55)),oe(T.TableCell,"border",I(St,I(hl,T.divider,1),.68)),oe(T.Tooltip,"bg",I(hl,T.grey[700],.92))}Do(T.background,"default"),Do(T.background,"paper"),Do(T.common,"background"),Do(T.common,"onBackground"),Do(T,"divider"),Object.keys(T).forEach(V=>{const N=T[V];V!=="tonalOffset"&&N&&typeof N=="object"&&(N.main&&oe(T[V],"mainChannel",Fu(Ku(N.main))),N.light&&oe(T[V],"lightChannel",Fu(Ku(N.light))),N.dark&&oe(T[V],"darkChannel",Fu(Ku(N.dark))),N.contrastText&&oe(T[V],"contrastTextChannel",Fu(Ku(N.contrastText))),V==="text"&&(Do(T[V],"primary"),Do(T[V],"secondary")),V==="action"&&(N.active&&Do(T[V],"active"),N.selected&&Do(T[V],"selected")))})}),L=e.reduce((Q,T)=>Pi(Q,T),L);const M={prefix:s,disableCssColorScheme:r,shouldSkipGeneratingVar:c,getSelector:eQ(L),enableContrastVars:a},{vars:B,generateThemeVars:_,generateStyleSheets:A}=fN(L,M);return L.vars=B,Object.entries(L.colorSchemes[L.defaultColorScheme]).forEach(([Q,T])=>{L[Q]=T}),L.generateThemeVars=_,L.generateStyleSheets=A,L.generateSpacing=function(){return FR(p.spacing,rO(this))},L.getColorSchemeSelector=dN(f),L.spacing=L.generateSpacing(),L.shouldSkipGeneratingVar=c,L.unstable_sxConfig={...id,...p?.unstable_sxConfig},L.unstable_sx=function(T){return js({sx:T,theme:this})},L.toRuntimeSource=yM,L}function Ok(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:fO({...n===!0?{}:n.palette,mode:e})})}function Ym(t={},...e){const{palette:n,cssVariables:i=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...a}=t,c=s||"light",f=r?.[c],h={...r,...n?{[c]:{...typeof f!="boolean"&&f,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in t))return Rb(t,...e);let p=n;"palette"in t||h[c]&&(h[c]!==!0?p=h[c].palette:c==="dark"&&(p={mode:"dark"}));const m=Rb({...t,palette:p},...e);return m.defaultColorScheme=c,m.colorSchemes=h,m.palette.mode==="light"&&(m.colorSchemes.light={...h.light!==!0&&h.light,palette:m.palette},Ok(m,"dark",h.dark)),m.palette.mode==="dark"&&(m.colorSchemes.dark={...h.dark!==!0&&h.dark,palette:m.palette},Ok(m,"light",h.light)),m}return!n&&!("light"in h)&&c==="light"&&(h.light=!0),rQ({...a,colorSchemes:h,defaultColorScheme:c,...typeof i!="boolean"&&i},...e)}const dO=Ym();function Er(){const t=rd(dO);return t[wr]||t}function oQ(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const Ec=t=>oQ(t)&&t!=="classes",ge=tM({themeId:wr,defaultTheme:dO,rootShouldForwardProp:Ec});function sQ({theme:t,...e}){const n=wr in t?t[wr]:void 0;return x.jsx(cM,{...e,themeId:n?wr:void 0,theme:n||t})}const Dh={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:lQ,useColorScheme:Km}=lN({themeId:wr,theme:()=>Ym({cssVariables:!0}),colorSchemeStorageKey:Dh.colorSchemeStorageKey,modeStorageKey:Dh.modeStorageKey,defaultColorScheme:{light:Dh.defaultLightColorScheme,dark:Dh.defaultDarkColorScheme},resolveTheme:t=>{const e={...t,typography:mM(t.palette,t.typography)};return e.unstable_sx=function(i){return js({sx:i,theme:this})},e}}),aQ=lQ;function cQ({theme:t,...e}){const n=k.useMemo(()=>{if(typeof t=="function")return t;const i=wr in t?t[wr]:t;return"colorSchemes"in i?null:"vars"in i?t:{...t,vars:null}},[t]);return n?x.jsx(sQ,{theme:n,...e}):x.jsx(aQ,{theme:t,...e})}const Db={200:"#f48fb1",A200:"#ff4081",A400:"#f50057"},xk={500:"#3f51b5"},Sk={500:"#009688"},wk={700:"#689f38"},Ck={500:"#ff5722"},uQ=Ue("MuiBox",["root"]),fQ=Ym(),lt=wj({themeId:wr,defaultTheme:fQ,defaultClassName:uQ.root,generateClassName:KR.generate});function OM(t){return x.jsx(YR,{...t,defaultTheme:dO,themeId:wr})}function xM(t){return function(n){return x.jsx(OM,{styles:typeof t=="function"?i=>t({theme:i,...n}):t})}}function dQ(){return sO}function qe(t){return Fj(t)}const Pb=typeof xM({})=="function",hQ=(t,e)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...e&&!t.vars&&{colorScheme:t.palette.mode}}),pQ=t=>({color:(t.vars||t).palette.text.primary,...t.typography.body1,backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),SM=(t,e=!1)=>{const n={};e&&t.colorSchemes&&typeof t.getColorSchemeSelector=="function"&&Object.entries(t.colorSchemes).forEach(([s,a])=>{const c=t.getColorSchemeSelector(s);c.startsWith("@")?n[c]={":root":{colorScheme:a.palette?.mode}}:n[c.replace(/\s*&/,"")]={colorScheme:a.palette?.mode}});let i={html:hQ(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:{margin:0,...pQ(t),"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}},...n};const r=t.components?.MuiCssBaseline?.styleOverrides;return r&&(i=[i,r]),i},Dp="mui-ecs",mQ=t=>{const e=SM(t,!1),n=Array.isArray(e)?e[0]:e;return!t.vars&&n&&(n.html[`:root:has(${Dp})`]={colorScheme:t.palette.mode}),t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([i,r])=>{const s=t.getColorSchemeSelector(i);s.startsWith("@")?n[s]={[`:root:not(:has(.${Dp}))`]:{colorScheme:r.palette?.mode}}:n[s.replace(/\s*&/,"")]={[`&:not(:has(.${Dp}))`]:{colorScheme:r.palette?.mode}}}),e},gQ=xM(Pb?({theme:t,enableColorScheme:e})=>SM(t,e):({theme:t})=>mQ(t));function yQ(t){const e=qe({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:i=!1}=e;return x.jsxs(k.Fragment,{children:[Pb&&x.jsx(gQ,{enableColorScheme:i}),!Pb&&!i&&x.jsx("span",{className:Dp,style:{display:"none"}}),n]})}const wM=rM({themeId:wr}),vQ="/assets/FiraCode-Bold-Ba6ukUQM.otf",bQ="/assets/FiraCode-Regular-DP3ilQdk.otf",Ke=Jj;function OQ(t){return typeof t.main=="string"}function xQ(t,e=[]){if(!OQ(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function xr(t=[]){return([,e])=>e&&xQ(e,t)}function SQ(t){return He("MuiCircularProgress",t)}Ue("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const br=44,zb=ed`
45
+ 0% {
46
+ transform: rotate(0deg);
47
+ }
48
+
49
+ 100% {
50
+ transform: rotate(360deg);
51
+ }
52
+ `,$b=ed`
53
+ 0% {
54
+ stroke-dasharray: 1px, 200px;
55
+ stroke-dashoffset: 0;
56
+ }
57
+
58
+ 50% {
59
+ stroke-dasharray: 100px, 200px;
60
+ stroke-dashoffset: -15px;
61
+ }
62
+
63
+ 100% {
64
+ stroke-dasharray: 1px, 200px;
65
+ stroke-dashoffset: -126px;
66
+ }
67
+ `,wQ=typeof zb!="string"?tO`
68
+ animation: ${zb} 1.4s linear infinite;
69
+ `:null,CQ=typeof $b!="string"?tO`
70
+ animation: ${$b} 1.4s ease-in-out infinite;
71
+ `:null,TQ=t=>{const{classes:e,variant:n,color:i,disableShrink:r}=t,s={root:["root",n,`color${pe(i)}`],svg:["svg"],track:["track"],circle:["circle",`circle${pe(n)}`,r&&"circleDisableShrink"]};return Ve(s,SQ,e)},kQ=ge("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${pe(n.color)}`]]}})(Ke(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:wQ||{animation:`${zb} 1.4s linear infinite`}},...Object.entries(t.palette).filter(xr()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),EQ=ge("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),AQ=ge("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${pe(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(Ke(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:CQ||{animation:`${$b} 1.4s ease-in-out infinite`}}]}))),RQ=ge("circle",{name:"MuiCircularProgress",slot:"Track"})(Ke(({theme:t})=>({stroke:"currentColor",opacity:(t.vars||t).palette.action.activatedOpacity}))),hO=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiCircularProgress"}),{className:r,color:s="primary",disableShrink:a=!1,enableTrackSlot:c=!1,size:f=40,style:h,thickness:p=3.6,value:m=0,variant:v="indeterminate",...b}=i,O={...i,color:s,disableShrink:a,size:f,thickness:p,value:m,variant:v,enableTrackSlot:c},S=TQ(O),C={},E={},$={};if(v==="determinate"){const z=2*Math.PI*((br-p)/2);C.strokeDasharray=z.toFixed(3),$["aria-valuenow"]=Math.round(m),C.strokeDashoffset=`${((100-m)/100*z).toFixed(3)}px`,E.transform="rotate(-90deg)"}return x.jsx(kQ,{className:ye(S.root,r),style:{width:f,height:f,...E,...h},ownerState:O,ref:n,role:"progressbar",...$,...b,children:x.jsxs(EQ,{className:S.svg,ownerState:O,viewBox:`${br/2} ${br/2} ${br} ${br}`,children:[c?x.jsx(RQ,{className:S.track,ownerState:O,cx:br,cy:br,r:(br-p)/2,fill:"none",strokeWidth:p,"aria-hidden":"true"}):null,x.jsx(AQ,{className:S.circle,style:C,ownerState:O,cx:br,cy:br,r:(br-p)/2,fill:"none",strokeWidth:p})]})})});function MQ(t){return He("MuiPaper",t)}Ue("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const DQ=t=>{const{square:e,elevation:n,variant:i,classes:r}=t,s={root:["root",i,!e&&"rounded",i==="elevation"&&`elevation${n}`]};return Ve(s,MQ,r)},PQ=ge("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(Ke(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Ac=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiPaper"}),r=Er(),{className:s,component:a="div",elevation:c=1,square:f=!1,variant:h="elevation",...p}=i,m={...i,component:a,elevation:c,square:f,variant:h},v=DQ(m);return x.jsx(PQ,{as:a,ownerState:m,className:ye(v.root,s),ref:n,...p,style:{...h==="elevation"&&{"--Paper-shadow":(r.vars||r).shadows[c],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[c]},...!r.vars&&r.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Tf("#fff",Mb(c))}, ${Tf("#fff",Mb(c))})`}},...p.style}})}),Tk={};function CM(t,e){const n=k.useRef(Tk);return n.current===Tk&&(n.current=t(e)),n}const zQ=[];function $Q(t){k.useEffect(t,zQ)}class Zm{static create(){return new Zm}currentId=null;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function El(){const t=CM(Zm.create).current;return $Q(t.disposeEffect),t}function ac(t){try{return t.matches(":focus-visible")}catch{}return!1}function Vl(t){return parseInt(k.version,10)>=19?t?.props?.ref||null:t?.ref||null}function pO(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}function Bb(t,e){return Bb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bb(t,e)}function TM(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Bb(t,e)}var kM=aR();const Ph=W1(kM),kk={disabled:!1},Jp=Ri.createContext(null);var BQ=function(e){return e.scrollTop},Zu="unmounted",Ol="exited",xl="entering",_a="entered",Lb="exiting",fr=(function(t){TM(e,t);function e(i,r){var s;s=t.call(this,i,r)||this;var a=r,c=a&&!a.isMounting?i.enter:i.appear,f;return s.appearStatus=null,i.in?c?(f=Ol,s.appearStatus=xl):f=_a:i.unmountOnExit||i.mountOnEnter?f=Zu:f=Ol,s.state={status:f},s.nextCallback=null,s}e.getDerivedStateFromProps=function(r,s){var a=r.in;return a&&s.status===Zu?{status:Ol}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var s=null;if(r!==this.props){var a=this.state.status;this.props.in?a!==xl&&a!==_a&&(s=xl):(a===xl||a===_a)&&(s=Lb)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,s,a,c;return s=a=c=r,r!=null&&typeof r!="number"&&(s=r.exit,a=r.enter,c=r.appear!==void 0?r.appear:a),{exit:s,enter:a,appear:c}},n.updateStatus=function(r,s){if(r===void 0&&(r=!1),s!==null)if(this.cancelNextCallback(),s===xl){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ph.findDOMNode(this);a&&BQ(a)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ol&&this.setState({status:Zu})},n.performEnter=function(r){var s=this,a=this.props.enter,c=this.context?this.context.isMounting:r,f=this.props.nodeRef?[c]:[Ph.findDOMNode(this),c],h=f[0],p=f[1],m=this.getTimeouts(),v=c?m.appear:m.enter;if(!r&&!a||kk.disabled){this.safeSetState({status:_a},function(){s.props.onEntered(h)});return}this.props.onEnter(h,p),this.safeSetState({status:xl},function(){s.props.onEntering(h,p),s.onTransitionEnd(v,function(){s.safeSetState({status:_a},function(){s.props.onEntered(h,p)})})})},n.performExit=function(){var r=this,s=this.props.exit,a=this.getTimeouts(),c=this.props.nodeRef?void 0:Ph.findDOMNode(this);if(!s||kk.disabled){this.safeSetState({status:Ol},function(){r.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:Lb},function(){r.props.onExiting(c),r.onTransitionEnd(a.exit,function(){r.safeSetState({status:Ol},function(){r.props.onExited(c)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,s){s=this.setNextCallback(s),this.setState(r,s)},n.setNextCallback=function(r){var s=this,a=!0;return this.nextCallback=function(c){a&&(a=!1,s.nextCallback=null,r(c))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(r,s){this.setNextCallback(s);var a=this.props.nodeRef?this.props.nodeRef.current:Ph.findDOMNode(this),c=r==null&&!this.props.addEndListener;if(!a||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],h=f[0],p=f[1];this.props.addEndListener(h,p)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===Zu)return null;var s=this.props,a=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var c=pO(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ri.createElement(Jp.Provider,{value:null},typeof a=="function"?a(r,c):Ri.cloneElement(Ri.Children.only(a),c))},e})(Ri.Component);fr.contextType=Jp;fr.propTypes={};function $a(){}fr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:$a,onEntering:$a,onEntered:$a,onExit:$a,onExiting:$a,onExited:$a};fr.UNMOUNTED=Zu;fr.EXITED=Ol;fr.ENTERING=xl;fr.ENTERED=_a;fr.EXITING=Lb;function LQ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mO(t,e){var n=function(s){return e&&k.isValidElement(s)?e(s):s},i=Object.create(null);return t&&k.Children.map(t,function(r){return r}).forEach(function(r){i[r.key]=n(r)}),i}function jQ(t,e){t=t||{},e=e||{};function n(p){return p in e?e[p]:t[p]}var i=Object.create(null),r=[];for(var s in t)s in e?r.length&&(i[s]=r,r=[]):r.push(s);var a,c={};for(var f in e){if(i[f])for(a=0;a<i[f].length;a++){var h=i[f][a];c[i[f][a]]=n(h)}c[f]=n(f)}for(a=0;a<r.length;a++)c[r[a]]=n(r[a]);return c}function Al(t,e,n){return n[e]!=null?n[e]:t.props[e]}function NQ(t,e){return mO(t.children,function(n){return k.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Al(n,"appear",t),enter:Al(n,"enter",t),exit:Al(n,"exit",t)})})}function QQ(t,e,n){var i=mO(t.children),r=jQ(e,i);return Object.keys(r).forEach(function(s){var a=r[s];if(k.isValidElement(a)){var c=s in e,f=s in i,h=e[s],p=k.isValidElement(h)&&!h.props.in;f&&(!c||p)?r[s]=k.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Al(a,"exit",t),enter:Al(a,"enter",t)}):!f&&c&&!p?r[s]=k.cloneElement(a,{in:!1}):f&&c&&k.isValidElement(h)&&(r[s]=k.cloneElement(a,{onExited:n.bind(null,a),in:h.props.in,exit:Al(a,"exit",t),enter:Al(a,"enter",t)}))}}),r}var _Q=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},qQ={component:"div",childFactory:function(e){return e}},gO=(function(t){TM(e,t);function e(i,r){var s;s=t.call(this,i,r)||this;var a=s.handleExited.bind(LQ(s));return s.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},s}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(r,s){var a=s.children,c=s.handleExited,f=s.firstRender;return{children:f?NQ(r,c):QQ(r,a,c),firstRender:!1}},n.handleExited=function(r,s){var a=mO(this.props.children);r.key in a||(r.props.onExited&&r.props.onExited(s),this.mounted&&this.setState(function(c){var f=Of({},c.children);return delete f[r.key],{children:f}}))},n.render=function(){var r=this.props,s=r.component,a=r.childFactory,c=pO(r,["component","childFactory"]),f=this.state.contextValue,h=_Q(this.state.children).map(a);return delete c.appear,delete c.enter,delete c.exit,s===null?Ri.createElement(Jp.Provider,{value:f},h):Ri.createElement(Jp.Provider,{value:f},Ri.createElement(s,c,h))},e})(Ri.Component);gO.propTypes={};gO.defaultProps=qQ;const yO=t=>t.scrollTop;function Qs(t,e){const{timeout:n,easing:i,style:r={}}=t;return{duration:r.transitionDuration??(typeof n=="number"?n:n[e.mode]||0),easing:r.transitionTimingFunction??(typeof i=="object"?i[e.mode]:i),delay:r.transitionDelay}}function mn(...t){const e=k.useRef(void 0),n=k.useCallback(i=>{const r=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,c=a(i);return typeof c=="function"?c:()=>{a(null)}}return s.current=i,()=>{s.current=null}});return()=>{r.forEach(s=>s?.())}},t);return k.useMemo(()=>t.every(i=>i==null)?null:i=>{e.current&&(e.current(),e.current=void 0),i!=null&&(e.current=n(i))},t)}function jb(t){return`scale(${t}, ${t**2})`}const IQ={entering:{opacity:1,transform:jb(1)},entered:{opacity:1,transform:"none"}},ev=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Ef=k.forwardRef(function(e,n){const{addEndListener:i,appear:r=!0,children:s,easing:a,in:c,onEnter:f,onEntered:h,onEntering:p,onExit:m,onExited:v,onExiting:b,style:O,timeout:S="auto",TransitionComponent:C=fr,...E}=e,$=El(),z=k.useRef(),P=Er(),R=k.useRef(null),L=mn(R,Vl(s),n),M=V=>N=>{if(V){const X=R.current;N===void 0?V(X):V(X,N)}},B=M(p),_=M((V,N)=>{yO(V);const{duration:X,delay:Y,easing:K}=Qs({style:O,timeout:S,easing:a},{mode:"enter"});let le;S==="auto"?(le=P.transitions.getAutoHeightDuration(V.clientHeight),z.current=le):le=X,V.style.transition=[P.transitions.create("opacity",{duration:le,delay:Y}),P.transitions.create("transform",{duration:ev?le:le*.666,delay:Y,easing:K})].join(","),f&&f(V,N)}),A=M(h),Q=M(b),T=M(V=>{const{duration:N,delay:X,easing:Y}=Qs({style:O,timeout:S,easing:a},{mode:"exit"});let K;S==="auto"?(K=P.transitions.getAutoHeightDuration(V.clientHeight),z.current=K):K=N,V.style.transition=[P.transitions.create("opacity",{duration:K,delay:X}),P.transitions.create("transform",{duration:ev?K:K*.666,delay:ev?X:X||K*.333,easing:Y})].join(","),V.style.opacity=0,V.style.transform=jb(.75),m&&m(V)}),H=M(v),I=V=>{S==="auto"&&$.start(z.current||0,V),i&&i(R.current,V)};return x.jsx(C,{appear:r,in:c,nodeRef:R,onEnter:_,onEntered:A,onEntering:B,onExit:T,onExited:H,onExiting:Q,addEndListener:I,timeout:S==="auto"?null:S,...E,children:(V,{ownerState:N,...X})=>k.cloneElement(s,{style:{opacity:0,transform:jb(.75),visibility:V==="exited"&&!c?"hidden":void 0,...IQ[V],...O,...s.props.style},ref:L,...X})})});Ef&&(Ef.muiSupportAuto=!0);function Hn(t){return t&&t.ownerDocument||document}var hi="top",lr="bottom",ar="right",pi="left",vO="auto",od=[hi,lr,ar,pi],cc="start",Af="end",HQ="clippingParents",EM="viewport",Ru="popper",UQ="reference",Ek=od.reduce(function(t,e){return t.concat([e+"-"+cc,e+"-"+Af])},[]),AM=[].concat(od,[vO]).reduce(function(t,e){return t.concat([e,e+"-"+cc,e+"-"+Af])},[]),WQ="beforeRead",VQ="read",XQ="afterRead",GQ="beforeMain",FQ="main",YQ="afterMain",KQ="beforeWrite",ZQ="write",JQ="afterWrite",e6=[WQ,VQ,XQ,GQ,FQ,YQ,KQ,ZQ,JQ];function ro(t){return t?(t.nodeName||"").toLowerCase():null}function zi(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ql(t){var e=zi(t).Element;return t instanceof e||t instanceof Element}function rr(t){var e=zi(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function bO(t){if(typeof ShadowRoot>"u")return!1;var e=zi(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function t6(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},r=e.attributes[n]||{},s=e.elements[n];!rr(s)||!ro(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(a){var c=r[a];c===!1?s.removeAttribute(a):s.setAttribute(a,c===!0?"":c)}))})}function n6(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],s=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),c=a.reduce(function(f,h){return f[h]="",f},{});!rr(r)||!ro(r)||(Object.assign(r.style,c),Object.keys(s).forEach(function(f){r.removeAttribute(f)}))})}}const i6={name:"applyStyles",enabled:!0,phase:"write",fn:t6,effect:n6,requires:["computeStyles"]};function no(t){return t.split("-")[0]}var Bl=Math.max,em=Math.min,uc=Math.round;function Nb(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function RM(){return!/^((?!chrome|android).)*safari/i.test(Nb())}function fc(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),r=1,s=1;e&&rr(t)&&(r=t.offsetWidth>0&&uc(i.width)/t.offsetWidth||1,s=t.offsetHeight>0&&uc(i.height)/t.offsetHeight||1);var a=Ql(t)?zi(t):window,c=a.visualViewport,f=!RM()&&n,h=(i.left+(f&&c?c.offsetLeft:0))/r,p=(i.top+(f&&c?c.offsetTop:0))/s,m=i.width/r,v=i.height/s;return{width:m,height:v,top:p,right:h+m,bottom:p+v,left:h,x:h,y:p}}function OO(t){var e=fc(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function MM(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&bO(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Vo(t){return zi(t).getComputedStyle(t)}function r6(t){return["table","td","th"].indexOf(ro(t))>=0}function Gs(t){return((Ql(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jm(t){return ro(t)==="html"?t:t.assignedSlot||t.parentNode||(bO(t)?t.host:null)||Gs(t)}function Ak(t){return!rr(t)||Vo(t).position==="fixed"?null:t.offsetParent}function o6(t){var e=/firefox/i.test(Nb()),n=/Trident/i.test(Nb());if(n&&rr(t)){var i=Vo(t);if(i.position==="fixed")return null}var r=Jm(t);for(bO(r)&&(r=r.host);rr(r)&&["html","body"].indexOf(ro(r))<0;){var s=Vo(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function sd(t){for(var e=zi(t),n=Ak(t);n&&r6(n)&&Vo(n).position==="static";)n=Ak(n);return n&&(ro(n)==="html"||ro(n)==="body"&&Vo(n).position==="static")?e:n||o6(t)||e}function xO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function af(t,e,n){return Bl(t,em(e,n))}function s6(t,e,n){var i=af(t,e,n);return i>n?n:i}function DM(){return{top:0,right:0,bottom:0,left:0}}function PM(t){return Object.assign({},DM(),t)}function zM(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var l6=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,PM(typeof e!="number"?e:zM(e,od))};function a6(t){var e,n=t.state,i=t.name,r=t.options,s=n.elements.arrow,a=n.modifiersData.popperOffsets,c=no(n.placement),f=xO(c),h=[pi,ar].indexOf(c)>=0,p=h?"height":"width";if(!(!s||!a)){var m=l6(r.padding,n),v=OO(s),b=f==="y"?hi:pi,O=f==="y"?lr:ar,S=n.rects.reference[p]+n.rects.reference[f]-a[f]-n.rects.popper[p],C=a[f]-n.rects.reference[f],E=sd(s),$=E?f==="y"?E.clientHeight||0:E.clientWidth||0:0,z=S/2-C/2,P=m[b],R=$-v[p]-m[O],L=$/2-v[p]/2+z,M=af(P,L,R),B=f;n.modifiersData[i]=(e={},e[B]=M,e.centerOffset=M-L,e)}}function c6(t){var e=t.state,n=t.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||MM(e.elements.popper,r)&&(e.elements.arrow=r))}const u6={name:"arrow",enabled:!0,phase:"main",fn:a6,effect:c6,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dc(t){return t.split("-")[1]}var f6={top:"auto",right:"auto",bottom:"auto",left:"auto"};function d6(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:uc(n*r)/r||0,y:uc(i*r)/r||0}}function Rk(t){var e,n=t.popper,i=t.popperRect,r=t.placement,s=t.variation,a=t.offsets,c=t.position,f=t.gpuAcceleration,h=t.adaptive,p=t.roundOffsets,m=t.isFixed,v=a.x,b=v===void 0?0:v,O=a.y,S=O===void 0?0:O,C=typeof p=="function"?p({x:b,y:S}):{x:b,y:S};b=C.x,S=C.y;var E=a.hasOwnProperty("x"),$=a.hasOwnProperty("y"),z=pi,P=hi,R=window;if(h){var L=sd(n),M="clientHeight",B="clientWidth";if(L===zi(n)&&(L=Gs(n),Vo(L).position!=="static"&&c==="absolute"&&(M="scrollHeight",B="scrollWidth")),L=L,r===hi||(r===pi||r===ar)&&s===Af){P=lr;var _=m&&L===R&&R.visualViewport?R.visualViewport.height:L[M];S-=_-i.height,S*=f?1:-1}if(r===pi||(r===hi||r===lr)&&s===Af){z=ar;var A=m&&L===R&&R.visualViewport?R.visualViewport.width:L[B];b-=A-i.width,b*=f?1:-1}}var Q=Object.assign({position:c},h&&f6),T=p===!0?d6({x:b,y:S},zi(n)):{x:b,y:S};if(b=T.x,S=T.y,f){var H;return Object.assign({},Q,(H={},H[P]=$?"0":"",H[z]=E?"0":"",H.transform=(R.devicePixelRatio||1)<=1?"translate("+b+"px, "+S+"px)":"translate3d("+b+"px, "+S+"px, 0)",H))}return Object.assign({},Q,(e={},e[P]=$?S+"px":"",e[z]=E?b+"px":"",e.transform="",e))}function h6(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=i===void 0?!0:i,s=n.adaptive,a=s===void 0?!0:s,c=n.roundOffsets,f=c===void 0?!0:c,h={placement:no(e.placement),variation:dc(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Rk(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Rk(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const p6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:h6,data:{}};var zh={passive:!0};function m6(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,s=r===void 0?!0:r,a=i.resize,c=a===void 0?!0:a,f=zi(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&h.forEach(function(p){p.addEventListener("scroll",n.update,zh)}),c&&f.addEventListener("resize",n.update,zh),function(){s&&h.forEach(function(p){p.removeEventListener("scroll",n.update,zh)}),c&&f.removeEventListener("resize",n.update,zh)}}const g6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:m6,data:{}};var y6={left:"right",right:"left",bottom:"top",top:"bottom"};function Pp(t){return t.replace(/left|right|bottom|top/g,function(e){return y6[e]})}var v6={start:"end",end:"start"};function Mk(t){return t.replace(/start|end/g,function(e){return v6[e]})}function SO(t){var e=zi(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function wO(t){return fc(Gs(t)).left+SO(t).scrollLeft}function b6(t,e){var n=zi(t),i=Gs(t),r=n.visualViewport,s=i.clientWidth,a=i.clientHeight,c=0,f=0;if(r){s=r.width,a=r.height;var h=RM();(h||!h&&e==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}return{width:s,height:a,x:c+wO(t),y:f}}function O6(t){var e,n=Gs(t),i=SO(t),r=(e=t.ownerDocument)==null?void 0:e.body,s=Bl(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Bl(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),c=-i.scrollLeft+wO(t),f=-i.scrollTop;return Vo(r||n).direction==="rtl"&&(c+=Bl(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:c,y:f}}function CO(t){var e=Vo(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function $M(t){return["html","body","#document"].indexOf(ro(t))>=0?t.ownerDocument.body:rr(t)&&CO(t)?t:$M(Jm(t))}function cf(t,e){var n;e===void 0&&(e=[]);var i=$M(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=zi(i),a=r?[s].concat(s.visualViewport||[],CO(i)?i:[]):i,c=e.concat(a);return r?c:c.concat(cf(Jm(a)))}function Qb(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function x6(t,e){var n=fc(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Dk(t,e,n){return e===EM?Qb(b6(t,n)):Ql(e)?x6(e,n):Qb(O6(Gs(t)))}function S6(t){var e=cf(Jm(t)),n=["absolute","fixed"].indexOf(Vo(t).position)>=0,i=n&&rr(t)?sd(t):t;return Ql(i)?e.filter(function(r){return Ql(r)&&MM(r,i)&&ro(r)!=="body"}):[]}function w6(t,e,n,i){var r=e==="clippingParents"?S6(t):[].concat(e),s=[].concat(r,[n]),a=s[0],c=s.reduce(function(f,h){var p=Dk(t,h,i);return f.top=Bl(p.top,f.top),f.right=em(p.right,f.right),f.bottom=em(p.bottom,f.bottom),f.left=Bl(p.left,f.left),f},Dk(t,a,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function BM(t){var e=t.reference,n=t.element,i=t.placement,r=i?no(i):null,s=i?dc(i):null,a=e.x+e.width/2-n.width/2,c=e.y+e.height/2-n.height/2,f;switch(r){case hi:f={x:a,y:e.y-n.height};break;case lr:f={x:a,y:e.y+e.height};break;case ar:f={x:e.x+e.width,y:c};break;case pi:f={x:e.x-n.width,y:c};break;default:f={x:e.x,y:e.y}}var h=r?xO(r):null;if(h!=null){var p=h==="y"?"height":"width";switch(s){case cc:f[h]=f[h]-(e[p]/2-n[p]/2);break;case Af:f[h]=f[h]+(e[p]/2-n[p]/2);break}}return f}function Rf(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=i===void 0?t.placement:i,s=n.strategy,a=s===void 0?t.strategy:s,c=n.boundary,f=c===void 0?HQ:c,h=n.rootBoundary,p=h===void 0?EM:h,m=n.elementContext,v=m===void 0?Ru:m,b=n.altBoundary,O=b===void 0?!1:b,S=n.padding,C=S===void 0?0:S,E=PM(typeof C!="number"?C:zM(C,od)),$=v===Ru?UQ:Ru,z=t.rects.popper,P=t.elements[O?$:v],R=w6(Ql(P)?P:P.contextElement||Gs(t.elements.popper),f,p,a),L=fc(t.elements.reference),M=BM({reference:L,element:z,placement:r}),B=Qb(Object.assign({},z,M)),_=v===Ru?B:L,A={top:R.top-_.top+E.top,bottom:_.bottom-R.bottom+E.bottom,left:R.left-_.left+E.left,right:_.right-R.right+E.right},Q=t.modifiersData.offset;if(v===Ru&&Q){var T=Q[r];Object.keys(A).forEach(function(H){var I=[ar,lr].indexOf(H)>=0?1:-1,V=[hi,lr].indexOf(H)>=0?"y":"x";A[H]+=T[V]*I})}return A}function C6(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=n.boundary,s=n.rootBoundary,a=n.padding,c=n.flipVariations,f=n.allowedAutoPlacements,h=f===void 0?AM:f,p=dc(i),m=p?c?Ek:Ek.filter(function(O){return dc(O)===p}):od,v=m.filter(function(O){return h.indexOf(O)>=0});v.length===0&&(v=m);var b=v.reduce(function(O,S){return O[S]=Rf(t,{placement:S,boundary:r,rootBoundary:s,padding:a})[no(S)],O},{});return Object.keys(b).sort(function(O,S){return b[O]-b[S]})}function T6(t){if(no(t)===vO)return[];var e=Pp(t);return[Mk(t),e,Mk(e)]}function k6(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,s=r===void 0?!0:r,a=n.altAxis,c=a===void 0?!0:a,f=n.fallbackPlacements,h=n.padding,p=n.boundary,m=n.rootBoundary,v=n.altBoundary,b=n.flipVariations,O=b===void 0?!0:b,S=n.allowedAutoPlacements,C=e.options.placement,E=no(C),$=E===C,z=f||($||!O?[Pp(C)]:T6(C)),P=[C].concat(z).reduce(function(ue,Z){return ue.concat(no(Z)===vO?C6(e,{placement:Z,boundary:p,rootBoundary:m,padding:h,flipVariations:O,allowedAutoPlacements:S}):Z)},[]),R=e.rects.reference,L=e.rects.popper,M=new Map,B=!0,_=P[0],A=0;A<P.length;A++){var Q=P[A],T=no(Q),H=dc(Q)===cc,I=[hi,lr].indexOf(T)>=0,V=I?"width":"height",N=Rf(e,{placement:Q,boundary:p,rootBoundary:m,altBoundary:v,padding:h}),X=I?H?ar:pi:H?lr:hi;R[V]>L[V]&&(X=Pp(X));var Y=Pp(X),K=[];if(s&&K.push(N[T]<=0),c&&K.push(N[X]<=0,N[Y]<=0),K.every(function(ue){return ue})){_=Q,B=!1;break}M.set(Q,K)}if(B)for(var le=O?3:1,q=function(Z){var ie=P.find(function(de){var Te=M.get(de);if(Te)return Te.slice(0,Z).every(function(Ae){return Ae})});if(ie)return _=ie,"break"},G=le;G>0;G--){var se=q(G);if(se==="break")break}e.placement!==_&&(e.modifiersData[i]._skip=!0,e.placement=_,e.reset=!0)}}const E6={name:"flip",enabled:!0,phase:"main",fn:k6,requiresIfExists:["offset"],data:{_skip:!1}};function Pk(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function zk(t){return[hi,ar,lr,pi].some(function(e){return t[e]>=0})}function A6(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,a=Rf(e,{elementContext:"reference"}),c=Rf(e,{altBoundary:!0}),f=Pk(a,i),h=Pk(c,r,s),p=zk(f),m=zk(h);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:h,isReferenceHidden:p,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":m})}const R6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:A6};function M6(t,e,n){var i=no(t),r=[pi,hi].indexOf(i)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=s[0],c=s[1];return a=a||0,c=(c||0)*r,[pi,ar].indexOf(i)>=0?{x:c,y:a}:{x:a,y:c}}function D6(t){var e=t.state,n=t.options,i=t.name,r=n.offset,s=r===void 0?[0,0]:r,a=AM.reduce(function(p,m){return p[m]=M6(m,e.rects,s),p},{}),c=a[e.placement],f=c.x,h=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=h),e.modifiersData[i]=a}const P6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:D6};function z6(t){var e=t.state,n=t.name;e.modifiersData[n]=BM({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const $6={name:"popperOffsets",enabled:!0,phase:"read",fn:z6,data:{}};function B6(t){return t==="x"?"y":"x"}function L6(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,s=r===void 0?!0:r,a=n.altAxis,c=a===void 0?!1:a,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.padding,v=n.tether,b=v===void 0?!0:v,O=n.tetherOffset,S=O===void 0?0:O,C=Rf(e,{boundary:f,rootBoundary:h,padding:m,altBoundary:p}),E=no(e.placement),$=dc(e.placement),z=!$,P=xO(E),R=B6(P),L=e.modifiersData.popperOffsets,M=e.rects.reference,B=e.rects.popper,_=typeof S=="function"?S(Object.assign({},e.rects,{placement:e.placement})):S,A=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),Q=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,T={x:0,y:0};if(L){if(s){var H,I=P==="y"?hi:pi,V=P==="y"?lr:ar,N=P==="y"?"height":"width",X=L[P],Y=X+C[I],K=X-C[V],le=b?-B[N]/2:0,q=$===cc?M[N]:B[N],G=$===cc?-B[N]:-M[N],se=e.elements.arrow,ue=b&&se?OO(se):{width:0,height:0},Z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:DM(),ie=Z[I],de=Z[V],Te=af(0,M[N],ue[N]),Ae=z?M[N]/2-le-Te-ie-A.mainAxis:q-Te-ie-A.mainAxis,ke=z?-M[N]/2+le+Te+de+A.mainAxis:G+Te+de+A.mainAxis,Me=e.elements.arrow&&sd(e.elements.arrow),Re=Me?P==="y"?Me.clientTop||0:Me.clientLeft||0:0,vt=(H=Q?.[P])!=null?H:0,Be=X+Ae-vt-Re,Se=X+ke-vt,Xe=af(b?em(Y,Be):Y,X,b?Bl(K,Se):K);L[P]=Xe,T[P]=Xe-X}if(c){var $e,je=P==="x"?hi:pi,Ie=P==="x"?lr:ar,at=L[R],Ye=R==="y"?"height":"width",Ee=at+C[je],$i=at-C[Ie],Lt=[hi,pi].indexOf(E)!==-1,hr=($e=Q?.[R])!=null?$e:0,Wt=Lt?Ee:at-M[Ye]-B[Ye]-hr+A.altAxis,ut=Lt?at+M[Ye]+B[Ye]-hr-A.altAxis:$i,jt=b&&Lt?s6(Wt,at,ut):af(b?Wt:Ee,at,b?ut:$i);L[R]=jt,T[R]=jt-at}e.modifiersData[i]=T}}const j6={name:"preventOverflow",enabled:!0,phase:"main",fn:L6,requiresIfExists:["offset"]};function N6(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Q6(t){return t===zi(t)||!rr(t)?SO(t):N6(t)}function _6(t){var e=t.getBoundingClientRect(),n=uc(e.width)/t.offsetWidth||1,i=uc(e.height)/t.offsetHeight||1;return n!==1||i!==1}function q6(t,e,n){n===void 0&&(n=!1);var i=rr(e),r=rr(e)&&_6(e),s=Gs(e),a=fc(t,r,n),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&((ro(e)!=="body"||CO(s))&&(c=Q6(e)),rr(e)?(f=fc(e,!0),f.x+=e.clientLeft,f.y+=e.clientTop):s&&(f.x=wO(s))),{x:a.left+c.scrollLeft-f.x,y:a.top+c.scrollTop-f.y,width:a.width,height:a.height}}function I6(t){var e=new Map,n=new Set,i=[];t.forEach(function(s){e.set(s.name,s)});function r(s){n.add(s.name);var a=[].concat(s.requires||[],s.requiresIfExists||[]);a.forEach(function(c){if(!n.has(c)){var f=e.get(c);f&&r(f)}}),i.push(s)}return t.forEach(function(s){n.has(s.name)||r(s)}),i}function H6(t){var e=I6(t);return e6.reduce(function(n,i){return n.concat(e.filter(function(r){return r.phase===i}))},[])}function U6(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function W6(t){var e=t.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var $k={placement:"bottom",modifiers:[],strategy:"absolute"};function Bk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function V6(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,r=e.defaultOptions,s=r===void 0?$k:r;return function(c,f,h){h===void 0&&(h=s);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},$k,s),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},m=[],v=!1,b={state:p,setOptions:function(E){var $=typeof E=="function"?E(p.options):E;S(),p.options=Object.assign({},s,p.options,$),p.scrollParents={reference:Ql(c)?cf(c):c.contextElement?cf(c.contextElement):[],popper:cf(f)};var z=H6(W6([].concat(i,p.options.modifiers)));return p.orderedModifiers=z.filter(function(P){return P.enabled}),O(),b.update()},forceUpdate:function(){if(!v){var E=p.elements,$=E.reference,z=E.popper;if(Bk($,z)){p.rects={reference:q6($,sd(z),p.options.strategy==="fixed"),popper:OO(z)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(A){return p.modifiersData[A.name]=Object.assign({},A.data)});for(var P=0;P<p.orderedModifiers.length;P++){if(p.reset===!0){p.reset=!1,P=-1;continue}var R=p.orderedModifiers[P],L=R.fn,M=R.options,B=M===void 0?{}:M,_=R.name;typeof L=="function"&&(p=L({state:p,options:B,name:_,instance:b})||p)}}}},update:U6(function(){return new Promise(function(C){b.forceUpdate(),C(p)})}),destroy:function(){S(),v=!0}};if(!Bk(c,f))return b;b.setOptions(h).then(function(C){!v&&h.onFirstUpdate&&h.onFirstUpdate(C)});function O(){p.orderedModifiers.forEach(function(C){var E=C.name,$=C.options,z=$===void 0?{}:$,P=C.effect;if(typeof P=="function"){var R=P({state:p,name:E,instance:b,options:z}),L=function(){};m.push(R||L)}})}function S(){m.forEach(function(C){return C()}),m=[]}return b}}var X6=[g6,$6,p6,i6,P6,E6,j6,u6,R6],G6=V6({defaultModifiers:X6});function tm(t){return typeof t=="string"}function LM(t,e,n){return t===void 0||tm(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function jM(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(i=>i.match(/^on[A-Z]/)&&typeof t[i]=="function"&&!e.includes(i)).forEach(i=>{n[i]=t[i]}),n}function Lk(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function NM(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:i,externalForwardedProps:r,className:s}=t;if(!e){const b=ye(n?.className,s,r?.className,i?.className),O={...n?.style,...r?.style,...i?.style},S={...n,...r,...i};return b.length>0&&(S.className=b),Object.keys(O).length>0&&(S.style=O),{props:S,internalRef:void 0}}const a=jM({...r,...i}),c=Lk(i),f=Lk(r),h=e(a),p=ye(h?.className,n?.className,s,r?.className,i?.className),m={...h?.style,...n?.style,...r?.style,...i?.style},v={...h,...n,...f,...c};return p.length>0&&(v.className=p),Object.keys(m).length>0&&(v.style=m),{props:v,internalRef:h.ref}}function QM(t,e,n){return typeof t=="function"?t(e,n):t}function hc(t){const{elementType:e,externalSlotProps:n,ownerState:i,skipResolvingSlotProps:r=!1,...s}=t,a=r?{}:QM(n,i),{props:c,internalRef:f}=NM({...s,externalSlotProps:a}),h=mn(f,a?.ref,t.additionalProps?.ref);return LM(e,{...c,ref:h},i)}function jk(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function F6(t){return typeof t=="function"?t():t}const _M=k.forwardRef(function(e,n){const{children:i,container:r,disablePortal:s=!1}=e,[a,c]=k.useState(null),f=mn(k.isValidElement(i)?Vl(i):null,n);if(sr(()=>{s||c(F6(r)||document.body)},[r,s]),sr(()=>{if(a&&!s)return jk(n,a),()=>{jk(n,null)}},[n,a,s]),s){if(k.isValidElement(i)){const h={ref:f};return k.cloneElement(i,h)}return i}return a&&kM.createPortal(i,a)});function Y6(t){return He("MuiPopper",t)}Ue("MuiPopper",["root"]);function K6(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function _b(t){return typeof t=="function"?t():t}function Z6(t){return t.nodeType!==void 0}const J6=t=>{const{classes:e}=t;return Ve({root:["root"]},Y6,e)},e_={},t_=k.forwardRef(function(e,n){const{anchorEl:i,children:r,direction:s,disablePortal:a,modifiers:c,open:f,placement:h,popperOptions:p,popperRef:m,slotProps:v={},slots:b={},TransitionProps:O,ownerState:S,...C}=e,E=k.useRef(null),$=mn(E,n),z=k.useRef(null),P=mn(z,m),R=k.useRef(P);sr(()=>{R.current=P},[P]),k.useImperativeHandle(m,()=>z.current,[]);const L=K6(h,s),[M,B]=k.useState(L),[_,A]=k.useState(_b(i));k.useEffect(()=>{z.current&&z.current.forceUpdate()}),k.useEffect(()=>{i&&A(_b(i))},[i]),sr(()=>{if(!_||!f)return;const V=Y=>{B(Y.placement)};let N=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:Y})=>{V(Y)}}];c!=null&&(N=N.concat(c)),p&&p.modifiers!=null&&(N=N.concat(p.modifiers));const X=G6(_,E.current,{placement:L,...p,modifiers:N});return R.current(X),()=>{X.destroy(),R.current(null)}},[_,a,c,f,p,L]);const Q={placement:M};O!==null&&(Q.TransitionProps=O);const T=J6(e),H=b.root??"div",I=hc({elementType:H,externalSlotProps:v.root,externalForwardedProps:C,additionalProps:{role:"tooltip",ref:$},ownerState:e,className:T.root});return x.jsx(H,{...I,children:typeof r=="function"?r(Q):r})}),n_=k.forwardRef(function(e,n){const{anchorEl:i,children:r,container:s,direction:a="ltr",disablePortal:c=!1,keepMounted:f=!1,modifiers:h,open:p,placement:m="bottom",popperOptions:v=e_,popperRef:b,style:O,transition:S=!1,slotProps:C={},slots:E={},...$}=e,[z,P]=k.useState(!0),R=()=>{P(!1)},L=()=>{P(!0)};if(!f&&!p&&(!S||z))return null;let M;if(s)M=s;else if(i){const A=_b(i);M=A&&Z6(A)?Hn(A).body:Hn(null).body}const B=!p&&f&&(!S||z)?"none":void 0,_=S?{in:p,onEnter:R,onExited:L}:void 0;return x.jsx(_M,{disablePortal:c,container:M,children:x.jsx(t_,{anchorEl:i,direction:a,disablePortal:c,modifiers:h,ref:n,open:S?!z:p,placement:m,popperOptions:v,popperRef:b,slotProps:C,slots:E,...$,style:{position:"fixed",top:0,left:0,display:B,...O},TransitionProps:_,children:r})})}),i_=ge(n_,{name:"MuiPopper",slot:"Root"})({}),qM=k.forwardRef(function(e,n){const i=Tc(),r=qe({props:e,name:"MuiPopper"}),{anchorEl:s,component:a,components:c,componentsProps:f,container:h,disablePortal:p,keepMounted:m,modifiers:v,open:b,placement:O,popperOptions:S,popperRef:C,transition:E,slots:$,slotProps:z,...P}=r,R=$?.root??c?.Root,L={anchorEl:s,container:h,disablePortal:p,keepMounted:m,modifiers:v,open:b,placement:O,popperOptions:S,popperRef:C,transition:E,...P};return x.jsx(i_,{as:a,direction:i?"rtl":"ltr",slots:{root:R},slotProps:z??f,...L,ref:n})});function or(t){const e=k.useRef(t);return sr(()=>{e.current=t}),k.useRef((...n)=>(0,e.current)(...n)).current}function IM(t){const{controlled:e,default:n,name:i,state:r="value"}=t,{current:s}=k.useRef(e!==void 0),[a,c]=k.useState(n),f=s?e:a,h=k.useCallback(p=>{s||c(p)},[]);return[f,h]}function Ne(t,e){const{className:n,elementType:i,ownerState:r,externalForwardedProps:s,internalForwardedProps:a,shouldForwardComponentProp:c=!1,...f}=e,{component:h,slots:p={[t]:void 0},slotProps:m={[t]:void 0},...v}=s,b=p[t]||i,O=QM(m[t],r),{props:{component:S,...C},internalRef:E}=NM({className:n,...f,externalForwardedProps:t==="root"?v:void 0,externalSlotProps:O}),$=mn(E,O?.ref,e.ref),z=t==="root"?S||h:S,P=LM(b,{...t==="root"&&!h&&!p[t]&&a,...t!=="root"&&!p[t]&&a,...C,...z&&!c&&{as:z},...z&&c&&{component:z},ref:$},r);return[b,P]}function r_(t){return He("MuiTooltip",t)}const Zt=Ue("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function o_(t){return Math.round(t*1e5)/1e5}const s_=t=>{const{classes:e,disableInteractive:n,arrow:i,touch:r,placement:s}=t,a={popper:["popper",!n&&"popperInteractive",i&&"popperArrow"],tooltip:["tooltip",i&&"tooltipArrow",r&&"touch",`tooltipPlacement${pe(s.split("-")[0])}`],arrow:["arrow"]};return Ve(a,r_,e)},l_=ge(qM,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(Ke(({theme:t})=>({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${Zt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Zt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Zt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Zt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Zt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${Zt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Zt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${Zt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),a_=ge("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${pe(n.placement.split("-")[0])}`]]}})(Ke(({theme:t})=>({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:t.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium,[`.${Zt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Zt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Zt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${o_(16/14)}em`,fontWeight:t.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${Zt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Zt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Zt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${Zt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),c_=ge("span",{name:"MuiTooltip",slot:"Arrow"})(Ke(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:t.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let $h=!1;const Nk=new Zm;let Mu={x:0,y:0};function Bh(t,e){return(n,...i)=>{e&&e(n,...i),t(n,...i)}}const oo=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTooltip"}),{arrow:r=!1,children:s,classes:a,components:c={},componentsProps:f={},describeChild:h=!1,disableFocusListener:p=!1,disableHoverListener:m=!1,disableInteractive:v=!1,disableTouchListener:b=!1,enterDelay:O=100,enterNextDelay:S=0,enterTouchDelay:C=700,followCursor:E=!1,id:$,leaveDelay:z=0,leaveTouchDelay:P=1500,onClose:R,onOpen:L,open:M,placement:B="bottom",PopperComponent:_,PopperProps:A={},slotProps:Q={},slots:T={},title:H,TransitionComponent:I,TransitionProps:V,...N}=i,X=k.isValidElement(s)?s:x.jsx("span",{children:s}),Y=Er(),K=Tc(),[le,q]=k.useState(),[G,se]=k.useState(null),ue=k.useRef(!1),Z=v||E,ie=El(),de=El(),Te=El(),Ae=El(),[ke,Me]=IM({controlled:M,default:!1,name:"Tooltip",state:"open"});let Re=ke;const vt=Gm($),Be=k.useRef(),Se=or(()=>{Be.current!==void 0&&(document.body.style.WebkitUserSelect=Be.current,Be.current=void 0),Ae.clear()});k.useEffect(()=>Se,[Se]);const Xe=Qe=>{Nk.clear(),$h=!0,Me(!0),L&&!Re&&L(Qe)},$e=or(Qe=>{Nk.start(800+z,()=>{$h=!1}),Me(!1),R&&Re&&R(Qe),ie.start(Y.transitions.duration.shortest,()=>{ue.current=!1})}),je=Qe=>{ue.current&&Qe.type!=="touchstart"||(le&&le.removeAttribute("title"),de.clear(),Te.clear(),O||$h&&S?de.start($h?S:O,()=>{Xe(Qe)}):Xe(Qe))},Ie=Qe=>{de.clear(),Te.start(z,()=>{$e(Qe)})},[,at]=k.useState(!1),Ye=Qe=>{ac(Qe.target)||(at(!1),Ie(Qe))},Ee=Qe=>{le||q(Qe.currentTarget),ac(Qe.target)&&(at(!0),je(Qe))},$i=Qe=>{ue.current=!0;const Jn=X.props;Jn.onTouchStart&&Jn.onTouchStart(Qe)},Lt=Qe=>{$i(Qe),Te.clear(),ie.clear(),Se(),Be.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ae.start(C,()=>{document.body.style.WebkitUserSelect=Be.current,je(Qe)})},hr=Qe=>{X.props.onTouchEnd&&X.props.onTouchEnd(Qe),Se(),Te.start(P,()=>{$e(Qe)})};k.useEffect(()=>{if(!Re)return;function Qe(Jn){Jn.key==="Escape"&&$e(Jn)}return document.addEventListener("keydown",Qe),()=>{document.removeEventListener("keydown",Qe)}},[$e,Re]);const Wt=mn(Vl(X),q,n);!H&&H!==0&&(Re=!1);const ut=k.useRef(),jt=Qe=>{const Jn=X.props;Jn.onMouseMove&&Jn.onMouseMove(Qe),Mu={x:Qe.clientX,y:Qe.clientY},ut.current&&ut.current.update()},on={},Bi=typeof H=="string";h?(on.title=!Re&&Bi&&!m?H:null,on["aria-describedby"]=Re?vt:null):(on["aria-label"]=Bi?H:null,on["aria-labelledby"]=Re&&!Bi?vt:null);const wn={...on,...N,...X.props,className:ye(N.className,X.props.className),onTouchStart:$i,ref:Wt,...E?{onMouseMove:jt}:{}},Pr={};b||(wn.onTouchStart=Lt,wn.onTouchEnd=hr),m||(wn.onMouseOver=Bh(je,wn.onMouseOver),wn.onMouseLeave=Bh(Ie,wn.onMouseLeave),Z||(Pr.onMouseOver=je,Pr.onMouseLeave=Ie)),p||(wn.onFocus=Bh(Ee,wn.onFocus),wn.onBlur=Bh(Ye,wn.onBlur),Z||(Pr.onFocus=Ee,Pr.onBlur=Ye));const Wn={...i,isRtl:K,arrow:r,disableInteractive:Z,placement:B,PopperComponentProp:_,touch:ue.current},Vt=typeof Q.popper=="function"?Q.popper(Wn):Q.popper,Vn=k.useMemo(()=>{let Qe=[{name:"arrow",enabled:!!G,options:{element:G,padding:4}}];return A.popperOptions?.modifiers&&(Qe=Qe.concat(A.popperOptions.modifiers)),Vt?.popperOptions?.modifiers&&(Qe=Qe.concat(Vt.popperOptions.modifiers)),{...A.popperOptions,...Vt?.popperOptions,modifiers:Qe}},[G,A.popperOptions,Vt?.popperOptions]),gn=s_(Wn),zc=typeof Q.transition=="function"?Q.transition(Wn):Q.transition,uo={slots:{popper:c.Popper,transition:c.Transition??I,tooltip:c.Tooltip,arrow:c.Arrow,...T},slotProps:{arrow:Q.arrow??f.arrow,popper:{...A,...Vt??f.popper},tooltip:Q.tooltip??f.tooltip,transition:{...V,...zc??f.transition}}},[Ko,Zo]=Ne("popper",{elementType:l_,externalForwardedProps:uo,ownerState:Wn,className:ye(gn.popper,A?.className)}),[Jo,zr]=Ne("transition",{elementType:Ef,externalForwardedProps:uo,ownerState:Wn}),[pr,es]=Ne("tooltip",{elementType:a_,className:gn.tooltip,externalForwardedProps:uo,ownerState:Wn}),[fo,$c]=Ne("arrow",{elementType:c_,className:gn.arrow,externalForwardedProps:uo,ownerState:Wn,ref:se});return x.jsxs(k.Fragment,{children:[k.cloneElement(X,wn),x.jsx(Ko,{as:_??qM,placement:B,anchorEl:E?{getBoundingClientRect:()=>({top:Mu.y,left:Mu.x,right:Mu.x,bottom:Mu.y,width:0,height:0})}:le,popperRef:ut,open:le?Re:!1,id:vt,transition:!0,...Pr,...Zo,popperOptions:Vn,children:({TransitionProps:Qe})=>x.jsx(Jo,{timeout:Y.transitions.duration.shorter,...Qe,...zr,children:x.jsxs(pr,{...es,children:[H,r?x.jsx(fo,{...$c}):null]})})})]})});function u_({sx:t}){const e=zt(r=>r.loadingLevel),n=zt(r=>r.connection.state),i=n==="closed"||n==="open"&&e===0;return x.jsx(Ac,{elevation:4,sx:[{display:"flex",alignSelf:"center"},...Array.isArray(t)?t:[t]],children:x.jsx(oo,{title:`${e} pending request${e>1?"s":""}.`,children:x.jsx(hO,{sx:r=>({m:1,transition:r.transitions.create(["color"],{easing:r.transitions.easing.sharp,duration:r.transitions.duration.standard}),color:{connecting:Db[200],closed:bl[900]}[n]}),variant:i?"determinate":void 0,value:i?100:void 0})})})}let qb=[],HM=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?HM:qb).push(n=n+t[e])})();function f_(t){if(t<768)return!1;for(let e=0,n=qb.length;;){let i=e+n>>1;if(t<qb[i])n=i;else if(t>=HM[i])e=i+1;else return!0;if(e==n)return!1}}function Qk(t){return t>=127462&&t<=127487}const _k=8205;function d_(t,e,n=!0,i=!0){return(n?UM:h_)(t,e,i)}function UM(t,e,n){if(e==t.length)return e;e&&WM(t.charCodeAt(e))&&VM(t.charCodeAt(e-1))&&e--;let i=tv(t,e);for(e+=qk(i);e<t.length;){let r=tv(t,e);if(i==_k||r==_k||n&&f_(r))e+=qk(r),i=r;else if(Qk(r)){let s=0,a=e-2;for(;a>=0&&Qk(tv(t,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function h_(t,e,n){for(;e>0;){let i=UM(t,e-2,n);if(i<e)return i;e--}return 0}function tv(t,e){let n=t.charCodeAt(e);if(!VM(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return WM(i)?(n-55296<<10)+(i-56320)+65536:n}function WM(t){return t>=56320&&t<57344}function VM(t){return t>=55296&&t<56320}function qk(t){return t<65536?1:2}class ft{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=pc(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Fr.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=pc(this,e,n);let i=[];return this.decompose(e,n,i,0),Fr.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new uf(this),s=new uf(e);for(let a=n,c=n;;){if(r.next(a),s.next(a),a=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(c+=r.value.length,r.done||c>=i)return!0}}iter(e=1){return new uf(this,e)}iterRange(e,n=this.length){return new XM(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new GM(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?ft.empty:e.length<=32?new nn(e):Fr.from(nn.split(e,[]))}}class nn extends ft{constructor(e,n=p_(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.text[s],c=r+a.length;if((n?i:c)>=e)return new m_(r,c,i,a);r=c+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new nn(Ik(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let a=i.pop(),c=zp(s.text,a.text.slice(),0,s.length);if(c.length<=32)i.push(new nn(c,a.length+s.length));else{let f=c.length>>1;i.push(new nn(c.slice(0,f)),new nn(c.slice(f)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof nn))return super.replace(e,n,i);[e,n]=pc(this,e,n);let r=zp(this.text,zp(i.text,Ik(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new nn(r,s):Fr.from(nn.split(r,[]),s)}sliceString(e,n=this.length,i=`
72
+ `){[e,n]=pc(this,e,n);let r="";for(let s=0,a=0;s<=n&&a<this.text.length;a++){let c=this.text[a],f=s+c.length;s>e&&a&&(r+=i),e<f&&n>s&&(r+=c.slice(Math.max(0,e-s),n-s)),s=f+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new nn(i,r)),i=[],r=-1);return r>-1&&n.push(new nn(i,r)),n}}class Fr extends ft{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.children[s],c=r+a.length,f=i+a.lines-1;if((n?f:c)>=e)return a.lineInner(e,n,i,r);r=c+1,i=f+1}}decompose(e,n,i,r){for(let s=0,a=0;a<=n&&s<this.children.length;s++){let c=this.children[s],f=a+c.length;if(e<=f&&n>=a){let h=r&((a<=e?1:0)|(f>=n?2:0));a>=e&&f<=n&&!h?i.push(c):c.decompose(e-a,n-a,i,h)}a=f+1}}replace(e,n,i){if([e,n]=pc(this,e,n),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let a=this.children[r],c=s+a.length;if(e>=s&&n<=c){let f=a.replace(e-s,n-s,i),h=this.lines-a.lines+f.lines;if(f.lines<h>>4&&f.lines>h>>6){let p=this.children.slice();return p[r]=f,new Fr(p,this.length-(n-e)+i.length)}return super.replace(s,c,f)}s=c+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=`
73
+ `){[e,n]=pc(this,e,n);let r="";for(let s=0,a=0;s<this.children.length&&a<=n;s++){let c=this.children[s],f=a+c.length;a>e&&s&&(r+=i),e<f&&n>a&&(r+=c.sliceString(e-a,n-a,i)),a=f+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Fr))return 0;let i=0,[r,s,a,c]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==a||s==c)return i;let f=this.children[r],h=e.children[s];if(f!=h)return i+f.scanIdentical(h,n);i+=f.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let b of e)i+=b.lines;if(i<32){let b=[];for(let O of e)O.flatten(b);return new nn(b,n)}let r=Math.max(32,i>>5),s=r<<1,a=r>>1,c=[],f=0,h=-1,p=[];function m(b){let O;if(b.lines>s&&b instanceof Fr)for(let S of b.children)m(S);else b.lines>a&&(f>a||!f)?(v(),c.push(b)):b instanceof nn&&f&&(O=p[p.length-1])instanceof nn&&b.lines+O.lines<=32?(f+=b.lines,h+=b.length+1,p[p.length-1]=new nn(O.text.concat(b.text),O.length+1+b.length)):(f+b.lines>r&&v(),f+=b.lines,h+=b.length+1,p.push(b))}function v(){f!=0&&(c.push(p.length==1?p[0]:Fr.from(p,h)),h=-1,f=p.length=0)}for(let b of e)m(b);return v(),c.length==1?c[0]:new Fr(c,n)}}ft.empty=new nn([""],0);function p_(t){let e=-1;for(let n of t)e+=n.length+1;return e}function zp(t,e,n=0,i=1e9){for(let r=0,s=0,a=!0;s<t.length&&r<=i;s++){let c=t[s],f=r+c.length;f>=n&&(f>i&&(c=c.slice(0,i-r)),r<n&&(c=c.slice(n-r)),a?(e[e.length-1]+=c,a=!1):e.push(c)),r=f+1}return e}function Ik(t,e,n){return zp(t,[""],e,n)}class uf{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof nn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],a=s>>1,c=r instanceof nn?r.text.length:r.children.length;if(a==(n>0?c:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=`
74
+ `,this;e--}else if(r instanceof nn){let f=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,f.length>Math.max(0,e))return this.value=e==0?f:n>0?f.slice(e):f.slice(0,f.length-e),this;e-=f.length}else{let f=r.children[a+(n<0?-1:0)];e>f.length?(e-=f.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(f),this.offsets.push(n>0?1:(f instanceof nn?f.text.length:f.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class XM{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new uf(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class GM{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ft.prototype[Symbol.iterator]=function(){return this.iter()},uf.prototype[Symbol.iterator]=XM.prototype[Symbol.iterator]=GM.prototype[Symbol.iterator]=function(){return this});class m_{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}}function pc(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Sn(t,e,n=!0,i=!0){return d_(t,e,n,i)}function g_(t){return t>=56320&&t<57344}function y_(t){return t>=55296&&t<56320}function ci(t,e){let n=t.charCodeAt(e);if(!y_(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return g_(i)?(n-55296<<10)+(i-56320)+65536:n}function TO(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Yr(t){return t<65536?1:2}const Ib=/\r\n?|\n/;var Nn=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(Nn||(Nn={}));class io{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n+1];e+=i<0?this.sections[n]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,i=0,r=0;n<this.sections.length;){let s=this.sections[n++],a=this.sections[n++];a<0?(e(i,r,s),r+=s):r+=a,i+=s}}iterChangedRanges(e,n=!1){Hb(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];r<0?e.push(i,r):e.push(r,i)}return new io(e)}composeDesc(e){return this.empty?e:e.empty?this:FM(this,e)}mapDesc(e,n=!1){return e.empty?this:Ub(this,e,n)}mapPos(e,n=-1,i=Nn.Simple){let r=0,s=0;for(let a=0;a<this.sections.length;){let c=this.sections[a++],f=this.sections[a++],h=r+c;if(f<0){if(h>e)return s+(e-r);s+=c}else{if(i!=Nn.Simple&&h>=e&&(i==Nn.TrackDel&&r<e&&h>e||i==Nn.TrackBefore&&r<e||i==Nn.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!c)return e==r||n<0?s:s+f;s+=f}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i<this.sections.length&&r<=n;){let s=this.sections[i++],a=this.sections[i++],c=r+s;if(a>=0&&r<=n&&c>=e)return r<e&&c>n?"cover":!0;r=c}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new io(e)}static create(e){return new io(e)}}class On extends io{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Hb(this,(n,i,r,s,a)=>e=e.replace(r,r+(i-n),a),!1),e}mapDesc(e,n=!1){return Ub(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r<n.length;r+=2){let a=n[r],c=n[r+1];if(c>=0){n[r]=c,n[r+1]=a;let f=r>>1;for(;i.length<f;)i.push(ft.empty);i.push(a?e.slice(s,s+a):ft.empty)}s+=a}return new On(n,i)}compose(e){return this.empty?e:e.empty?this:FM(this,e,!0)}map(e,n=!1){return e.empty?this:Ub(this,e,n,!0)}iterChanges(e,n=!1){Hb(this,e,n)}get desc(){return io.create(this.sections)}filter(e){let n=[],i=[],r=[],s=new Mf(this);e:for(let a=0,c=0;;){let f=a==e.length?1e9:e[a++];for(;c<f||c==f&&s.len==0;){if(s.done)break e;let p=Math.min(s.len,f-c);In(r,p,-1);let m=s.ins==-1?-1:s.off==0?s.ins:0;In(n,p,m),m>0&&Ps(i,n,s.text),s.forward(p),c+=p}let h=e[a++];for(;c<h;){if(s.done)break e;let p=Math.min(s.len,h-c);In(n,p,-1),In(r,p,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(p),c+=p}}return{changes:new On(n,i),filtered:io.create(r)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n],r=this.sections[n+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],a=0,c=null;function f(p=!1){if(!p&&!r.length)return;a<n&&In(r,n-a,-1);let m=new On(r,s);c=c?c.compose(m.map(c)):m,r=[],s=[],a=0}function h(p){if(Array.isArray(p))for(let m of p)h(m);else if(p instanceof On){if(p.length!=n)throw new RangeError(`Mismatched change set length (got ${p.length}, expected ${n})`);f(),c=c?c.compose(p.map(c)):p}else{let{from:m,to:v=m,insert:b}=p;if(m>v||m<0||v>n)throw new RangeError(`Invalid change range ${m} to ${v} (in doc of length ${n})`);let O=b?typeof b=="string"?ft.of(b.split(i||Ib)):b:ft.empty,S=O.length;if(m==v&&S==0)return;m<a&&f(),m>a&&In(r,m-a,-1),In(r,v-m,S),Ps(s,r,O),a=v}}return h(e),f(!c),c}static empty(e){return new On(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((a,c)=>c&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length<r;)i.push(ft.empty);i[r]=ft.of(s.slice(1)),n.push(s[0],i[r].length)}}}return new On(n,i)}static createSet(e,n){return new On(e,n)}}function In(t,e,n,i=!1){if(e==0&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Ps(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push(ft.empty);t.push(n)}}function Hb(t,e,n){let i=t.inserted;for(let r=0,s=0,a=0;a<t.sections.length;){let c=t.sections[a++],f=t.sections[a++];if(f<0)r+=c,s+=c;else{let h=r,p=s,m=ft.empty;for(;h+=c,p+=f,f&&i&&(m=m.append(i[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)c=t.sections[a++],f=t.sections[a++];e(r,h,s,p,m),r=h,s=p}}}function Ub(t,e,n,i=!1){let r=[],s=i?[]:null,a=new Mf(t),c=new Mf(e);for(let f=-1;;){if(a.done&&c.len||c.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&c.ins==-1){let h=Math.min(a.len,c.len);In(r,h,-1),a.forward(h),c.forward(h)}else if(c.ins>=0&&(a.ins<0||f==a.i||a.off==0&&(c.len<a.len||c.len==a.len&&!n))){let h=c.len;for(In(r,c.ins,-1);h;){let p=Math.min(a.len,h);a.ins>=0&&f<a.i&&a.len<=p&&(In(r,0,a.ins),s&&Ps(s,r,a.text),f=a.i),a.forward(p),h-=p}c.next()}else if(a.ins>=0){let h=0,p=a.len;for(;p;)if(c.ins==-1){let m=Math.min(p,c.len);h+=m,p-=m,c.forward(m)}else if(c.ins==0&&c.len<p)p-=c.len,c.next();else break;In(r,h,f<a.i?a.ins:0),s&&f<a.i&&Ps(s,r,a.text),f=a.i,a.forward(a.len-p)}else{if(a.done&&c.done)return s?On.createSet(r,s):io.create(r);throw new Error("Mismatched change set lengths")}}}function FM(t,e,n=!1){let i=[],r=n?[]:null,s=new Mf(t),a=new Mf(e);for(let c=!1;;){if(s.done&&a.done)return r?On.createSet(i,r):io.create(i);if(s.ins==0)In(i,s.len,0,c),s.next();else if(a.len==0&&!a.done)In(i,0,a.ins,c),r&&Ps(r,i,a.text),a.next();else{if(s.done||a.done)throw new Error("Mismatched change set lengths");{let f=Math.min(s.len2,a.len),h=i.length;if(s.ins==-1){let p=a.ins==-1?-1:a.off?0:a.ins;In(i,f,p,c),r&&p&&Ps(r,i,a.text)}else a.ins==-1?(In(i,s.off?0:s.len,f,c),r&&Ps(r,i,s.textBit(f))):(In(i,s.off?0:s.len,a.off?0:a.ins,c),r&&!a.off&&Ps(r,i,a.text));c=(s.ins>f||a.ins>=0&&a.len>f)&&(c||i.length>h),s.forward2(f),a.forward(f)}}}}class Mf{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?ft.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?ft.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Rl{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Rl(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ce.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ce.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ce.range(e.anchor,e.head)}static create(e,n,i){return new Rl(e,n,i)}}class ce{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ce.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ce([this.main],0)}addRange(e,n=!0){return ce.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let i=this.ranges.slice();return i[n]=e,ce.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ce(e.ranges.map(n=>Rl.fromJSON(n)),e.main)}static single(e,n=e){return new ce([ce.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return ce.normalized(e.slice(),n);i=s.to}return new ce(e,n)}static cursor(e,n=0,i,r){return Rl.create(e,e,(n==0?0:n<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,n,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return n<e?Rl.create(n,e,48|s):Rl.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],a=e[r-1];if(s.empty?s.from<=a.to:s.from<a.to){let c=a.from,f=Math.max(s.to,a.to);r<=n&&n--,e.splice(--r,2,s.anchor>s.head?ce.range(f,c):ce.range(c,f))}}return new ce(e,n)}}function YM(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let kO=0;class ve{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=kO++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new ve(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:EO),!!e.static,e.enables)}of(e){return new $p([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new $p(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new $p(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function EO(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class $p{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=kO++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,a=e[s]>>1,c=this.type==2,f=!1,h=!1,p=[];for(let m of this.dependencies)m=="doc"?f=!0:m=="selection"?h=!0:(((n=e[m.id])!==null&&n!==void 0?n:1)&1)==0&&p.push(e[m.id]);return{create(m){return m.values[a]=i(m),1},update(m,v){if(f&&v.docChanged||h&&(v.docChanged||v.selection)||Wb(m,p)){let b=i(m);if(c?!Hk(b,m.values[a],r):!r(b,m.values[a]))return m.values[a]=b,1}return 0},reconfigure:(m,v)=>{let b,O=v.config.address[s];if(O!=null){let S=im(v,O);if(this.dependencies.every(C=>C instanceof ve?v.facet(C)===m.facet(C):C instanceof An?v.field(C,!1)==m.field(C,!1):!0)||(c?Hk(b=i(m),S,r):r(b=i(m),S)))return m.values[a]=S,0}else b=i(m);return m.values[a]=b,1}}}}function Hk(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function Wb(t,e){let n=!1;for(let i of e)ff(t,i)&1&&(n=!0);return n}function v_(t,e,n){let i=n.map(f=>t[f.id]),r=n.map(f=>f.type),s=i.filter(f=>!(f&1)),a=t[e.id]>>1;function c(f){let h=[];for(let p=0;p<i.length;p++){let m=im(f,i[p]);if(r[p]==2)for(let v of m)h.push(v);else h.push(m)}return e.combine(h)}return{create(f){for(let h of i)ff(f,h);return f.values[a]=c(f),1},update(f,h){if(!Wb(f,s))return 0;let p=c(f);return e.compare(p,f.values[a])?0:(f.values[a]=p,1)},reconfigure(f,h){let p=Wb(f,i),m=h.config.facets[e.id],v=h.facet(e);if(m&&!p&&EO(n,m))return f.values[a]=v,0;let b=c(f);return e.compare(b,v)?(f.values[a]=v,0):(f.values[a]=b,1)}}}const Lh=ve.define({static:!0});class An{constructor(e,n,i,r,s){this.id=e,this.createF=n,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let n=new An(kO++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Lh).find(i=>i.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],a=this.updateF(s,r);return this.compareF(s,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>{let s=i.facet(Lh),a=r.facet(Lh),c;return(c=s.find(f=>f.field==this))&&c!=a.find(f=>f.field==this)?(i.values[n]=c.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,Lh.of({field:this,create:e})]}get extension(){return this}}const Cl={lowest:4,low:3,default:2,high:1,highest:0};function Du(t){return e=>new KM(e,t)}const so={highest:Du(Cl.highest),high:Du(Cl.high),default:Du(Cl.default),low:Du(Cl.low),lowest:Du(Cl.lowest)};class KM{constructor(e,n){this.inner=e,this.prec=n}}class eg{of(e){return new Vb(this,e)}reconfigure(e){return eg.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Vb{constructor(e,n){this.compartment=e,this.inner=n}}class nm{constructor(e,n,i,r,s,a){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,i){let r=[],s=Object.create(null),a=new Map;for(let v of b_(e,n,a))v instanceof An?r.push(v):(s[v.facet.id]||(s[v.facet.id]=[])).push(v);let c=Object.create(null),f=[],h=[];for(let v of r)c[v.id]=h.length<<1,h.push(b=>v.slot(b));let p=i?.config.facets;for(let v in s){let b=s[v],O=b[0].facet,S=p&&p[v]||[];if(b.every(C=>C.type==0))if(c[O.id]=f.length<<1|1,EO(S,b))f.push(i.facet(O));else{let C=O.combine(b.map(E=>E.value));f.push(i&&O.compare(C,i.facet(O))?i.facet(O):C)}else{for(let C of b)C.type==0?(c[C.id]=f.length<<1|1,f.push(C.value)):(c[C.id]=h.length<<1,h.push(E=>C.dynamicSlot(E)));c[O.id]=h.length<<1,h.push(C=>v_(C,O,b))}}let m=h.map(v=>v(c));return new nm(e,a,m,c,f,s)}}function b_(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(a,c){let f=r.get(a);if(f!=null){if(f<=c)return;let h=i[f].indexOf(a);h>-1&&i[f].splice(h,1),a instanceof Vb&&n.delete(a.compartment)}if(r.set(a,c),Array.isArray(a))for(let h of a)s(h,c);else if(a instanceof Vb){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(a.compartment)||a.inner;n.set(a.compartment,h),s(h,c)}else if(a instanceof KM)s(a.inner,a.prec);else if(a instanceof An)i[c].push(a),a.provides&&s(a.provides,c);else if(a instanceof $p)i[c].push(a),a.facet.extensions&&s(a.facet.extensions,Cl.default);else{let h=a.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,c)}}return s(t,Cl.default),i.reduce((a,c)=>a.concat(c))}function ff(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function im(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const ZM=ve.define(),Xb=ve.define({combine:t=>t.some(e=>e),static:!0}),JM=ve.define({combine:t=>t.length?t[0]:void 0,static:!0}),e5=ve.define(),t5=ve.define(),n5=ve.define(),i5=ve.define({combine:t=>t.length?t[0]:!1});class ao{constructor(e,n){this.type=e,this.value=n}static define(){return new O_}}class O_{of(e){return new ao(this,e)}}class x_{constructor(e){this.map=e}of(e){return new Le(this,e)}}class Le{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Le(this.type,n)}is(e){return this.type==e}static define(e={}){return new x_(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}Le.reconfigure=Le.define();Le.appendConfig=Le.define();class hn{constructor(e,n,i,r,s,a){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,i&&YM(i,n.newLength),s.some(c=>c.type==hn.time)||(this.annotations=s.concat(hn.time.of(Date.now())))}static create(e,n,i,r,s,a){return new hn(e,n,i,r,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(hn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}hn.time=ao.define();hn.userEvent=ao.define();hn.addToHistory=ao.define();hn.remote=ao.define();function S_(t,e){let n=[];for(let i=0,r=0;;){let s,a;if(i<t.length&&(r==e.length||e[r]>=t[i]))s=t[i++],a=t[i++];else if(r<e.length)s=e[r++],a=e[r++];else return n;!n.length||n[n.length-1]<s?n.push(s,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function r5(t,e,n){var i;let r,s,a;return n?(r=e.changes,s=On.empty(e.changes.length),a=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(r)),{changes:a,selection:e.selection?e.selection.map(s):(i=t.selection)===null||i===void 0?void 0:i.map(r),effects:Le.mapEffects(t.effects,r).concat(Le.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Gb(t,e,n){let i=e.selection,r=Ja(e.annotations);return e.userEvent&&(r=r.concat(hn.userEvent.of(e.userEvent))),{changes:e.changes instanceof On?e.changes:On.of(e.changes||[],n,t.facet(JM)),selection:i&&(i instanceof ce?i:ce.single(i.anchor,i.head)),effects:Ja(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function o5(t,e,n){let i=Gb(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let a=!!e[s].sequential;i=r5(i,Gb(t,e[s],a?i.changes.newLength:t.doc.length),a)}let r=hn.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return C_(n?w_(r):r)}function w_(t){let e=t.startState,n=!0;for(let r of e.facet(e5)){let s=r(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:S_(n,s))}if(n!==!0){let r,s;if(n===!1)s=t.changes.invertedDesc,r=On.empty(e.doc.length);else{let a=t.changes.filter(n);r=a.changes,s=a.filtered.mapDesc(a.changes).invertedDesc}t=hn.create(e,r,t.selection&&t.selection.map(s),Le.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(t5);for(let r=i.length-1;r>=0;r--){let s=i[r](t);s instanceof hn?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof hn?t=s[0]:t=o5(e,Ja(s),!1)}return t}function C_(t){let e=t.startState,n=e.facet(n5),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=r5(i,Gb(e,s,t.changes.newLength),!0))}return i==t?t:hn.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const T_=[];function Ja(t){return t==null?T_:Array.isArray(t)?t:[t]}var It=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(It||(It={}));const k_=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Fb;try{Fb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function E_(t){if(Fb)return Fb.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||k_.test(n)))return!0}return!1}function A_(t){return e=>{if(!/\S/.test(e))return It.Space;if(E_(e))return It.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return It.Word;return It.Other}}class tt{constructor(e,n,i,r,s,a){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)ff(this,c<<1);this.computeSlot=null}field(e,n=!0){let i=this.config.address[e.id];if(i==null){if(n)throw new RangeError("Field is not present in this state");return}return ff(this,i),im(this,i)}update(...e){return o5(this,e,!0)}applyTransaction(e){let n=this.config,{base:i,compartments:r}=n;for(let c of e.effects)c.is(eg.reconfigure)?(n&&(r=new Map,n.compartments.forEach((f,h)=>r.set(h,f)),n=null),r.set(c.value.compartment,c.value.extension)):c.is(Le.reconfigure)?(n=null,i=c.value):c.is(Le.appendConfig)&&(n=null,i=Ja(i).concat(c.value));let s;n?s=e.startState.values.slice():(n=nm.resolve(i,r,this),s=new tt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(f,h)=>h.reconfigure(f,this),null).values);let a=e.startState.facet(Xb)?e.newSelection:e.newSelection.asSingle();new tt(n,e.newDoc,a,s,(c,f)=>f.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ce.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],a=Ja(i.effects);for(let c=1;c<n.ranges.length;c++){let f=e(n.ranges[c]),h=this.changes(f.changes),p=h.map(r);for(let v=0;v<c;v++)s[v]=s[v].map(p);let m=r.mapDesc(h,!0);s.push(f.range.map(m)),r=r.compose(p),a=Le.mapEffects(a,p).concat(Le.mapEffects(Ja(f.effects),m))}return{changes:r,selection:ce.create(s,n.mainIndex),effects:a}}changes(e=[]){return e instanceof On?e:On.of(e,this.doc.length,this.facet(tt.lineSeparator))}toText(e){return ft.of(e.split(this.facet(tt.lineSeparator)||Ib))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(ff(this,n),im(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof An&&this.config.address[r.id]!=null&&(n[i]=r.spec.toJSON(this.field(e[i]),this))}return n}static fromJSON(e,n={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let a=i[s],c=e[s];r.push(a.init(f=>a.spec.fromJSON(c,f)))}}return tt.create({doc:e.doc,selection:ce.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=nm.resolve(e.extensions||[],new Map),i=e.doc instanceof ft?e.doc:ft.of((e.doc||"").split(n.staticFacet(tt.lineSeparator)||Ib)),r=e.selection?e.selection instanceof ce?e.selection:ce.single(e.selection.anchor,e.selection.head):ce.single(0);return YM(r,i.length),n.staticFacet(Xb)||(r=r.asSingle()),new tt(n,i,r,n.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(tt.tabSize)}get lineBreak(){return this.facet(tt.lineSeparator)||`
75
+ `}get readOnly(){return this.facet(i5)}phrase(e,...n){for(let i of this.facet(tt.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(ZM))for(let a of s(this,n,i))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return A_(n.length?n[0]:"")}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),a=e-i,c=e-i;for(;a>0;){let f=Sn(n,a,!1);if(s(n.slice(f,a))!=It.Word)break;a=f}for(;c<r;){let f=Sn(n,c);if(s(n.slice(c,f))!=It.Word)break;c=f}return a==c?null:ce.range(a+i,c+i)}}tt.allowMultipleSelections=Xb;tt.tabSize=ve.define({combine:t=>t.length?t[0]:4});tt.lineSeparator=JM;tt.readOnly=i5;tt.phrases=ve.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});tt.languageData=ZM;tt.changeFilter=e5;tt.transactionFilter=t5;tt.transactionExtender=n5;eg.reconfigure=Le.define();function co(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let a=r[s],c=i[s];if(c===void 0)i[s]=a;else if(!(c===a||a===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](c,a);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class _s{eq(e){return this==e}range(e,n=e){return Yb.create(e,n,this)}}_s.prototype.startSide=_s.prototype.endSide=0;_s.prototype.point=!1;_s.prototype.mapMode=Nn.TrackDel;function AO(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let Yb=class s5{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new s5(e,n,i)}};function Kb(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class RO{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let a=r,c=s.length;;){if(a==c)return a;let f=a+c>>1,h=s[f]-e||(i?this.value[f].endSide:this.value[f].startSide)-n;if(f==a)return h>=0?a:c;h>=0?c=f:a=f+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,s);s<a;s++)if(r(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let i=[],r=[],s=[],a=-1,c=-1;for(let f=0;f<this.value.length;f++){let h=this.value[f],p=this.from[f]+e,m=this.to[f]+e,v,b;if(p==m){let O=n.mapPos(p,h.startSide,h.mapMode);if(O==null||(v=b=O,h.startSide!=h.endSide&&(b=n.mapPos(p,h.endSide),b<v)))continue}else if(v=n.mapPos(p,h.startSide),b=n.mapPos(m,h.endSide),v>b||v==b&&h.startSide>0&&h.endSide<=0)continue;(b-v||h.endSide-h.startSide)<0||(a<0&&(a=v),h.point&&(c=Math.max(c,b-v)),i.push(h),r.push(v-a),s.push(b-a))}return{mapped:i.length?new RO(r,s,i,c):null,pos:a}}}class nt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new nt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(Kb)),this.isEmpty)return n.length?nt.of(n):this;let c=new l5(this,null,-1).goto(0),f=0,h=[],p=new lo;for(;c.value||f<n.length;)if(f<n.length&&(c.from-n[f].from||c.startSide-n[f].value.startSide)>=0){let m=n[f++];p.addInner(m.from,m.to,m.value)||h.push(m)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(f==n.length||this.chunkEnd(c.chunkIndex)<n[f].from)&&(!a||r>this.chunkEnd(c.chunkIndex)||s<this.chunkPos[c.chunkIndex])&&p.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!a||r>c.to||s<c.from||a(c.from,c.to,c.value))&&(p.addInner(c.from,c.to,c.value)||h.push(Yb.create(c.from,c.to,c.value))),c.next());return p.finishInner(this.nextLayer.isEmpty&&!h.length?nt.empty:this.nextLayer.update({add:h,filter:a,filterFrom:r,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],i=[],r=-1;for(let a=0;a<this.chunk.length;a++){let c=this.chunkPos[a],f=this.chunk[a],h=e.touchesRange(c,c+f.length);if(h===!1)r=Math.max(r,f.maxPoint),n.push(f),i.push(e.mapPos(c));else if(h===!0){let{mapped:p,pos:m}=f.map(c,e);p&&(r=Math.max(r,p.maxPoint),n.push(p),i.push(m))}}let s=this.nextLayer.map(e);return n.length==0?s:new nt(i,n,s||nt.empty,r)}between(e,n,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],a=this.chunk[r];if(n>=s&&e<=s+a.length&&a.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Df.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Df.from(e).goto(n)}static compare(e,n,i,r,s=-1){let a=e.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=s),c=n.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=s),f=Uk(a,c,i),h=new Pu(a,f,s),p=new Pu(c,f,s);i.iterGaps((m,v,b)=>Wk(h,m,p,v,b,r)),i.empty&&i.length==0&&Wk(h,0,p,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(p=>!p.isEmpty&&n.indexOf(p)<0),a=n.filter(p=>!p.isEmpty&&e.indexOf(p)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let c=Uk(s,a),f=new Pu(s,c,0).goto(i),h=new Pu(a,c,0).goto(i);for(;;){if(f.to!=h.to||!Zb(f.active,h.active)||f.point&&(!h.point||!AO(f.point,h.point)))return!1;if(f.to>r)return!0;f.next(),h.next()}}static spans(e,n,i,r,s=-1){let a=new Pu(e,null,s).goto(n),c=n,f=a.openStart;for(;;){let h=Math.min(a.to,i);if(a.point){let p=a.activeForPoint(a.to),m=a.pointFrom<n?p.length+1:a.point.startSide<0?p.length:Math.min(p.length,f);r.point(c,h,a.point,p,m,a.pointRank),f=Math.min(a.openEnd(h),p.length)}else h>c&&(r.span(c,h,a.active,f),f=a.openEnd(h));if(a.to>i)return f+(a.point&&a.to>i?1:0);c=a.to,a.next()}}static of(e,n=!1){let i=new lo;for(let r of e instanceof Yb?[e]:n?R_(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return nt.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=nt.empty;r=r.nextLayer)n=new nt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}nt.empty=new nt([],[],null,-1);function R_(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(Kb(e,i)>0)return t.slice().sort(Kb);e=i}return t}nt.empty.nextLayer=nt.empty;class lo{finishChunk(e){this.chunks.push(new RO(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new lo)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(nt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=nt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Uk(t,e,n){let i=new Map;for(let s of t)for(let a=0;a<s.chunk.length;a++)s.chunk[a].maxPoint<=0&&i.set(s.chunk[a],s.chunkPos[a]);let r=new Set;for(let s of e)for(let a=0;a<s.chunk.length;a++){let c=i.get(s.chunk[a]);c!=null&&(n?n.mapPos(c):c)==s.chunkPos[a]&&!n?.touchesRange(c,c+s.chunk[a].length)&&r.add(s.chunk[a])}return r}class l5{constructor(e,n,i,r=0){this.layer=e,this.skip=n,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],i=e+n.from[this.rangeIndex];if(this.from=i,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Df{constructor(e){this.heap=e}static from(e,n=null,i=-1){let r=[];for(let s=0;s<e.length;s++)for(let a=e[s];!a.isEmpty;a=a.nextLayer)a.maxPoint>=i&&r.push(new l5(a,n,i,s));return r.length==1?r[0]:new Df(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)nv(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)nv(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),nv(this.heap,0)}}}function nv(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class Pu{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Df.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){jh(this.active,e),jh(this.activeTo,e),jh(this.activeRank,e),this.minActive=Vk(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||r-this.activeTo[n])>0;)n++;Nh(this.active,n,i),Nh(this.activeTo,n,r),Nh(this.activeRank,n,s),e&&Nh(e,n,this.cursor.from),this.minActive=Vk(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&jh(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let r=i.length-1;r>=0&&i[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function Wk(t,e,n,i,r,s){t.goto(e),n.goto(i);let a=i+r,c=i,f=i-e,h=!!s.boundChange;for(let p=!1;;){let m=t.to+f-n.to,v=m||t.endSide-n.endSide,b=v<0?t.to+f:n.to,O=Math.min(b,a);if(t.point||n.point?(t.point&&n.point&&AO(t.point,n.point)&&Zb(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(c,O,t.point,n.point),p=!1):(p&&s.boundChange(c),O>c&&!Zb(t.active,n.active)&&s.compareRange(c,O,t.active,n.active),h&&O<a&&(m||t.openEnd(b)!=n.openEnd(b))&&(p=!0)),b>a)break;c=b,v<=0&&t.next(),v>=0&&n.next()}}function Zb(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!AO(t[n],e[n]))return!1;return!0}function jh(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function Nh(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function Vk(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||t[r].endSide-t[n].endSide)<0&&(n=r,i=e[r]);return n}function Rc(t,e,n=t.length){let i=0;for(let r=0;r<n&&r<t.length;)t.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=Sn(t,r));return i}function Jb(t,e,n,i){for(let r=0,s=0;;){if(s>=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=Sn(t,r)}return i===!0?-1:t.length}const e1="ͼ",Xk=typeof Symbol>"u"?"__"+e1:Symbol.for(e1),t1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Gk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qs{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,c,f,h){let p=[],m=/^@(\w+)\b/.exec(a[0]),v=m&&m[1]=="keyframes";if(m&&c==null)return f.push(a[0]+";");for(let b in c){let O=c[b];if(/&/.test(b))s(b.split(/,\s*/).map(S=>a.map(C=>S.replace(/&/,C))).reduce((S,C)=>S.concat(C)),O,f);else if(O&&typeof O=="object"){if(!m)throw new RangeError("The value of a property ("+b+") should be a primitive value.");s(r(b),O,p,v)}else O!=null&&p.push(b.replace(/_.*/,"").replace(/[A-Z]/g,S=>"-"+S.toLowerCase())+": "+O+";")}(p.length||v)&&f.push((i&&!m&&!h?a.map(i):a).join(", ")+" {"+p.join(" ")+"}")}for(let a in e)s(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
76
+ `)}static newName(){let e=Gk[Xk]||1;return Gk[Xk]=e+1,e1+e.toString(36)}static mount(e,n,i){let r=e[t1],s=i&&i.nonce;r?s&&r.setNonce(s):r=new M_(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let Fk=new Map;class M_{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=Fk.get(i);if(s)return e[t1]=s;this.sheet=new r.CSSStyleSheet,Fk.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[t1]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let a=0;a<e.length;a++){let c=e[a],f=this.modules.indexOf(c);if(f<s&&f>-1&&(this.modules.splice(f,1),s--,f=-1),f==-1){if(this.modules.splice(s++,0,c),i)for(let h=0;h<c.rules.length;h++)i.insertRule(c.rules[h],r++)}else{for(;s<f;)r+=this.modules[s++].rules.length;r+=c.rules.length,s++}}if(i)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let a="";for(let f=0;f<this.modules.length;f++)a+=this.modules[f].getRules()+`
77
+ `;this.styleTag.textContent=a;let c=n.head||n;this.styleTag.parentNode!=c&&c.insertBefore(this.styleTag,c.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Is={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Pf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},D_=typeof navigator<"u"&&/Mac/.test(navigator.platform),P_=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var jn=0;jn<10;jn++)Is[48+jn]=Is[96+jn]=String(jn);for(var jn=1;jn<=24;jn++)Is[jn+111]="F"+jn;for(var jn=65;jn<=90;jn++)Is[jn]=String.fromCharCode(jn+32),Pf[jn]=String.fromCharCode(jn);for(var iv in Is)Pf.hasOwnProperty(iv)||(Pf[iv]=Is[iv]);function z_(t){var e=D_&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||P_&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Pf:Is)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Rt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e<arguments.length;e++)a5(t,arguments[e]);return t}function a5(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)a5(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let Fn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},n1=typeof document<"u"?document:{documentElement:{style:{}}};const i1=/Edge\/(\d+)/.exec(Fn.userAgent),c5=/MSIE \d/.test(Fn.userAgent),r1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Fn.userAgent),tg=!!(c5||r1||i1),Yk=!tg&&/gecko\/(\d+)/i.test(Fn.userAgent),rv=!tg&&/Chrome\/(\d+)/.exec(Fn.userAgent),$_="webkitFontSmoothing"in n1.documentElement.style,o1=!tg&&/Apple Computer/.test(Fn.vendor),Kk=o1&&(/Mobile\/\w+/.test(Fn.userAgent)||Fn.maxTouchPoints>2);var be={mac:Kk||/Mac/.test(Fn.platform),windows:/Win/.test(Fn.platform),linux:/Linux|X11/.test(Fn.platform),ie:tg,ie_version:c5?n1.documentMode||6:r1?+r1[1]:i1?+i1[1]:0,gecko:Yk,gecko_version:Yk?+(/Firefox\/(\d+)/.exec(Fn.userAgent)||[0,0])[1]:0,chrome:!!rv,chrome_version:rv?+rv[1]:0,ios:Kk,android:/Android\b/.test(Fn.userAgent),webkit_version:$_?+(/\bAppleWebKit\/(\d+)/.exec(Fn.userAgent)||[0,0])[1]:0,safari:o1,safari_version:o1?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Fn.userAgent)||[0,0])[1]:0,tabSize:n1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function MO(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const rm=Object.create(null);function DO(t,e,n){if(t==e)return!0;t||(t=rm),e||(e=rm);let i=Object.keys(t),r=Object.keys(e);if(i.length-0!=r.length-0)return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function B_(t,e){for(let n=t.attributes.length-1;n>=0;n--){let i=t.attributes[n].name;e[i]==null&&t.removeAttribute(i)}for(let n in e){let i=e[n];n=="style"?t.style.cssText=i:t.getAttribute(n)!=i&&t.setAttribute(n,i)}}function Zk(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function L_(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}class Ar{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Qn=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(Qn||(Qn={}));class we extends _s{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new ld(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new _l(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:a}=u5(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new _l(e,i,r,n,e.widget||null,!0)}static line(e){return new ad(e)}static set(e,n=!1){return nt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}we.none=nt.empty;class ld extends we{constructor(e){let{start:n,end:i}=u5(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?MO(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||rm}eq(e){return this==e||e instanceof ld&&this.tagName==e.tagName&&DO(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}ld.prototype.point=!1;class ad extends we{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ad&&this.spec.class==e.spec.class&&DO(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}ad.prototype.mapMode=Nn.TrackBefore;ad.prototype.point=!0;class _l extends we{constructor(e,n,i,r,s,a){super(n,i,s,e),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?Nn.TrackBefore:Nn.TrackAfter:Nn.TrackDel}get type(){return this.startSide!=this.endSide?Qn.WidgetRange:this.startSide<=0?Qn.WidgetBefore:Qn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof _l&&j_(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}_l.prototype.point=!0;function u5(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function j_(t,e){return t==e||!!(t&&e&&t.compare(e))}function ec(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class zf extends _s{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof zf&&this.tagName==e.tagName&&DO(this.attributes,e.attributes)}static create(e){return new zf(e.tagName,e.attributes||rm)}static set(e,n=!1){return nt.of(e,n)}}zf.prototype.startSide=zf.prototype.endSide=-1;function mc(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function s1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function df(t,e){if(!e.anchorNode)return!1;try{return s1(t,e.anchorNode)}catch{return!1}}function hf(t){return t.nodeType==3?Bf(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function pf(t,e,n,i){return n?Jk(t,e,n,i,-1)||Jk(t,e,n,i,1):!1}function Hs(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function om(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function Jk(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:Xo(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Hs(t)+(r<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?Xo(t):0}else return!1}}function Xo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function $f(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function N_(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function f5(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function Q_(t,e,n,i,r,s,a,c){let f=t.ownerDocument,h=f.defaultView||window;for(let p=t,m=!1;p&&!m;)if(p.nodeType==1){let v,b=p==f.body,O=1,S=1;if(b)v=N_(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(p).position)&&(m=!0),p.scrollHeight<=p.clientHeight&&p.scrollWidth<=p.clientWidth){p=p.assignedSlot||p.parentNode;continue}let $=p.getBoundingClientRect();({scaleX:O,scaleY:S}=f5(p,$)),v={left:$.left,right:$.left+p.clientWidth*O,top:$.top,bottom:$.top+p.clientHeight*S}}let C=0,E=0;if(r=="nearest")e.top<v.top?(E=e.top-(v.top+a),n>0&&e.bottom>v.bottom+E&&(E=e.bottom-v.bottom+a)):e.bottom>v.bottom&&(E=e.bottom-v.bottom+a,n<0&&e.top-E<v.top&&(E=e.top-(v.top+a)));else{let $=e.bottom-e.top,z=v.bottom-v.top;E=(r=="center"&&$<=z?e.top+$/2-z/2:r=="start"||r=="center"&&n<0?e.top-a:e.bottom-z+a)-v.top}if(i=="nearest"?e.left<v.left?(C=e.left-(v.left+s),n>0&&e.right>v.right+C&&(C=e.right-v.right+s)):e.right>v.right&&(C=e.right-v.right+s,n<0&&e.left<v.left+C&&(C=e.left-(v.left+s))):C=(i=="center"?e.left+(e.right-e.left)/2-(v.right-v.left)/2:i=="start"==c?e.left-s:e.right-(v.right-v.left)+s)-v.left,C||E)if(b)h.scrollBy(C,E);else{let $=0,z=0;if(E){let P=p.scrollTop;p.scrollTop+=E/S,z=(p.scrollTop-P)*S}if(C){let P=p.scrollLeft;p.scrollLeft+=C/O,$=(p.scrollLeft-P)*O}e={left:e.left-$,top:e.top-z,right:e.right-$,bottom:e.bottom-z},$&&Math.abs($-C)<1&&(i="nearest"),z&&Math.abs(z-E)<1&&(r="nearest")}if(b)break;(e.top<v.top||e.bottom>v.bottom||e.left<v.left||e.right>v.right)&&(e={left:Math.max(e.left,v.left),right:Math.min(e.right,v.right),top:Math.max(e.top,v.top),bottom:Math.min(e.bottom,v.bottom)}),p=p.assignedSlot||p.parentNode}else if(p.nodeType==11)p=p.host;else break}function __(t){let e=t.ownerDocument,n,i;for(let r=t.parentNode;r&&!(r==e.body||n&&i);)if(r.nodeType==1)!i&&r.scrollHeight>r.clientHeight&&(i=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:n,y:i}}class q_{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Xo(n):0),i,Math.min(e.focusOffset,i?Xo(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Sl=null;be.safari&&be.safari_version>=26&&(Sl=!1);function d5(t){if(t.setActive)return t.setActive();if(Sl)return t.focus(Sl);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Sl==null?{get preventScroll(){return Sl={preventScroll:!0},!0}}:void 0),!Sl){Sl=!1;for(let n=0;n<e.length;){let i=e[n++],r=e[n++],s=e[n++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=s&&(i.scrollLeft=s)}}}let e2;function Bf(t,e,n=e){let i=e2||(e2=document.createRange());return i.setEnd(t,n),i.setStart(t,e),i}function tc(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,t.dispatchEvent(s);let a=new KeyboardEvent("keyup",r);return a.synthetic=!0,t.dispatchEvent(a),s.defaultPrevented||a.defaultPrevented}function I_(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function H_(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,Xo(n));;)if(i){if(n.nodeType!=1)return!1;let r=n.childNodes[i-1];r.contentEditable=="false"?i--:(n=r,i=Xo(n))}else{if(n==t)return!0;i=Hs(n),n=n.parentNode}}function h5(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function p5(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Xo(n)}else if(n.parentNode&&!om(n))i=Hs(n),n=n.parentNode;else return null}}function m5(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i<n.nodeValue.length)return{node:n,offset:i};if(n.nodeType==1&&i<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[i],i=0}else if(n.parentNode&&!om(n))i=Hs(n)+1,n=n.parentNode;else return null}}class Sr{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new Sr(e.parentNode,Hs(e),n)}static after(e,n){return new Sr(e.parentNode,Hs(e)+1,n)}}var $t=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})($t||($t={}));const ql=$t.LTR,PO=$t.RTL;function g5(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const U_=g5("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),W_=g5("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),l1=Object.create(null),Qr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);l1[e]=n,l1[n]=-e}function y5(t){return t<=247?U_[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?W_[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const V_=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Ho{get dir(){return this.level%2?PO:ql}constructor(e,n,i){this.from=e,this.to=n,this.level=i}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,i,r){let s=-1;for(let a=0;a<e.length;a++){let c=e[a];if(c.from<=n&&c.to>=n){if(c.level==i)return a;(s<0||(r!=0?r<0?c.from<n:c.to>n:e[s].level>c.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function v5(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!v5(i.inner,r.inner))return!1}return!0}const Pt=[];function X_(t,e,n,i,r){for(let s=0;s<=i.length;s++){let a=s?i[s-1].to:e,c=s<i.length?i[s].from:n,f=s?256:r;for(let h=a,p=f,m=f;h<c;h++){let v=y5(t.charCodeAt(h));v==512?v=p:v==8&&m==4&&(v=16),Pt[h]=v==4?2:v,v&7&&(m=v),p=v}for(let h=a,p=f,m=f;h<c;h++){let v=Pt[h];if(v==128)h<c-1&&p==Pt[h+1]&&p&24?v=Pt[h]=p:Pt[h]=256;else if(v==64){let b=h+1;for(;b<c&&Pt[b]==64;)b++;let O=h&&p==8||b<n&&Pt[b]==8?m==1?1:8:256;for(let S=h;S<b;S++)Pt[S]=O;h=b-1}else v==8&&m==1&&(Pt[h]=1);p=v,v&7&&(m=v)}}}function G_(t,e,n,i,r){let s=r==1?2:1;for(let a=0,c=0,f=0;a<=i.length;a++){let h=a?i[a-1].to:e,p=a<i.length?i[a].from:n;for(let m=h,v,b,O;m<p;m++)if(b=l1[v=t.charCodeAt(m)])if(b<0){for(let S=c-3;S>=0;S-=3)if(Qr[S+1]==-b){let C=Qr[S+2],E=C&2?r:C&4?C&1?s:r:0;E&&(Pt[m]=Pt[Qr[S]]=E),c=S;break}}else{if(Qr.length==189)break;Qr[c++]=m,Qr[c++]=v,Qr[c++]=f}else if((O=Pt[m])==2||O==1){let S=O==r;f=S?0:1;for(let C=c-3;C>=0;C-=3){let E=Qr[C+2];if(E&2)break;if(S)Qr[C+2]|=2;else{if(E&4)break;Qr[C+2]|=4}}}}}function F_(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let a=r?n[r-1].to:t,c=r<n.length?n[r].from:e;for(let f=a;f<c;){let h=Pt[f];if(h==256){let p=f+1;for(;;)if(p==c){if(r==n.length)break;p=n[r++].to,c=r<n.length?n[r].from:e}else if(Pt[p]==256)p++;else break;let m=s==1,v=(p<e?Pt[p]:i)==1,b=m==v?m?1:2:i;for(let O=p,S=r,C=S?n[S-1].to:t;O>f;)O==C&&(O=n[--S].from,C=S?n[S-1].to:t),Pt[--O]=b;f=p}else s=h,f++}}}function a1(t,e,n,i,r,s,a){let c=i%2?2:1;if(i%2==r%2)for(let f=e,h=0;f<n;){let p=!0,m=!1;if(h==s.length||f<s[h].from){let S=Pt[f];S!=c&&(p=!1,m=S==16)}let v=!p&&c==1?[]:null,b=p?i:i+1,O=f;e:for(;;)if(h<s.length&&O==s[h].from){if(m)break e;let S=s[h];if(!p)for(let C=S.to,E=h+1;;){if(C==n)break e;if(E<s.length&&s[E].from==C)C=s[E++].to;else{if(Pt[C]==c)break e;break}}if(h++,v)v.push(S);else{S.from>f&&a.push(new Ho(f,S.from,b));let C=S.direction==ql!=!(b%2);c1(t,C?i+1:i,r,S.inner,S.from,S.to,a),f=S.to}O=S.to}else{if(O==n||(p?Pt[O]!=c:Pt[O]==c))break;O++}v?a1(t,f,O,i+1,r,v,a):f<O&&a.push(new Ho(f,O,b)),f=O}else for(let f=n,h=s.length;f>e;){let p=!0,m=!1;if(!h||f>s[h-1].to){let S=Pt[f-1];S!=c&&(p=!1,m=S==16)}let v=!p&&c==1?[]:null,b=p?i:i+1,O=f;e:for(;;)if(h&&O==s[h-1].to){if(m)break e;let S=s[--h];if(!p)for(let C=S.from,E=h;;){if(C==e)break e;if(E&&s[E-1].to==C)C=s[--E].from;else{if(Pt[C-1]==c)break e;break}}if(v)v.push(S);else{S.to<f&&a.push(new Ho(S.to,f,b));let C=S.direction==ql!=!(b%2);c1(t,C?i+1:i,r,S.inner,S.from,S.to,a),f=S.from}O=S.from}else{if(O==e||(p?Pt[O-1]!=c:Pt[O-1]==c))break;O--}v?a1(t,O,f,i+1,r,v,a):O<f&&a.push(new Ho(O,f,b)),f=O}}function c1(t,e,n,i,r,s,a){let c=e%2?2:1;X_(t,r,s,i,c),G_(t,r,s,i,c),F_(r,s,i,c),a1(t,r,s,e,n,i,a)}function Y_(t,e,n){if(!t)return[new Ho(0,0,e==PO?1:0)];if(e==ql&&!n.length&&!V_.test(t))return b5(t.length);if(n.length)for(;t.length>Pt.length;)Pt[Pt.length]=256;let i=[],r=e==ql?0:1;return c1(t,r,r,n,0,t.length,i),i}function b5(t){return[new Ho(0,t,0)]}let O5="";function K_(t,e,n,i,r){var s;let a=i.head-t.from,c=Ho.find(e,a,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),f=e[c],h=f.side(r,n);if(a==h){let v=c+=r?1:-1;if(v<0||v>=e.length)return null;f=e[c=v],a=f.side(!r,n),h=f.side(r,n)}let p=Sn(t.text,a,f.forward(r,n));(p<f.from||p>f.to)&&(p=h),O5=t.text.slice(Math.min(a,p),Math.max(a,p));let m=c==(r?e.length-1:0)?null:e[c+(r?1:-1)];return m&&p==h&&m.level+(r?0:1)<f.level?ce.cursor(m.side(!r,n)+t.from,m.forward(r,n)?1:-1,m.level):ce.cursor(p+t.from,f.forward(r,n)?-1:1,f.level)}function Z_(t,e,n){for(let i=e;i<n;i++){let r=y5(t.charCodeAt(i));if(r==1)return ql;if(r==2||r==4)return PO}return ql}const x5=ve.define(),S5=ve.define(),w5=ve.define(),C5=ve.define(),u1=ve.define(),T5=ve.define(),k5=ve.define(),zO=ve.define(),$O=ve.define(),E5=ve.define({combine:t=>t.some(e=>e)}),A5=ve.define({combine:t=>t.some(e=>e)}),R5=ve.define();class nc{constructor(e,n="nearest",i="nearest",r=5,s=5,a=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new nc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new nc(ce.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Qh=Le.define({map:(t,e)=>t.map(e)}),M5=Le.define();function fi(t,e,n){let i=t.facet(C5);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const qo=ve.define({combine:t=>t.length?t[0]:!0});let J_=0;const Ua=ve.define({combine(t){return t.filter((e,n)=>{for(let i=0;i<n;i++)if(t[i].plugin==e.plugin)return!1;return!0})}});class Jt{constructor(e,n,i,r,s){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Ua.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Ua.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:s,decorations:a}=n||{};return new Jt(J_++,e,i,r,c=>{let f=[];return a&&f.push(ng.of(h=>{let p=h.plugin(c);return p?a(p):we.none})),s&&f.push(s(c)),f})}static fromClass(e,n){return Jt.define((i,r)=>new e(i,r),n)}}class ov{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(fi(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){fi(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){fi(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const D5=ve.define(),BO=ve.define(),ng=ve.define(),P5=ve.define(),LO=ve.define(),cd=ve.define(),z5=ve.define();function t2(t,e){let n=t.state.facet(z5);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return nt.spans(i,e.from,e.to,{point(){},span(s,a,c,f){let h=s-e.from,p=a-e.from,m=r;for(let v=c.length-1;v>=0;v--,f--){let b=c[v].spec.bidiIsolate,O;if(b==null&&(b=Z_(e.text,h,p)),f>0&&m.length&&(O=m[m.length-1]).to==h&&O.direction==b)O.to=p,m=O.inner;else{let S={from:h,to:p,direction:b,inner:[]};m.push(S),m=S.inner}}}}),r}const $5=ve.define();function jO(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet($5)){let a=s(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Ju=ve.define();class er{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new er(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(n-1,1)}}return e.splice(n,0,i),e}static extendWithRanges(e,n){if(n.length==0)return e;let i=[];for(let r=0,s=0,a=0;;){let c=r<e.length?e[r].fromB:1e9,f=s<n.length?n[s]:1e9,h=Math.min(c,f);if(h==1e9)break;let p=h+a,m=h,v=p;for(;;)if(s<n.length&&n[s]<=m){let b=n[s+1];s+=2,m=Math.max(m,b);for(let O=r;O<e.length&&e[O].fromB<=m;O++)a=e[O].toA-e[O].toB;v=Math.max(v,b+a)}else if(r<e.length&&e[r].fromB<=m){let b=e[r++];m=Math.max(m,b.toB),v=Math.max(v,b.toA),a=b.toA-b.toB}else break;i.push(new er(p,v,h,m))}return i}}class sm{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=On.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,a,c,f)=>r.push(new er(s,a,c,f))),this.changedRanges=r}static create(e,n,i){return new sm(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const e8=[];class pn{constructor(e,n,i=0){this.dom=e,this.length=n,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return e8}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&B_(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let i=n;for(let r of this.children){if(r==e)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let i=Hs(this.dom),r=this.length?e>0:n>0;return new Sr(this.parent.dom,i+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof rg)return e;return null}static get(e){return e.cmTile}}class ig extends pn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,i=null,r,s=e?.node==n?e:null,a=0;for(let c of this.children){if(c.sync(e),a+=c.length+c.breakAfter,r=i?i.nextSibling:n.firstChild,s&&r!=c.dom&&(s.written=!0),c.dom.parentNode==n)for(;r&&r!=c.dom;)r=n2(r);else n.insertBefore(c.dom,r);i=c.dom}for(r=i?i.nextSibling:n.firstChild,s&&r&&(s.written=!0);r;)r=n2(r);this.length=a}}function n2(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class rg extends ig{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=pn.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],i=this,r=0,s=0;;)if(r==i.children.length){if(!n.length)return;i=i.parent,i.breakAfter&&s++,r=n.pop()}else{let a=i.children[r++];if(a instanceof $s)n.push(r),i=a,r=0;else{let c=s+a.length,f=e(a,s);if(f!==void 0)return f;s=c+a.breakAfter}}}resolveBlock(e,n){let i,r=-1,s,a=-1;if(this.blockTiles((c,f)=>{let h=f+c.length;if(e>=f&&e<=h){if(c.isWidget()&&n>=-1&&n<=1){if(c.flags&32)return!0;c.flags&16&&(i=void 0)}(f<e||e==h&&(n<-1?c.length:c.covers(1)))&&(!i||!c.isWidget()&&i.isWidget())&&(i=c,r=e-f),(h>e||e==f&&(n>1?c.length:c.covers(-1)))&&(!s||!c.isWidget()&&s.isWidget())&&(s=c,a=e-f)}}),!i&&!s)throw new Error("No tile at position "+e);return i&&n<0||!s?{tile:i,offset:r}:{tile:s,offset:a}}}class $s extends ig{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let i=new $s(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class gc extends ig{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,i){let r=new gc(n||document.createElement("div"),e);return(!n||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,n,i){let r=null,s=-1,a=null,c=-1;function f(p,m){for(let v=0,b=0;v<p.children.length&&b<=m;v++){let O=p.children[v],S=b+O.length;S>=m&&(O.isComposite()?f(O,m-b):(!a||a.isHidden&&(n>0||i&&n8(a,O)))&&(S>m||O.flags&32)?(a=O,c=m-b):(b<m||O.flags&16&&!O.isHidden)&&(r=O,s=m-b)),b=S}}f(this,e);let h=(n<0?r:a)||r||a;return h?{tile:h,offset:h==r?s:c}:null}coordsIn(e,n){let i=this.resolveInline(e,n,!0);return i?i.tile.coordsIn(Math.max(0,i.offset),n):t8(this)}domIn(e,n){let i=this.resolveInline(e,n);if(i){let{tile:r,offset:s}=i;if(this.dom.contains(r.dom))return r.isText()?new Sr(r.dom,Math.min(r.dom.nodeValue.length,s)):r.domPosFor(s,r.flags&16?1:r.flags&32?-1:n);let a=i.tile.parent,c=!1;for(let f of a.children){if(c)return new Sr(f.dom,0);f==i.tile&&(c=!0)}}return new Sr(this.dom,0)}}function t8(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=hf(e);return n[n.length-1]||null}function n8(t,e){let n=t.coordsIn(0,1),i=e.coordsIn(0,1);return n&&i&&i.top<n.bottom}class ui extends ig{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let i=new ui(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class Ml extends pn{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let i=this.dom.nodeValue.length;e>i&&(e=i);let r=e,s=e,a=0;e==0&&n<0||e==i&&n>=0?be.chrome||be.gecko||(e?(r--,a=1):s<i&&(s++,a=-1)):n<0?r--:s<i&&s++;let c=Bf(this.dom,r,s).getClientRects();if(!c.length)return null;let f=c[(a?a<0:n>=0)?0:c.length-1];return be.safari&&!a&&f.width==0&&(f=Array.prototype.find.call(c,h=>h.width)||f),a?$f(f,a<0):f||null}static of(e,n){let i=new Ml(n||document.createTextNode(e),e);return n||(i.flags|=2),i}}class Il extends pn{constructor(e,n,i,r){super(e,n,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,i){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;if(i)return $f(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),a=null;if(!s.length)return null;let c=this.flags&16?!0:this.flags&32?!1:e>0;for(let f=c?s.length-1:0;a=s[f],!(e>0?f==0:f==s.length-1||a.top<a.bottom);f+=c?-1:1);return $f(a,!c)}}get overrideDOMText(){if(!this.length)return ft.empty;let{root:e}=this;if(!e)return ft.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,i,r,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new Il(s,i,e,r)}}class lm extends pn{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return ft.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class i8{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,i){let{tile:r,index:s,beforeBreak:a,parents:c}=this;for(;e||n>0;)if(r.isComposite())if(a){if(!e)break;i&&i.break(),e--,a=!1}else if(s==r.children.length){if(!e&&!c.length)break;i&&i.leave(r),a=!!r.breakAfter,{tile:r,index:s}=c.pop(),s++}else{let f=r.children[s],h=f.breakAfter;(n>0?f.length<=e:f.length<e)&&(!i||i.skip(f,0,f.length)!==!1||!f.isComposite)?(a=!!h,s++,e-=f.length):(c.push({tile:r,index:s}),r=f,s=0,i&&f.isComposite()&&i.enter(f))}else if(s==r.length)a=!!r.breakAfter,{tile:r,index:s}=c.pop(),s++;else if(e){let f=Math.min(e,r.length-s);i&&i.skip(r,s,s+f),e-=f,s+=f}else break;return this.tile=r,this.index=s,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class r8{constructor(e,n,i,r){this.from=e,this.to=n,this.wrapper=i,this.rank=r}}class o8{constructor(e,n,i){this.cache=e,this.root=n,this.blockWrappers=i,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,i,r){var s;this.flushBuffer();let a=this.ensureMarks(n,i),c=a.lastChild;if(c&&c.isText()&&!(c.flags&8)){this.cache.reused.set(c,2);let f=a.children[a.children.length-1]=new Ml(c.dom,c.text+e);f.parent=a}else a.append(r||Ml.of(e,(s=this.cache.find(Ml))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let i=this.curLine;i.dom!=n.line.dom&&(i.setDOM(this.cache.reused.has(n.line)?sv(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let r=i;for(let c=n.marks.length-1;c>=0;c--){let f=n.marks[c],h=r.lastChild;if(h instanceof ui&&h.mark.eq(f.mark))h.dom!=f.dom&&h.setDOM(sv(f.dom)),r=h;else{if(this.cache.reused.get(f)){let m=pn.get(f.dom);m&&m.setDOM(sv(f.dom))}let p=ui.of(f.mark,f.dom);r.append(p),r=p}this.cache.reused.set(f,2)}let s=pn.get(e.text);s&&this.cache.reused.set(s,2);let a=new Ml(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,n,i){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let s=this.ensureMarks(n,i);!r&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,i){this.flushBuffer(),this.ensureMarks(n,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var i;e||(e=B5);let r=gc.start(e,n||((i=this.cache.find(gc))===null||i===void 0?void 0:i.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var i;let r=this.curLine;for(let s=e.length-1;s>=0;s--){let a=e[s],c;if(n>0&&(c=r.lastChild)&&c instanceof ui&&c.mark.eq(a))r=c,n--;else{let f=ui.of(a,(i=this.cache.find(ui,h=>h.mark.eq(a)))===null||i===void 0?void 0:i.dom);r.append(f),r=f,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!i2(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(be.ios&&i2(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(lv,0,32)||new Il(lv.toDOM(),0,lv,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new r8(e.from,e.to,e.value,e.rank),i=this.wrappers.length;for(;i>0&&(this.wrappers[i-1].rank-n.rank||this.wrappers[i-1].to-n.to)<0;)i--;this.wrappers.splice(i,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let i of this.wrappers){let r=n.lastChild;if(i.from<this.pos&&r instanceof $s&&r.wrapper.eq(i.wrapper))n=r;else{let s=$s.of(i.wrapper,(e=this.cache.find($s,a=>a.wrapper.eq(i.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),i=this.cache.find(lm,void 0,1);return i&&(i.flags=n),i||new lm(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class s8{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let c=this.textOff=Math.min(e,r.length);return s?null:r.slice(0,c)}let n=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,n);return this.textOff=n,i}}const am=[Il,gc,Ml,ui,lm,$s,rg];for(let t=0;t<am.length;t++)am[t].bucket=t;class l8{constructor(e){this.view=e,this.buckets=am.map(()=>[]),this.index=am.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,i=this.buckets[n];i.length<6?i.push(e):i[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,i=2){let r=e.bucket,s=this.buckets[r],a=this.index[r];for(let c=s.length-1;c>=0;c--){let f=(c+a)%s.length,h=s[f];if((!n||n(h))&&!this.reused.has(h))return s.splice(f,1),f<a&&this.index[r]--,this.reused.set(h,i),h}return null}findWidget(e,n,i){let r=this.buckets[0];if(r.length)for(let s=0,a=0;;s++){if(s==r.length){if(a)return null;a=1,s=0}let c=r[s];if(!this.reused.has(c)&&(a==0?c.widget.compare(e):c.widget.constructor==e.constructor&&e.updateDOM(c.dom,this.view)))return r.splice(s,1),s<this.index[0]&&this.index[0]--,c.widget==e&&c.length==n&&(c.flags&497)==i?(this.reused.set(c,1),c):(this.reused.set(c,2),new Il(c.dom,n,e,c.flags&-498|i))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class a8{constructor(e,n,i,r,s){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new l8(e),this.text=new s8(e.state.doc),this.builder=new o8(this.cache,new rg(e,e.contentDOM),nt.iter(i)),this.cache.reused.set(n,2),this.old=new i8(n),this.reuseWalker={skip:(a,c,f)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,n){let i=n&&this.getCompositionContext(n.text);for(let r=0,s=0,a=0;;){let c=a<e.length?e[a++]:null,f=c?c.fromA:this.old.root.length;if(f>r){let h=f-r;this.preserve(h,!a,!c),r=f,s+=h}if(!c)break;n&&c.fromA<=n.range.fromA&&c.toA>=n.range.toA?(this.forward(c.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,i),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,c.toA),this.emit(n.range.toB,c.toB)):(this.forward(c.fromA,c.toA),this.emit(s,c.toB)),s=c.toB,r=c.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,i){let r=f8(this.old),s=this.openMarks;this.old.advance(e,i?1:-1,{skip:(a,c,f)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(f-c);else{let h=f>0||c<a.length?Il.of(a.widget,this.view,f-c,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,r,s),s=r.length)}else if(a.isText())this.builder.ensureLine(null),!c&&f==a.length?this.builder.addText(a.text,r,s,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(c,f),r,s)),s=r.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof lm)this.cache.add(a);else if(a instanceof ui)this.builder.ensureLine(null),this.builder.addMark(a,r,s),this.cache.reused.set(a,1),s=r.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof ui&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=s=0):a instanceof ui&&(r.shift(),s=Math.min(s,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let i=null,r=this.builder,s=0,a=nt.spans(this.decorations,e,n,{point:(c,f,h,p,m,v)=>{if(h instanceof _l){if(this.disallowBlockEffectsFor[v]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(f>this.view.state.doc.lineAt(c).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=p.length,m>p.length)r.continueWidget(f-c);else{let b=h.widget||(h.block?yc.block:yc.inline),O=c8(h),S=this.cache.findWidget(b,f-c,O)||Il.of(b,this.view,f-c,O);h.block?(h.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(S)):(r.ensureLine(i),r.addInlineWidget(S,p,m))}i=null}else i=u8(i,h);f>c&&this.text.skip(f-c)},span:(c,f,h,p)=>{for(let m=c;m<f;){let v=this.text.next(Math.min(512,f-m));v==null?(r.addLineStartIfNotCovered(i),r.addBreak(),m++):(r.ensureLine(i),r.addText(v,h,p),m+=v.length),i=null}}});r.addLineStartIfNotCovered(i),this.openWidget=a>s,this.openMarks=a}forward(e,n,i=1){n-e<=10?this.old.advance(n-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let n=[],i=null;for(let r=e.parentNode;;r=r.parentNode){let s=pn.get(r);if(r==this.view.contentDOM)break;s instanceof ui?n.push(s):s?.isLine()?i=s:r.nodeName=="DIV"&&!i&&r!=this.view.contentDOM?i=new gc(r,B5):n.push(ui.of(new ld({tagName:r.nodeName.toLowerCase(),attributes:L_(r)}),r))}return{line:i,marks:n}}}function i2(t,e){let n=i=>{for(let r of i.children)if((e?r.isText():r.length)||n(r))return!0;return!1};return n(t)}function c8(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const B5={class:"cm-line"};function u8(t,e){let n=e.spec.attributes,i=e.spec.class;return!n&&!i||(t||(t={class:"cm-line"}),n&&MO(n,t),i&&(t.class+=" "+i)),t}function f8(t){let e=[];for(let n=t.parents.length;n>1;n--){let i=n==t.parents.length?t.tile:t.parents[n].tile;i instanceof ui&&e.push(i.mark)}return e}function sv(t){let e=pn.get(t);return e&&e.setDOM(t.cloneNode()),t}class yc extends Ar{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}yc.inline=new yc("span");yc.block=new yc("div");const lv=new class extends Ar{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class r2{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=we.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new rg(e,e.contentDOM),this.updateInner([new er(0,0,0,e.state.doc.length)],null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:p,toA:m})=>m<this.minWidthFrom||p>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!O8(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?h8(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:p,to:m}=this.hasComposition;i=new er(p,m,e.changes.mapPos(p,-1),e.changes.mapPos(m,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(be.ie||be.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,c=this.blockWrappers;this.updateDeco();let f=g8(a,this.decorations,e.changes);f.length&&(i=er.extendWithRanges(i,f));let h=v8(c,this.blockWrappers,e.changes);return h.length&&(i=er.extendWithRanges(i,h)),s&&!i.some(p=>p.fromA<=s.range.fromA&&p.toA>=s.range.toA)&&(i=s.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(n||e.length){let a=this.tile,c=new a8(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=c.run(e,n),f1(a,c.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=be.chrome||be.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||i.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof av&&r.push(s.dom);i.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(M5)&&(this.editContextFormatting=i.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:i}=this.tile,r=this.view.root.activeElement,s=r==i,a=!s&&!(this.view.state.facet(qo)||i.tabIndex>-1)&&df(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(s||n||a))return;let c=this.forceSelection;this.forceSelection=!1;let f=this.view.state.selection.main,h,p;if(f.empty?p=h=this.inlineDOMNearPos(f.anchor,f.assoc||1):(p=this.inlineDOMNearPos(f.head,f.head==f.from?1:-1),h=this.inlineDOMNearPos(f.anchor,f.anchor==f.from?1:-1)),be.gecko&&f.empty&&!this.hasComposition&&d8(h)){let v=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(v,h.node.childNodes[h.offset]||null)),h=p=new Sr(v,0),c=!0}let m=this.view.observer.selectionRange;(c||!m.focusNode||(!pf(h.node,h.offset,m.anchorNode,m.anchorOffset)||!pf(p.node,p.offset,m.focusNode,m.focusOffset))&&!this.suppressWidgetCursorChange(m,f))&&(this.view.observer.ignore(()=>{be.android&&be.chrome&&i.contains(m.focusNode)&&b8(m.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let v=mc(this.view.root);if(v)if(f.empty){if(be.gecko){let b=p8(h.node,h.offset);if(b&&b!=3){let O=(b==1?p5:m5)(h.node,h.offset);O&&(h=new Sr(O.node,O.offset))}}v.collapse(h.node,h.offset),f.bidiLevel!=null&&v.caretBidiLevel!==void 0&&(v.caretBidiLevel=f.bidiLevel)}else if(v.extend){v.collapse(h.node,h.offset);try{v.extend(p.node,p.offset)}catch{}}else{let b=document.createRange();f.anchor>f.head&&([h,p]=[p,h]),b.setEnd(p.node,p.offset),b.setStart(h.node,h.offset),v.removeAllRanges(),v.addRange(b)}a&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(h,p)),this.impreciseAnchor=h.precise?null:new Sr(m.anchorNode,m.anchorOffset),this.impreciseHead=p.precise?null:new Sr(m.focusNode,m.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&pf(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=mc(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=this.lineAt(n.head,n.assoc);if(!a)return;let c=a.posAtStart;if(n.head==c||n.head==c+a.length)return;let f=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!f||!h||f.bottom>h.top)return;let p=this.domAtPos(n.head+n.assoc,n.assoc);i.collapse(p.node,p.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let m=e.observer.selectionRange;e.docView.posFromDOM(m.anchorNode,m.anchorOffset)!=n.from&&i.collapse(r,s)}posFromDOM(e,n){let i=this.tile.nearest(e);if(!i)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let s;if(e==i.dom)s=i.dom.childNodes[n];else{let a=Xo(e)==0?0:n==0?-1:1;for(;;){let c=e.parentNode;if(c==i.dom)break;a==0&&c.firstChild!=c.lastChild&&(e==c.firstChild?a=-1:a=1),e=c}a<0?s=e:s=e.nextSibling}if(s==i.dom.firstChild)return r;for(;s&&!pn.get(s);)s=s.nextSibling;if(!s)return r+i.length;for(let a=0,c=r;;a++){let f=i.children[a];if(f.dom==s)return c;c+=f.length+f.breakAfter}}else return i.isText()?e==i.dom?r+n:r+(n?i.length:0):r}domAtPos(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.domPosFor(e,n):i.domIn(r,n)}inlineDOMNearPos(e,n){let i,r=-1,s=!1,a,c=-1,f=!1;return this.tile.blockTiles((h,p)=>{if(h.isWidget()){if(h.flags&32&&p>=e)return!0;h.flags&16&&(s=!0)}else{let m=p+h.length;if(p<=e&&(i=h,r=e-p,s=m<e),m>=e&&!a&&(a=h,c=e-p,f=p>e),p>e&&a)return!0}}),!i&&!a?this.domAtPos(e,n):(s&&a?i=null:f&&i&&(a=null),i&&n<0||!a?i.domIn(r,n):a.domIn(c,n))}coordsAt(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.widget instanceof av?null:i.coordsInWidget(r,n,!0):i.coordsIn(r,n)}lineAt(e,n){let{tile:i}=this.tile.resolveBlock(e,n);return i.isLine()?i:null}coordsForChar(e){let{tile:n,offset:i}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function r(s,a){if(s.isComposite())for(let c of s.children){if(c.length>=a){let f=r(c,a);if(f)return f}if(a-=c.length,a<0)break}else if(s.isText()&&a<s.length){let c=Sn(s.text,a);if(c==a)return null;let f=Bf(s.dom,a,c).getClientRects();for(let h=0;h<f.length;h++){let p=f[h];if(h==f.length-1||p.top<p.bottom&&p.left<p.right)return p}}return null}return r(n,i)}measureVisibleLineHeights(e){let n=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,a=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,f=this.view.textDirection==$t.LTR,h=0,p=(m,v,b)=>{for(let O=0;O<m.children.length&&!(v>r);O++){let S=m.children[O],C=v+S.length,E=S.dom.getBoundingClientRect(),{height:$}=E;if(b&&!O&&(h+=E.top-b.top),S instanceof $s)C>i&&p(S,v,E);else if(v>=i&&(h>0&&n.push(-h),n.push($+h),h=0,a)){let z=S.dom.lastChild,P=z?hf(z):[];if(P.length){let R=P[P.length-1],L=f?R.right-E.left:E.right-R.left;L>c&&(c=L,this.minWidth=s,this.minWidthFrom=v,this.minWidthTo=C)}}b&&O==m.children.length-1&&(h+=b.bottom-E.bottom),v=C+S.breakAfter}};return p(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?$t.RTL:$t.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let c=0,f;for(let h of a.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let p=hf(h.dom);if(p.length!=1)return;c+=p[0].width,f=p[0].height}if(c)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:c/a.length,textHeight:f}}});if(e)return e;let n=document.createElement("div"),i,r,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let a=hf(n.firstChild)[0];i=n.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,s=a&&a.height?a.height:i,n.remove()}),{lineHeight:i,charWidth:r,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],a=s?s.from-1:this.view.state.doc.length;if(a>i){let c=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(we.replace({widget:new av(c),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!s)break;i=s.to+1}return we.set(e)}updateDeco(){let e=1,n=this.view.state.facet(ng).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(LO).map((s,a)=>{let c=typeof s=="function";return c&&(i=!0),c?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(nt.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(P5).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(R5))try{if(h(this.view,e.range,e))return!0}catch(p){fi(this.view.state,p,"scroll handler")}let{range:n}=e,i=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=jO(this.view),a={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:c,offsetHeight:f}=this.view.scrollDOM;Q_(this.view.scrollDOM,a,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,c),-c),Math.max(Math.min(e.yMargin,f),-f),this.view.textDirection==$t.LTR)}lineHasWidget(e){let n=i=>i.isWidget()||i.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){f1(this.tile)}}function f1(t,e){let n=e?.get(t);if(n!=1){n==null&&t.destroy();for(let i of t.children)f1(i,e)}}function d8(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function L5(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=p5(n.focusNode,n.focusOffset),r=m5(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let c=pn.get(r.node);if(!c||c.isText()&&c.text!=r.node.nodeValue)s=r;else if(t.docView.lastCompositionAfterCursor){let f=pn.get(i.node);!f||f.isText()&&f.text!=i.node.nodeValue||(s=r)}}if(t.docView.lastCompositionAfterCursor=s!=i,!s)return null;let a=e-s.offset;return{from:a,to:a+s.node.nodeValue.length,node:s.node}}function h8(t,e,n){let i=L5(t,n);if(!i)return null;let{node:r,from:s,to:a}=i,c=r.nodeValue;if(/[\n\r]/.test(c)||t.state.doc.sliceString(i.from,i.to)!=c)return null;let f=e.invertedDesc;return{range:new er(f.mapPos(s),f.mapPos(a),s,a),text:r}}function p8(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let m8=class{constructor(){this.changes=[]}compareRange(e,n){ec(e,n,this.changes)}comparePoint(e,n){ec(e,n,this.changes)}boundChange(e){ec(e,e,this.changes)}};function g8(t,e,n){let i=new m8;return nt.compare(t,e,n,i),i.changes}class y8{constructor(){this.changes=[]}compareRange(e,n){ec(e,n,this.changes)}comparePoint(){}boundChange(e){ec(e,e,this.changes)}}function v8(t,e,n){let i=new y8;return nt.compare(t,e,n,i),i.changes}function b8(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function O8(t,e){let n=!1;return e&&t.iterChangedRanges((i,r)=>{i<e.to&&r>e.from&&(n=!0)}),n}class av extends Ar{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function x8(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return ce.cursor(e);s==0?n=1:s==r.length&&(n=-1);let a=s,c=s;n<0?a=Sn(r.text,s,!1):c=Sn(r.text,s);let f=i(r.text.slice(a,c));for(;a>0;){let h=Sn(r.text,a,!1);if(i(r.text.slice(h,a))!=f)break;a=h}for(;c<r.length;){let h=Sn(r.text,c);if(i(r.text.slice(c,h))!=f)break;c=h}return ce.range(a+r.from,c+r.from)}function S8(t,e,n,i,r){let s=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let c=t.viewState.heightOracle.textHeight,f=Math.floor((r-n.top-(t.defaultLineHeight-c)*.5)/c);s+=f*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+Jb(a,s,t.state.tabSize)}function d1(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!r||s.type==Qn.Text&&(r.type!=s.type||(n<0?s.from<e:s.to>e)))&&(r=s)}}return r||i}return i}function w8(t,e,n,i){let r=d1(t,e.head,e.assoc||-1),s=!i||r.type!=Qn.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let a=t.dom.getBoundingClientRect(),c=t.textDirectionAt(r.from),f=t.posAtCoords({x:n==(c==$t.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(f!=null)return ce.cursor(f,n?-1:1)}return ce.cursor(n?r.to:r.from,n?-1:1)}function o2(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),a=t.textDirectionAt(r.from);for(let c=e,f=null;;){let h=K_(r,s,a,c,n),p=O5;if(!h){if(r.number==(n?t.state.doc.lines:1))return c;p=`
78
+ `,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),h=t.visualLineSide(r,!n)}if(f){if(!f(p))return c}else{if(!i)return h;f=i(p)}c=h}}function C8(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let a=i(s);return r==It.Space&&(r=a),r==a}}function T8(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return ce.cursor(r,e.assoc);let a=e.goalColumn,c,f=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(r,e.assoc||-1),p=t.documentTop;if(h)a==null&&(a=h.left-f.left),c=s<0?h.top:h.bottom;else{let O=t.viewState.lineBlockAt(r);a==null&&(a=Math.min(f.right-f.left,t.defaultCharacterWidth*(r-O.from))),c=(s<0?O.top:O.bottom)+p}let m=f.left+a,v=i??t.viewState.heightOracle.textHeight>>1,b=h1(t,{x:m,y:c+v*s},!1,s);return ce.cursor(b.pos,b.assoc,void 0,a)}function mf(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(s,a,c)=>{if(e>s&&e<a){let f=i||n||(e-s<a-e?-1:1);e=f<0?s:a,i=f}});if(!i)return e}}function j5(t,e){let n=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],s=null;if(r.empty){let a=mf(t,r.from,0);a!=r.from&&(s=ce.cursor(a,-1))}else{let a=mf(t,r.from,-1),c=mf(t,r.to,1);(a!=r.from||c!=r.to)&&(s=ce.range(r.from==r.anchor?a:c,r.from==r.head?a:c))}s&&(n||(n=e.ranges.slice()),n[i]=s)}return n?ce.create(n,e.mainIndex):e}function cv(t,e,n){let i=mf(t.state.facet(cd).map(r=>r(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:ce.cursor(i,i<n.from?1:-1)}class Kr{constructor(e,n){this.pos=e,this.assoc=n}}function h1(t,e,n,i){let r=t.contentDOM.getBoundingClientRect(),s=r.top+t.viewState.paddingTop,{x:a,y:c}=e,f=c-s,h;for(;;){if(f<0)return new Kr(0,1);if(f>t.viewState.docHeight)return new Kr(t.state.doc.length,-1);if(h=t.elementAtHeight(f),i==null)break;if(h.type==Qn.Text){let v=t.docView.coordsAt(i<0?h.from:h.to,i);if(v&&(i<0?v.top<=f+s:v.bottom>=f+s))break}let m=t.viewState.heightOracle.textHeight/2;f=i>0?h.bottom+m:h.top-m}if(t.viewport.from>=h.to||t.viewport.to<=h.from){if(n)return null;if(h.type==Qn.Text){let m=S8(t,r,h,a,c);return new Kr(m,m==h.from?1:-1)}}if(h.type!=Qn.Text)return f<(h.top+h.bottom)/2?new Kr(h.from,1):new Kr(h.to,-1);let p=t.docView.lineAt(h.from,2);return(!p||p.length!=h.length)&&(p=t.docView.lineAt(h.from,-2)),N5(t,p,h.from,a,c)}function N5(t,e,n,i,r){let s=-1,a=null,c=1e9,f=1e9,h=r,p=r,m=(v,b)=>{for(let O=0;O<v.length;O++){let S=v[O];if(S.top==S.bottom)continue;let C=S.left>i?S.left-i:S.right<i?i-S.right:0,E=S.top>r?S.top-r:S.bottom<r?r-S.bottom:0;S.top<=p&&S.bottom>=h&&(h=Math.min(S.top,h),p=Math.max(S.bottom,p),E=0),(s<0||(E-f||C-c)<0)&&(s>=0&&f&&c<C&&a.top<=p-2&&a.bottom>=h+2?f=0:(s=b,c=C,f=E,a=S))}};if(e.isText()){for(let b=0;b<e.length;){let O=Sn(e.text,b);if(m(Bf(e.dom,b,O).getClientRects(),b),!c&&!f)break;b=O}return i>(a.left+a.right)/2==(s2(t,s+n)==$t.LTR)?new Kr(n+Sn(e.text,s),-1):new Kr(n+s,1)}else{if(!e.length)return new Kr(n,1);for(let S=0;S<e.children.length;S++){let C=e.children[S];if(C.flags&48)continue;let E=(C.dom.nodeType==1?C.dom:Bf(C.dom,0,C.length)).getClientRects();if(m(E,S),!c&&!f)break}let v=e.children[s],b=e.posBefore(v,n);return v.isComposite()||v.isText()?N5(t,v,b,Math.max(a.left,Math.min(a.right,i)),r):i>(a.left+a.right)/2==(s2(t,s+n)==$t.LTR)?new Kr(b+v.length,-1):new Kr(b,1)}}function s2(t,e){let n=t.state.doc.lineAt(e);return t.bidiSpans(n)[Ho.find(t.bidiSpans(n),e-n.from,-1,1)].dir}const ef="￿";class k8{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(tt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ef}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let a=pn.get(r),c=r.nextSibling;if(c==n){a?.breakAfter&&!c&&i!=this.view.contentDOM&&this.lineBreak();break}let f=pn.get(c);(a&&f?a.breakAfter:(a?a.breakAfter:om(r))||om(c)&&(r.nodeName!="BR"||a?.isWidget())&&this.text.length>s)&&!A8(c,n)&&this.lineBreak(),r=c}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,c;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(c=r.exec(n))&&(s=c.index,a=c[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let f of this.points)f.node==e&&f.pos>this.text.length&&(f.pos-=a-1);i=s+a}}readNode(e){let n=pn.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(E8(e,i.node,i.offset)?n:0))}}function E8(t,e,n){for(;;){if(!e||n<Xo(e))return!1;if(e==t)return!0;n=Hs(e)+1,e=e.parentNode}}function A8(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let i=pn.get(t);if(!i?.isWidget())return!1;i&&(n||(n=[])).push(i)}if(n)for(let i of n){let r=i.overrideDOMText;if(r?.length)return!1}return!0}class l2{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class R8{constructor(e,n,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=Q5(e.docView.tile,n,i,0))){let c=s||a?[]:D8(e),f=new k8(c,e);f.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=f.text,this.newSel=P8(c,this.bounds.from)}else{let c=e.observer.selectionRange,f=s&&s.node==c.focusNode&&s.offset==c.focusOffset||!s1(e.contentDOM,c.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(c.focusNode,c.focusOffset),h=a&&a.node==c.anchorNode&&a.offset==c.anchorOffset||!s1(e.contentDOM,c.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(c.anchorNode,c.anchorOffset),p=e.viewport;if((be.ios||be.chrome)&&e.state.selection.main.empty&&f!=h&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(f,h),v=Math.max(f,h),b=p.from-m,O=p.to-v;(b==0||b==1||m==0)&&(O==0||O==-1||v==e.state.doc.length)&&(f=0,h=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(ce.range(h,f)):this.newSel=ce.single(h,f)}}}function Q5(t,e,n,i){if(t.isComposite()){let r=-1,s=-1,a=-1,c=-1;for(let f=0,h=i,p=i;f<t.children.length;f++){let m=t.children[f],v=h+m.length;if(h<e&&v>n)return Q5(m,e,n,h);if(v>=e&&r==-1&&(r=f,s=h),h>n&&m.dom.parentNode==t.dom){a=f,c=p;break}p=v,h=v+m.breakAfter}return{from:s,to:c<0?i+t.length:c,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:a<t.children.length&&a>=0?t.children[a].dom:null}}else return t.isText()?{from:i,to:i+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function _5(t,e){let n,{newSel:i}=e,r=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:c}=e.bounds,f=r.from,h=null;(s===8||be.android&&e.text.length<c-a)&&(f=r.to,h="end");let p=q5(t.state.doc.sliceString(a,c,ef),e.text,f-a,h);p&&(be.chrome&&s==13&&p.toB==p.from+2&&e.text.slice(p.from,p.toB)==ef+ef&&p.toB--,n={from:a+p.from,to:a+p.toA,insert:ft.of(e.text.slice(p.from,p.toB).split(ef))})}else i&&(!t.hasFocus&&t.state.facet(qo)||cm(i,r))&&(i=null);if(!n&&!i)return!1;if(!n&&e.typeOver&&!r.empty&&i&&i.main.empty?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:(be.mac||be.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=ce.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:ft.of([n.insert.toString().replace("."," ")])}):n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:t.state.doc.lineAt(r.from).to<r.to&&t.docView.lineHasWidget(r.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:r.from,to:r.to,insert:t.state.toText(t.inputState.insertingText)}:be.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==`
79
+ `&&t.lineWrapping&&(i&&(i=ce.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:ft.of([" "])}),n)return NO(t,n,i,s);if(i&&!cm(i,r)){let a=!1,c="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),c=t.inputState.lastSelectionOrigin,c=="select.pointer"&&(i=j5(t.state.facet(cd).map(f=>f(t)),i))),t.dispatch({selection:i,scrollIntoView:a,userEvent:c}),!0}else return!1}function NO(t,e,n,i=-1){if(be.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(be.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&tc(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&tc(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&tc(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,c=()=>a||(a=M8(t,e,n));return t.state.facet(T5).some(f=>f(t,e.from,e.to,s,c))||t.dispatch(c()),!0}function M8(t,e,n){let i,r=t.state,s=r.selection.main,a=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let f=e.from<s.from?-1:1,h=f<0?s.from:s.to,p=mf(r.facet(cd).map(m=>m(t)),h,f);e.from==p&&(a=p)}if(a>-1)i={changes:e,selection:ce.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let f=s.from<e.from?r.sliceDoc(s.from,e.from):"",h=s.to>e.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(f+e.insert.sliceString(0,void 0,t.state.lineBreak)+h))}else{let f=r.changes(e),h=n&&n.main.to<=f.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let p=t.state.sliceDoc(e.from,e.to),m,v=n&&L5(t,n.main.head);if(v){let O=e.insert.length-(e.to-e.from);m={from:v.from,to:v.to-O}}else m=t.state.doc.lineAt(s.head);let b=s.to-e.to;i=r.changeByRange(O=>{if(O.from==s.from&&O.to==s.to)return{changes:f,range:h||O.map(f)};let S=O.to-b,C=S-p.length;if(t.state.sliceDoc(C,S)!=p||S>=m.from&&C<=m.to)return{range:O};let E=r.changes({from:C,to:S,insert:e.insert}),$=O.to-s.to;return{changes:E,range:h?ce.range(Math.max(0,h.anchor+$),Math.max(0,h.head+$)):O.map(E)}})}else i={changes:f,selection:h&&r.selection.replaceRange(h)}}let c="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,c+=".compose",t.inputState.compositionFirstChange&&(c+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:c,scrollIntoView:!0})}function q5(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s<r&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==r&&t.length==e.length)return null;let a=t.length,c=e.length;for(;a>0&&c>0&&t.charCodeAt(a-1)==e.charCodeAt(c-1);)a--,c--;if(i=="end"){let f=Math.max(0,s-Math.min(a,c));n-=a+f-s}if(a<s&&t.length<e.length){let f=n<=s&&n>=a?s-n:0;s-=f,c=s+(c-a),a=s}else if(c<s){let f=n<=s&&n>=c?s-n:0;s-=f,a=s+(a-c),c=s}return{from:s,toA:a,toB:c}}function D8(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new l2(n,i)),(r!=n||s!=i)&&e.push(new l2(r,s))),e}function P8(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?ce.single(n+e,i+e):null}function cm(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class z8{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,be.safari&&e.contentDOM.addEventListener("input",()=>null),be.gecko&&G8(e.contentDOM.ownerDocument)}handleEvent(e){!q8(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=$8(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let a=!n[s].handlers.length,c=i[s];c&&a!=!c.handlers.length&&(r.removeEventListener(s,this.handleEvent),c=null),c||r.addEventListener(s,this.handleEvent,{passive:a})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&H5.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),be.android&&be.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return be.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=I5.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||B8.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,tc(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:be.safari&&!be.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function a2(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){fi(n.state,r)}}}function $8(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,a=r&&r.plugin.domEventObservers;if(s)for(let c in s){let f=s[c];f&&n(c).handlers.push(a2(i.value,f))}if(a)for(let c in a){let f=a[c];f&&n(c).observers.push(a2(i.value,f))}}for(let i in Tr)n(i).handlers.push(Tr[i]);for(let i in cr)n(i).observers.push(cr[i]);return e}const I5=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],B8="dthko",H5=[16,17,18,20,91,92,224,225],_h=6;function qh(t){return Math.max(0,t)*.7+8}function L8(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class j8{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=__(e.contentDOM),this.atoms=e.state.facet(cd).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(tt.allowMultipleSelections)&&N8(e,n),this.dragging=_8(e,n)&&V5(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&L8(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,a=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:c}=this.scrollParents.y.getBoundingClientRect());let f=jO(this.view);e.clientX-f.left<=r+_h?n=-qh(r-e.clientX):e.clientX+f.right>=a-_h&&(n=qh(e.clientX-a)),e.clientY-f.top<=s+_h?i=-qh(s-e.clientY):e.clientY+f.bottom>=c-_h&&(i=qh(e.clientY-c)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,i=j5(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function N8(t,e){let n=t.state.facet(x5);return n.length?n[0](e):be.mac?e.metaKey:e.ctrlKey}function Q8(t,e){let n=t.state.facet(S5);return n.length?n[0](e):be.mac?!e.altKey:!e.ctrlKey}function _8(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=mc(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s<r.length;s++){let a=r[s];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function q8(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=pn.get(n))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(e))return!1;return!0}const Tr=Object.create(null),cr=Object.create(null),U5=be.ie&&be.ie_version<15||be.ios&&be.webkit_version<604;function I8(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),W5(t,n.value)},50)}function og(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function W5(t,e){e=og(t.state,zO,e);let{state:n}=t,i,r=1,s=n.toText(e),a=s.lines==n.selection.ranges.length;if(p1!=null&&n.selection.ranges.every(f=>f.empty)&&p1==s.toString()){let f=-1;i=n.changeByRange(h=>{let p=n.doc.lineAt(h.from);if(p.from==f)return{range:h};f=p.from;let m=n.toText((a?s.line(r++).text:e)+n.lineBreak);return{changes:{from:p.from,insert:m},range:ce.cursor(h.from+m.length)}})}else a?i=n.changeByRange(f=>{let h=s.line(r++);return{changes:{from:f.from,to:f.to,insert:h.text},range:ce.cursor(f.from+h.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}cr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Tr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);cr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};cr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Tr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(w5))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=U8(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new j8(t,e,n,i)),i&&t.observer.ignore(()=>{d5(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function c2(t,e,n,i){if(i==1)return ce.cursor(e,n);if(i==2)return x8(t.state,e,n);{let r=t.docView.lineAt(e,n),s=t.state.doc.lineAt(r?r.posAtEnd:e),a=r?r.posAtStart:s.from,c=r?r.posAtEnd:s.to;return c<t.state.doc.length&&c==s.to&&c++,ce.range(a,c)}}const H8=be.ie&&be.ie_version<=11;let u2=null,f2=0,d2=0;function V5(t){if(!H8)return t.detail;let e=u2,n=d2;return u2=t,d2=Date.now(),f2=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(f2+1)%3:1}function U8(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),i=V5(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,a,c){let f=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,p=c2(t,f.pos,f.assoc,i);if(n.pos!=f.pos&&!a){let m=c2(t,n.pos,n.assoc,i),v=Math.min(m.from,p.from),b=Math.max(m.to,p.to);p=v<p.from?ce.range(v,b):ce.range(b,v)}return a?r.replaceRange(r.main.extend(p.from,p.to)):c&&i==1&&r.ranges.length>1&&(h=W8(r,f.pos))?h:c?r.addRange(p):ce.create([p])}}}function W8(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:r}=t.ranges[n];if(i<=e&&r>=e)return ce.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Tr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.tile.nearest(e.target);if(r&&r.isWidget()){let s=r.posAtStart,a=s+r.length;(s>=n.to||a<=n.from)&&(n=ce.range(s,a))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",og(t.state,$O,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Tr.dragend=t=>(t.inputState.draggedContent=null,!1);function h2(t,e,n,i){if(n=og(t.state,zO,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,a=i&&s&&Q8(t,e)?{from:s.from,to:s.to}:null,c={from:r,insert:n},f=t.state.changes(a?[a,c]:c);t.focus(),t.dispatch({changes:f,selection:{anchor:f.mapPos(r,-1),head:f.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Tr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&h2(t,e,i.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let c=new FileReader;c.onerror=s,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[a]=c.result),s()},c.readAsText(n[a])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return h2(t,e,i,!0),!0}return!1};Tr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=U5?null:e.clipboardData;return n?(W5(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(I8(t),!1)};function V8(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function X8(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let a=t.doc.lineAt(s);a.number>r&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),r=a.number}i=!0}return{text:og(t,$O,e.join(t.lineBreak)),ranges:n,linewise:i}}let p1=null;Tr.copy=Tr.cut=(t,e)=>{let n=mc(t.root);if(n&&!df(t.contentDOM,n))return!1;let{text:i,ranges:r,linewise:s}=X8(t.state);if(!i&&!s)return!1;p1=s?i:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let a=U5?null:e.clipboardData;return a?(a.clearData(),a.setData("text/plain",i),!0):(V8(t,i),!1)};const X5=ao.define();function G5(t,e){let n=[];for(let i of t.facet(k5)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:X5.of(!0)}):null}function F5(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=G5(t.state,e);n?t.dispatch(n):t.update([])}},10)}cr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),F5(t)};cr.blur=t=>{t.observer.clearSelectionRange(),F5(t)};cr.compositionstart=cr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};cr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,be.chrome&&be.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};cr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Tr.beforeinput=(t,e)=>{var n,i;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(s&&a.length){let c=a[0],f=t.posAtDOM(c.startContainer,c.startOffset),h=t.posAtDOM(c.endContainer,c.endOffset);return NO(t,{from:f,to:h,insert:t.state.toText(s)},null),!0}}let r;if(be.chrome&&be.android&&(r=I5.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return be.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),be.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>cr.compositionend(t,e),20),!1};const p2=new Set;function G8(t){p2.has(t)||(p2.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const m2=["pre-wrap","normal","pre-line","break-spaces"];let vc=!1;function g2(){vc=!1}class F8{constructor(e){this.lineWrapping=e,this.doc=ft.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return m2.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(n=!0,this.heightSamples[Math.floor(r*10)]=!0)}return n}refresh(e,n,i,r,s,a){let c=m2.indexOf(e)>-1,f=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=c||Math.abs(i-this.charWidth)>.1;if(this.lineWrapping=c,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,f){this.heightSamples={};for(let h=0;h<a.length;h++){let p=a[h];p<0?h++:this.heightSamples[Math.floor(p*10)]=!0}}return f}}class Y8{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Or{constructor(e,n,i,r,s){this.from=e,this.length=n,this.top=i,this.height=r,this._content=s}get type(){return typeof this._content=="number"?Qn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof _l?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Or(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Bt=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(Bt||(Bt={}));const Bp=.001;class Kn{constructor(e,n,i=2){this.length=e,this.height=n,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Bp&&(vc=!0),this.height=e)}replace(e,n,i){return Kn.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,a=i.doc;for(let c=r.length-1;c>=0;c--){let{fromA:f,toA:h,fromB:p,toB:m}=r[c],v=s.lineAt(f,Bt.ByPosNoHeight,i.setDoc(n),0,0),b=v.to>=h?v:s.lineAt(h,Bt.ByPosNoHeight,i,0,0);for(m+=b.to-h,h=b.to;c>0&&v.from<=r[c-1].toA;)f=r[c-1].fromA,p=r[c-1].fromB,c--,f<v.from&&(v=s.lineAt(f,Bt.ByPosNoHeight,i,0,0));p+=v.from-f,f=v.from;let O=QO.build(i.setDoc(a),e,p,m);s=um(s,s.replace(f,h,O))}return s.updateHeight(i,0)}static empty(){return new Ei(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,i=e.length,r=0,s=0;for(;;)if(n==i)if(r>s*2){let c=e[n-1];c.break?e.splice(--n,1,c.left,null,c.right):e.splice(--n,1,c.left,c.right),i+=1+c.break,r-=c.size}else if(s>r*2){let c=e[i];c.break?e.splice(i,1,c.left,null,c.right):e.splice(i,1,c.left,c.right),i+=2+c.break,s-=c.size}else break;else if(r<s){let c=e[n++];c&&(r+=c.size)}else{let c=e[--i];c&&(s+=c.size)}let a=0;return e[n-1]==null?(a=1,n--):e[n]==null&&(a=1,i++),new Z8(Kn.of(e.slice(0,n)),a,Kn.of(e.slice(i)))}}function um(t,e){return t==e?t:(t.constructor!=e.constructor&&(vc=!0),e)}Kn.prototype.size=1;const K8=we.replace({});class Y5 extends Kn{constructor(e,n,i){super(e,n),this.deco=i,this.spaceAbove=0}mainBlock(e,n){return new Or(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,i,r){return this.spaceAbove&&e<i+this.spaceAbove?new Or(r,0,i,this.spaceAbove,K8):this.mainBlock(i,r)}lineAt(e,n,i,r,s){let a=this.mainBlock(r,s);return this.spaceAbove?this.blockAt(0,i,r,s).join(a):a}forEachLine(e,n,i,r,s,a){e<=s+this.length&&n>=s&&a(this.lineAt(0,Bt.ByPos,i,r,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ei extends Y5{constructor(e,n,i){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,n){return new Or(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Ei||r instanceof Bn&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Bn?r=new Ei(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):Kn.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Bn extends Kn{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,a,c=0;if(e.lineWrapping){let f=Math.min(this.height,e.lineHeight*s);a=f/s,this.length>s+1&&(c=(this.height-f)/(this.length-s-1))}else a=this.height/s;return{firstLine:i,lastLine:r,perLine:a,perChar:c}}blockAt(e,n,i,r){let{firstLine:s,lastLine:a,perLine:c,perChar:f}=this.heightMetrics(n,r);if(n.lineWrapping){let h=r+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),p=n.doc.lineAt(h),m=c+p.length*f,v=Math.max(i,e-m/2);return new Or(p.from,p.length,v,m,0)}else{let h=Math.max(0,Math.min(a-s,Math.floor((e-i)/c))),{from:p,length:m}=n.doc.line(s+h);return new Or(p,m,i+c*h,c,0)}}lineAt(e,n,i,r,s){if(n==Bt.ByHeight)return this.blockAt(e,i,r,s);if(n==Bt.ByPosNoHeight){let{from:b,to:O}=i.doc.lineAt(e);return new Or(b,O-b,0,0,0)}let{firstLine:a,perLine:c,perChar:f}=this.heightMetrics(i,s),h=i.doc.lineAt(e),p=c+h.length*f,m=h.number-a,v=r+c*m+f*(h.from-s-m);return new Or(h.from,h.length,Math.max(r,Math.min(v,r+this.height-p)),p,0)}forEachLine(e,n,i,r,s,a){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:c,perLine:f,perChar:h}=this.heightMetrics(i,s);for(let p=e,m=r;p<=n;){let v=i.doc.lineAt(p);if(p==e){let O=v.number-c;m+=f*O+h*(e-s-O)}let b=f+h*v.length;a(new Or(v.from,v.length,m,b,0)),m+=b,p=v.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let s=i[i.length-1];s instanceof Bn?i[i.length-1]=new Bn(s.length+r):i.push(null,new Bn(r-1))}if(e>0){let s=i[0];s instanceof Bn?i[0]=new Bn(e+s.length):i.unshift(new Bn(e-1),null)}return Kn.of(i)}decomposeLeft(e,n){n.push(new Bn(e-1),null)}decomposeRight(e,n){n.push(null,new Bn(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],c=Math.max(n,r.from),f=-1;for(r.from>n&&a.push(new Bn(r.from-n-1).updateHeight(e,n));c<=s&&r.more;){let p=e.doc.lineAt(c).length;a.length&&a.push(null);let m=r.heights[r.index++],v=0;m<0&&(v=-m,m=r.heights[r.index++]),f==-1?f=m:Math.abs(m-f)>=Bp&&(f=-2);let b=new Ei(p,m,v);b.outdated=!1,a.push(b),c+=p+1}c<=s&&a.push(null,new Bn(s-c).updateHeight(e,c));let h=Kn.of(a);return(f<0||Math.abs(h.height-this.height)>=Bp||Math.abs(f-this.heightMetrics(e,n).perLine)>=Bp)&&(vc=!0),um(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Z8 extends Kn{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return e<s?this.left.blockAt(e,n,i,r):this.right.blockAt(e,n,s,r+this.left.length+this.break)}lineAt(e,n,i,r,s){let a=r+this.left.height,c=s+this.left.length+this.break,f=n==Bt.ByHeight?e<a:e<c,h=f?this.left.lineAt(e,n,i,r,s):this.right.lineAt(e,n,i,a,c);if(this.break||(f?h.to<c:h.from>c))return h;let p=n==Bt.ByPosNoHeight?Bt.ByPosNoHeight:Bt.ByPos;return f?h.join(this.right.lineAt(c,p,i,a,c)):this.left.lineAt(c,p,i,r,s).join(h)}forEachLine(e,n,i,r,s,a){let c=r+this.left.height,f=s+this.left.length+this.break;if(this.break)e<f&&this.left.forEachLine(e,n,i,r,s,a),n>=f&&this.right.forEachLine(e,n,i,c,f,a);else{let h=this.lineAt(f,Bt.ByPos,i,r,s);e<h.from&&this.left.forEachLine(e,h.from-1,i,r,s,a),h.to>=e&&h.from<=n&&a(h),n>h.to&&this.right.forEachLine(h.to+1,n,i,c,f,a)}}replace(e,n,i){let r=this.left.length+this.break;if(n<r)return this.balanced(this.left.replace(e,n,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let c of i)s.push(c);if(e>0&&y2(s,a-1),n<this.length){let c=s.length;this.decomposeRight(n,s),y2(s,c)}return Kn.of(s)}decomposeLeft(e,n){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(i++,e>=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e<i&&this.left.decomposeRight(e,n),this.break&&e<r&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Kn.of(this.break?[e,null,n]:[e,n]):(this.left=um(this.left,e),this.right=um(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:a}=this,c=n+s.length+this.break,f=null;return r&&r.from<=n+s.length&&r.more?f=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=c+a.length&&r.more?f=a=a.updateHeight(e,c,i,r):a.updateHeight(e,c,i),f?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function y2(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Bn&&(i=t[e+1])instanceof Bn&&t.splice(e-1,3,new Bn(n.length+1+i.length))}const J8=5;class QO{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ei?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ei(i-this.pos,-1,0)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e<n||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,s=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=n-e;i.block?this.addBlock(new Y5(a,r,i)):(a||s||r>=J8)&&this.addLineDeco(r,s,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Ei(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let i=new Bn(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ei)return e;let n=new Ei(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ei)&&!this.isCovered?this.nodes.push(new Ei(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof Ei&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,n,i,r){let s=new QO(i,e);return nt.spans(n,i,r,s,0),s.finish(i)}}function e9(t,e,n){let i=new t9;return nt.compare(t,e,n,i,0),i.changes}class t9{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,i,r){(e<n||i&&i.heightRelevant||r&&r.heightRelevant)&&ec(e,n,this.changes,5)}}function n9(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,s=Math.max(0,n.left),a=Math.min(r.innerWidth,n.right),c=Math.max(0,n.top),f=Math.min(r.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=i.body;)if(h.nodeType==1){let p=h,m=window.getComputedStyle(p);if((p.scrollHeight>p.clientHeight||p.scrollWidth>p.clientWidth)&&m.overflow!="visible"){let v=p.getBoundingClientRect();s=Math.max(s,v.left),a=Math.min(a,v.right),c=Math.max(c,v.top),f=Math.min(h==t.parentNode?r.innerHeight:f,v.bottom)}h=m.position=="absolute"||m.position=="fixed"?p.offsetParent:p.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:c-(n.top+e),bottom:Math.max(c,f)-(n.top+e)}}function i9(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function r9(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class uv{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],s=n[i];if(r.from!=s.from||r.to!=s.to||r.size!=s.size)return!1}return!0}draw(e,n){return we.replace({widget:new o9(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class o9 extends Ar{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class v2{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=b2,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=$t.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(BO).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new F8(n),this.stateDeco=O2(e),this.heightMap=Kn.empty().applyChanges(this.stateDeco,ft.empty,this.heightOracle.setDoc(e.doc),[new er(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=we.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:a})=>r>=s&&r<=a)){let{from:s,to:a}=this.lineBlockAt(r);e.push(new Ih(s,a))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?b2:new _O(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(tf(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=O2(this.state);let r=e.changedRanges,s=er.extendWithRanges(r,e9(i,this.stateDeco,e?e.changes:On.empty(this.state.doc.length))),a=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);g2(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=a||vc)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let f=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<f.from||n.range.head>f.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,n));let h=f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(A5)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?$t.RTL:$t.LTR;let a=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent,c=n.getBoundingClientRect(),f=a||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let h=0,p=0;if(c.width&&c.height){let{scaleX:P,scaleY:R}=f5(n,c);(P>.005&&Math.abs(this.scaleX-P)>.005||R>.005&&Math.abs(this.scaleY-R)>.005)&&(this.scaleX=P,this.scaleY=R,h|=16,a=f=!0)}let m=(parseInt(i.paddingTop)||0)*this.scaleY,v=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=m||this.paddingBottom!=v)&&(this.paddingTop=m,this.paddingBottom=v,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(f=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let b=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=b&&(this.scrollAnchorHeight=-1,this.scrollTop=b),this.scrolledToBottom=h5(e.scrollDOM);let O=(this.printing?r9:n9)(n,this.paddingTop),S=O.top-this.pixelViewport.top,C=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let E=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(E!=this.inView&&(this.inView=E,E&&(f=!0)),!this.inView&&!this.scrollTarget&&!i9(e.dom))return 0;let $=c.width;if((this.contentDOMWidth!=$||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),f){let P=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(P)&&(a=!0),a||r.lineWrapping&&Math.abs($-this.contentDOMWidth)>r.charWidth){let{lineHeight:R,charWidth:L,textHeight:M}=e.docView.measureTextSize();a=R>0&&r.refresh(s,R,L,M,Math.max(5,$/L),P),a&&(e.docView.minWidth=0,h|=16)}S>0&&C>0?p=Math.max(S,C):S<0&&C<0&&(p=Math.min(S,C)),g2();for(let R of this.viewports){let L=R.from==this.viewport.from?P:e.docView.measureVisibleLineHeights(R);this.heightMap=(a?Kn.empty().applyChanges(this.stateDeco,ft.empty,this.heightOracle,[new er(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new Y8(R.from,L))}vc&&(h|=2)}let z=!this.viewportIsAppropriate(this.viewport,p)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return z&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(p,this.scrollTarget),h|=this.updateForViewport()),(h&2||z)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:c}=this,f=new Ih(r.lineAt(a-i*1e3,Bt.ByHeight,s,0,0).from,r.lineAt(c+(1-i)*1e3,Bt.ByHeight,s,0,0).to);if(n){let{head:h}=n.range;if(h<f.from||h>f.to){let p=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),m=r.lineAt(h,Bt.ByPos,s,0,0),v;n.y=="center"?v=(m.top+m.bottom)/2-p/2:n.y=="start"||n.y=="nearest"&&h<f.from?v=m.top:v=m.bottom-p,f=new Ih(r.lineAt(v-1e3/2,Bt.ByHeight,s,0,0).from,r.lineAt(v+p+1e3/2,Bt.ByHeight,s,0,0).to)}}return f}mapViewport(e,n){let i=n.mapPos(e.from,-1),r=n.mapPos(e.to,1);return new Ih(this.heightMap.lineAt(i,Bt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Bt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Bt.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,Bt.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:c}=this;return(e==0||r<=a-Math.max(10,Math.min(-i,250)))&&(n==this.state.doc.length||s>=c+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&s<c+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let i=[];for(let r of e)n.touchesRange(r.from,r.to)||i.push(new uv(n.mapPos(r.from),n.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(e,n){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,s=r>>1,a=r<<1;if(this.defaultTextDirection!=$t.LTR&&!i)return[];let c=[],f=(p,m,v,b)=>{if(m-p<s)return;let O=this.state.selection.main,S=[O.from];O.empty||S.push(O.to);for(let E of S)if(E>p&&E<m){f(p,E-10,v,b),f(E+10,m,v,b);return}let C=l9(e,E=>E.from>=v.from&&E.to<=v.to&&Math.abs(E.from-p)<s&&Math.abs(E.to-m)<s&&!S.some($=>E.from<$&&E.to>$));if(!C){if(m<v.to&&n&&i&&n.visibleRanges.some(z=>z.from<=m&&z.to>=m)){let z=n.moveToLineBoundary(ce.cursor(m),!1,!0).head;z>p&&(m=z)}let E=this.gapSize(v,p,m,b),$=i||E<2e6?E:2e6;C=new uv(p,m,E,$)}c.push(C)},h=p=>{if(p.length<a||p.type!=Qn.Text)return;let m=s9(p.from,p.to,this.stateDeco);if(m.total<a)return;let v=this.scrollTarget?this.scrollTarget.range.head:null,b,O;if(i){let S=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,C,E;if(v!=null){let $=Uh(m,v),z=((this.visibleBottom-this.visibleTop)/2+S)/p.height;C=$-z,E=$+z}else C=(this.visibleTop-p.top-S)/p.height,E=(this.visibleBottom-p.top+S)/p.height;b=Hh(m,C),O=Hh(m,E)}else{let S=m.total*this.heightOracle.charWidth,C=r*this.heightOracle.charWidth,E=0;if(S>2e6)for(let L of e)L.from>=p.from&&L.from<p.to&&L.size!=L.displaySize&&L.from*this.heightOracle.charWidth+E<this.pixelViewport.left&&(E=L.size-L.displaySize);let $=this.pixelViewport.left+E,z=this.pixelViewport.right+E,P,R;if(v!=null){let L=Uh(m,v),M=((z-$)/2+C)/S;P=L-M,R=L+M}else P=($-C)/S,R=(z+C)/S;b=Hh(m,P),O=Hh(m,R)}b>p.from&&f(p.from,b,p,m),O<p.to&&f(O,p.to,p,m)};for(let p of this.viewportLines)Array.isArray(p.type)?p.type.forEach(h):h(p);return c}gapSize(e,n,i,r){let s=Uh(r,i)-Uh(r,n);return this.heightOracle.lineWrapping?e.height*s:r.total*this.heightOracle.charWidth*s}updateLineGaps(e){uv.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=we.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];nt.spans(n,this.viewport.from,this.viewport.to,{span(s,a){i.push({from:s,to:a})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s<i.length&&!(r&8);s++){let a=this.visibleRanges[s],c=i[s];(a.from!=c.from||a.to!=c.to)&&(r|=4,e&&e.mapPos(a.from,-1)==c.from&&e.mapPos(a.to,1)==c.to||(r|=8))}return this.visibleRanges=i,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||tf(this.heightMap.lineAt(e,Bt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||tf(this.heightMap.lineAt(this.scaler.fromDOM(e),Bt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return tf(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Ih{constructor(e,n){this.from=e,this.to=n}}function s9(t,e,n){let i=[],r=t,s=0;return nt.spans(n,t,e,{span(){},point(a,c){a>r&&(i.push({from:r,to:a}),s+=a-r),r=c}},20),r<e&&(i.push({from:r,to:e}),s+=e-r),{total:s,ranges:i}}function Hh({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:a}=e[r],c=a-s;if(i<=c)return s+i;i-=c}}function Uh(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function l9(t,e){for(let n of t)if(e(n))return n}const b2={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function O2(t){let e=t.facet(ng).filter(i=>typeof i!="function"),n=t.facet(LO).filter(i=>typeof i!="function");return n.length&&e.push(nt.join(n)),e}class _O{constructor(e,n,i){let r=0,s=0,a=0;this.viewports=i.map(({from:c,to:f})=>{let h=n.lineAt(c,Bt.ByPos,e,0,0).top,p=n.lineAt(f,Bt.ByPos,e,0,0).bottom;return r+=p-h,{from:c,to:f,top:h,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let c of this.viewports)c.domTop=a+(c.top-s)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),s=c.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return r+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,r=s.domBottom}}fromDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return i+(e-r)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,r=s.domBottom}}eq(e){return e instanceof _O?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,i)=>n.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function tf(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Or(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>tf(r,e)):t._content)}const Wh=ve.define({combine:t=>t.join(" ")}),m1=ve.define({combine:t=>t.indexOf(!0)>-1}),g1=qs.newName(),K5=qs.newName(),Z5=qs.newName(),J5={"&light":"."+K5,"&dark":"."+Z5};function y1(t,e,n){return new qs(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const a9=y1("."+g1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},J5),c9={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},fv=be.ie&&be.ie_version<=11;class u9{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new q_,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(be.ie&&be.ie_version<=11||be.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&be.android&&e.constructor.EDIT_CONTEXT!==!1&&!(be.chrome&&be.chrome_version<126)&&(this.editContext=new d9(e),e.state.facet(qo)&&(e.contentDOM.editContext=this.editContext.editContext)),fv&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(qo)?i.root.activeElement!=this.dom:!df(this.dom,r))return;let s=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(be.ie&&be.ie_version<=11||be.android&&be.chrome)&&!i.state.selection.main.empty&&r.focusNode&&pf(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=mc(e.root);if(!n)return!1;let i=be.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&f9(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=df(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&H_(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let i=this.dom;i;)if(i.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=n)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,c9),fv&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),fv&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var i;if(!this.delayedAndroidKey){let r=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&tc(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&df(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new R8(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=_5(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!cm(this.view.state.selection,n.newSel.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let i=x2(n,e.previousSibling||e.target.previousSibling,-1),r=x2(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(qo)!=e.state.facet(qo)&&(e.view.contentDOM.editContext=e.state.facet(qo)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function x2(t,e,n){for(;e;){let i=pn.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function S2(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor,1);return pf(a.node,a.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function f9(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return S2(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?S2(t,n):null}class d9{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:a}=r,c=this.toEditorPos(i.updateRangeStart),f=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:c,drifted:!1});let h=f-c>i.text.length;c==this.from&&s<this.from?c=s:f==this.to&&s>this.to&&(f=s);let p=q5(e.state.sliceDoc(c,f),i.text,(h?r.from:r.to)-c,h?"end":null);if(!p){let v=ce.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));cm(v,r)||e.dispatch({selection:v,userEvent:"select"});return}let m={from:p.from+c,to:p.toA+c,insert:ft.of(i.text.slice(p.from,p.toB).split(`
80
+ `))};if((be.mac||be.android)&&m.from==a-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(m={from:c,to:f,insert:ft.of([i.text.replace("."," ")])}),this.pendingContextChange=m,!e.state.readOnly){let v=this.to-this.from+(m.to-m.from+m.insert.length);NO(e,m,ce.single(this.toEditorPos(i.selectionStart,v),this.toEditorPos(i.selectionEnd,v)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),m.from<m.to&&!m.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let a=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);a<c;a++){let f=e.coordsForChar(a);s=f&&new DOMRect(f.left,f.top,f.right-f.left,f.bottom-f.top)||s||new DOMRect,r.push(s)}n.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let s of i.getTextFormats()){let a=s.underlineStyle,c=s.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(c)){let f=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(f<h){let p=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(c)?1:2}px`;r.push(we.mark({attributes:{style:p}}).range(f,h))}}}e.dispatch({effects:M5.of(we.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=mc(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,a,c,f,h)=>{if(i)return;let p=h.length-(a-s);if(r&&a>=r.to)if(r.from==s&&r.to==a&&r.insert.eq(h)){r=this.pendingContextChange=null,n+=p,this.to+=p;return}else r=null,this.revertPending(e.state);if(s+=n,a+=n,a<=this.from)this.from+=p,this.to+=p;else if(s<this.to){if(s<this.from||a>this.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(a),h.toString()),this.to+=p}n+=p}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class he{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||I_(e.parent)||document,this.viewState=new v2(e.state||tt.create(e)),e.scrollTo&&e.scrollTo.is(Qh)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ua).map(r=>new ov(r));for(let r of this.plugins)r.update(this);this.observer=new u9(this),this.inputState=new z8(this),this.inputState.ensureHandlers(this.plugins),this.docView=new r2(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=!0,this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof hn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let v of e){if(v.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=v.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,c=0,f=null;e.some(v=>v.annotation(X5))?(this.inputState.notifiedFocused=a,c=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,f=G5(s,a),f||(c=1));let h=this.observer.delayedAndroidKey,p=null;if(h?(this.observer.clearDelayedAndroidKey(),p=this.observer.readChange(),(p&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(p=null)):this.observer.clear(),s.facet(tt.phrases)!=this.state.facet(tt.phrases))return this.setState(s);r=sm.create(this,s,e),r.flags|=c;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let v of e){if(m&&(m=m.map(v.changes)),v.scrollIntoView){let{main:b}=v.state.selection;m=new nc(b.empty?b:ce.cursor(b.head,b.head>b.anchor?-1:1))}for(let b of v.effects)b.is(Qh)&&(m=b.value.clip(this.state))}this.viewState.update(r,m),this.bidiCache=fm.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Ju)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(v=>v.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Wh)!=r.state.facet(Wh)&&(this.viewState.mustMeasureContent=!0),(n||i||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let v of this.state.facet(u1))try{v(r)}catch(b){fi(this.state,b,"update listener")}(f||p)&&Promise.resolve().then(()=>{f&&this.state==f.startState&&this.dispatch(f),p&&!_5(this,p)&&h.force&&tc(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new v2(e),this.plugins=e.facet(Ua).map(i=>new ov(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new r2(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ua),i=e.state.facet(Ua);if(n!=i){let r=[];for(let s of i){let a=n.indexOf(s);if(a<0)r.push(new ov(s));else{let c=this.plugins[a];c.mustUpdate=e,r.push(c)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);n!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(i){fi(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let c=0;;c++){if(a<0)if(h5(i))s=-1,a=this.viewState.heightMap.height;else{let b=this.viewState.scrollAnchorAt(r);s=b.from,a=b.top}this.updateState=1;let f=this.viewState.measure(this);if(!f&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];f&4||([this.measureRequests,h]=[h,this.measureRequests]);let p=h.map(b=>{try{return b.read(this)}catch(O){return fi(this.state,O),w2}}),m=sm.create(this,this.state,[]),v=!1;m.flags|=f,n?n.flags|=f:n=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),v=this.docView.update(m),v&&this.docViewUpdate());for(let b=0;b<h.length;b++)if(p[b]!=w2)try{let O=h[b];O.write&&O.write(p[b],this)}catch(O){fi(this.state,O)}if(v&&this.docView.updateSelection(!0),!m.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let O=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-a;if(O>1||O<-1){r=r+O,i.scrollTop=r/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let c of this.state.facet(u1))c(n)}get themeClasses(){return g1+" "+(this.state.facet(m1)?Z5:K5)+" "+this.state.facet(Wh)}updateAttrs(){let e=C2(this,D5,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(qo)?"true":"false",class:"cm-content",style:`${be.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),C2(this,BO,n);let i=this.observer.ignore(()=>{let r=Zk(this.contentDOM,this.contentAttrs,n),s=Zk(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(he.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Ju);let e=this.state.facet(he.cspNonce);qs.mount(this.root,this.styleModules.concat(a9).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(i=>i.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return cv(this,e,o2(this,e,n,i))}moveByGroup(e,n){return cv(this,e,o2(this,e,n,i=>C8(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return ce.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return w8(this,e,n,i)}moveVertically(e,n,i){return cv(this,e,T8(this,e,n,i))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let i=h1(this,e,n);return i&&i.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),h1(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),a=s[Ho.find(s,e-r.from,-1,n)];return $f(i,a.dir==$t.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(E5)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>h9)return b5(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||v5(s.isolates,i=t2(this,e))))return s.order;i||(i=t2(this,e));let r=Y_(e.text,n,i);return this.bidiCache.push(new fm(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||be.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{d5(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Qh.of(new nc(typeof e=="number"?ce.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Qh.of(new nc(ce.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Jt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Jt.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=qs.newName(),r=[Wh.of(i),Ju.of(y1(`.${i}`,e))];return n&&n.dark&&r.push(m1.of(!0)),r}static baseTheme(e){return so.lowest(Ju.of(y1("."+g1,e,J5)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&pn.get(i)||pn.get(e);return((n=r?.root)===null||n===void 0?void 0:n.view)||null}}he.styleModule=Ju;he.inputHandler=T5;he.clipboardInputFilter=zO;he.clipboardOutputFilter=$O;he.scrollHandler=R5;he.focusChangeEffect=k5;he.perLineTextDirection=E5;he.exceptionSink=C5;he.updateListener=u1;he.editable=qo;he.mouseSelectionStyle=w5;he.dragMovesSelection=S5;he.clickAddsSelectionRange=x5;he.decorations=ng;he.blockWrappers=P5;he.outerDecorations=LO;he.atomicRanges=cd;he.bidiIsolatedRanges=z5;he.scrollMargins=$5;he.darkTheme=m1;he.cspNonce=ve.define({combine:t=>t.length?t[0]:""});he.contentAttributes=BO;he.editorAttributes=D5;he.lineWrapping=he.contentAttributes.of({class:"cm-lineWrapping"});he.announce=Le.define();const h9=4096,w2={};class fm{constructor(e,n,i,r,s,a){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=a}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:$t.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let a=e[s];a.dir==r&&!n.touchesRange(a.from,a.to)&&i.push(new fm(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return i}}function C2(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let s=i[r],a=typeof s=="function"?s(t):s;a&&MO(a,n)}return n}const p9=be.mac?"mac":be.windows?"win":be.linux?"linux":"key";function m9(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,a,c;for(let f=0;f<n.length-1;++f){const h=n[f];if(/^(cmd|meta|m)$/i.test(h))c=!0;else if(/^a(lt)?$/i.test(h))r=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))a=!0;else if(/^mod$/i.test(h))e=="mac"?c=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return r&&(i="Alt-"+i),s&&(i="Ctrl-"+i),c&&(i="Meta-"+i),a&&(i="Shift-"+i),i}function Vh(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const g9=so.default(he.domEventHandlers({keydown(t,e){return tD(eD(e.state),t,e,"editor")}})),Go=ve.define({enables:g9}),T2=new WeakMap;function eD(t){let e=t.facet(Go),n=T2.get(e);return n||T2.set(e,n=b9(e.reduce((i,r)=>i.concat(r),[]))),n}function y9(t,e,n){return tD(eD(t.state),e,t,n)}let Ms=null;const v9=4e3;function b9(t,e=p9){let n=Object.create(null),i=Object.create(null),r=(a,c)=>{let f=i[a];if(f==null)i[a]=c;else if(f!=c)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,c,f,h,p)=>{var m,v;let b=n[a]||(n[a]=Object.create(null)),O=c.split(/ (?!$)/).map(E=>m9(E,e));for(let E=1;E<O.length;E++){let $=O.slice(0,E).join(" ");r($,!0),b[$]||(b[$]={preventDefault:!0,stopPropagation:!1,run:[z=>{let P=Ms={view:z,prefix:$,scope:a};return setTimeout(()=>{Ms==P&&(Ms=null)},v9),!0}]})}let S=O.join(" ");r(S,!1);let C=b[S]||(b[S]={preventDefault:!1,stopPropagation:!1,run:((v=(m=b._any)===null||m===void 0?void 0:m.run)===null||v===void 0?void 0:v.slice())||[]});f&&C.run.push(f),h&&(C.preventDefault=!0),p&&(C.stopPropagation=!0)};for(let a of t){let c=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let h of c){let p=n[h]||(n[h]=Object.create(null));p._any||(p._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=a;for(let v in p)p[v].run.push(b=>m(b,v1))}let f=a[e]||a.key;if(f)for(let h of c)s(h,f,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(h,"Shift-"+f,a.shift,a.preventDefault,a.stopPropagation)}return n}let v1=null;function tD(t,e,n,i){v1=e;let r=z_(e),s=ci(r,0),a=Yr(s)==r.length&&r!=" ",c="",f=!1,h=!1,p=!1;Ms&&Ms.view==n&&Ms.scope==i&&(c=Ms.prefix+" ",H5.indexOf(e.keyCode)<0&&(h=!0,Ms=null));let m=new Set,v=C=>{if(C){for(let E of C.run)if(!m.has(E)&&(m.add(E),E(n)))return C.stopPropagation&&(p=!0),!0;C.preventDefault&&(C.stopPropagation&&(p=!0),h=!0)}return!1},b=t[i],O,S;return b&&(v(b[c+Vh(r,e,!a)])?f=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(be.windows&&e.ctrlKey&&e.altKey)&&!(be.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(O=Is[e.keyCode])&&O!=r?(v(b[c+Vh(O,e,!0)])||e.shiftKey&&(S=Pf[e.keyCode])!=r&&S!=O&&v(b[c+Vh(S,e,!1)]))&&(f=!0):a&&e.shiftKey&&v(b[c+Vh(r,e,!0)])&&(f=!0),!f&&v(b._any)&&(f=!0)),h&&(f=!0),f&&p&&e.stopPropagation(),v1=null,f}class ud{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=nD(e);return[new ud(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return O9(e,n,i)}}function nD(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==$t.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function k2(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,c=t.posAtCoords({x:s.left+1,y:a}),f=t.posAtCoords({x:s.right-1,y:a});return c==null||f==null?i:{from:Math.max(i.from,Math.min(c,f)),to:Math.min(i.to,Math.max(c,f))}}function O9(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==$t.LTR,a=t.contentDOM,c=a.getBoundingClientRect(),f=nD(t),h=a.querySelector(".cm-line"),p=h&&window.getComputedStyle(h),m=c.left+(p?parseInt(p.paddingLeft)+Math.min(0,parseInt(p.textIndent)):0),v=c.right-(p?parseInt(p.paddingRight):0),b=d1(t,i,1),O=d1(t,r,-1),S=b.type==Qn.Text?b:null,C=O.type==Qn.Text?O:null;if(S&&(t.lineWrapping||b.widgetLineBreaks)&&(S=k2(t,i,1,S)),C&&(t.lineWrapping||O.widgetLineBreaks)&&(C=k2(t,r,-1,C)),S&&C&&S.from==C.from&&S.to==C.to)return $(z(n.from,n.to,S));{let R=S?z(n.from,null,S):P(b,!1),L=C?z(null,n.to,C):P(O,!0),M=[];return(S||b).to<(C||O).from-(S&&C?1:0)||b.widgetLineBreaks>1&&R.bottom+t.defaultLineHeight/2<L.top?M.push(E(m,R.bottom,v,L.top)):R.bottom<L.top&&t.elementAtHeight((R.bottom+L.top)/2).type==Qn.Text&&(R.bottom=L.top=(R.bottom+L.top)/2),$(R).concat(M).concat($(L))}function E(R,L,M,B){return new ud(e,R-f.left,L-f.top,M-R,B-L)}function $({top:R,bottom:L,horizontal:M}){let B=[];for(let _=0;_<M.length;_+=2)B.push(E(M[_],R,M[_+1],L));return B}function z(R,L,M){let B=1e9,_=-1e9,A=[];function Q(I,V,N,X,Y){let K=t.coordsAtPos(I,I==M.to?-2:2),le=t.coordsAtPos(N,N==M.from?2:-2);!K||!le||(B=Math.min(K.top,le.top,B),_=Math.max(K.bottom,le.bottom,_),Y==$t.LTR?A.push(s&&V?m:K.left,s&&X?v:le.right):A.push(!s&&X?m:le.left,!s&&V?v:K.right))}let T=R??M.from,H=L??M.to;for(let I of t.visibleRanges)if(I.to>T&&I.from<H)for(let V=Math.max(I.from,T),N=Math.min(I.to,H);;){let X=t.state.doc.lineAt(V);for(let Y of t.bidiSpans(X)){let K=Y.from+X.from,le=Y.to+X.from;if(K>=N)break;le>V&&Q(Math.max(K,V),R==null&&K<=T,Math.min(le,N),L==null&&le>=H,Y.dir)}if(V=X.to+1,V>=N)break}return A.length==0&&Q(T,R==null,H,L==null,t.textDirection),{top:B,bottom:_,horizontal:A}}function P(R,L){let M=c.top+(L?R.top:R.bottom);return{top:M,bottom:M,horizontal:[]}}}function x9(t,e){return t.constructor==e.constructor&&t.eq(e)}class S9{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Lp)!=e.state.facet(Lp)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(Lp);for(;n<i.length&&i[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,i)=>!x9(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e,be.safari&&be.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Lp=ve.define();function iD(t){return[Jt.define(e=>new S9(e,t)),Lp.of(t)]}const Lf=ve.define({combine(t){return co(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function qO(t={}){return[Lf.of(t),w9,C9,T9,A5.of(!0)]}function rD(t){return t.startState.facet(Lf)!=t.state.facet(Lf)}const w9=iD({above:!0,markers(t){let{state:e}=t,n=e.facet(Lf),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor){let a=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",c=r.empty?r:ce.cursor(r.head,r.head>r.anchor?-1:1);for(let f of ud.forRange(t,a,c))i.push(f)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=rD(t);return n&&E2(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){E2(e.state,t)},class:"cm-cursorLayer"});function E2(t,e){e.style.animationDuration=t.facet(Lf).cursorBlinkRate+"ms"}const C9=iD({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:ud.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||rD(t)},class:"cm-selectionLayer"}),T9=so.highest(he.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),oD=Le.define({map(t,e){return t==null?null:e.mapPos(t)}}),nf=An.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(oD)?i.value:n,t)}}),k9=Jt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(nf);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(nf)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(nf),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(nf)!=t&&this.view.dispatch({effects:oD.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function sD(){return[nf,k9]}function A2(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),a=n,c;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;c=e.exec(s.value);)r(a+c.index,c)}function E9(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class A9{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(c,f,h,p)=>r(p,h,h+c[0].length,c,f);else if(typeof i=="function")this.addMatch=(c,f,h,p)=>{let m=i(c,f,h);m&&p(h,h+c[0].length,m)};else if(i)this.addMatch=(c,f,h,p)=>p(h,h+c[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(e){let n=new lo,i=n.add.bind(n);for(let{from:r,to:s}of E9(e,this.maxLength))A2(e.state.doc,this.regexp,r,s,(a,c)=>this.addMatch(c,e,a,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,a,c,f)=>{f>=e.view.viewport.from&&c<=e.view.viewport.to&&(i=Math.min(c,i),r=Math.max(f,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let a=Math.max(s.from,i),c=Math.min(s.to,r);if(c>=a){let f=e.state.doc.lineAt(a),h=f.to<c?e.state.doc.lineAt(c):f,p=Math.max(s.from,f.from),m=Math.min(s.to,h.to);if(this.boundary){for(;a>f.from;a--)if(this.boundary.test(f.text[a-1-f.from])){p=a;break}for(;c<h.to;c++)if(this.boundary.test(h.text[c-h.from])){m=c;break}}let v=[],b,O=(S,C,E)=>v.push(E.range(S,C));if(f==h)for(this.regexp.lastIndex=p-f.from;(b=this.regexp.exec(f.text))&&b.index<m-f.from;)this.addMatch(b,e,b.index+f.from,O);else A2(e.state.doc,this.regexp,p,m,(S,C)=>this.addMatch(C,e,S,O));n=n.update({filterFrom:p,filterTo:m,filter:(S,C)=>S<p||C>m,add:v})}}return n}}const b1=/x/.unicode!=null?"gu":"g",R9=new RegExp(`[\0-\b
81
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,b1),M9={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let dv=null;function D9(){var t;if(dv==null&&typeof document<"u"&&document.body){let e=document.body.style;dv=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return dv||!1}const jp=ve.define({combine(t){let e=co(t,{render:null,specialChars:R9,addSpecialChars:null});return(e.replaceTabs=!D9())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,b1)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,b1)),e}});function IO(t={}){return[jp.of(t),P9()]}let R2=null;function P9(){return R2||(R2=Jt.fromClass(class{constructor(t){this.view=t,this.decorations=we.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(jp)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new A9({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=ci(e[0],0);if(s==9){let a=r.lineAt(i),c=n.state.tabSize,f=Rc(a.text,c,i-a.from);return we.replace({widget:new L9((c-f%c)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=we.replace({widget:new B9(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(jp);t.startState.facet(jp)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const z9="•";function $9(t){return t>=32?z9:t==10?"␤":String.fromCharCode(9216+t)}class B9 extends Ar{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=$9(this.code),i=e.state.phrase("Control character")+" "+(M9[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class L9 extends Ar{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function j9(){return Q9}const N9=we.line({class:"cm-activeLine"}),Q9=Jt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(N9.range(r.from)),e=r.from)}return we.set(n)}},{decorations:t=>t.decorations});class _9 extends Ar{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?hf(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=$f(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function q9(t){let e=Jt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?we.set([we.widget({widget:new _9(t),side:1}).range(0)]):we.none}get decorations(){return this.view.state.doc.length?we.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,he.contentAttributes.of({"aria-placeholder":t})]:e}const O1=2e3;function I9(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>O1||n.off>O1||e.col<0||n.col<0){let a=Math.min(e.off,n.off),c=Math.max(e.off,n.off);for(let f=i;f<=r;f++){let h=t.doc.line(f);h.length<=c&&s.push(ce.range(h.from+a,h.to+c))}}else{let a=Math.min(e.col,n.col),c=Math.max(e.col,n.col);for(let f=i;f<=r;f++){let h=t.doc.line(f),p=Jb(h.text,a,t.tabSize,!0);if(p<0)s.push(ce.cursor(h.to));else{let m=Jb(h.text,c,t.tabSize);s.push(ce.range(h.from+p,h.from+m))}}}return s}function H9(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function M2(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>O1?-1:r==i.length?H9(t,e.clientX):Rc(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function U9(t,e){let n=M2(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),a=r.state.doc.lineAt(s);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},i=i.map(r.changes)}},get(r,s,a){let c=M2(t,r);if(!c)return i;let f=I9(t.state,n,c);return f.length?a?ce.create(f.concat(i.ranges)):ce.create(f):i}}:null}function lD(t){let e=(n=>n.altKey&&n.button==0);return he.mouseSelectionStyle.of((n,i)=>e(i)?U9(n,i):null)}const W9={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},V9={style:"cursor: crosshair"};function X9(t={}){let[e,n]=W9[t.key||"Alt"],i=Jt.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,he.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?V9:null})]}const Xh="-10000px";class aD{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=i(a,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(f=>f);if(r===this.input){for(let f of this.tooltipViews)f.update&&f.update(e);return!1}let a=[],c=n?[]:null;for(let f=0;f<s.length;f++){let h=s[f],p=-1;if(h){for(let m=0;m<this.tooltips.length;m++){let v=this.tooltips[m];v&&v.create==h.create&&(p=m)}if(p<0)a[f]=this.createTooltipView(h,f?a[f-1]:null),c&&(c[f]=!!h.above);else{let m=a[f]=this.tooltipViews[p];c&&(c[f]=n[p]),m.update&&m.update(e)}}}for(let f of this.tooltipViews)a.indexOf(f)<0&&(this.removeTooltipView(f),(i=f.destroy)===null||i===void 0||i.call(f));return n&&(c.forEach((f,h)=>n[h]=f),n.length=c.length),this.input=r,this.tooltips=s,this.tooltipViews=a,!0}}function G9(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const hv=ve.define({combine:t=>{var e,n,i;return{position:be.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||G9}}}),D2=new WeakMap,HO=Jt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(hv);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new aD(t,UO,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(hv);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Xh,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(be.safari){let a=s.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=jO(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,a)=>{let c=this.manager.tooltipViews[a];return c.getCoords?c.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(hv).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let c of this.manager.tooltipViews)c.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,a=[];for(let c=0;c<this.manager.tooltips.length;c++){let f=this.manager.tooltips[c],h=this.manager.tooltipViews[c],{dom:p}=h,m=t.pos[c],v=t.size[c];if(!m||f.clip!==!1&&(m.bottom<=Math.max(n.top,i.top)||m.top>=Math.min(n.bottom,i.bottom)||m.right<Math.max(n.left,i.left)-.1||m.left>Math.min(n.right,i.right)+.1)){p.style.top=Xh;continue}let b=f.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=b?7:0,S=v.right-v.left,C=(e=D2.get(h))!==null&&e!==void 0?e:v.bottom-v.top,E=h.offset||Y9,$=this.view.textDirection==$t.LTR,z=v.width>i.right-i.left?$?i.left:i.right-v.width:$?Math.max(i.left,Math.min(m.left-(b?14:0)+E.x,i.right-S)):Math.min(Math.max(i.left,m.left-S+(b?14:0)-E.x),i.right-S),P=this.above[c];!f.strictSide&&(P?m.top-C-O-E.y<i.top:m.bottom+C+O+E.y>i.bottom)&&P==i.bottom-m.bottom>m.top-i.top&&(P=this.above[c]=!P);let R=(P?m.top-i.top:i.bottom-m.bottom)-O;if(R<C&&h.resize!==!1){if(R<this.view.defaultLineHeight){p.style.top=Xh;continue}D2.set(h,C),p.style.height=(C=R)/s+"px"}else p.style.height&&(p.style.height="");let L=P?m.top-C-O-E.y:m.bottom+O+E.y,M=z+S;if(h.overlap!==!0)for(let B of a)B.left<M&&B.right>z&&B.top<L+C&&B.bottom>L&&(L=P?B.top-C-2-O:B.bottom+O+2);if(this.position=="absolute"?(p.style.top=(L-t.parent.top)/s+"px",P2(p,(z-t.parent.left)/r)):(p.style.top=L/s+"px",P2(p,z/r)),b){let B=m.left+($?E.x:-E.x)-(z+14-7);b.style.left=B/r+"px"}h.overlap!==!0&&a.push({left:z,top:L,right:M,bottom:L+C}),p.classList.toggle("cm-tooltip-above",P),p.classList.toggle("cm-tooltip-below",!P),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Xh}},{eventObservers:{scroll(){this.maybeMeasure()}}});function P2(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const F9=he.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Y9={x:0,y:0},UO=ve.define({enables:[HO,F9]}),dm=ve.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class sg{static create(e){return new sg(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new aD(e,dm,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const K9=UO.compute([dm],t=>{let e=t.facet(dm);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:sg.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class Z9{constructor(e,n,i,r,s){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,i=e.docView.tile.nearest(n.target);if(!i)return;let r,s=1;if(i.isWidget())r=i.posAtStart;else{if(r=e.posAtCoords(n),r==null)return;let c=e.coordsAtPos(r);if(!c||n.y<c.top||n.y>c.bottom||n.x<c.left-e.defaultCharacterWidth||n.x>c.right+e.defaultCharacterWidth)return;let f=e.bidiSpans(e.state.doc.lineAt(r)).find(p=>p.from<=r&&p.to>=r),h=f&&f.dir==$t.RTL?-1:1;s=n.x<c.left?-h:h}let a=this.source(e,r,s);if(a?.then){let c=this.pending={pos:r};a.then(f=>{this.pending==c&&(this.pending=null,f&&!(Array.isArray(f)&&!f.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(f)?f:[f])}))},f=>fi(e.state,f,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(HO),n=e?e.manager.tooltips.findIndex(i=>i.create==sg.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!J9(s.dom,e)||this.pending){let{pos:a}=r[0]||this.pending,c=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:a;(a==c?this.view.posAtCoords(this.lastMove)!=a:!eq(this.view,a,c,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Gh=4;function J9(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let c=a.getBoundingClientRect();r=Math.min(c.top,r),s=Math.max(c.bottom,s)}return e.clientX>=n-Gh&&e.clientX<=i+Gh&&e.clientY>=r-Gh&&e.clientY<=s+Gh}function eq(t,e,n,i,r,s){let a=t.scrollDOM.getBoundingClientRect(),c=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>i||a.right<i||a.top>r||Math.min(a.bottom,c)<r)return!1;let f=t.posAtCoords({x:i,y:r},!1);return f>=e&&f<=n}function tq(t,e={}){let n=Le.define(),i=An.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(a=>!e.hideOn(s,a))),s.docChanged)){let a=[];for(let c of r){let f=s.changes.mapPos(c.pos,-1,Nn.TrackDel);if(f!=null){let h=Object.assign(Object.create(null),c);h.pos=f,h.end!=null&&(h.end=s.changes.mapPos(h.end)),a.push(h)}}r=a}for(let a of s.effects)a.is(n)&&(r=a.value),a.is(nq)&&(r=[]);return r},provide:r=>dm.from(r)});return{active:i,extension:[i,Jt.define(r=>new Z9(r,t,i,n,e.hoverTime||300)),K9]}}function cD(t,e){let n=t.plugin(HO);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const nq=Le.define(),z2=ve.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function WO(t,e){let n=t.plugin(uD),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const uD=Jt.fromClass(class{constructor(t){this.input=t.state.facet(jf),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(z2);this.top=new Fh(t,!0,e.topContainer),this.bottom=new Fh(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(z2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Fh(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Fh(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(jf);if(n!=this.input){let i=n.filter(f=>f),r=[],s=[],a=[],c=[];for(let f of i){let h=this.specs.indexOf(f),p;h<0?(p=f(t.view),c.push(p)):(p=this.panels[h],p.update&&p.update(t)),r.push(p),(p.top?s:a).push(p)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(a);for(let f of c)f.dom.classList.add("cm-panel"),f.mount&&f.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>he.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Fh{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=$2(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=$2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function $2(t){let e=t.nextSibling;return t.remove(),e}const jf=ve.define({enables:uD});function iq(t,e){let n,i=new Promise(a=>n=a),r=a=>rq(a,e,n);t.state.field(pv,!1)?t.dispatch({effects:fD.of(r)}):t.dispatch({effects:Le.appendConfig.of(pv.init(()=>[r]))});let s=dD.of(r);return{close:s,result:i.then(a=>((t.win.queueMicrotask||(f=>t.win.setTimeout(f,10)))(()=>{t.state.field(pv).indexOf(r)>-1&&t.dispatch({effects:s})}),a))}}const pv=An.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(fD)?t=[n.value].concat(t):n.is(dD)&&(t=t.filter(i=>i!=n.value));return t},provide:t=>jf.computeN([t],e=>e.field(t))}),fD=Le.define(),dD=Le.define();function rq(t,e,n){let i=e.content?e.content(t,()=>a(null)):null;if(!i){if(i=Rt("form"),e.input){let c=Rt("input",e.input);/^(text|password|number|email|tel|url)$/.test(c.type)&&c.classList.add("cm-textfield"),c.name||(c.name="input"),i.appendChild(Rt("label",(e.label||"")+": ",c))}else i.appendChild(document.createTextNode(e.label||""));i.appendChild(document.createTextNode(" ")),i.appendChild(Rt("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let r=i.nodeName=="FORM"?[i]:i.querySelectorAll("form");for(let c=0;c<r.length;c++){let f=r[c];f.addEventListener("keydown",h=>{h.keyCode==27?(h.preventDefault(),a(null)):h.keyCode==13&&(h.preventDefault(),a(f))}),f.addEventListener("submit",h=>{h.preventDefault(),a(f)})}let s=Rt("div",i,Rt("button",{onclick:()=>a(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function a(c){s.contains(s.ownerDocument.activeElement)&&t.focus(),n(c)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let c;typeof e.focus=="string"?c=i.querySelector(e.focus):c=i.querySelector("input")||i.querySelector("button"),c&&"select"in c?c.select():c&&"focus"in c&&c.focus()}}}}class Fo extends _s{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Fo.prototype.elementClass="";Fo.prototype.toDOM=void 0;Fo.prototype.mapMode=Nn.TrackBefore;Fo.prototype.startSide=Fo.prototype.endSide=-1;Fo.prototype.point=!0;const Np=ve.define(),oq=ve.define(),sq={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>nt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},gf=ve.define();function lq(t){return[hD(),gf.of({...sq,...t})]}const B2=ve.define({combine:t=>t.some(e=>e)});function hD(t){return[aq]}const aq=Jt.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(gf).map(e=>new j2(t,e)),this.fixed=!t.state.facet(B2);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(B2)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=nt.iter(this.view.state.facet(Np),this.view.viewport.from),i=[],r=this.gutters.map(s=>new cq(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let a=!0;for(let c of s.type)if(c.type==Qn.Text&&a){x1(n,i,c.from);for(let f of r)f.line(this.view,c,i);a=!1}else if(c.widget)for(let f of r)f.widget(this.view,c)}else if(s.type==Qn.Text){x1(n,i,s.from);for(let a of r)a.line(this.view,s,i)}else if(s.widget)for(let a of r)a.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(gf),n=t.state.facet(gf),i=t.docChanged||t.heightChanged||t.viewportChanged||!nt.eq(t.startState.facet(Np),t.state.facet(Np),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let a=e.indexOf(s);a<0?r.push(new j2(this.view,s)):(this.gutters[a].update(t),r.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>he.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==$t.LTR?{left:i,right:r}:{right:i,left:r}})});function L2(t){return Array.isArray(t)?t:[t]}function x1(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class cq{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=nt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==r.elements.length){let c=new pD(e,a,s,i);r.elements.push(c),r.dom.appendChild(c.dom)}else r.elements[this.i].update(e,a,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];x1(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(oq)){let a=s(e,n.widget,n);a&&(r||(r=[])).push(a)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class j2{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let f=s.getBoundingClientRect();a=(f.top+f.bottom)/2}else a=r.clientY;let c=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[i](e,c,r)&&r.preventDefault()});this.markers=L2(n.markers(e)),n.initialSpacer&&(this.spacer=new pD(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=L2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!nt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class pD{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),uq(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,a=0;;){let c=a,f=s<n.length?n[s++]:null,h=!1;if(f){let p=f.elementClass;p&&(i+=" "+p);for(let m=a;m<this.markers.length;m++)if(this.markers[m].compare(f)){c=m,h=!0;break}}else c=this.markers.length;for(;a<c;){let p=this.markers[a++];if(p.toDOM){p.destroy(r);let m=r.nextSibling;r.remove(),r=m}}if(!f)break;f.toDOM&&(h?r=r.nextSibling:this.dom.insertBefore(f.toDOM(e),r)),h&&a++}this.dom.className=i,this.markers=n}destroy(){this.setMarkers(null,[])}}function uq(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const fq=ve.define(),dq=ve.define(),Wa=ve.define({combine(t){return co(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let i=Object.assign({},e);for(let r in n){let s=i[r],a=n[r];i[r]=s?(c,f,h)=>s(c,f,h)||a(c,f,h):a}return i}})}});class mv extends Fo{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function gv(t,e){return t.state.facet(Wa).formatNumber(e,t.state)}const hq=gf.compute([Wa],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(fq)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new mv(gv(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(dq)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Wa)!=e.state.facet(Wa),initialSpacer(e){return new mv(gv(e,N2(e.state.doc.lines)))},updateSpacer(e,n){let i=gv(n.view,N2(n.view.state.doc.lines));return i==e.number?e:new mv(i)},domEventHandlers:t.facet(Wa).domEventHandlers,side:"before"}));function mD(t={}){return[Wa.of(t),hD(),hq]}function N2(t){let e=9;for(;e<t;)e=e*10+9;return e}const pq=new class extends Fo{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},mq=Np.compute(["selection"],t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(pq.range(r)))}return nt.of(e)});function gq(){return mq}const gD=1024;let yq=0;class yv{constructor(e,n){this.from=e,this.to=n}}class Fe{constructor(e={}){this.id=yq++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Zn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Fe.closedBy=new Fe({deserialize:t=>t.split(" ")});Fe.openedBy=new Fe({deserialize:t=>t.split(" ")});Fe.group=new Fe({deserialize:t=>t.split(" ")});Fe.isolate=new Fe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Fe.contextHash=new Fe({perNode:!0});Fe.lookAhead=new Fe({perNode:!0});Fe.mounted=new Fe({perNode:!0});class yf{constructor(e,n,i,r=!1){this.tree=e,this.overlay=n,this.parser=i,this.bracketed=r}static get(e){return e&&e.props&&e.props[Fe.mounted.id]}}const vq=Object.create(null);class Zn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):vq,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Zn(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Fe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(Fe.group),s=-1;s<(r?r.length:0);s++){let a=n[s<0?i.name:r[s]];if(a)return a}}}}Zn.none=new Zn("",Object.create(null),0,8);class lg{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let i of this.types){let r=null;for(let s of e){let a=s(i);if(a){r||(r=Object.assign({},i.props));let c=a[1],f=a[0];f.combine&&f.id in r&&(c=f.combine(r[f.id],c)),r[f.id]=c}}n.push(r?new Zn(i.name,r,i.id,i.flags):i)}return new lg(n)}}const Yh=new WeakMap,Q2=new WeakMap;var Ut;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(Ut||(Ut={}));class Mt{constructor(e,n,i,r,s){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,c]of s)this.props[typeof a=="number"?a:a.id]=c}}toString(){let e=yf.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new w1(this.topNode,e)}cursorAt(e,n=0,i=0){let r=Yh.get(this)||this.topNode,s=new w1(r);return s.moveTo(e,n),Yh.set(this,s._tree),s}get topNode(){return new mi(this,0,0,null)}resolve(e,n=0){let i=Nf(Yh.get(this)||this.topNode,e,n,!1);return Yh.set(this,i),i}resolveInner(e,n=0){let i=Nf(Q2.get(this)||this.topNode,e,n,!0);return Q2.set(this,i),i}resolveStack(e,n=0){return xq(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:s=this.length}=e,a=e.mode||0,c=(a&Ut.IncludeAnonymous)>0;for(let f=this.cursor(a|Ut.IncludeAnonymous);;){let h=!1;if(f.from<=s&&f.to>=r&&(!c&&f.type.isAnonymous||n(f)!==!1)){if(f.firstChild())continue;h=!0}for(;h&&i&&(c||!f.type.isAnonymous)&&i(f),!f.nextSibling();){if(!f.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:GO(Zn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new Mt(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new Mt(Zn.none,n,i,r)))}static build(e){return Sq(e)}}Mt.empty=new Mt(Zn.none,[],[],0);class VO{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new VO(this.buffer,this.index)}}class Us{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Zn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],i=this.buffer[e+3],r=this.set.types[n],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let a=[];for(;e<i;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,n,i,r,s){let{buffer:a}=this,c=-1;for(let f=e;f!=n&&!(yD(s,r,a[f+1],a[f+2])&&(c=f,i>0));f=a[f+3]);return c}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),a=0;for(let c=e,f=0;c<n;){s[f++]=r[c++],s[f++]=r[c++]-i;let h=s[f++]=r[c++]-i;s[f++]=r[c++]-e,a=Math.max(a,h)}return new Us(s,a,this.set)}}function yD(t,e,n,i){switch(t){case-2:return n<e;case-1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function Nf(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let a=!i&&t instanceof mi&&t.index<0?null:t.parent;if(!a)return t;t=a}let s=i?0:Ut.IgnoreOverlays;if(i)for(let a=t,c=a.parent;c;a=c,c=a.parent)a instanceof mi&&a.index<0&&((r=c.enter(e,n,s))===null||r===void 0?void 0:r.from)!=a.from&&(t=c);for(;;){let a=t.enter(e,n,s);if(!a)return t;t=a}}class vD{cursor(e=0){return new w1(this,e)}getChild(e,n=null,i=null){let r=_2(this,e,n,i);return r.length?r[0]:null}getChildren(e,n=null,i=null){return _2(this,e,n,i)}resolve(e,n=0){return Nf(this,e,n,!1)}resolveInner(e,n=0){return Nf(this,e,n,!0)}matchContext(e){return S1(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),i=this;for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(i=n,n=r.prevSibling):n=r}return i}get node(){return this}get next(){return this.parent}}class mi extends vD{constructor(e,n,i,r){super(),this._tree=e,this.from=n,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,i,r,s=0){var a;for(let c=this;;){for(let{children:f,positions:h}=c._tree,p=n>0?f.length:-1;e!=p;e+=n){let m=f[e],v=h[e]+c.from;if(!(!(s&Ut.EnterBracketed&&m instanceof Mt&&((a=yf.get(m))===null||a===void 0?void 0:a.overlay)===null&&(v>=i||v+m.length<=i))&&!yD(r,i,v,v+m.length))){if(m instanceof Us){if(s&Ut.ExcludeBuffers)continue;let b=m.findChild(0,m.buffer.length,n,i-v,r);if(b>-1)return new Zr(new bq(c,m,e,v),null,b)}else if(s&Ut.IncludeAnonymous||!m.type.isAnonymous||XO(m)){let b;if(!(s&Ut.IgnoreMounts)&&(b=yf.get(m))&&!b.overlay)return new mi(b.tree,v,e,c);let O=new mi(m,v,e,c);return s&Ut.IncludeAnonymous||!O.type.isAnonymous?O:O.nextChild(n<0?m.children.length-1:0,n,i,r,s)}}}if(s&Ut.IncludeAnonymous||!c.type.isAnonymous||(c.index>=0?e=c.index+n:e=n<0?-1:c._parent._tree.children.length,c=c._parent,!c))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,i=0){let r;if(!(i&Ut.IgnoreOverlays)&&(r=yf.get(this._tree))&&r.overlay){let s=e-this.from,a=i&Ut.EnterBracketed&&r.bracketed;for(let{from:c,to:f}of r.overlay)if((n>0||a?c<=s:c<s)&&(n<0||a?f>=s:f>s))return new mi(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function _2(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function S1(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class bq{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Zr extends vD{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new Zr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,i=0){if(i&Ut.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Zr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Zr(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Zr(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let a=i.buffer[this.index+1];e.push(i.slice(r,s,a)),n.push(0)}return new Mt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function bD(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let a=t[s];(a.from>n.from||a.to<n.to)&&(n=a,e=s)}let i=n instanceof mi&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new Oq(r,n)}class Oq{constructor(e,n){this.heads=e,this.node=n}get next(){return bD(this.heads)}}function xq(t,e,n){let i=t.resolveInner(e,n),r=null;for(let s=i instanceof mi?i:i.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(r||(r=[i])).push(a.resolve(e,n)),s=a}else{let a=yf.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let c=new mi(a.tree,a.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(Nf(c,e,n,!1))}}return r?bD(r):i}class w1{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~Ut.EnterBracketed,e instanceof mi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof mi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&Ut.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ut.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ut.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:i}=r)}else({index:n,_parent:i}=this._tree);for(;i;{index:n,_parent:i}=i)if(n>-1)for(let s=n+e,a=e<0?-1:i._tree.children.length;s!=a;s+=e){let c=i._tree.children[s];if(this.mode&Ut.IncludeAnonymous||c instanceof Us||!c.type.isAnonymous||XO(c))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)n=new Zr(this.buffer,n,this.stack[r]);return this.bufferNode=new Zr(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&n&&n(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return S1(this.node.parent,e);let{buffer:n}=this.buffer,{types:i}=n.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return S1(this._tree,e,r);let a=i[n.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}}function XO(t){return t.children.some(e=>e instanceof Us||!e.type.isAnonymous||XO(e))}function Sq(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=gD,reused:s=[],minRepeatType:a=i.types.length}=t,c=Array.isArray(n)?new VO(n,n.length):n,f=i.types,h=0,p=0;function m(R,L,M,B,_,A){let{id:Q,start:T,end:H,size:I}=c,V=p,N=h;if(I<0)if(c.next(),I==-1){let q=s[Q];M.push(q),B.push(T-R);return}else if(I==-3){h=Q;return}else if(I==-4){p=Q;return}else throw new RangeError(`Unrecognized record size: ${I}`);let X=f[Q],Y,K,le=T-R;if(H-T<=r&&(K=C(c.pos-L,_))){let q=new Uint16Array(K.size-K.skip),G=c.pos-K.size,se=q.length;for(;c.pos>G;)se=E(K.start,q,se);Y=new Us(q,H-K.start,i),le=K.start-R}else{let q=c.pos-I;c.next();let G=[],se=[],ue=Q>=a?Q:-1,Z=0,ie=H;for(;c.pos>q;)ue>=0&&c.id==ue&&c.size>=0?(c.end<=ie-r&&(O(G,se,T,Z,c.end,ie,ue,V,N),Z=G.length,ie=c.end),c.next()):A>2500?v(T,q,G,se):m(T,q,G,se,ue,A+1);if(ue>=0&&Z>0&&Z<G.length&&O(G,se,T,Z,T,ie,ue,V,N),G.reverse(),se.reverse(),ue>-1&&Z>0){let de=b(X,N);Y=GO(X,G,se,0,G.length,0,H-T,de,de)}else Y=S(X,G,se,H-T,V-H,N)}M.push(Y),B.push(le)}function v(R,L,M,B){let _=[],A=0,Q=-1;for(;c.pos>L;){let{id:T,start:H,end:I,size:V}=c;if(V>4)c.next();else{if(Q>-1&&H<Q)break;Q<0&&(Q=I-r),_.push(T,H,I),A++,c.next()}}if(A){let T=new Uint16Array(A*4),H=_[_.length-2];for(let I=_.length-3,V=0;I>=0;I-=3)T[V++]=_[I],T[V++]=_[I+1]-H,T[V++]=_[I+2]-H,T[V++]=V;M.push(new Us(T,_[2]-H,i)),B.push(H-R)}}function b(R,L){return(M,B,_)=>{let A=0,Q=M.length-1,T,H;if(Q>=0&&(T=M[Q])instanceof Mt){if(!Q&&T.type==R&&T.length==_)return T;(H=T.prop(Fe.lookAhead))&&(A=B[Q]+T.length+H)}return S(R,M,B,_,A,L)}}function O(R,L,M,B,_,A,Q,T,H){let I=[],V=[];for(;R.length>B;)I.push(R.pop()),V.push(L.pop()+M-_);R.push(S(i.types[Q],I,V,A-_,T-A,H)),L.push(_-M)}function S(R,L,M,B,_,A,Q){if(A){let T=[Fe.contextHash,A];Q=Q?[T].concat(Q):[T]}if(_>25){let T=[Fe.lookAhead,_];Q=Q?[T].concat(Q):[T]}return new Mt(R,L,M,B,Q)}function C(R,L){let M=c.fork(),B=0,_=0,A=0,Q=M.end-r,T={size:0,start:0,skip:0};e:for(let H=M.pos-R;M.pos>H;){let I=M.size;if(M.id==L&&I>=0){T.size=B,T.start=_,T.skip=A,A+=4,B+=4,M.next();continue}let V=M.pos-I;if(I<0||V<H||M.start<Q)break;let N=M.id>=a?4:0,X=M.start;for(M.next();M.pos>V;){if(M.size<0)if(M.size==-3||M.size==-4)N+=4;else break e;else M.id>=a&&(N+=4);M.next()}_=X,B+=I,A+=N}return(L<0||B==R)&&(T.size=B,T.start=_,T.skip=A),T.size>4?T:void 0}function E(R,L,M){let{id:B,start:_,end:A,size:Q}=c;if(c.next(),Q>=0&&B<a){let T=M;if(Q>4){let H=c.pos-(Q-4);for(;c.pos>H;)M=E(R,L,M)}L[--M]=T,L[--M]=A-R,L[--M]=_-R,L[--M]=B}else Q==-3?h=B:Q==-4&&(p=B);return M}let $=[],z=[];for(;c.pos>0;)m(t.start||0,t.bufferStart||0,$,z,-1,0);let P=(e=t.length)!==null&&e!==void 0?e:$.length?z[0]+$[0].length:0;return new Mt(f[t.topID],$.reverse(),z.reverse(),P)}const q2=new WeakMap;function Qp(t,e){if(!t.isAnonymous||e instanceof Us||e.type!=t)return 1;let n=q2.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Mt)){n=1;break}n+=Qp(t,i)}q2.set(e,n)}return n}function GO(t,e,n,i,r,s,a,c,f){let h=0;for(let O=i;O<r;O++)h+=Qp(t,e[O]);let p=Math.ceil(h*1.5/8),m=[],v=[];function b(O,S,C,E,$){for(let z=C;z<E;){let P=z,R=S[z],L=Qp(t,O[z]);for(z++;z<E;z++){let M=Qp(t,O[z]);if(L+M>=p)break;L+=M}if(z==P+1){if(L>p){let M=O[P];b(M.children,M.positions,0,M.children.length,S[P]+$);continue}m.push(O[P])}else{let M=S[z-1]+O[z-1].length-R;m.push(GO(t,O,S,P,z,R,M,null,f))}v.push(R+$-s)}}return b(e,n,i,r,0),(c||f)(m,v,a)}class wq{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Zr?this.setBuffer(e.context.buffer,e.index,n):e instanceof mi&&this.map.set(e.tree,n)}get(e){return e instanceof Zr?this.getBuffer(e.context.buffer,e.index):e instanceof mi?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ll{constructor(e,n,i,r,s=!1,a=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new Ll(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,a=e.length?e[0]:null;for(let c=0,f=0,h=0;;c++){let p=c<n.length?n[c]:null,m=p?p.fromA:1e9;if(m-f>=i)for(;a&&a.from<m;){let v=a;if(f>=v.from||m<=v.to||h){let b=Math.max(v.from,f)-h,O=Math.min(v.to,m)-h;v=b>=O?null:new Ll(b,O,v.tree,v.offset+h,c>0,!!p)}if(v&&r.push(v),a.to>m)break;a=s<e.length?e[s++]:null}if(!p)break;f=p.toA,h=p.toA-p.toB}return r}}class FO{startParse(e,n,i){return typeof e=="string"&&(e=new Cq(e)),i=i?i.length?i.map(r=>new yv(r.from,r.to)):[new yv(0,0)]:[new yv(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class Cq{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Fe({perNode:!0});let Tq=0;class Ji{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=Tq++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof Ji&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let r=new Ji(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new hm(e);return i=>i.modified.indexOf(n)>-1?i:hm.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}}let kq=0;class hm{constructor(e){this.name=e,this.instances=[],this.id=kq++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(c=>c.base==e&&Eq(n,c.modified));if(i)return i;let r=[],s=new Ji(e.name,r,e,n);for(let c of n)c.instances.push(s);let a=Aq(n);for(let c of e.set)if(!c.modified.length)for(let f of a)r.push(hm.get(c,f));return s}}function Eq(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function Aq(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort((n,i)=>i.length-n.length)}function OD(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],a=2,c=r;for(let m=0;;){if(c=="..."&&m>0&&m+3==r.length){a=1;break}let v=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!v)throw new RangeError("Invalid path: "+r);if(s.push(v[0]=="*"?"":v[0][0]=='"'?JSON.parse(v[0]):v[0]),m+=v[0].length,m==r.length)break;let b=r[m++];if(m==r.length&&b=="!"){a=0;break}if(b!="/")throw new RangeError("Invalid path: "+r);c=r.slice(m)}let f=s.length-1,h=s[f];if(!h)throw new RangeError("Invalid path: "+r);let p=new Qf(i,a,f>0?s.slice(0,f):null);e[h]=p.sort(e[h])}}return xD.add(e)}const xD=new Fe({combine(t,e){let n,i,r;for(;t||e;){if(!t||e&&t.depth>=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let s=new Qf(r.tags,r.mode,r.context);n?n.next=s:i=s,n=s}return i}});class Qf{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Qf.empty=new Qf([],2,null);function SD(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let a of s.tag)n[a.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let a=r;for(let c of s)for(let f of c.set){let h=n[f.id];if(h){a=a?a+" "+h:h;break}}return a},scope:i}}function Rq(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function wD(t,e,n,i=0,r=t.length){let s=new Mq(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class Mq{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:a,from:c,to:f}=e;if(c>=i||f<=n)return;a.isTop&&(s=this.highlighters.filter(b=>!b.scope||b.scope(a)));let h=r,p=Dq(e)||Qf.empty,m=Rq(s,p.tags);if(m&&(h&&(h+=" "),h+=m,p.mode==1&&(r+=(r?" ":"")+m)),this.startSpan(Math.max(n,c),h),p.opaque)return;let v=e.tree&&e.tree.prop(Fe.mounted);if(v&&v.overlay){let b=e.node.enter(v.overlay[0].from+c,1),O=this.highlighters.filter(C=>!C.scope||C.scope(v.tree.type)),S=e.firstChild();for(let C=0,E=c;;C++){let $=C<v.overlay.length?v.overlay[C]:null,z=$?$.from+c:f,P=Math.max(n,E),R=Math.min(i,z);if(P<R&&S)for(;e.from<R&&(this.highlightRange(e,P,R,r,s),this.startSpan(Math.min(R,e.to),h),!(e.to>=z||!e.nextSibling())););if(!$||z>i)break;E=$.to+c,E>n&&(this.highlightRange(b.cursor(),Math.max(n,$.from+c),Math.min(i,E),"",O),this.startSpan(Math.min(i,E),h))}S&&e.parent()}else if(e.firstChild()){v&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function Dq(t){let e=t.type.prop(xD);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const me=Ji.define,Kh=me(),As=me(),I2=me(As),H2=me(As),Rs=me(),Zh=me(Rs),vv=me(Rs),Hr=me(),pl=me(Hr),_r=me(),qr=me(),C1=me(),zu=me(C1),Jh=me(),j={comment:Kh,lineComment:me(Kh),blockComment:me(Kh),docComment:me(Kh),name:As,variableName:me(As),typeName:I2,tagName:me(I2),propertyName:H2,attributeName:me(H2),className:me(As),labelName:me(As),namespace:me(As),macroName:me(As),literal:Rs,string:Zh,docString:me(Zh),character:me(Zh),attributeValue:me(Zh),number:vv,integer:me(vv),float:me(vv),bool:me(Rs),regexp:me(Rs),escape:me(Rs),color:me(Rs),url:me(Rs),keyword:_r,self:me(_r),null:me(_r),atom:me(_r),unit:me(_r),modifier:me(_r),operatorKeyword:me(_r),controlKeyword:me(_r),definitionKeyword:me(_r),moduleKeyword:me(_r),operator:qr,derefOperator:me(qr),arithmeticOperator:me(qr),logicOperator:me(qr),bitwiseOperator:me(qr),compareOperator:me(qr),updateOperator:me(qr),definitionOperator:me(qr),typeOperator:me(qr),controlOperator:me(qr),punctuation:C1,separator:me(C1),bracket:zu,angleBracket:me(zu),squareBracket:me(zu),paren:me(zu),brace:me(zu),content:Hr,heading:pl,heading1:me(pl),heading2:me(pl),heading3:me(pl),heading4:me(pl),heading5:me(pl),heading6:me(pl),contentSeparator:me(Hr),list:me(Hr),quote:me(Hr),emphasis:me(Hr),strong:me(Hr),link:me(Hr),monospace:me(Hr),strikethrough:me(Hr),inserted:me(),deleted:me(),changed:me(),invalid:me(),meta:Jh,documentMeta:me(Jh),annotation:me(Jh),processingInstruction:me(Jh),definition:Ji.defineModifier("definition"),constant:Ji.defineModifier("constant"),function:Ji.defineModifier("function"),standard:Ji.defineModifier("standard"),local:Ji.defineModifier("local"),special:Ji.defineModifier("special")};for(let t in j){let e=j[t];e instanceof Ji&&(e.name=t)}SD([{tag:j.link,class:"tok-link"},{tag:j.heading,class:"tok-heading"},{tag:j.emphasis,class:"tok-emphasis"},{tag:j.strong,class:"tok-strong"},{tag:j.keyword,class:"tok-keyword"},{tag:j.atom,class:"tok-atom"},{tag:j.bool,class:"tok-bool"},{tag:j.url,class:"tok-url"},{tag:j.labelName,class:"tok-labelName"},{tag:j.inserted,class:"tok-inserted"},{tag:j.deleted,class:"tok-deleted"},{tag:j.literal,class:"tok-literal"},{tag:j.string,class:"tok-string"},{tag:j.number,class:"tok-number"},{tag:[j.regexp,j.escape,j.special(j.string)],class:"tok-string2"},{tag:j.variableName,class:"tok-variableName"},{tag:j.local(j.variableName),class:"tok-variableName tok-local"},{tag:j.definition(j.variableName),class:"tok-variableName tok-definition"},{tag:j.special(j.variableName),class:"tok-variableName2"},{tag:j.definition(j.propertyName),class:"tok-propertyName tok-definition"},{tag:j.typeName,class:"tok-typeName"},{tag:j.namespace,class:"tok-namespace"},{tag:j.className,class:"tok-className"},{tag:j.macroName,class:"tok-macroName"},{tag:j.propertyName,class:"tok-propertyName"},{tag:j.operator,class:"tok-operator"},{tag:j.comment,class:"tok-comment"},{tag:j.meta,class:"tok-meta"},{tag:j.invalid,class:"tok-invalid"},{tag:j.punctuation,class:"tok-punctuation"}]);var bv;const Dl=new Fe;function CD(t){return ve.define({combine:t?e=>e.concat(t):void 0})}const Pq=new Fe;class tr{constructor(e,n,i=[],r=""){this.data=e,this.name=r,tt.prototype.hasOwnProperty("tree")||Object.defineProperty(tt.prototype,"tree",{get(){return En(this)}}),this.parser=n,this.extension=[Ws.of(this),tt.languageData.of((s,a,c)=>{let f=U2(s,a,c),h=f.type.prop(Dl);if(!h)return[];let p=s.facet(h),m=f.type.prop(Pq);if(m){let v=f.resolve(a-f.from,c);for(let b of m)if(b.test(v,s)){let O=s.facet(b.facet);return b.type=="replace"?O:O.concat(p)}}return p})].concat(i)}isActiveAt(e,n,i=-1){return U2(e,n,i).type.prop(Dl)==this.data}findRegions(e){let n=e.facet(Ws);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,a)=>{if(s.prop(Dl)==this.data){i.push({from:a,to:a+s.length});return}let c=s.prop(Fe.mounted);if(c){if(c.tree.prop(Dl)==this.data){if(c.overlay)for(let f of c.overlay)i.push({from:f.from+a,to:f.to+a});else i.push({from:a,to:a+s.length});return}else if(c.overlay){let f=i.length;if(r(c.tree,c.overlay[0].from+a),i.length>f)return}}for(let f=0;f<s.children.length;f++){let h=s.children[f];h instanceof Mt&&r(h,s.positions[f]+a)}};return r(En(e),0),i}get allowsNesting(){return!0}}tr.setState=Le.define();function U2(t,e,n){let i=t.facet(Ws),r=En(t).topNode;if(!i||i.allowsNesting)for(let s=r;s;s=s.enter(e,n,Ut.ExcludeBuffers|Ut.EnterBracketed))s.type.isTop&&(r=s);return r}class pm extends tr{constructor(e,n,i){super(e,n,[],i),this.parser=n}static define(e){let n=CD(e.languageData);return new pm(n,e.parser.configure({props:[Dl.add(i=>i.isTop?n:void 0)]}),e.name)}configure(e,n){return new pm(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function En(t){let e=t.field(tr.state,!1);return e?e.tree:Mt.empty}class zq{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e<i||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let $u=null;class bc{constructor(e,n,i=[],r,s,a,c,f){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=a,this.skipped=c,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new bc(e,n,[],Mt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new zq(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Mt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(Ll.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Ll.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=$u;$u=this;try{return e()}finally{$u=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=W2(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:a,skipped:c}=this;if(this.takeTree(),!e.empty){let f=[];if(e.iterChangedRanges((h,p,m,v)=>f.push({fromA:h,toA:p,fromB:m,toB:v})),i=Ll.applyChanges(i,f),r=Mt.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){c=[];for(let h of this.skipped){let p=e.mapPos(h.from,1),m=e.mapPos(h.to,-1);p<m&&c.push({from:p,to:m})}}}return new bc(this.parser,n,i,r,s,a,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:s}=this.skipped[i];r<e.to&&s>e.from&&(this.fragments=W2(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends FO{createParse(n,i,r){let s=r[0].from,a=r[r.length-1].to;return{parsedPos:s,advance(){let f=$u;if(f){for(let h of r)f.tempSkipped.push(h);e&&(f.scheduleOn=f.scheduleOn?Promise.all([f.scheduleOn,e]):e)}return this.parsedPos=a,new Mt(Zn.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return $u}}function W2(t,e,n){return Ll.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Oc{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new Oc(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=bc.create(e.facet(Ws).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new Oc(i)}}tr.state=An.define({create:Oc.init,update(t,e){for(let n of e.effects)if(n.is(tr.setState))return n.value;return e.startState.facet(Ws)!=e.state.facet(Ws)?Oc.init(e.state):t.apply(e)}});let TD=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(TD=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Ov=typeof navigator<"u"&&(!((bv=navigator.scheduling)===null||bv===void 0)&&bv.isInputPending)?()=>navigator.scheduling.isInputPending():null,$q=Jt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(tr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(tr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=TD(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,s=i.field(tr.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Ov?Math.max(25,e.timeRemaining()-5):1e9),c=s.context.treeLen<r&&i.doc.length>r+1e3,f=s.context.work(()=>Ov&&Ov()||Date.now()>a,r+(c?0:1e5));this.chunkBudget-=Date.now()-n,(f||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:tr.setState.of(new Oc(s.context))})),this.chunkBudget>0&&!(f&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>fi(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ws=ve.define({combine(t){return t.length?t[0]:null},enables:t=>[tr.state,$q,he.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Bq{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const Lq=ve.define(),fd=ve.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Hl(t){let e=t.facet(fd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function _f(t,e){let n="",i=t.tabSize,r=t.facet(fd)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s<e;s++)n+=r;return n}function YO(t,e){t instanceof tt&&(t=new ag(t));for(let i of t.state.facet(Lq)){let r=i(t,e);if(r!==void 0)return r}let n=En(t.state);return n.length>=e?jq(t,n,e):null}class ag{constructor(e,n={}){this.state=e,this.options=n,this.unit=Hl(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,n);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.countColumn(i,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(s+=a-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return Rc(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let a=s(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const KO=new Fe;function jq(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let a=r;a&&!(a.from<i.node.from||a.to>i.node.to||a.from==i.node.from&&a.type==i.node.type);a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)i={node:s[a],next:i}}return kD(i,t,n)}function kD(t,e,n){for(let i=t;i;i=i.next){let r=Qq(i.node);if(r)return r(ZO.create(e,n,i))}return 0}function Nq(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Qq(t){let e=t.type.prop(KO);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Fe.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return a=>ED(a,!0,1,void 0,s&&!Nq(a)?r.from:void 0)}return t.parent==null?_q:null}function _q(){return 0}class ZO extends ag{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new ZO(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(qq(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return kD(this.context.next,this.base,this.pos)}}function qq(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Iq(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),a=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let c=n.to;;){let f=e.childAfter(c);if(!f||f==i)return null;if(!f.type.isSkipped){if(f.from>=a)return null;let h=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+h}}c=f.to}}function xv({closing:t,align:e=!0,units:n=1}){return i=>ED(i,e,n,t)}function ED(t,e,n,i,r){let s=t.textAfter,a=s.match(/^\s*/)[0].length,c=i&&s.slice(a,a+i.length)==i||r==t.pos+a,f=e?Iq(t):null;return f?c?t.column(f.from):t.column(f.to):t.baseIndent+(c?0:t.unit*n)}const Hq=200;function AD(){return tt.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+Hq)return t;let s=n.sliceString(r.from,i);if(!e.some(h=>h.test(s)))return t;let{state:a}=t,c=-1,f=[];for(let{head:h}of a.selection.ranges){let p=a.doc.lineAt(h);if(p.from==c)continue;c=p.from;let m=YO(a,p.from);if(m==null)continue;let v=/^\s*/.exec(p.text)[0],b=_f(a,m);v!=b&&f.push({from:p.from,to:p.from+v.length,insert:b})}return f.length?[t,{changes:f,sequential:!0}]:t})}const Uq=ve.define(),RD=new Fe;function Wq(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function Vq(t,e,n){let i=En(t);if(i.length<n)return null;let r=i.resolveStack(n,1),s=null;for(let a=r;a;a=a.next){let c=a.node;if(c.to<=n||c.from>n)continue;if(s&&c.from<e)break;let f=c.type.prop(RD);if(f&&(c.to<i.length-50||i.length==t.doc.length||!Xq(c))){let h=f(c,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(s=h)}}return s}function Xq(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function mm(t,e,n){for(let i of t.facet(Uq)){let r=i(t,e,n);if(r)return r}return Vq(t,e,n)}function MD(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const cg=Le.define({map:MD}),dd=Le.define({map:MD});function DD(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const Ul=An.define({create(){return we.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=V2(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(cg)&&!Gq(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet($D),r=i?we.replace({widget:new eI(i(e.state,n.value))}):X2;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(dd)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=V2(t,e.selection.main.head)),t},provide:t=>he.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(X2.range(i,r))}return we.set(e,!0)}});function V2(t,e,n=e){let i=!1;return t.between(e,n,(r,s)=>{r<n&&s>e&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function gm(t,e,n){var i;let r=null;return(i=t.field(Ul,!1))===null||i===void 0||i.between(e,n,(s,a)=>{(!r||r.from>s)&&(r={from:s,to:a})}),r}function Gq(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function PD(t,e){return t.field(Ul,!1)?e:e.concat(Le.appendConfig.of(BD()))}const Fq=t=>{for(let e of DD(t)){let n=mm(t.state,e.from,e.to);if(n)return t.dispatch({effects:PD(t.state,[cg.of(n),zD(t,n)])}),!0}return!1},Yq=t=>{if(!t.state.field(Ul,!1))return!1;let e=[];for(let n of DD(t)){let i=gm(t.state,n.from,n.to);i&&e.push(dd.of(i),zD(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function zD(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return he.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const Kq=t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),s=mm(e,r.from,r.to);s&&n.push(cg.of(s)),i=(s?t.lineBlockAt(s.to):r).to+1}return n.length&&t.dispatch({effects:PD(t.state,n)}),!!n.length},Zq=t=>{let e=t.state.field(Ul,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(dd.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},JO=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Fq},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Yq},{key:"Ctrl-Alt-[",run:Kq},{key:"Ctrl-Alt-]",run:Zq}],Jq={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},$D=ve.define({combine(t){return co(t,Jq)}});function BD(t){return[Ul,nI]}function LD(t,e){let{state:n}=t,i=n.facet($D),r=a=>{let c=t.lineBlockAt(t.posAtDOM(a.target)),f=gm(t.state,c.from,c.to);f&&t.dispatch({effects:dd.of(f)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const X2=we.replace({widget:new class extends Ar{toDOM(t){return LD(t,null)}}});class eI extends Ar{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return LD(e,this.value)}}const tI={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Sv extends Fo{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function jD(t={}){let e={...tI,...t},n=new Sv(e,!0),i=new Sv(e,!1),r=Jt.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Ws)!=a.state.facet(Ws)||a.startState.field(Ul,!1)!=a.state.field(Ul,!1)||En(a.startState)!=En(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let c=new lo;for(let f of a.viewportLineBlocks){let h=gm(a.state,f.from,f.to)?i:mm(a.state,f.from,f.to)?n:null;h&&c.add(f.from,f.from,h)}return c.finish()}}),{domEventHandlers:s}=e;return[r,lq({class:"cm-foldGutter",markers(a){var c;return((c=a.plugin(r))===null||c===void 0?void 0:c.markers)||nt.empty},initialSpacer(){return new Sv(e,!1)},domEventHandlers:{...s,click:(a,c,f)=>{if(s.click&&s.click(a,c,f))return!0;let h=gm(a.state,c.from,c.to);if(h)return a.dispatch({effects:dd.of(h)}),!0;let p=mm(a.state,c.from,c.to);return p?(a.dispatch({effects:cg.of(p)}),!0):!1}}}),BD()]}const nI=he.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Xl{constructor(e,n){this.specs=e;let i;function r(c){let f=qs.newName();return(i||(i=Object.create(null)))["."+f]=c,f}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof tr?c=>c.prop(Dl)==a.data:a?c=>c==a:void 0,this.style=SD(e.map(c=>({tag:c.tag,class:c.class||r(Object.assign({},c,{tag:null}))})),{all:s}).style,this.module=i?new qs(i):null,this.themeType=n.themeType}static define(e,n){return new Xl(e,n||{})}}const T1=ve.define(),ND=ve.define({combine(t){return t.length?[t[0]]:null}});function wv(t){let e=t.facet(T1);return e.length?e:t.facet(ND)}function hd(t,e){let n=[rI],i;return t instanceof Xl&&(t.module&&n.push(he.styleModule.of(t.module)),i=t.themeType),e?.fallback?n.push(ND.of(t)):i?n.push(T1.computeN([he.darkTheme],r=>r.facet(he.darkTheme)==(i=="dark")?[t]:[])):n.push(T1.of(t)),n}class iI{constructor(e){this.markCache=Object.create(null),this.tree=En(e.state),this.decorations=this.buildDeco(e,wv(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=En(e.state),i=wv(e.state),r=i!=wv(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!r&&n.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return we.none;let i=new lo;for(let{from:r,to:s}of e.visibleRanges)wD(this.tree,n,(a,c,f)=>{i.add(a,c,this.markCache[f]||(this.markCache[f]=we.mark({class:f})))},r,s);return i.finish()}}const rI=so.high(Jt.fromClass(iI,{decorations:t=>t.decorations})),QD=Xl.define([{tag:j.meta,color:"#404740"},{tag:j.link,textDecoration:"underline"},{tag:j.heading,textDecoration:"underline",fontWeight:"bold"},{tag:j.emphasis,fontStyle:"italic"},{tag:j.strong,fontWeight:"bold"},{tag:j.strikethrough,textDecoration:"line-through"},{tag:j.keyword,color:"#708"},{tag:[j.atom,j.bool,j.url,j.contentSeparator,j.labelName],color:"#219"},{tag:[j.literal,j.inserted],color:"#164"},{tag:[j.string,j.deleted],color:"#a11"},{tag:[j.regexp,j.escape,j.special(j.string)],color:"#e40"},{tag:j.definition(j.variableName),color:"#00f"},{tag:j.local(j.variableName),color:"#30a"},{tag:[j.typeName,j.namespace],color:"#085"},{tag:j.className,color:"#167"},{tag:[j.special(j.variableName),j.macroName],color:"#256"},{tag:j.definition(j.propertyName),color:"#00c"},{tag:j.comment,color:"#940"},{tag:j.invalid,color:"#f00"}]),oI=he.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),_D=1e4,qD="()[]{}",ID=ve.define({combine(t){return co(t,{afterCursor:!0,brackets:qD,maxScanDistance:_D,renderMatch:aI})}}),sI=we.mark({class:"cm-matchingBracket"}),lI=we.mark({class:"cm-nonmatchingBracket"});function aI(t){let e=[],n=t.matched?sI:lI;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const cI=An.define({create(){return we.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(ID);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=Jr(e.state,r.head,-1,i)||r.head>0&&Jr(e.state,r.head-1,1,i)||i.afterCursor&&(Jr(e.state,r.head,1,i)||r.head<e.state.doc.length&&Jr(e.state,r.head+1,-1,i));s&&(n=n.concat(i.renderMatch(s,e.state)))}return we.set(n,!0)},provide:t=>he.decorations.from(t)}),uI=[cI,oI];function HD(t={}){return[ID.of(t),uI]}const fI=new Fe;function k1(t,e,n){let i=t.prop(e<0?Fe.openedBy:Fe.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function E1(t){let e=t.type.prop(fI);return e?e(t.node):t}function Jr(t,e,n,i={}){let r=i.maxScanDistance||_D,s=i.brackets||qD,a=En(t),c=a.resolveInner(e,n);for(let f=c;f;f=f.parent){let h=k1(f.type,n,s);if(h&&f.from<f.to){let p=E1(f);if(p&&(n>0?e>=p.from&&e<p.to:e>p.from&&e<=p.to))return dI(t,e,n,f,p,h,s)}}return hI(t,e,n,a,c.type,r,s)}function dI(t,e,n,i,r,s,a){let c=i.parent,f={from:r.from,to:r.to},h=0,p=c?.cursor();if(p&&(n<0?p.childBefore(i.from):p.childAfter(i.to)))do if(n<0?p.to<=i.from:p.from>=i.to){if(h==0&&s.indexOf(p.type.name)>-1&&p.from<p.to){let m=E1(p);return{start:f,end:m?{from:m.from,to:m.to}:void 0,matched:!0}}else if(k1(p.type,n,a))h++;else if(k1(p.type,-n,a)){if(h==0){let m=E1(p);return{start:f,end:m&&m.from<m.to?{from:m.from,to:m.to}:void 0,matched:!1}}h--}}while(n<0?p.prevSibling():p.nextSibling());return{start:f,matched:!1}}function hI(t,e,n,i,r,s,a){let c=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),f=a.indexOf(c);if(f<0||f%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},p=t.doc.iterRange(e,n>0?t.doc.length:0),m=0;for(let v=0;!p.next().done&&v<=s;){let b=p.value;n<0&&(v+=b.length);let O=e+v*n;for(let S=n>0?0:b.length-1,C=n>0?b.length:-1;S!=C;S+=n){let E=a.indexOf(b[S]);if(!(E<0||i.resolveInner(O+S,1).type!=r))if(E%2==0==n>0)m++;else{if(m==1)return{start:h,end:{from:O+S,to:O+S+1},matched:E>>1==f>>1};m--}}n>0&&(v+=b.length)}return p.done?{start:h,matched:!1}:null}function G2(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let a=i;a<e;a++)t.charCodeAt(a)==9?s+=n-s%n:s++;return s}class UD{constructor(e,n,i,r){this.string=e,this.tabSize=n,this.indentUnit=i,this.overrideIndent=r,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),i;if(typeof e=="string"?i=n==e:i=n&&(e instanceof RegExp?e.test(n):e(n)),i)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G2(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:G2(this.string,null,this.tabSize)}match(e,n,i){if(typeof e=="string"){let r=a=>i?a.toLowerCase():a,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function pI(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||mI,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||nx,mergeTokens:t.mergeTokens!==!1}}function mI(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const F2=new WeakMap;class ex extends tr{constructor(e){let n=CD(e.languageData),i=pI(e),r,s=new class extends FO{createParse(a,c,f){return new yI(r,a,c,f)}};super(n,s,[],e.name),this.topNode=OI(n,this),r=this,this.streamParser=i,this.stateAfter=new Fe({perNode:!0}),this.tokenTable=e.tokenTable?new GD(i.tokenTable):bI}static define(e){return new ex(e)}getIndent(e){let n,{overrideIndentation:i}=e.options;i&&(n=F2.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let r=tx(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,a;if(r?(a=r.state,s=r.pos+1):(a=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let f=e.state.doc.lineAt(s),h=Math.min(e.pos,f.to);if(f.length){let p=i?i(f.from):-1,m=new UD(f.text,e.state.tabSize,e.unit,p<0?void 0:p);for(;m.pos<h-f.from;)VD(this.streamParser.token,m,a)}else this.streamParser.blankLine(a,e.unit);if(h==e.pos)break;s=f.to+1}let c=e.lineAt(e.pos);return i&&n==null&&F2.set(e.state,c.from),this.streamParser.indent(a,/^\s*(.*)/.exec(c.text)[1],e)}get allowsNesting(){return!1}}function tx(t,e,n,i,r){let s=n>=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let a=e.children.length-1;a>=0;a--){let c=e.children[a],f=n+e.positions[a],h=c instanceof Mt&&f<r&&tx(t,c,f,i,r);if(h)return h}return null}function WD(t,e,n,i,r){if(r&&n<=0&&i>=e.length)return e;!r&&n==0&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let a=e.positions[s],c=e.children[s],f;if(a<i&&c instanceof Mt){if(!(f=WD(t,c,n-a,i-a,r)))break;return r?new Mt(e.type,e.children.slice(0,s).concat(f),e.positions.slice(0,s+1),a+f.length):f}}return null}function gI(t,e,n,i,r){for(let s of e){let a=s.from+(s.openStart?25:0),c=s.to-(s.openEnd?25:0),f=a<=n&&c>n&&tx(t,s.tree,0-s.offset,n,c),h;if(f&&f.pos<=i&&(h=WD(t,s.tree,n+s.offset,f.pos+s.offset,!1)))return{state:f.state,tree:h}}return{state:t.streamParser.startState(r?Hl(r):4),tree:Mt.empty}}let yI=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=bc.get(),a=r[0].from,{state:c,tree:f}=gI(e,i,a,this.to,s?.state);this.state=c,this.parsedPos=this.chunkStart=a+f.length;for(let h=0;h<f.children.length;h++)this.chunks.push(f.children[h]),this.chunkPos.push(f.positions[h]);s&&this.parsedPos<s.viewport.from-1e5&&r.some(h=>h.from<=s.viewport.from&&h.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(Hl(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=bc.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(e&&(i=Math.min(i,e.viewport.to));this.parsedPos<i;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
82
+ `&&(n="");else{let i=n.indexOf(`
83
+ `);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let a=this.ranges[r].from,c=this.lineAfter(a);n+=c,i=a+c.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let a=this.ranges[++this.rangeIndex].from;n+=a-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,i,r){let s=4;if(this.ranges.length>1){r=this.skipGapsTo(n,r,1),n+=r;let c=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-c}let a=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&a>=0&&this.chunk[a]==e&&this.chunk[a+2]==n?this.chunk[a+2]=i:this.chunk.push(e,n,i,s),r}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,a=new UD(n,e?e.state.tabSize:4,e?Hl(e.state):2);if(a.eol())s.blankLine(this.state,a.indentUnit);else for(;!a.eol();){let c=VD(s.token,a,this.state);if(c&&(r=this.emitToken(this.lang.tokenTable.resolve(c),this.parsedPos+a.start,this.parsedPos+a.pos,r)),a.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Mt.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:vI,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new Mt(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Mt(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function VD(t,e,n){e.start=e.pos;for(let i=0;i<10;i++){let r=t(e,n);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const nx=Object.create(null),qf=[Zn.none],vI=new lg(qf),Y2=[],K2=Object.create(null),XD=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])XD[t]=FD(nx,e);class GD{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),XD)}resolve(e){return e?this.table[e]||(this.table[e]=FD(this.extra,e)):0}}const bI=new GD(nx);function Cv(t,e){Y2.indexOf(t)>-1||(Y2.push(t),console.warn(e))}function FD(t,e){let n=[];for(let c of e.split(" ")){let f=[];for(let h of c.split(".")){let p=t[h]||j[h];p?typeof p=="function"?f.length?f=f.map(p):Cv(h,`Modifier ${h} used at start of tag`):f.length?Cv(h,`Tag ${h} used as modifier`):f=Array.isArray(p)?p:[p]:Cv(h,`Unknown highlighting tag ${h}`)}for(let h of f)n.push(h)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(c=>c.id),s=K2[r];if(s)return s.id;let a=K2[r]=Zn.define({id:qf.length,name:i,props:[OD({[i]:n})]});return qf.push(a),a.id}function OI(t,e){let n=Zn.define({id:qf.length,name:"Document",props:[Dl.add(()=>t),KO.add(()=>i=>e.getIndent(i))],top:!0});return qf.push(n),n}$t.RTL,$t.LTR;class YD{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=En(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(ZD(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Z2(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function xI(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;s<r.length;s++)n[r[s]]=!0}let i=Z2(e)+Z2(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function KD(t){let e=t.map(r=>typeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:xI(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function SI(t,e){return n=>{for(let i=En(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class J2{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function jl(t){return t.selection.main.from}function ZD(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const ix=ao.define();function wI(t,e,n,i){let{main:r}=t.selection,s=n-r.from,a=i-r.from;return{...t.changeByRange(c=>{if(c!=r&&n!=i&&t.sliceDoc(c.from+s,c.from+a)!=t.sliceDoc(n,i))return{range:c};let f=t.toText(e);return{changes:{from:c.from+s,to:i==r.from?c.to:c.from+a,insert:f},range:ce.cursor(c.from+s+f.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const eE=new WeakMap;function CI(t){if(!Array.isArray(t))return t;let e=eE.get(t);return e||eE.set(t,e=KD(t)),e}const ym=Le.define(),If=Le.define();class TI{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let i=ci(e,n),r=Yr(i);this.chars.push(i);let s=e.slice(n,n+r),a=s.toUpperCase();this.folded.push(ci(a==s?s.toLowerCase():a,0)),n+=r}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:i,any:r,precise:s,byWord:a}=this;if(n.length==1){let $=ci(e,0),z=Yr($),P=z==e.length?0:-100;if($!=n[0])if($==i[0])P+=-200;else return null;return this.ret(P,[0,z])}let c=e.indexOf(this.pattern);if(c==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let f=n.length,h=0;if(c<0){for(let $=0,z=Math.min(e.length,200);$<z&&h<f;){let P=ci(e,$);(P==n[h]||P==i[h])&&(r[h++]=$),$+=Yr(P)}if(h<f)return null}let p=0,m=0,v=!1,b=0,O=-1,S=-1,C=/[a-z]/.test(e),E=!0;for(let $=0,z=Math.min(e.length,200),P=0;$<z&&m<f;){let R=ci(e,$);c<0&&(p<f&&R==n[p]&&(s[p++]=$),b<f&&(R==n[b]||R==i[b]?(b==0&&(O=$),S=$+1,b++):b=0));let L,M=R<255?R>=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(L=TO(R))!=L.toLowerCase()?1:L!=L.toUpperCase()?2:0;(!$||M==1&&C||P==0&&M!=0)&&(n[m]==R||i[m]==R&&(v=!0)?a[m++]=$:a.length&&(E=!1)),P=M,$+=Yr(R)}return m==f&&a[0]==0&&E?this.result(-100+(v?-200:0),a,e):b==f&&O==0?this.ret(-200-e.length+(S==e.length?0:-100),[0,S]):c>-1?this.ret(-700-e.length,[c,c+this.pattern.length]):b==f?this.ret(-900-e.length,[O,S]):m==f?this.result(-100+(v?-200:0)+-700+(E?0:-1100),a,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let a of n){let c=a+(this.astral?Yr(ci(i,a)):1);s&&r[s-1]==a?r[s-1]=c:(r[s++]=a,r[s++]=c)}return this.ret(e-i.length,r)}}class kI{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),i=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return i==null?null:(this.matched=[0,n.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}const kn=ve.define({combine(t){return co(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:EI,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>tE(e(i),n(i)),optionClass:(e,n)=>i=>tE(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function tE(t,e){return t?e?t+" "+e:t:e}function EI(t,e,n,i,r,s){let a=t.textDirection==$t.RTL,c=a,f=!1,h="top",p,m,v=e.left-r.left,b=r.right-e.right,O=i.right-i.left,S=i.bottom-i.top;if(c&&v<Math.min(O,b)?c=!1:!c&&b<Math.min(O,v)&&(c=!0),O<=(c?v:b))p=Math.max(r.top,Math.min(n.top,r.bottom-S))-e.top,m=Math.min(400,c?v:b);else{f=!0,m=Math.min(400,(a?e.right:r.right-e.left)-30);let $=r.bottom-e.bottom;$>=S||$>e.top?p=n.bottom-e.top:(h="bottom",p=e.bottom-n.top)}let C=(e.bottom-e.top)/s.offsetHeight,E=(e.right-e.left)/s.offsetWidth;return{style:`${h}: ${p/C}px; max-width: ${m/E}px`,class:"cm-completionInfo-"+(f?a?"left-narrow":"right-narrow":c?"left":"right")}}function AI(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let a=document.createElement("span");a.className="cm-completionLabel";let c=n.displayLabel||n.label,f=0;for(let h=0;h<s.length;){let p=s[h++],m=s[h++];p>f&&a.appendChild(document.createTextNode(c.slice(f,p)));let v=a.appendChild(document.createElement("span"));v.appendChild(document.createTextNode(c.slice(p,m))),v.className="cm-completionMatchedText",f=m}return f<c.length&&a.appendChild(document.createTextNode(c.slice(f))),a},position:50},{render(n){if(!n.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=n.detail,i},position:80}),e.sort((n,i)=>n.position-i.position).map(n=>n.render)}function Tv(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class RI{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:f=>this.placeInfo(f),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:a}=r.open,c=e.state.facet(kn);this.optionContent=AI(c),this.optionClass=c.optionClass,this.tooltipClass=c.tooltipClass,this.range=Tv(s.length,a,c.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",f=>{let{options:h}=e.state.field(n).open;for(let p=f.target,m;p&&p!=this.dom;p=p.parentNode)if(p.nodeName=="LI"&&(m=/-(\d+)$/.exec(p.id))&&+m[1]<h.length){this.applyCompletion(e,h[+m[1]]),f.preventDefault();return}}),this.dom.addEventListener("focusout",f=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(kn).closeOnBlur&&f.relatedTarget!=e.contentDOM&&e.dispatch({effects:If.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:a,disabled:c}=i.open;(!r.open||r.open.options!=s)&&(this.range=Tv(s.length,a,e.state.facet(kn).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),c!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!c)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Tv(n.options.length,n.selected,this.view.state.facet(kn).maxRenderedOptions),this.showOptions(n.options,e.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:s}=r;if(!s)return;let a=typeof s=="string"?document.createTextNode(s):s(r);if(!a)return;"then"in a?a.then(c=>{c&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(c,r)}).catch(c=>fi(this.view.state,c,"completion info")):(this.addInfoPane(a,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&DI(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(kn).positionInfo(this.view,n,r,i,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,i){const r=document.createElement("ul");r.id=n,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",a=>{a.target==r&&a.preventDefault()});let s=null;for(let a=i.from;a<i.to;a++){let{completion:c,match:f}=e[a],{section:h}=c;if(h){let v=typeof h=="string"?h:h.name;if(v!=s&&(a>i.from||i.from==0))if(s=v,typeof h!="string"&&h.header)r.appendChild(h.header(h));else{let b=r.appendChild(document.createElement("completion-section"));b.textContent=v}}const p=r.appendChild(document.createElement("li"));p.id=n+"-"+a,p.setAttribute("role","option");let m=this.optionClass(c);m&&(p.className=m);for(let v of this.optionContent){let b=v(c,this.view.state,this.view,f);b&&p.appendChild(b)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function MI(t,e){return n=>new RI(n,t,e)}function DI(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.top<n.top?t.scrollTop-=(n.top-i.top)/r:i.bottom>n.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function nE(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function PI(t,e){let n=[],i=null,r=null,s=p=>{n.push(p);let{section:m}=p.completion;if(m){i||(i=[]);let v=typeof m=="string"?m:m.name;i.some(b=>b.name==v)||i.push(typeof m=="string"?{name:v}:m)}},a=e.facet(kn);for(let p of t)if(p.hasResult()){let m=p.result.getMatch;if(p.result.filter===!1)for(let v of p.result.options)s(new J2(v,p.source,m?m(v):[],1e9-n.length));else{let v=e.sliceDoc(p.from,p.to),b,O=a.filterStrict?new kI(v):new TI(v);for(let S of p.result.options)if(b=O.match(S.label)){let C=S.displayLabel?m?m(S,b.matched):[]:b.matched,E=b.score+(S.boost||0);if(s(new J2(S,p.source,C,E)),typeof S.section=="object"&&S.section.rank==="dynamic"){let{name:$}=S.section;r||(r=Object.create(null)),r[$]=Math.max(E,r[$]||-1e9)}}}}if(i){let p=Object.create(null),m=0,v=(b,O)=>(b.rank==="dynamic"&&O.rank==="dynamic"?r[O.name]-r[b.name]:0)||(typeof b.rank=="number"?b.rank:1e9)-(typeof O.rank=="number"?O.rank:1e9)||(b.name<O.name?-1:1);for(let b of i.sort(v))m-=1e5,p[b.name]=m;for(let b of n){let{section:O}=b.completion;O&&(b.score+=p[typeof O=="string"?O:O.name])}}let c=[],f=null,h=a.compareCompletions;for(let p of n.sort((m,v)=>v.score-m.score||h(m.completion,v.completion))){let m=p.completion;!f||f.label!=m.label||f.detail!=m.detail||f.type!=null&&m.type!=null&&f.type!=m.type||f.apply!=m.apply||f.boost!=m.boost?c.push(p):nE(p.completion)>nE(f)&&(c[c.length-1]=p),f=p.completion}return c}class Va{constructor(e,n,i,r,s,a){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Va(this.options,iE(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,a){if(r&&!a&&e.some(h=>h.isPending))return r.setDisabled();let c=PI(e,n);if(!c.length)return r&&e.some(h=>h.isPending)?r.setDisabled():null;let f=n.facet(kn).selectOnOpen?0:-1;if(r&&r.selected!=f&&r.selected!=-1){let h=r.options[r.selected].completion;for(let p=0;p<c.length;p++)if(c[p].completion==h){f=p;break}}return new Va(c,iE(i,f),{pos:e.reduce((h,p)=>p.hasResult()?Math.min(h,p.from):h,1e8),create:NI,above:s.aboveCursor},r?r.timestamp:Date.now(),f,!1)}map(e){return new Va(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Va(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class vm{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new vm(LI,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(kn),s=(i.override||n.languageDataAt("autocomplete",jl(n)).map(CI)).map(f=>(this.active.find(p=>p.source==f)||new nr(f,this.active.some(p=>p.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((f,h)=>f==this.active[h])&&(s=this.active);let a=this.open,c=e.effects.some(f=>f.is(rx));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||s.some(f=>f.hasResult()&&e.changes.touchesRange(f.from,f.to))||!zI(s,this.active)||c?a=Va.build(s,n,this.id,a,i,c):a&&a.disabled&&!s.some(f=>f.isPending)&&(a=null),!a&&s.every(f=>!f.isPending)&&s.some(f=>f.hasResult())&&(s=s.map(f=>f.hasResult()?new nr(f.source,0):f));for(let f of e.effects)f.is(eP)&&(a=a&&a.setSelected(f.value,this.id));return s==this.active&&a==this.open?this:new vm(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?$I:BI}}function zI(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,s=i==e.length;if(r||s)return r==s;if(t[n++].result!=e[i++].result)return!1}}const $I={"aria-autocomplete":"list"},BI={};function iE(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const LI=[];function JD(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(ix);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class nr{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=JD(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new nr(r.source,0)),i&4&&r.state==0&&(r=new nr(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(ym))r=new nr(r.source,1,s.value);else if(s.is(If))r=new nr(r.source,0);else if(s.is(rx))for(let a of s.value)a.source==r.source&&(r=a);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(jl(e.state))}}class ic extends nr{constructor(e,n,i,r,s,a){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=a}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),c=jl(e.state);if(c>a||!r||n&2&&(jl(e.startState)==this.from||c<this.limit))return new nr(this.source,n&4?1:0);let f=e.changes.mapPos(this.limit);return jI(r.validFor,e.state,s,a)?new ic(this.source,this.explicit,f,r,s,a):r.update&&(r=r.update(r,s,a,new YD(e.state,c,!1)))?new ic(this.source,this.explicit,f,r,r.from,(i=r.to)!==null&&i!==void 0?i:jl(e.state)):new nr(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ic(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new nr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function jI(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):ZD(t,!0).test(r)}const rx=Le.define({map(t,e){return t.map(n=>n.map(e))}}),eP=Le.define(),Yn=An.define({create(){return vm.start()},update(t,e){return t.update(e)},provide:t=>[UO.from(t,e=>e.tooltip),he.contentAttributes.from(t,e=>e.attrs)]});function ox(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Yn).active.find(r=>r.source==e.source);return i instanceof ic?(typeof n=="string"?t.dispatch({...wI(t.state,n,i.from,i.to),annotations:ix.of(e.completion)}):n(t,e.completion,i.from,i.to),!0):!1}const NI=MI(Yn,ox);function ep(t,e="option"){return n=>{let i=n.state.field(Yn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(kn).interactionDelay)return!1;let r=1,s;e=="page"&&(s=cD(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:a}=i.open.options,c=i.open.selected>-1?i.open.selected+r*(t?1:-1):t?0:a-1;return c<0?c=e=="page"?0:a-1:c>=a&&(c=e=="page"?a-1:0),n.dispatch({effects:eP.of(c)}),!0}}const A1=t=>{let e=t.state.field(Yn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(kn).interactionDelay?!1:ox(t,e.open.options[e.open.selected])},_p=t=>t.state.field(Yn,!1)?(t.dispatch({effects:ym.of(!0)}),!0):!1,QI=t=>{let e=t.state.field(Yn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:If.of(null)}),!0)};class _I{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const qI=50,II=1e3,HI=Jt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Yn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Yn),n=t.state.facet(kn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Yn)==e)return;let i=t.transactions.some(s=>{let a=JD(s,n);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;s<this.running.length;s++){let a=this.running[s];if(i||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>qI&&Date.now()-a.time>II){for(let c of a.context.abortListeners)try{c()}catch(f){fi(this.view.state,f)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(a=>a.is(ym)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Yn);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(kn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=jl(e),i=new YD(e,n,t.explicit,this.view),r=new _I(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:If.of(null)}),fi(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(kn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(kn),i=this.view.state.field(Yn);for(let r=0;r<this.running.length;r++){let s=this.running[r];if(s.done===void 0)continue;if(this.running.splice(r--,1),s.done){let c=jl(s.updates.length?s.updates[0].startState:this.view.state),f=Math.min(c,s.done.from+(s.active.explicit?0:1)),h=new ic(s.active.source,s.active.explicit,f,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:c);for(let p of s.updates)h=h.update(p,n);if(h.hasResult()){e.push(h);continue}}let a=i.active.find(c=>c.source==s.active.source);if(a&&a.isPending)if(s.done==null){let c=new nr(s.active.source,0);for(let f of s.updates)c=c.update(f,n);c.isPending||e.push(c)}else this.startQuery(a)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:rx.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Yn,!1);if(e&&e.tooltip&&this.view.state.facet(kn).closeOnBlur){let n=e.open&&cD(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:If.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:ym.of(!1)}),20),this.composing=0}}}),UI=typeof navigator=="object"&&/Win/.test(navigator.platform),WI=so.highest(he.domEventHandlers({keydown(t,e){let n=e.state.field(Yn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(UI&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(a=>a.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&ox(e,i),!1}})),tP=he.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class VI{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class sx{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Nn.TrackDel),i=e.mapPos(this.to,1,Nn.TrackDel);return n==null||i==null?null:new sx(this.field,n,i)}}let XI=class nP{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),a=/^\s*/.exec(s.text)[0];for(let f of this.lines){if(i.length){let h=a,p=/^\t*/.exec(f)[0].length;for(let m=0;m<p;m++)h+=e.facet(fd);r.push(n+h.length-p),f=h+f.slice(p)}i.push(f),n+=f.length+1}let c=this.fieldPositions.map(f=>new sx(f.field,r[f.line]+f.from,r[f.line]+f.to));return{text:i,ranges:c}}static parse(e){let n=[],i=[],r=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let c=s[1]?+s[1]:null,f=s[2]||s[3]||"",h=-1,p=f.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<n.length;m++)(c!=null?n[m].seq==c:p&&n[m].name==p)&&(h=m);if(h<0){let m=0;for(;m<n.length&&(c==null||n[m].seq!=null&&n[m].seq<c);)m++;n.splice(m,0,{seq:c,name:p}),h=m;for(let v of r)v.field>=h&&v.field++}for(let m of r)if(m.line==i.length&&m.from>s.index){let v=s[2]?3+(s[1]||"").length:2;m.from-=v,m.to-=v}r.push(new VI(h,i.length,s.index,s.index+p.length)),a=a.slice(0,s.index)+f+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(c,f,h)=>{for(let p of r)p.line==i.length&&p.from>h&&(p.from--,p.to--);return f}),i.push(a)}return new nP(i,r)}},GI=we.widget({widget:new class extends Ar{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),FI=we.mark({class:"cm-snippetField"});class Mc{constructor(e,n){this.ranges=e,this.active=n,this.deco=we.set(e.map(i=>(i.from==i.to?GI:FI).range(i.from,i.to)),!0)}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Mc(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const pd=Le.define({map(t,e){return t&&t.map(e)}}),YI=Le.define(),Hf=An.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(pd))return n.value;if(n.is(YI)&&t)return new Mc(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>he.decorations.from(t,e=>e?e.deco:we.none)});function lx(t,e){return ce.create(t.filter(n=>n.field==e).map(n=>ce.range(n.from,n.to)))}function KI(t){let e=XI.parse(t);return(n,i,r,s)=>{let{text:a,ranges:c}=e.instantiate(n.state,r),{main:f}=n.state.selection,h={changes:{from:r,to:s==f.from?f.to:s,insert:ft.of(a)},scrollIntoView:!0,annotations:i?[ix.of(i),hn.userEvent.of("input.complete")]:void 0};if(c.length&&(h.selection=lx(c,0)),c.some(p=>p.field>0)){let p=new Mc(c,0),m=h.effects=[pd.of(p)];n.state.field(Hf,!1)===void 0&&m.push(Le.appendConfig.of([Hf,nH,iH,tP]))}n.dispatch(n.state.update(h))}}function iP(t){return({state:e,dispatch:n})=>{let i=e.field(Hf,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(a=>a.field==r+t);return n(e.update({selection:lx(i.ranges,r),effects:pd.of(s?null:new Mc(i.ranges,r)),scrollIntoView:!0})),!0}}const ZI=({state:t,dispatch:e})=>t.field(Hf,!1)?(e(t.update({effects:pd.of(null)})),!0):!1,JI=iP(1),eH=iP(-1),tH=[{key:"Tab",run:JI,shift:eH},{key:"Escape",run:ZI}],rE=ve.define({combine(t){return t.length?t[0]:tH}}),nH=so.highest(Go.compute([rE],t=>t.facet(rE)));function Po(t,e){return{...e,apply:KI(t)}}const iH=he.domEventHandlers({mousedown(t,e){let n=e.state.field(Hf,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:lx(n.ranges,r.field),effects:pd.of(n.ranges.some(s=>s.field>r.field)?new Mc(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Uf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Pl=Le.define({map(t,e){let n=e.mapPos(t,-1,Nn.TrackAfter);return n??void 0}}),ax=new class extends _s{};ax.startSide=1;ax.endSide=-1;const rP=An.define({create(){return nt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Pl)&&(t=t.update({add:[ax.range(n.value,n.value+1)]}));return t}});function oP(){return[oH,rP]}const kv="()[]{}<>«»»«[]{}";function sP(t){for(let e=0;e<kv.length;e+=2)if(kv.charCodeAt(e)==t)return kv.charAt(e+1);return TO(t<128?t:t+1)}function lP(t,e){return t.languageDataAt("closeBrackets",e)[0]||Uf}const rH=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),oH=he.inputHandler.of((t,e,n,i)=>{if((rH?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Yr(ci(i,0))==1||e!=r.from||n!=r.to)return!1;let s=lH(t.state,i);return s?(t.dispatch(s),!0):!1}),sH=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=lP(t,t.selection.main.head).brackets||Uf.brackets,r=null,s=t.changeByRange(a=>{if(a.empty){let c=aH(t.doc,a.head);for(let f of i)if(f==c&&ug(t.doc,a.head)==sP(ci(f,0)))return{changes:{from:a.head-f.length,to:a.head+f.length},range:ce.cursor(a.head-f.length)}}return{range:r=a}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},cx=[{key:"Backspace",run:sH}];function lH(t,e){let n=lP(t,t.selection.main.head),i=n.brackets||Uf.brackets;for(let r of i){let s=sP(ci(r,0));if(e==r)return s==r?fH(t,r,i.indexOf(r+r+r)>-1,n):cH(t,r,s,n.before||Uf.before);if(e==s&&aP(t,t.selection.main.from))return uH(t,r,s)}return null}function aP(t,e){let n=!1;return t.field(rP).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function ug(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Yr(ci(n,0)))}function aH(t,e){let n=t.sliceString(e-2,e);return Yr(ci(n,0))==n.length?n:n.slice(1)}function cH(t,e,n,i){let r=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Pl.of(a.to+e.length),range:ce.range(a.anchor+e.length,a.head+e.length)};let c=ug(t.doc,a.head);return!c||/\s/.test(c)||i.indexOf(c)>-1?{changes:{insert:e+n,from:a.head},effects:Pl.of(a.head+e.length),range:ce.cursor(a.head+e.length)}:{range:r=a}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function uH(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&ug(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:ce.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function fH(t,e,n,i){let r=i.stringPrefixes||Uf.stringPrefixes,s=null,a=t.changeByRange(c=>{if(!c.empty)return{changes:[{insert:e,from:c.from},{insert:e,from:c.to}],effects:Pl.of(c.to+e.length),range:ce.range(c.anchor+e.length,c.head+e.length)};let f=c.head,h=ug(t.doc,f),p;if(h==e){if(oE(t,f))return{changes:{insert:e+e,from:f},effects:Pl.of(f+e.length),range:ce.cursor(f+e.length)};if(aP(t,f)){let v=n&&t.sliceDoc(f,f+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:f,to:f+v.length,insert:v},range:ce.cursor(f+v.length)}}}else{if(n&&t.sliceDoc(f-2*e.length,f)==e+e&&(p=sE(t,f-2*e.length,r))>-1&&oE(t,p))return{changes:{insert:e+e+e+e,from:f},effects:Pl.of(f+e.length),range:ce.cursor(f+e.length)};if(t.charCategorizer(f)(h)!=It.Word&&sE(t,f,r)>-1&&!dH(t,f,e,r))return{changes:{insert:e+e,from:f},effects:Pl.of(f+e.length),range:ce.cursor(f+e.length)}}return{range:s=c}});return s?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function oE(t,e){let n=En(t).resolveInner(e+1);return n.parent&&n.from==e}function dH(t,e,n,i){let r=En(t).resolveInner(e,-1),s=i.reduce((a,c)=>Math.max(a,c.length),0);for(let a=0;a<5;a++){let c=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),f=c.indexOf(n);if(!f||f>-1&&i.indexOf(c.slice(0,f))>-1){let p=r.firstChild;for(;p&&p.from==r.from&&p.to-p.from>n.length+f;){if(t.sliceDoc(p.to-n.length,p.to)==n)return!1;p=p.firstChild}return!0}let h=r.to==e&&r.parent;if(!h)break;r=h}return!1}function sE(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=It.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=It.Word)return s}return-1}function ux(t={}){return[WI,Yn,kn.of(t),HI,hH,tP]}const fg=[{key:"Ctrl-Space",run:_p},{mac:"Alt-`",run:_p},{mac:"Alt-i",run:_p},{key:"Escape",run:QI},{key:"ArrowDown",run:ep(!0)},{key:"ArrowUp",run:ep(!1)},{key:"PageDown",run:ep(!0,"page")},{key:"PageUp",run:ep(!1,"page")},{key:"Enter",run:A1}],hH=so.highest(Go.computeN([kn],t=>t.facet(kn).defaultKeymap?[fg]:[]));function tp(t){let e=t.field(Yn,!1);return e&&e.active.some(n=>n.isPending)?"pending":e&&e.active.some(n=>n.state!=0)?"active":null}const pH=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=dx(t.state,n.from);return i.line?mH(t):i.block?yH(t):!1};function fx(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const mH=fx(OH,0),gH=fx(cP,0),yH=fx((t,e)=>cP(t,e,bH(e)),0);function dx(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Bu=50;function vH(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-Bu,i),a=t.sliceDoc(r,r+Bu),c=/\s*$/.exec(s)[0].length,f=/^\s*/.exec(a)[0].length,h=s.length-c;if(s.slice(h-e.length,h)==e&&a.slice(f,f+n.length)==n)return{open:{pos:i-c,margin:c&&1},close:{pos:r+f,margin:f&&1}};let p,m;r-i<=2*Bu?p=m=t.sliceDoc(i,r):(p=t.sliceDoc(i,i+Bu),m=t.sliceDoc(r-Bu,r));let v=/^\s*/.exec(p)[0].length,b=/\s*$/.exec(m)[0].length,O=m.length-b-n.length;return p.slice(v,v+e.length)==e&&m.slice(O,O+n.length)==n?{open:{pos:i+v+e.length,margin:/\s/.test(p.charAt(v+e.length))?1:0},close:{pos:r-b-n.length,margin:/\s/.test(m.charAt(O-1))?1:0}}:null}function bH(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function cP(t,e,n=e.selection.ranges){let i=n.map(s=>dx(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,a)=>vH(e,i[a],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,a)=>r[a]?[]:[{from:s.from,insert:i[a].open+" "},{from:s.to,insert:" "+i[a].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let a=0,c;a<r.length;a++)if(c=r[a]){let f=i[a],{open:h,close:p}=c;s.push({from:h.pos-f.open.length,to:h.pos+h.margin},{from:p.pos-p.margin,to:p.pos+f.close.length})}return{changes:s}}return null}function OH(t,e,n=e.selection.ranges){let i=[],r=-1;for(let{from:s,to:a}of n){let c=i.length,f=1e9,h=dx(e,s).line;if(h){for(let p=s;p<=a;){let m=e.doc.lineAt(p);if(m.from>r&&(s==a||a>m.from)){r=m.from;let v=/^\s*/.exec(m.text)[0].length,b=v==m.length,O=m.text.slice(v,v+h.length)==h?v:-1;v<m.text.length&&v<f&&(f=v),i.push({line:m,comment:O,token:h,indent:v,empty:b,single:!1})}p=m.to+1}if(f<1e9)for(let p=c;p<i.length;p++)i[p].indent<i[p].line.text.length&&(i[p].indent=f);i.length==c+1&&(i[c].single=!0)}}if(t!=2&&i.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:c,token:f,indent:h,empty:p,single:m}of i)(m||!p)&&s.push({from:c.from+h,insert:f+" "});let a=e.changes(s);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:a,comment:c,token:f}of i)if(c>=0){let h=a.from+c,p=h+f.length;a.text[p-a.from]==" "&&p++,s.push({from:h,to:p})}return{changes:s}}return null}const R1=ao.define(),xH=ao.define(),SH=ve.define(),uP=ve.define({combine(t){return co(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),fP=An.define({create(){return eo.empty},update(t,e){let n=e.state.facet(uP),i=e.annotation(R1);if(i){let f=di.fromTransaction(e,i.selection),h=i.side,p=h==0?t.undone:t.done;return f?p=bm(p,p.length,n.minDepth,f):p=mP(p,e.startState.selection),new eo(h==0?i.rest:p,h==0?p:i.rest)}let r=e.annotation(xH);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(hn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=di.fromTransaction(e),a=e.annotation(hn.time),c=e.annotation(hn.userEvent);return s?t=t.addChanges(s,a,c,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,c,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new eo(t.done.map(di.fromJSON),t.undone.map(di.fromJSON))}});function dP(t={}){return[fP,uP.of(t),he.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?hP:e.inputType=="historyRedo"?M1:null;return i?(e.preventDefault(),i(n)):!1}})]}function dg(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(fP,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const hP=dg(0,!1),M1=dg(1,!1),wH=dg(0,!0),CH=dg(1,!0);class di{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new di(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new di(e.changes&&On.fromJSON(e.changes),[],e.mapped&&io.fromJSON(e.mapped),e.startSelection&&ce.fromJSON(e.startSelection),e.selectionsAfter.map(ce.fromJSON))}static fromTransaction(e,n){let i=ir;for(let r of e.startState.facet(SH)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new di(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,ir)}static selection(e){return new di(void 0,ir,void 0,void 0,e)}}function bm(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function TH(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,a,c)=>{for(let f=0;f<n.length;){let h=n[f++],p=n[f++];c>=h&&a<=p&&(i=!0)}}),i}function kH(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function pP(t,e){return t.length?e.length?t.concat(e):t:e}const ir=[],EH=200;function mP(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-EH));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),bm(t,t.length-1,1e9,n.setSelAfter(i)))}else return[di.selection([e])]}function AH(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Ev(t,e){if(!t.length)return t;let n=t.length,i=ir;for(;n;){let r=RH(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[di.selection(i)]:ir}function RH(t,e,n){let i=pP(t.selectionsAfter.length?t.selectionsAfter.map(c=>c.map(e)):ir,n);if(!t.changes)return di.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(s):s;return new di(r,Le.mapEffects(t.effects,e),a,t.startSelection.map(s),i)}const MH=/^(input\.type|delete)($|\.)/;class eo{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new eo(this.done,this.undone):this}addChanges(e,n,i,r,s){let a=this.done,c=a[a.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!i||MH.test(i))&&(!c.selectionsAfter.length&&n-this.prevTime<r.newGroupDelay&&r.joinToEvent(s,TH(c.changes,e.changes))||i=="input.type.compose")?a=bm(a,a.length-1,r.minDepth,new di(e.changes.compose(c.changes),pP(Le.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,ir)):a=bm(a,a.length,r.minDepth,e),new eo(a,ir,n,i)}addSelection(e,n,i,r){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:ir;return s.length>0&&n-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&kH(s[s.length-1],e)?this:new eo(mP(this.done,e),this.undone,n,i)}addMapping(e){return new eo(Ev(this.done,e),Ev(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let s=r[r.length-1],a=s.selectionsAfter[0]||n.selection;if(i&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:R1.of({side:e,rest:AH(r),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let c=r.length==1?ir:r.slice(0,r.length-1);return s.mapped&&(c=Ev(c,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:R1.of({side:e,rest:c,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}eo.empty=new eo(ir,ir);const hx=[{key:"Mod-z",run:hP,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:M1,preventDefault:!0},{linux:"Ctrl-Shift-z",run:M1,preventDefault:!0},{key:"Mod-u",run:wH,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:CH,preventDefault:!0}];function Dc(t,e){return ce.create(t.ranges.map(e),t.mainIndex)}function Rr(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Mr({state:t,dispatch:e},n){let i=Dc(t.selection,n);return i.eq(t.selection,!0)?!1:(e(Rr(t,i)),!0)}function hg(t,e){return ce.cursor(e?t.to:t.from)}function gP(t,e){return Mr(t,n=>n.empty?t.moveByChar(n,e):hg(n,e))}function Un(t){return t.textDirectionAt(t.state.selection.main.head)==$t.LTR}const yP=t=>gP(t,!Un(t)),vP=t=>gP(t,Un(t));function bP(t,e){return Mr(t,n=>n.empty?t.moveByGroup(n,e):hg(n,e))}const DH=t=>bP(t,!Un(t)),PH=t=>bP(t,Un(t));function zH(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function pg(t,e,n){let i=En(t).resolveInner(e.head),r=n?Fe.closedBy:Fe.openedBy;for(let f=e.head;;){let h=n?i.childAfter(f):i.childBefore(f);if(!h)break;zH(t,h,r)?i=h:f=n?h.to:h.from}let s=i.type.prop(r),a,c;return s&&(a=n?Jr(t,i.from,1):Jr(t,i.to,-1))&&a.matched?c=n?a.end.to:a.end.from:c=n?i.to:i.from,ce.cursor(c,n?-1:1)}const $H=t=>Mr(t,e=>pg(t.state,e,!Un(t))),BH=t=>Mr(t,e=>pg(t.state,e,Un(t)));function OP(t,e){return Mr(t,n=>{if(!n.empty)return hg(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const xP=t=>OP(t,!1),SP=t=>OP(t,!0);function wP(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,i=0,r;if(e){for(let s of t.state.facet(he.scrollMargins)){let a=s(t);a?.top&&(n=Math.max(a?.top,n)),a?.bottom&&(i=Math.max(a?.bottom,i))}r=t.scrollDOM.clientHeight-n-i}else r=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:e,height:Math.max(t.defaultLineHeight,r-5)}}function CP(t,e){let n=wP(t),{state:i}=t,r=Dc(i.selection,a=>a.empty?t.moveVertically(a,e,n.height):hg(a,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let a=t.coordsAtPos(i.selection.main.head),c=t.scrollDOM.getBoundingClientRect(),f=c.top+n.marginTop,h=c.bottom-n.marginBottom;a&&a.top>f&&a.bottom<h&&(s=he.scrollIntoView(r.main.head,{y:"start",yMargin:a.top-f}))}return t.dispatch(Rr(i,r),{effects:s}),!0}const lE=t=>CP(t,!1),D1=t=>CP(t,!0);function Fs(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=ce.cursor(i.from+s))}return r}const LH=t=>Mr(t,e=>Fs(t,e,!0)),jH=t=>Mr(t,e=>Fs(t,e,!1)),NH=t=>Mr(t,e=>Fs(t,e,!Un(t))),QH=t=>Mr(t,e=>Fs(t,e,Un(t))),_H=t=>Mr(t,e=>ce.cursor(t.lineBlockAt(e.head).from,1)),qH=t=>Mr(t,e=>ce.cursor(t.lineBlockAt(e.head).to,-1));function IH(t,e,n){let i=!1,r=Dc(t.selection,s=>{let a=Jr(t,s.head,-1)||Jr(t,s.head,1)||s.head>0&&Jr(t,s.head-1,1)||s.head<t.doc.length&&Jr(t,s.head+1,-1);if(!a||!a.end)return s;i=!0;let c=a.start.from==s.head?a.end.to:a.end.from;return ce.cursor(c)});return i?(e(Rr(t,r)),!0):!1}const HH=({state:t,dispatch:e})=>IH(t,e);function dr(t,e){let n=Dc(t.state.selection,i=>{let r=e(i);return ce.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Rr(t.state,n)),!0)}function TP(t,e){return dr(t,n=>t.moveByChar(n,e))}const kP=t=>TP(t,!Un(t)),EP=t=>TP(t,Un(t));function AP(t,e){return dr(t,n=>t.moveByGroup(n,e))}const UH=t=>AP(t,!Un(t)),WH=t=>AP(t,Un(t)),VH=t=>dr(t,e=>pg(t.state,e,!Un(t))),XH=t=>dr(t,e=>pg(t.state,e,Un(t)));function RP(t,e){return dr(t,n=>t.moveVertically(n,e))}const MP=t=>RP(t,!1),DP=t=>RP(t,!0);function PP(t,e){return dr(t,n=>t.moveVertically(n,e,wP(t).height))}const aE=t=>PP(t,!1),cE=t=>PP(t,!0),GH=t=>dr(t,e=>Fs(t,e,!0)),FH=t=>dr(t,e=>Fs(t,e,!1)),YH=t=>dr(t,e=>Fs(t,e,!Un(t))),KH=t=>dr(t,e=>Fs(t,e,Un(t))),ZH=t=>dr(t,e=>ce.cursor(t.lineBlockAt(e.head).from)),JH=t=>dr(t,e=>ce.cursor(t.lineBlockAt(e.head).to)),uE=({state:t,dispatch:e})=>(e(Rr(t,{anchor:0})),!0),fE=({state:t,dispatch:e})=>(e(Rr(t,{anchor:t.doc.length})),!0),dE=({state:t,dispatch:e})=>(e(Rr(t,{anchor:t.selection.main.anchor,head:0})),!0),hE=({state:t,dispatch:e})=>(e(Rr(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),eU=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),tU=({state:t,dispatch:e})=>{let n=mg(t).map(({from:i,to:r})=>ce.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:ce.create(n),userEvent:"select"})),!0},nU=({state:t,dispatch:e})=>{let n=Dc(t.selection,i=>{let r=En(t),s=r.resolveStack(i.from,1);if(i.empty){let a=r.resolveStack(i.from,-1);a.node.from>=s.node.from&&a.node.to<=s.node.to&&(s=a)}for(let a=s;a;a=a.next){let{node:c}=a;if((c.from<i.from&&c.to>=i.to||c.to>i.to&&c.from<=i.from)&&a.next)return ce.range(c.to,c.from)}return i});return n.eq(t.selection)?!1:(e(Rr(t,n)),!0)};function zP(t,e){let{state:n}=t,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let a=n.doc.lineAt(s.head);if(e?a.to<t.state.doc.length:a.from>0)for(let c=s;;){let f=t.moveVertically(c,e);if(f.head<a.from||f.head>a.to){r.some(h=>h.head==f.head)||r.push(f);break}else{if(f.head==c.head)break;c=f}}}return r.length==i.ranges.length?!1:(t.dispatch(Rr(n,ce.create(r,r.length-1))),!0)}const iU=t=>zP(t,!1),rU=t=>zP(t,!0),oU=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=ce.create([n.main]):n.main.empty||(i=ce.create([ce.cursor(n.main.head)])),i?(e(Rr(t,i)),!0):!1};function md(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:a,to:c}=s;if(a==c){let f=e(s);f<a?(n="delete.backward",f=np(t,f,!1)):f>a&&(n="delete.forward",f=np(t,f,!0)),a=Math.min(a,f),c=Math.max(c,f)}else a=np(t,a,!1),c=np(t,c,!0);return a==c?{range:s}:{changes:{from:a,to:c},range:ce.cursor(a,a<s.head?-1:1)}});return r.changes.empty?!1:(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?he.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function np(t,e,n){if(t instanceof he)for(let i of t.state.facet(he.atomicRanges).map(r=>r(t)))i.between(e,e,(r,s)=>{r<e&&s>e&&(e=n?s:r)});return e}const $P=(t,e,n)=>md(t,i=>{let r=i.from,{state:s}=t,a=s.doc.lineAt(r),c,f;if(n&&!e&&r>a.from&&r<a.from+200&&!/[^ \t]/.test(c=a.text.slice(0,r-a.from))){if(c[c.length-1]==" ")return r-1;let h=Rc(c,s.tabSize),p=h%Hl(s)||Hl(s);for(let m=0;m<p&&c[c.length-1-m]==" ";m++)r--;f=r}else f=Sn(a.text,r-a.from,e,e)+a.from,f==r&&a.number!=(e?s.doc.lines:1)?f+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(f-a.from,r-a.from))&&(f=Sn(a.text,f-a.from,!1,!1)+a.from);return f}),P1=t=>$P(t,!1,!0),BP=t=>$P(t,!0,!1),LP=(t,e)=>md(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),a=r.charCategorizer(i);for(let c=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let f=Sn(s.text,i-s.from,e)+s.from,h=s.text.slice(Math.min(i,f)-s.from,Math.max(i,f)-s.from),p=a(h);if(c!=null&&p!=c)break;(h!=" "||i!=n.head)&&(c=p),i=f}return i}),jP=t=>LP(t,!1),sU=t=>LP(t,!0),lU=t=>md(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),aU=t=>md(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),cU=t=>md(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),uU=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:ft.of(["",""])},range:ce.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},fU=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),a=r==s.from?r-1:Sn(s.text,r-s.from,!1)+s.from,c=r==s.to?r+1:Sn(s.text,r-s.from,!0)+s.from;return{changes:{from:a,to:c,insert:t.doc.slice(r,c).append(t.doc.slice(a,r))},range:ce.cursor(c)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function mg(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let a=e[e.length-1];a.to=s.to,a.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function NP(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of mg(t)){if(n?s.to==t.doc.length:s.from==0)continue;let a=t.doc.lineAt(n?s.to+1:s.from-1),c=a.length+1;if(n){i.push({from:s.to,to:a.to},{from:s.from,insert:a.text+t.lineBreak});for(let f of s.ranges)r.push(ce.range(Math.min(t.doc.length,f.anchor+c),Math.min(t.doc.length,f.head+c)))}else{i.push({from:a.from,to:s.from},{from:s.to,insert:t.lineBreak+a.text});for(let f of s.ranges)r.push(ce.range(f.anchor-c,f.head-c))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:ce.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const dU=({state:t,dispatch:e})=>NP(t,e,!1),hU=({state:t,dispatch:e})=>NP(t,e,!0);function QP(t,e,n){if(t.readOnly)return!1;let i=[];for(let s of mg(t))n?i.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):i.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let r=t.changes(i);return e(t.update({changes:r,selection:t.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const pU=({state:t,dispatch:e})=>QP(t,e,!1),mU=({state:t,dispatch:e})=>QP(t,e,!0),gU=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(mg(e).map(({from:r,to:s})=>(r>0?r--:s<e.doc.length&&s++,{from:r,to:s}))),i=Dc(e.selection,r=>{let s;if(t.lineWrapping){let a=t.lineBlockAt(r.head),c=t.coordsAtPos(r.head,r.assoc||1);c&&(s=a.bottom+t.documentTop-c.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function yU(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=En(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(Fe.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const pE=_P(!1),vU=_P(!0);function _P(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:a}=r,c=e.doc.lineAt(s),f=!t&&s==a&&yU(e,s);t&&(s=a=(a<=c.to?c:e.doc.lineAt(a)).to);let h=new ag(e,{simulateBreak:s,simulateDoubleBreak:!!f}),p=YO(h,s);for(p==null&&(p=Rc(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));a<c.to&&/\s/.test(c.text[a-c.from]);)a++;f?{from:s,to:a}=f:s>c.from&&s<c.from+100&&!/\S/.test(c.text.slice(0,s))&&(s=c.from);let m=["",_f(e,p)];return f&&m.push(_f(e,h.lineIndent(c.from,-1))),{changes:{from:s,to:a,insert:ft.of(m)},range:ce.cursor(s+1+m[1].length)}});return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function px(t,e){let n=-1;return t.changeByRange(i=>{let r=[];for(let a=i.from;a<=i.to;){let c=t.doc.lineAt(a);c.number>n&&(i.empty||i.to>c.from)&&(e(c,r,i),n=c.number),a=c.to+1}let s=t.changes(r);return{changes:r,range:ce.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const bU=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new ag(t,{overrideIndentation:s=>{let a=n[s];return a??-1}}),r=px(t,(s,a,c)=>{let f=YO(i,s.from);if(f==null)return;/\S/.test(s.text)||(f=0);let h=/^\s*/.exec(s.text)[0],p=_f(t,f);(h!=p||c.from<s.from+h.length)&&(n[s.from]=f,a.push({from:s.from,to:s.from+h.length,insert:p}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0},qP=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(px(t,(n,i)=>{i.push({from:n.from,insert:t.facet(fd)})}),{userEvent:"input.indent"})),!0),IP=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(px(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=Rc(r,t.tabSize),a=0,c=_f(t,Math.max(0,s-Hl(t)));for(;a<r.length&&a<c.length&&r.charCodeAt(a)==c.charCodeAt(a);)a++;i.push({from:n.from+a,to:n.from+r.length,insert:c.slice(a)})}),{userEvent:"delete.dedent"})),!0),OU=t=>(t.setTabFocusMode(),!0),xU=[{key:"Ctrl-b",run:yP,shift:kP,preventDefault:!0},{key:"Ctrl-f",run:vP,shift:EP},{key:"Ctrl-p",run:xP,shift:MP},{key:"Ctrl-n",run:SP,shift:DP},{key:"Ctrl-a",run:_H,shift:ZH},{key:"Ctrl-e",run:qH,shift:JH},{key:"Ctrl-d",run:BP},{key:"Ctrl-h",run:P1},{key:"Ctrl-k",run:lU},{key:"Ctrl-Alt-h",run:jP},{key:"Ctrl-o",run:uU},{key:"Ctrl-t",run:fU},{key:"Ctrl-v",run:D1}],SU=[{key:"ArrowLeft",run:yP,shift:kP,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:DH,shift:UH,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:NH,shift:YH,preventDefault:!0},{key:"ArrowRight",run:vP,shift:EP,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:PH,shift:WH,preventDefault:!0},{mac:"Cmd-ArrowRight",run:QH,shift:KH,preventDefault:!0},{key:"ArrowUp",run:xP,shift:MP,preventDefault:!0},{mac:"Cmd-ArrowUp",run:uE,shift:dE},{mac:"Ctrl-ArrowUp",run:lE,shift:aE},{key:"ArrowDown",run:SP,shift:DP,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fE,shift:hE},{mac:"Ctrl-ArrowDown",run:D1,shift:cE},{key:"PageUp",run:lE,shift:aE},{key:"PageDown",run:D1,shift:cE},{key:"Home",run:jH,shift:FH,preventDefault:!0},{key:"Mod-Home",run:uE,shift:dE},{key:"End",run:LH,shift:GH,preventDefault:!0},{key:"Mod-End",run:fE,shift:hE},{key:"Enter",run:pE,shift:pE},{key:"Mod-a",run:eU},{key:"Backspace",run:P1,shift:P1,preventDefault:!0},{key:"Delete",run:BP,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:jP,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:sU,preventDefault:!0},{mac:"Mod-Backspace",run:aU,preventDefault:!0},{mac:"Mod-Delete",run:cU,preventDefault:!0}].concat(xU.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),mx=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:$H,shift:VH},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:BH,shift:XH},{key:"Alt-ArrowUp",run:dU},{key:"Shift-Alt-ArrowUp",run:pU},{key:"Alt-ArrowDown",run:hU},{key:"Shift-Alt-ArrowDown",run:mU},{key:"Mod-Alt-ArrowUp",run:iU},{key:"Mod-Alt-ArrowDown",run:rU},{key:"Escape",run:oU},{key:"Mod-Enter",run:vU},{key:"Alt-l",mac:"Ctrl-l",run:tU},{key:"Mod-i",run:nU,preventDefault:!0},{key:"Mod-[",run:IP},{key:"Mod-]",run:qP},{key:"Mod-Alt-\\",run:bU},{key:"Shift-Mod-k",run:gU},{key:"Shift-Mod-\\",run:HH},{key:"Mod-/",run:pH},{key:"Alt-A",run:gH},{key:"Ctrl-m",mac:"Shift-Alt-m",run:OU}].concat(SU),wU={key:"Tab",run:qP,shift:IP};var mE={};class Om{constructor(e,n,i,r,s,a,c,f,h,p=0,m){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=c,this.bufferBase=f,this.curContext=h,this.lookAhead=p,this.parent=m}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new Om(e,[],n,i,i,0,[],0,r?new gE(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),c=s.dynamicPrecedence(r);if(c&&(this.score+=c),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(r,this.reducePos);return}let f=this.stack.length-(i-1)*3-(e&262144?6:0),h=f?this.stack[f-2]:this.p.ranges[0].from,p=this.reducePos-h;p>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=p):this.p.lastBigReductionSize<p&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=p));let m=f?this.stack[f-1]:0,v=this.bufferBase+this.buffer.length-m;if(r<s.minRepeatTerm||e&131072){let b=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,h,b,v+4,!0)}if(e&262144)this.state=this.stack[f];else{let b=this.stack[f-3];this.state=s.getGoto(b,r,!0)}for(;this.stack.length>f;)this.stack.pop();this.reduceContext(r,h)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,c=this.buffer.length;if(c==0&&a.parent&&(c=a.bufferBase-a.parent.bufferBase,a=a.parent),c>0&&a.buffer[c-4]==0&&a.buffer[c-1]>-1){if(n==i)return;if(a.buffer[c-2]>=n){a.buffer[c-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let c=!1;for(let f=a;f>0&&this.buffer[f-2]>i;f-=4)if(this.buffer[f-1]>=0){c=!0;break}if(c)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;this.pos=r;let c=a.stateFlag(s,1);!c&&(r>i||n<=a.maxNode)&&(this.reducePos=r),this.pushState(s,c?i:Math.min(i,this.reducePos)),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new Om(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new CU(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;s<n.length;s+=2)(a=n[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&r.push(n[s],a);if(this.stack.length<120)for(let s=0;r.length<8&&s<n.length;s+=2){let a=n[s+1];r.some((c,f)=>f&1&&c==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let s=n[r+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[r],this.pos),a.reducePos=this.pos,a.score-=200,i.push(a)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let c=(a>>19)-s;if(c>1){let f=a&65535,h=this.stack.length-c*3;if(h>=0&&e.getGoto(this.stack[h],f,!1)>=0)return c<<19|65536|f}}else{let c=i(a,s+1);if(c!=null)return c}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new gE(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class gE{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class CU{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class xm{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new xm(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new xm(this.stack,this.pos,this.index)}}function ip(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let s=0;for(;;){let a=t.charCodeAt(i++),c=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let f=a-32;if(f>=46&&(f-=46,c=!0),s+=f,c)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class qp{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const yE=new qp;class TU{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=yE,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let a=this.ranges[--r];s-=i.from-a.to,i=a}for(;n<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let a=this.rangeIndex,c=this.range;for(;c.to<=i;)c=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=yE,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class rc{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;kU(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}rc.prototype.contextual=rc.prototype.fallback=rc.prototype.extend=!1;rc.prototype.fallback=rc.prototype.extend=!1;class gg{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function kU(t,e,n,i,r,s){let a=0,c=1<<i,{dialect:f}=n.p.parser;e:for(;(c&t[a])!=0;){let h=t[a+1];for(let b=a+3;b<h;b+=2)if((t[b+1]&c)>0){let O=t[b];if(f.allows(O)&&(e.token.value==-1||e.token.value==O||EU(O,e.token.value,r,s))){e.acceptToken(O);break}}let p=e.next,m=0,v=t[a+2];if(e.next<0&&v>m&&t[h+v*3-3]==65535){a=t[h+v*3-1];continue e}for(;m<v;){let b=m+v>>1,O=h+b+(b<<1),S=t[O],C=t[O+1]||65536;if(p<S)v=b;else if(p>=C)m=b+1;else{a=t[O+2],e.advance();continue e}}break}}function vE(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function EU(t,e,n,i){let r=vE(n,i,e);return r<0||vE(n,i,t)<r}const Ci=typeof process<"u"&&mE&&/\bparse\b/.test(mE.LOG);let Av=null;function bE(t,e,n){let i=t.cursor(Ut.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class AU{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?bE(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?bE(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],a=this.start[n]+i.positions[r];if(a>e)return this.nextStart=a,null;if(s instanceof Mt){if(a==e){if(a<this.safeFrom)return null;let c=a+s.length;if(c<=this.safeTo){let f=s.prop(Fe.lookAhead);if(!f||c+f<this.fragment.to)return s}}this.index[n]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}}class RU{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new qp)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,a=r.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,f=0;for(let h=0;h<s.length;h++){if((1<<h&a)==0)continue;let p=s[h],m=this.tokens[h];if(!(i&&!p.fallback)&&((p.contextual||m.start!=e.pos||m.mask!=a||m.context!=c)&&(this.updateCachedToken(m,p,e),m.mask=a,m.context=c),m.lookAhead>m.end+25&&(f=Math.max(m.lookAhead,f)),m.value!=0)){let v=n;if(m.extended>-1&&(n=this.addActions(e,m.extended,m.end,n)),n=this.addActions(e,m.value,m.end,n),!p.extend&&(i=m,n>v))break}}for(;this.actions.length>n;)this.actions.pop();return f&&e.setLookAhead(f),!i&&e.pos==this.stream.end&&(i=new qp,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new qp,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let c=s.specializers[a](this.stream.read(e.start,e.end),i);if(c>=0&&i.p.parser.dialect.allows(c>>1)){(c&1)==0?e.value=c>>1:e.extended=c>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:s}=e,{parser:a}=e.p,{data:c}=a;for(let f=0;f<2;f++)for(let h=a.stateSlot(s,f?2:1);;h+=3){if(c[h]==65535)if(c[h+1]==1)h=Qo(c,h+2);else{r==0&&c[h+1]==2&&(r=this.putAction(Qo(c,h+2),n,i,r));break}c[h]==n&&(r=this.putAction(Qo(c,h+1),n,i,r))}return r}}class MU{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new TU(n,r),this.tokens=new RU(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[Om.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new AU(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let c=e[a];for(;;){if(this.tokens.mainToken=null,c.pos>n)i.push(c);else{if(this.advanceStack(c,i,e))continue;{r||(r=[],s=[]),r.push(c);let f=this.tokens.getMainToken(c);s.push(f.value,f.end)}}break}}if(!i.length){let a=r&&zU(r);if(a)return Ci&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Ci&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return Ci&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((c,f)=>f.score-c.score);i.length>a;)i.pop();i.some(c=>c.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a<i.length-1;a++){let c=i[a];for(let f=a+1;f<i.length;f++){let h=i[f];if(c.sameState(h)||c.buffer.length>500&&h.buffer.length>500)if((c.score-h.score||c.buffer.length-h.buffer.length)>0)i.splice(f--,1);else{i.splice(a--,1);continue e}}}i.length>12&&(i.sort((a,c)=>c.score-a.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let a=1;a<i.length;a++)i[a].pos<this.minStackPos&&(this.minStackPos=i[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,i){let r=e.pos,{parser:s}=this,a=Ci?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,p=h?e.curContext.hash:0;for(let m=this.fragments.nodeAt(r);m;){let v=this.parser.nodeSet.types[m.type.id]==m.type?s.getGoto(e.state,m.type.id):-1;if(v>-1&&m.length&&(!h||(m.prop(Fe.contextHash)||0)==p))return e.useNode(m,v),Ci&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(m.type.id)})`),!0;if(!(m instanceof Mt)||m.children.length==0||m.positions[0]>0)break;let b=m.children[0];if(b instanceof Mt&&m.positions[0]==0)m=b;else break}}let c=s.stateSlot(e.state,4);if(c>0)return e.reduce(c),Ci&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let f=this.tokens.getActions(e);for(let h=0;h<f.length;){let p=f[h++],m=f[h++],v=f[h++],b=h==f.length||!i,O=b?e:e.split(),S=this.tokens.mainToken;if(O.apply(p,m,S?S.start:O.pos,v),Ci&&console.log(a+this.stackID(O)+` (via ${(p&65536)==0?"shift":`reduce of ${s.getName(p&65535)}`} for ${s.getName(m)} @ ${r}${O==e?"":", split"})`),b)return!0;O.pos>r?n.push(O):i.push(O)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return OE(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let a=0;a<e.length;a++){let c=e[a],f=n[a<<1],h=n[(a<<1)+1],p=Ci?this.stackID(c)+" -> ":"";if(c.deadEnd&&(s||(s=!0,c.restart(),Ci&&console.log(p+this.stackID(c)+" (restarted)"),this.advanceFully(c,i))))continue;let m=c.split(),v=p;for(let b=0;b<10&&m.forceReduce()&&(Ci&&console.log(v+this.stackID(m)+" (via force-reduce)"),!this.advanceFully(m,i));b++)Ci&&(v=this.stackID(m)+" -> ");for(let b of c.recoverByInsert(f))Ci&&console.log(p+this.stackID(b)+" (via recover-insert)"),this.advanceFully(b,i);this.stream.end>c.pos?(h==c.pos&&(h++,f=0),c.recoverByDelete(f,h),Ci&&console.log(p+this.stackID(c)+` (via recover-delete ${this.parser.getName(f)})`),OE(c,i)):(!r||r.score<m.score)&&(r=m)}return r}stackToTree(e){return e.close(),Mt.build({buffer:xm.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Av||(Av=new WeakMap)).get(e);return n||Av.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function OE(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class DU{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const Rv=t=>t;class PU{constructor(e){this.start=e.start,this.shift=e.shift||Rv,this.reduce=e.reduce||Rv,this.reuse=e.reuse||Rv,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Sm extends FO{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let c=0;c<e.repeatNodeCount;c++)n.push("");let i=Object.keys(e.topRules).map(c=>e.topRules[c][1]),r=[];for(let c=0;c<n.length;c++)r.push([]);function s(c,f,h){r[c].push([f,f.deserialize(String(h))])}if(e.nodeProps)for(let c of e.nodeProps){let f=c[0];typeof f=="string"&&(f=Fe[f]);for(let h=1;h<c.length;){let p=c[h++];if(p>=0)s(p,f,c[h++]);else{let m=c[h+-p];for(let v=-p;v>0;v--)s(c[h++],f,m);h++}}}this.nodeSet=new lg(n.map((c,f)=>Zn.define({name:f>=this.minRepeatTerm?void 0:c,id:f,props:r[f],top:i.indexOf(f)>-1,error:f==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(f)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=gD;let a=ip(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let c=0;c<this.specializerSpecs.length;c++)this.specialized[c]=this.specializerSpecs[c].term;this.specializers=this.specializerSpecs.map(xE),this.states=ip(e.states,Uint32Array),this.data=ip(e.stateData),this.goto=ip(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new rc(a,c):c),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new MU(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],c=a&1,f=r[s++];if(c&&i)return f;for(let h=s+(a>>1);s<h;s++)if(r[s]==e)return f;if(c)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),a;;s+=3){if((a=i[s])==65535)if(i[s+1]==1)a=i[s=Qo(i,s+2)];else{if(i[s+1]==2)return Qo(i,s+2);break}if(a==n||a==0)return Qo(i,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Qo(this.data,s+2);else break;r=n(Qo(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Qo(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(Sm.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(c=>c.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=xE(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;s<n.length;s++)if(!i[s])for(let a=this.dialects[n[s]],c;(c=this.data[a++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[c]=1;return new DU(e,i,r)}static deserialize(e){return new Sm(e)}}function Qo(t,e){return t[e]|t[e+1]<<16}function zU(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function xE(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const $U=1,HP=194,UP=195,BU=196,SE=197,LU=198,jU=199,NU=200,QU=2,WP=3,wE=201,_U=24,qU=25,IU=49,HU=50,UU=55,WU=56,VU=57,XU=59,GU=60,FU=61,YU=62,KU=63,ZU=65,JU=238,eW=71,tW=241,nW=242,iW=243,rW=244,oW=245,sW=246,lW=247,aW=248,VP=72,cW=249,uW=250,fW=251,dW=252,hW=253,pW=254,mW=255,gW=256,yW=73,vW=77,bW=263,OW=112,xW=130,SW=151,wW=152,CW=155,Wl=10,Wf=13,gx=32,yg=9,yx=35,TW=40,kW=46,z1=123,CE=125,XP=39,GP=34,TE=92,EW=111,AW=120,RW=78,MW=117,DW=85,PW=new Set([qU,IU,HU,bW,ZU,xW,WU,VU,JU,YU,KU,VP,yW,vW,GU,FU,SW,wW,CW,OW]);function Mv(t){return t==Wl||t==Wf}function Dv(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}const zW=new gg((t,e)=>{let n;if(t.next<0)t.acceptToken(jU);else if(e.context.flags&Ip)Mv(t.next)&&t.acceptToken(LU,1);else if(((n=t.peek(-1))<0||Mv(n))&&e.canShift(SE)){let i=0;for(;t.next==gx||t.next==yg;)t.advance(),i++;(t.next==Wl||t.next==Wf||t.next==yx)&&t.acceptToken(SE,-i)}else Mv(t.next)&&t.acceptToken(BU,1)},{contextual:!0}),$W=new gg((t,e)=>{let n=e.context;if(n.flags)return;let i=t.peek(-1);if(i==Wl||i==Wf){let r=0,s=0;for(;;){if(t.next==gx)r++;else if(t.next==yg)r+=8-r%8;else break;t.advance(),s++}r!=n.indent&&t.next!=Wl&&t.next!=Wf&&t.next!=yx&&(r<n.indent?t.acceptToken(UP,-s):t.acceptToken(HP))}}),Ip=1,FP=2,Bo=4,Lo=8,jo=16,No=32;function Hp(t,e,n){this.parent=t,this.indent=e,this.flags=n,this.hash=(t?t.hash+t.hash<<8:0)+e+(e<<4)+n+(n<<6)}const BW=new Hp(null,0,0);function LW(t){let e=0;for(let n=0;n<t.length;n++)e+=t.charCodeAt(n)==yg?8-e%8:1;return e}const kE=new Map([[tW,0],[nW,Bo],[iW,Lo],[rW,Lo|Bo],[oW,jo],[sW,jo|Bo],[lW,jo|Lo],[aW,jo|Lo|Bo],[cW,No],[uW,No|Bo],[fW,No|Lo],[dW,No|Lo|Bo],[hW,No|jo],[pW,No|jo|Bo],[mW,No|jo|Lo],[gW,No|jo|Lo|Bo]].map(([t,e])=>[t,e|FP])),jW=new PU({start:BW,reduce(t,e,n,i){return t.flags&Ip&&PW.has(e)||(e==eW||e==VP)&&t.flags&FP?t.parent:t},shift(t,e,n,i){return e==HP?new Hp(t,LW(i.read(i.pos,n.pos)),0):e==UP?t.parent:e==_U||e==UU||e==XU||e==WP?new Hp(t,0,Ip):kE.has(e)?new Hp(t,0,kE.get(e)|t.flags&Ip):t},hash(t){return t.hash}}),NW=new gg(t=>{for(let e=0;e<5;e++){if(t.next!="print".charCodeAt(e))return;t.advance()}if(!/\w/.test(String.fromCharCode(t.next)))for(let e=0;;e++){let n=t.peek(e);if(!(n==gx||n==yg)){n!=TW&&n!=kW&&n!=Wl&&n!=Wf&&n!=yx&&t.acceptToken($U);return}}}),QW=new gg((t,e)=>{let{flags:n}=e.context,i=n&Bo?GP:XP,r=(n&Lo)>0,s=!(n&jo),a=(n&No)>0,c=t.pos;for(;!(t.next<0);)if(a&&t.next==z1)if(t.peek(1)==z1)t.advance(2);else{if(t.pos==c){t.acceptToken(WP,1);return}break}else if(s&&t.next==TE){if(t.pos==c){t.advance();let f=t.next;f>=0&&(t.advance(),_W(t,f)),t.acceptToken(QU);return}break}else if(t.next==TE&&!s&&t.peek(1)>-1)t.advance(2);else if(t.next==i&&(!r||t.peek(1)==i&&t.peek(2)==i)){if(t.pos==c){t.acceptToken(wE,r?3:1);return}break}else if(t.next==Wl){if(r)t.advance();else if(t.pos==c){t.acceptToken(wE);return}break}else t.advance();t.pos>c&&t.acceptToken(NU)});function _W(t,e){if(e==EW)for(let n=0;n<2&&t.next>=48&&t.next<=55;n++)t.advance();else if(e==AW)for(let n=0;n<2&&Dv(t.next);n++)t.advance();else if(e==MW)for(let n=0;n<4&&Dv(t.next);n++)t.advance();else if(e==DW)for(let n=0;n<8&&Dv(t.next);n++)t.advance();else if(e==RW&&t.next==z1){for(t.advance();t.next>=0&&t.next!=CE&&t.next!=XP&&t.next!=GP&&t.next!=Wl;)t.advance();t.next==CE&&t.advance()}}const qW=OD({'async "*" "**" FormatConversion FormatSpec':j.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":j.controlKeyword,"in not and or is del":j.operatorKeyword,"from def class global nonlocal lambda":j.definitionKeyword,import:j.moduleKeyword,"with as print":j.keyword,Boolean:j.bool,None:j.null,VariableName:j.variableName,"CallExpression/VariableName":j.function(j.variableName),"FunctionDefinition/VariableName":j.function(j.definition(j.variableName)),"ClassDefinition/VariableName":j.definition(j.className),PropertyName:j.propertyName,"CallExpression/MemberExpression/PropertyName":j.function(j.propertyName),Comment:j.lineComment,Number:j.number,String:j.string,FormatString:j.special(j.string),Escape:j.escape,UpdateOp:j.updateOperator,"ArithOp!":j.arithmeticOperator,BitOp:j.bitwiseOperator,CompareOp:j.compareOperator,AssignOp:j.definitionOperator,Ellipsis:j.punctuation,At:j.meta,"( )":j.paren,"[ ]":j.squareBracket,"{ }":j.brace,".":j.derefOperator,", ;":j.separator}),IW={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},HW=Sm.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyO<POWO,5:aOOQS,5:a,5:aO<[QdO'#HwOOOW'#Dw'#DwOOOW'#Fz'#FzO<lOWO,5:bOOQS,5:b,5:bOOQS'#F}'#F}O<zQtO,5:iO?lQtO,5=`O@VQ#xO,5=`O@vQtO,5=`OOQS,5:},5:}OA_QeO'#GWOBqQdO,5;^OOQV,5=^,5=^OB|QtO'#IPOCkQdO,5;tOOQS-E:[-E:[OOQV,5;s,5;sO4dQdO'#FQOOQV-E9o-E9oOCsQtO,59]OEzQtO,59iOFeQdO'#HVOFpQdO'#HVO1XQdO'#HVOF{QdO'#DTOGTQdO,59mOGYQdO'#HZO'vQdO'#HZO0rQdO,5=tOOQS,5=t,5=tO0rQdO'#EROOQS'#ES'#ESOGwQdO'#GPOHXQdO,58|OHXQdO,58|O*xQdO,5:oOHgQtO'#H]OOQS,5:r,5:rOOQS,5:z,5:zOHzQdO,5;OOI]QdO'#IOO1XQdO'#H}OOQS,5;Q,5;QOOQS'#GT'#GTOIqQtO,5;QOJPQdO,5;QOJUQdO'#IQOOQS,5;T,5;TOJdQdO'#H|OOQS,5;W,5;WOJuQdO,5;YO4iQdO,5;`O4iQdO,5;cOJ}QtO'#ITO'vQdO'#ITOKXQdO,5;eO4VQdO,5;eO0rQdO,5;jO1XQdO,5;lOK^QeO'#EuOLjQgO,5;fO!!kQdO'#IUO4iQdO,5;jO!!vQdO,5;lO!#OQdO,5;qO!#ZQtO,5;vO'vQdO,5;vPOOO,5=[,5=[P!#bOSO,5=[P!#jOdO,5=[O!&bQtO1G.jO!&iQtO1G.jO!)YQtO1G.jO!)dQtO1G.jO!+}QtO1G.jO!,bQtO1G.jO!,uQdO'#HcO!-TQtO'#GuO0rQdO'#HcO!-_QdO'#HbOOQS,5:Z,5:ZO!-gQdO,5:ZO!-lQdO'#HeO!-wQdO'#HeO!.[QdO,5>OOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5<jOOQS,5<j,5<jOOQS-E9|-E9|OOQS,5<r,5<rOOQS-E:U-E:UOOQV1G0x1G0xO1XQdO'#GRO!7dQtO,5>kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5<k,5<kOOQS-E9}-E9}O!9wQdO1G.hOOQS1G0Z1G0ZO!:VQdO,5=wO!:gQdO,5=wO0rQdO1G0jO0rQdO1G0jO!:xQdO,5>jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!<RQdO,5>lO!<aQdO,5>lO!<oQdO,5>hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5<m,5<mOOQS-E:P-E:POOQS7+&z7+&zOOQS1G3]1G3]OOQS,5<^,5<^OOQS-E9p-E9pOOQS7+$s7+$sO#)bQdO,5=`O#){QdO,5=`O#*^QtO,5<aO#*qQdO1G3cOOQS-E9s-E9sOOQS7+&U7+&UO#+RQdO7+&UO#+aQdO,5<nO#+uQdO1G4UOOQS-E:Q-E:QO#,WQdO1G4UOOQS1G4T1G4TOOQS7+&W7+&WO#,iQdO7+&WOOQS,5<p,5<pO#,tQdO1G4WOOQS-E:S-E:SOOQS,5<l,5<lO#-SQdO1G4SOOQS-E:O-E:OO1XQdO'#EqO#-jQdO'#EqO#-uQdO'#IRO#-}QdO,5;[OOQS7+&`7+&`O0rQdO7+&`O#.SQgO7+&fO!JmQdO'#GXO4iQdO7+&fO4iQdO7+&iO#2QQtO,5<tO'vQdO,5<tO#2[QdO1G4ZOOQS-E:W-E:WO#2fQdO1G4ZO4iQdO7+&kO0rQdO7+&kOOQV7+&p7+&pO!KrQ!fO7+&rO!KzQdO7+&rO`QeO1G0{OOQV-E:X-E:XO4iQdO7+&lO4iQdO7+&lOOQV,5<u,5<uO#2nQdO,5<uO!JmQdO,5<uOOQV7+&l7+&lO#2yQgO7+&lO#6tQdO,5<vO#7PQdO1G4[OOQS-E:Y-E:YO#7^QdO1G4[O#7fQdO'#IWO#7tQdO'#IWO1XQdO'#IWOOQS'#IW'#IWO#8PQdO'#IVOOQS,5;n,5;nO#8XQdO,5;nO0rQdO'#FUOOQV7+&r7+&rO4iQdO7+&rOOQV7+&w7+&wO4iQdO7+&wO#8^QfO,5;xOOQV7+&|7+&|POOO7+(b7+(bO#8cQdO1G3iOOQS,5<c,5<cO#8qQdO1G3hOOQS-E9u-E9uO#9UQdO,5<dO#9aQdO,5<dO#9tQdO1G3kOOQS-E9v-E9vO#:UQdO1G3kO#:^QdO1G3kO#:nQdO1G3kO#:UQdO1G3kOOQS<<H[<<H[O#:yQtO1G1zOOQS<<Hk<<HkP#;WQdO'#FtO8vQdO1G3bO#;eQdO1G3bO#;jQdO<<HkOOQS<<Hl<<HlO#;zQdO7+)QOOQS<<Hs<<HsO#<[QtO1G1yP#<{QdO'#FsO#=YQdO7+)RO#=jQdO7+)RO#=rQdO<<HwO#=wQdO7+({OOQS<<Hy<<HyO#>nQdO,5<bO'vQdO,5<bOOQS-E9t-E9tOOQS<<Hw<<HwOOQS,5<g,5<gO0rQdO,5<gO#>sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<<IpO1XQdO1G2YP1XQdO'#GSO#AOQdO7+)pO#AaQdO7+)pOOQS<<Ir<<IrP1XQdO'#GUP0rQdO'#GQOOQS,5;],5;]O#ArQdO,5>mO#BQQdO,5>mOOQS1G0v1G0vOOQS<<Iz<<IzOOQV-E:V-E:VO4iQdO<<JQOOQV,5<s,5<sO4iQdO,5<sOOQV<<JQ<<JQOOQV<<JT<<JTO#BYQtO1G2`P#BdQdO'#GYO#BkQdO7+)uO#BuQgO<<JVO4iQdO<<JVOOQV<<J^<<J^O4iQdO<<J^O!KrQ!fO<<J^O#FpQgO7+&gOOQV<<JW<<JWO#FzQgO<<JWOOQV1G2a1G2aO1XQdO1G2aO#JuQdO1G2aO4iQdO<<JWO1XQdO1G2bP0rQdO'#G[O#KQQdO7+)vO#K_QdO7+)vOOQS'#FT'#FTO0rQdO,5>rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<<Jc<<JcO#LhQdO1G1dOOQS7+)T7+)TP#LmQdO'#FwO#L}QdO1G2OO#MbQdO1G2OO#MrQdO1G2OP#M}QdO'#FxO#N[QdO7+)VO#NlQdO7+)VO#NlQdO7+)VO#NtQdO7+)VO$ UQdO7+(|O8vQdO7+(|OOQSAN>VAN>VO$ oQdO<<LmOOQSAN>cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<<MT<<MTO$#nQdO7+(fOOQSAN?[AN?[OOQS7+'t7+'tO$$XQdO<<M[OOQS,5<q,5<qO$$jQdO1G4XOOQS-E:T-E:TOOQVAN?lAN?lOOQV1G2_1G2_O4iQdOAN?qO$$xQgOAN?qOOQVAN?xAN?xO4iQdOAN?xOOQV<<JR<<JRO4iQdOAN?rO4iQdO7+'{OOQV7+'{7+'{O1XQdO7+'{OOQVAN?rAN?rOOQS7+'|7+'|O$(sQdO<<MbOOQS1G4^1G4^O0rQdO1G4^OOQS,5<w,5<wO$)QQdO1G4]OOQS-E:Z-E:ZOOQU'#G_'#G_O$)cQfO7+'OO$)nQdO'#F_O$*uQdO7+'jO$+VQdO7+'jOOQS7+'j7+'jO$+bQdO<<LqO$+rQdO<<LqO$+rQdO<<LqO$+zQdO'#H^OOQS<<Lh<<LhO$,UQdO<<LhOOQS7+'h7+'hOOQS'#D|'#D|OOOO1G4R1G4RO$,oQdO1G4RO$,wQdO1G4RP!=hQdO'#GVOOQVG25]G25]O4iQdOG25]OOQVG25dG25dOOQVG25^G25^OOQV<<Kg<<KgO4iQdO<<KgOOQS7+)x7+)xP$-SQdO'#G]OOQU-E:]-E:]OOQV<<Jj<<JjO$-vQtO'#FaOOQS'#Fc'#FcO$.WQdO'#FbO$.xQdO'#FbOOQS'#Fb'#FbO$.}QdO'#IYO$)nQdO'#FiO$)nQdO'#FiO$/fQdO'#FjO$)nQdO'#FkO$/mQdO'#IZOOQS'#IZ'#IZO$0[QdO,5;yOOQS<<KU<<KUO$0dQdO<<KUO$0tQdOANB]O$1UQdOANB]O$1^QdO'#H_OOQS'#H_'#H_O1sQdO'#DcO$1wQdO,5=xOOQSANBSANBSOOOO7+)m7+)mO$2`QdO7+)mOOQVLD*wLD*wOOQVANARANARO5uQ!fO'#GaO$2hQtO,5<SO$)nQdO'#FmOOQS,5<W,5<WOOQS'#Fd'#FdO$3YQdO,5;|O$3_QdO,5;|OOQS'#Fg'#FgO$)nQdO'#G`O$4PQdO,5<QO$4kQdO,5>tO$4{QdO,5>tO1XQdO,5<PO$5^QdO,5<TO$5cQdO,5<TO$)nQdO'#I[O$5hQdO'#I[O$5mQdO,5<UOOQS,5<V,5<VO0rQdO'#FpOOQU1G1e1G1eO4iQdO1G1eOOQSAN@pAN@pO$5rQdOG27wO$6SQdO,59}OOQS1G3d1G3dOOOO<<MX<<MXOOQS,5<{,5<{OOQS-E:_-E:_O$6XQtO'#FaO$6`QdO'#I]O$6nQdO'#I]O$6vQdO,5<XOOQS1G1h1G1hO$6{QdO1G1hO$7QQdO,5<zOOQS-E:^-E:^O$7lQdO,5=OO$8TQdO1G4`OOQS-E:b-E:bOOQS1G1k1G1kOOQS1G1o1G1oO$8eQdO,5>vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5<YO$8sQdO,5>wO$8zQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)nQdO'#GdO$9SQdO1G4bO$9^QdO1G4bO$9fQdO1G4bOOQS7+%T7+%TO$9tQdO1G1tO$:SQtO'#FaO$:ZQdO,5<}OOQS,5<},5<}O$:iQdO1G4cOOQS-E:a-E:aO$)nQdO,5<|O$:pQdO,5<|O$:uQdO7+)|OOQS-E:`-E:`O$;PQdO7+)|O$)nQdO,5<ZP$)nQdO'#GcO$;XQdO1G2hO$)nQdO1G2hP$;gQdO'#GbO$;nQdO<<MhO$;xQdO1G1uO$<WQdO7+(SO8vQdO'#C}O8vQdO,59bO8vQdO,59bO8vQdO,59bO$<fQtO,5=`O8vQdO1G.|O0rQdO1G/XO0rQdO7+$pP$<yQdO'#GOO'vQdO'#GtO$=WQdO,59bO$=]QdO,59bO$=dQdO,59mO$=iQdO1G/UO1sQdO'#DRO8vQdO,59j",stateData:"$>S~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~O{#{Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-bO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)zOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)nOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-bOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=j'QPPPPPP'RP'Z*s+[+t,_,y-fP.SP'Z.r.r'ZPPP'Z2[PPPPPP2[5PPP5PP7b7k=sPP=v>h>kPP'Z'ZPP>zPP'Z'ZPP'Z'Z'Z'Z'Z?O?w'ZP?zP@QDXGuGyPG|HWH['ZPPPH_Hk'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHqH}IVPI^IdPI^PI^I^PPPI^PKrPK{LVL]KrPI^LfPI^PLmLsPLwM]MzNeLwLwNkNxLwLwLwLw! ^! d! g! l! o! y!!P!!]!!o!!u!#P!#V!#s!#y!$P!$Z!$a!$g!$y!%T!%Z!%a!%k!%q!%w!%}!&T!&Z!&e!&k!&u!&{!'U!'[!'k!'s!'}!(UPPPPPPPPPPP!([!(_!(e!(n!(x!)TPPPPPPPPPPPP!-u!/Z!3^!6oPP!6w!7W!7a!8Y!8P!8c!8i!8l!8o!8r!8z!9jPPPPPPPPPPPPPPPPP!9m!9q!9wP!:]!:a!:m!:v!;S!;j!;m!;p!;v!;|!<S!<VP!<_!<h!=d!=g]eOn#g$j)t,P'}`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r{!cQ#c#p$R$d$p%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g}!dQ#c#p$R$d$p$u%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!P!eQ#c#p$R$d$p$u$v%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!R!fQ#c#p$R$d$p$u$v$w%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!T!gQ#c#p$R$d$p$u$v$w$x%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!V!hQ#c#p$R$d$p$u$v$w$x$y%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g!Z!hQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0g'}TOTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r&eVOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0r%oXOYZ[dnrxy}!P!Q!U!i!k#[#d#g#y#{#}$Q$h$j$}%S%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#vqQ/[.kR0o0q't`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rh#jhz{$W$Z&l&q)S)X+f+g-RW#rq&].k0qQ$]|Q$a!OQ$n!VQ$o!WW$|!i'm*d,gS&[#s#tQ'S$iQ(s&UQ)U&nU)Y&s)Z+jW)a&w+m-T-{Q*Q']W*R'_,`-h.TQ+l)`S,_*S*TQ-Q+eQ-_,TQ-c,WQ.R-al.W-l.^._.a.z.|/R/j/o/t/y0U0Z0^Q/S.`Q/a.tQ/l/OU0P/u0S0[X0V/z0W0_0`R&Z#r!_!wYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZR%^!vQ!{YQ%x#[Q&d#}Q&g$QR,{+YT.j-s/s!Y!jQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gQ&X#kQ'c$oR*^'dR'l$|Q%V!mR/_.r'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rS#a_#b!P.[-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rT#a_#bT#^^#_R(o%xa(l%x(n(o+`,{-y-z.oT+[(k+]R-z,{Q$PsQ+l)aQ,^*RR-e,_X#}s$O$P&fQ&y$aQ'a$nQ'd$oR)s'SQ)b&wV-S+m-T-{ZgOn$j)t,PXkOn)t,PQ$k!TQ&z$bQ&{$cQ'^$mQ'b$oQ)q'RQ)x'WQ){'XQ)|'YQ*Z'`S*]'c'dQ+s)gQ+u)hQ+v)iQ+z)oS+|)r*[Q,Q)vQ,R)wS,S)y)zQ,d*^Q-V+rQ-W+tQ-Y+{S-Z+},OQ-`,UQ-b,VQ-|-XQ.O-[Q.P-^Q.Q-_Q.p-}Q.q.RQ/W.dR/r/XWkOn)t,PR#mjQ'`$nS)r'S'aR,O)sQ,]*RR-f,^Q*['`Q+})rR-[,OZiOjn)t,PQ'f$pR*`'gT-j,e-ku.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^t.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^Q/S.`X0V/z0W0_0`!P.Z-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`Q.w.YR/f.xg.z.].{/b/i/n/|0O0Q0]0a0bu.b-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^X.u.W.b/a0PR/c.tV0R/u0S0[R/X.dQnOS#on,PR,P)tQ&^#uR(x&^S%m#R#wS(_%m(bT(b%p&`Q%a!yQ%h!}W(P%a%h(U(YQ(U%eR(Y%jQ&i$RR)O&iQ(e%qQ*{(`T+R(e*{Q'n%OR*e'nS'q%R%SY*i'q*j,m-q.hU*j'r's'tU,m*k*l*mS-q,n,oR.h-rQ#Y]R%t#YQ#_^R%y#_Q(h%vS+W(h+XR+X(iQ+](kR,|+]Q#b_R%{#bQ#ebQ%}#cW&Q#e%}({+bQ({&cR+b0gQ$OsS&e$O&fR&f$PQ&v$_R)_&vQ&V#jR(t&VQ&m$VS)T&m+hR+h)UQ$Z{R&p$ZQ&t$]R)[&tQ+n)bR-U+nQ#hfR&S#hQ)f&zR+q)fQ&}$dS)m&})nR)n'OQ'V$kR)u'VQ'[$lS*P'[,ZR,Z*QQ,a*VR-i,aWjOn)t,PR#ljQ-k,eR.U-kd.{.]/b/i/n/|0O0Q0]0a0bR/h.{U.s.W/a0PR/`.sQ/{/nS0X/{0YR0Y/|S/v/b/cR0T/vQ.}.]R/k.}R!ZPXmOn)t,PWlOn)t,PR'T$jYfOn$j)t,PR&R#g[sOn#g$j)t,PR&d#}&dQOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0n0rQ!nTQ#caQ#poU$Rt%c(SS$d!R$gQ$p!XQ$u!cQ$v!dQ$w!eQ$x!fQ$y!gQ$z!hQ%e!zQ%j#OQ%p#SQ%q#TQ&`#xQ'O$eQ'g$qQ(q&OU(|&h(}+cW)j&|)l+x+yQ*o'|Q*x(]Q+w)kQ,v+QR0g0lQ!yYQ!}ZQ$b!PQ$c!QQ%R!kQ't%S^'{%`%g(O(W*q*t*v^*f'p*h,k,l-p.g/ZQ*l'rQ*m'sQ+t)gQ,j*gQ,n*kQ-n,hQ-o,iQ-r,oQ.e-mR/Y.f[bOn#g$j)t,P!^!vYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZQ#R[Q#fdS#wrxQ$UyW$_}$Q'P)pS$l!U$hW${!i'm*d,gS%v#[+Y`&P#d%|(p(r(z+a-O0kQ&a#yQ&b#{Q&c#}Q'j$}Q'z%^W([%l(^*y*}Q(`%nQ(i%wQ(v&ZS(y&_0iQ)P&jQ)Q&kU)]&u)^+kQ)d&xQ)y'WY)}'Z*O,X,Y-dQ*b'lS*n'w0jW+P(d*z,s,wW+T(g+V,y,zQ+p)eQ,U)zQ,c*YQ,x+UQ-P+dQ-e,]Q-v,uQ.S-fR/q/VhUOn#d#g$j%|&_'w(p(r)t,P%U!uYZ[drxy}!P!Q!U!i!k#[#y#{#}$Q$h$}%S%^%`%g%l%n%w&Z&j&k&u&x'P'W'Z'l'm'p'r's(O(W(^(d(g(z)^)e)g)p)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/V/Z0i0j0kQ#qpW%W!o!s0d0nQ%X!pQ%Y!qQ%[!tQ%f0cS'v%Z0hQ'x0eQ'y0fQ,p*rQ-u,qS.i-s/sR0p0rU#uq.k0qR(w&][cOn#g$j)t,PZ!xY#[#}$Q+YQ#W[Q#zrR$TxQ%b!yQ%i!}Q%o#RQ'j${Q(V%eQ(Z%jQ(c%pQ(f%qQ*|(`Q,f*bQ-t,pQ.m-uR/].lQ$StQ(R%cR*s(SQ.l-sR/}/sR#QZR#V[R%Q!iQ%O!iV*c'm*d,g!Z!lQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gR%T!kT#]^#_Q%x#[R,{+YQ(m%xS+_(n(oQ,}+`Q-x,{S.n-y-zR/^.oT+Z(k+]Q$`}Q&g$QQ)o'PR+{)pQ$XzQ)W&qR+i)XQ$XzQ&o$WQ)W&qR+i)XQ#khW$Vz$W&q)XQ$[{Q&r$ZZ)R&l)S+f+g-RR$^|R)c&wXlOn)t,PQ$f!RR'Q$gQ$m!UR'R$hR*X'_Q*V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:"⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:jW,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"]",59,"}"]],propSources:[qW],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[NW,$W,zW,QW,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:t=>IW[t]||-1}],tokenPrec:7668}),EE=new wq,YP=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function rp(t){return(e,n,i)=>{if(i)return!1;let r=e.node.getChild("VariableName");return r&&n(r,t),!0}}const UW={FunctionDefinition:rp("function"),ClassDefinition:rp("class"),ForStatement(t,e,n){if(n){for(let i=t.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")e(i,"variable");else if(i.name=="in")break}},ImportStatement(t,e){var n,i;let{node:r}=t,s=((n=r.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let a=r.getChild("import");a;a=a.nextSibling)a.name=="VariableName"&&((i=a.nextSibling)===null||i===void 0?void 0:i.name)!="as"&&e(a,s?"variable":"namespace")},AssignStatement(t,e){for(let n=t.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")e(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(t,e){for(let n=null,i=t.node.firstChild;i;i=i.nextSibling)i.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&e(i,"variable"),n=i},CapturePattern:rp("variable"),AsPattern:rp("variable"),__proto__:null};function KP(t,e){let n=EE.get(e);if(n)return n;let i=[],r=!0;function s(a,c){let f=t.sliceString(a.from,a.to);i.push({label:f,type:c})}return e.cursor(Ut.IncludeAnonymous).iterate(a=>{if(a.name){let c=UW[a.name];if(c&&c(a,s,r)||!r&&YP.has(a.name))return!1;r=!1}else if(a.to-a.from>8192){for(let c of KP(t,a.node))i.push(c);return!1}}),EE.set(e,i),i}const AE=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,ZP=["String","FormatString","Comment","PropertyName"];function WW(t){let e=En(t.state).resolveInner(t.pos,-1);if(ZP.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&AE.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)YP.has(r.name)&&(i=i.concat(KP(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:AE}}const VW=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(t=>({label:t,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(t=>({label:t,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(t=>({label:t,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(t=>({label:t,type:"function"}))),XW=[Po("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),Po("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),Po("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),Po("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),Po(`if \${}:
84
+
85
+ `,{label:"if",detail:"block",type:"keyword"}),Po("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),Po("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),Po("import ${module}",{label:"import",detail:"statement",type:"keyword"}),Po("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],GW=SI(ZP,KD(VW.concat(XW)));function Pv(t){let{node:e,pos:n}=t,i=t.lineIndent(n,-1),r=null;for(;;){let s=e.childBefore(n);if(s)if(s.name=="Comment")n=s.from;else if(s.name=="Body"||s.name=="MatchBody")t.baseIndentFor(s)+t.unit<=i&&(r=s),e=s;else if(s.name=="MatchClause")e=s;else if(s.type.is("Statement"))e=s;else break;else break}return r}function zv(t,e){let n=t.baseIndentFor(e),i=t.lineAt(t.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&t.node.to<r+100&&!/\S/.test(t.state.sliceDoc(r,t.node.to))&&t.lineIndent(t.pos,-1)<=n||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(t.textAfter)&&t.lineIndent(t.pos,-1)>n?null:n+t.unit}const $v=pm.define({name:"python",parser:HW.configure({props:[KO.add({Body:t=>{var e;let n=/^\s*(#|$)/.test(t.textAfter)&&Pv(t)||t.node;return(e=zv(t,n))!==null&&e!==void 0?e:t.continue()},MatchBody:t=>{var e;let n=Pv(t);return(e=zv(t,n||t.node))!==null&&e!==void 0?e:t.continue()},IfStatement:t=>/^\s*(else:|elif )/.test(t.textAfter)?t.baseIndent:t.continue(),"ForStatement WhileStatement":t=>/^\s*else:/.test(t.textAfter)?t.baseIndent:t.continue(),TryStatement:t=>/^\s*(except[ :]|finally:|else:)/.test(t.textAfter)?t.baseIndent:t.continue(),MatchStatement:t=>/^\s*case /.test(t.textAfter)?t.baseIndent+t.unit:t.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":xv({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":xv({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":xv({closing:"]"}),MemberExpression:t=>t.baseIndent+t.unit,"String FormatString":()=>null,Script:t=>{var e;let n=Pv(t);return(e=n&&zv(t,n))!==null&&e!==void 0?e:t.continue()}}),RD.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":Wq,Body:(t,e)=>({from:t.from+1,to:t.to-(t.to==e.doc.length?0:1)}),"String FormatString":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function vx(){return new Bq($v,[$v.data.of({autocomplete:WW}),$v.data.of({autocomplete:GW})])}class RE{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Tl{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(Vf).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((b,O)=>b.from-O.from||b.to-O.to),a=new lo,c=[],f=0,h=i.doc.iter(),p=0,m=i.doc.length;for(let b=0;;){let O=b==s.length?null:s[b];if(!O&&!c.length)break;let S,C;if(c.length)S=f,C=c.reduce((z,P)=>Math.min(z,P.to),O&&O.from>S?O.from:1e8);else{if(S=O.from,S>m)break;C=O.to,c.push(O),b++}for(;b<s.length;){let z=s[b];if(z.from==S&&(z.to>z.from||z.to==S))c.push(z),b++,C=Math.min(z.to,C);else{C=Math.min(z.from,C);break}}C=Math.min(C,m);let E=!1;if(c.some(z=>z.from==S&&(z.to==C||C==m))&&(E=S==C,!E&&C-S<10)){let z=S-(p+h.value.length);z>0&&(h.next(z),p=S);for(let P=S;;){if(P>=C){E=!0;break}if(!h.lineBreak&&p+h.value.length>P)break;P=p+h.value.length,p+=h.value.length,h.next()}}let $=s7(c);if(E)a.add(S,S,we.widget({widget:new n7($),diagnostics:c.slice()}));else{let z=c.reduce((P,R)=>R.markClass?P+" "+R.markClass:P,"");a.add(S,C,we.mark({class:"cm-lintRange cm-lintRange-"+$+z,diagnostics:c.slice(),inclusiveEnd:c.some(P=>P.to>C)}))}if(f=C,f==m)break;for(let z=0;z<c.length;z++)c[z].to<=f&&c.splice(z--,1)}let v=a.finish();return new Tl(v,n,xc(v))}}function xc(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,s,{spec:a})=>{if(!(e&&a.diagnostics.indexOf(e)<0))if(!i)i=new RE(r,s,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new RE(i.from,s,i.diagnostic)}}),i}function FW(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(Vf).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(JP))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function YW(t,e){return t.field(Mi,!1)?e:e.concat(Le.appendConfig.of(l7))}const JP=Le.define(),bx=Le.define(),ez=Le.define(),Mi=An.define({create(){return new Tl(we.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=xc(n,t.selected.diagnostic,s)||xc(n,null,s)}!n.size&&r&&e.state.facet(Vf).autoPanel&&(r=null),t=new Tl(n,r,i)}for(let n of e.effects)if(n.is(JP)){let i=e.state.facet(Vf).autoPanel?n.value.length?Xf.open:null:t.panel;t=Tl.init(n.value,i,e.state)}else n.is(bx)?t=new Tl(t.diagnostics,n.value?Xf.open:null,t.selected):n.is(ez)&&(t=new Tl(t.diagnostics,t.panel,n.value));return t},provide:t=>[jf.from(t,e=>e.panel),he.decorations.from(t,e=>e.diagnostics)]}),KW=we.mark({class:"cm-lintRange cm-lintRange-active"});function ZW(t,e,n){let{diagnostics:i}=t.state.field(Mi),r,s=-1,a=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(f,h,{spec:p})=>{if(e>=f&&e<=h&&(f==h||(e>f||n>0)&&(e<h||n<0)))return r=p.diagnostics,s=f,a=h,!1});let c=t.state.facet(Vf).tooltipFilter;return r&&c&&(r=c(r,t.state)),r?{pos:s,end:a,above:t.state.doc.lineAt(s).to<a,create(){return{dom:JW(t,r)}}}:null}function JW(t,e){return Rt("ul",{class:"cm-tooltip-lint"},e.map(n=>nz(t,n,!1)))}const e7=t=>{let e=t.state.field(Mi,!1);(!e||!e.panel)&&t.dispatch({effects:YW(t.state,[bx.of(!0)])});let n=WO(t,Xf.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},ME=t=>{let e=t.state.field(Mi,!1);return!e||!e.panel?!1:(t.dispatch({effects:bx.of(!1)}),!0)},t7=t=>{let e=t.state.field(Mi,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},Ox=[{key:"Mod-Shift-m",run:e7,preventDefault:!0},{key:"F8",run:t7}],Vf=ve.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...co(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:DE,tooltipFilter:DE,needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n,hideOn:(e,n)=>e?n?(i,r,s)=>e(i,r,s)||n(i,r,s):e:n,autoPanel:(e,n)=>e||n})}}});function DE(t,e){return t?e?(n,i)=>e(t(n,i),i):t:e}function tz(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;i<n.length;i++){let r=n[i];if(/[a-zA-Z]/.test(r)&&!e.some(s=>s.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function nz(t,e,n){var i;let r=n?tz(e.actions):[];return Rt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Rt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,a)=>{let c=!1,f=b=>{if(b.preventDefault(),c)return;c=!0;let O=xc(t.state.field(Mi).diagnostics,e);O&&s.apply(t,O.from,O.to)},{name:h}=s,p=r[a]?h.indexOf(r[a]):-1,m=p<0?h:[h.slice(0,p),Rt("u",h.slice(p,p+1)),h.slice(p+1)],v=s.markClass?" "+s.markClass:"";return Rt("button",{type:"button",class:"cm-diagnosticAction"+v,onclick:f,onmousedown:f,"aria-label":` Action: ${h}${p<0?"":` (access key "${r[a]})"`}.`},m)}),e.source&&Rt("div",{class:"cm-diagnosticSource"},e.source))}class n7 extends Ar{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Rt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class PE{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=nz(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Xf{constructor(e){this.view=e,this.items=[];let n=r=>{if(!(r.ctrlKey||r.altKey||r.metaKey)){if(r.keyCode==27)ME(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],a=tz(s.actions);for(let c=0;c<a.length;c++)if(a[c].toUpperCase().charCodeAt(0)==r.keyCode){let f=xc(this.view.state.field(Mi).diagnostics,s);f&&s.actions[c].apply(e,f.from,f.to)}}else return;r.preventDefault()}},i=r=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(r.target)&&this.moveSelection(s)};this.list=Rt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:i}),this.dom=Rt("div",{class:"cm-panel-lint"},this.list,Rt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>ME(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Mi).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Mi),i=0,r=!1,s=null,a=new Set;for(e.between(0,this.view.state.doc.length,(c,f,{spec:h})=>{for(let p of h.diagnostics){if(a.has(p))continue;a.add(p);let m=-1,v;for(let b=i;b<this.items.length;b++)if(this.items[b].diagnostic==p){m=b;break}m<0?(v=new PE(this.view,p),this.items.splice(i,0,v),r=!0):(v=this.items[m],m>i&&(this.items.splice(i,m-i),r=!0)),n&&v.diagnostic==n.diagnostic?v.dom.hasAttribute("aria-selected")||(v.dom.setAttribute("aria-selected","true"),s=v):v.dom.hasAttribute("aria-selected")&&v.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new PE(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:c,panel:f})=>{let h=f.height/this.list.offsetHeight;c.top<f.top?this.list.scrollTop-=(f.top-c.top)/h:c.bottom>f.bottom&&(this.list.scrollTop+=(c.bottom-f.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Mi),i=xc(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:ez.of(i)})}static open(e){return new Xf(e)}}function i7(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function op(t){return i7(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const r7=he.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:op("#d11")},".cm-lintRange-warning":{backgroundImage:op("orange")},".cm-lintRange-info":{backgroundImage:op("#999")},".cm-lintRange-hint":{backgroundImage:op("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function o7(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function s7(t){let e="hint",n=1;for(let i of t){let r=o7(i.severity);r>n&&(n=r,e=i.severity)}return e}const l7=[Mi,he.decorations.compute([Mi],t=>{let{selected:e,panel:n}=t.field(Mi);return!e||!n||e.from==e.to?we.none:we.set([KW.range(e.from,e.to)])}),tq(ZW,{hideOn:FW}),r7],zE=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Sc{constructor(e,n,i=0,r=e.length,s,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?c=>s(zE(c)):zE,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ci(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=TO(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Yr(e);let r=this.normalize(n);if(r.length)for(let s=0,a=i;;s++){let c=r.charCodeAt(s),f=this.match(c,a,this.bufferPos+this.bufferStart);if(s==r.length-1){if(f)return this.value=f,this;break}a==i&&s<n.length&&n.charCodeAt(s)==c&&a++}}}match(e,n,i){let r=null;for(let s=0;s<this.matches.length;s+=2){let a=this.matches[s],c=!1;this.query.charCodeAt(a)==e&&(a==this.query.length-1?r={from:this.matches[s+1],to:i}:(this.matches[s]++,c=!0)),c||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:i}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(Sc.prototype[Symbol.iterator]=function(){return this});const iz={from:-1,to:-1,match:/.*/.exec("")},xx="gm"+(/x/.unicode==null?"":"u");class rz{constructor(e,n,i,r=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=iz,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new oz(e,n,i,r,s);this.re=new RegExp(n,xx+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=wm(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=wm(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Bv=new WeakMap;class oc{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,i){let r=Bv.get(e);if(!r||r.from>=i||r.to<=n){let c=new oc(n,e.sliceString(n,i));return Bv.set(e,c),c}if(r.from==n&&r.to==i)return r;let{text:s,from:a}=r;return a>n&&(s=e.sliceString(n,a)+s,a=n),r.to<i&&(s+=e.sliceString(r.to,i)),Bv.set(e,new oc(a,s)),new oc(n,s.slice(n-a,i-a))}}class oz{constructor(e,n,i,r,s){this.text=e,this.to=s,this.done=!1,this.value=iz,this.matchPos=wm(e,r),this.re=new RegExp(n,xx+(i?.ignoreCase?"i":"")),this.test=i?.test,this.flat=oc.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=wm(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=oc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(rz.prototype[Symbol.iterator]=oz.prototype[Symbol.iterator]=function(){return this});function a7(t){try{return new RegExp(t,xx),!0}catch{return!1}}function wm(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e<n.to&&(i=n.text.charCodeAt(e-n.from))>=56320&&i<57344;)e++;return e}const c7=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:i,result:r}=iq(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return r.then(s=>{let a=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!a){t.dispatch({effects:i});return}let c=e.doc.lineAt(e.selection.main.head),[,f,h,p,m]=a,v=p?+p.slice(1):0,b=h?+h:c.number;if(h&&m){let C=b/100;f&&(C=C*(f=="-"?-1:1)+c.number/e.doc.lines),b=Math.round(e.doc.lines*C)}else h&&f&&(b=b*(f=="-"?-1:1)+c.number);let O=e.doc.line(Math.max(1,Math.min(e.doc.lines,b))),S=ce.cursor(O.from+Math.max(0,Math.min(v,O.length)));t.dispatch({effects:[i,he.scrollIntoView(S.from,{y:"center"})],selection:S})}),!0},u7={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},f7=ve.define({combine(t){return co(t,u7,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Sx(t){return[g7,m7]}const d7=we.mark({class:"cm-selectionMatch"}),h7=we.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function $E(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=It.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=It.Word)}function p7(t,e,n,i){return t(e.sliceDoc(n,n+1))==It.Word&&t(e.sliceDoc(i-1,i))==It.Word}const m7=Jt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(f7),{state:n}=t,i=n.selection;if(i.ranges.length>1)return we.none;let r=i.main,s,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return we.none;let f=n.wordAt(r.head);if(!f)return we.none;a=n.charCategorizer(r.head),s=n.sliceDoc(f.from,f.to)}else{let f=r.to-r.from;if(f<e.minSelectionLength||f>200)return we.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!($E(a,n,r.from,r.to)&&p7(a,n,r.from,r.to)))return we.none}else if(s=n.sliceDoc(r.from,r.to),!s)return we.none}let c=[];for(let f of t.visibleRanges){let h=new Sc(n.doc,s,f.from,f.to);for(;!h.next().done;){let{from:p,to:m}=h.value;if((!a||$E(a,n,p,m))&&(r.empty&&p<=r.from&&m>=r.to?c.push(h7.range(p,m)):(p>=r.to||m<=r.from)&&c.push(d7.range(p,m)),c.length>e.maxMatches))return we.none}}return we.set(c)}},{decorations:t=>t.decorations}),g7=he.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),y7=({state:t,dispatch:e})=>{let{selection:n}=t,i=ce.create(n.ranges.map(r=>t.wordAt(r.head)||ce.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function v7(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let a=!1,c=new Sc(t.doc,e,i[i.length-1].to);;)if(c.next(),c.done){if(a)return null;c=new Sc(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(f=>f.from==c.value.from))continue;if(s){let f=t.wordAt(c.value.from);if(!f||f.from!=c.value.from||f.to!=c.value.to)continue}return c.value}}const b7=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return y7({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=v7(t,i);return r?(e(t.update({selection:t.selection.addRange(ce.range(r.from,r.to),!1),effects:he.scrollIntoView(r.to)})),!0):!1},Pc=ve.define({combine(t){return co(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new P7(e),scrollToMatch:e=>he.scrollIntoView(e)})}});class sz{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||a7(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?`
86
+ `:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new T7(this):new S7(this)}getCursor(e,n=0,i){let r=e.doc?e:tt.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?Ia(this,r,n,i):qa(this,r,n,i)}}class lz{constructor(e){this.spec=e}}function O7(t,e,n){return(i,r,s,a)=>{if(n&&!n(i,r,s,a))return!1;let c=i>=a&&r<=a+s.length?s.slice(i-a,r-a):e.doc.sliceString(i,r);return t(c,e,i,r)}}function qa(t,e,n,i){let r;return t.wholeWord&&(r=x7(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(r=O7(t.test,e,r)),new Sc(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:s=>s.toLowerCase(),r)}function x7(t,e){return(n,i,r,s)=>((s>n||s+r.length<i)&&(s=Math.max(0,n-2),r=t.sliceString(s,Math.min(t.length,i+2))),(e(Cm(r,n-s))!=It.Word||e(Tm(r,n-s))!=It.Word)&&(e(Tm(r,i-s))!=It.Word||e(Cm(r,i-s))!=It.Word))}class S7 extends lz{constructor(e){super(e)}nextMatch(e,n,i){let r=qa(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);r=qa(this.spec,e,0,s).nextOverlapping()}return r.done||r.value.from==n&&r.value.to==i?null:r.value}prevMatchInRange(e,n,i){for(let r=i;;){let s=Math.max(n,r-1e4-this.spec.unquoted.length),a=qa(this.spec,e,s,r),c=null;for(;!a.nextOverlapping().done;)c=a.value;if(c)return c;if(s==n)return null;r-=1e4}}prevMatch(e,n,i){let r=this.prevMatchInRange(e,0,n);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=n||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let i=qa(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=qa(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function w7(t,e,n){return(i,r,s)=>(!n||n(i,r,s))&&t(s[0],e,i,r)}function Ia(t,e,n,i){let r;return t.wholeWord&&(r=C7(e.charCategorizer(e.selection.main.head))),t.test&&(r=w7(t.test,e,r)),new rz(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:r},n,i)}function Cm(t,e){return t.slice(Sn(t,e,!1),e)}function Tm(t,e){return t.slice(e,Sn(t,e))}function C7(t){return(e,n,i)=>!i[0].length||(t(Cm(i.input,i.index))!=It.Word||t(Tm(i.input,i.index))!=It.Word)&&(t(Tm(i.input,i.index+i[0].length))!=It.Word||t(Cm(i.input,i.index+i[0].length))!=It.Word)}class T7 extends lz{nextMatch(e,n,i){let r=Ia(this.spec,e,i,e.doc.length).next();return r.done&&(r=Ia(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),a=Ia(this.spec,e,s,i),c=null;for(;!a.next().done;)c=a.value;if(c&&(s==n||c.from>s+10))return c;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s<e.match.length)return e.match[s]+i.slice(r)}return n})}matchAll(e,n){let i=Ia(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=Ia(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const Gf=Le.define(),wx=Le.define(),Bs=An.define({create(t){return new Lv($1(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Gf)?t=new Lv(n.value.create(),t.panel):n.is(wx)&&(t=new Lv(t.query,n.value?Cx:null));return t},provide:t=>jf.from(t,e=>e.panel)});class Lv{constructor(e,n){this.query=e,this.panel=n}}const k7=we.mark({class:"cm-searchMatch"}),E7=we.mark({class:"cm-searchMatch cm-searchMatch-selected"}),A7=Jt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Bs))}update(t){let e=t.state.field(Bs);(e!=t.startState.field(Bs)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return we.none;let{view:n}=this,i=new lo;for(let r=0,s=n.visibleRanges,a=s.length;r<a;r++){let{from:c,to:f}=s[r];for(;r<a-1&&f>s[r+1].from-500;)f=s[++r].to;t.highlight(n.state,c,f,(h,p)=>{let m=n.state.selection.ranges.some(v=>v.from==h&&v.to==p);i.add(h,p,m?E7:k7)})}return i.finish()}},{decorations:t=>t.decorations});function gd(t){return e=>{let n=e.state.field(Bs,!1);return n&&n.query.spec.valid?t(e,n):uz(e)}}const km=gd((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=ce.single(i.from,i.to),s=t.state.facet(Pc);return t.dispatch({selection:r,effects:[Tx(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),cz(t),!0}),Em=gd((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=ce.single(r.from,r.to),a=t.state.facet(Pc);return t.dispatch({selection:s,effects:[Tx(t,r),a.scrollToMatch(s.main,t)],userEvent:"select.search"}),cz(t),!0}),R7=gd((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ce.create(n.map(i=>ce.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),M7=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],a=0;for(let c=new Sc(t.doc,t.sliceDoc(i,r));!c.next().done;){if(s.length>1e3)return!1;c.value.from==i&&(a=s.length),s.push(ce.range(c.value.from,c.value.to))}return e(t.update({selection:ce.create(s,a),userEvent:"select.search.matches"})),!0},BE=gd((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let a=s,c=[],f,h,p=[];a.from==i&&a.to==r&&(h=n.toText(e.getReplacement(a)),c.push({from:a.from,to:a.to,insert:h}),a=e.nextMatch(n,a.from,a.to),p.push(he.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let m=t.state.changes(c);return a&&(f=ce.single(a.from,a.to).map(m),p.push(Tx(t,a)),p.push(n.facet(Pc).scrollToMatch(f.main,t))),t.dispatch({changes:m,selection:f,effects:p,userEvent:"input.replace"}),!0}),D7=gd((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:s,to:a}=r;return{from:s,to:a,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:he.announce.of(i),userEvent:"input.replace.all"}),!0});function Cx(t){return t.state.facet(Pc).createPanel(t)}function $1(t,e){var n,i,r,s,a;let c=t.selection.main,f=c.empty||c.to>c.from+100?"":t.sliceDoc(c.from,c.to);if(e&&!f)return e;let h=t.facet(Pc);return new sz({search:((n=e?.literal)!==null&&n!==void 0?n:h.literal)?f:f.replace(/\n/g,"\\n"),caseSensitive:(i=e?.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(r=e?.literal)!==null&&r!==void 0?r:h.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(a=e?.wholeWord)!==null&&a!==void 0?a:h.wholeWord})}function az(t){let e=WO(t,Cx);return e&&e.dom.querySelector("[main-field]")}function cz(t){let e=az(t);e&&e==t.root.activeElement&&e.select()}const uz=t=>{let e=t.state.field(Bs,!1);if(e&&e.panel){let n=az(t);if(n&&n!=t.root.activeElement){let i=$1(t.state,e.query.spec);i.valid&&t.dispatch({effects:Gf.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[wx.of(!0),e?Gf.of($1(t.state,e.query.spec)):Le.appendConfig.of($7)]});return!0},fz=t=>{let e=t.state.field(Bs,!1);if(!e||!e.panel)return!1;let n=WO(t,Cx);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:wx.of(!1)}),!0},dz=[{key:"Mod-f",run:uz,scope:"editor search-panel"},{key:"F3",run:km,shift:Em,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:km,shift:Em,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:fz,scope:"editor search-panel"},{key:"Mod-Shift-l",run:M7},{key:"Mod-Alt-g",run:c7},{key:"Mod-d",run:b7,preventDefault:!0}];class P7{constructor(e){this.view=e;let n=this.query=e.state.field(Bs).query.spec;this.commit=this.commit.bind(this),this.searchField=Rt("input",{value:n.search,placeholder:Ti(e,"Find"),"aria-label":Ti(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Rt("input",{value:n.replace,placeholder:Ti(e,"Replace"),"aria-label":Ti(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Rt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Rt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Rt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,a){return Rt("button",{class:"cm-button",name:r,onclick:s,type:"button"},a)}this.dom=Rt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>km(e),[Ti(e,"next")]),i("prev",()=>Em(e),[Ti(e,"previous")]),i("select",()=>R7(e),[Ti(e,"all")]),Rt("label",null,[this.caseField,Ti(e,"match case")]),Rt("label",null,[this.reField,Ti(e,"regexp")]),Rt("label",null,[this.wordField,Ti(e,"by word")]),...e.state.readOnly?[]:[Rt("br"),this.replaceField,i("replace",()=>BE(e),[Ti(e,"replace")]),i("replaceAll",()=>D7(e),[Ti(e,"replace all")])],Rt("button",{name:"close",onclick:()=>fz(e),"aria-label":Ti(e,"close"),type:"button"},["×"])])}commit(){let e=new sz({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Gf.of(e)}))}keydown(e){y9(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Em:km)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),BE(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(Gf)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Pc).top}}function Ti(t,e){return t.state.phrase(e)}const sp=30,lp=/[\s\.,:;?!]/;function Tx(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-sp),a=Math.min(r,n+sp),c=t.state.sliceDoc(s,a);if(s!=i.from){for(let f=0;f<sp;f++)if(!lp.test(c[f+1])&&lp.test(c[f])){c=c.slice(f);break}}if(a!=r){for(let f=c.length-1;f>c.length-sp;f--)if(!lp.test(c[f-1])&&lp.test(c[f])){c=c.slice(0,f);break}}return he.announce.of(`${t.state.phrase("current match")}. ${c} ${t.state.phrase("on line")} ${i.number}.`)}const z7=he.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),$7=[Bs,so.low(A7),z7];var LE=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(cx)),e.defaultKeymap!==!1&&(i=i.concat(mx)),e.searchKeymap!==!1&&(i=i.concat(dz)),e.historyKeymap!==!1&&(i=i.concat(hx)),e.foldKeymap!==!1&&(i=i.concat(JO)),e.completionKeymap!==!1&&(i=i.concat(fg)),e.lintKeymap!==!1&&(i=i.concat(Ox));var r=[];return e.lineNumbers!==!1&&r.push(mD()),e.highlightActiveLineGutter!==!1&&r.push(gq()),e.highlightSpecialChars!==!1&&r.push(IO()),e.history!==!1&&r.push(dP()),e.foldGutter!==!1&&r.push(jD()),e.drawSelection!==!1&&r.push(qO()),e.dropCursor!==!1&&r.push(sD()),e.allowMultipleSelections!==!1&&r.push(tt.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(AD()),e.syntaxHighlighting!==!1&&r.push(hd(QD,{fallback:!0})),e.bracketMatching!==!1&&r.push(HD()),e.closeBrackets!==!1&&r.push(oP()),e.autocompletion!==!1&&r.push(ux()),e.rectangularSelection!==!1&&r.push(lD()),n!==!1&&r.push(X9()),e.highlightActiveLine!==!1&&r.push(j9()),e.highlightSelectionMatches!==!1&&r.push(Sx()),e.tabSize&&typeof e.tabSize=="number"&&r.push(fd.of(" ".repeat(e.tabSize))),r.concat([Go.of(i.flat())]).filter(Boolean)};const B7="#e5c07b",jE="#e06c75",L7="#56b6c2",j7="#ffffff",Up="#abb2bf",B1="#7d8799",N7="#61afef",Q7="#98c379",NE="#d19a66",_7="#c678dd",q7="#21252b",QE="#2c313a",_E="#282c34",jv="#353a42",I7="#3E4451",qE="#528bff",H7=he.theme({"&":{color:Up,backgroundColor:_E},".cm-content":{caretColor:qE},".cm-cursor, .cm-dropCursor":{borderLeftColor:qE},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:I7},".cm-panels":{backgroundColor:q7,color:Up},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:_E,color:B1,border:"none"},".cm-activeLineGutter":{backgroundColor:QE},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:jv},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:jv,borderBottomColor:jv},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:QE,color:Up}}},{dark:!0}),U7=Xl.define([{tag:j.keyword,color:_7},{tag:[j.name,j.deleted,j.character,j.propertyName,j.macroName],color:jE},{tag:[j.function(j.variableName),j.labelName],color:N7},{tag:[j.color,j.constant(j.name),j.standard(j.name)],color:NE},{tag:[j.definition(j.name),j.separator],color:Up},{tag:[j.typeName,j.className,j.number,j.changed,j.annotation,j.modifier,j.self,j.namespace],color:B7},{tag:[j.operator,j.operatorKeyword,j.url,j.escape,j.regexp,j.link,j.special(j.string)],color:L7},{tag:[j.meta,j.comment],color:B1},{tag:j.strong,fontWeight:"bold"},{tag:j.emphasis,fontStyle:"italic"},{tag:j.strikethrough,textDecoration:"line-through"},{tag:j.link,color:B1,textDecoration:"underline"},{tag:j.heading,fontWeight:"bold",color:jE},{tag:[j.atom,j.bool,j.special(j.variableName)],color:NE},{tag:[j.processingInstruction,j.string,j.inserted],color:Q7},{tag:j.invalid,color:j7}]),W7=[H7,hd(U7)];var V7=he.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),X7=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:i=!0,readOnly:r=!1,theme:s="light",placeholder:a="",basicSetup:c=!0}=e,f=[];switch(n&&f.unshift(Go.of([wU])),c&&(typeof c=="boolean"?f.unshift(LE()):f.unshift(LE(c))),a&&f.unshift(q9(a)),s){case"light":f.push(V7);break;case"dark":f.push(W7);break;case"none":break;default:f.push(s);break}return i===!1&&f.push(he.editable.of(!1)),r&&f.push(tt.readOnly.of(!0)),[...f]},G7=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class F7{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(i){console.error("TimeoutLatch callback error:",i)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class IE{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Nv=null,Y7=()=>typeof window>"u"?new IE:(Nv||(Nv=new IE),Nv),HE=ao.define(),K7=200,Z7=[];function J7(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:s,onUpdate:a,extensions:c=Z7,autoFocus:f,theme:h="light",height:p=null,minHeight:m=null,maxHeight:v=null,width:b=null,minWidth:O=null,maxWidth:S=null,placeholder:C="",editable:E=!0,readOnly:$=!1,indentWithTab:z=!0,basicSetup:P=!0,root:R,initialState:L}=t,[M,B]=k.useState(),[_,A]=k.useState(),[Q,T]=k.useState(),H=k.useState(()=>({current:null}))[0],I=k.useState(()=>({current:null}))[0],V=he.theme({"&":{height:p,minHeight:m,maxHeight:v,width:b,minWidth:O,maxWidth:S},"& .cm-scroller":{height:"100% !important"}}),N=he.updateListener.of(K=>{if(K.docChanged&&typeof i=="function"&&!K.transactions.some(G=>G.annotation(HE))){H.current?H.current.reset():(H.current=new F7(()=>{if(I.current){var G=I.current;I.current=null,G()}H.current=null},K7),Y7().add(H.current));var le=K.state.doc,q=le.toString();i(q,K)}r&&r(G7(K))}),X=X7({theme:h,editable:E,readOnly:$,placeholder:C,indentWithTab:z,basicSetup:P}),Y=[N,V,...X];return a&&typeof a=="function"&&Y.push(he.updateListener.of(a)),Y=Y.concat(c),k.useLayoutEffect(()=>{if(M&&!Q){var K={doc:e,selection:n,extensions:Y},le=L?tt.fromJSON(L.json,K,L.fields):tt.create(K);if(T(le),!_){var q=new he({state:le,parent:M,root:R});A(q),s&&s(q,le)}}return()=>{_&&(T(void 0),A(void 0))}},[M,Q]),k.useEffect(()=>{t.container&&B(t.container)},[t.container]),k.useEffect(()=>()=>{_&&(_.destroy(),A(void 0)),H.current&&(H.current.cancel(),H.current=null)},[_]),k.useEffect(()=>{f&&_&&_.focus()},[f,_]),k.useEffect(()=>{_&&_.dispatch({effects:Le.reconfigure.of(Y)})},[h,c,p,m,v,b,O,S,C,E,$,z,P,i,a]),k.useEffect(()=>{if(e!==void 0){var K=_?_.state.doc.toString():"";if(_&&e!==K){var le=H.current&&!H.current.isDone,q=()=>{_&&e!==_.state.doc.toString()&&_.dispatch({changes:{from:0,to:_.state.doc.toString().length,insert:e||""},annotations:[HE.of(!0)]})};le?I.current=q:q()}}},[e,_]),{state:Q,setState:T,view:_,setView:A,container:M,setContainer:B}}var eV=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Am=k.forwardRef((t,e)=>{var{className:n,value:i="",selection:r,extensions:s=[],onChange:a,onStatistics:c,onCreateEditor:f,onUpdate:h,autoFocus:p,theme:m="light",height:v,minHeight:b,maxHeight:O,width:S,minWidth:C,maxWidth:E,basicSetup:$,placeholder:z,indentWithTab:P,editable:R,readOnly:L,root:M,initialState:B}=t,_=pO(t,eV),A=k.useRef(null),{state:Q,view:T,container:H,setContainer:I}=J7({root:M,value:i,autoFocus:p,theme:m,height:v,minHeight:b,maxHeight:O,width:S,minWidth:C,maxWidth:E,basicSetup:$,placeholder:z,indentWithTab:P,editable:R,readOnly:L,selection:r,onChange:a,onStatistics:c,onCreateEditor:f,onUpdate:h,extensions:s,initialState:B});k.useImperativeHandle(e,()=>({editor:A.current,state:Q,view:T}),[A,H,Q,T]);var V=k.useCallback(X=>{A.current=X,I(X)},[I]);if(typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var N=typeof m=="string"?"cm-theme-"+m:"cm-theme";return x.jsx("div",Of({ref:V,className:""+N+(n?" "+n:"")},_))});Am.displayName="CodeMirror";const tV=.2,ap=.8,nV=.5,iV=he.baseTheme({"& .cm-context-top":{borderTop:`1px solid rgba(0, 0, 0, ${ap})`},"& .cm-context-bottom":{borderBottom:`1px solid rgba(0, 0, 0, ${ap})`},"& .cm-context":{backgroundColor:`rgba(0, 0, 0, ${tV})`,borderRight:`1px solid rgba(0, 0, 0, ${ap})`,borderLeft:`1px solid rgba(0, 0, 0, ${ap})`},"& .cm-context-active":{backgroundColor:`rgba(0, 0, 0, ${nV})`}}),hz=ve.define({combine:t=>t.reduce((e,n)=>({active:n.active,first:Math.min(n.first,e.first),last:Math.max(n.last,e.last)}),{active:0,first:1/0,last:0})}),rV=we.line({attributes:{class:"cm-context-active"}}),oV=we.line({attributes:{class:"cm-context"}}),sV=we.line({attributes:{class:"cm-context-top"}}),lV=we.line({attributes:{class:"cm-context-bottom"}});function UE(t){let{active:e,first:n,last:i}=t.state.facet(hz),r=new lo;for(let{from:s,to:a}of t.visibleRanges)for(let c=s;c<=a;){let f=t.state.doc.lineAt(c);f.number>=n&&f.number<=i&&(r.add(f.from,f.from,oV),f.number===n&&r.add(f.from,f.from,sV),f.number===i&&r.add(f.from,f.from,lV)),f.number===e&&r.add(f.from,f.from,rV),c=f.to+1}return r.finish()}const aV=Jt.fromClass(class{constructor(t){this.decorations=UE(t)}update(t){this.decorations=UE(t.view)}},{decorations:t=>t.decorations});function cV({active:t,first:e,last:n}){return[iV,hz.of({active:t,first:e,last:n}),aV]}const pz=he.theme({"& .cm-lineWrapping":{wordBreak:"break-all"}}),Qv={fontSize:"14px",fontFamily:"JetBrains Mono, Consolas, monospace",lineHeight:"1.6"},uV={borderLeftWidth:"2px"},Xi={insertedTextDecoration:"none",deletedTextDecoration:"line-through",insertedLinePadding:"1px 3px",borderRadious:"3px"},ml={border:"none",paddingRight:"8px",fontSize:"0.9em",fontWeight:"500",lineHeight:"1.78"},_v={border:"none",borderRadius:"4px",padding:"2px 10px"},fV={borderRadius:"2px"},qv={borderRadius:"2px"},Iv={borderRadius:"4px",padding:"0 5px",margin:"0 2px"},Hv={width:"12px",height:"12px",borderRadius:"6px"},cp={borderRadius:"4px",padding:"2px 6px"},Ba={borderRadius:"4px",borderRadiusSelected:"3px",lineHeight:"1.3",padding:"4px 8px",paddingRight:"8px"},mz="#212121",gz="#505d64",Uv="#606f7a",un="#707d8b",dV="#a0a4ae",_o="#bdbdbd",Wv="#e0e0e0",hV="#202325",wl="#ff5f52",Lu="#ff6e40",pV="#fa5788",ju="#facf4e",Wp="#ffad42",Uo="#56c8d8",La="#7186f0",Vp="#cf6edf",mV="#6abf69",gV="#99d066",yV="#4ebaaa",zl=wl,Vv=hV,vV="#2d333b30",Nu=mz,ja=gz,WE="#ffffff1f",bV="#4A707A80",Xv=dV,OV="#39496650",xV=Uo,VE=Wp,yz=Uo,SV=Vp,XE="#1e3d2780",GE="#4e282880",Gv="#6abf69",Fv="#ff5f52",wV=he.theme({"&":{color:_o,backgroundColor:Nu,fontSize:Qv.fontSize,fontFamily:Qv.fontFamily},".cm-content":{caretColor:Xv,lineHeight:Qv.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:Xv,borderLeftWidth:uV.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${Xv}99`,color:Nu},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:WE},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:"#394966cc",outline:`1px solid ${Uo}`,color:Wv,borderRadius:cp.borderRadius,"& span":{color:Wv}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Uo,color:Nu,padding:cp.padding,"& span":{color:Nu}},".cm-search.cm-panel.cm-textfield":{color:_o,borderRadius:cp.borderRadius,padding:cp.padding},".cm-panels":{backgroundColor:mz,color:_o,borderRadius:"4px"},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${un}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${un}`},".cm-panel button":{backgroundColor:ja,color:_o,border:_v.border,borderRadius:_v.borderRadius,padding:_v.padding},".cm-panel button:hover":{backgroundColor:Uv},".cm-activeLine":{backgroundColor:vV,borderRadius:fV.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Vv,color:un,border:ml.border,borderRight:`1px solid ${gz}`,paddingRight:ml.paddingRight},".cm-activeLineGutter":{backgroundColor:"#252a2c",color:_o,fontWeight:ml.fontWeight},".cm-lineNumbers":{fontSize:ml.fontSize,lineHeight:ml.lineHeight},".cm-foldGutter":{fontSize:ml.fontSize,lineHeight:ml.lineHeight},".cm-foldGutter .cm-gutterElement":{color:un,cursor:"pointer"},".cm-foldGutter .cm-gutterElement:hover":{color:_o},".cm-insertedLine":{textDecoration:Xi.insertedTextDecoration,backgroundColor:XE,color:Gv,padding:Xi.insertedLinePadding,borderRadius:Xi.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:Xi.insertedTextDecoration,backgroundColor:`${XE} !important`,color:Gv,padding:Xi.insertedLinePadding,borderRadius:Xi.borderRadious,border:`1px solid ${Gv}40`},"ins.cm-insertedLine .cm-changedText":{background:"transparent !important"},".cm-deletedLine":{textDecoration:Xi.deletedTextDecoration,backgroundColor:GE,color:Fv,padding:Xi.insertedLinePadding,borderRadius:Xi.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:Xi.deletedTextDecoration,backgroundColor:`${GE} !important`,color:Fv,padding:Xi.insertedLinePadding,borderRadius:Xi.borderRadious,border:`1px solid ${Fv}40`},"del .cm-deletedText, del .cm-changedText":{background:"transparent !important"},".cm-tooltip":{backgroundColor:ja,border:`1px solid ${un}`,borderRadius:Ba.borderRadius,padding:Ba.padding,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.3)"},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:ja,border:"none"},"& > ul > li":{padding:Ba.padding,lineHeight:Ba.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:WE,color:Wv,borderRadius:Ba.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:un,paddingRight:Ba.paddingRight},"& > ul > li > span.cm-completionDetail":{color:un,fontStyle:"italic"}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ja,borderBottomColor:ja},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${zl}`},"&-warning":{borderLeft:`3px solid ${VE}`},"&-info":{borderLeft:`3px solid ${yz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${zl}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${VE}`},".cm-matchingBracket":{backgroundColor:OV,outline:`1px solid ${xV}`,borderRadius:qv.borderRadius},".cm-nonmatchingBracket":{backgroundColor:"#ff5f5240",outline:`1px solid ${zl}`,borderRadius:qv.borderRadius},".cm-selectionMatch":{backgroundColor:bV,outline:`1px solid ${Uv}50`,borderRadius:qv.borderRadius},".cm-foldPlaceholder":{backgroundColor:ja,color:un,border:`1px dotted ${un}70`,borderRadius:Iv.borderRadius,padding:Iv.padding,margin:Iv.margin},"&.cm-focused":{outline:"none",boxShadow:`0 0 0 2px ${Nu}, 0 0 0 3px ${Uo}40`},"& .cm-scroller::-webkit-scrollbar":{width:Hv.width,height:Hv.height},"& .cm-scroller::-webkit-scrollbar-track":{background:Vv},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:Uv,borderRadius:Hv.borderRadius,border:`3px solid ${Vv}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:un},".cm-ghostText":{opacity:"0.5",color:un}},{dark:!0}),CV=Xl.define([{tag:j.keyword,color:wl,fontWeight:"bold"},{tag:j.controlKeyword,color:wl,fontWeight:"bold"},{tag:j.moduleKeyword,color:wl,fontWeight:"bold"},{tag:[j.name,j.deleted,j.character,j.macroName],color:La},{tag:[j.variableName],color:gV},{tag:[j.propertyName],color:Vp,fontStyle:"normal"},{tag:[j.typeName],color:wl},{tag:[j.className],color:ju,fontStyle:"italic"},{tag:[j.namespace],color:La,fontStyle:"italic"},{tag:[j.operator,j.operatorKeyword],color:_o},{tag:[j.bracket],color:un},{tag:[j.brace],color:un},{tag:[j.punctuation],color:un},{tag:[j.function(j.variableName)],color:Uo},{tag:[j.labelName],color:Uo,fontStyle:"italic"},{tag:[j.definition(j.function(j.variableName))],color:Uo},{tag:[j.definition(j.variableName)],color:La},{tag:j.number,color:ju},{tag:j.changed,color:ju},{tag:j.annotation,color:zl,fontStyle:"italic"},{tag:j.modifier,color:Lu,fontStyle:"italic"},{tag:j.self,color:Lu},{tag:[j.color,j.constant(j.name),j.standard(j.name)],color:Lu},{tag:[j.atom,j.bool,j.special(j.variableName)],color:Lu},{tag:[j.processingInstruction,j.inserted],color:mV},{tag:[j.special(j.string),j.regexp],color:pV},{tag:j.string,color:Wp},{tag:j.definition(j.typeName),color:wl,fontWeight:"bold"},{tag:j.meta,color:un},{tag:j.comment,fontStyle:"italic",color:un},{tag:j.docComment,fontStyle:"italic",color:un},{tag:[j.tagName],color:Vp},{tag:[j.attributeName],color:ju},{tag:[j.heading],fontWeight:"bold",color:yV},{tag:j.heading1,color:ju},{tag:j.heading2,color:Wp},{tag:j.heading3,color:Uo},{tag:j.heading4,color:La},{tag:j.heading5,color:Vp},{tag:j.heading6,color:wl},{tag:[j.strong],fontWeight:"bold",color:La},{tag:[j.emphasis],fontStyle:"italic",color:Wp},{tag:[j.link],color:SV,fontWeight:"500",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[j.url],color:yz,textDecoration:"underline",textUnderlineOffset:"2px"},{tag:[j.invalid],color:_o,textDecoration:"underline wavy",borderBottom:`1px wavy ${zl}`},{tag:[j.strikethrough],color:zl,textDecoration:"line-through"},{tag:j.constant(j.name),color:Lu},{tag:j.deleted,color:zl},{tag:j.squareBracket,color:un},{tag:j.angleBracket,color:un},{tag:j.monospace,color:_o},{tag:[j.contentSeparator],color:La},{tag:j.quote,color:un}]),Rm=[wV,hd(CV)],TV=he.theme({"&,& .cm-content":{fontFamily:'"Fira Code", monospace'},"& .cm-cursor":{display:"none !important"},"& .cm-scroller .cm-gutters":{borderRight:"none ",background:"transparent"}}),kV=[mD(),IO(),jD(),qO(),Sx(),Go.of([...cx,...mx,...dz,...hx,...JO,...fg,...Ox]),tt.readOnly.of(!0),he.lineWrapping,pz,TV,vx()];function EV({currentFile:t}){const e=Xs(),n=zt(p=>p.files),{absoluteFilename:i,lineNumber:r,firstFunctionLineNumber:s,lastFunctionLineNumber:a}=t,c=k.useRef(),f=n[i];k.useEffect(()=>{i&&typeof f>"u"&&e(W$(i))},[e,n,i,f]);const h=k.useMemo(()=>[...kV,cV({active:r,first:s,last:a})],[r,s,a]);return k.useEffect(()=>{let p=null;if(f&&c.current){const m=()=>{if(c.current.view){const v=f.split(`
87
+ `).slice(0,r-1).join(`
88
+ `).length,{view:b}=c.current;b.dispatch(b.state.update({effects:he.scrollIntoView(v,{y:"center"})}))}else p=setTimeout(()=>{p=null,m()},10)};m()}return()=>{p&&clearTimeout(p)}},[f,r]),x.jsx(Am,{ref:c,style:{flex:1},basicSetup:!1,theme:Rm,height:"100%",extensions:h,value:f||""})}function FE(t){return t.substring(2).toLowerCase()}function AV(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function RV(t){const{children:e,disableReactTree:n=!1,mouseEvent:i="onClick",onClickAway:r,touchEvent:s="onTouchEnd"}=t,a=k.useRef(!1),c=k.useRef(null),f=k.useRef(!1),h=k.useRef(!1);k.useEffect(()=>(setTimeout(()=>{f.current=!0},0),()=>{f.current=!1}),[]);const p=mn(Vl(e),c),m=or(O=>{const S=h.current;h.current=!1;const C=Hn(c.current);if(!f.current||!c.current||"clientX"in O&&AV(O,C))return;if(a.current){a.current=!1;return}let E;O.composedPath?E=O.composedPath().includes(c.current):E=!C.documentElement.contains(O.target)||c.current.contains(O.target),!E&&(n||!S)&&r(O)}),v=O=>S=>{h.current=!0;const C=e.props[O];C&&C(S)},b={ref:p};return s!==!1&&(b[s]=v(s)),k.useEffect(()=>{if(s!==!1){const O=FE(s),S=Hn(c.current),C=()=>{a.current=!0};return S.addEventListener(O,m),S.addEventListener("touchmove",C),()=>{S.removeEventListener(O,m),S.removeEventListener("touchmove",C)}}},[m,s]),i!==!1&&(b[i]=v(i)),k.useEffect(()=>{if(i!==!1){const O=FE(i),S=Hn(c.current);return S.addEventListener(O,m),()=>{S.removeEventListener(O,m)}}},[m,i]),k.cloneElement(e,b)}const YE=(t,e)=>{if(!e||!e.getBoundingClientRect)return null;const{x:n,y:i}=e.getBoundingClientRect(),r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY;return{x:r-n,y:s-i}};function MV({children:t,vertical:e}){const[n,i]=k.useState(50),[r,s]=k.useState(null),a=k.useRef(),c=k.useCallback(p=>{s(YE(p,a.current))},[]),f=k.useCallback(p=>{if(!r)return;const m=YE(p,a.current);if(!m)return null;const{width:v,height:b}=a.current.getBoundingClientRect();i(Math.min(100,Math.max(0,(e?m.x/v:m.y/b)*100)))},[r,e]),h=k.useCallback(()=>{s(null)},[]);return Ri.Children.count(t)!==2||!Ri.Children.map(t,p=>!!p).every(p=>p)?t:x.jsxs(lt,{ref:a,sx:{display:"flex",flex:1,minHeight:0,flexDirection:e?"row":"column"},onTouchMove:f,onMouseMove:f,onTouchEnd:h,onMouseUp:h,children:[x.jsx(lt,{style:{[e?"width":"height"]:`${n}%`,display:"flex",minHeight:0,minWidth:0,overflow:"hidden"},children:t[0]}),x.jsx(RV,{onClickAway:h,children:x.jsx(lt,{sx:p=>({minWidth:"6px",minHeight:"6px",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",cursor:e?"ew-resize":"ns-resize","&::before":{display:"block",content:"''",background:p.vars.palette.primary.main,borderRadius:"15%",width:e?.5:.05,height:e?.05:.5}}),onTouchStart:c,onMouseDown:c})}),x.jsx(lt,{style:{display:"flex",minHeight:0,minWidth:0,overflow:"hidden",flex:1},children:t[1]})]})}function DV(t){return He("MuiTypography",t)}const Mm=Ue("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),PV={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},zV=dQ(),$V=t=>{const{align:e,gutterBottom:n,noWrap:i,paragraph:r,variant:s,classes:a}=t,c={root:["root",s,t.align!=="inherit"&&`align${pe(e)}`,n&&"gutterBottom",i&&"noWrap",r&&"paragraph"]};return Ve(c,DV,a)},BV=ge("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${pe(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(Ke(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,n])=>e!=="inherit"&&n&&typeof n=="object").map(([e,n])=>({props:{variant:e},style:n})),...Object.entries(t.palette).filter(xr()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${pe(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),KE={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ct=k.forwardRef(function(e,n){const{color:i,...r}=qe({props:e,name:"MuiTypography"}),s=!PV[i],a=zV({...r,...s&&{color:i}}),{align:c="inherit",className:f,component:h,gutterBottom:p=!1,noWrap:m=!1,paragraph:v=!1,variant:b="body1",variantMapping:O=KE,...S}=a,C={...a,align:c,color:i,className:f,component:h,gutterBottom:p,noWrap:m,paragraph:v,variant:b,variantMapping:O},E=h||(v?"p":O[b]||KE[b])||"span",$=$V(C);return x.jsx(BV,{as:E,ref:n,className:ye($.root,f),...S,ownerState:C,style:{...c!=="inherit"&&{"--Typography-textAlign":c},...S.style}})});function ZE(...t){return t.reduce((e,n)=>n==null?e:function(...r){e.apply(this,r),n.apply(this,r)},()=>{})}function LV(t){return He("MuiSvgIcon",t)}Ue("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const jV=t=>{const{color:e,fontSize:n,classes:i}=t,r={root:["root",e!=="inherit"&&`color${pe(e)}`,`fontSize${pe(n)}`]};return Ve(r,LV,i)},NV=ge("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${pe(n.color)}`],e[`fontSize${pe(n.fontSize)}`]]}})(Ke(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:t.transitions?.create?.("fill",{duration:(t.vars??t).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:t.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:t.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,e])=>e&&e.main).map(([e])=>({props:{color:e},style:{color:(t.vars??t).palette?.[e]?.main}})),{props:{color:"action"},style:{color:(t.vars??t).palette?.action?.active}},{props:{color:"disabled"},style:{color:(t.vars??t).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),L1=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiSvgIcon"}),{children:r,className:s,color:a="inherit",component:c="svg",fontSize:f="medium",htmlColor:h,inheritViewBox:p=!1,titleAccess:m,viewBox:v="0 0 24 24",...b}=i,O=k.isValidElement(r)&&r.type==="svg",S={...i,color:a,component:c,fontSize:f,instanceFontSize:e.fontSize,inheritViewBox:p,viewBox:v,hasSvgAsChild:O},C={};p||(C.viewBox=v);const E=jV(S);return x.jsxs(NV,{as:c,className:ye(E.root,s),focusable:"false",color:h,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:n,...C,...b,...O&&r.props,ownerState:S,children:[O?r.props.children:r,m?x.jsx("title",{children:m}):null]})});L1.muiName="SvgIcon";function ot(t,e){function n(i,r){return x.jsx(L1,{"data-testid":void 0,ref:r,...i,children:t})}return n.muiName=L1.muiName,k.memo(k.forwardRef(n))}function vg(t,e=166){let n;function i(...r){const s=()=>{t.apply(this,r)};clearTimeout(n),n=setTimeout(s,e)}return i.clear=()=>{clearTimeout(n)},i}function kr(t){return Hn(t).defaultView||window}function QV(t,e){const n=t.charCodeAt(2);return t[0]==="o"&&t[1]==="n"&&n>=65&&n<=90&&typeof e=="function"}function vz(t,e){if(!t)return e;function n(a,c){const f={};return Object.keys(c).forEach(h=>{QV(h,c[h])&&typeof a[h]=="function"&&(f[h]=(...p)=>{a[h](...p),c[h](...p)})}),f}if(typeof t=="function"||typeof e=="function")return a=>{const c=typeof e=="function"?e(a):e,f=typeof t=="function"?t({...a,...c}):t,h=ye(a?.className,c?.className,f?.className),p=n(f,c);return{...c,...f,...p,...!!h&&{className:h},...c?.style&&f?.style&&{style:{...c.style,...f.style}},...c?.sx&&f?.sx&&{sx:[...Array.isArray(c.sx)?c.sx:[c.sx],...Array.isArray(f.sx)?f.sx:[f.sx]]}}};const i=e,r=n(t,i),s=ye(i?.className,t?.className);return{...e,...t,...r,...!!s&&{className:s},...i?.style&&t?.style&&{style:{...i.style,...t.style}},...i?.sx&&t?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(t.sx)?t.sx:[t.sx]]}}}const bz=ot(x.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),_V=ot(x.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),Ff=ot(x.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),qV=ot(x.jsx("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5M15 19l-6-2.11V5l6 2.11z"})),IV=ot(x.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"})),HV=ot(x.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}));function UV(t){return He("MuiCard",t)}Ue("MuiCard",["root"]);const WV=t=>{const{classes:e}=t;return Ve({root:["root"]},UV,e)},VV=ge(Ac,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),Oz=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiCard"}),{className:r,raised:s=!1,...a}=i,c={...i,raised:s},f=WV(c);return x.jsx(VV,{className:ye(f.root,r),elevation:s?8:void 0,ref:n,ownerState:c,...a})});function XV(t){return He("MuiCardContent",t)}Ue("MuiCardContent",["root"]);const GV=t=>{const{classes:e}=t;return Ve({root:["root"]},XV,e)},FV=ge("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),YV=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiCardContent"}),{className:r,component:s="div",...a}=i,c={...i,component:s},f=GV(c);return x.jsx(FV,{as:s,className:ye(f.root,r),ownerState:c,ref:n,...a})});function KV(t){return He("MuiCardHeader",t)}const Dm=Ue("MuiCardHeader",["root","avatar","action","content","title","subheader"]),ZV=t=>{const{classes:e}=t;return Ve({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},KV,e)},JV=ge("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(t,e)=>[{[`& .${Dm.title}`]:e.title},{[`& .${Dm.subheader}`]:e.subheader},e.root]})({display:"flex",alignItems:"center",padding:16}),eX=ge("div",{name:"MuiCardHeader",slot:"Avatar"})({display:"flex",flex:"0 0 auto",marginRight:16}),tX=ge("div",{name:"MuiCardHeader",slot:"Action"})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),nX=ge("div",{name:"MuiCardHeader",slot:"Content"})({flex:"1 1 auto",[`.${Mm.root}:where(& .${Dm.title})`]:{display:"block"},[`.${Mm.root}:where(& .${Dm.subheader})`]:{display:"block"}}),xz=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiCardHeader"}),{action:r,avatar:s,component:a="div",disableTypography:c=!1,subheader:f,subheaderTypographyProps:h,title:p,titleTypographyProps:m,slots:v={},slotProps:b={},...O}=i,S={...i,component:a,disableTypography:c},C=ZV(S),E={slots:v,slotProps:{title:m,subheader:h,...b}};let $=p;const[z,P]=Ne("title",{className:C.title,elementType:Ct,externalForwardedProps:E,ownerState:S,additionalProps:{variant:s?"body2":"h5",component:"span"}});$!=null&&$.type!==Ct&&!c&&($=x.jsx(z,{...P,children:$}));let R=f;const[L,M]=Ne("subheader",{className:C.subheader,elementType:Ct,externalForwardedProps:E,ownerState:S,additionalProps:{variant:s?"body2":"body1",color:"textSecondary",component:"span"}});R!=null&&R.type!==Ct&&!c&&(R=x.jsx(L,{...M,children:R}));const[B,_]=Ne("root",{ref:n,className:C.root,elementType:JV,externalForwardedProps:{...E,...O,component:a},ownerState:S}),[A,Q]=Ne("avatar",{className:C.avatar,elementType:eX,externalForwardedProps:E,ownerState:S}),[T,H]=Ne("content",{className:C.content,elementType:nX,externalForwardedProps:E,ownerState:S}),[I,V]=Ne("action",{className:C.action,elementType:tX,externalForwardedProps:E,ownerState:S});return x.jsxs(B,{..._,children:[s&&x.jsx(A,{...Q,children:s}),x.jsxs(T,{...H,children:[$,R]}),r&&x.jsx(I,{...V,children:r})]})}),iX=ot(x.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));class Pm{static create(){return new Pm}static use(){const e=CM(Pm.create).current,[n,i]=k.useState(!1);return e.shouldMount=n,e.setShouldMount=i,k.useEffect(e.mountEffect,[n]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=oX(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function rX(){return Pm.use()}function oX(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n}function sX(t){const{className:e,classes:n,pulsate:i=!1,rippleX:r,rippleY:s,rippleSize:a,in:c,onExited:f,timeout:h}=t,[p,m]=k.useState(!1),v=ye(e,n.ripple,n.rippleVisible,i&&n.ripplePulsate),b={width:a,height:a,top:-(a/2)+s,left:-(a/2)+r},O=ye(n.child,p&&n.childLeaving,i&&n.childPulsate);return!c&&!p&&m(!0),k.useEffect(()=>{if(!c&&f!=null){const S=setTimeout(f,h);return()=>{clearTimeout(S)}}},[f,c,h]),x.jsx("span",{className:v,style:b,children:x.jsx("span",{className:O})})}const Ki=Ue("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),j1=550,lX=80,aX=ed`
89
+ 0% {
90
+ transform: scale(0);
91
+ opacity: 0.1;
92
+ }
93
+
94
+ 100% {
95
+ transform: scale(1);
96
+ opacity: 0.3;
97
+ }
98
+ `,cX=ed`
99
+ 0% {
100
+ opacity: 1;
101
+ }
102
+
103
+ 100% {
104
+ opacity: 0;
105
+ }
106
+ `,uX=ed`
107
+ 0% {
108
+ transform: scale(1);
109
+ }
110
+
111
+ 50% {
112
+ transform: scale(0.92);
113
+ }
114
+
115
+ 100% {
116
+ transform: scale(1);
117
+ }
118
+ `,fX=ge("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),dX=ge(sX,{name:"MuiTouchRipple",slot:"Ripple"})`
119
+ opacity: 0;
120
+ position: absolute;
121
+
122
+ &.${Ki.rippleVisible} {
123
+ opacity: 0.3;
124
+ transform: scale(1);
125
+ animation-name: ${aX};
126
+ animation-duration: ${j1}ms;
127
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
128
+ }
129
+
130
+ &.${Ki.ripplePulsate} {
131
+ animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
132
+ }
133
+
134
+ & .${Ki.child} {
135
+ opacity: 1;
136
+ display: block;
137
+ width: 100%;
138
+ height: 100%;
139
+ border-radius: 50%;
140
+ background-color: currentColor;
141
+ }
142
+
143
+ & .${Ki.childLeaving} {
144
+ opacity: 0;
145
+ animation-name: ${cX};
146
+ animation-duration: ${j1}ms;
147
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
148
+ }
149
+
150
+ & .${Ki.childPulsate} {
151
+ position: absolute;
152
+ /* @noflip */
153
+ left: 0px;
154
+ top: 0;
155
+ animation-name: ${uX};
156
+ animation-duration: 2500ms;
157
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
158
+ animation-iteration-count: infinite;
159
+ animation-delay: 200ms;
160
+ }
161
+ `,hX=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:s={},className:a,...c}=i,[f,h]=k.useState([]),p=k.useRef(0),m=k.useRef(null);k.useEffect(()=>{m.current&&(m.current(),m.current=null)},[f]);const v=k.useRef(!1),b=El(),O=k.useRef(null),S=k.useRef(null),C=k.useCallback(P=>{const{pulsate:R,rippleX:L,rippleY:M,rippleSize:B,cb:_}=P;h(A=>[...A,x.jsx(dX,{classes:{ripple:ye(s.ripple,Ki.ripple),rippleVisible:ye(s.rippleVisible,Ki.rippleVisible),ripplePulsate:ye(s.ripplePulsate,Ki.ripplePulsate),child:ye(s.child,Ki.child),childLeaving:ye(s.childLeaving,Ki.childLeaving),childPulsate:ye(s.childPulsate,Ki.childPulsate)},timeout:j1,pulsate:R,rippleX:L,rippleY:M,rippleSize:B},p.current)]),p.current+=1,m.current=_},[s]),E=k.useCallback((P={},R={},L=()=>{})=>{const{pulsate:M=!1,center:B=r||R.pulsate,fakeElement:_=!1}=R;if(P?.type==="mousedown"&&v.current){v.current=!1;return}P?.type==="touchstart"&&(v.current=!0);const A=_?null:S.current,Q=A?A.getBoundingClientRect():{width:0,height:0,left:0,top:0};let T,H,I;if(B||P===void 0||P.clientX===0&&P.clientY===0||!P.clientX&&!P.touches)T=Math.round(Q.width/2),H=Math.round(Q.height/2);else{const{clientX:V,clientY:N}=P.touches&&P.touches.length>0?P.touches[0]:P;T=Math.round(V-Q.left),H=Math.round(N-Q.top)}if(B)I=Math.sqrt((2*Q.width**2+Q.height**2)/3),I%2===0&&(I+=1);else{const V=Math.max(Math.abs((A?A.clientWidth:0)-T),T)*2+2,N=Math.max(Math.abs((A?A.clientHeight:0)-H),H)*2+2;I=Math.sqrt(V**2+N**2)}P?.touches?O.current===null&&(O.current=()=>{C({pulsate:M,rippleX:T,rippleY:H,rippleSize:I,cb:L})},b.start(lX,()=>{O.current&&(O.current(),O.current=null)})):C({pulsate:M,rippleX:T,rippleY:H,rippleSize:I,cb:L})},[r,C,b]),$=k.useCallback(()=>{E({},{pulsate:!0})},[E]),z=k.useCallback((P,R)=>{if(b.clear(),P?.type==="touchend"&&O.current){O.current(),O.current=null,b.start(0,()=>{z(P,R)});return}O.current=null,h(L=>L.length>0?L.slice(1):L),m.current=R},[b]);return k.useImperativeHandle(n,()=>({pulsate:$,start:E,stop:z}),[$,E,z]),x.jsx(fX,{className:ye(Ki.root,s.root,a),ref:S,...c,children:x.jsx(gO,{component:null,exit:!0,children:f})})});function pX(t){return He("MuiButtonBase",t)}const mX=Ue("MuiButtonBase",["root","disabled","focusVisible"]),gX=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:i,classes:r}=t,a=Ve({root:["root",e&&"disabled",n&&"focusVisible"]},pX,r);return n&&i&&(a.root+=` ${i}`),a},yX=ge("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${mX.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Yo=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:s=!1,children:a,className:c,component:f="button",disabled:h=!1,disableRipple:p=!1,disableTouchRipple:m=!1,focusRipple:v=!1,focusVisibleClassName:b,LinkComponent:O="a",onBlur:S,onClick:C,onContextMenu:E,onDragLeave:$,onFocus:z,onFocusVisible:P,onKeyDown:R,onKeyUp:L,onMouseDown:M,onMouseLeave:B,onMouseUp:_,onTouchEnd:A,onTouchMove:Q,onTouchStart:T,tabIndex:H=0,TouchRippleProps:I,touchRippleRef:V,type:N,...X}=i,Y=k.useRef(null),K=rX(),le=mn(K.ref,V),[q,G]=k.useState(!1);h&&q&&G(!1),k.useImperativeHandle(r,()=>({focusVisible:()=>{G(!0),Y.current.focus()}}),[]);const se=K.shouldMount&&!p&&!h;k.useEffect(()=>{q&&v&&!p&&K.pulsate()},[p,v,q,K]);const ue=zo(K,"start",M,m),Z=zo(K,"stop",E,m),ie=zo(K,"stop",$,m),de=zo(K,"stop",_,m),Te=zo(K,"stop",Ee=>{q&&Ee.preventDefault(),B&&B(Ee)},m),Ae=zo(K,"start",T,m),ke=zo(K,"stop",A,m),Me=zo(K,"stop",Q,m),Re=zo(K,"stop",Ee=>{ac(Ee.target)||G(!1),S&&S(Ee)},!1),vt=or(Ee=>{Y.current||(Y.current=Ee.currentTarget),ac(Ee.target)&&(G(!0),P&&P(Ee)),z&&z(Ee)}),Be=()=>{const Ee=Y.current;return f&&f!=="button"&&!(Ee.tagName==="A"&&Ee.href)},Se=or(Ee=>{v&&!Ee.repeat&&q&&Ee.key===" "&&K.stop(Ee,()=>{K.start(Ee)}),Ee.target===Ee.currentTarget&&Be()&&Ee.key===" "&&Ee.preventDefault(),R&&R(Ee),Ee.target===Ee.currentTarget&&Be()&&Ee.key==="Enter"&&!h&&(Ee.preventDefault(),C&&C(Ee))}),Xe=or(Ee=>{v&&Ee.key===" "&&q&&!Ee.defaultPrevented&&K.stop(Ee,()=>{K.pulsate(Ee)}),L&&L(Ee),C&&Ee.target===Ee.currentTarget&&Be()&&Ee.key===" "&&!Ee.defaultPrevented&&C(Ee)});let $e=f;$e==="button"&&(X.href||X.to)&&($e=O);const je={};if($e==="button"){const Ee=!!X.formAction;je.type=N===void 0&&!Ee?"button":N,je.disabled=h}else!X.href&&!X.to&&(je.role="button"),h&&(je["aria-disabled"]=h);const Ie=mn(n,Y),at={...i,centerRipple:s,component:f,disabled:h,disableRipple:p,disableTouchRipple:m,focusRipple:v,tabIndex:H,focusVisible:q},Ye=gX(at);return x.jsxs(yX,{as:$e,className:ye(Ye.root,c),ownerState:at,onBlur:Re,onClick:C,onContextMenu:Z,onFocus:vt,onKeyDown:Se,onKeyUp:Xe,onMouseDown:ue,onMouseLeave:Te,onMouseUp:de,onDragLeave:ie,onTouchEnd:ke,onTouchMove:Me,onTouchStart:Ae,ref:Ie,tabIndex:h?-1:H,type:N,...je,...X,children:[a,se?x.jsx(hX,{ref:le,center:s,...I}):null]})});function zo(t,e,n,i=!1){return or(r=>(n&&n(r),i||t[e](r),!0))}function vX(t){return He("MuiChip",t)}const et=Ue("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),bX=t=>{const{classes:e,disabled:n,size:i,color:r,iconColor:s,onDelete:a,clickable:c,variant:f}=t,h={root:["root",f,n&&"disabled",`size${pe(i)}`,`color${pe(r)}`,c&&"clickable",c&&`clickableColor${pe(r)}`,a&&"deletable",a&&`deletableColor${pe(r)}`,`${f}${pe(r)}`],label:["label",`label${pe(i)}`],avatar:["avatar",`avatar${pe(i)}`,`avatarColor${pe(r)}`],icon:["icon",`icon${pe(i)}`,`iconColor${pe(s)}`],deleteIcon:["deleteIcon",`deleteIcon${pe(i)}`,`deleteIconColor${pe(r)}`,`deleteIcon${pe(f)}Color${pe(r)}`]};return Ve(h,vX,e)},OX=ge("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:i,iconColor:r,clickable:s,onDelete:a,size:c,variant:f}=n;return[{[`& .${et.avatar}`]:e.avatar},{[`& .${et.avatar}`]:e[`avatar${pe(c)}`]},{[`& .${et.avatar}`]:e[`avatarColor${pe(i)}`]},{[`& .${et.icon}`]:e.icon},{[`& .${et.icon}`]:e[`icon${pe(c)}`]},{[`& .${et.icon}`]:e[`iconColor${pe(r)}`]},{[`& .${et.deleteIcon}`]:e.deleteIcon},{[`& .${et.deleteIcon}`]:e[`deleteIcon${pe(c)}`]},{[`& .${et.deleteIcon}`]:e[`deleteIconColor${pe(i)}`]},{[`& .${et.deleteIcon}`]:e[`deleteIcon${pe(f)}Color${pe(i)}`]},e.root,e[`size${pe(c)}`],e[`color${pe(i)}`],s&&e.clickable,s&&i!=="default"&&e[`clickableColor${pe(i)}`],a&&e.deletable,a&&i!=="default"&&e[`deletableColor${pe(i)}`],e[f],e[`${f}${pe(i)}`]]}})(Ke(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${et.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${et.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${et.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${et.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${et.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${et.icon}`]:{marginLeft:5,marginRight:-6},[`& .${et.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.alpha((t.vars||t).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.alpha((t.vars||t).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${et.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${et.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(xr(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText,[`& .${et.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[n].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${et.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${et.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${et.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}}},...Object.entries(t.palette).filter(xr(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${et.focusVisible}`]:{background:(t.vars||t).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)},[`&.${et.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.action.selected,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(xr(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${et.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${et.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${et.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${et.avatar}`]:{marginLeft:4},[`& .${et.avatarSmall}`]:{marginLeft:2},[`& .${et.icon}`]:{marginLeft:4},[`& .${et.iconSmall}`]:{marginLeft:2},[`& .${et.deleteIcon}`]:{marginRight:5},[`& .${et.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(xr()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(t.vars||t).palette[n].main,border:`1px solid ${t.alpha((t.vars||t).palette[n].main,.7)}`,[`&.${et.clickable}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette[n].main,(t.vars||t).palette.action.hoverOpacity)},[`&.${et.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette[n].main,(t.vars||t).palette.action.focusOpacity)},[`& .${et.deleteIcon}`]:{color:t.alpha((t.vars||t).palette[n].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].main}}}}))]}})),xX=ge("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:i}=n;return[e.label,e[`label${pe(i)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function JE(t){return t.key==="Backspace"||t.key==="Delete"}const bg=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiChip"}),{avatar:r,className:s,clickable:a,color:c="default",component:f,deleteIcon:h,disabled:p=!1,icon:m,label:v,onClick:b,onDelete:O,onKeyDown:S,onKeyUp:C,size:E="medium",variant:$="filled",tabIndex:z,skipFocusWhenDisabled:P=!1,slots:R={},slotProps:L={},...M}=i,B=k.useRef(null),_=mn(B,n),A=ie=>{ie.stopPropagation(),O&&O(ie)},Q=ie=>{ie.currentTarget===ie.target&&JE(ie)&&ie.preventDefault(),S&&S(ie)},T=ie=>{ie.currentTarget===ie.target&&O&&JE(ie)&&O(ie),C&&C(ie)},H=a!==!1&&b?!0:a,I=H||O?Yo:f||"div",V={...i,component:I,disabled:p,size:E,color:c,iconColor:k.isValidElement(m)&&m.props.color||c,onDelete:!!O,clickable:H,variant:$},N=bX(V),X=I===Yo?{component:f||"div",focusVisibleClassName:N.focusVisible,...O&&{disableRipple:!0}}:{};let Y=null;O&&(Y=h&&k.isValidElement(h)?k.cloneElement(h,{className:ye(h.props.className,N.deleteIcon),onClick:A}):x.jsx(iX,{className:N.deleteIcon,onClick:A}));let K=null;r&&k.isValidElement(r)&&(K=k.cloneElement(r,{className:ye(N.avatar,r.props.className)}));let le=null;m&&k.isValidElement(m)&&(le=k.cloneElement(m,{className:ye(N.icon,m.props.className)}));const q={slots:R,slotProps:L},[G,se]=Ne("root",{elementType:OX,externalForwardedProps:{...q,...M},ownerState:V,shouldForwardComponentProp:!0,ref:_,className:ye(N.root,s),additionalProps:{disabled:H&&p?!0:void 0,tabIndex:P&&p?-1:z,...X},getSlotProps:ie=>({...ie,onClick:de=>{ie.onClick?.(de),b?.(de)},onKeyDown:de=>{ie.onKeyDown?.(de),Q(de)},onKeyUp:de=>{ie.onKeyUp?.(de),T(de)}})}),[ue,Z]=Ne("label",{elementType:xX,externalForwardedProps:q,ownerState:V,className:N.label});return x.jsxs(G,{as:I,...se,children:[K||le,x.jsx(ue,{...Z,children:v}),Y]})});function SX(t){return He("MuiCollapse",t)}Ue("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const wX=t=>{const{orientation:e,classes:n}=t,i={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return Ve(i,SX,n)},CX=ge("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.orientation],n.state==="entered"&&e.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&e.hidden]}})(Ke(({theme:t})=>({height:0,overflow:"hidden",transition:t.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:t.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>e.state==="exited"&&!e.in&&e.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),TX=ge("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),kX=ge("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ds=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiCollapse"}),{addEndListener:r,children:s,className:a,collapsedSize:c="0px",component:f,easing:h,in:p,onEnter:m,onEntered:v,onEntering:b,onExit:O,onExited:S,onExiting:C,orientation:E="vertical",slots:$={},slotProps:z={},style:P,timeout:R=gM.standard,TransitionComponent:L=fr,...M}=i,B={...i,orientation:E,collapsedSize:c},_=wX(B),A=Er(),Q=El(),T=k.useRef(null),H=k.useRef(),I=typeof c=="number"?`${c}px`:c,V=E==="horizontal",N=V?"width":"height",X=k.useRef(null),Y=mn(n,X),K=Se=>Xe=>{if(Se){const $e=X.current;Xe===void 0?Se($e):Se($e,Xe)}},le=()=>T.current?T.current[V?"clientWidth":"clientHeight"]:0,q=K((Se,Xe)=>{T.current&&V&&(T.current.style.position="absolute"),Se.style[N]=I,m&&m(Se,Xe)}),G=K((Se,Xe)=>{const $e=le();T.current&&V&&(T.current.style.position="");const{duration:je,easing:Ie}=Qs({style:P,timeout:R,easing:h},{mode:"enter"});if(R==="auto"){const at=A.transitions.getAutoHeightDuration($e);Se.style.transitionDuration=`${at}ms`,H.current=at}else Se.style.transitionDuration=typeof je=="string"?je:`${je}ms`;Se.style[N]=`${$e}px`,Se.style.transitionTimingFunction=Ie,b&&b(Se,Xe)}),se=K((Se,Xe)=>{Se.style[N]="auto",v&&v(Se,Xe)}),ue=K(Se=>{Se.style[N]=`${le()}px`,O&&O(Se)}),Z=K(S),ie=K(Se=>{const Xe=le(),{duration:$e,easing:je}=Qs({style:P,timeout:R,easing:h},{mode:"exit"});if(R==="auto"){const Ie=A.transitions.getAutoHeightDuration(Xe);Se.style.transitionDuration=`${Ie}ms`,H.current=Ie}else Se.style.transitionDuration=typeof $e=="string"?$e:`${$e}ms`;Se.style[N]=I,Se.style.transitionTimingFunction=je,C&&C(Se)}),de=Se=>{R==="auto"&&Q.start(H.current||0,Se),r&&r(X.current,Se)},Te={slots:$,slotProps:z,component:f},[Ae,ke]=Ne("root",{ref:Y,className:ye(_.root,a),elementType:CX,externalForwardedProps:Te,ownerState:B,additionalProps:{style:{[V?"minWidth":"minHeight"]:I,...P}}}),[Me,Re]=Ne("wrapper",{ref:T,className:_.wrapper,elementType:TX,externalForwardedProps:Te,ownerState:B}),[vt,Be]=Ne("wrapperInner",{className:_.wrapperInner,elementType:kX,externalForwardedProps:Te,ownerState:B});return x.jsx(L,{in:p,onEnter:q,onEntered:se,onEntering:G,onExit:ue,onExited:Z,onExiting:ie,addEndListener:de,nodeRef:X,timeout:R==="auto"?null:R,...M,children:(Se,{ownerState:Xe,...$e})=>{const je={...B,state:Se};return x.jsx(Ae,{...ke,className:ye(ke.className,{entered:_.entered,exited:!p&&I==="0px"&&_.hidden}[Se]),ownerState:je,...$e,children:x.jsx(Me,{...Re,ownerState:je,children:x.jsx(vt,{...Be,ownerState:je,children:s})})})}})});Ds&&(Ds.muiSupportAuto=!0);function EX(t){return He("MuiDivider",t)}const eA=Ue("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),AX=t=>{const{absolute:e,children:n,classes:i,flexItem:r,light:s,orientation:a,textAlign:c,variant:f}=t;return Ve({root:["root",e&&"absolute",f,s&&"light",a==="vertical"&&"vertical",r&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",c==="right"&&a!=="vertical"&&"textAlignRight",c==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},EX,i)},RX=ge("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(Ke(({theme:t})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:t.alpha((t.vars||t).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:t.spacing(2),marginRight:t.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:t.spacing(1),marginBottom:t.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&e.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>e.orientation==="vertical"&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>e.textAlign==="right"&&e.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>e.textAlign==="left"&&e.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),MX=ge("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(Ke(({theme:t})=>({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}}]}))),Yf=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiDivider"}),{absolute:r=!1,children:s,className:a,orientation:c="horizontal",component:f=s||c==="vertical"?"div":"hr",flexItem:h=!1,light:p=!1,role:m=f!=="hr"?"separator":void 0,textAlign:v="center",variant:b="fullWidth",...O}=i,S={...i,absolute:r,component:f,flexItem:h,light:p,orientation:c,role:m,textAlign:v,variant:b},C=AX(S);return x.jsx(RX,{as:f,className:ye(C.root,a),role:m,ref:n,ownerState:S,"aria-orientation":m==="separator"&&(f!=="hr"||c==="vertical")?c:void 0,...O,children:s?x.jsx(MX,{className:C.wrapper,ownerState:S,children:s}):null})});Yf&&(Yf.muiSkipListHighlight=!0);function DX(t){return He("MuiIconButton",t)}const tA=Ue("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),PX=t=>{const{classes:e,disabled:n,color:i,edge:r,size:s,loading:a}=t,c={root:["root",a&&"loading",n&&"disabled",i!=="default"&&`color${pe(i)}`,r&&`edge${pe(r)}`,`size${pe(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ve(c,DX,e)},zX=ge(Yo,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${pe(n.color)}`],n.edge&&e[`edge${pe(n.edge)}`],e[`size${pe(n.size)}`]]}})(Ke(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.alpha((t.vars||t).palette.action.active,(t.vars||t).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ke(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(xr()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(xr()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.alpha((t.vars||t).palette[e].main,(t.vars||t).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${tA.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${tA.loading}`]:{color:"transparent"}}))),$X=ge("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),xn=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiIconButton"}),{edge:r=!1,children:s,className:a,color:c="default",disabled:f=!1,disableFocusRipple:h=!1,size:p="medium",id:m,loading:v=null,loadingIndicator:b,...O}=i,S=Gm(m),C=b??x.jsx(hO,{"aria-labelledby":S,color:"inherit",size:16}),E={...i,edge:r,color:c,disabled:f,disableFocusRipple:h,loading:v,loadingIndicator:C,size:p},$=PX(E);return x.jsxs(zX,{id:v?S:m,className:ye($.root,a),centerRipple:!0,focusRipple:!h,disabled:f||v,ref:n,...O,ownerState:E,children:[typeof v=="boolean"&&x.jsx("span",{className:$.loadingWrapper,style:{display:"contents"},children:x.jsx($X,{className:$.loadingIndicator,ownerState:E,children:v&&C})}),s]})});var nA={"+":"inserted","-":"deleted","@":"meta"};const BX={name:"diff",token:function(t){var e=t.string.search(/[\t ]+?$/);if(!t.sol()||e===0)return t.skipToEnd(),("error "+(nA[t.string.charAt(0)]||"")).replace(/ $/,"");var n=nA[t.peek()]||t.skipToEnd();return e===-1?t.skipToEnd():t.pos=e,n}},Sz=k.createContext({});function LX(t){return He("MuiAccordion",t)}const up=Ue("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),jX=t=>{const{classes:e,square:n,expanded:i,disabled:r,disableGutters:s}=t;return Ve({root:["root",!n&&"rounded",i&&"expanded",r&&"disabled",!s&&"gutters"],heading:["heading"],region:["region"]},LX,e)},NX=ge(Ac,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${up.region}`]:e.region},e.root,!n.square&&e.rounded,!n.disableGutters&&e.gutters]}})(Ke(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${up.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${up.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),Ke(({theme:t})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${up.expanded}`]:{margin:"16px 0"}}}]}))),QX=ge("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),_X=ge("div",{name:"MuiAccordion",slot:"Region"})({}),qX=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiAccordion"}),{children:r,className:s,defaultExpanded:a=!1,disabled:c=!1,disableGutters:f=!1,expanded:h,onChange:p,slots:m={},slotProps:v={},TransitionComponent:b,TransitionProps:O,...S}=i,[C,E]=IM({controlled:h,default:a,name:"Accordion",state:"expanded"}),$=k.useCallback(K=>{E(!C),p&&p(K,!C)},[C,p,E]),[z,...P]=k.Children.toArray(r),R=k.useMemo(()=>({expanded:C,disabled:c,disableGutters:f,toggle:$}),[C,c,f,$]),L={...i,disabled:c,disableGutters:f,expanded:C},M=jX(L),B={transition:b,...m},_={transition:O,...v},A={slots:B,slotProps:_},[Q,T]=Ne("root",{elementType:NX,externalForwardedProps:{...A,...S},className:ye(M.root,s),shouldForwardComponentProp:!0,ownerState:L,ref:n}),[H,I]=Ne("heading",{elementType:QX,externalForwardedProps:A,className:M.heading,ownerState:L}),[V,N]=Ne("transition",{elementType:Ds,externalForwardedProps:A,ownerState:L}),[X,Y]=Ne("region",{elementType:_X,externalForwardedProps:A,ownerState:L,className:M.region,additionalProps:{"aria-labelledby":z.props.id,id:z.props["aria-controls"],role:"region"}});return x.jsxs(Q,{...T,children:[x.jsx(H,{...I,children:x.jsx(Sz.Provider,{value:R,children:z})}),x.jsx(V,{in:C,timeout:"auto",...N,children:x.jsx(X,{...Y,children:P})})]})});function IX(t){return He("MuiAccordionDetails",t)}Ue("MuiAccordionDetails",["root"]);const HX=t=>{const{classes:e}=t;return Ve({root:["root"]},IX,e)},UX=ge("div",{name:"MuiAccordionDetails",slot:"Root"})(Ke(({theme:t})=>({padding:t.spacing(1,2,2)}))),WX=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiAccordionDetails"}),{className:r,...s}=i,a=i,c=HX(a);return x.jsx(UX,{className:ye(c.root,r),ref:n,ownerState:a,...s})});function VX(t){return He("MuiAccordionSummary",t)}const Xa=Ue("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),XX=t=>{const{classes:e,expanded:n,disabled:i,disableGutters:r}=t;return Ve({root:["root",n&&"expanded",i&&"disabled",!r&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!r&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},VX,e)},GX=ge(Yo,{name:"MuiAccordionSummary",slot:"Root"})(Ke(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],e),[`&.${Xa.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Xa.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${Xa.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${Xa.expanded}`]:{minHeight:64}}}]}})),FX=ge("span",{name:"MuiAccordionSummary",slot:"Content"})(Ke(({theme:t})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${Xa.expanded}`]:{margin:"20px 0"}}}]}))),YX=ge("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper"})(Ke(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${Xa.expanded}`]:{transform:"rotate(180deg)"}}))),KX=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiAccordionSummary"}),{children:r,className:s,expandIcon:a,focusVisibleClassName:c,onClick:f,slots:h,slotProps:p,...m}=i,{disabled:v=!1,disableGutters:b,expanded:O,toggle:S}=k.useContext(Sz),C=A=>{S&&S(A),f&&f(A)},E={...i,expanded:O,disabled:v,disableGutters:b},$=XX(E),z={slots:h,slotProps:p},[P,R]=Ne("root",{ref:n,shouldForwardComponentProp:!0,className:ye($.root,s),elementType:GX,externalForwardedProps:{...z,...m},ownerState:E,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:v,"aria-expanded":O,focusVisibleClassName:ye($.focusVisible,c)},getSlotProps:A=>({...A,onClick:Q=>{A.onClick?.(Q),C(Q)}})}),[L,M]=Ne("content",{className:$.content,elementType:FX,externalForwardedProps:z,ownerState:E}),[B,_]=Ne("expandIconWrapper",{className:$.expandIconWrapper,elementType:YX,externalForwardedProps:z,ownerState:E});return x.jsxs(P,{...R,children:[x.jsx(L,{...M,children:r}),a&&x.jsx(B,{..._,children:a})]})});function ZX(t){return He("MuiAppBar",t)}Ue("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const JX=t=>{const{color:e,position:n,classes:i}=t,r={root:["root",`color${pe(e)}`,`position${pe(n)}`]};return Ve(r,ZX,i)},iA=(t,e)=>t?`${t?.replace(")","")}, ${e})`:e,eG=ge(Ac,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${pe(n.position)}`],e[`color${pe(n.color)}`]]}})(Ke(({theme:t})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[100],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[100]),...t.applyStyles("dark",{"--AppBar-background":t.vars?t.vars.palette.AppBar.defaultBg:t.palette.grey[900],"--AppBar-color":t.vars?t.vars.palette.text.primary:t.palette.getContrastText(t.palette.grey[900])})}},...Object.entries(t.palette).filter(xr(["contrastText"])).map(([e])=>({props:{color:e},style:{"--AppBar-background":(t.vars??t).palette[e].main,"--AppBar-color":(t.vars??t).palette[e].contrastText}})),{props:e=>e.enableColorOnDark===!0&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>e.enableColorOnDark===!1&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...t.applyStyles("dark",{backgroundColor:t.vars?iA(t.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:t.vars?iA(t.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...t.applyStyles("dark",{backgroundImage:"none"})}}]}))),tG=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiAppBar"}),{className:r,color:s="primary",enableColorOnDark:a=!1,position:c="fixed",...f}=i,h={...i,color:s,position:c,enableColorOnDark:a},p=JX(h);return x.jsx(eG,{square:!0,component:"header",ownerState:h,elevation:4,className:ye(p.root,r,c==="fixed"&&"mui-fixed"),ref:n,...f})}),nG={entering:{opacity:1},entered:{opacity:1}},iG=k.forwardRef(function(e,n){const i=Er(),r={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:c,easing:f,in:h,onEnter:p,onEntered:m,onEntering:v,onExit:b,onExited:O,onExiting:S,style:C,timeout:E=r,TransitionComponent:$=fr,...z}=e,P=k.useRef(null),R=mn(P,Vl(c),n),L=I=>V=>{if(I){const N=P.current;V===void 0?I(N):I(N,V)}},M=L(v),B=L((I,V)=>{yO(I);const N=Qs({style:C,timeout:E,easing:f},{mode:"enter"});I.style.webkitTransition=i.transitions.create("opacity",N),I.style.transition=i.transitions.create("opacity",N),p&&p(I,V)}),_=L(m),A=L(S),Q=L(I=>{const V=Qs({style:C,timeout:E,easing:f},{mode:"exit"});I.style.webkitTransition=i.transitions.create("opacity",V),I.style.transition=i.transitions.create("opacity",V),b&&b(I)}),T=L(O),H=I=>{s&&s(P.current,I)};return x.jsx($,{appear:a,in:h,nodeRef:P,onEnter:B,onEntered:_,onEntering:M,onExit:Q,onExited:T,onExiting:A,addEndListener:H,timeout:E,...z,children:(I,{ownerState:V,...N})=>k.cloneElement(c,{style:{opacity:0,visibility:I==="exited"&&!h?"hidden":void 0,...nG[I],...C,...c.props.style},ref:R,...N})})});function rG(t){return He("MuiBackdrop",t)}Ue("MuiBackdrop",["root","invisible"]);const oG=t=>{const{classes:e,invisible:n}=t;return Ve({root:["root",n&&"invisible"]},rG,e)},sG=ge("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),lG=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiBackdrop"}),{children:r,className:s,component:a="div",invisible:c=!1,open:f,components:h={},componentsProps:p={},slotProps:m={},slots:v={},TransitionComponent:b,transitionDuration:O,...S}=i,C={...i,component:a,invisible:c},E=oG(C),$={transition:b,root:h.Root,...v},z={...p,...m},P={component:a,slots:$,slotProps:z},[R,L]=Ne("root",{elementType:sG,externalForwardedProps:P,className:ye(E.root,s),ownerState:C}),[M,B]=Ne("transition",{elementType:iG,externalForwardedProps:P,ownerState:C});return x.jsx(M,{in:f,timeout:O,...S,...B,children:x.jsx(R,{"aria-hidden":!0,...L,ref:n,children:r})})});function aG(t){return He("MuiButton",t)}const gl=Ue("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),cG=k.createContext({}),uG=k.createContext(void 0),fG=t=>{const{color:e,disableElevation:n,fullWidth:i,size:r,variant:s,loading:a,loadingPosition:c,classes:f}=t,h={root:["root",a&&"loading",s,`${s}${pe(e)}`,`size${pe(r)}`,`${s}Size${pe(r)}`,`color${pe(e)}`,n&&"disableElevation",i&&"fullWidth",a&&`loadingPosition${pe(c)}`],startIcon:["icon","startIcon",`iconSize${pe(r)}`],endIcon:["icon","endIcon",`iconSize${pe(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},p=Ve(h,aG,f);return{...f,...p}},wz=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],dG=ge(Yo,{shouldForwardProp:t=>Ec(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${pe(n.color)}`],e[`size${pe(n.size)}`],e[`${n.variant}Size${pe(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(Ke(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${gl.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${gl.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${gl.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${gl.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(xr()).map(([i])=>({props:{color:i},style:{"--variant-textColor":(t.vars||t).palette[i].main,"--variant-outlinedColor":(t.vars||t).palette[i].main,"--variant-outlinedBorder":t.alpha((t.vars||t).palette[i].main,.5),"--variant-containedColor":(t.vars||t).palette[i].contrastText,"--variant-containedBg":(t.vars||t).palette[i].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[i].dark,"--variant-textBg":t.alpha((t.vars||t).palette[i].main,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[i].main,"--variant-outlinedBg":t.alpha((t.vars||t).palette[i].main,(t.vars||t).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity),"--variant-outlinedBg":t.alpha((t.vars||t).palette.text.primary,(t.vars||t).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${gl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${gl.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${gl.loading}`]:{color:"transparent"}}}]}})),hG=ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${pe(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...wz]})),pG=ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${pe(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...wz]})),mG=ge("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),rA=ge("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Cz=k.forwardRef(function(e,n){const i=k.useContext(cG),r=k.useContext(uG),s=Cf(i,e),a=qe({props:s,name:"MuiButton"}),{children:c,color:f="primary",component:h="button",className:p,disabled:m=!1,disableElevation:v=!1,disableFocusRipple:b=!1,endIcon:O,focusVisibleClassName:S,fullWidth:C=!1,id:E,loading:$=null,loadingIndicator:z,loadingPosition:P="center",size:R="medium",startIcon:L,type:M,variant:B="text",..._}=a,A=Gm(E),Q=z??x.jsx(hO,{"aria-labelledby":A,color:"inherit",size:16}),T={...a,color:f,component:h,disabled:m,disableElevation:v,disableFocusRipple:b,fullWidth:C,loading:$,loadingIndicator:Q,loadingPosition:P,size:R,type:M,variant:B},H=fG(T),I=(L||$&&P==="start")&&x.jsx(hG,{className:H.startIcon,ownerState:T,children:L||x.jsx(rA,{className:H.loadingIconPlaceholder,ownerState:T})}),V=(O||$&&P==="end")&&x.jsx(pG,{className:H.endIcon,ownerState:T,children:O||x.jsx(rA,{className:H.loadingIconPlaceholder,ownerState:T})}),N=r||"",X=typeof $=="boolean"?x.jsx("span",{className:H.loadingWrapper,style:{display:"contents"},children:$&&x.jsx(mG,{className:H.loadingIndicator,ownerState:T,children:Q})}):null;return x.jsxs(dG,{ownerState:T,className:ye(i.className,H.root,p,N),component:h,disabled:m||$,focusRipple:!b,focusVisibleClassName:ye(H.focusVisible,S),ref:n,type:M,id:$?A:E,..._,classes:H,children:[I,P!=="end"&&X,c,P==="end"&&X,V]})});function Tz(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}function gG(t){const e=Hn(t);return e.body===t?kr(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function vf(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function oA(t){return parseFloat(kr(t).getComputedStyle(t).paddingRight)||0}function yG(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(t.tagName),i=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||i}function sA(t,e,n,i,r){const s=[e,n,...i];[].forEach.call(t.children,a=>{const c=!s.includes(a),f=!yG(a);c&&f&&vf(a,r)})}function Yv(t,e){let n=-1;return t.some((i,r)=>e(i)?(n=r,!0):!1),n}function vG(t,e){const n=[],i=t.container;if(!e.disableScrollLock){if(gG(i)){const a=Tz(kr(i));n.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${oA(i)+a}px`;const c=Hn(i).querySelectorAll(".mui-fixed");[].forEach.call(c,f=>{n.push({value:f.style.paddingRight,property:"padding-right",el:f}),f.style.paddingRight=`${oA(f)+a}px`})}let s;if(i.parentNode instanceof DocumentFragment)s=Hn(i).body;else{const a=i.parentElement,c=kr(i);s=a?.nodeName==="HTML"&&c.getComputedStyle(a).overflowY==="scroll"?a:i}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:a,property:c})=>{s?a.style.setProperty(c,s):a.style.removeProperty(c)})}}function bG(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class OG{constructor(){this.modals=[],this.containers=[]}add(e,n){let i=this.modals.indexOf(e);if(i!==-1)return i;i=this.modals.length,this.modals.push(e),e.modalRef&&vf(e.modalRef,!1);const r=bG(n);sA(n,e.mount,e.modalRef,r,!0);const s=Yv(this.containers,a=>a.container===n);return s!==-1?(this.containers[s].modals.push(e),i):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:r}),i)}mount(e,n){const i=Yv(this.containers,s=>s.modals.includes(e)),r=this.containers[i];r.restore||(r.restore=vG(r,n))}remove(e,n=!0){const i=this.modals.indexOf(e);if(i===-1)return i;const r=Yv(this.containers,a=>a.modals.includes(e)),s=this.containers[r];if(s.modals.splice(s.modals.indexOf(e),1),this.modals.splice(i,1),s.modals.length===0)s.restore&&s.restore(),e.modalRef&&vf(e.modalRef,n),sA(s.container,e.mount,e.modalRef,s.hiddenSiblings,!1),this.containers.splice(r,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&vf(a.modalRef,!1)}return i}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function Ga(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e}const xG=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function SG(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function wG(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=i=>t.ownerDocument.querySelector(`input[type="radio"]${i}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function CG(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||wG(t))}function TG(t){const e=[],n=[];return Array.from(t.querySelectorAll(xG)).forEach((i,r)=>{const s=SG(i);s===-1||!CG(i)||(s===0?e.push(i):n.push({documentOrder:r,tabIndex:s,node:i}))}),n.sort((i,r)=>i.tabIndex===r.tabIndex?i.documentOrder-r.documentOrder:i.tabIndex-r.tabIndex).map(i=>i.node).concat(e)}function kG(){return!0}function EG(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:i=!1,disableRestoreFocus:r=!1,getTabbable:s=TG,isEnabled:a=kG,open:c}=t,f=k.useRef(!1),h=k.useRef(null),p=k.useRef(null),m=k.useRef(null),v=k.useRef(null),b=k.useRef(!1),O=k.useRef(null),S=mn(Vl(e),O),C=k.useRef(null);k.useEffect(()=>{!c||!O.current||(b.current=!n)},[n,c]),k.useEffect(()=>{if(!c||!O.current)return;const z=Hn(O.current),P=Ga(z);return O.current.contains(P)||(O.current.hasAttribute("tabIndex")||O.current.setAttribute("tabIndex","-1"),b.current&&O.current.focus()),()=>{r||(m.current&&m.current.focus&&(f.current=!0,m.current.focus()),m.current=null)}},[c]),k.useEffect(()=>{if(!c||!O.current)return;const z=Hn(O.current),P=M=>{if(C.current=M,i||!a()||M.key!=="Tab")return;Ga(z)===O.current&&M.shiftKey&&(f.current=!0,p.current&&p.current.focus())},R=()=>{const M=O.current;if(M===null)return;const B=Ga(z);if(!z.hasFocus()||!a()||f.current){f.current=!1;return}if(M.contains(B)||i&&B!==h.current&&B!==p.current)return;if(B!==v.current)v.current=null;else if(v.current!==null)return;if(!b.current)return;let _=[];if((B===h.current||B===p.current)&&(_=s(O.current)),_.length>0){const A=!!(C.current?.shiftKey&&C.current?.key==="Tab"),Q=_[0],T=_[_.length-1];typeof Q!="string"&&typeof T!="string"&&(A?T.focus():Q.focus())}else M.focus()};z.addEventListener("focusin",R),z.addEventListener("keydown",P,!0);const L=setInterval(()=>{const M=Ga(z);M&&M.tagName==="BODY"&&R()},50);return()=>{clearInterval(L),z.removeEventListener("focusin",R),z.removeEventListener("keydown",P,!0)}},[n,i,r,a,c,s]);const E=z=>{m.current===null&&(m.current=z.relatedTarget),b.current=!0,v.current=z.target;const P=e.props.onFocus;P&&P(z)},$=z=>{m.current===null&&(m.current=z.relatedTarget),b.current=!0};return x.jsxs(k.Fragment,{children:[x.jsx("div",{tabIndex:c?0:-1,onFocus:$,ref:h,"data-testid":"sentinelStart"}),k.cloneElement(e,{ref:S,onFocus:E}),x.jsx("div",{tabIndex:c?0:-1,onFocus:$,ref:p,"data-testid":"sentinelEnd"})]})}function AG(t){return typeof t=="function"?t():t}function RG(t){return t?t.props.hasOwnProperty("in"):!1}const lA=()=>{},fp=new OG;function MG(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:i=!1,closeAfterTransition:r=!1,onTransitionEnter:s,onTransitionExited:a,children:c,onClose:f,open:h,rootRef:p}=t,m=k.useRef({}),v=k.useRef(null),b=k.useRef(null),O=mn(b,p),[S,C]=k.useState(!h),E=RG(c);let $=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&($=!1);const z=()=>Hn(v.current),P=()=>(m.current.modalRef=b.current,m.current.mount=v.current,m.current),R=()=>{fp.mount(P(),{disableScrollLock:i}),b.current&&(b.current.scrollTop=0)},L=or(()=>{const V=AG(e)||z().body;fp.add(P(),V),b.current&&R()}),M=()=>fp.isTopModal(P()),B=or(V=>{v.current=V,V&&(h&&M()?R():b.current&&vf(b.current,$))}),_=k.useCallback(()=>{fp.remove(P(),$)},[$]);k.useEffect(()=>()=>{_()},[_]),k.useEffect(()=>{h?L():(!E||!r)&&_()},[h,_,E,r,L]);const A=V=>N=>{V.onKeyDown?.(N),!(N.key!=="Escape"||N.which===229||!M())&&(n||(N.stopPropagation(),f&&f(N,"escapeKeyDown")))},Q=V=>N=>{V.onClick?.(N),N.target===N.currentTarget&&f&&f(N,"backdropClick")};return{getRootProps:(V={})=>{const N=jM(t);delete N.onTransitionEnter,delete N.onTransitionExited;const X={...N,...V};return{role:"presentation",...X,onKeyDown:A(X),ref:O}},getBackdropProps:(V={})=>{const N=V;return{"aria-hidden":!0,...N,onClick:Q(N),open:h}},getTransitionProps:()=>{const V=()=>{C(!1),s&&s()},N=()=>{C(!0),a&&a(),r&&_()};return{onEnter:ZE(V,c?.props.onEnter??lA),onExited:ZE(N,c?.props.onExited??lA)}},rootRef:O,portalRef:B,isTopModal:M,exited:S,hasTransition:E}}function DG(t){return He("MuiModal",t)}Ue("MuiModal",["root","hidden","backdrop"]);const PG=t=>{const{open:e,exited:n,classes:i}=t;return Ve({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},DG,i)},zG=ge("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(Ke(({theme:t})=>({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),$G=ge(lG,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),kz=k.forwardRef(function(e,n){const i=qe({name:"MuiModal",props:e}),{BackdropComponent:r=$G,BackdropProps:s,classes:a,className:c,closeAfterTransition:f=!1,children:h,container:p,component:m,components:v={},componentsProps:b={},disableAutoFocus:O=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:C=!1,disablePortal:E=!1,disableRestoreFocus:$=!1,disableScrollLock:z=!1,hideBackdrop:P=!1,keepMounted:R=!1,onClose:L,onTransitionEnter:M,onTransitionExited:B,open:_,slotProps:A={},slots:Q={},theme:T,...H}=i,I={...i,closeAfterTransition:f,disableAutoFocus:O,disableEnforceFocus:S,disableEscapeKeyDown:C,disablePortal:E,disableRestoreFocus:$,disableScrollLock:z,hideBackdrop:P,keepMounted:R},{getRootProps:V,getBackdropProps:N,getTransitionProps:X,portalRef:Y,isTopModal:K,exited:le,hasTransition:q}=MG({...I,rootRef:n}),G={...I,exited:le},se=PG(G),ue={};if(h.props.tabIndex===void 0&&(ue.tabIndex="-1"),q){const{onEnter:ke,onExited:Me}=X();ue.onEnter=ke,ue.onExited=Me}const Z={slots:{root:v.Root,backdrop:v.Backdrop,...Q},slotProps:{...b,...A}},[ie,de]=Ne("root",{ref:n,elementType:zG,externalForwardedProps:{...Z,...H,component:m},getSlotProps:V,ownerState:G,className:ye(c,se?.root,!G.open&&G.exited&&se?.hidden)}),[Te,Ae]=Ne("backdrop",{ref:s?.ref,elementType:r,externalForwardedProps:Z,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:ke=>N({...ke,onClick:Me=>{ke?.onClick&&ke.onClick(Me)}}),className:ye(s?.className,se?.backdrop),ownerState:G});return!R&&!_&&(!q||le)?null:x.jsx(_M,{ref:Y,container:p,disablePortal:E,children:x.jsxs(ie,{...de,children:[!P&&r?x.jsx(Te,{...Ae}):null,x.jsx(EG,{disableEnforceFocus:S,disableAutoFocus:O,disableRestoreFocus:$,isEnabled:K,open:_,children:k.cloneElement(h,ue)})]})})});function BG(t,e,n){const i=e.getBoundingClientRect(),r=n&&n.getBoundingClientRect(),s=kr(e);let a;if(e.fakeTransform)a=e.fakeTransform;else{const h=s.getComputedStyle(e);a=h.getPropertyValue("-webkit-transform")||h.getPropertyValue("transform")}let c=0,f=0;if(a&&a!=="none"&&typeof a=="string"){const h=a.split("(")[1].split(")")[0].split(",");c=parseInt(h[4],10),f=parseInt(h[5],10)}return t==="left"?r?`translateX(${r.right+c-i.left}px)`:`translateX(${s.innerWidth+c-i.left}px)`:t==="right"?r?`translateX(-${i.right-r.left-c}px)`:`translateX(-${i.left+i.width-c}px)`:t==="up"?r?`translateY(${r.bottom+f-i.top}px)`:`translateY(${s.innerHeight+f-i.top}px)`:r?`translateY(-${i.top-r.top+i.height-f}px)`:`translateY(-${i.top+i.height-f}px)`}function LG(t){return typeof t=="function"?t():t}function dp(t,e,n){const i=LG(n),r=BG(t,e,i);r&&(e.style.webkitTransform=r,e.style.transform=r)}const jG=k.forwardRef(function(e,n){const i=Er(),r={enter:i.transitions.easing.easeOut,exit:i.transitions.easing.sharp},s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:f,container:h,direction:p="down",easing:m=r,in:v,onEnter:b,onEntered:O,onEntering:S,onExit:C,onExited:E,onExiting:$,style:z,timeout:P=s,TransitionComponent:R=fr,...L}=e,M=k.useRef(null),B=mn(Vl(f),M,n),_=Y=>K=>{Y&&(K===void 0?Y(M.current):Y(M.current,K))},A=_((Y,K)=>{dp(p,Y,h),yO(Y),b&&b(Y,K)}),Q=_((Y,K)=>{const le=Qs({timeout:P,style:z,easing:m},{mode:"enter"});Y.style.webkitTransition=i.transitions.create("-webkit-transform",{...le}),Y.style.transition=i.transitions.create("transform",{...le}),Y.style.webkitTransform="none",Y.style.transform="none",S&&S(Y,K)}),T=_(O),H=_($),I=_(Y=>{const K=Qs({timeout:P,style:z,easing:m},{mode:"exit"});Y.style.webkitTransition=i.transitions.create("-webkit-transform",K),Y.style.transition=i.transitions.create("transform",K),dp(p,Y,h),C&&C(Y)}),V=_(Y=>{Y.style.webkitTransition="",Y.style.transition="",E&&E(Y)}),N=Y=>{a&&a(M.current,Y)},X=k.useCallback(()=>{M.current&&dp(p,M.current,h)},[p,h]);return k.useEffect(()=>{if(v||p==="down"||p==="right")return;const Y=vg(()=>{M.current&&dp(p,M.current,h)}),K=kr(M.current);return K.addEventListener("resize",Y),()=>{Y.clear(),K.removeEventListener("resize",Y)}},[p,v,h]),k.useEffect(()=>{v||X()},[v,X]),x.jsx(R,{nodeRef:M,onEnter:A,onEntered:T,onEntering:Q,onExit:I,onExited:V,onExiting:H,addEndListener:N,appear:c,in:v,timeout:P,...L,children:(Y,{ownerState:K,...le})=>k.cloneElement(f,{ref:B,style:{visibility:Y==="exited"&&!v?"hidden":void 0,...z,...f.props.style},...le})})});function NG(t){return He("MuiDrawer",t)}Ue("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Ez=(t,e)=>{const{ownerState:n}=t;return[e.root,(n.variant==="permanent"||n.variant==="persistent")&&e.docked,e.modal]},QG=t=>{const{classes:e,anchor:n,variant:i}=t,r={root:["root",`anchor${pe(n)}`],docked:[(i==="permanent"||i==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${pe(n)}`,i!=="temporary"&&`paperAnchorDocked${pe(n)}`]};return Ve(r,NG,e)},_G=ge(kz,{name:"MuiDrawer",slot:"Root",overridesResolver:Ez})(Ke(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer}))),qG=ge("div",{shouldForwardProp:Ec,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ez})({flex:"0 0 auto"}),IG=ge(Ac,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`paperAnchor${pe(n.anchor)}`],n.variant!=="temporary"&&e[`paperAnchorDocked${pe(n.anchor)}`]]}})(Ke(({theme:t})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>e.anchor==="left"&&e.variant!=="temporary",style:{borderRight:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="top"&&e.variant!=="temporary",style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="right"&&e.variant!=="temporary",style:{borderLeft:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>e.anchor==="bottom"&&e.variant!=="temporary",style:{borderTop:`1px solid ${(t.vars||t).palette.divider}`}}]}))),Az={left:"right",right:"left",top:"down",bottom:"up"};function HG(t){return["left","right"].includes(t)}function UG({direction:t},e){return t==="rtl"&&HG(e)?Az[e]:e}const WG=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiDrawer"}),r=Er(),s=Tc(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:c="left",BackdropProps:f,children:h,className:p,elevation:m=16,hideBackdrop:v=!1,ModalProps:{BackdropProps:b,...O}={},onClose:S,open:C=!1,PaperProps:E={},SlideProps:$,TransitionComponent:z,transitionDuration:P=a,variant:R="temporary",slots:L={},slotProps:M={},...B}=i,_=k.useRef(!1);k.useEffect(()=>{_.current=!0},[]);const A=UG({direction:s?"rtl":"ltr"},c),T={...i,anchor:c,elevation:m,open:C,variant:R,...B},H=QG(T),I={slots:{transition:z,...L},slotProps:{paper:E,transition:$,...M,backdrop:vz(M.backdrop||{...f,...b},{transitionDuration:P})}},[V,N]=Ne("root",{ref:n,elementType:_G,className:ye(H.root,H.modal,p),shouldForwardComponentProp:!0,ownerState:T,externalForwardedProps:{...I,...B,...O},additionalProps:{open:C,onClose:S,hideBackdrop:v,slots:{backdrop:I.slots.backdrop},slotProps:{backdrop:I.slotProps.backdrop}}}),[X,Y]=Ne("paper",{elementType:IG,shouldForwardComponentProp:!0,className:ye(H.paper,E.className),ownerState:T,externalForwardedProps:I,additionalProps:{elevation:R==="temporary"?m:0,square:!0,...R==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[K,le]=Ne("docked",{elementType:qG,ref:n,className:ye(H.root,H.docked,p),ownerState:T,externalForwardedProps:I,additionalProps:B}),[q,G]=Ne("transition",{elementType:jG,ownerState:T,externalForwardedProps:I,additionalProps:{in:C,direction:Az[A],timeout:P,appear:_.current}}),se=x.jsx(X,{...Y,children:h});if(R==="permanent")return x.jsx(K,{...le,children:se});const ue=x.jsx(q,{...G,children:se});return R==="persistent"?x.jsx(K,{...le,children:ue}):x.jsx(V,{...N,children:ue})}),VG=AN({createStyledComponent:ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.container&&e.container]}}),componentName:"MuiGrid",useThemeProps:t=>qe({props:t,name:"MuiGrid"}),useTheme:Er});function XG(t){return He("MuiLink",t)}const GG=Ue("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),FG=({theme:t,ownerState:e})=>{const n=e.color;if("colorSpace"in t&&t.colorSpace){const s=Xr(t,`palette.${n}.main`)||Xr(t,`palette.${n}`)||e.color;return t.alpha(s,.4)}const i=Xr(t,`palette.${n}.main`,!1)||Xr(t,`palette.${n}`,!1)||e.color,r=Xr(t,`palette.${n}.mainChannel`)||Xr(t,`palette.${n}Channel`);return"vars"in t&&r?`rgba(${r} / 0.4)`:Tf(i,.4)},aA={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},YG=t=>{const{classes:e,component:n,focusVisible:i,underline:r}=t,s={root:["root",`underline${pe(r)}`,n==="button"&&"button",i&&"focusVisible"]};return Ve(s,XG,e)},KG=ge(Ct,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${pe(n.underline)}`],n.component==="button"&&e.button]}})(Ke(({theme:t})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:n})=>e==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:e,ownerState:n})=>e==="always"&&n.color==="inherit",style:t.colorSpace?{textDecorationColor:t.alpha("currentColor",.4)}:null},...Object.entries(t.palette).filter(xr()).map(([e])=>({props:{underline:"always",color:e},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette[e].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":t.alpha((t.vars||t).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(t.vars||t).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${GG.focusVisible}`]:{outline:"auto"}}}]}))),kx=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiLink"}),r=Er(),{className:s,color:a="primary",component:c="a",onBlur:f,onFocus:h,TypographyClasses:p,underline:m="always",variant:v="inherit",sx:b,...O}=i,[S,C]=k.useState(!1),E=R=>{ac(R.target)||C(!1),f&&f(R)},$=R=>{ac(R.target)&&C(!0),h&&h(R)},z={...i,color:a,component:c,focusVisible:S,underline:m,variant:v},P=YG(z);return x.jsx(KG,{color:a,className:ye(P.root,s),classes:p,component:c,onBlur:E,onFocus:$,ref:n,ownerState:z,variant:v,...O,sx:[...aA[a]===void 0?[{color:a}]:[],...Array.isArray(b)?b:[b]],style:{...O.style,...m==="always"&&a!=="inherit"&&!aA[a]&&{"--Link-underlineColor":FG({theme:r,ownerState:z})}}})}),Cr=k.createContext({});function ZG(t){return He("MuiList",t)}Ue("MuiList",["root","padding","dense","subheader"]);const JG=t=>{const{classes:e,disablePadding:n,dense:i,subheader:r}=t;return Ve({root:["root",!n&&"padding",i&&"dense",r&&"subheader"]},ZG,e)},eF=ge("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>t.subheader,style:{paddingTop:0}}]}),Ex=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiList"}),{children:r,className:s,component:a="ul",dense:c=!1,disablePadding:f=!1,subheader:h,...p}=i,m=k.useMemo(()=>({dense:c}),[c]),v={...i,component:a,dense:c,disablePadding:f},b=JG(v);return x.jsx(Cr.Provider,{value:m,children:x.jsxs(eF,{as:a,className:ye(b.root,s),ref:n,ownerState:v,...p,children:[h,r]})})});function tF(t){return He("MuiListItem",t)}Ue("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function nF(t){return He("MuiListItemButton",t)}const Ha=Ue("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),iF=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},rF=t=>{const{alignItems:e,classes:n,dense:i,disabled:r,disableGutters:s,divider:a,selected:c}=t,h=Ve({root:["root",i&&"dense",!s&&"gutters",a&&"divider",r&&"disabled",e==="flex-start"&&"alignItemsFlexStart",c&&"selected"]},nF,n);return{...n,...h}},oF=ge(Yo,{shouldForwardProp:t=>Ec(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:iF})(Ke(({theme:t})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ha.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${Ha.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${Ha.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${Ha.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Ha.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),sF=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:s=!1,component:a="div",children:c,dense:f=!1,disableGutters:h=!1,divider:p=!1,focusVisibleClassName:m,selected:v=!1,className:b,...O}=i,S=k.useContext(Cr),C=k.useMemo(()=>({dense:f||S.dense||!1,alignItems:r,disableGutters:h}),[r,S.dense,f,h]),E=k.useRef(null);sr(()=>{s&&E.current&&E.current.focus()},[s]);const $={...i,alignItems:r,dense:C.dense,disableGutters:h,divider:p,selected:v},z=rF($),P=mn(E,n);return x.jsx(Cr.Provider,{value:C,children:x.jsx(oF,{ref:P,href:O.href||O.to,component:(O.href||O.to)&&a==="div"?"button":a,focusVisibleClassName:ye(z.focusVisible,m),ownerState:$,className:ye(z.root,b),...O,classes:z,children:c})})});function lF(t){return He("MuiListItemSecondaryAction",t)}Ue("MuiListItemSecondaryAction",["root","disableGutters"]);const aF=t=>{const{disableGutters:e,classes:n}=t;return Ve({root:["root",e&&"disableGutters"]},lF,n)},cF=ge("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),Rz=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...s}=i,a=k.useContext(Cr),c={...i,disableGutters:a.disableGutters},f=aF(c);return x.jsx(cF,{className:ye(f.root,r),ownerState:c,ref:n,...s})});Rz.muiName="ListItemSecondaryAction";const uF=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.hasSecondaryAction&&e.secondaryAction]},fF=t=>{const{alignItems:e,classes:n,dense:i,disableGutters:r,disablePadding:s,divider:a,hasSecondaryAction:c}=t;return Ve({root:["root",i&&"dense",!r&&"gutters",!s&&"padding",a&&"divider",e==="flex-start"&&"alignItemsFlexStart",c&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},tF,n)},dF=ge("div",{name:"MuiListItem",slot:"Root",overridesResolver:uF})(Ke(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${Ha.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),hF=ge("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),Mz=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiListItem"}),{alignItems:r="center",children:s,className:a,component:c,components:f={},componentsProps:h={},ContainerComponent:p="li",ContainerProps:{className:m,...v}={},dense:b=!1,disableGutters:O=!1,disablePadding:S=!1,divider:C=!1,secondaryAction:E,slotProps:$={},slots:z={},...P}=i,R=k.useContext(Cr),L=k.useMemo(()=>({dense:b||R.dense||!1,alignItems:r,disableGutters:O}),[r,R.dense,b,O]),M=k.useRef(null),B=k.Children.toArray(s),_=B.length&&fM(B[B.length-1],["ListItemSecondaryAction"]),A={...i,alignItems:r,dense:L.dense,disableGutters:O,disablePadding:S,divider:C,hasSecondaryAction:_},Q=fF(A),T=mn(M,n),H={slots:z,slotProps:$},[I,V]=Ne("secondaryAction",{elementType:Rz,externalForwardedProps:H,ownerState:A,className:Q.secondaryAction}),N=z.root||f.Root||dF,X=$.root||h.root||{},Y={className:ye(Q.root,X.className,a),...P};let K=c||"li";return _?(K=!Y.component&&!c?"div":K,p==="li"&&(K==="li"?K="div":Y.component==="li"&&(Y.component="div")),x.jsx(Cr.Provider,{value:L,children:x.jsxs(hF,{as:p,className:ye(Q.container,m),ref:T,ownerState:A,...v,children:[x.jsx(N,{...X,...!tm(N)&&{as:K,ownerState:{...A,...X.ownerState}},...Y,children:B}),B.pop()]})})):x.jsx(Cr.Provider,{value:L,children:x.jsxs(N,{...X,as:K,ref:T,...!tm(N)&&{ownerState:{...A,...X.ownerState}},...Y,children:[B,E&&x.jsx(I,{...V,children:E})]})})});function pF(t){return He("MuiListItemIcon",t)}const cA=Ue("MuiListItemIcon",["root","alignItemsFlexStart"]),mF=t=>{const{alignItems:e,classes:n}=t;return Ve({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},pF,n)},gF=ge("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(Ke(({theme:t})=>({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),yF=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiListItemIcon"}),{className:r,...s}=i,a=k.useContext(Cr),c={...i,alignItems:a.alignItems},f=mF(c);return x.jsx(gF,{className:ye(f.root,r),ownerState:c,ref:n,...s})});function vF(t){return He("MuiListItemText",t)}const Fa=Ue("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),bF=t=>{const{classes:e,inset:n,primary:i,secondary:r,dense:s}=t;return Ve({root:["root",n&&"inset",s&&"dense",i&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},vF,e)},OF=ge("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Fa.primary}`]:e.primary},{[`& .${Fa.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Mm.root}:where(& .${Fa.primary})`]:{display:"block"},[`.${Mm.root}:where(& .${Fa.secondary})`]:{display:"block"},variants:[{props:({ownerState:t})=>t.primary&&t.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:56}}]}),Dz=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiListItemText"}),{children:r,className:s,disableTypography:a=!1,inset:c=!1,primary:f,primaryTypographyProps:h,secondary:p,secondaryTypographyProps:m,slots:v={},slotProps:b={},...O}=i,{dense:S}=k.useContext(Cr);let C=f??r,E=p;const $={...i,disableTypography:a,inset:c,primary:!!C,secondary:!!E,dense:S},z=bF($),P={slots:v,slotProps:{primary:h,secondary:m,...b}},[R,L]=Ne("root",{className:ye(z.root,s),elementType:OF,externalForwardedProps:{...P,...O},ownerState:$,ref:n}),[M,B]=Ne("primary",{className:z.primary,elementType:Ct,externalForwardedProps:P,ownerState:$}),[_,A]=Ne("secondary",{className:z.secondary,elementType:Ct,externalForwardedProps:P,ownerState:$});return C!=null&&C.type!==Ct&&!a&&(C=x.jsx(M,{variant:S?"body2":"body1",component:B?.variant?void 0:"span",...B,children:C})),E!=null&&E.type!==Ct&&!a&&(E=x.jsx(_,{variant:"body2",color:"textSecondary",...A,children:E})),x.jsxs(R,{...L,children:[C,E]})});function Kv(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function uA(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function Pz(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.startsWith(e.keys.join(""))}function Qu(t,e,n,i,r,s){let a=!1,c=r(t,e,e?n:!1);for(;c;){if(c===t.firstChild){if(a)return!1;a=!0}const f=i?!1:c.disabled||c.getAttribute("aria-disabled")==="true";if(!c.hasAttribute("tabindex")||!Pz(c,s)||f)c=r(t,c,n);else return c.focus(),!0}return!1}const xF=k.forwardRef(function(e,n){const{actions:i,autoFocus:r=!1,autoFocusItem:s=!1,children:a,className:c,disabledItemsFocusable:f=!1,disableListWrap:h=!1,onKeyDown:p,variant:m="selectedMenu",...v}=e,b=k.useRef(null),O=k.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});sr(()=>{r&&b.current.focus()},[r]),k.useImperativeHandle(i,()=>({adjustStyleForScrollbar:(z,{direction:P})=>{const R=!b.current.style.width;if(z.clientHeight<b.current.clientHeight&&R){const L=`${Tz(kr(z))}px`;b.current.style[P==="rtl"?"paddingLeft":"paddingRight"]=L,b.current.style.width=`calc(100% + ${L})`}return b.current}}),[]);const S=z=>{const P=b.current,R=z.key;if(z.ctrlKey||z.metaKey||z.altKey){p&&p(z);return}const M=Ga(Hn(P));if(R==="ArrowDown")z.preventDefault(),Qu(P,M,h,f,Kv);else if(R==="ArrowUp")z.preventDefault(),Qu(P,M,h,f,uA);else if(R==="Home")z.preventDefault(),Qu(P,null,h,f,Kv);else if(R==="End")z.preventDefault(),Qu(P,null,h,f,uA);else if(R.length===1){const B=O.current,_=R.toLowerCase(),A=performance.now();B.keys.length>0&&(A-B.lastTime>500?(B.keys=[],B.repeating=!0,B.previousKeyMatched=!0):B.repeating&&_!==B.keys[0]&&(B.repeating=!1)),B.lastTime=A,B.keys.push(_);const Q=M&&!B.repeating&&Pz(M,B);B.previousKeyMatched&&(Q||Qu(P,M,!1,f,Kv,B))?z.preventDefault():B.previousKeyMatched=!1}p&&p(z)},C=mn(b,n);let E=-1;k.Children.forEach(a,(z,P)=>{if(!k.isValidElement(z)){E===P&&(E+=1,E>=a.length&&(E=-1));return}z.props.disabled||(m==="selectedMenu"&&z.props.selected||E===-1)&&(E=P),E===P&&(z.props.disabled||z.props.muiSkipListHighlight||z.type.muiSkipListHighlight)&&(E+=1,E>=a.length&&(E=-1))});const $=k.Children.map(a,(z,P)=>{if(P===E){const R={};return s&&(R.autoFocus=!0),z.props.tabIndex===void 0&&m==="selectedMenu"&&(R.tabIndex=0),k.cloneElement(z,R)}return z});return x.jsx(Ex,{role:"menu",ref:C,className:c,onKeyDown:S,tabIndex:r?0:-1,...v,children:$})});function SF(t){return He("MuiPopover",t)}Ue("MuiPopover",["root","paper"]);function fA(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function dA(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function hA(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function hp(t){return typeof t=="function"?t():t}const wF=t=>{const{classes:e}=t;return Ve({root:["root"],paper:["paper"]},SF,e)},CF=ge(kz,{name:"MuiPopover",slot:"Root"})({}),zz=ge(Ac,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),TF=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiPopover"}),{action:r,anchorEl:s,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:f="anchorEl",children:h,className:p,container:m,elevation:v=8,marginThreshold:b=16,open:O,PaperProps:S={},slots:C={},slotProps:E={},transformOrigin:$={vertical:"top",horizontal:"left"},TransitionComponent:z,transitionDuration:P="auto",TransitionProps:R={},disableScrollLock:L=!1,...M}=i,B=k.useRef(),_={...i,anchorOrigin:a,anchorReference:f,elevation:v,marginThreshold:b,transformOrigin:$,TransitionComponent:z,transitionDuration:P,TransitionProps:R},A=wF(_),Q=k.useCallback(()=>{if(f==="anchorPosition")return c;const ke=hp(s),Re=(ke&&ke.nodeType===1?ke:Hn(B.current).body).getBoundingClientRect();return{top:Re.top+fA(Re,a.vertical),left:Re.left+dA(Re,a.horizontal)}},[s,a.horizontal,a.vertical,c,f]),T=k.useCallback(ke=>({vertical:fA(ke,$.vertical),horizontal:dA(ke,$.horizontal)}),[$.horizontal,$.vertical]),H=k.useCallback(ke=>{const Me={width:ke.offsetWidth,height:ke.offsetHeight},Re=T(Me);if(f==="none")return{top:null,left:null,transformOrigin:hA(Re)};const vt=Q();let Be=vt.top-Re.vertical,Se=vt.left-Re.horizontal;const Xe=Be+Me.height,$e=Se+Me.width,je=kr(hp(s)),Ie=je.innerHeight-b,at=je.innerWidth-b;if(b!==null&&Be<b){const Ye=Be-b;Be-=Ye,Re.vertical+=Ye}else if(b!==null&&Xe>Ie){const Ye=Xe-Ie;Be-=Ye,Re.vertical+=Ye}if(b!==null&&Se<b){const Ye=Se-b;Se-=Ye,Re.horizontal+=Ye}else if($e>at){const Ye=$e-at;Se-=Ye,Re.horizontal+=Ye}return{top:`${Math.round(Be)}px`,left:`${Math.round(Se)}px`,transformOrigin:hA(Re)}},[s,f,Q,T,b]),[I,V]=k.useState(O),N=k.useCallback(()=>{const ke=B.current;if(!ke)return;const Me=H(ke);Me.top!==null&&ke.style.setProperty("top",Me.top),Me.left!==null&&(ke.style.left=Me.left),ke.style.transformOrigin=Me.transformOrigin,V(!0)},[H]);k.useEffect(()=>(L&&window.addEventListener("scroll",N),()=>window.removeEventListener("scroll",N)),[s,L,N]);const X=()=>{N()},Y=()=>{V(!1)};k.useEffect(()=>{O&&N()}),k.useImperativeHandle(r,()=>O?{updatePosition:()=>{N()}}:null,[O,N]),k.useEffect(()=>{if(!O)return;const ke=vg(()=>{N()}),Me=kr(hp(s));return Me.addEventListener("resize",ke),()=>{ke.clear(),Me.removeEventListener("resize",ke)}},[s,O,N]);let K=P;const le={slots:{transition:z,...C},slotProps:{transition:R,paper:S,...E}},[q,G]=Ne("transition",{elementType:Ef,externalForwardedProps:le,ownerState:_,getSlotProps:ke=>({...ke,onEntering:(Me,Re)=>{ke.onEntering?.(Me,Re),X()},onExited:Me=>{ke.onExited?.(Me),Y()}}),additionalProps:{appear:!0,in:O}});P==="auto"&&!q.muiSupportAuto&&(K=void 0);const se=m||(s?Hn(hp(s)).body:void 0),[ue,{slots:Z,slotProps:ie,...de}]=Ne("root",{ref:n,elementType:CF,externalForwardedProps:{...le,...M},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:C.backdrop},slotProps:{backdrop:vz(typeof E.backdrop=="function"?E.backdrop(_):E.backdrop,{invisible:!0})},container:se,open:O},ownerState:_,className:ye(A.root,p)}),[Te,Ae]=Ne("paper",{ref:B,className:A.paper,elementType:zz,externalForwardedProps:le,shouldForwardComponentProp:!0,additionalProps:{elevation:v,style:I?void 0:{opacity:0}},ownerState:_});return x.jsx(ue,{...de,...!tm(ue)&&{slots:Z,slotProps:ie,disableScrollLock:L},children:x.jsx(q,{...G,timeout:K,children:x.jsx(Te,{...Ae,children:h})})})});function kF(t){return He("MuiMenu",t)}Ue("MuiMenu",["root","paper","list"]);const EF={vertical:"top",horizontal:"right"},AF={vertical:"top",horizontal:"left"},RF=t=>{const{classes:e}=t;return Ve({root:["root"],paper:["paper"],list:["list"]},kF,e)},MF=ge(TF,{shouldForwardProp:t=>Ec(t)||t==="classes",name:"MuiMenu",slot:"Root"})({}),DF=ge(zz,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),PF=ge(xF,{name:"MuiMenu",slot:"List"})({outline:0}),zF=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiMenu"}),{autoFocus:r=!0,children:s,className:a,disableAutoFocusItem:c=!1,MenuListProps:f={},onClose:h,open:p,PaperProps:m={},PopoverClasses:v,transitionDuration:b="auto",TransitionProps:{onEntering:O,...S}={},variant:C="selectedMenu",slots:E={},slotProps:$={},...z}=i,P=Tc(),R={...i,autoFocus:r,disableAutoFocusItem:c,MenuListProps:f,onEntering:O,PaperProps:m,transitionDuration:b,TransitionProps:S,variant:C},L=RF(R),M=r&&!c&&p,B=k.useRef(null),_=(K,le)=>{B.current&&B.current.adjustStyleForScrollbar(K,{direction:P?"rtl":"ltr"}),O&&O(K,le)},A=K=>{K.key==="Tab"&&(K.preventDefault(),h&&h(K,"tabKeyDown"))};let Q=-1;k.Children.map(s,(K,le)=>{k.isValidElement(K)&&(K.props.disabled||(C==="selectedMenu"&&K.props.selected||Q===-1)&&(Q=le))});const T={slots:E,slotProps:{list:f,transition:S,paper:m,...$}},H=hc({elementType:E.root,externalSlotProps:$.root,ownerState:R,className:[L.root,a]}),[I,V]=Ne("paper",{className:L.paper,elementType:DF,externalForwardedProps:T,shouldForwardComponentProp:!0,ownerState:R}),[N,X]=Ne("list",{className:ye(L.list,f.className),elementType:PF,shouldForwardComponentProp:!0,externalForwardedProps:T,getSlotProps:K=>({...K,onKeyDown:le=>{A(le),K.onKeyDown?.(le)}}),ownerState:R}),Y=typeof T.slotProps.transition=="function"?T.slotProps.transition(R):T.slotProps.transition;return x.jsx(MF,{onClose:h,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?EF:AF,slots:{root:E.root,paper:I,backdrop:E.backdrop,...E.transition&&{transition:E.transition}},slotProps:{root:H,paper:V,backdrop:typeof $.backdrop=="function"?$.backdrop(R):$.backdrop,transition:{...Y,onEntering:(...K)=>{_(...K),Y?.onEntering?.(...K)}}},open:p,ref:n,transitionDuration:b,ownerState:R,...z,classes:v,children:x.jsx(N,{actions:B,autoFocus:r&&(Q===-1||c),autoFocusItem:M,variant:C,...X,children:s})})});function $F(t){return He("MuiMenuItem",t)}const _u=Ue("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),BF=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},LF=t=>{const{disabled:e,dense:n,divider:i,disableGutters:r,selected:s,classes:a}=t,f=Ve({root:["root",n&&"dense",e&&"disabled",!r&&"gutters",i&&"divider",s&&"selected"]},$F,a);return{...a,...f}},jF=ge(Yo,{shouldForwardProp:t=>Ec(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:BF})(Ke(({theme:t})=>({...t.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_u.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${_u.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${_u.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${_u.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${_u.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${eA.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${eA.inset}`]:{marginLeft:52},[`& .${Fa.root}`]:{marginTop:0,marginBottom:0},[`& .${Fa.inset}`]:{paddingLeft:36},[`& .${cA.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[t.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...t.typography.body2,[`& .${cA.root} svg`]:{fontSize:"1.25rem"}}}]}))),NF=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:s="li",dense:a=!1,divider:c=!1,disableGutters:f=!1,focusVisibleClassName:h,role:p="menuitem",tabIndex:m,className:v,...b}=i,O=k.useContext(Cr),S=k.useMemo(()=>({dense:a||O.dense||!1,disableGutters:f}),[O.dense,a,f]),C=k.useRef(null);sr(()=>{r&&C.current&&C.current.focus()},[r]);const E={...i,dense:S.dense,divider:c,disableGutters:f},$=LF(i),z=mn(C,n);let P;return i.disabled||(P=m!==void 0?m:-1),x.jsx(Cr.Provider,{value:S,children:x.jsx(jF,{ref:z,role:p,tabIndex:P,component:s,focusVisibleClassName:ye($.focusVisible,h),className:ye($.root,v),...b,ownerState:E,classes:$})})});function QF(t){return He("MuiTab",t)}const Gi=Ue("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),_F=t=>{const{classes:e,textColor:n,fullWidth:i,wrapped:r,icon:s,label:a,selected:c,disabled:f}=t,h={root:["root",s&&a&&"labelIcon",`textColor${pe(n)}`,i&&"fullWidth",r&&"wrapped",c&&"selected",f&&"disabled"],icon:["iconWrapper","icon"]};return Ve(h,QF,e)},qF=ge(Yo,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${pe(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${Gi.iconWrapper}`]:e.iconWrapper},{[`& .${Gi.icon}`]:e.icon}]}})(Ke(({theme:t})=>({...t.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition==="top"||e.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&e.iconPosition!=="top"&&e.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="top",style:{[`& > .${Gi.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="bottom",style:{[`& > .${Gi.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="start",style:{[`& > .${Gi.icon}`]:{marginRight:t.spacing(1)}}},{props:({ownerState:e,iconPosition:n})=>e.icon&&e.label&&n==="end",style:{[`& > .${Gi.icon}`]:{marginLeft:t.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Gi.selected}`]:{opacity:1},[`&.${Gi.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Gi.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${Gi.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(t.vars||t).palette.text.secondary,[`&.${Gi.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${Gi.disabled}`]:{color:(t.vars||t).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:t.typography.pxToRem(12)}}]}))),pp=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTab"}),{className:r,disabled:s=!1,disableFocusRipple:a=!1,fullWidth:c,icon:f,iconPosition:h="top",indicator:p,label:m,onChange:v,onClick:b,onFocus:O,selected:S,selectionFollowsFocus:C,textColor:E="inherit",value:$,wrapped:z=!1,...P}=i,R={...i,disabled:s,disableFocusRipple:a,selected:S,icon:!!f,iconPosition:h,label:!!m,fullWidth:c,textColor:E,wrapped:z},L=_F(R),M=f&&m&&k.isValidElement(f)?k.cloneElement(f,{className:ye(L.icon,f.props.className)}):f,B=A=>{!S&&v&&v(A,$),b&&b(A)},_=A=>{C&&!S&&v&&v(A,$),O&&O(A)};return x.jsxs(qF,{focusRipple:!a,className:ye(L.root,r),ref:n,role:"tab","aria-selected":S,disabled:s,onClick:B,onFocus:_,ownerState:R,tabIndex:S?0:-1,...P,children:[h==="top"||h==="start"?x.jsxs(k.Fragment,{children:[M,m]}):x.jsxs(k.Fragment,{children:[m,M]}),p]})}),$z=k.createContext();function IF(t){return He("MuiTable",t)}Ue("MuiTable",["root","stickyHeader"]);const HF=t=>{const{classes:e,stickyHeader:n}=t;return Ve({root:["root",n&&"stickyHeader"]},IF,e)},UF=ge("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(Ke(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),pA="table",N1=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTable"}),{className:r,component:s=pA,padding:a="normal",size:c="medium",stickyHeader:f=!1,...h}=i,p={...i,component:s,padding:a,size:c,stickyHeader:f},m=HF(p),v=k.useMemo(()=>({padding:a,size:c,stickyHeader:f}),[a,c,f]);return x.jsx($z.Provider,{value:v,children:x.jsx(UF,{as:s,role:s===pA?null:"table",ref:n,className:ye(m.root,r),ownerState:p,...h})})}),Og=k.createContext();function WF(t){return He("MuiTableBody",t)}Ue("MuiTableBody",["root"]);const VF=t=>{const{classes:e}=t;return Ve({root:["root"]},WF,e)},XF=ge("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),GF={variant:"body"},mA="tbody",Q1=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTableBody"}),{className:r,component:s=mA,...a}=i,c={...i,component:s},f=VF(c);return x.jsx(Og.Provider,{value:GF,children:x.jsx(XF,{className:ye(f.root,r),as:s,ref:n,role:s===mA?null:"rowgroup",ownerState:c,...a})})});function FF(t){return He("MuiTableCell",t)}const YF=Ue("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),KF=t=>{const{classes:e,variant:n,align:i,padding:r,size:s,stickyHeader:a}=t,c={root:["root",n,a&&"stickyHeader",i!=="inherit"&&`align${pe(i)}`,r!=="normal"&&`padding${pe(r)}`,`size${pe(s)}`]};return Ve(c,FF,e)},ZF=ge("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${pe(n.size)}`],n.padding!=="normal"&&e[`padding${pe(n.padding)}`],n.align!=="inherit"&&e[`align${pe(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(Ke(({theme:t})=>({...t.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid
162
+ ${t.palette.mode==="light"?t.lighten(t.alpha(t.palette.divider,1),.88):t.darken(t.alpha(t.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(t.vars||t).palette.text.primary}},{props:{variant:"footer"},style:{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${YF.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default}}]}))),Kt=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTableCell"}),{align:r="inherit",className:s,component:a,padding:c,scope:f,size:h,sortDirection:p,variant:m,...v}=i,b=k.useContext($z),O=k.useContext(Og),S=O&&O.variant==="head";let C;a?C=a:C=S?"th":"td";let E=f;C==="td"?E=void 0:!E&&S&&(E="col");const $=m||O&&O.variant,z={...i,align:r,component:C,padding:c||(b&&b.padding?b.padding:"normal"),size:h||(b&&b.size?b.size:"medium"),sortDirection:p,stickyHeader:$==="head"&&b&&b.stickyHeader,variant:$},P=KF(z);let R=null;return p&&(R=p==="asc"?"ascending":"descending"),x.jsx(ZF,{as:C,ref:n,className:ye(P.root,s),"aria-sort":R,scope:E,ownerState:z,...v})});function JF(t){return He("MuiTableHead",t)}Ue("MuiTableHead",["root"]);const eY=t=>{const{classes:e}=t;return Ve({root:["root"]},JF,e)},tY=ge("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),nY={variant:"head"},gA="thead",iY=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTableHead"}),{className:r,component:s=gA,...a}=i,c={...i,component:s},f=eY(c);return x.jsx(Og.Provider,{value:nY,children:x.jsx(tY,{as:s,className:ye(f.root,r),ref:n,role:s===gA?null:"rowgroup",ownerState:c,...a})})});function rY(t){return He("MuiToolbar",t)}Ue("MuiToolbar",["root","gutters","regular","dense"]);const oY=t=>{const{classes:e,disableGutters:n,variant:i}=t;return Ve({root:["root",!n&&"gutters",i]},rY,e)},sY=ge("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(Ke(({theme:t})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:t.mixins.toolbar}]}))),lY=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiToolbar"}),{className:r,component:s="div",disableGutters:a=!1,variant:c="regular",...f}=i,h={...i,component:s,disableGutters:a,variant:c},p=oY(h);return x.jsx(sY,{as:s,className:ye(p.root,r),ref:n,ownerState:h,...f})}),aY=ot(x.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),cY=ot(x.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function uY(t){return He("MuiTableRow",t)}const yA=Ue("MuiTableRow",["root","selected","hover","head","footer"]),fY=t=>{const{classes:e,selected:n,hover:i,head:r,footer:s}=t;return Ve({root:["root",n&&"selected",i&&"hover",r&&"head",s&&"footer"]},uY,e)},dY=ge("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(Ke(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${yA.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${yA.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),vA="tr",Yi=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTableRow"}),{className:r,component:s=vA,hover:a=!1,selected:c=!1,...f}=i,h=k.useContext(Og),p={...i,component:s,hover:a,selected:c,head:h&&h.variant==="head",footer:h&&h.variant==="footer"},m=fY(p);return x.jsx(dY,{as:s,ref:n,className:ye(m.root,r),role:s===vA?null:"row",ownerState:p,...f})});function hY(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function pY(t,e,n,i={},r=()=>{}){const{ease:s=hY,duration:a=300}=i;let c=null;const f=e[t];let h=!1;const p=()=>{h=!0},m=v=>{if(h){r(new Error("Animation cancelled"));return}c===null&&(c=v);const b=Math.min(1,(v-c)/a);if(e[t]=s(b)*(n-f)+f,b>=1){requestAnimationFrame(()=>{r(null)});return}requestAnimationFrame(m)};return f===n?(r(new Error("Element already at target position")),p):(requestAnimationFrame(m),p)}const mY={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function gY(t){const{onChange:e,...n}=t,i=k.useRef(),r=k.useRef(null),s=()=>{i.current=r.current.offsetHeight-r.current.clientHeight};return sr(()=>{const a=vg(()=>{const f=i.current;s(),f!==i.current&&e(i.current)}),c=kr(r.current);return c.addEventListener("resize",a),()=>{a.clear(),c.removeEventListener("resize",a)}},[e]),k.useEffect(()=>{s(),e(i.current)},[e]),x.jsx("div",{style:mY,...n,ref:r})}function yY(t){return He("MuiTabScrollButton",t)}const vY=Ue("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),bY=t=>{const{classes:e,orientation:n,disabled:i}=t;return Ve({root:["root",n,i&&"disabled"]},yY,e)},OY=ge(Yo,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${vY.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),xY=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTabScrollButton"}),{className:r,slots:s={},slotProps:a={},direction:c,orientation:f,disabled:h,...p}=i,m=Tc(),v={isRtl:m,...i},b=bY(v),O=s.StartScrollButtonIcon??aY,S=s.EndScrollButtonIcon??cY,C=hc({elementType:O,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v}),E=hc({elementType:S,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v});return x.jsx(OY,{component:"div",className:ye(b.root,r),ref:n,role:null,ownerState:v,tabIndex:null,...p,style:{...p.style,...f==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:c==="left"?x.jsx(O,{...C}):x.jsx(S,{...E})})});function SY(t){return He("MuiTabs",t)}const Zv=Ue("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),bA=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,OA=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,mp=(t,e,n)=>{let i=!1,r=n(t,e);for(;r;){if(r===t.firstChild){if(i)return;i=!0}const s=r.disabled||r.getAttribute("aria-disabled")==="true";if(!r.hasAttribute("tabindex")||s)r=n(t,r);else{r.focus();return}}},wY=t=>{const{vertical:e,fixed:n,hideScrollbar:i,scrollableX:r,scrollableY:s,centered:a,scrollButtonsHideMobile:c,classes:f}=t;return Ve({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",i&&"hideScrollbar",r&&"scrollableX",s&&"scrollableY"],list:["list","flexContainer",e&&"flexContainerVertical",e&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",c&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},SY,f)},CY=ge("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Zv.scrollButtons}`]:e.scrollButtons},{[`& .${Zv.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(Ke(({theme:t})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Zv.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}}]}))),TY=ge("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:t})=>t.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:t})=>t.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:t})=>t.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:t})=>t.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),kY=ge("div",{name:"MuiTabs",slot:"List",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.list,e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})({display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.centered,style:{justifyContent:"center"}}]}),EY=ge("span",{name:"MuiTabs",slot:"Indicator"})(Ke(({theme:t})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(t.vars||t).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(t.vars||t).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),AY=ge(gY)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),xA={},RY=k.forwardRef(function(e,n){const i=qe({props:e,name:"MuiTabs"}),r=Er(),s=Tc(),{"aria-label":a,"aria-labelledby":c,action:f,centered:h=!1,children:p,className:m,component:v="div",allowScrollButtonsMobile:b=!1,indicatorColor:O="primary",onChange:S,orientation:C="horizontal",ScrollButtonComponent:E,scrollButtons:$="auto",selectionFollowsFocus:z,slots:P={},slotProps:R={},TabIndicatorProps:L={},TabScrollButtonProps:M={},textColor:B="primary",value:_,variant:A="standard",visibleScrollbar:Q=!1,...T}=i,H=A==="scrollable",I=C==="vertical",V=I?"scrollTop":"scrollLeft",N=I?"top":"left",X=I?"bottom":"right",Y=I?"clientHeight":"clientWidth",K=I?"height":"width",le={...i,component:v,allowScrollButtonsMobile:b,indicatorColor:O,orientation:C,vertical:I,scrollButtons:$,textColor:B,variant:A,visibleScrollbar:Q,fixed:!H,hideScrollbar:H&&!Q,scrollableX:H&&!I,scrollableY:H&&I,centered:h&&!H,scrollButtonsHideMobile:!b},q=wY(le),G=hc({elementType:P.StartScrollButtonIcon,externalSlotProps:R.startScrollButtonIcon,ownerState:le}),se=hc({elementType:P.EndScrollButtonIcon,externalSlotProps:R.endScrollButtonIcon,ownerState:le}),[ue,Z]=k.useState(!1),[ie,de]=k.useState(xA),[Te,Ae]=k.useState(!1),[ke,Me]=k.useState(!1),[Re,vt]=k.useState(!1),[Be,Se]=k.useState({overflow:"hidden",scrollbarWidth:0}),Xe=new Map,$e=k.useRef(null),je=k.useRef(null),Ie={slots:P,slotProps:{indicator:L,scrollButtons:M,...R}},at=()=>{const Oe=$e.current;let Pe;if(Oe){const ct=Oe.getBoundingClientRect();Pe={clientWidth:Oe.clientWidth,scrollLeft:Oe.scrollLeft,scrollTop:Oe.scrollTop,scrollWidth:Oe.scrollWidth,top:ct.top,bottom:ct.bottom,left:ct.left,right:ct.right}}let dt;if(Oe&&_!==!1){const ct=je.current.children;if(ct.length>0){const Ht=ct[Xe.get(_)];dt=Ht?Ht.getBoundingClientRect():null}}return{tabsMeta:Pe,tabMeta:dt}},Ye=or(()=>{const{tabsMeta:Oe,tabMeta:Pe}=at();let dt=0,ct;I?(ct="top",Pe&&Oe&&(dt=Pe.top-Oe.top+Oe.scrollTop)):(ct=s?"right":"left",Pe&&Oe&&(dt=(s?-1:1)*(Pe[ct]-Oe[ct]+Oe.scrollLeft)));const Ht={[ct]:dt,[K]:Pe?Pe[K]:0};if(typeof ie[ct]!="number"||typeof ie[K]!="number")de(Ht);else{const ei=Math.abs(ie[ct]-Ht[ct]),mr=Math.abs(ie[K]-Ht[K]);(ei>=1||mr>=1)&&de(Ht)}}),Ee=(Oe,{animation:Pe=!0}={})=>{Pe?pY(V,$e.current,Oe,{duration:r.transitions.duration.standard}):$e.current[V]=Oe},$i=Oe=>{let Pe=$e.current[V];I?Pe+=Oe:Pe+=Oe*(s?-1:1),Ee(Pe)},Lt=()=>{const Oe=$e.current[Y];let Pe=0;const dt=Array.from(je.current.children);for(let ct=0;ct<dt.length;ct+=1){const Ht=dt[ct];if(Pe+Ht[Y]>Oe){ct===0&&(Pe=Oe);break}Pe+=Ht[Y]}return Pe},hr=()=>{$i(-1*Lt())},Wt=()=>{$i(Lt())},[ut,{onChange:jt,...on}]=Ne("scrollbar",{className:ye(q.scrollableX,q.hideScrollbar),elementType:AY,shouldForwardComponentProp:!0,externalForwardedProps:Ie,ownerState:le}),Bi=k.useCallback(Oe=>{jt?.(Oe),Se({overflow:null,scrollbarWidth:Oe})},[jt]),[wn,Pr]=Ne("scrollButtons",{className:ye(q.scrollButtons,M.className),elementType:xY,externalForwardedProps:Ie,ownerState:le,additionalProps:{orientation:C,slots:{StartScrollButtonIcon:P.startScrollButtonIcon||P.StartScrollButtonIcon,EndScrollButtonIcon:P.endScrollButtonIcon||P.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:G,endScrollButtonIcon:se}}}),Wn=()=>{const Oe={};Oe.scrollbarSizeListener=H?x.jsx(ut,{...on,onChange:Bi}):null;const dt=H&&($==="auto"&&(Te||ke)||$===!0);return Oe.scrollButtonStart=dt?x.jsx(wn,{direction:s?"right":"left",onClick:hr,disabled:!Te,...Pr}):null,Oe.scrollButtonEnd=dt?x.jsx(wn,{direction:s?"left":"right",onClick:Wt,disabled:!ke,...Pr}):null,Oe},Vt=or(Oe=>{const{tabsMeta:Pe,tabMeta:dt}=at();if(!(!dt||!Pe)){if(dt[N]<Pe[N]){const ct=Pe[V]+(dt[N]-Pe[N]);Ee(ct,{animation:Oe})}else if(dt[X]>Pe[X]){const ct=Pe[V]+(dt[X]-Pe[X]);Ee(ct,{animation:Oe})}}}),Vn=or(()=>{H&&$!==!1&&vt(!Re)});k.useEffect(()=>{const Oe=vg(()=>{$e.current&&Ye()});let Pe;const dt=ei=>{ei.forEach(mr=>{mr.removedNodes.forEach(ts=>{Pe?.unobserve(ts)}),mr.addedNodes.forEach(ts=>{Pe?.observe(ts)})}),Oe(),Vn()},ct=kr($e.current);ct.addEventListener("resize",Oe);let Ht;return typeof ResizeObserver<"u"&&(Pe=new ResizeObserver(Oe),Array.from(je.current.children).forEach(ei=>{Pe.observe(ei)})),typeof MutationObserver<"u"&&(Ht=new MutationObserver(dt),Ht.observe(je.current,{childList:!0})),()=>{Oe.clear(),ct.removeEventListener("resize",Oe),Ht?.disconnect(),Pe?.disconnect()}},[Ye,Vn]),k.useEffect(()=>{const Oe=Array.from(je.current.children),Pe=Oe.length;if(typeof IntersectionObserver<"u"&&Pe>0&&H&&$!==!1){const dt=Oe[0],ct=Oe[Pe-1],Ht={root:$e.current,threshold:.99},ei=Li=>{Ae(!Li[0].isIntersecting)},mr=new IntersectionObserver(ei,Ht);mr.observe(dt);const ts=Li=>{Me(!Li[0].isIntersecting)},Bc=new IntersectionObserver(ts,Ht);return Bc.observe(ct),()=>{mr.disconnect(),Bc.disconnect()}}},[H,$,Re,p?.length]),k.useEffect(()=>{Z(!0)},[]),k.useEffect(()=>{Ye()}),k.useEffect(()=>{Vt(xA!==ie)},[Vt,ie]),k.useImperativeHandle(f,()=>({updateIndicator:Ye,updateScrollButtons:Vn}),[Ye,Vn]);const[gn,zc]=Ne("indicator",{className:ye(q.indicator,L.className),elementType:EY,externalForwardedProps:Ie,ownerState:le,additionalProps:{style:ie}}),uo=x.jsx(gn,{...zc});let Ko=0;const Zo=k.Children.map(p,Oe=>{if(!k.isValidElement(Oe))return null;const Pe=Oe.props.value===void 0?Ko:Oe.props.value;Xe.set(Pe,Ko);const dt=Pe===_;return Ko+=1,k.cloneElement(Oe,{fullWidth:A==="fullWidth",indicator:dt&&!ue&&uo,selected:dt,selectionFollowsFocus:z,onChange:S,textColor:B,value:Pe,...Ko===1&&_===!1&&!Oe.props.tabIndex?{tabIndex:0}:{}})}),Jo=Oe=>{if(Oe.altKey||Oe.shiftKey||Oe.ctrlKey||Oe.metaKey)return;const Pe=je.current,dt=Ga(Hn(Pe));if(dt?.getAttribute("role")!=="tab")return;let Ht=C==="horizontal"?"ArrowLeft":"ArrowUp",ei=C==="horizontal"?"ArrowRight":"ArrowDown";switch(C==="horizontal"&&s&&(Ht="ArrowRight",ei="ArrowLeft"),Oe.key){case Ht:Oe.preventDefault(),mp(Pe,dt,OA);break;case ei:Oe.preventDefault(),mp(Pe,dt,bA);break;case"Home":Oe.preventDefault(),mp(Pe,null,bA);break;case"End":Oe.preventDefault(),mp(Pe,null,OA);break}},zr=Wn(),[pr,es]=Ne("root",{ref:n,className:ye(q.root,m),elementType:CY,externalForwardedProps:{...Ie,...T,component:v},ownerState:le}),[fo,$c]=Ne("scroller",{ref:$e,className:q.scroller,elementType:TY,externalForwardedProps:Ie,ownerState:le,additionalProps:{style:{overflow:Be.overflow,[I?`margin${s?"Left":"Right"}`:"marginBottom"]:Q?void 0:-Be.scrollbarWidth}}}),[Qe,Jn]=Ne("list",{ref:je,className:ye(q.list,q.flexContainer),elementType:kY,externalForwardedProps:Ie,ownerState:le,getSlotProps:Oe=>({...Oe,onKeyDown:Pe=>{Jo(Pe),Oe.onKeyDown?.(Pe)}})});return x.jsxs(pr,{...es,children:[zr.scrollButtonStart,zr.scrollbarSizeListener,x.jsxs(fo,{...$c,children:[x.jsx(Qe,{"aria-label":a,"aria-labelledby":c,"aria-orientation":C==="vertical"?"vertical":null,role:"tablist",...Jn,children:Zo}),ue&&uo]}),zr.scrollButtonEnd]})}),Jv={fontSize:"14px",fontFamily:"JetBrains Mono, Consolas, monospace",lineHeight:"1.6"},MY={borderLeftWidth:"2px"},Fi={insertedTextDecoration:"none",deletedTextDecoration:"line-through",insertedLinePadding:"1px 3px",borderRadious:"3px"},yl={border:"none",paddingRight:"8px",fontSize:"0.9em",fontWeight:"500",lineHeight:"1.78"},eb={border:"none",borderRadius:"4px",padding:"2px 10px"},DY={borderRadius:"2px"},tb={borderRadius:"2px"},nb={borderRadius:"4px",padding:"0 5px",margin:"0 2px"},ib={width:"12px",height:"12px",borderRadius:"6px"},gp={borderRadius:"4px",padding:"2px 6px"},Na={borderRadius:"4px",borderRadiusSelected:"3px",lineHeight:"1.3",padding:"4px 8px",paddingRight:"8px"},PY="#ffffff",Bz="#f5f5f5",ai="#212121",ki="#757575",rf="#9e9e9e",rb="#424242",zY="#eeeeee",ob="#fafafa",_1="#f44336",yp="#ff3e00",vp="#FF00E9FF",$Y="#ffc107",Ur="#ff9800",Io="#00acc1",bp="#3949ab",of="#8e24aa",Op="#43a047",SA="#00897b",wA="#1e88e5",$l=_1,BY="#00000008",qu=PY,Iu=Bz,LY="#DDEEFF",jY="#90a4ae26",CA=rf,NY="#DDEEFF80",QY=Io,TA=Ur,Lz=Io,_Y=of,kA="#ECEFF180",EA="#e6ffed80",AA="#ffebe980",sb="#28a745",lb="#d73a49",qY=he.theme({"&":{color:ai,backgroundColor:qu,fontSize:Jv.fontSize,fontFamily:Jv.fontFamily},".cm-content":{caretColor:CA,lineHeight:Jv.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:CA,borderLeftWidth:MY.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${ai}99`,color:qu},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:LY},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:"#FFA72680",outline:`1px solid ${$Y}`,color:ai,borderRadius:gp.borderRadius,"& span":{color:ai}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:Io,color:qu,padding:gp.padding,"& span":{color:qu}},".cm-search.cm-panel.cm-textfield":{color:ai,borderRadius:gp.borderRadius,padding:gp.padding},".cm-panels":{backgroundColor:zY,color:ai,borderRadius:"4px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${rf}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${rf}`},".cm-panel button":{backgroundColor:Iu,color:ai,border:eb.border,borderRadius:eb.borderRadius,padding:eb.padding},".cm-panel button:hover":{backgroundColor:"#CFD8DC"},".cm-activeLine":{backgroundColor:BY,borderRadius:DY.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:ob,color:ki,border:yl.border,borderRight:`1px solid ${rf}`,paddingRight:yl.paddingRight},".cm-activeLineGutter":{backgroundColor:"#E0E0E0",color:ai,fontWeight:yl.fontWeight},".cm-lineNumbers":{fontSize:yl.fontSize,lineHeight:yl.lineHeight},".cm-foldGutter":{fontSize:yl.fontSize,lineHeight:yl.lineHeight},".cm-foldGutter .cm-gutterElement":{color:ki,cursor:"pointer",transition:"color 0.15s ease"},".cm-foldGutter .cm-gutterElement:hover":{color:ai},".cm-insertedLine":{textDecoration:Fi.insertedTextDecoration,backgroundColor:EA,color:sb,padding:Fi.insertedLinePadding,borderRadius:Fi.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:Fi.insertedTextDecoration,backgroundColor:`${EA} !important`,color:sb,padding:Fi.insertedLinePadding,borderRadius:Fi.borderRadious,border:`1px solid ${sb}30`},"ins.cm-insertedLine .cm-changedText":{background:"transparent !important"},".cm-deletedLine":{textDecoration:Fi.deletedTextDecoration,backgroundColor:AA,color:lb,padding:Fi.insertedLinePadding,borderRadius:Fi.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:Fi.deletedTextDecoration,backgroundColor:`${AA} !important`,color:lb,padding:Fi.insertedLinePadding,borderRadius:Fi.borderRadious,border:`1px solid ${lb}30`},"del .cm-deletedText, del .cm-changedText":{background:"transparent !important"},".cm-tooltip":{backgroundColor:Iu,border:`1px solid ${rf}`,borderRadius:Na.borderRadius,padding:Na.padding,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Iu,border:"none"},"& > ul > li":{padding:Na.padding,lineHeight:Na.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:kA,color:ai,borderRadius:Na.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:kA},"& > ul > li > span.cm-completionIcon":{color:ki,paddingRight:Na.paddingRight},"& > ul > li > span.cm-completionDetail":{color:ki,fontStyle:"italic"}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Iu,borderBottomColor:Iu},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${$l}`},"&-warning":{borderLeft:`3px solid ${TA}`},"&-info":{borderLeft:`3px solid ${Lz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${$l}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${TA}`},".cm-matchingBracket":{backgroundColor:NY,outline:`1px solid ${QY}`,borderRadius:tb.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${$l}20`,outline:`1px solid ${$l}`,borderRadius:tb.borderRadius},".cm-selectionMatch":{backgroundColor:jY,outline:`1px solid ${ki}30`,borderRadius:tb.borderRadius},".cm-foldPlaceholder":{backgroundColor:Bz,color:ki,border:`1px dotted ${ki}70`,borderRadius:nb.borderRadius,padding:nb.padding,margin:nb.margin},"&.cm-focused":{outline:"none",boxShadow:`0 0 0 2px ${qu}, 0 0 0 3px ${Io}40`},"& .cm-scroller::-webkit-scrollbar":{width:ib.width,height:ib.height},"& .cm-scroller::-webkit-scrollbar-track":{background:ob},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:ki,borderRadius:ib.borderRadius,border:`3px solid ${ob}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:ai},".cm-ghostText":{opacity:"0.5",color:ki}},{dark:!1}),IY=Xl.define([{tag:j.keyword,color:Io,fontWeight:"bold"},{tag:j.controlKeyword,color:Io,fontWeight:"bold"},{tag:j.moduleKeyword,color:Io,fontWeight:"bold"},{tag:[j.name,j.deleted,j.character,j.macroName],color:rb},{tag:[j.variableName],color:rb},{tag:[j.propertyName],color:SA,fontStyle:"normal"},{tag:[j.typeName],color:Ur},{tag:[j.className],color:Ur,fontStyle:"italic"},{tag:[j.namespace],color:bp,fontStyle:"italic"},{tag:[j.operator,j.operatorKeyword],color:bp},{tag:[j.bracket],color:of},{tag:[j.brace],color:of},{tag:[j.punctuation],color:ki},{tag:[j.function(j.variableName)],color:yp},{tag:[j.labelName],color:wA,fontStyle:"italic"},{tag:[j.definition(j.function(j.variableName))],color:yp},{tag:[j.definition(j.variableName)],color:vp},{tag:j.number,color:Ur},{tag:j.changed,color:Ur},{tag:j.annotation,color:$l,fontStyle:"italic"},{tag:j.modifier,color:Ur,fontStyle:"italic"},{tag:j.self,color:Ur},{tag:[j.color,j.constant(j.name),j.standard(j.name)],color:Ur},{tag:[j.atom,j.bool],color:of},{tag:[j.processingInstruction,j.inserted],color:Op},{tag:j.string,color:Op},{tag:[j.special(j.string),j.regexp],color:vp},{tag:j.definition(j.typeName),color:vp,fontWeight:"bold"},{tag:[j.definition(j.name),j.separator],color:vp},{tag:j.meta,color:ki},{tag:j.comment,fontStyle:"italic",color:ki},{tag:j.docComment,fontStyle:"italic",color:ki},{tag:[j.tagName],color:yp},{tag:[j.attributeName],color:rb},{tag:[j.heading],fontWeight:"bold",color:SA},{tag:j.heading1,color:wA},{tag:j.heading2,color:Ur},{tag:j.heading3,color:Io},{tag:j.heading4,color:bp},{tag:j.heading5,color:of},{tag:j.heading6,color:Op},{tag:[j.strong],fontWeight:"bold",color:bp},{tag:[j.emphasis],fontStyle:"italic",color:Ur},{tag:[j.link],color:_Y,fontWeight:"500",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[j.url],color:Lz,textDecoration:"underline",textUnderlineOffset:"2px"},{tag:[j.invalid],color:ai,textDecoration:"underline wavy",borderBottom:`1px dotted ${_1}`},{tag:[j.strikethrough],color:$l,textDecoration:"line-through"},{tag:j.constant(j.name),color:yp},{tag:j.deleted,color:$l},{tag:j.squareBracket,color:_1},{tag:j.angleBracket,color:ai},{tag:j.monospace,color:ai},{tag:[j.contentSeparator],color:Io},{tag:j.quote,color:Op}]),q1=[qY,hd(IY)];function HY(t,e,n,i){if(t?.length>1e5){i(t,null,0,t.length);return}const r=e.parser.parse(t);let s=0;wD(r,(n=="dark"?Rm:q1)[1][2].value,(a,c,f)=>{a>s&&i(t.slice(s,a),null,s,a),i(t.slice(a,c),f,a,c),s=c}),s!==r.length&&i(t.slice(s,r.length),null,s,r.length)}const UY=vx().language,WY=ex.define(BX),dn=k.forwardRef(function({sx:e,value:n="",mode:i="python",onClick:r,noBreak:s,...a},c){const{colorScheme:f}=Km(),[h,p]=k.useState([[n,null,0]]);return k.useEffect(()=>{const m={python:UY,diff:WY}[i];!m||!n||(p([]),HY(n,m,f,(v,b,O)=>{s&&v.includes(`
163
+ `)&&(v=x.jsx(x.Fragment,{children:v.split(`
164
+ `).map((S,C,E)=>x.jsxs(Ri.Fragment,{children:[S,C<E.length-1?x.jsx(Ct,{component:"span",sx:{fontSize:"0.75em",pl:.25,pr:1,color:"info.main",verticalAlign:"bottom"},children:"⏎"}):null]},C))})),p(S=>[...S,[v,b,O]])}))},[i,n,f,s]),x.jsx(lt,{ref:c,component:"code",sx:[{fontFamily:'"Fira Code", monospace',whiteSpace:s?void 0:"pre-wrap",wordBreak:s||"break-all",overflowWrap:s||"break-word"},...Array.isArray(e)?e:[e]],onClick:r,...a,children:h.map(([m,v,b])=>x.jsx("span",{className:v,children:m},b))})}),sf=()=>Date.now().toString(36)+Math.random().toString(36).substr(2,5),VY=t=>{if(!t)return"";if(t<1e3)return`${t}ns`;if(t/=1e3,t<10)return`${t.toFixed(2)}μs`;if(t<100)return`${t.toFixed(1)}μs`;if(t<1e3)return`${t.toFixed(0)}μs`;if(t/=1e3,t<10)return`${t.toFixed(2)}ms`;if(t<100)return`${t.toFixed(1)}ms`;if(t<1e3)return`${t.toFixed(0)}ms`;if(t/=1e3,t<10)return`${t.toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;const e=s=>(s=s.toString(),s.length===1?`0${s}`:s);let n=Math.floor(t/60);const i=(t-60*n).toFixed(0);if(n<60)return`${n}m${e(i)}s`;const r=Math.floor(n/60);return n=(n-60*r).toFixed(0),`${r}h${e(n)}m${e(i)}s`},XY=t=>{if(!t)return;const{top:e,bottom:n}=t.getBoundingClientRect();e<0?t.scrollIntoView():n>window.innerHeight&&t.scrollIntoView(!1)};function GY({diff:t}){return x.jsx(dn,{value:t,mode:"diff"})}function FY({text:t}){return x.jsx(dn,{sx:e=>({color:e.vars.palette.error.main}),value:t,mode:"text"})}const YY=ot(x.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}));function wc({id:t,type:e="button",children:n,sx:i,...r}){const s=Xs(),a=k.useCallback(()=>{s(X$(sf(),t))},[s,t]),c=e==="chip"?bg:e==="icon"?xn:Cz;return x.jsx(c,{onClick:a,sx:[e==="button"?{minWidth:"auto",textTransform:"none",padding:0,backgroundColor:"rgba(0, 0, 0, 0.05)",display:"inline"}:{},...Array.isArray(i)?i:[i]],component:"a",color:"neutral",...r,children:n})}function KY({id:t,name:e,description:n,subtype:i,traceback:r,expanded:s,i:a,onChange:c}){const f=k.useCallback(()=>{c(s?null:a)},[a,s,c]),h=i==="internal"?"warning.main":"error.main";return x.jsxs(qX,{expanded:s,onChange:f,elevation:0,disableGutters:!0,sx:{background:"transparent"},children:[x.jsx(KX,{expandIcon:x.jsx(Ff,{}),sx:{alignItems:"center",p:0,color:h},children:x.jsxs(VG,{container:!0,direction:"row",alignItems:"center",children:[x.jsx(wc,{id:t,type:"icon",sx:{pt:.6,color:h},children:x.jsx(YY,{})}),i!=="root"&&x.jsx(Ct,{color:"textSecondary",sx:{p:1,pb:.5},children:i==="internal"?"Internal kalong error:":i==="cause"?"Caused by":"Issued from"}),x.jsx(Ct,{variant:"h6",component:"span",children:x.jsx(dn,{value:e,mode:"text"})}),x.jsx(Ct,{variant:"subtitle1",component:"span",children:x.jsx(dn,{value:" ― ",mode:"text"})}),x.jsx(Ct,{component:"span",children:x.jsx(dn,{value:n,mode:"text"})})]})}),x.jsx(Yf,{}),x.jsx(WX,{sx:{p:0},children:x.jsx(Ex,{children:r.map((p,m)=>x.jsx(Mz,{divider:m!==r.length-1,children:x.jsx(Dz,{primary:x.jsxs(x.Fragment,{children:[x.jsxs(Ct,{display:"inline",color:"textSecondary",children:[" ","In"," "]}),x.jsx(Ct,{display:"inline",children:p.function}),x.jsxs(Ct,{display:"inline",color:"textSecondary",children:[" ","at line"," "]}),x.jsx(Ct,{display:"inline",children:p.lineNumber}),x.jsxs(Ct,{display:"inline",color:"textSecondary",children:[" ","of"," "]}),x.jsx(oo,{title:p.absoluteFilename,children:x.jsx(Ct,{display:"inline",children:p.filename})})]}),secondary:x.jsx(dn,{value:p.lineSource||"?"})})},p.key))})})]})}function ZY({causes:t,...e}){const[n,i]=k.useState(-1),r=[e,...t||[]];return x.jsx(x.Fragment,{children:r.map((s,a)=>x.jsx(KY,{i:a,expanded:n===a,onChange:i,...s},s.id))})}const JY=ot(x.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}));var ab={},cb,RA;function jz(){if(RA)return cb;RA=1;function t(e){if(e&&e.__esModule)return e;var n={};if(e!=null){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,i):{};r.get||r.set?Object.defineProperty(n,i,r):n[i]=e[i]}}return n.default=e,n}return cb=t,cb}var $o={},ub,MA;function eK(){if(MA)return ub;MA=1;function t(e){return e&&e.__esModule?e:{default:e}}return ub=t,ub}var xp,DA;function tK(){if(DA)return xp;DA=1;function t(){return xp=t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},t.apply(this,arguments)}return xp=t,xp}var fb,PA;function nK(){if(PA)return fb;PA=1;function t(e,n){if(e==null)return{};var i={},r=Object.keys(e),s,a;for(a=0;a<r.length;a++)s=r[a],!(n.indexOf(s)>=0)&&(i[s]=e[s]);return i}return fb=t,fb}var db,zA;function iK(){if(zA)return db;zA=1;var t=nK();function e(n,i){if(n==null)return{};var r=t(n,i),s,a;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);for(a=0;a<c.length;a++)s=c[a],!(i.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(r[s]=n[s])}return r}return db=e,db}var hb,$A;function rK(){if($A)return hb;$A=1;function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}return hb=t,hb}var pb,BA;function oK(){if(BA)return pb;BA=1;function t(n,i){for(var r=0;r<i.length;r++){var s=i[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(n,s.key,s)}}function e(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),n}return pb=e,pb}var Hu,LA;function sK(){if(LA)return Hu;LA=1;function t(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(r){return typeof r}:t=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t(n)}function e(n){return typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?Hu=e=function(r){return t(r)}:Hu=e=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":t(r)},e(n)}return Hu=e,Hu}var mb,jA;function lK(){if(jA)return mb;jA=1;function t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}return mb=t,mb}var gb,NA;function aK(){if(NA)return gb;NA=1;var t=sK(),e=lK();function n(i,r){return r&&(t(r)==="object"||typeof r=="function")?r:e(i)}return gb=n,gb}var Sp,QA;function cK(){if(QA)return Sp;QA=1;function t(e){return Sp=t=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},t(e)}return Sp=t,Sp}var wp,_A;function uK(){if(_A)return wp;_A=1;function t(e,n){return wp=t=Object.setPrototypeOf||function(r,s){return r.__proto__=s,r},t(e,n)}return wp=t,wp}var yb,qA;function fK(){if(qA)return yb;qA=1;var t=uK();function e(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),i&&t(n,i)}return yb=e,yb}var vb,IA;function Nz(){if(IA)return vb;IA=1;var t=function(){};return vb=t,vb}var bb={},Ob,HA;function xg(){if(HA)return Ob;HA=1;function t(e){return e&&e.__esModule?e:{default:e}}return Ob=t,Ob}var Uu={},UA;function dK(){if(UA)return Uu;UA=1;var t=xg();Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.default=void 0;var e=t(Vs());t(Nz());var n=function(s){s.index;var a=s.children;e.default.Children.count(a)},i=n;return Uu.default=i,Uu}var Cp={},Wu={},WA;function Qz(){if(WA)return Wu;WA=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.default=void 0;var t={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};return Wu.default=t,Wu}var VA;function hK(){if(VA)return Cp;VA=1;var t=xg();Object.defineProperty(Cp,"__esModule",{value:!0}),Cp.default=i;var e=t(Vs()),n=t(Qz());function i(r){var s=r.children,a=r.startIndex,c=r.startX,f=r.pageX,h=r.viewLength,p=r.resistance,m=e.default.Children.count(s)-1,v=a+(c-f)/h,b;return p?v<0?v=Math.exp(v*n.default.RESISTANCE_COEF)-1:v>m&&(v=m+1-Math.exp((m-v)*n.default.RESISTANCE_COEF)):v<0?(v=0,b=(v-a)*h+f):v>m&&(v=m,b=(v-a)*h+f),{index:v,startX:b}}return Cp}var Vu={},XA;function pK(){if(XA)return Vu;XA=1;var t=xg();Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.default=void 0;var e=t(Vs()),n=function(s,a){var c=!1,f=function(O){return O?O.key:"empty"};if(s.children.length&&a.children.length){var h=e.default.Children.map(s.children,f),p=h[s.index];if(p!=null){var m=e.default.Children.map(a.children,f),v=m[a.index];p===v&&(c=!0)}}return c},i=n;return Vu.default=i,Vu}var Xu={},GA;function mK(){if(GA)return Xu;GA=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.default=void 0;function t(n,i){var r=n%i;return r<0?r+i:r}var e=t;return Xu.default=e,Xu}var FA;function gK(){return FA||(FA=1,(function(t){var e=xg();Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"checkIndexBounds",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"computeIndex",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"constant",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"getDisplaySameSlide",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"mod",{enumerable:!0,get:function(){return a.default}});var n=e(dK()),i=e(hK()),r=e(Qz()),s=e(pK()),a=e(mK())})(bb)),bb}var YA;function yK(){if(YA)return $o;YA=1;var t=jz(),e=eK();Object.defineProperty($o,"__esModule",{value:!0}),$o.getDomTreeShapes=E,$o.findNativeHandler=z,$o.default=$o.SwipeableViewsContext=void 0;var n=e(tK()),i=e(iK()),r=e(rK()),s=e(oK()),a=e(aK()),c=e(cK()),f=e(fK()),h=t(Vs());e(yL()),e(Nz());var p=gK();function m(M,B,_,A){return M.addEventListener(B,_,A),{remove:function(){M.removeEventListener(B,_,A)}}}var v={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},b={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(B){return"translate(".concat(-B,"%, 0)")},"x-reverse":function(B){return"translate(".concat(B,"%, 0)")},y:function(B){return"translate(0, ".concat(-B,"%)")},"y-reverse":function(B){return"translate(0, ".concat(B,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function O(M,B){var _=B.duration,A=B.easeFunction,Q=B.delay;return"".concat(M," ").concat(_," ").concat(A," ").concat(Q)}function S(M,B){var _=b.rotationMatrix[B];return{pageX:_.x[0]*M.pageX+_.x[1]*M.pageY,pageY:_.y[0]*M.pageX+_.y[1]*M.pageY}}function C(M){return M.touches=[{pageX:M.pageX,pageY:M.pageY}],M}function E(M,B){for(var _=[];M&&M!==B&&M!==document.body&&!M.hasAttribute("data-swipeable");){var A=window.getComputedStyle(M);A.getPropertyValue("position")==="absolute"||A.getPropertyValue("overflow-x")==="hidden"?_=[]:(M.clientWidth>0&&M.scrollWidth>M.clientWidth||M.clientHeight>0&&M.scrollHeight>M.clientHeight)&&_.push({element:M,scrollWidth:M.scrollWidth,scrollHeight:M.scrollHeight,clientWidth:M.clientWidth,clientHeight:M.clientHeight,scrollLeft:M.scrollLeft,scrollTop:M.scrollTop}),M=M.parentNode}return _}var $=null;function z(M){var B=M.domTreeShapes,_=M.pageX,A=M.startX,Q=M.axis;return B.some(function(T){var H=_>=A;(Q==="x"||Q==="y")&&(H=!H);var I=Math.round(T[b.scrollPosition[Q]]),V=I>0,N=I+T[b.clientLength[Q]]<T[b.scrollLength[Q]];return H&&N||!H&&V?($=T.element,!0):!1})}var P=h.createContext();$o.SwipeableViewsContext=P;var R=(function(M){(0,f.default)(B,M);function B(_){var A;return(0,r.default)(this,B),A=(0,a.default)(this,(0,c.default)(B).call(this,_)),A.rootNode=null,A.containerNode=null,A.ignoreNextScrollEvents=!1,A.viewLength=0,A.startX=0,A.lastX=0,A.vx=0,A.startY=0,A.isSwiping=void 0,A.started=!1,A.startIndex=0,A.transitionListener=null,A.touchMoveListener=null,A.activeSlide=null,A.indexCurrent=null,A.firstRenderTimeout=null,A.setRootNode=function(Q){A.rootNode=Q},A.setContainerNode=function(Q){A.containerNode=Q},A.setActiveSlide=function(Q){A.activeSlide=Q,A.updateHeight()},A.handleSwipeStart=function(Q){var T=A.props.axis,H=S(Q.touches[0],T);A.viewLength=A.rootNode.getBoundingClientRect()[b.length[T]],A.startX=H.pageX,A.lastX=H.pageX,A.vx=0,A.startY=H.pageY,A.isSwiping=void 0,A.started=!0;var I=window.getComputedStyle(A.containerNode),V=I.getPropertyValue("-webkit-transform")||I.getPropertyValue("transform");if(V&&V!=="none"){var N=V.split("(")[1].split(")")[0].split(","),X=window.getComputedStyle(A.rootNode),Y=S({pageX:parseInt(N[4],10),pageY:parseInt(N[5],10)},T);A.startIndex=-Y.pageX/(A.viewLength-parseInt(X.paddingLeft,10)-parseInt(X.paddingRight,10))||0}},A.handleSwipeMove=function(Q){if(!A.started){A.handleTouchStart(Q);return}if(!($!==null&&$!==A.rootNode)){var T=A.props,H=T.axis,I=T.children,V=T.ignoreNativeScroll,N=T.onSwitching,X=T.resistance,Y=S(Q.touches[0],H);if(A.isSwiping===void 0){var K=Math.abs(Y.pageX-A.startX),le=Math.abs(Y.pageY-A.startY),q=K>le&&K>p.constant.UNCERTAINTY_THRESHOLD;if(!X&&(H==="y"||H==="y-reverse")&&(A.indexCurrent===0&&A.startX<Y.pageX||A.indexCurrent===h.Children.count(A.props.children)-1&&A.startX>Y.pageX)){A.isSwiping=!1;return}if(K>le&&Q.preventDefault(),q===!0||le>p.constant.UNCERTAINTY_THRESHOLD){A.isSwiping=q,A.startX=Y.pageX;return}}if(A.isSwiping===!0){Q.preventDefault(),A.vx=A.vx*.5+(Y.pageX-A.lastX)*.5,A.lastX=Y.pageX;var G=(0,p.computeIndex)({children:I,resistance:X,pageX:Y.pageX,startIndex:A.startIndex,startX:A.startX,viewLength:A.viewLength}),se=G.index,ue=G.startX;if($===null&&!V){var Z=E(Q.target,A.rootNode),ie=z({domTreeShapes:Z,startX:A.startX,pageX:Y.pageX,axis:H});if(ie)return}ue?A.startX=ue:$===null&&($=A.rootNode),A.setIndexCurrent(se);var de=function(){N&&N(se,"move")};(A.state.displaySameSlide||!A.state.isDragging)&&A.setState({displaySameSlide:!1,isDragging:!0},de),de()}}},A.handleSwipeEnd=function(){if($=null,!!A.started&&(A.started=!1,A.isSwiping===!0)){var Q=A.state.indexLatest,T=A.indexCurrent,H=Q-T,I;Math.abs(A.vx)>A.props.threshold?A.vx>0?I=Math.floor(T):I=Math.ceil(T):Math.abs(H)>A.props.hysteresis?I=H>0?Math.floor(T):Math.ceil(T):I=Q;var V=h.Children.count(A.props.children)-1;I<0?I=0:I>V&&(I=V),A.setIndexCurrent(I),A.setState({indexLatest:I,isDragging:!1},function(){A.props.onSwitching&&A.props.onSwitching(I,"end"),A.props.onChangeIndex&&I!==Q&&A.props.onChangeIndex(I,Q,{reason:"swipe"}),T===Q&&A.handleTransitionEnd()})}},A.handleTouchStart=function(Q){A.props.onTouchStart&&A.props.onTouchStart(Q),A.handleSwipeStart(Q)},A.handleTouchEnd=function(Q){A.props.onTouchEnd&&A.props.onTouchEnd(Q),A.handleSwipeEnd(Q)},A.handleMouseDown=function(Q){A.props.onMouseDown&&A.props.onMouseDown(Q),Q.persist(),A.handleSwipeStart(C(Q))},A.handleMouseUp=function(Q){A.props.onMouseUp&&A.props.onMouseUp(Q),A.handleSwipeEnd(C(Q))},A.handleMouseLeave=function(Q){A.props.onMouseLeave&&A.props.onMouseLeave(Q),A.started&&A.handleSwipeEnd(C(Q))},A.handleMouseMove=function(Q){A.props.onMouseMove&&A.props.onMouseMove(Q),A.started&&A.handleSwipeMove(C(Q))},A.handleScroll=function(Q){if(A.props.onScroll&&A.props.onScroll(Q),Q.target===A.rootNode){if(A.ignoreNextScrollEvents){A.ignoreNextScrollEvents=!1;return}var T=A.state.indexLatest,H=Math.ceil(Q.target.scrollLeft/Q.target.clientWidth)+T;A.ignoreNextScrollEvents=!0,Q.target.scrollLeft=0,A.props.onChangeIndex&&H!==T&&A.props.onChangeIndex(H,T,{reason:"focus"})}},A.updateHeight=function(){if(A.activeSlide!==null){var Q=A.activeSlide.children[0];Q!==void 0&&Q.offsetHeight!==void 0&&A.state.heightLatest!==Q.offsetHeight&&A.setState({heightLatest:Q.offsetHeight})}},A.state={indexLatest:_.index,isDragging:!1,renderOnlyActive:!_.disableLazyLoading,heightLatest:0,displaySameSlide:!0},A.setIndexCurrent(_.index),A}return(0,s.default)(B,[{key:"componentDidMount",value:function(){var A=this;this.transitionListener=m(this.containerNode,"transitionend",function(Q){Q.target===A.containerNode&&A.handleTransitionEnd()}),this.touchMoveListener=m(this.rootNode,"touchmove",function(Q){A.props.disabled||A.handleSwipeMove(Q)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){A.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(A){var Q=A.index;typeof Q=="number"&&Q!==this.props.index&&(this.setIndexCurrent(Q),this.setState({displaySameSlide:(0,p.getDisplaySameSlide)(this.props,A),indexLatest:Q}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var A=this;return{slideUpdateHeight:function(){A.updateHeight()}}}},{key:"setIndexCurrent",value:function(A){if(!this.props.animateTransitions&&this.indexCurrent!==A&&this.handleTransitionEnd(),this.indexCurrent=A,this.containerNode){var Q=this.props.axis,T=b.transform[Q](A*100);this.containerNode.style.WebkitTransform=T,this.containerNode.style.transform=T}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var A=this,Q=this.props;Q.action;var T=Q.animateHeight,H=Q.animateTransitions,I=Q.axis,V=Q.children,N=Q.containerStyle,X=Q.disabled;Q.disableLazyLoading;var Y=Q.enableMouseEvents;Q.hysteresis,Q.ignoreNativeScroll,Q.index,Q.onChangeIndex,Q.onSwitching,Q.onTransitionEnd,Q.resistance;var K=Q.slideStyle,le=Q.slideClassName,q=Q.springConfig,G=Q.style;Q.threshold;var se=(0,i.default)(Q,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),ue=this.state,Z=ue.displaySameSlide,ie=ue.heightLatest,de=ue.indexLatest,Te=ue.isDragging,Ae=ue.renderOnlyActive,ke=X?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},Me=!X&&Y?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{},Re=(0,n.default)({},v.slide,K),vt,Be;if(Te||!H||Z)vt="all 0s ease 0s",Be="all 0s ease 0s";else if(vt=O("transform",q),Be=O("-webkit-transform",q),ie!==0){var Se=", ".concat(O("height",q));vt+=Se,Be+=Se}var Xe={height:null,WebkitFlexDirection:b.flexDirection[I],flexDirection:b.flexDirection[I],WebkitTransition:Be,transition:vt};if(!Ae){var $e=b.transform[I](this.indexCurrent*100);Xe.WebkitTransform=$e,Xe.transform=$e}return T&&(Xe.height=ie),h.createElement(P.Provider,{value:this.getSwipeableViewsContext()},h.createElement("div",(0,n.default)({ref:this.setRootNode,style:(0,n.default)({},b.root[I],G)},se,ke,Me,{onScroll:this.handleScroll}),h.createElement("div",{ref:this.setContainerNode,style:(0,n.default)({},Xe,v.container,N),className:"react-swipeable-view-container"},h.Children.map(V,function(je,Ie){if(Ae&&Ie!==de)return null;var at,Ye=!0;return Ie===de&&(Ye=!1,T&&(at=A.setActiveSlide,Re.overflowY="hidden")),h.createElement("div",{ref:at,style:Re,className:le,"aria-hidden":Ye,"data-swipeable":"true"},je)}))))}}]),B})(h.Component);R.displayName="ReactSwipableView",R.propTypes={},R.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var L=R;return $o.default=L,$o}var KA;function vK(){return KA||(KA=1,(function(t){var e=jz();Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"SwipeableViewsContext",{enumerable:!0,get:function(){return n.SwipeableViewsContext}});var n=e(yK())})(ab)),ab}var bK=vK();const OK=W1(bK),ZA="1em",Tp="3px";function _z({cls:{id:t,name:e,bases:n},first:i,root:r}){return x.jsxs(lt,{sx:{display:"flex",alignItems:"center"},children:[!r&&x.jsxs(lt,{sx:{display:"flex",flexDirection:"column",width:ZA,alignSelf:"normal"},children:[x.jsx(lt,{sx:{flex:1,borderLeft:i?"none":`${Tp} solid black`,borderBottom:`${Tp} solid black`}}),x.jsx(lt,{sx:{flex:1,borderLeft:i?"none":`${Tp} solid black`}})]}),x.jsx(lt,{sx:{m:.5},children:x.jsx(wc,{id:t,type:"chip",label:e,color:["object","type"].includes(e)?void 0:"secondary"})}),!!n.length&&x.jsx(lt,{sx:{borderBottom:`${Tp} solid black`,width:ZA}}),x.jsx(lt,{sx:{display:"flex",flexDirection:"column"},children:n.map((s,a)=>x.jsx(_z,{cls:s,first:a===0,last:a===n.length-1},s.id))})]})}function Ax({id:t,value:e}){return x.jsx(wc,{id:t,children:x.jsx(dn,{value:e})})}function xK({attributes:t,doc:e,source:n,infos:i}){const[r,s]=k.useState(0),a=k.useCallback((c,f)=>s(f),[s]);return x.jsxs(lt,{children:[x.jsxs(RY,{value:r,onChange:a,indicatorColor:"secondary",textColor:"secondary",variant:"scrollable",scrollButtons:"auto",children:[x.jsx(pp,{label:"infos",value:0}),Object.entries(t).sort(()=>1).map(([c],f)=>x.jsx(pp,{label:c,value:f+1},c)),e&&x.jsx(pp,{label:"documentation",value:Object.keys(t).length+1}),n&&x.jsx(pp,{label:"source",value:Object.keys(t).length+2})]}),x.jsxs(OK,{axis:"x",index:r,onChangeIndex:s,children:[x.jsx(lt,{sx:{maxHeight:"400px"},children:x.jsx(N1,{children:x.jsxs(Q1,{children:[i.type?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Type"}),x.jsx(Kt,{children:x.jsx(bg,{label:i.type,sx:{m:.5}})})]}):null,i.bases?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Bases"}),x.jsx(Kt,{children:x.jsx(_z,{cls:i.bases,root:!0})})]}):null,i.mro?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"MRO"}),x.jsx(Kt,{children:i.mro.map(({id:c,type:f})=>x.jsx(wc,{id:c,type:"chip",label:f.trim(),sx:{m:.5},color:["object","type"].includes(f)?void 0:"secondary"},f))})]}):null,i.signature?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Signature"}),x.jsx(Kt,{children:x.jsx(dn,{value:i.signature})})]}):null,i.fqn?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Full Qualified Name"}),x.jsx(Kt,{children:i.fqn})]}):null,x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Identity"}),x.jsxs(Kt,{children:[i.id," (0x",i.id.toString(16),")"]})]}),i.online_doc?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Online documentation"}),x.jsx(Kt,{children:x.jsxs(kx,{href:i.online_doc,target:"_blank",rel:"noopener noreferrer",children:[i.fqn||i.type," ",x.jsx(JY,{fontSize:"small"})]})})]}):null,i.file?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Declared in file"}),x.jsxs(Kt,{children:[i.file,i.source_size?` (${i.source_size} lines)`:""]})]}):null,i.comments?x.jsxs(Yi,{children:[x.jsx(Kt,{sx:{wordBreak:"normal"},align:"right",children:"Comments"}),x.jsx(Kt,{children:x.jsx(dn,{value:i.comments,mode:"text"})})]}):null]})})}),Object.entries(t).map(([c,f])=>x.jsx(lt,{sx:{maxHeight:"400px"},children:x.jsx(N1,{children:x.jsx(Q1,{children:f.map(({key:h,value:p,id:m,signature:v})=>x.jsxs(Yi,{children:[x.jsxs(Kt,{sx:{wordBreak:"normal"},align:"right",children:[h,x.jsx(lt,{component:"span",sx:{color:"text.secondary"},children:v})]}),x.jsx(Kt,{children:x.jsx(Ax,{value:p,id:m})})]},h))})})},c)),x.jsx(lt,{sx:{p:3,fontSize:".7em",maxHeight:"400px"},children:x.jsx(dn,{value:e,mode:"text"})}),x.jsx(lt,{sx:{p:3,fontSize:".9em",maxHeight:"400px"},children:x.jsx(dn,{value:n})})]})]})}const SK=ot(x.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})),Rx=ot(x.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),qz=ot(x.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),wK=ot(x.jsx("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})),CK=ot(x.jsx("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}));function Iz({subtype:t,values:e,id:n,mapping:i}){const r=Math.max(Math.min(50,e.length/5),20),s=Math.min(e.length,r),[a,c]=k.useState(!0),[f,h]=k.useState(s),p=k.useCallback(()=>h(E=>Math.min(e.length,E+r)),[r,e.length]),m=k.useCallback(()=>h(E=>E===0?s:0),[s]),v=k.useCallback(()=>h(e.length),[e.length]),b=k.useCallback(()=>c(E=>!E),[]),O={list:"[",set:"{",tuple:"(",dict:"{"}[t]||`${t}(${i?"{":"["}`,S={list:"]",set:"}",tuple:")",dict:"}"}[t]||`${i?"}":"]"})`,C=e.slice(0,f);return x.jsxs(lt,{sx:{m:1,p:1,transition:"250ms ease-in-out box-shadow","&:hover":{boxShadow:"0 0 5px rgba(0, 0, 0, .125)"}},children:[!!e.length&&x.jsxs(Ct,{sx:{fontSize:"0.7em",fontStyle:"italic"},color:"textSecondary",component:"span",children:["(",e.length,")"," "]}),x.jsx(wc,{id:n,children:x.jsx(dn,{mode:"text",value:O})}),!!e.length&&x.jsx(xn,{onClick:m,sx:{p:.5},size:"large",children:f===0?x.jsx(CK,{sx:{fontSize:"16px"}}):x.jsx(wK,{sx:{fontSize:"16px"}})}),x.jsxs(lt,{component:"section",sx:{pl:a&&C.length>1?1:void 0,display:a&&C.length>1?void 0:"inline"},children:[C.map((E,$)=>x.jsxs(lt,{component:"span",sx:{whiteSpace:"pre"},children:[i?x.jsxs(x.Fragment,{children:[x.jsx(Xp,{...E.key}),x.jsx(dn,{mode:"text",value:": "}),x.jsx(Xp,{...E.value})]}):x.jsx(Xp,{...E}),$+1!==e.length&&x.jsx(dn,{mode:"text",value:", "}),a&&C.length>1&&x.jsx("br",{})]},`member-${n}-${$}`)),e.length>C.length&&x.jsxs(lt,{component:"span",sx:{whiteSpace:"pre"},children:[x.jsx(xn,{onClick:p,sx:{p:.5},size:"large",children:x.jsx(Rx,{sx:{fontSize:"16px"}})}),x.jsxs(Cz,{sx:{color:"text.secondary"},size:"small",component:"span",onClick:p,children:[e.length-C.length," more"]}),e.length>C.length+r&&x.jsx(xn,{onClick:v,sx:{p:.5},size:"large",children:x.jsx(qz,{sx:{fontSize:"16px"}})})]})]}),x.jsxs(wc,{id:n,children:[e.length===1&&O==="("&&x.jsx(dn,{mode:"text",value:","}),x.jsx(dn,{mode:"text",value:S})]}),C.length>1&&x.jsx(xn,{onClick:b,sx:{p:.5},size:"large",children:a?x.jsx(SK,{sx:{fontSize:"16px"}}):x.jsx(Ff,{sx:{fontSize:"16px"}})})]})}function TK(t){return x.jsx(Iz,{mapping:!0,...t})}function kK({text:t}){return x.jsx(dn,{value:t,mode:"text"})}function EK({value:t}){return t}function AK({columns:t,rows:e}){return x.jsxs(N1,{children:[x.jsx(iY,{children:x.jsx(Yi,{children:t.map(n=>x.jsx(Kt,{children:n},n))})}),x.jsx(Q1,{children:e.map((n,i)=>x.jsx(Yi,{children:t.map((r,s)=>x.jsx(Kt,{children:n[r].value?x.jsx(Ax,{value:n[r].value,id:n[r].id}):null},s))},i))})]})}const RK={out:kK,err:FY,obj:Ax,diff:GY,table:AK,inspect:xK,iterable:Iz,mapping:TK,exception:ZY,raw:EK};function Xp({type:t,...e}){const n=RK[t];return x.jsx(n,{...e})}const MK=k.memo(function({uid:e,answer:n,duration:i,prompt:r,command:s,frame:a,level:c,watching:f}){const h=Xs(),[p,m]=k.useState(!0),[v,b]=k.useState(!1),S=zt(B=>B.frames).find(({key:B})=>B===a),C=zt(B=>B.activeFrame),E=k.useCallback(()=>m(B=>!B),[]),$=k.useCallback(()=>b(B=>!B),[]),z=k.useCallback(()=>{navigator.clipboard?.writeText(r)},[r]),P=k.useCallback(()=>h(F$(e,f==="frame"?"all":f==="all"?null:"frame")),[h,e,f]),R=k.useCallback(()=>h(OR(e,r,s,C)),[C,s,h,r,e]),L=k.useCallback(()=>h(vR(a)),[h,a]),M=k.useCallback(()=>{h(SR(e))},[h,e]);return x.jsxs(Oz,{sx:{m:1,ml:1+c*4,display:"flex",flexDirection:"column",opacity:a===C?1:.75,filter:S?"none":"grayscale(50%)",transition:B=>B.transitions.create(["opacity","box-shadow"])},children:[x.jsx(xz,{sx:{".MuiCardHeader-content":{minWidth:0}},slotProps:{root:{sx:B=>({padding:B.spacing(2)})},title:{variant:"h5",noWrap:!0}},avatar:x.jsxs(x.Fragment,{children:[x.jsx(xn,{sx:B=>({transform:`rotate(${p?180:0}deg)`,marginLeft:"auto",transition:B.transitions.create("transform",{duration:B.transitions.duration.shortest})}),onClick:E,size:"small",children:x.jsx(Ff,{})}),s&&x.jsx(bg,{label:s})]}),title:x.jsx(oo,{title:r,children:x.jsx(dn,{sx:{p:.5},value:r,noBreak:!0})}),action:x.jsxs(x.Fragment,{children:[x.jsx(xn,{sx:B=>({transform:`rotate(${v?-90:90}deg)`,marginLeft:"auto",transition:B.transitions.create("transform")}),onClick:$,size:"small",children:x.jsx(Ff,{})}),x.jsx(Ds,{mountOnEnter:!0,unmountOnExit:!0,in:v,sx:{display:"inline-flex"},orientation:"horizontal",children:x.jsx(xn,{onClick:z,size:"small",children:x.jsx(_V,{})})}),S?x.jsx(Ds,{mountOnEnter:!0,unmountOnExit:!0,in:v,sx:{display:"inline-flex"},orientation:"horizontal",children:x.jsx(oo,{title:`${S.absoluteFilename}:${S.lineNumber}`,children:x.jsx(xn,{onClick:L,size:"small",children:x.jsx(qV,{})})})}):null,x.jsx(Ds,{mountOnEnter:!0,unmountOnExit:!0,in:v,sx:{display:"inline-flex"},orientation:"horizontal",children:x.jsx(xn,{onClick:R,size:"small",children:x.jsx(IV,{})})}),x.jsx(Ds,{mountOnEnter:!0,unmountOnExit:!0,in:v||f,sx:{display:"inline-flex"},orientation:"horizontal",children:x.jsx(xn,{onClick:P,size:"small",sx:{color:f==="all"?"warning.main":f==="frame"?"info.main":void 0},children:x.jsx(HV,{})})}),x.jsx(xn,{onClick:M,size:"large",children:x.jsx(bz,{})})]})}),!!(n&&n.length)&&x.jsxs(x.Fragment,{children:[x.jsx(Yf,{}),x.jsx(Ds,{in:p,timeout:"auto",unmountOnExit:!0,sx:{position:"relative","&::after":{content:'""',pointerEvents:"none",position:"absolute",top:0,left:"-100%",width:"300%",height:"100%"}},children:x.jsxs(YV,{sx:B=>({display:"flex",maxHeight:"50vh",overflow:"auto",padding:B.spacing(2),"&:last-child":{paddingBottom:B.spacing(3)}}),children:[x.jsx(Ct,{variant:"body1",sx:{minWidth:0,px:2,py:0,flex:1},component:"div",children:n.map((B,_)=>x.jsx(Xp,{...B},_))}),i?x.jsx(dn,{value:VY(i)}):null]})})]})]})});function DK(t,e){switch(e.type){case"search":return{...t,value:"",reverse:e.reverse,insensitive:e.insensitive,index:e.index};case"found":return{...t,value:e.value,notFound:!1,highlight:e.highlight,index:e.index};case"empty":return{...t,value:"",notFound:!1,highlight:null,index:0};case"not-found":return{...t,value:e.value,notFound:!0,highlight:null};case"reset":return{value:null,insensitive:!1,reverse:!1,notFound:!1,highlight:null,index:0};default:throw new Error}}const PK={value:null,reverse:!1,insensitive:!1,notFound:!1,highlight:null,index:0},Mx=(t,...e)=>{let n="",i="",r=!1;for(;t.i<t.str.length&&!(e.includes(t.str[t.i])&&!i&&!r);)i&&t.str[t.i]===i?i="":!i&&!r&&["'",'"'].includes(t.str[t.i])&&(i=t.str[t.i]),!r&&!i&&t.str[t.i]==="#"&&(r=!0),r&&t.str[t.i]===`
165
+ `&&(r=!1),t.str[t.i]==="\\"&&(r||(n+=t.str[t.i]),t.i++),r||(n+=t.str[t.i]),t.i++;return n},Hz=t=>{let e=[];if(t.str[t.i]==="("){let n=t.str[t.i];for(t.i++;t.i<t.str.length&&t.str[t.i]!==")";)if(t.str[t.i]==="(")e=[...e,...Hz(t)],n+=e.slice(-1)[0];else{const i=Mx(t,"(",",",")");n+=i,i.trim()&&e.push(i.trim()),t.str[t.i]===","&&(n+=t.str[t.i],t.i++)}t.str[t.i]===")"&&(n+=t.str[t.i],t.i++),e.push(n)}return e},zK=(t,e)=>{let n=[];const i={str:t,i:0};for(;i.i<i.str.length;)Mx(i,"("),n=[...n,...Hz(i)],i.i++;return n},JA=t=>{const e={str:t,i:0};return[Mx(e,"?").trim(),t.slice(e.i+1).trim()]},I1={h:"help",i:"inspect",d:"diff",t:"table",r:"recursive_debug"},H1="≏",U1="⌅";function $K(t,e){const n=(()=>{switch(e.type){case"new-value":return{...t,index:-1,value:e.value,transientValue:e.value,passive:!1};case"handle-up":return{...t,index:Math.min(t.index+1,e.history.length-1),value:e.history[Math.min(t.index+1,e.history.length-1)]||"",command:null,passive:!0};case"handle-down":return{...t,index:Math.max(t.index-1,-1),value:e.history[Math.max(t.index-1,-1)]||t.transientValue,command:null,passive:!0};case"jump":return{...t,index:e.index,value:e.value,command:null,passive:!0};case"toggle-command":return{...t,command:t.command===e.command?null:e.command};case"remove-command":return{...t,command:null};case"reset":return{index:-1,value:"",transientValue:"",command:null,passive:!0};default:throw new Error}})();if(n.value){const i=n.value.match(/^\?(\S+)(.*)/);if(i){const[,r,s]=i;Object.values(I1).includes(r)&&(n.value=s.trim(),n.command=r)}if(n.command==="diff"&&!n.value.includes(H1)){const[r,s]=JA(n.value);s&&(n.value=`${r} ${H1} ${s}`)}else if(n.command==="table"&&!n.value.includes(U1)){const[r,s]=JA(n.value);s&&(n.value=`${r} ${U1} ${s}`)}}return n}const BK={index:-1,value:"",transientValue:"",command:null,passive:!0},Dr=({title:t,children:e})=>x.jsx("kbd",{style:{display:"inline-block",padding:"0.2em 0.4em",fontSize:"0.85em",fontFamily:'"Fira Code", monospace',lineHeight:1.5,color:"#444",verticalAlign:"middle",backgroundColor:"#f7f7f9",border:"1px solid #ccc",borderRadius:"3px",boxShadow:"inset 0 -1px 0 #ccc"},title:t,children:e}),Gu=()=>x.jsx(Dr,{title:"Shift",children:"⇧"}),Qa=()=>x.jsx(Dr,{title:"Ctrl",children:"Ctrl"}),vl=()=>x.jsx(Dr,{title:"Alt",children:"Alt"}),LK=()=>x.jsx(Dr,{title:"Backspace",children:"⌫"}),eR=()=>x.jsx(Dr,{title:"ArrowUp",children:"↑"}),tR=()=>x.jsx(Dr,{title:"ArrowDown",children:"↓"}),jK=()=>x.jsx(Dr,{title:"PageUp",children:"⇞"}),NK=()=>x.jsx(Dr,{title:"PageDown",children:"⇟"}),QK=()=>x.jsx(Dr,{title:"Space",children:"⎵"}),_K=()=>x.jsx(Dr,{title:"Tab",children:"⭾"}),Ir=({chr:t})=>x.jsx(Dr,{title:t,children:t}),Gn=({children:t})=>x.jsx(lt,{component:"code",sx:e=>({fontFamily:'"Fira Code", monospace',display:"inline-block",padding:"0.2em 0.4em",lineHeight:1.5,color:e.vars.palette.text.primary,verticalAlign:"middle",whiteSpace:"nowrap"}),children:t}),xb=({children:t})=>x.jsx("div",{style:{display:"flex",flexDirection:"column",marginLeft:"1em"},children:t}),vn=({shortcut:t,children:e})=>x.jsxs(lt,{sx:n=>({display:"flex",margin:"0.25em",padding:"0.5em",alignItems:"center",justifyContent:"space-between",background:n.vars.palette.background.paper}),children:[x.jsx("div",{style:{display:"flex",flexDirection:"column"},children:t}),x.jsx("div",{style:{fontSize:"1.2em",marginLeft:"1em",textAlign:"right"},children:e})]}),bn=({children:t})=>x.jsx("div",{style:{whiteSpace:"nowrap"},children:t});function qK(){return x.jsxs("aside",{style:{paddingBottom:"16px",fontSize:".9em"},children:[x.jsxs("h2",{children:["Welcome to Kalong v",Uz]}),x.jsx("p",{children:x.jsx("strong",{children:"Keyboard shortcuts"})}),x.jsxs(xb,{children:[x.jsx(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsx(bn,{children:x.jsx(eR,{})}),x.jsx(bn,{children:x.jsx(tR,{})})]}),children:"Scroll through history"}),x.jsx(vn,{shortcut:x.jsxs(bn,{children:[x.jsx(Gu,{})," + ",x.jsx(LK,{})]}),children:"Remove last answer"}),x.jsx(vn,{shortcut:x.jsx(bn,{children:x.jsx(_K,{})}),children:"Indent or complete"}),x.jsx(vn,{shortcut:x.jsxs(bn,{children:[x.jsx(Qa,{})," + ",x.jsx(QK,{})]}),children:"Complete (with info)"}),x.jsx(vn,{shortcut:x.jsxs(bn,{children:[x.jsx(Qa,{})," + ",x.jsx(Ir,{chr:"c"})]}),children:"Clear prompt"}),x.jsx(vn,{shortcut:x.jsxs(bn,{children:[x.jsx(Qa,{})," + ",x.jsx(Ir,{chr:"d"})]}),children:"On empty prompt, close the terminal"}),x.jsx(vn,{shortcut:x.jsxs(bn,{children:[x.jsx(Qa,{})," + ",x.jsx(Ir,{chr:"l"})]}),children:"Clear screen"}),x.jsx(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsxs(bn,{children:[x.jsx(Qa,{})," + ",x.jsx(Gu,{})," + ",x.jsx(Ir,{chr:"r"})]}),x.jsxs(bn,{children:[x.jsx(Qa,{})," + ",x.jsx(Gu,{})," + ",x.jsx(Ir,{chr:"s"})]})]}),children:"Search command history (case insensitive)"}),x.jsx(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsxs(bn,{children:[x.jsx(Gu,{})," + ",x.jsx(jK,{})]}),x.jsxs(bn,{children:[x.jsx(Gu,{})," + ",x.jsx(NK,{})]})]}),children:"Scroll through scrollback"}),x.jsx(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsxs(bn,{children:[x.jsx(vl,{})," + ",x.jsx(eR,{})]}),x.jsxs(bn,{children:[x.jsx(vl,{})," + ",x.jsx(tR,{})]})]}),children:"Complete from history arguments"})]}),x.jsx("p",{children:x.jsx("strong",{children:"Commands"})}),x.jsxs(xb,{children:[x.jsx(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsx(Gn,{children:"?help"}),x.jsxs(bn,{children:[x.jsx(vl,{})," + ",x.jsx(Ir,{chr:"h"})]})]}),children:"Show this help message"}),x.jsx(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsx(Gn,{children:"?inspect <value>"}),x.jsxs(bn,{children:[x.jsx(vl,{})," + ",x.jsx(Ir,{chr:"i"})]})]}),children:"Inspect a value"}),x.jsx(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsx(Gn,{children:"?recursive_debug <expression>"}),x.jsxs(bn,{children:[x.jsx(vl,{})," + ",x.jsx(Ir,{chr:"r"})]})]}),children:"Step into expression using recursive debugging"}),x.jsxs(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsx(Gn,{children:"?diff <v1> ? <v2>"}),x.jsxs(bn,{children:[x.jsx(vl,{})," + ",x.jsx(Ir,{chr:"d"})]})]}),children:["Show the diff between two values repr: ",x.jsx(Gn,{children:"<v1>"}),","," ",x.jsx(Gn,{children:"<v2>"}),x.jsx("br",{}),"The '?' separator will be replaced by the separator:"," ",H1]}),x.jsxs(vn,{shortcut:x.jsxs(x.Fragment,{children:[x.jsx(Gn,{children:"?table <it> ? <p1>, <p2>.."}),x.jsxs(bn,{children:[x.jsx(vl,{})," + ",x.jsx(Ir,{chr:"t"})]})]}),children:["Make a table iterating ",x.jsx(Gn,{children:"<it>"})," and listing"," ",x.jsx(Gn,{children:"<pn>"})," paths on it. A path contain one or more dict key, list index or object attribute name separated by dots."," ",x.jsx("br",{}),"(i.e attr.0.key)",x.jsx("br",{}),"The '?' separator will be replaced by the separator:"," ",U1]})]}),x.jsx("p",{children:x.jsx("strong",{children:"Special values"})}),x.jsxs(xb,{children:[x.jsxs(vn,{shortcut:x.jsx(Gn,{children:"_"}),children:["Last result (",x.jsx(Gn,{children:"__"})," if ",x.jsx(Gn,{children:"_"})," is in scope)"]}),x.jsx(vn,{shortcut:x.jsx(Gn,{children:"__kalong_current_frame__"}),children:"Current debugged frame"}),x.jsx(vn,{shortcut:x.jsx(Gn,{children:"__kalong_return_value__"}),children:"While returning from a function, the return value"}),x.jsx(vn,{shortcut:x.jsx(Gn,{children:"__kalong_exception__"}),children:"While in exception, the exception tuple"})]})]})}const sc=new EventTarget,IK={module:"namespace",class:"class",instance:"variable",function:"function",param:"interface",path:"text",keyword:"keyword",property:"property",statement:"constant"},HK=t=>({token:e=>{t.lastIndex=e.pos;const n=t.exec(e.string);if(n&&n.index===e.pos)return e.pos+=n[0].length||1,"searching";n?e.pos=n.index:e.skipToEnd()}}),UK=he.theme({"&,& .cm-content":{fontFamily:'"Fira Code", monospace',fontSize:"1.5rem"},"& .cm-tooltip.cm-tooltip-autocomplete > ul":{fontFamily:'"Fira Code", monospace',fontSize:"1rem"},"& .cm-line":{lineHeight:"1.4 !important"},"&.cm-editor":{background:"transparent"},"&.cm-editor.cm-focused":{outline:"none",boxShadow:"none"}}),WK=he.theme({"& .cm-cursor":{width:"12px",border:"none",outline:"1px solid rgba(0, 0, 0, .5)",display:"block"},"&.cm-focused .cm-cursor":{background:"rgba(0, 0, 0, .75)",animation:"blink 1.5s ease-in-out infinite",outline:0}}),nR=[IO(),dP(),qO(),sD(),tt.allowMultipleSelections.of(!0),AD(),hd(QD,{fallback:!0}),HD(),oP(),ux(),lD(),Sx(),he.lineWrapping,pz,UK,Go.of([...cx,...mx,...hx,...JO,...fg,...Ox]),vx()];function VK({onScrollUp:t,onScrollDown:e,scrollToBottom:n}){const i=k.useRef(),r=k.useRef(),s=zt(Z=>Z.history),a=zt(Z=>Z.scrollback),c=zt(Z=>Z.activeFrame),f=zt(Z=>Z.recursionLevel),{colorScheme:h}=Km(),p=Xs(),[m,v]=k.useReducer($K,BK),[b,O]=k.useReducer(DK,PK);k.useEffect(()=>{const Z=({keyCode:de})=>{if(de!==13)return;const Te=getSelection().toString();if(Te){const Ae=sf();p(_y(Ae,Te,null,c,f))}},ie=({key:de,target:Te})=>{if(!r.current?.view.dom.contains(Te)&&i.current?.view){const{view:Ae}=i.current;if(Ae.hasFocus||document.activeElement.tagName==="INPUT")return;(de.length===1||de==="Spacebar")&&Ae.dispatch(Ae.state.replaceSelection(de==="Spacebar"?" ":de)),Ae.focus()}};return window.addEventListener("keydown",Z),window.addEventListener("keyup",ie),()=>{window.removeEventListener("keydown",Z),window.removeEventListener("keyup",ie)}},[c,p,f]);const S=k.useCallback((Z,ie)=>{n(),ie.selectionSet&&v({type:"new-value",value:Z})},[n]),C=!!m.value&&!m.command;k.useEffect(()=>{sc.dispatchEvent(new CustomEvent("state",{detail:{ready:C}}))},[C]),k.useEffect(()=>{const Z=()=>{const ie=sf();p(_y(ie,m.value,"condition",c,f))};return sc.addEventListener("condition",Z),()=>sc.removeEventListener("condition",Z)},[c,p,m.value,f]);const E=k.useCallback(Z=>{if(tp(Z.state)==="active"&&A1(Z)||!m.value)return!0;const ie=sf();return p(_y(ie,m.value,m.command,c,f)),v({type:"reset"}),!0},[c,p,m.command,m.value,f]),$=k.useMemo(()=>Object.entries(I1).reduce((Z,[ie,de])=>(Z[ie]=()=>v({type:"toggle-command",command:de}),Z),{}),[v]);k.useEffect(()=>{if(m.command==="help"){const Z=sf();p({type:"SET_PROMPT",key:Z,frame:null,...m}),p({type:"SET_ANSWER",key:Z,frame:null,duration:0,...m,answer:[{type:"raw",value:x.jsx(qK,{})}]}),v({type:"reset"})}},[p,m]);const z=k.useCallback(Z=>tp(Z.state)==="active"?!1:(v({type:"handle-up",history:s}),!0),[s]),P=k.useCallback(Z=>tp(Z.state)==="active"?!1:(v({type:"handle-down",history:s}),!0),[s]),R=k.useCallback(()=>{if(n(),i.current?.view){i.current.view.focus();const Z=i.current.view.state.doc.length;try{i.current.view.dispatch({selection:{anchor:Z,head:Z}})}catch(ie){console.error(ie)}}},[i]),L=k.useCallback(Z=>{if(Z.state.selection.main.head===0&&m.command)return v({type:"remove-command"}),!0},[m.command]),M=k.useCallback(()=>{if(a.length)return p(SR(a.slice(-1)[0].key)),!0},[p,a]),B=k.useCallback(()=>(v({type:"remove-command"}),!0),[]),_=k.useCallback(Z=>{Z.state.selection.main.from!==Z.state.selection.main.to?window.document.execCommand("copy"):v({type:"reset"})},[]),A=k.useCallback(()=>{if(!m.value)return p(Sb("kill")),!0},[p,m.value]),Q=k.useCallback(()=>(p(Y$()),!0),[p]),T=k.useCallback((Z,ie,de=null)=>{if(ie&&!ie.selectionSet)return;if(!Z){O({type:"empty"});return}const Te=new RegExp(Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),`g${b.insensitive?"i":""}`);de=de===null?b.index:de;const ke=(b.reverse?s.slice(de):[...s].sort(()=>-1).slice(s.length-de-1)).findIndex(Re=>Re&&Re.match(Te));if(ke===-1){O({type:"not-found",value:Z});return}const Me=b.reverse?de+ke:de-ke;O({type:"found",value:Z,highlight:HK(Te),index:Me}),v({type:"jump",index:Me,value:s[Me]})},[s,b]),H=k.useCallback(Z=>()=>{const ie=Z.reset?Z.reverse?m.index===-1?0:m.index:m.index===-1?s.length-1:m.index:Z.reverse?b.index+1:b.index-1;return O({type:"search",reverse:Z.reverse||!1,insensitive:Z.insensitive||!1,reset:Z.reset||!1,history:s,index:ie}),T(b.value,null,ie),!0},[T,s,m.index,b.index,b.value]),I=k.useCallback(()=>{O({type:"reset"}),i.current&&i.current.view.focus()},[i]),[V,N]=k.useState(null),X=k.useCallback((Z,ie)=>{const de=s.reduce((Re,vt)=>[...Re,...zK(vt)],[]),Te=ie==="up"?0:s.length-1,Ae=V!==null&&(ie==="up"?V+1:V-1),ke=Z.state.selection.main.from===Z.state.selection.main.to||V===null?Te:Ae,Me=de[ke];if(Me){try{Z.dispatch(Z.state.replaceSelection(Me)),Z.dispatch({selection:{anchor:Z.state.selection.main.head-Me.length,head:Z.state.selection.main.head}})}catch(Re){console.error(Re)}N(ke)}else try{Z.dispatch(Z.state.replaceSelection(""))}catch(Re){console.error(Re)}},[s,V,N]),Y=k.useCallback(Z=>{X(Z,"up")},[X]),K=k.useCallback(Z=>{X(Z,"down")},[X]),le=k.useCallback(async Z=>{let ie=Z.matchBefore(/[\w?]*/);if(ie.from===ie.to&&!Z.explicit)return null;const de=Z.state.doc.lineAt(Z.state.selection.main.head),Te=Z.state.doc.lineAt(ie.from),Ae=Z.state.doc.lineAt(ie.to),ke={line:de.number-1,ch:Z.state.selection.main.head-de.from},Me={line:Te.number-1,ch:ie.from-Te.from},Re={line:Ae.number-1,ch:ie.to-Ae.from};if(!m.value.includes(" ")&&m.value.startsWith("?"))return{from:ie.from,options:Object.values(I1).map(Be=>({label:`?${Be}`,type:"namespace"}))};p(Z$(m.value,Me,Re,ke,c));const vt=await Promise.race([new Promise(Be=>setTimeout(()=>Be([]),5e3)),new Promise(Be=>{const Se=bf.subscribe(()=>{const{suggestions:{prompt:Xe,from:$e,to:je,suggestion:Ie}}=bf.getState();Xe===m.value&&Me.line===$e.line&&Me.ch===$e.ch&&Re.line===je.line&&Re.ch===je.ch&&(Be(Ie.list||[]),Se())})})]);return{from:ie.from,options:vt.map(({text:Be,docstring:Se,type:Xe})=>({label:Be,info:Z.explicit&&Se,type:IK[Xe]||Xe}))}},[c,p,m.value]),q=k.useCallback(Z=>{const ie=Z.state.selection.main.head;return m.value.slice(0,ie).split(`
166
+ `).slice(-1)[0].match(/^\s*$/)?!1:(tp(Z.state)==="active"?A1(Z):_p(Z),!0)},[m.value]),G=a.length===0||a.slice(-1)[0].answer!==null||f>0,se=k.useMemo(()=>[so.highest(Go.of([{key:"ArrowUp",run:z,preventDefault:!0},{key:"ArrowDown",run:P,preventDefault:!0},{key:"Enter",run:E,preventDefault:!0},{key:"Backspace",run:L,preventDefault:!0},{key:"Shift-Backspace",run:M,preventDefault:!0},{key:"Tab",run:q,preventDefault:!0},{key:"Ctrl-c",run:_,preventDefault:!0},{key:"Ctrl-d",run:A,preventDefault:!0},{key:"Ctrl-l",run:Q,preventDefault:!0},{key:"Ctrl-r",run:H({reverse:!0,reset:!0}),preventDefault:!0},{key:"Ctrl-s",run:H({reset:!0}),preventDefault:!0},{key:"Shift-Ctrl-r",run:H({reverse:!0,insensitive:!0,reset:!0}),preventDefault:!0},{key:"Shift-Ctrl-s",run:H({insensitive:!0,reset:!0}),preventDefault:!0},{key:"Shift-PageUp",run:t,preventDefault:!0},{key:"Shift-PageDown",run:e,preventDefault:!0},{key:"Alt-ArrowUp",run:Y,preventDefault:!0},{key:"Alt-ArrowDown",run:K,preventDefault:!0},...Object.entries($).map(([Z,ie])=>({key:`Alt-${Z}`,run:ie,preventDefault:!0}))])),ux({override:[le]}),WK,...nR],[le,L,Q,$,A,P,E,K,Y,_,M,H,q,z,e,t]),ue=k.useMemo(()=>[he.domEventHandlers({blur:I}),so.highest(Go.of([{key:"Enter",run:I,preventDefault:!0},{key:"Escape",run:I,preventDefault:!0},{key:"Ctrl-r",run:H({reverse:!0}),preventDefault:!0},{key:"Ctrl-s",run:H({}),preventDefault:!0},{key:"Shift-Ctrl-r",run:H({reverse:!0,insensitive:!0}),preventDefault:!0},{key:"Shift-Ctrl-s",run:H({insensitive:!0}),preventDefault:!0}])),...nR],[H,I]);return k.useEffect(()=>{if(i.current?.view&&m.passive){const{view:Z}=i.current;try{Z.dispatch({selection:{anchor:m.value.length}})}catch(ie){console.error(ie)}}},[m.value,m.passive]),x.jsx(Ef,{in:G,exit:!1,mountOnEnter:!0,unmountOnExit:!0,onEntered:R,children:x.jsx(Oz,{raised:!0,sx:{m:1,ml:1+f*4},children:x.jsx(xz,{avatar:x.jsxs(x.Fragment,{children:[x.jsx(xn,{sx:Z=>({transform:`rotate(${G?270:0}deg)`,marginLeft:"auto",transition:Z.transitions.create("transform",{duration:Z.transitions.duration.shortest})}),onClick:E,size:"small",children:x.jsx(Ff,{})}),m.command&&x.jsx(bg,{label:m.command,onDelete:B})]}),title:x.jsxs(x.Fragment,{children:[x.jsx(Am,{ref:i,value:m.value,basicSetup:!1,theme:h==="light"?q1:Rm,onChange:S,onCreateEditor:n,height:"auto",extensions:se,width:"100%"}),b.value!==null&&x.jsxs(lt,{component:"label",sx:{fontSize:".5em",color:b.notFound?"error.main":"text.secondary",display:"flex",alignItems:"center"},children:[x.jsxs(lt,{component:"span",sx:{px:0,py:.5},children:[b.insensitive&&"I-","Search"," ",b.reverse?"backward":"forward",":"]}),x.jsx(Am,{ref:r,value:b.value,height:"auto",theme:h==="light"?q1:Rm,autoFocus:!0,basicSetup:!1,extensions:ue,width:"100%",onChange:T})]})]}),slotProps:{root:{sx:Z=>({padding:Z.spacing(2)})},title:{variant:"h5"}}})})})}const XK=(function(){const e=zt(a=>a.scrollback),n=k.useRef(),i=k.useCallback(()=>{n.current.scrollTop-=300},[n]),r=k.useCallback(()=>{n.current.scrollTop+=300},[n]),s=k.useCallback(()=>{n.current.scrollTop=n.current.scrollHeight},[]);return x.jsxs(lt,{sx:{flex:1,overflowY:"auto",scrollBehavior:"smooth"},ref:n,children:[x.jsxs(Ct,{variant:"h6",sx:{pt:1,px:2,fontSize:"0.75em",color:a=>a.vars.palette.neutral.main,display:"flex",justifyContent:"space-between"},children:[x.jsxs(Ct,{variant:"body2",children:[x.jsx("code",{style:{fontWeight:600},children:"?help"})," to get some help"]}),x.jsxs(Ct,{variant:"body2",children:["Kalong v",x.jsx(kx,{href:"https://github.com/paradoxxxzero/kalong/tags",underline:"hover",children:Uz})]})]}),e.map(({key:a,...c})=>x.jsx(MK,{uid:a,...c},a)),x.jsx(VK,{onScrollUp:i,onScrollDown:r,scrollToBottom:s})]})});function GK(){const t=wM("(min-aspect-ratio: 1/1)"),e=zt(r=>r.frames),n=zt(r=>r.activeFrame),i=e.find(({key:r})=>r===n);return x.jsxs(lt,{component:"main",sx:()=>({flexGrow:1,display:"flex",flexDirection:"column",minWidth:0}),children:[x.jsx(lt,{sx:r=>r.mixins.toolbar}),x.jsxs(MV,{vertical:t,children:[i?x.jsx(EV,{currentFile:i}):null,x.jsx(XK,{})]})]})}const FK=ot(x.jsx("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})),YK=k.memo(function({frame:e,last:n}){const i=zt(a=>a.activeFrame),r=Xs(),s=k.useCallback(()=>{r(vR(e.key))},[r,e.key]);return x.jsx(Mz,{secondaryAction:e.active&&x.jsx(oo,{title:"Current Frame",children:x.jsx(xn,{edge:"end","aria-label":"comments",onClick:s,children:x.jsx(FK,{fontSize:"small"})})}),disablePadding:!0,children:x.jsx(sF,{divider:!n,selected:e.key===i,onClick:s,children:x.jsx(Dz,{primary:e.function,secondary:x.jsxs(x.Fragment,{children:[x.jsx(dn,{value:e.lineSource}),x.jsx(oo,{title:e.absoluteFilename,children:x.jsxs(Ct,{variant:"body2",display:"block",component:"span",noWrap:!0,children:[e.filename,":",e.lineNumber]})})]})})})})});function KK(){const t=zt(r=>r.frames),e=zt(r=>r.activeFrame),n=zt(r=>r.spacing),i=k.useRef();return k.useEffect(()=>{if(i.current){const r=i.current.querySelectorAll(".Mui-selected");r.length&&XY(r[0])}},[e]),x.jsx(Ex,{ref:i,sx:{p:0},dense:n!=="comfortable",children:t.map((r,s)=>x.jsx(YK,{frame:r,last:s===t.length-1},r.key))})}const iR=ot(x.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"})),ZK=ot(x.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"})),JK=ot(x.jsx("path",{d:"M3 3h18v2H3zm0 16h18v2H3z"})),eZ=ot(x.jsx("path",{d:"M3 3h18v2H3zm0 16h18v2H3zm0-8h18v2H3z"})),tZ=ot(x.jsx("path",{d:"M3 2h18v2H3zm0 18h18v2H3zm0-6h18v2H3zm0-6h18v2H3z"})),kp=240;function nZ({rtl:t,open:e,mobile:n,onDrawerClose:i}){const{mode:r,setMode:s}=Km(),a=Xs(),c=zt(f=>f.spacing);return r?x.jsxs(WG,{sx:f=>({width:{sm:kp,md:e?kp:0},"& .MuiPaper-root":{width:{sm:kp,md:e?kp:0}},flexShrink:{sm:0,md:null},transition:f.transitions.create("width",{easing:f.transitions.easing.sharp,duration:f.transitions.duration[e?"enteringScreen":"leavingScreen"]}),overflow:e?void 0:"hidden"}),open:e,variant:n?"temporary":"persistent",anchor:t?"right":"left",onClose:i,children:[x.jsx(lt,{sx:f=>({...f.mixins.toolbar,display:"flex"}),children:x.jsxs(lt,{sx:{p:1,display:"flex",width:"100%",justifyContent:"space-around",userSelect:"none"},children:[x.jsx(kx,{href:"http://github.com/paradoxxxzero/kalong/",underline:"none",sx:{flex:1},children:x.jsx(Ct,{variant:"h1",sx:{fontFamily:'"Fira Code", monospace',fontSize:"5em",lineHeight:"0.7em",textAlign:"center",transform:"rotate(-90deg)"},children:"K"})}),x.jsxs(lt,{sx:{display:"flex",alignItems:"center"},children:[x.jsxs(xn,{size:"small",onClick:()=>s(r!=="dark"?"dark":"light"),onContextMenu:f=>{s("system"),f.preventDefault()},children:[r==="system"?x.jsx(iR,{}):r==="light"?x.jsx(oo,{title:"Switch to Dark Mode. (Right-click to let the system choose)",children:x.jsx(iR,{})}):x.jsx(oo,{title:"Switch to Light Mode (Right-click to let the system choose)",children:x.jsx(ZK,{})}),r!=="system"&&x.jsx(Rx,{fontSize:"small",sx:{position:"absolute",top:"1.1em",left:"1em",width:"0.6em"}})]}),x.jsx(xn,{size:"small",onClick:()=>{a(H$(c==="comfortable"?"compact":c==="compact"?"spacious":"comfortable"))},children:c==="comfortable"?x.jsx(JK,{}):c==="compact"?x.jsx(eZ,{}):x.jsx(tZ,{})})]})]})}),x.jsx(Yf,{}),x.jsx(KK,{})]}):null}const rR=ot(x.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),oR=ot(x.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),iZ=ot(x.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"})),rZ=ot(x.jsx("path",{d:"M5 17h14v2H5zm7-12L5.33 15h13.34z"})),oZ=ot(x.jsx("path",{d:"m4 18 8.5-6L4 6zm9-12v12l8.5-6z"})),sZ=ot(x.jsx("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"})),lZ=ot(x.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})),aZ=ot(x.jsx("path",{d:"M8 5v14l11-7z"})),cZ=ot(x.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"})),uZ=ot(x.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})),fZ=ot(x.jsx("path",{d:"m19 15-1.41-1.41L13 18.17V2h-2v16.17l-4.59-4.59L5 15l7 7z"})),dZ=ot(x.jsx("path",{d:"M19 9h-2v6.59L5.41 4 4 5.41 15.59 17H9v2h10z"})),hZ=ot(x.jsx("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"})),pZ=ot(x.jsx("path",{d:"M13.05 9.79 10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zM11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62M5.69 7.1 4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9M4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89m1.61 6.74C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62zM22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12"})),sR=(t,e,n)=>[{label:"Pause the program",action:"pause",Icon:lZ,key:"F8",disabled:!t||!e,hidden:!t||!e},{label:"Continue the program",action:"continue",Icon:aZ,key:"F8",disabled:t,hidden:t,menu:"continue"},{label:"Continue till condition",action:"continueCondition",key:"Alt+F8",Icon:pZ,disabled:t,hidden:t||!n,menu:"continue"},{label:"Step to the next instruction",action:"step",Icon:iZ,key:"F9",disabled:t},{label:"Step Until next line (bypass loops)",action:"stepUntil",Icon:cZ,key:"F10",disabled:t},{label:"Step Into function call",action:"stepInto",Icon:hZ,key:"F11",disabled:t,menu:"stepInto"},{label:"Step Into function call (all)",action:"stepIntoAll",Icon:fZ,key:"Ctrl+F11",disabled:t,menu:"stepInto"},{label:"Step Into function call (public only)",action:"stepIntoPublic",Icon:dZ,key:"Alt+F11",disabled:t,menu:"stepInto"},{label:"Step Out of the current function",action:"stepOut",Icon:sZ,key:"Shift+F11",disabled:t},{label:"Trace the program (stop at every exception)",action:"trace",Icon:uZ,key:"Shift+F12",disabled:t},{label:"Run the program",action:"run",Icon:oZ,key:"F12",disabled:t},{label:"Stop debugging",action:"stop",Icon:rZ,key:"Shift+Escape",disabled:t},{label:"Exit program",action:"kill",Icon:bz,key:"Ctrl+Escape",disabled:!1}],mZ=({action:{label:t,action:e,disabled:n,Icon:i},handleCommand:r})=>x.jsxs(NF,{onClick:r,disabled:n,"data-action":e,children:[x.jsx(yF,{children:x.jsx(i,{})}),x.jsx(Ct,{variant:"inherit",noWrap:!0,children:t})]}),gZ=({action:{key:t,label:e,action:n,disabled:i,Icon:r},handleCommand:s,handleMenu:a})=>x.jsx(oo,{title:`${e} [${t}]`,children:x.jsxs(xn,{color:"inherit",onClick:s,onContextMenu:a,disabled:i,"data-action":n,size:"large",children:[x.jsx(r,{}),a&&x.jsx(Rx,{fontSize:"small",sx:{position:"absolute",top:"1.5em",left:"1.75em",width:"0.6em"}})]})}),yZ=(function({mobile:e}){const n=zt(B=>B.title),i=zt(B=>B.frames),r=zt(B=>B.running),s=zt(B=>B.recursionLevel),a=zt(B=>B.main),c=zt(B=>B.activeFrame),[f,h]=k.useState({stepInto:"stepInto",continue:"continue"}),[p,m]=k.useState(!1);k.useEffect(()=>{const B=({detail:_})=>{m(_.ready)};return sc.addEventListener("state",B),()=>sc.removeEventListener("state",B)},[]);const v=sR(r,a,p),b=v.reduce((B,_)=>(_.menu&&!_.hidden&&(B[_.menu]||(B[_.menu]=[]),B[_.menu].push(_.action)),B),{});k.useEffect(()=>{const B={};Object.entries(b).forEach(([_,A])=>{f[_]&&!A.includes(f[_])&&(B[_]=A[0])}),Object.keys(B).length&&h(_=>({..._,...B}))},[b,f]);const O=Xs(),[S,C]=k.useState(null),E=k.useCallback(B=>{const _=B.currentTarget.getAttribute("data-action");_==="continueCondition"?sc.dispatchEvent(new CustomEvent("condition")):O(Sb(_,c))},[c,O]),$=(B,_)=>{const A=b[B],Q=A.findIndex(T=>T===_);return A[(Q+1)%A.length]},z=B=>_=>{h(A=>({...A,[B]:$(B,A[B])})),_.preventDefault()};k.useEffect(()=>{const B=_=>{let{code:A}=_;_.shiftKey&&(A=`Shift+${A}`),_.altKey&&(A=`Alt+${A}`),_.ctrlKey&&(A=`Ctrl+${A}`);const Q=sR(r).find(({key:T,disabled:H})=>!H&&A===T);Q&&(O(Sb(Q.action,c)),_.preventDefault())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[r,O,c]);const P=k.useCallback(()=>C(null),[]),R=k.useCallback(({currentTarget:B})=>C(B),[]);k.useLayoutEffect(()=>{!e&&S&&P()});const L=e?mZ:gZ,M=v.map(B=>!B.hidden&&(e||!B.menu||f[B.menu]===B.action)&&x.jsx(L,{action:B,handleCommand:E,handleMenu:B.menu&&b[B.menu].length>1?z(B.menu):void 0},B.action));return x.jsxs(x.Fragment,{children:[x.jsxs(Ct,{variant:"h6",color:"inherit",noWrap:!0,children:[s?`${"(".repeat(s)} `:"",n,s?` ${")".repeat(s)}`:""]}),!!i.length&&x.jsxs(x.Fragment,{children:[x.jsx(lt,{sx:{flexGrow:1}}),e?x.jsxs(x.Fragment,{children:[x.jsx(xn,{onClick:R,size:"large",children:x.jsx(qz,{color:"inherit"})}),x.jsx(zF,{anchorEl:S,open:!!S,onClose:P,children:M})]}):x.jsx(lt,{sx:{whiteSpace:"pre"},children:M})]})]})}),lR=240;function vZ({rtl:t,open:e,mobile:n,onDrawerOpen:i,onDrawerClose:r}){const{colorScheme:s}=Km();return x.jsx(tG,{sx:a=>({transition:`${a.transitions.create(["margin","width"],{easing:a.transitions.easing.sharp,duration:a.transitions.duration[e&&!n?"enteringScreen":"leavingScreen"]})},${a.transitions.create(["background-color","color"],{easing:a.transitions.easing.easeInOut,duration:a.transitions.duration.normal})}`,width:e&&!n?`calc(100% - ${lR}px)`:void 0,marginLeft:e&&!n?lR:void 0}),position:"fixed",children:x.jsxs(lY,{sx:a=>s==="dark"?{color:a.vars.palette.primary.main}:void 0,children:[x.jsx(oo,{title:`${e?"Close":"Open"} the call stack`,children:x.jsx(xn,{color:"inherit",onClick:e?r:i,sx:{mr:2.5},size:"large",children:!n&&e?t?x.jsx(oR,{}):x.jsx(rR,{}):t?x.jsx(rR,{}):x.jsx(oR,{})})}),x.jsx(yZ,{mobile:n})]})})}function bZ(){const t=Er(),e=wM(t.breakpoints.down("md")),n=Xs(),i=zt(b=>b.running),r=zt(b=>b.activeFrame),[s,a]=k.useState(!e),[c,f]=k.useState(e),[h,p]=k.useState(r);c!==e&&(f(e),a(!e)),h!==r&&(p(r),e&&a(!1)),k.useEffect(()=>{n(_$())},[n]);const m=k.useCallback(()=>a(!0),[]),v=k.useCallback(()=>a(!1),[]);return x.jsxs(lt,{sx:{display:"flex",width:"100vw",height:"100vh",justifyContent:"center",fontVariant:"oldstyle-nums",transition:"filter 500ms ease-in",filter:i?"grayscale(100%)":void 0},children:[x.jsx(OM,{styles:{"@global":{"@font-face":[{fontFamily:"Fira Code",fontWeight:"normal",fontStyle:"normal",src:`url(${bQ}) format("opentype")`},{fontFamily:"Fira Code",fontWeight:"bold",fontStyle:"normal",src:`url(${vQ}) format("opentype")`}]}}}),x.jsx(yQ,{}),x.jsx(vZ,{mobile:e,open:s,rtl:t.direction==="rtl",onDrawerOpen:m,onDrawerClose:v}),x.jsx(nZ,{mobile:e,open:s,rtl:t.direction==="rtl",onDrawerClose:v}),x.jsx(GK,{}),x.jsx(u_,{sx:{position:"fixed",right:"1em",bottom:"1em"}})]})}const OZ=(t,e)=>Ym({spacing:e=="comfortable"?8:e=="compact"?4:2,colorSchemes:{light:{palette:{primary:{main:{init:ks[500],line:Es[600],call:Sk[500],return:wk[700],exception:Ck[500],shell:xk[500],dead:Yu[600]}[t]},secondary:{main:Db.A400},neutral:{main:Yu[700]}}},dark:{palette:{primary:{main:{init:ks[500],line:Es[600],call:Sk[500],return:wk[700],exception:Ck[500],shell:xk[500],dead:Yu[600]}[t]},secondary:{main:Db.A200},neutral:{main:Yu[600]}}}},cssVariables:{colorSchemeSelector:"class"}});function xZ(){const t=zt(i=>i.theme),e=zt(i=>i.spacing),n=k.useMemo(()=>OZ(t||"line",e),[t,e]);return x.jsx(OL,{injectFirst:!0,children:x.jsx(cQ,{theme:n,children:x.jsx(bZ,{})})})}bf.subscribe(()=>{const t=bf.getState(),e=t.history,n=t.spacing;try{localStorage.setItem("history",JSON.stringify(e)),localStorage.setItem("spacing",n)}catch(i){console.warn("Failed to save spacing:",i)}});f$.createRoot(document.getElementById("root")).render(x.jsx(A$,{store:bf,children:x.jsx(xZ,{})}));const Uz="0.6.0";