maxsimcli 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/assets/CHANGELOG.md +25 -0
- package/dist/assets/dashboard/client/assets/index-G0WOLbCS.js +201 -0
- package/dist/assets/dashboard/client/assets/index-Mj46KgFF.css +32 -0
- package/dist/assets/dashboard/client/index.html +2 -2
- package/dist/assets/dashboard/server.js +24 -12
- package/dist/assets/templates/commands/maxsim/set-profile.md +2 -2
- package/dist/assets/templates/workflows/set-profile.md +3 -2
- package/dist/cli.cjs +24 -12
- package/dist/cli.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/assets/dashboard/client/assets/index-BjfrCU-v.css +0 -1
- package/dist/assets/dashboard/client/assets/index-I1VQFVyf.js +0 -78
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();var Om={exports:{}},ho={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Xx;function RR(){if(Xx)return ho;Xx=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,l){var o=null;if(l!==void 0&&(o=""+l),s.key!==void 0&&(o=""+s.key),"key"in s){l={};for(var c in s)c!=="key"&&(l[c]=s[c])}else l=s;return s=l.ref,{$$typeof:i,type:n,key:o,ref:s!==void 0?s:null,props:l}}return ho.Fragment=e,ho.jsx=t,ho.jsxs=t,ho}var Lx;function zR(){return Lx||(Lx=1,Om.exports=RR()),Om.exports}var C=zR(),gm={exports:{}},Ce={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Vx;function DR(){if(Vx)return Ce;Vx=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),y=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=y&&M[y]||M["@@iterator"],typeof M=="function"?M:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,w={};function k(M,Y,ee){this.props=M,this.context=Y,this.refs=w,this.updater=ee||S}k.prototype.isReactComponent={},k.prototype.setState=function(M,Y){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,Y,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=k.prototype;function P(M,Y,ee){this.props=M,this.context=Y,this.refs=w,this.updater=ee||S}var V=P.prototype=new A;V.constructor=P,v(V,k.prototype),V.isPureReactComponent=!0;var R=Array.isArray;function N(){}var _={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function K(M,Y,ee){var re=ee.ref;return{$$typeof:i,type:M,key:Y,ref:re!==void 0?re:null,props:ee}}function Oe(M,Y){return K(M.type,Y,M.props)}function ce(M){return typeof M=="object"&&M!==null&&M.$$typeof===i}function ie(M){var Y={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ee){return Y[ee]})}var xe=/\/+/g;function Se(M,Y){return typeof M=="object"&&M!==null&&M.key!=null?ie(""+M.key):Y.toString(36)}function we(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(N,N):(M.status="pending",M.then(function(Y){M.status==="pending"&&(M.status="fulfilled",M.value=Y)},function(Y){M.status==="pending"&&(M.status="rejected",M.reason=Y)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function X(M,Y,ee,re,ue){var ye=typeof M;(ye==="undefined"||ye==="boolean")&&(M=null);var Ee=!1;if(M===null)Ee=!0;else switch(ye){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(M.$$typeof){case i:case e:Ee=!0;break;case p:return Ee=M._init,X(Ee(M._payload),Y,ee,re,ue)}}if(Ee)return ue=ue(M),Ee=re===""?"."+Se(M,0):re,R(ue)?(ee="",Ee!=null&&(ee=Ee.replace(xe,"$&/")+"/"),X(ue,Y,ee,"",function(ds){return ds})):ue!=null&&(ce(ue)&&(ue=Oe(ue,ee+(ue.key==null||M&&M.key===ue.key?"":(""+ue.key).replace(xe,"$&/")+"/")+Ee)),Y.push(ue)),1;Ee=0;var $t=re===""?".":re+":";if(R(M))for(var $e=0;$e<M.length;$e++)re=M[$e],ye=$t+Se(re,$e),Ee+=X(re,Y,ee,ye,ue);else if($e=b(M),typeof $e=="function")for(M=$e.call(M),$e=0;!(re=M.next()).done;)re=re.value,ye=$t+Se(re,$e++),Ee+=X(re,Y,ee,ye,ue);else if(ye==="object"){if(typeof M.then=="function")return X(we(M),Y,ee,re,ue);throw Y=String(M),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function W(M,Y,ee){if(M==null)return M;var re=[],ue=0;return X(M,re,"","",function(ye){return Y.call(ee,ye,ue++)}),re}function te(M){if(M._status===-1){var Y=M._result;Y=Y(),Y.then(function(ee){(M._status===0||M._status===-1)&&(M._status=1,M._result=ee)},function(ee){(M._status===0||M._status===-1)&&(M._status=2,M._result=ee)}),M._status===-1&&(M._status=0,M._result=Y)}if(M._status===1)return M._result.default;throw M._result}var oe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},F={map:W,forEach:function(M,Y,ee){W(M,function(){Y.apply(this,arguments)},ee)},count:function(M){var Y=0;return W(M,function(){Y++}),Y},toArray:function(M){return W(M,function(Y){return Y})||[]},only:function(M){if(!ce(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Ce.Activity=m,Ce.Children=F,Ce.Component=k,Ce.Fragment=t,Ce.Profiler=s,Ce.PureComponent=P,Ce.StrictMode=n,Ce.Suspense=f,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(M){return _.H.useMemoCache(M)}},Ce.cache=function(M){return function(){return M.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(M,Y,ee){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var re=v({},M.props),ue=M.key;if(Y!=null)for(ye in Y.key!==void 0&&(ue=""+Y.key),Y)!j.call(Y,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&Y.ref===void 0||(re[ye]=Y[ye]);var ye=arguments.length-2;if(ye===1)re.children=ee;else if(1<ye){for(var Ee=Array(ye),$t=0;$t<ye;$t++)Ee[$t]=arguments[$t+2];re.children=Ee}return K(M.type,ue,re)},Ce.createContext=function(M){return M={$$typeof:o,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:l,_context:M},M},Ce.createElement=function(M,Y,ee){var re,ue={},ye=null;if(Y!=null)for(re in Y.key!==void 0&&(ye=""+Y.key),Y)j.call(Y,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ue[re]=Y[re]);var Ee=arguments.length-2;if(Ee===1)ue.children=ee;else if(1<Ee){for(var $t=Array(Ee),$e=0;$e<Ee;$e++)$t[$e]=arguments[$e+2];ue.children=$t}if(M&&M.defaultProps)for(re in Ee=M.defaultProps,Ee)ue[re]===void 0&&(ue[re]=Ee[re]);return K(M,ye,ue)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(M){return{$$typeof:c,render:M}},Ce.isValidElement=ce,Ce.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:te}},Ce.memo=function(M,Y){return{$$typeof:d,type:M,compare:Y===void 0?null:Y}},Ce.startTransition=function(M){var Y=_.T,ee={};_.T=ee;try{var re=M(),ue=_.S;ue!==null&&ue(ee,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(N,oe)}catch(ye){oe(ye)}finally{Y!==null&&ee.types!==null&&(Y.types=ee.types),_.T=Y}},Ce.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Ce.use=function(M){return _.H.use(M)},Ce.useActionState=function(M,Y,ee){return _.H.useActionState(M,Y,ee)},Ce.useCallback=function(M,Y){return _.H.useCallback(M,Y)},Ce.useContext=function(M){return _.H.useContext(M)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(M,Y){return _.H.useDeferredValue(M,Y)},Ce.useEffect=function(M,Y){return _.H.useEffect(M,Y)},Ce.useEffectEvent=function(M){return _.H.useEffectEvent(M)},Ce.useId=function(){return _.H.useId()},Ce.useImperativeHandle=function(M,Y,ee){return _.H.useImperativeHandle(M,Y,ee)},Ce.useInsertionEffect=function(M,Y){return _.H.useInsertionEffect(M,Y)},Ce.useLayoutEffect=function(M,Y){return _.H.useLayoutEffect(M,Y)},Ce.useMemo=function(M,Y){return _.H.useMemo(M,Y)},Ce.useOptimistic=function(M,Y){return _.H.useOptimistic(M,Y)},Ce.useReducer=function(M,Y,ee){return _.H.useReducer(M,Y,ee)},Ce.useRef=function(M){return _.H.useRef(M)},Ce.useState=function(M){return _.H.useState(M)},Ce.useSyncExternalStore=function(M,Y,ee){return _.H.useSyncExternalStore(M,Y,ee)},Ce.useTransition=function(){return _.H.useTransition()},Ce.version="19.2.4",Ce}var _x;function s0(){return _x||(_x=1,gm.exports=DR()),gm.exports}var q=s0(),ym={exports:{}},po={},bm={exports:{}},Sm={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var jx;function ZR(){return jx||(jx=1,(function(i){function e(X,W){var te=X.length;X.push(W);e:for(;0<te;){var oe=te-1>>>1,F=X[oe];if(0<s(F,W))X[oe]=W,X[te]=F,te=oe;else break e}}function t(X){return X.length===0?null:X[0]}function n(X){if(X.length===0)return null;var W=X[0],te=X.pop();if(te!==W){X[0]=te;e:for(var oe=0,F=X.length,M=F>>>1;oe<M;){var Y=2*(oe+1)-1,ee=X[Y],re=Y+1,ue=X[re];if(0>s(ee,te))re<F&&0>s(ue,ee)?(X[oe]=ue,X[re]=te,oe=re):(X[oe]=ee,X[Y]=te,oe=Y);else if(re<F&&0>s(ue,te))X[oe]=ue,X[re]=te,oe=re;else break e}}return W}function s(X,W){var te=X.sortIndex-W.sortIndex;return te!==0?te:X.id-W.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;i.unstable_now=function(){return l.now()}}else{var o=Date,c=o.now();i.unstable_now=function(){return o.now()-c}}var f=[],d=[],p=1,m=null,y=3,b=!1,S=!1,v=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function V(X){for(var W=t(d);W!==null;){if(W.callback===null)n(d);else if(W.startTime<=X)n(d),W.sortIndex=W.expirationTime,e(f,W);else break;W=t(d)}}function R(X){if(v=!1,V(X),!S)if(t(f)!==null)S=!0,N||(N=!0,ie());else{var W=t(d);W!==null&&we(R,W.startTime-X)}}var N=!1,_=-1,j=5,K=-1;function Oe(){return w?!0:!(i.unstable_now()-K<j)}function ce(){if(w=!1,N){var X=i.unstable_now();K=X;var W=!0;try{e:{S=!1,v&&(v=!1,A(_),_=-1),b=!0;var te=y;try{t:{for(V(X),m=t(f);m!==null&&!(m.expirationTime>X&&Oe());){var oe=m.callback;if(typeof oe=="function"){m.callback=null,y=m.priorityLevel;var F=oe(m.expirationTime<=X);if(X=i.unstable_now(),typeof F=="function"){m.callback=F,V(X),W=!0;break t}m===t(f)&&n(f),V(X)}else n(f);m=t(f)}if(m!==null)W=!0;else{var M=t(d);M!==null&&we(R,M.startTime-X),W=!1}}break e}finally{m=null,y=te,b=!1}W=void 0}}finally{W?ie():N=!1}}}var ie;if(typeof P=="function")ie=function(){P(ce)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Se=xe.port2;xe.port1.onmessage=ce,ie=function(){Se.postMessage(null)}}else ie=function(){k(ce,0)};function we(X,W){_=k(function(){X(i.unstable_now())},W)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(X){X.callback=null},i.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<X?Math.floor(1e3/X):5},i.unstable_getCurrentPriorityLevel=function(){return y},i.unstable_next=function(X){switch(y){case 1:case 2:case 3:var W=3;break;default:W=y}var te=y;y=W;try{return X()}finally{y=te}},i.unstable_requestPaint=function(){w=!0},i.unstable_runWithPriority=function(X,W){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var te=y;y=X;try{return W()}finally{y=te}},i.unstable_scheduleCallback=function(X,W,te){var oe=i.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?oe+te:oe):te=oe,X){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=te+F,X={id:p++,callback:W,priorityLevel:X,startTime:te,expirationTime:F,sortIndex:-1},te>oe?(X.sortIndex=te,e(d,X),t(f)===null&&X===t(d)&&(v?(A(_),_=-1):v=!0,we(R,te-oe))):(X.sortIndex=F,e(f,X),S||b||(S=!0,N||(N=!0,ie()))),X},i.unstable_shouldYield=Oe,i.unstable_wrapCallback=function(X){var W=y;return function(){var te=y;y=W;try{return X.apply(this,arguments)}finally{y=te}}}})(Sm)),Sm}var Bx;function XR(){return Bx||(Bx=1,bm.exports=ZR()),bm.exports}var xm={exports:{}},Ut={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Nx;function LR(){if(Nx)return Ut;Nx=1;var i=s0();function e(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(f,d,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:f,containerInfo:d,implementation:p}}var o=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Ut.createPortal=function(f,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(e(299));return l(f,d,null,p)},Ut.flushSync=function(f){var d=o.T,p=n.p;try{if(o.T=null,n.p=2,f)return f()}finally{o.T=d,n.p=p,n.d.f()}},Ut.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,n.d.C(f,d))},Ut.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},Ut.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var p=d.as,m=c(p,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?n.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:y,fetchPriority:b}):p==="script"&&n.d.X(f,{crossOrigin:m,integrity:y,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Ut.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=c(d.as,d.crossOrigin);n.d.M(f,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&n.d.M(f)},Ut.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,m=c(p,d.crossOrigin);n.d.L(f,p,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Ut.preloadModule=function(f,d){if(typeof f=="string")if(d){var p=c(d.as,d.crossOrigin);n.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else n.d.m(f)},Ut.requestFormReset=function(f){n.d.r(f)},Ut.unstable_batchedUpdates=function(f,d){return f(d)},Ut.useFormState=function(f,d,p){return o.H.useFormState(f,d,p)},Ut.useFormStatus=function(){return o.H.useHostTransitionStatus()},Ut.version="19.2.4",Ut}var Yx;function VR(){if(Yx)return xm.exports;Yx=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),xm.exports=LR(),xm.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var qx;function _R(){if(qx)return po;qx=1;var i=XR(),e=s0(),t=VR();function n(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var a=r,u=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(u=a.return),r=a.return;while(r)}return a.tag===3?u:null}function o(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function c(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(l(r)!==r)throw Error(n(188))}function d(r){var a=r.alternate;if(!a){if(a=l(r),a===null)throw Error(n(188));return a!==r?null:r}for(var u=r,h=a;;){var O=u.return;if(O===null)break;var g=O.alternate;if(g===null){if(h=O.return,h!==null){u=h;continue}break}if(O.child===g.child){for(g=O.child;g;){if(g===u)return f(O),r;if(g===h)return f(O),a;g=g.sibling}throw Error(n(188))}if(u.return!==h.return)u=O,h=g;else{for(var x=!1,Q=O.child;Q;){if(Q===u){x=!0,u=O,h=g;break}if(Q===h){x=!0,h=O,u=g;break}Q=Q.sibling}if(!x){for(Q=g.child;Q;){if(Q===u){x=!0,u=g,h=O;break}if(Q===h){x=!0,h=g,u=O;break}Q=Q.sibling}if(!x)throw Error(n(189))}}if(u.alternate!==h)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:a}function p(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=p(r),a!==null)return a;r=r.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),P=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),Oe=Symbol.for("react.memo_cache_sentinel"),ce=Symbol.iterator;function ie(r){return r===null||typeof r!="object"?null:(r=ce&&r[ce]||r["@@iterator"],typeof r=="function"?r:null)}var xe=Symbol.for("react.client.reference");function Se(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===xe?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case v:return"Fragment";case k:return"Profiler";case w:return"StrictMode";case R:return"Suspense";case N:return"SuspenseList";case K:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case P:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case V:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case _:return a=r.displayName||null,a!==null?a:Se(r.type)||"Memo";case j:a=r._payload,r=r._init;try{return Se(r(a))}catch{}}return null}var we=Array.isArray,X=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},oe=[],F=-1;function M(r){return{current:r}}function Y(r){0>F||(r.current=oe[F],oe[F]=null,F--)}function ee(r,a){F++,oe[F]=r.current,r.current=a}var re=M(null),ue=M(null),ye=M(null),Ee=M(null);function $t(r,a){switch(ee(ye,a),ee(ue,r),ee(re,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?lx(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=lx(a),r=ax(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Y(re),ee(re,r)}function $e(){Y(re),Y(ue),Y(ye)}function ds(r){r.memoizedState!==null&&ee(Ee,r);var a=re.current,u=ax(a,r.type);a!==u&&(ee(ue,r),ee(re,u))}function Xn(r){ue.current===r&&(Y(re),Y(ue)),Ee.current===r&&(Y(Ee),oo._currentValue=te)}var ps,Wr;function Ri(r){if(ps===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);ps=a&&a[1]||"",Wr=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ps+r+Wr}var Jh=!1;function ed(r,a){if(!r||Jh)return"";Jh=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(B){var L=B}Reflect.construct(r,[],I)}else{try{I.call()}catch(B){L=B}r.call(I.prototype)}}else{try{throw Error()}catch(B){L=B}(I=r())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(B){if(B&&L&&typeof B.stack=="string")return[B.stack,L.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var O=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");O&&O.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=h.DetermineComponentFrameRoot(),x=g[0],Q=g[1];if(x&&Q){var $=x.split(`
|
|
44
|
-
`),Z=Q.split(`
|
|
45
|
-
`);for(O=h=0;h<$.length&&!$[h].includes("DetermineComponentFrameRoot");)h++;for(;O<Z.length&&!Z[O].includes("DetermineComponentFrameRoot");)O++;if(h===$.length||O===Z.length)for(h=$.length-1,O=Z.length-1;1<=h&&0<=O&&$[h]!==Z[O];)O--;for(;1<=h&&0<=O;h--,O--)if($[h]!==Z[O]){if(h!==1||O!==1)do if(h--,O--,0>O||$[h]!==Z[O]){var U=`
|
|
46
|
-
`+$[h].replace(" at new "," at ");return r.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",r.displayName)),U}while(1<=h&&0<=O);break}}}finally{Jh=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?Ri(u):""}function uM(r,a){switch(r.tag){case 26:case 27:case 5:return Ri(r.type);case 16:return Ri("Lazy");case 13:return r.child!==a&&a!==null?Ri("Suspense Fallback"):Ri("Suspense");case 19:return Ri("SuspenseList");case 0:case 15:return ed(r.type,!1);case 11:return ed(r.type.render,!1);case 1:return ed(r.type,!0);case 31:return Ri("Activity");default:return""}}function Xy(r){try{var a="",u=null;do a+=uM(r,u),u=r,r=r.return;while(r);return a}catch(h){return`
|
|
47
|
-
Error generating stack: `+h.message+`
|
|
48
|
-
`+h.stack}}var td=Object.prototype.hasOwnProperty,id=i.unstable_scheduleCallback,nd=i.unstable_cancelCallback,fM=i.unstable_shouldYield,hM=i.unstable_requestPaint,mi=i.unstable_now,dM=i.unstable_getCurrentPriorityLevel,Ly=i.unstable_ImmediatePriority,Vy=i.unstable_UserBlockingPriority,Zc=i.unstable_NormalPriority,pM=i.unstable_LowPriority,_y=i.unstable_IdlePriority,mM=i.log,OM=i.unstable_setDisableYieldValue,Sa=null,Oi=null;function ms(r){if(typeof mM=="function"&&OM(r),Oi&&typeof Oi.setStrictMode=="function")try{Oi.setStrictMode(Sa,r)}catch{}}var gi=Math.clz32?Math.clz32:bM,gM=Math.log,yM=Math.LN2;function bM(r){return r>>>=0,r===0?32:31-(gM(r)/yM|0)|0}var Xc=256,Lc=262144,Vc=4194304;function or(r){var a=r&42;if(a!==0)return a;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function _c(r,a,u){var h=r.pendingLanes;if(h===0)return 0;var O=0,g=r.suspendedLanes,x=r.pingedLanes;r=r.warmLanes;var Q=h&134217727;return Q!==0?(h=Q&~g,h!==0?O=or(h):(x&=Q,x!==0?O=or(x):u||(u=Q&~r,u!==0&&(O=or(u))))):(Q=h&~g,Q!==0?O=or(Q):x!==0?O=or(x):u||(u=h&~r,u!==0&&(O=or(u)))),O===0?0:a!==0&&a!==O&&(a&g)===0&&(g=O&-O,u=a&-a,g>=u||g===32&&(u&4194048)!==0)?a:O}function xa(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function SM(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 jy(){var r=Vc;return Vc<<=1,(Vc&62914560)===0&&(Vc=4194304),r}function sd(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function va(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function xM(r,a,u,h,O,g){var x=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var Q=r.entanglements,$=r.expirationTimes,Z=r.hiddenUpdates;for(u=x&~u;0<u;){var U=31-gi(u),I=1<<U;Q[U]=0,$[U]=-1;var L=Z[U];if(L!==null)for(Z[U]=null,U=0;U<L.length;U++){var B=L[U];B!==null&&(B.lane&=-536870913)}u&=~I}h!==0&&By(r,h,0),g!==0&&O===0&&r.tag!==0&&(r.suspendedLanes|=g&~(x&~a))}function By(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var h=31-gi(a);r.entangledLanes|=a,r.entanglements[h]=r.entanglements[h]|1073741824|u&261930}function Ny(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var h=31-gi(u),O=1<<h;O&a|r[h]&a&&(r[h]|=a),u&=~O}}function Yy(r,a){var u=a&-a;return u=(u&42)!==0?1:rd(u),(u&(r.suspendedLanes|a))!==0?0:u}function rd(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function ld(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function qy(){var r=W.p;return r!==0?r:(r=window.event,r===void 0?32:$x(r.type))}function Uy(r,a){var u=W.p;try{return W.p=r,a()}finally{W.p=u}}var Os=Math.random().toString(36).slice(2),Zt="__reactFiber$"+Os,ii="__reactProps$"+Os,Hr="__reactContainer$"+Os,ad="__reactEvents$"+Os,vM="__reactListeners$"+Os,wM="__reactHandles$"+Os,Gy="__reactResources$"+Os,wa="__reactMarker$"+Os;function od(r){delete r[Zt],delete r[ii],delete r[ad],delete r[vM],delete r[wM]}function Ir(r){var a=r[Zt];if(a)return a;for(var u=r.parentNode;u;){if(a=u[Hr]||u[Zt]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=px(r);r!==null;){if(u=r[Zt])return u;r=px(r)}return a}r=u,u=r.parentNode}return null}function Fr(r){if(r=r[Zt]||r[Hr]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Qa(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(n(33))}function Kr(r){var a=r[Gy];return a||(a=r[Gy]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Mt(r){r[wa]=!0}var Wy=new Set,Hy={};function cr(r,a){Jr(r,a),Jr(r+"Capture",a)}function Jr(r,a){for(Hy[r]=a,r=0;r<a.length;r++)Wy.add(a[r])}var QM=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]*$"),Iy={},Fy={};function kM(r){return td.call(Fy,r)?!0:td.call(Iy,r)?!1:QM.test(r)?Fy[r]=!0:(Iy[r]=!0,!1)}function jc(r,a,u){if(kM(a))if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var h=a.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+u)}}function Bc(r,a,u){if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+u)}}function Ln(r,a,u,h){if(h===null)r.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(a,u,""+h)}}function zi(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Ky(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function TM(r,a,u){var h=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var O=h.get,g=h.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return O.call(this)},set:function(x){u=""+x,g.call(this,x)}}),Object.defineProperty(r,a,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(x){u=""+x},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function cd(r){if(!r._valueTracker){var a=Ky(r)?"checked":"value";r._valueTracker=TM(r,a,""+r[a])}}function Jy(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),h="";return r&&(h=Ky(r)?r.checked?"true":"false":r.value),r=h,r!==u?(a.setValue(r),!0):!1}function Nc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var CM=/[\n"\\]/g;function Di(r){return r.replace(CM,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function ud(r,a,u,h,O,g,x,Q){r.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?r.type=x:r.removeAttribute("type"),a!=null?x==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+zi(a)):r.value!==""+zi(a)&&(r.value=""+zi(a)):x!=="submit"&&x!=="reset"||r.removeAttribute("value"),a!=null?fd(r,x,zi(a)):u!=null?fd(r,x,zi(u)):h!=null&&r.removeAttribute("value"),O==null&&g!=null&&(r.defaultChecked=!!g),O!=null&&(r.checked=O&&typeof O!="function"&&typeof O!="symbol"),Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?r.name=""+zi(Q):r.removeAttribute("name")}function eb(r,a,u,h,O,g,x,Q){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||u!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){cd(r);return}u=u!=null?""+zi(u):"",a=a!=null?""+zi(a):u,Q||a===r.value||(r.value=a),r.defaultValue=a}h=h??O,h=typeof h!="function"&&typeof h!="symbol"&&!!h,r.checked=Q?r.checked:!!h,r.defaultChecked=!!h,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.name=x),cd(r)}function fd(r,a,u){a==="number"&&Nc(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function el(r,a,u,h){if(r=r.options,a){a={};for(var O=0;O<u.length;O++)a["$"+u[O]]=!0;for(u=0;u<r.length;u++)O=a.hasOwnProperty("$"+r[u].value),r[u].selected!==O&&(r[u].selected=O),O&&h&&(r[u].defaultSelected=!0)}else{for(u=""+zi(u),a=null,O=0;O<r.length;O++){if(r[O].value===u){r[O].selected=!0,h&&(r[O].defaultSelected=!0);return}a!==null||r[O].disabled||(a=r[O])}a!==null&&(a.selected=!0)}}function tb(r,a,u){if(a!=null&&(a=""+zi(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+zi(u):""}function ib(r,a,u,h){if(a==null){if(h!=null){if(u!=null)throw Error(n(92));if(we(h)){if(1<h.length)throw Error(n(93));h=h[0]}u=h}u==null&&(u=""),a=u}u=zi(a),r.defaultValue=u,h=r.textContent,h===u&&h!==""&&h!==null&&(r.value=h),cd(r)}function tl(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var AM=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 nb(r,a,u){var h=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":h?r.setProperty(a,u):typeof u!="number"||u===0||AM.has(a)?a==="float"?r.cssFloat=u:r[a]=(""+u).trim():r[a]=u+"px"}function sb(r,a,u){if(a!=null&&typeof a!="object")throw Error(n(62));if(r=r.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?r.setProperty(h,""):h==="float"?r.cssFloat="":r[h]="");for(var O in a)h=a[O],a.hasOwnProperty(O)&&u[O]!==h&&nb(r,O,h)}else for(var g in a)a.hasOwnProperty(g)&&nb(r,g,a[g])}function hd(r){if(r.indexOf("-")===-1)return!1;switch(r){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 PM=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"]]),$M=/^[\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 Yc(r){return $M.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Vn(){}var dd=null;function pd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var il=null,nl=null;function rb(r){var a=Fr(r);if(a&&(r=a.stateNode)){var u=r[ii]||null;e:switch(r=a.stateNode,a.type){case"input":if(ud(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Di(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var h=u[a];if(h!==r&&h.form===r.form){var O=h[ii]||null;if(!O)throw Error(n(90));ud(h,O.value,O.defaultValue,O.defaultValue,O.checked,O.defaultChecked,O.type,O.name)}}for(a=0;a<u.length;a++)h=u[a],h.form===r.form&&Jy(h)}break e;case"textarea":tb(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&el(r,!!u.multiple,a,!1)}}}var md=!1;function lb(r,a,u){if(md)return r(a,u);md=!0;try{var h=r(a);return h}finally{if(md=!1,(il!==null||nl!==null)&&(Mu(),il&&(a=il,r=nl,nl=il=null,rb(a),r)))for(a=0;a<r.length;a++)rb(r[a])}}function ka(r,a){var u=r.stateNode;if(u===null)return null;var h=u[ii]||null;if(h===null)return null;u=h[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,a,typeof u));return u}var _n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Od=!1;if(_n)try{var Ta={};Object.defineProperty(Ta,"passive",{get:function(){Od=!0}}),window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{Od=!1}var gs=null,gd=null,qc=null;function ab(){if(qc)return qc;var r,a=gd,u=a.length,h,O="value"in gs?gs.value:gs.textContent,g=O.length;for(r=0;r<u&&a[r]===O[r];r++);var x=u-r;for(h=1;h<=x&&a[u-h]===O[g-h];h++);return qc=O.slice(r,1<h?1-h:void 0)}function Uc(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Gc(){return!0}function ob(){return!1}function ni(r){function a(u,h,O,g,x){this._reactName=u,this._targetInst=O,this.type=h,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var Q in r)r.hasOwnProperty(Q)&&(u=r[Q],this[Q]=u?u(g):g[Q]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Gc:ob,this.isPropagationStopped=ob,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Gc)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Gc)},persist:function(){},isPersistent:Gc}),a}var ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wc=ni(ur),Ca=m({},ur,{view:0,detail:0}),MM=ni(Ca),yd,bd,Aa,Hc=m({},Ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Aa&&(Aa&&r.type==="mousemove"?(yd=r.screenX-Aa.screenX,bd=r.screenY-Aa.screenY):bd=yd=0,Aa=r),yd)},movementY:function(r){return"movementY"in r?r.movementY:bd}}),cb=ni(Hc),EM=m({},Hc,{dataTransfer:0}),RM=ni(EM),zM=m({},Ca,{relatedTarget:0}),Sd=ni(zM),DM=m({},ur,{animationName:0,elapsedTime:0,pseudoElement:0}),ZM=ni(DM),XM=m({},ur,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),LM=ni(XM),VM=m({},ur,{data:0}),ub=ni(VM),_M={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jM={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"},BM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function NM(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=BM[r])?!!a[r]:!1}function xd(){return NM}var YM=m({},Ca,{key:function(r){if(r.key){var a=_M[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Uc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?jM[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xd,charCode:function(r){return r.type==="keypress"?Uc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Uc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),qM=ni(YM),UM=m({},Hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fb=ni(UM),GM=m({},Ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xd}),WM=ni(GM),HM=m({},ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),IM=ni(HM),FM=m({},Hc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),KM=ni(FM),JM=m({},ur,{newState:0,oldState:0}),eE=ni(JM),tE=[9,13,27,32],vd=_n&&"CompositionEvent"in window,Pa=null;_n&&"documentMode"in document&&(Pa=document.documentMode);var iE=_n&&"TextEvent"in window&&!Pa,hb=_n&&(!vd||Pa&&8<Pa&&11>=Pa),db=" ",pb=!1;function mb(r,a){switch(r){case"keyup":return tE.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ob(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var sl=!1;function nE(r,a){switch(r){case"compositionend":return Ob(a);case"keypress":return a.which!==32?null:(pb=!0,db);case"textInput":return r=a.data,r===db&&pb?null:r;default:return null}}function sE(r,a){if(sl)return r==="compositionend"||!vd&&mb(r,a)?(r=ab(),qc=gd=gs=null,sl=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return hb&&a.locale!=="ko"?null:a.data;default:return null}}var rE={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 gb(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!rE[r.type]:a==="textarea"}function yb(r,a,u,h){il?nl?nl.push(h):nl=[h]:il=h,a=Lu(a,"onChange"),0<a.length&&(u=new Wc("onChange","change",null,u,h),r.push({event:u,listeners:a}))}var $a=null,Ma=null;function lE(r){ex(r,0)}function Ic(r){var a=Qa(r);if(Jy(a))return r}function bb(r,a){if(r==="change")return a}var Sb=!1;if(_n){var wd;if(_n){var Qd="oninput"in document;if(!Qd){var xb=document.createElement("div");xb.setAttribute("oninput","return;"),Qd=typeof xb.oninput=="function"}wd=Qd}else wd=!1;Sb=wd&&(!document.documentMode||9<document.documentMode)}function vb(){$a&&($a.detachEvent("onpropertychange",wb),Ma=$a=null)}function wb(r){if(r.propertyName==="value"&&Ic(Ma)){var a=[];yb(a,Ma,r,pd(r)),lb(lE,a)}}function aE(r,a,u){r==="focusin"?(vb(),$a=a,Ma=u,$a.attachEvent("onpropertychange",wb)):r==="focusout"&&vb()}function oE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ic(Ma)}function cE(r,a){if(r==="click")return Ic(a)}function uE(r,a){if(r==="input"||r==="change")return Ic(a)}function fE(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var yi=typeof Object.is=="function"?Object.is:fE;function Ea(r,a){if(yi(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),h=Object.keys(a);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var O=u[h];if(!td.call(a,O)||!yi(r[O],a[O]))return!1}return!0}function Qb(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function kb(r,a){var u=Qb(r);r=0;for(var h;u;){if(u.nodeType===3){if(h=r+u.textContent.length,r<=a&&h>=a)return{node:u,offset:a-r};r=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Qb(u)}}function Tb(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?Tb(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Cb(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Nc(r.document);a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=Nc(r.document)}return a}function kd(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var hE=_n&&"documentMode"in document&&11>=document.documentMode,rl=null,Td=null,Ra=null,Cd=!1;function Ab(r,a,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Cd||rl==null||rl!==Nc(h)||(h=rl,"selectionStart"in h&&kd(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ra&&Ea(Ra,h)||(Ra=h,h=Lu(Td,"onSelect"),0<h.length&&(a=new Wc("onSelect","select",null,a,u),r.push({event:a,listeners:h}),a.target=rl)))}function fr(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var ll={animationend:fr("Animation","AnimationEnd"),animationiteration:fr("Animation","AnimationIteration"),animationstart:fr("Animation","AnimationStart"),transitionrun:fr("Transition","TransitionRun"),transitionstart:fr("Transition","TransitionStart"),transitioncancel:fr("Transition","TransitionCancel"),transitionend:fr("Transition","TransitionEnd")},Ad={},Pb={};_n&&(Pb=document.createElement("div").style,"AnimationEvent"in window||(delete ll.animationend.animation,delete ll.animationiteration.animation,delete ll.animationstart.animation),"TransitionEvent"in window||delete ll.transitionend.transition);function hr(r){if(Ad[r])return Ad[r];if(!ll[r])return r;var a=ll[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in Pb)return Ad[r]=a[u];return r}var $b=hr("animationend"),Mb=hr("animationiteration"),Eb=hr("animationstart"),dE=hr("transitionrun"),pE=hr("transitionstart"),mE=hr("transitioncancel"),Rb=hr("transitionend"),zb=new Map,Pd="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(" ");Pd.push("scrollEnd");function en(r,a){zb.set(r,a),cr(a,[r])}var Fc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Zi=[],al=0,$d=0;function Kc(){for(var r=al,a=$d=al=0;a<r;){var u=Zi[a];Zi[a++]=null;var h=Zi[a];Zi[a++]=null;var O=Zi[a];Zi[a++]=null;var g=Zi[a];if(Zi[a++]=null,h!==null&&O!==null){var x=h.pending;x===null?O.next=O:(O.next=x.next,x.next=O),h.pending=O}g!==0&&Db(u,O,g)}}function Jc(r,a,u,h){Zi[al++]=r,Zi[al++]=a,Zi[al++]=u,Zi[al++]=h,$d|=h,r.lanes|=h,r=r.alternate,r!==null&&(r.lanes|=h)}function Md(r,a,u,h){return Jc(r,a,u,h),eu(r)}function dr(r,a){return Jc(r,null,null,a),eu(r)}function Db(r,a,u){r.lanes|=u;var h=r.alternate;h!==null&&(h.lanes|=u);for(var O=!1,g=r.return;g!==null;)g.childLanes|=u,h=g.alternate,h!==null&&(h.childLanes|=u),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(O=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,O&&a!==null&&(O=31-gi(u),r=g.hiddenUpdates,h=r[O],h===null?r[O]=[a]:h.push(a),a.lane=u|536870912),g):null}function eu(r){if(50<to)throw to=0,_p=null,Error(n(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var ol={};function OE(r,a,u,h){this.tag=r,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=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bi(r,a,u,h){return new OE(r,a,u,h)}function Ed(r){return r=r.prototype,!(!r||!r.isReactComponent)}function jn(r,a){var u=r.alternate;return u===null?(u=bi(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function Zb(r,a){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,a=u.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function tu(r,a,u,h,O,g){var x=0;if(h=r,typeof r=="function")Ed(r)&&(x=1);else if(typeof r=="string")x=xR(r,u,re.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case K:return r=bi(31,u,a,O),r.elementType=K,r.lanes=g,r;case v:return pr(u.children,O,g,a);case w:x=8,O|=24;break;case k:return r=bi(12,u,a,O|2),r.elementType=k,r.lanes=g,r;case R:return r=bi(13,u,a,O),r.elementType=R,r.lanes=g,r;case N:return r=bi(19,u,a,O),r.elementType=N,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case P:x=10;break e;case A:x=9;break e;case V:x=11;break e;case _:x=14;break e;case j:x=16,h=null;break e}x=29,u=Error(n(130,r===null?"null":typeof r,"")),h=null}return a=bi(x,u,a,O),a.elementType=r,a.type=h,a.lanes=g,a}function pr(r,a,u,h){return r=bi(7,r,h,a),r.lanes=u,r}function Rd(r,a,u){return r=bi(6,r,null,a),r.lanes=u,r}function Xb(r){var a=bi(18,null,null,0);return a.stateNode=r,a}function zd(r,a,u){return a=bi(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Lb=new WeakMap;function Xi(r,a){if(typeof r=="object"&&r!==null){var u=Lb.get(r);return u!==void 0?u:(a={value:r,source:a,stack:Xy(a)},Lb.set(r,a),a)}return{value:r,source:a,stack:Xy(a)}}var cl=[],ul=0,iu=null,za=0,Li=[],Vi=0,ys=null,mn=1,On="";function Bn(r,a){cl[ul++]=za,cl[ul++]=iu,iu=r,za=a}function Vb(r,a,u){Li[Vi++]=mn,Li[Vi++]=On,Li[Vi++]=ys,ys=r;var h=mn;r=On;var O=32-gi(h)-1;h&=~(1<<O),u+=1;var g=32-gi(a)+O;if(30<g){var x=O-O%5;g=(h&(1<<x)-1).toString(32),h>>=x,O-=x,mn=1<<32-gi(a)+O|u<<O|h,On=g+r}else mn=1<<g|u<<O|h,On=r}function Dd(r){r.return!==null&&(Bn(r,1),Vb(r,1,0))}function Zd(r){for(;r===iu;)iu=cl[--ul],cl[ul]=null,za=cl[--ul],cl[ul]=null;for(;r===ys;)ys=Li[--Vi],Li[Vi]=null,On=Li[--Vi],Li[Vi]=null,mn=Li[--Vi],Li[Vi]=null}function _b(r,a){Li[Vi++]=mn,Li[Vi++]=On,Li[Vi++]=ys,mn=a.id,On=a.overflow,ys=r}var Xt=null,rt=null,Ve=!1,bs=null,_i=!1,Xd=Error(n(519));function Ss(r){var a=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Da(Xi(a,r)),Xd}function jb(r){var a=r.stateNode,u=r.type,h=r.memoizedProps;switch(a[Zt]=r,a[ii]=h,u){case"dialog":ze("cancel",a),ze("close",a);break;case"iframe":case"object":case"embed":ze("load",a);break;case"video":case"audio":for(u=0;u<no.length;u++)ze(no[u],a);break;case"source":ze("error",a);break;case"img":case"image":case"link":ze("error",a),ze("load",a);break;case"details":ze("toggle",a);break;case"input":ze("invalid",a),eb(a,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":ze("invalid",a);break;case"textarea":ze("invalid",a),ib(a,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||h.suppressHydrationWarning===!0||sx(a.textContent,u)?(h.popover!=null&&(ze("beforetoggle",a),ze("toggle",a)),h.onScroll!=null&&ze("scroll",a),h.onScrollEnd!=null&&ze("scrollend",a),h.onClick!=null&&(a.onclick=Vn),a=!0):a=!1,a||Ss(r,!0)}function Bb(r){for(Xt=r.return;Xt;)switch(Xt.tag){case 5:case 31:case 13:_i=!1;return;case 27:case 3:_i=!0;return;default:Xt=Xt.return}}function fl(r){if(r!==Xt)return!1;if(!Ve)return Bb(r),Ve=!0,!1;var a=r.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||tm(r.type,r.memoizedProps)),u=!u),u&&rt&&Ss(r),Bb(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));rt=dx(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));rt=dx(r)}else a===27?(a=rt,zs(r.type)?(r=lm,lm=null,rt=r):rt=a):rt=Xt?Bi(r.stateNode.nextSibling):null;return!0}function mr(){rt=Xt=null,Ve=!1}function Ld(){var r=bs;return r!==null&&(ai===null?ai=r:ai.push.apply(ai,r),bs=null),r}function Da(r){bs===null?bs=[r]:bs.push(r)}var Vd=M(null),Or=null,Nn=null;function xs(r,a,u){ee(Vd,a._currentValue),a._currentValue=u}function Yn(r){r._currentValue=Vd.current,Y(Vd)}function _d(r,a,u){for(;r!==null;){var h=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),r===u)break;r=r.return}}function jd(r,a,u,h){var O=r.child;for(O!==null&&(O.return=r);O!==null;){var g=O.dependencies;if(g!==null){var x=O.child;g=g.firstContext;e:for(;g!==null;){var Q=g;g=O;for(var $=0;$<a.length;$++)if(Q.context===a[$]){g.lanes|=u,Q=g.alternate,Q!==null&&(Q.lanes|=u),_d(g.return,u,r),h||(x=null);break e}g=Q.next}}else if(O.tag===18){if(x=O.return,x===null)throw Error(n(341));x.lanes|=u,g=x.alternate,g!==null&&(g.lanes|=u),_d(x,u,r),x=null}else x=O.child;if(x!==null)x.return=O;else for(x=O;x!==null;){if(x===r){x=null;break}if(O=x.sibling,O!==null){O.return=x.return,x=O;break}x=x.return}O=x}}function hl(r,a,u,h){r=null;for(var O=a,g=!1;O!==null;){if(!g){if((O.flags&524288)!==0)g=!0;else if((O.flags&262144)!==0)break}if(O.tag===10){var x=O.alternate;if(x===null)throw Error(n(387));if(x=x.memoizedProps,x!==null){var Q=O.type;yi(O.pendingProps.value,x.value)||(r!==null?r.push(Q):r=[Q])}}else if(O===Ee.current){if(x=O.alternate,x===null)throw Error(n(387));x.memoizedState.memoizedState!==O.memoizedState.memoizedState&&(r!==null?r.push(oo):r=[oo])}O=O.return}r!==null&&jd(a,r,u,h),a.flags|=262144}function nu(r){for(r=r.firstContext;r!==null;){if(!yi(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function gr(r){Or=r,Nn=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Lt(r){return Nb(Or,r)}function su(r,a){return Or===null&&gr(r),Nb(r,a)}function Nb(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Nn===null){if(r===null)throw Error(n(308));Nn=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Nn=Nn.next=a;return u}var gE=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(u,h){r.push(h)}};this.abort=function(){a.aborted=!0,r.forEach(function(u){return u()})}},yE=i.unstable_scheduleCallback,bE=i.unstable_NormalPriority,yt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bd(){return{controller:new gE,data:new Map,refCount:0}}function Za(r){r.refCount--,r.refCount===0&&yE(bE,function(){r.controller.abort()})}var Xa=null,Nd=0,dl=0,pl=null;function SE(r,a){if(Xa===null){var u=Xa=[];Nd=0,dl=Up(),pl={status:"pending",value:void 0,then:function(h){u.push(h)}}}return Nd++,a.then(Yb,Yb),a}function Yb(){if(--Nd===0&&Xa!==null){pl!==null&&(pl.status="fulfilled");var r=Xa;Xa=null,dl=0,pl=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function xE(r,a){var u=[],h={status:"pending",value:null,reason:null,then:function(O){u.push(O)}};return r.then(function(){h.status="fulfilled",h.value=a;for(var O=0;O<u.length;O++)(0,u[O])(a)},function(O){for(h.status="rejected",h.reason=O,O=0;O<u.length;O++)(0,u[O])(void 0)}),h}var qb=X.S;X.S=function(r,a){AS=mi(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&SE(r,a),qb!==null&&qb(r,a)};var yr=M(null);function Yd(){var r=yr.current;return r!==null?r:Je.pooledCache}function ru(r,a){a===null?ee(yr,yr.current):ee(yr,a.pool)}function Ub(){var r=Yd();return r===null?null:{parent:yt._currentValue,pool:r}}var ml=Error(n(460)),qd=Error(n(474)),lu=Error(n(542)),au={then:function(){}};function Gb(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Wb(r,a,u){switch(u=r[u],u===void 0?r.push(a):u!==a&&(a.then(Vn,Vn),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Ib(r),r;default:if(typeof a.status=="string")a.then(Vn,Vn);else{if(r=Je,r!==null&&100<r.shellSuspendCounter)throw Error(n(482));r=a,r.status="pending",r.then(function(h){if(a.status==="pending"){var O=a;O.status="fulfilled",O.value=h}},function(h){if(a.status==="pending"){var O=a;O.status="rejected",O.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Ib(r),r}throw Sr=a,ml}}function br(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Sr=u,ml):u}}var Sr=null;function Hb(){if(Sr===null)throw Error(n(459));var r=Sr;return Sr=null,r}function Ib(r){if(r===ml||r===lu)throw Error(n(483))}var Ol=null,La=0;function ou(r){var a=La;return La+=1,Ol===null&&(Ol=[]),Wb(Ol,r,a)}function Va(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function cu(r,a){throw a.$$typeof===y?Error(n(525)):(r=Object.prototype.toString.call(a),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Fb(r){function a(z,E){if(r){var D=z.deletions;D===null?(z.deletions=[E],z.flags|=16):D.push(E)}}function u(z,E){if(!r)return null;for(;E!==null;)a(z,E),E=E.sibling;return null}function h(z){for(var E=new Map;z!==null;)z.key!==null?E.set(z.key,z):E.set(z.index,z),z=z.sibling;return E}function O(z,E){return z=jn(z,E),z.index=0,z.sibling=null,z}function g(z,E,D){return z.index=D,r?(D=z.alternate,D!==null?(D=D.index,D<E?(z.flags|=67108866,E):D):(z.flags|=67108866,E)):(z.flags|=1048576,E)}function x(z){return r&&z.alternate===null&&(z.flags|=67108866),z}function Q(z,E,D,H){return E===null||E.tag!==6?(E=Rd(D,z.mode,H),E.return=z,E):(E=O(E,D),E.return=z,E)}function $(z,E,D,H){var ve=D.type;return ve===v?U(z,E,D.props.children,H,D.key):E!==null&&(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&br(ve)===E.type)?(E=O(E,D.props),Va(E,D),E.return=z,E):(E=tu(D.type,D.key,D.props,null,z.mode,H),Va(E,D),E.return=z,E)}function Z(z,E,D,H){return E===null||E.tag!==4||E.stateNode.containerInfo!==D.containerInfo||E.stateNode.implementation!==D.implementation?(E=zd(D,z.mode,H),E.return=z,E):(E=O(E,D.children||[]),E.return=z,E)}function U(z,E,D,H,ve){return E===null||E.tag!==7?(E=pr(D,z.mode,H,ve),E.return=z,E):(E=O(E,D),E.return=z,E)}function I(z,E,D){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Rd(""+E,z.mode,D),E.return=z,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case b:return D=tu(E.type,E.key,E.props,null,z.mode,D),Va(D,E),D.return=z,D;case S:return E=zd(E,z.mode,D),E.return=z,E;case j:return E=br(E),I(z,E,D)}if(we(E)||ie(E))return E=pr(E,z.mode,D,null),E.return=z,E;if(typeof E.then=="function")return I(z,ou(E),D);if(E.$$typeof===P)return I(z,su(z,E),D);cu(z,E)}return null}function L(z,E,D,H){var ve=E!==null?E.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return ve!==null?null:Q(z,E,""+D,H);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case b:return D.key===ve?$(z,E,D,H):null;case S:return D.key===ve?Z(z,E,D,H):null;case j:return D=br(D),L(z,E,D,H)}if(we(D)||ie(D))return ve!==null?null:U(z,E,D,H,null);if(typeof D.then=="function")return L(z,E,ou(D),H);if(D.$$typeof===P)return L(z,E,su(z,D),H);cu(z,D)}return null}function B(z,E,D,H,ve){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return z=z.get(D)||null,Q(E,z,""+H,ve);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return z=z.get(H.key===null?D:H.key)||null,$(E,z,H,ve);case S:return z=z.get(H.key===null?D:H.key)||null,Z(E,z,H,ve);case j:return H=br(H),B(z,E,D,H,ve)}if(we(H)||ie(H))return z=z.get(D)||null,U(E,z,H,ve,null);if(typeof H.then=="function")return B(z,E,D,ou(H),ve);if(H.$$typeof===P)return B(z,E,D,su(E,H),ve);cu(E,H)}return null}function fe(z,E,D,H){for(var ve=null,Be=null,me=E,Pe=E=0,Xe=null;me!==null&&Pe<D.length;Pe++){me.index>Pe?(Xe=me,me=null):Xe=me.sibling;var Ne=L(z,me,D[Pe],H);if(Ne===null){me===null&&(me=Xe);break}r&&me&&Ne.alternate===null&&a(z,me),E=g(Ne,E,Pe),Be===null?ve=Ne:Be.sibling=Ne,Be=Ne,me=Xe}if(Pe===D.length)return u(z,me),Ve&&Bn(z,Pe),ve;if(me===null){for(;Pe<D.length;Pe++)me=I(z,D[Pe],H),me!==null&&(E=g(me,E,Pe),Be===null?ve=me:Be.sibling=me,Be=me);return Ve&&Bn(z,Pe),ve}for(me=h(me);Pe<D.length;Pe++)Xe=B(me,z,Pe,D[Pe],H),Xe!==null&&(r&&Xe.alternate!==null&&me.delete(Xe.key===null?Pe:Xe.key),E=g(Xe,E,Pe),Be===null?ve=Xe:Be.sibling=Xe,Be=Xe);return r&&me.forEach(function(Vs){return a(z,Vs)}),Ve&&Bn(z,Pe),ve}function Qe(z,E,D,H){if(D==null)throw Error(n(151));for(var ve=null,Be=null,me=E,Pe=E=0,Xe=null,Ne=D.next();me!==null&&!Ne.done;Pe++,Ne=D.next()){me.index>Pe?(Xe=me,me=null):Xe=me.sibling;var Vs=L(z,me,Ne.value,H);if(Vs===null){me===null&&(me=Xe);break}r&&me&&Vs.alternate===null&&a(z,me),E=g(Vs,E,Pe),Be===null?ve=Vs:Be.sibling=Vs,Be=Vs,me=Xe}if(Ne.done)return u(z,me),Ve&&Bn(z,Pe),ve;if(me===null){for(;!Ne.done;Pe++,Ne=D.next())Ne=I(z,Ne.value,H),Ne!==null&&(E=g(Ne,E,Pe),Be===null?ve=Ne:Be.sibling=Ne,Be=Ne);return Ve&&Bn(z,Pe),ve}for(me=h(me);!Ne.done;Pe++,Ne=D.next())Ne=B(me,z,Pe,Ne.value,H),Ne!==null&&(r&&Ne.alternate!==null&&me.delete(Ne.key===null?Pe:Ne.key),E=g(Ne,E,Pe),Be===null?ve=Ne:Be.sibling=Ne,Be=Ne);return r&&me.forEach(function(ER){return a(z,ER)}),Ve&&Bn(z,Pe),ve}function Fe(z,E,D,H){if(typeof D=="object"&&D!==null&&D.type===v&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case b:e:{for(var ve=D.key;E!==null;){if(E.key===ve){if(ve=D.type,ve===v){if(E.tag===7){u(z,E.sibling),H=O(E,D.props.children),H.return=z,z=H;break e}}else if(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&br(ve)===E.type){u(z,E.sibling),H=O(E,D.props),Va(H,D),H.return=z,z=H;break e}u(z,E);break}else a(z,E);E=E.sibling}D.type===v?(H=pr(D.props.children,z.mode,H,D.key),H.return=z,z=H):(H=tu(D.type,D.key,D.props,null,z.mode,H),Va(H,D),H.return=z,z=H)}return x(z);case S:e:{for(ve=D.key;E!==null;){if(E.key===ve)if(E.tag===4&&E.stateNode.containerInfo===D.containerInfo&&E.stateNode.implementation===D.implementation){u(z,E.sibling),H=O(E,D.children||[]),H.return=z,z=H;break e}else{u(z,E);break}else a(z,E);E=E.sibling}H=zd(D,z.mode,H),H.return=z,z=H}return x(z);case j:return D=br(D),Fe(z,E,D,H)}if(we(D))return fe(z,E,D,H);if(ie(D)){if(ve=ie(D),typeof ve!="function")throw Error(n(150));return D=ve.call(D),Qe(z,E,D,H)}if(typeof D.then=="function")return Fe(z,E,ou(D),H);if(D.$$typeof===P)return Fe(z,E,su(z,D),H);cu(z,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,E!==null&&E.tag===6?(u(z,E.sibling),H=O(E,D),H.return=z,z=H):(u(z,E),H=Rd(D,z.mode,H),H.return=z,z=H),x(z)):u(z,E)}return function(z,E,D,H){try{La=0;var ve=Fe(z,E,D,H);return Ol=null,ve}catch(me){if(me===ml||me===lu)throw me;var Be=bi(29,me,null,z.mode);return Be.lanes=H,Be.return=z,Be}finally{}}}var xr=Fb(!0),Kb=Fb(!1),vs=!1;function Ud(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gd(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ws(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Qs(r,a,u){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(Ye&2)!==0){var O=h.pending;return O===null?a.next=a:(a.next=O.next,O.next=a),h.pending=a,a=eu(r),Db(r,null,u),a}return Jc(r,h,a,u),eu(r)}function _a(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var h=a.lanes;h&=r.pendingLanes,u|=h,a.lanes=u,Ny(r,u)}}function Wd(r,a){var u=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var O=null,g=null;if(u=u.firstBaseUpdate,u!==null){do{var x={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};g===null?O=g=x:g=g.next=x,u=u.next}while(u!==null);g===null?O=g=a:g=g.next=a}else O=g=a;u={baseState:h.baseState,firstBaseUpdate:O,lastBaseUpdate:g,shared:h.shared,callbacks:h.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}var Hd=!1;function ja(){if(Hd){var r=pl;if(r!==null)throw r}}function Ba(r,a,u,h){Hd=!1;var O=r.updateQueue;vs=!1;var g=O.firstBaseUpdate,x=O.lastBaseUpdate,Q=O.shared.pending;if(Q!==null){O.shared.pending=null;var $=Q,Z=$.next;$.next=null,x===null?g=Z:x.next=Z,x=$;var U=r.alternate;U!==null&&(U=U.updateQueue,Q=U.lastBaseUpdate,Q!==x&&(Q===null?U.firstBaseUpdate=Z:Q.next=Z,U.lastBaseUpdate=$))}if(g!==null){var I=O.baseState;x=0,U=Z=$=null,Q=g;do{var L=Q.lane&-536870913,B=L!==Q.lane;if(B?(Ze&L)===L:(h&L)===L){L!==0&&L===dl&&(Hd=!0),U!==null&&(U=U.next={lane:0,tag:Q.tag,payload:Q.payload,callback:null,next:null});e:{var fe=r,Qe=Q;L=a;var Fe=u;switch(Qe.tag){case 1:if(fe=Qe.payload,typeof fe=="function"){I=fe.call(Fe,I,L);break e}I=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=Qe.payload,L=typeof fe=="function"?fe.call(Fe,I,L):fe,L==null)break e;I=m({},I,L);break e;case 2:vs=!0}}L=Q.callback,L!==null&&(r.flags|=64,B&&(r.flags|=8192),B=O.callbacks,B===null?O.callbacks=[L]:B.push(L))}else B={lane:L,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},U===null?(Z=U=B,$=I):U=U.next=B,x|=L;if(Q=Q.next,Q===null){if(Q=O.shared.pending,Q===null)break;B=Q,Q=B.next,B.next=null,O.lastBaseUpdate=B,O.shared.pending=null}}while(!0);U===null&&($=I),O.baseState=$,O.firstBaseUpdate=Z,O.lastBaseUpdate=U,g===null&&(O.shared.lanes=0),Ps|=x,r.lanes=x,r.memoizedState=I}}function Jb(r,a){if(typeof r!="function")throw Error(n(191,r));r.call(a)}function e1(r,a){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)Jb(u[r],a)}var gl=M(null),uu=M(0);function t1(r,a){r=Jn,ee(uu,r),ee(gl,a),Jn=r|a.baseLanes}function Id(){ee(uu,Jn),ee(gl,gl.current)}function Fd(){Jn=uu.current,Y(gl),Y(uu)}var Si=M(null),ji=null;function ks(r){var a=r.alternate;ee(pt,pt.current&1),ee(Si,r),ji===null&&(a===null||gl.current!==null||a.memoizedState!==null)&&(ji=r)}function Kd(r){ee(pt,pt.current),ee(Si,r),ji===null&&(ji=r)}function i1(r){r.tag===22?(ee(pt,pt.current),ee(Si,r),ji===null&&(ji=r)):Ts()}function Ts(){ee(pt,pt.current),ee(Si,Si.current)}function xi(r){Y(Si),ji===r&&(ji=null),Y(pt)}var pt=M(0);function fu(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||sm(u)||rm(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var qn=0,Ae=null,He=null,bt=null,hu=!1,yl=!1,vr=!1,du=0,Na=0,bl=null,vE=0;function ft(){throw Error(n(321))}function Jd(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!yi(r[u],a[u]))return!1;return!0}function ep(r,a,u,h,O,g){return qn=g,Ae=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,X.H=r===null||r.memoizedState===null?V1:mp,vr=!1,g=u(h,O),vr=!1,yl&&(g=s1(a,u,h,O)),n1(r),g}function n1(r){X.H=Ua;var a=He!==null&&He.next!==null;if(qn=0,bt=He=Ae=null,hu=!1,Na=0,bl=null,a)throw Error(n(300));r===null||St||(r=r.dependencies,r!==null&&nu(r)&&(St=!0))}function s1(r,a,u,h){Ae=r;var O=0;do{if(yl&&(bl=null),Na=0,yl=!1,25<=O)throw Error(n(301));if(O+=1,bt=He=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}X.H=_1,g=a(u,h)}while(yl);return g}function wE(){var r=X.H,a=r.useState()[0];return a=typeof a.then=="function"?Ya(a):a,r=r.useState()[0],(He!==null?He.memoizedState:null)!==r&&(Ae.flags|=1024),a}function tp(){var r=du!==0;return du=0,r}function ip(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function np(r){if(hu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}hu=!1}qn=0,bt=He=Ae=null,yl=!1,Na=du=0,bl=null}function Ft(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Ae.memoizedState=bt=r:bt=bt.next=r,bt}function mt(){if(He===null){var r=Ae.alternate;r=r!==null?r.memoizedState:null}else r=He.next;var a=bt===null?Ae.memoizedState:bt.next;if(a!==null)bt=a,He=r;else{if(r===null)throw Ae.alternate===null?Error(n(467)):Error(n(310));He=r,r={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},bt===null?Ae.memoizedState=bt=r:bt=bt.next=r}return bt}function pu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ya(r){var a=Na;return Na+=1,bl===null&&(bl=[]),r=Wb(bl,r,a),a=Ae,(bt===null?a.memoizedState:bt.next)===null&&(a=a.alternate,X.H=a===null||a.memoizedState===null?V1:mp),r}function mu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ya(r);if(r.$$typeof===P)return Lt(r)}throw Error(n(438,String(r)))}function sp(r){var a=null,u=Ae.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var h=Ae.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(O){return O.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=pu(),Ae.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(r),h=0;h<r;h++)u[h]=Oe;return a.index++,u}function Un(r,a){return typeof a=="function"?a(r):a}function Ou(r){var a=mt();return rp(a,He,r)}function rp(r,a,u){var h=r.queue;if(h===null)throw Error(n(311));h.lastRenderedReducer=u;var O=r.baseQueue,g=h.pending;if(g!==null){if(O!==null){var x=O.next;O.next=g.next,g.next=x}a.baseQueue=O=g,h.pending=null}if(g=r.baseState,O===null)r.memoizedState=g;else{a=O.next;var Q=x=null,$=null,Z=a,U=!1;do{var I=Z.lane&-536870913;if(I!==Z.lane?(Ze&I)===I:(qn&I)===I){var L=Z.revertLane;if(L===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),I===dl&&(U=!0);else if((qn&L)===L){Z=Z.next,L===dl&&(U=!0);continue}else I={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},$===null?(Q=$=I,x=g):$=$.next=I,Ae.lanes|=L,Ps|=L;I=Z.action,vr&&u(g,I),g=Z.hasEagerState?Z.eagerState:u(g,I)}else L={lane:I,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},$===null?(Q=$=L,x=g):$=$.next=L,Ae.lanes|=I,Ps|=I;Z=Z.next}while(Z!==null&&Z!==a);if($===null?x=g:$.next=Q,!yi(g,r.memoizedState)&&(St=!0,U&&(u=pl,u!==null)))throw u;r.memoizedState=g,r.baseState=x,r.baseQueue=$,h.lastRenderedState=g}return O===null&&(h.lanes=0),[r.memoizedState,h.dispatch]}function lp(r){var a=mt(),u=a.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var h=u.dispatch,O=u.pending,g=a.memoizedState;if(O!==null){u.pending=null;var x=O=O.next;do g=r(g,x.action),x=x.next;while(x!==O);yi(g,a.memoizedState)||(St=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),u.lastRenderedState=g}return[g,h]}function r1(r,a,u){var h=Ae,O=mt(),g=Ve;if(g){if(u===void 0)throw Error(n(407));u=u()}else u=a();var x=!yi((He||O).memoizedState,u);if(x&&(O.memoizedState=u,St=!0),O=O.queue,cp(o1.bind(null,h,O,r),[r]),O.getSnapshot!==a||x||bt!==null&&bt.memoizedState.tag&1){if(h.flags|=2048,Sl(9,{destroy:void 0},a1.bind(null,h,O,u,a),null),Je===null)throw Error(n(349));g||(qn&127)!==0||l1(h,a,u)}return u}function l1(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=Ae.updateQueue,a===null?(a=pu(),Ae.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function a1(r,a,u,h){a.value=u,a.getSnapshot=h,c1(a)&&u1(r)}function o1(r,a,u){return u(function(){c1(a)&&u1(r)})}function c1(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!yi(r,u)}catch{return!0}}function u1(r){var a=dr(r,2);a!==null&&oi(a,r,2)}function ap(r){var a=Ft();if(typeof r=="function"){var u=r;if(r=u(),vr){ms(!0);try{u()}finally{ms(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:r},a}function f1(r,a,u,h){return r.baseState=u,rp(r,He,typeof h=="function"?h:Un)}function QE(r,a,u,h,O){if(bu(r))throw Error(n(485));if(r=a.action,r!==null){var g={payload:O,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};X.T!==null?u(!0):g.isTransition=!1,h(g),u=a.pending,u===null?(g.next=a.pending=g,h1(a,g)):(g.next=u.next,a.pending=u.next=g)}}function h1(r,a){var u=a.action,h=a.payload,O=r.state;if(a.isTransition){var g=X.T,x={};X.T=x;try{var Q=u(O,h),$=X.S;$!==null&&$(x,Q),d1(r,a,Q)}catch(Z){op(r,a,Z)}finally{g!==null&&x.types!==null&&(g.types=x.types),X.T=g}}else try{g=u(O,h),d1(r,a,g)}catch(Z){op(r,a,Z)}}function d1(r,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){p1(r,a,h)},function(h){return op(r,a,h)}):p1(r,a,u)}function p1(r,a,u){a.status="fulfilled",a.value=u,m1(a),r.state=u,a=r.pending,a!==null&&(u=a.next,u===a?r.pending=null:(u=u.next,a.next=u,h1(r,u)))}function op(r,a,u){var h=r.pending;if(r.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=u,m1(a),a=a.next;while(a!==h)}r.action=null}function m1(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function O1(r,a){return a}function g1(r,a){if(Ve){var u=Je.formState;if(u!==null){e:{var h=Ae;if(Ve){if(rt){t:{for(var O=rt,g=_i;O.nodeType!==8;){if(!g){O=null;break t}if(O=Bi(O.nextSibling),O===null){O=null;break t}}g=O.data,O=g==="F!"||g==="F"?O:null}if(O){rt=Bi(O.nextSibling),h=O.data==="F!";break e}}Ss(h)}h=!1}h&&(a=u[0])}}return u=Ft(),u.memoizedState=u.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:O1,lastRenderedState:a},u.queue=h,u=Z1.bind(null,Ae,h),h.dispatch=u,h=ap(!1),g=pp.bind(null,Ae,!1,h.queue),h=Ft(),O={state:a,dispatch:null,action:r,pending:null},h.queue=O,u=QE.bind(null,Ae,O,g,u),O.dispatch=u,h.memoizedState=r,[a,u,!1]}function y1(r){var a=mt();return b1(a,He,r)}function b1(r,a,u){if(a=rp(r,a,O1)[0],r=Ou(Un)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=Ya(a)}catch(x){throw x===ml?lu:x}else h=a;a=mt();var O=a.queue,g=O.dispatch;return u!==a.memoizedState&&(Ae.flags|=2048,Sl(9,{destroy:void 0},kE.bind(null,O,u),null)),[h,g,r]}function kE(r,a){r.action=a}function S1(r){var a=mt(),u=He;if(u!==null)return b1(a,u,r);mt(),a=a.memoizedState,u=mt();var h=u.queue.dispatch;return u.memoizedState=r,[a,h,!1]}function Sl(r,a,u,h){return r={tag:r,create:u,deps:h,inst:a,next:null},a=Ae.updateQueue,a===null&&(a=pu(),Ae.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=r.next=r:(h=u.next,u.next=r,r.next=h,a.lastEffect=r),r}function x1(){return mt().memoizedState}function gu(r,a,u,h){var O=Ft();Ae.flags|=r,O.memoizedState=Sl(1|a,{destroy:void 0},u,h===void 0?null:h)}function yu(r,a,u,h){var O=mt();h=h===void 0?null:h;var g=O.memoizedState.inst;He!==null&&h!==null&&Jd(h,He.memoizedState.deps)?O.memoizedState=Sl(a,g,u,h):(Ae.flags|=r,O.memoizedState=Sl(1|a,g,u,h))}function v1(r,a){gu(8390656,8,r,a)}function cp(r,a){yu(2048,8,r,a)}function TE(r){Ae.flags|=4;var a=Ae.updateQueue;if(a===null)a=pu(),Ae.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function w1(r){var a=mt().memoizedState;return TE({ref:a,nextImpl:r}),function(){if((Ye&2)!==0)throw Error(n(440));return a.impl.apply(void 0,arguments)}}function Q1(r,a){return yu(4,2,r,a)}function k1(r,a){return yu(4,4,r,a)}function T1(r,a){if(typeof a=="function"){r=r();var u=a(r);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function C1(r,a,u){u=u!=null?u.concat([r]):null,yu(4,4,T1.bind(null,a,r),u)}function up(){}function A1(r,a){var u=mt();a=a===void 0?null:a;var h=u.memoizedState;return a!==null&&Jd(a,h[1])?h[0]:(u.memoizedState=[r,a],r)}function P1(r,a){var u=mt();a=a===void 0?null:a;var h=u.memoizedState;if(a!==null&&Jd(a,h[1]))return h[0];if(h=r(),vr){ms(!0);try{r()}finally{ms(!1)}}return u.memoizedState=[h,a],h}function fp(r,a,u){return u===void 0||(qn&1073741824)!==0&&(Ze&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=$S(),Ae.lanes|=r,Ps|=r,u)}function $1(r,a,u,h){return yi(u,a)?u:gl.current!==null?(r=fp(r,u,h),yi(r,a)||(St=!0),r):(qn&42)===0||(qn&1073741824)!==0&&(Ze&261930)===0?(St=!0,r.memoizedState=u):(r=$S(),Ae.lanes|=r,Ps|=r,a)}function M1(r,a,u,h,O){var g=W.p;W.p=g!==0&&8>g?g:8;var x=X.T,Q={};X.T=Q,pp(r,!1,a,u);try{var $=O(),Z=X.S;if(Z!==null&&Z(Q,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var U=xE($,h);qa(r,a,U,Qi(r))}else qa(r,a,h,Qi(r))}catch(I){qa(r,a,{then:function(){},status:"rejected",reason:I},Qi())}finally{W.p=g,x!==null&&Q.types!==null&&(x.types=Q.types),X.T=x}}function CE(){}function hp(r,a,u,h){if(r.tag!==5)throw Error(n(476));var O=E1(r).queue;M1(r,O,a,te,u===null?CE:function(){return R1(r),u(h)})}function E1(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:te},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:u},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function R1(r){var a=E1(r);a.next===null&&(a=r.alternate.memoizedState),qa(r,a.next.queue,{},Qi())}function dp(){return Lt(oo)}function z1(){return mt().memoizedState}function D1(){return mt().memoizedState}function AE(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=Qi();r=ws(u);var h=Qs(a,r,u);h!==null&&(oi(h,a,u),_a(h,a,u)),a={cache:Bd()},r.payload=a;return}a=a.return}}function PE(r,a,u){var h=Qi();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},bu(r)?X1(a,u):(u=Md(r,a,u,h),u!==null&&(oi(u,r,h),L1(u,a,h)))}function Z1(r,a,u){var h=Qi();qa(r,a,u,h)}function qa(r,a,u,h){var O={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(bu(r))X1(a,O);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var x=a.lastRenderedState,Q=g(x,u);if(O.hasEagerState=!0,O.eagerState=Q,yi(Q,x))return Jc(r,a,O,0),Je===null&&Kc(),!1}catch{}finally{}if(u=Md(r,a,O,h),u!==null)return oi(u,r,h),L1(u,a,h),!0}return!1}function pp(r,a,u,h){if(h={lane:2,revertLane:Up(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},bu(r)){if(a)throw Error(n(479))}else a=Md(r,u,h,2),a!==null&&oi(a,r,2)}function bu(r){var a=r.alternate;return r===Ae||a!==null&&a===Ae}function X1(r,a){yl=hu=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function L1(r,a,u){if((u&4194048)!==0){var h=a.lanes;h&=r.pendingLanes,u|=h,a.lanes=u,Ny(r,u)}}var Ua={readContext:Lt,use:mu,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Ua.useEffectEvent=ft;var V1={readContext:Lt,use:mu,useCallback:function(r,a){return Ft().memoizedState=[r,a===void 0?null:a],r},useContext:Lt,useEffect:v1,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,gu(4194308,4,T1.bind(null,a,r),u)},useLayoutEffect:function(r,a){return gu(4194308,4,r,a)},useInsertionEffect:function(r,a){gu(4,2,r,a)},useMemo:function(r,a){var u=Ft();a=a===void 0?null:a;var h=r();if(vr){ms(!0);try{r()}finally{ms(!1)}}return u.memoizedState=[h,a],h},useReducer:function(r,a,u){var h=Ft();if(u!==void 0){var O=u(a);if(vr){ms(!0);try{u(a)}finally{ms(!1)}}}else O=a;return h.memoizedState=h.baseState=O,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:O},h.queue=r,r=r.dispatch=PE.bind(null,Ae,r),[h.memoizedState,r]},useRef:function(r){var a=Ft();return r={current:r},a.memoizedState=r},useState:function(r){r=ap(r);var a=r.queue,u=Z1.bind(null,Ae,a);return a.dispatch=u,[r.memoizedState,u]},useDebugValue:up,useDeferredValue:function(r,a){var u=Ft();return fp(u,r,a)},useTransition:function(){var r=ap(!1);return r=M1.bind(null,Ae,r.queue,!0,!1),Ft().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var h=Ae,O=Ft();if(Ve){if(u===void 0)throw Error(n(407));u=u()}else{if(u=a(),Je===null)throw Error(n(349));(Ze&127)!==0||l1(h,a,u)}O.memoizedState=u;var g={value:u,getSnapshot:a};return O.queue=g,v1(o1.bind(null,h,g,r),[r]),h.flags|=2048,Sl(9,{destroy:void 0},a1.bind(null,h,g,u,a),null),u},useId:function(){var r=Ft(),a=Je.identifierPrefix;if(Ve){var u=On,h=mn;u=(h&~(1<<32-gi(h)-1)).toString(32)+u,a="_"+a+"R_"+u,u=du++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=vE++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:dp,useFormState:g1,useActionState:g1,useOptimistic:function(r){var a=Ft();a.memoizedState=a.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=pp.bind(null,Ae,!0,u),u.dispatch=a,[r,a]},useMemoCache:sp,useCacheRefresh:function(){return Ft().memoizedState=AE.bind(null,Ae)},useEffectEvent:function(r){var a=Ft(),u={impl:r};return a.memoizedState=u,function(){if((Ye&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},mp={readContext:Lt,use:mu,useCallback:A1,useContext:Lt,useEffect:cp,useImperativeHandle:C1,useInsertionEffect:Q1,useLayoutEffect:k1,useMemo:P1,useReducer:Ou,useRef:x1,useState:function(){return Ou(Un)},useDebugValue:up,useDeferredValue:function(r,a){var u=mt();return $1(u,He.memoizedState,r,a)},useTransition:function(){var r=Ou(Un)[0],a=mt().memoizedState;return[typeof r=="boolean"?r:Ya(r),a]},useSyncExternalStore:r1,useId:z1,useHostTransitionStatus:dp,useFormState:y1,useActionState:y1,useOptimistic:function(r,a){var u=mt();return f1(u,He,r,a)},useMemoCache:sp,useCacheRefresh:D1};mp.useEffectEvent=w1;var _1={readContext:Lt,use:mu,useCallback:A1,useContext:Lt,useEffect:cp,useImperativeHandle:C1,useInsertionEffect:Q1,useLayoutEffect:k1,useMemo:P1,useReducer:lp,useRef:x1,useState:function(){return lp(Un)},useDebugValue:up,useDeferredValue:function(r,a){var u=mt();return He===null?fp(u,r,a):$1(u,He.memoizedState,r,a)},useTransition:function(){var r=lp(Un)[0],a=mt().memoizedState;return[typeof r=="boolean"?r:Ya(r),a]},useSyncExternalStore:r1,useId:z1,useHostTransitionStatus:dp,useFormState:S1,useActionState:S1,useOptimistic:function(r,a){var u=mt();return He!==null?f1(u,He,r,a):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:sp,useCacheRefresh:D1};_1.useEffectEvent=w1;function Op(r,a,u,h){a=r.memoizedState,u=u(h,a),u=u==null?a:m({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var gp={enqueueSetState:function(r,a,u){r=r._reactInternals;var h=Qi(),O=ws(h);O.payload=a,u!=null&&(O.callback=u),a=Qs(r,O,h),a!==null&&(oi(a,r,h),_a(a,r,h))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var h=Qi(),O=ws(h);O.tag=1,O.payload=a,u!=null&&(O.callback=u),a=Qs(r,O,h),a!==null&&(oi(a,r,h),_a(a,r,h))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=Qi(),h=ws(u);h.tag=2,a!=null&&(h.callback=a),a=Qs(r,h,u),a!==null&&(oi(a,r,u),_a(a,r,u))}};function j1(r,a,u,h,O,g,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,g,x):a.prototype&&a.prototype.isPureReactComponent?!Ea(u,h)||!Ea(O,g):!0}function B1(r,a,u,h){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,h),a.state!==r&&gp.enqueueReplaceState(a,a.state,null)}function wr(r,a){var u=a;if("ref"in a){u={};for(var h in a)h!=="ref"&&(u[h]=a[h])}if(r=r.defaultProps){u===a&&(u=m({},u));for(var O in r)u[O]===void 0&&(u[O]=r[O])}return u}function N1(r){Fc(r)}function Y1(r){console.error(r)}function q1(r){Fc(r)}function Su(r,a){try{var u=r.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function U1(r,a,u){try{var h=r.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(O){setTimeout(function(){throw O})}}function yp(r,a,u){return u=ws(u),u.tag=3,u.payload={element:null},u.callback=function(){Su(r,a)},u}function G1(r){return r=ws(r),r.tag=3,r}function W1(r,a,u,h){var O=u.type.getDerivedStateFromError;if(typeof O=="function"){var g=h.value;r.payload=function(){return O(g)},r.callback=function(){U1(a,u,h)}}var x=u.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(r.callback=function(){U1(a,u,h),typeof O!="function"&&($s===null?$s=new Set([this]):$s.add(this));var Q=h.stack;this.componentDidCatch(h.value,{componentStack:Q!==null?Q:""})})}function $E(r,a,u,h,O){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=u.alternate,a!==null&&hl(a,u,O,!0),u=Si.current,u!==null){switch(u.tag){case 31:case 13:return ji===null?Eu():u.alternate===null&&ht===0&&(ht=3),u.flags&=-257,u.flags|=65536,u.lanes=O,h===au?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([h]):a.add(h),Np(r,h,O)),!1;case 22:return u.flags|=65536,h===au?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([h]):u.add(h)),Np(r,h,O)),!1}throw Error(n(435,u.tag))}return Np(r,h,O),Eu(),!1}if(Ve)return a=Si.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=O,h!==Xd&&(r=Error(n(422),{cause:h}),Da(Xi(r,u)))):(h!==Xd&&(a=Error(n(423),{cause:h}),Da(Xi(a,u))),r=r.current.alternate,r.flags|=65536,O&=-O,r.lanes|=O,h=Xi(h,u),O=yp(r.stateNode,h,O),Wd(r,O),ht!==4&&(ht=2)),!1;var g=Error(n(520),{cause:h});if(g=Xi(g,u),eo===null?eo=[g]:eo.push(g),ht!==4&&(ht=2),a===null)return!0;h=Xi(h,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,r=O&-O,u.lanes|=r,r=yp(u.stateNode,h,r),Wd(u,r),!1;case 1:if(a=u.type,g=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&($s===null||!$s.has(g))))return u.flags|=65536,O&=-O,u.lanes|=O,O=G1(O),W1(O,r,u,h),Wd(u,O),!1}u=u.return}while(u!==null);return!1}var bp=Error(n(461)),St=!1;function Vt(r,a,u,h){a.child=r===null?Kb(a,null,u,h):xr(a,r.child,u,h)}function H1(r,a,u,h,O){u=u.render;var g=a.ref;if("ref"in h){var x={};for(var Q in h)Q!=="ref"&&(x[Q]=h[Q])}else x=h;return gr(a),h=ep(r,a,u,x,g,O),Q=tp(),r!==null&&!St?(ip(r,a,O),Gn(r,a,O)):(Ve&&Q&&Dd(a),a.flags|=1,Vt(r,a,h,O),a.child)}function I1(r,a,u,h,O){if(r===null){var g=u.type;return typeof g=="function"&&!Ed(g)&&g.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=g,F1(r,a,g,h,O)):(r=tu(u.type,null,h,a,a.mode,O),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!Cp(r,O)){var x=g.memoizedProps;if(u=u.compare,u=u!==null?u:Ea,u(x,h)&&r.ref===a.ref)return Gn(r,a,O)}return a.flags|=1,r=jn(g,h),r.ref=a.ref,r.return=a,a.child=r}function F1(r,a,u,h,O){if(r!==null){var g=r.memoizedProps;if(Ea(g,h)&&r.ref===a.ref)if(St=!1,a.pendingProps=h=g,Cp(r,O))(r.flags&131072)!==0&&(St=!0);else return a.lanes=r.lanes,Gn(r,a,O)}return Sp(r,a,u,h,O)}function K1(r,a,u,h){var O=h.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|u:u,r!==null){for(h=a.child=r.child,O=0;h!==null;)O=O|h.lanes|h.childLanes,h=h.sibling;h=O&~g}else h=0,a.child=null;return J1(r,a,g,u,h)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&ru(a,g!==null?g.cachePool:null),g!==null?t1(a,g):Id(),i1(a);else return h=a.lanes=536870912,J1(r,a,g!==null?g.baseLanes|u:u,u,h)}else g!==null?(ru(a,g.cachePool),t1(a,g),Ts(),a.memoizedState=null):(r!==null&&ru(a,null),Id(),Ts());return Vt(r,a,O,u),a.child}function Ga(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function J1(r,a,u,h,O){var g=Yd();return g=g===null?null:{parent:yt._currentValue,pool:g},a.memoizedState={baseLanes:u,cachePool:g},r!==null&&ru(a,null),Id(),i1(a),r!==null&&hl(r,a,h,!0),a.childLanes=O,null}function xu(r,a){return a=wu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function eS(r,a,u){return xr(a,r.child,null,u),r=xu(a,a.pendingProps),r.flags|=2,xi(a),a.memoizedState=null,r}function ME(r,a,u){var h=a.pendingProps,O=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Ve){if(h.mode==="hidden")return r=xu(a,h),a.lanes=536870912,Ga(null,r);if(Kd(a),(r=rt)?(r=hx(r,_i),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ys!==null?{id:mn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},u=Xb(r),u.return=a,a.child=u,Xt=a,rt=null)):r=null,r===null)throw Ss(a);return a.lanes=536870912,null}return xu(a,h)}var g=r.memoizedState;if(g!==null){var x=g.dehydrated;if(Kd(a),O)if(a.flags&256)a.flags&=-257,a=eS(r,a,u);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(n(558));else if(St||hl(r,a,u,!1),O=(u&r.childLanes)!==0,St||O){if(h=Je,h!==null&&(x=Yy(h,u),x!==0&&x!==g.retryLane))throw g.retryLane=x,dr(r,x),oi(h,r,x),bp;Eu(),a=eS(r,a,u)}else r=g.treeContext,rt=Bi(x.nextSibling),Xt=a,Ve=!0,bs=null,_i=!1,r!==null&&_b(a,r),a=xu(a,h),a.flags|=4096;return a}return r=jn(r.child,{mode:h.mode,children:h.children}),r.ref=a.ref,a.child=r,r.return=a,r}function vu(r,a){var u=a.ref;if(u===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(n(284));(r===null||r.ref!==u)&&(a.flags|=4194816)}}function Sp(r,a,u,h,O){return gr(a),u=ep(r,a,u,h,void 0,O),h=tp(),r!==null&&!St?(ip(r,a,O),Gn(r,a,O)):(Ve&&h&&Dd(a),a.flags|=1,Vt(r,a,u,O),a.child)}function tS(r,a,u,h,O,g){return gr(a),a.updateQueue=null,u=s1(a,h,u,O),n1(r),h=tp(),r!==null&&!St?(ip(r,a,g),Gn(r,a,g)):(Ve&&h&&Dd(a),a.flags|=1,Vt(r,a,u,g),a.child)}function iS(r,a,u,h,O){if(gr(a),a.stateNode===null){var g=ol,x=u.contextType;typeof x=="object"&&x!==null&&(g=Lt(x)),g=new u(h,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=gp,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=h,g.state=a.memoizedState,g.refs={},Ud(a),x=u.contextType,g.context=typeof x=="object"&&x!==null?Lt(x):ol,g.state=a.memoizedState,x=u.getDerivedStateFromProps,typeof x=="function"&&(Op(a,u,x,h),g.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(x=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&gp.enqueueReplaceState(g,g.state,null),Ba(a,h,g,O),ja(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(r===null){g=a.stateNode;var Q=a.memoizedProps,$=wr(u,Q);g.props=$;var Z=g.context,U=u.contextType;x=ol,typeof U=="object"&&U!==null&&(x=Lt(U));var I=u.getDerivedStateFromProps;U=typeof I=="function"||typeof g.getSnapshotBeforeUpdate=="function",Q=a.pendingProps!==Q,U||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(Q||Z!==x)&&B1(a,g,h,x),vs=!1;var L=a.memoizedState;g.state=L,Ba(a,h,g,O),ja(),Z=a.memoizedState,Q||L!==Z||vs?(typeof I=="function"&&(Op(a,u,I,h),Z=a.memoizedState),($=vs||j1(a,u,$,h,L,Z,x))?(U||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=Z),g.props=h,g.state=Z,g.context=x,h=$):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{g=a.stateNode,Gd(r,a),x=a.memoizedProps,U=wr(u,x),g.props=U,I=a.pendingProps,L=g.context,Z=u.contextType,$=ol,typeof Z=="object"&&Z!==null&&($=Lt(Z)),Q=u.getDerivedStateFromProps,(Z=typeof Q=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==I||L!==$)&&B1(a,g,h,$),vs=!1,L=a.memoizedState,g.state=L,Ba(a,h,g,O),ja();var B=a.memoizedState;x!==I||L!==B||vs||r!==null&&r.dependencies!==null&&nu(r.dependencies)?(typeof Q=="function"&&(Op(a,u,Q,h),B=a.memoizedState),(U=vs||j1(a,u,U,h,L,B,$)||r!==null&&r.dependencies!==null&&nu(r.dependencies))?(Z||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(h,B,$),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(h,B,$)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&L===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&L===r.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=B),g.props=h,g.state=B,g.context=$,h=U):(typeof g.componentDidUpdate!="function"||x===r.memoizedProps&&L===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&L===r.memoizedState||(a.flags|=1024),h=!1)}return g=h,vu(r,a),h=(a.flags&128)!==0,g||h?(g=a.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&h?(a.child=xr(a,r.child,null,O),a.child=xr(a,null,u,O)):Vt(r,a,u,O),a.memoizedState=g.state,r=a.child):r=Gn(r,a,O),r}function nS(r,a,u,h){return mr(),a.flags|=256,Vt(r,a,u,h),a.child}var xp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vp(r){return{baseLanes:r,cachePool:Ub()}}function wp(r,a,u){return r=r!==null?r.childLanes&~u:0,a&&(r|=wi),r}function sS(r,a,u){var h=a.pendingProps,O=!1,g=(a.flags&128)!==0,x;if((x=g)||(x=r!==null&&r.memoizedState===null?!1:(pt.current&2)!==0),x&&(O=!0,a.flags&=-129),x=(a.flags&32)!==0,a.flags&=-33,r===null){if(Ve){if(O?ks(a):Ts(),(r=rt)?(r=hx(r,_i),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ys!==null?{id:mn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},u=Xb(r),u.return=a,a.child=u,Xt=a,rt=null)):r=null,r===null)throw Ss(a);return rm(r)?a.lanes=32:a.lanes=536870912,null}var Q=h.children;return h=h.fallback,O?(Ts(),O=a.mode,Q=wu({mode:"hidden",children:Q},O),h=pr(h,O,u,null),Q.return=a,h.return=a,Q.sibling=h,a.child=Q,h=a.child,h.memoizedState=vp(u),h.childLanes=wp(r,x,u),a.memoizedState=xp,Ga(null,h)):(ks(a),Qp(a,Q))}var $=r.memoizedState;if($!==null&&(Q=$.dehydrated,Q!==null)){if(g)a.flags&256?(ks(a),a.flags&=-257,a=kp(r,a,u)):a.memoizedState!==null?(Ts(),a.child=r.child,a.flags|=128,a=null):(Ts(),Q=h.fallback,O=a.mode,h=wu({mode:"visible",children:h.children},O),Q=pr(Q,O,u,null),Q.flags|=2,h.return=a,Q.return=a,h.sibling=Q,a.child=h,xr(a,r.child,null,u),h=a.child,h.memoizedState=vp(u),h.childLanes=wp(r,x,u),a.memoizedState=xp,a=Ga(null,h));else if(ks(a),rm(Q)){if(x=Q.nextSibling&&Q.nextSibling.dataset,x)var Z=x.dgst;x=Z,h=Error(n(419)),h.stack="",h.digest=x,Da({value:h,source:null,stack:null}),a=kp(r,a,u)}else if(St||hl(r,a,u,!1),x=(u&r.childLanes)!==0,St||x){if(x=Je,x!==null&&(h=Yy(x,u),h!==0&&h!==$.retryLane))throw $.retryLane=h,dr(r,h),oi(x,r,h),bp;sm(Q)||Eu(),a=kp(r,a,u)}else sm(Q)?(a.flags|=192,a.child=r.child,a=null):(r=$.treeContext,rt=Bi(Q.nextSibling),Xt=a,Ve=!0,bs=null,_i=!1,r!==null&&_b(a,r),a=Qp(a,h.children),a.flags|=4096);return a}return O?(Ts(),Q=h.fallback,O=a.mode,$=r.child,Z=$.sibling,h=jn($,{mode:"hidden",children:h.children}),h.subtreeFlags=$.subtreeFlags&65011712,Z!==null?Q=jn(Z,Q):(Q=pr(Q,O,u,null),Q.flags|=2),Q.return=a,h.return=a,h.sibling=Q,a.child=h,Ga(null,h),h=a.child,Q=r.child.memoizedState,Q===null?Q=vp(u):(O=Q.cachePool,O!==null?($=yt._currentValue,O=O.parent!==$?{parent:$,pool:$}:O):O=Ub(),Q={baseLanes:Q.baseLanes|u,cachePool:O}),h.memoizedState=Q,h.childLanes=wp(r,x,u),a.memoizedState=xp,Ga(r.child,h)):(ks(a),u=r.child,r=u.sibling,u=jn(u,{mode:"visible",children:h.children}),u.return=a,u.sibling=null,r!==null&&(x=a.deletions,x===null?(a.deletions=[r],a.flags|=16):x.push(r)),a.child=u,a.memoizedState=null,u)}function Qp(r,a){return a=wu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function wu(r,a){return r=bi(22,r,null,a),r.lanes=0,r}function kp(r,a,u){return xr(a,r.child,null,u),r=Qp(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function rS(r,a,u){r.lanes|=a;var h=r.alternate;h!==null&&(h.lanes|=a),_d(r.return,a,u)}function Tp(r,a,u,h,O,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:O,treeForkCount:g}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=h,x.tail=u,x.tailMode=O,x.treeForkCount=g)}function lS(r,a,u){var h=a.pendingProps,O=h.revealOrder,g=h.tail;h=h.children;var x=pt.current,Q=(x&2)!==0;if(Q?(x=x&1|2,a.flags|=128):x&=1,ee(pt,x),Vt(r,a,h,u),h=Ve?za:0,!Q&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&rS(r,u,a);else if(r.tag===19)rS(r,u,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(O){case"forwards":for(u=a.child,O=null;u!==null;)r=u.alternate,r!==null&&fu(r)===null&&(O=u),u=u.sibling;u=O,u===null?(O=a.child,a.child=null):(O=u.sibling,u.sibling=null),Tp(a,!1,O,u,g,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,O=a.child,a.child=null;O!==null;){if(r=O.alternate,r!==null&&fu(r)===null){a.child=O;break}r=O.sibling,O.sibling=u,u=O,O=r}Tp(a,!0,u,null,g,h);break;case"together":Tp(a,!1,null,null,void 0,h);break;default:a.memoizedState=null}return a.child}function Gn(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),Ps|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(hl(r,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(n(153));if(a.child!==null){for(r=a.child,u=jn(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=jn(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function Cp(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&nu(r)))}function EE(r,a,u){switch(a.tag){case 3:$t(a,a.stateNode.containerInfo),xs(a,yt,r.memoizedState.cache),mr();break;case 27:case 5:ds(a);break;case 4:$t(a,a.stateNode.containerInfo);break;case 10:xs(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Kd(a),null;break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(ks(a),a.flags|=128,null):(u&a.child.childLanes)!==0?sS(r,a,u):(ks(a),r=Gn(r,a,u),r!==null?r.sibling:null);ks(a);break;case 19:var O=(r.flags&128)!==0;if(h=(u&a.childLanes)!==0,h||(hl(r,a,u,!1),h=(u&a.childLanes)!==0),O){if(h)return lS(r,a,u);a.flags|=128}if(O=a.memoizedState,O!==null&&(O.rendering=null,O.tail=null,O.lastEffect=null),ee(pt,pt.current),h)break;return null;case 22:return a.lanes=0,K1(r,a,u,a.pendingProps);case 24:xs(a,yt,r.memoizedState.cache)}return Gn(r,a,u)}function aS(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)St=!0;else{if(!Cp(r,u)&&(a.flags&128)===0)return St=!1,EE(r,a,u);St=(r.flags&131072)!==0}else St=!1,Ve&&(a.flags&1048576)!==0&&Vb(a,za,a.index);switch(a.lanes=0,a.tag){case 16:e:{var h=a.pendingProps;if(r=br(a.elementType),a.type=r,typeof r=="function")Ed(r)?(h=wr(r,h),a.tag=1,a=iS(null,a,r,h,u)):(a.tag=0,a=Sp(null,a,r,h,u));else{if(r!=null){var O=r.$$typeof;if(O===V){a.tag=11,a=H1(null,a,r,h,u);break e}else if(O===_){a.tag=14,a=I1(null,a,r,h,u);break e}}throw a=Se(r)||r,Error(n(306,a,""))}}return a;case 0:return Sp(r,a,a.type,a.pendingProps,u);case 1:return h=a.type,O=wr(h,a.pendingProps),iS(r,a,h,O,u);case 3:e:{if($t(a,a.stateNode.containerInfo),r===null)throw Error(n(387));h=a.pendingProps;var g=a.memoizedState;O=g.element,Gd(r,a),Ba(a,h,null,u);var x=a.memoizedState;if(h=x.cache,xs(a,yt,h),h!==g.cache&&jd(a,[yt],u,!0),ja(),h=x.element,g.isDehydrated)if(g={element:h,isDehydrated:!1,cache:x.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=nS(r,a,h,u);break e}else if(h!==O){O=Xi(Error(n(424)),a),Da(O),a=nS(r,a,h,u);break e}else{switch(r=a.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(rt=Bi(r.firstChild),Xt=a,Ve=!0,bs=null,_i=!0,u=Kb(a,null,h,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(mr(),h===O){a=Gn(r,a,u);break e}Vt(r,a,h,u)}a=a.child}return a;case 26:return vu(r,a),r===null?(u=yx(a.type,null,a.pendingProps,null))?a.memoizedState=u:Ve||(u=a.type,r=a.pendingProps,h=Vu(ye.current).createElement(u),h[Zt]=a,h[ii]=r,_t(h,u,r),Mt(h),a.stateNode=h):a.memoizedState=yx(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return ds(a),r===null&&Ve&&(h=a.stateNode=mx(a.type,a.pendingProps,ye.current),Xt=a,_i=!0,O=rt,zs(a.type)?(lm=O,rt=Bi(h.firstChild)):rt=O),Vt(r,a,a.pendingProps.children,u),vu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ve&&((O=h=rt)&&(h=oR(h,a.type,a.pendingProps,_i),h!==null?(a.stateNode=h,Xt=a,rt=Bi(h.firstChild),_i=!1,O=!0):O=!1),O||Ss(a)),ds(a),O=a.type,g=a.pendingProps,x=r!==null?r.memoizedProps:null,h=g.children,tm(O,g)?h=null:x!==null&&tm(O,x)&&(a.flags|=32),a.memoizedState!==null&&(O=ep(r,a,wE,null,null,u),oo._currentValue=O),vu(r,a),Vt(r,a,h,u),a.child;case 6:return r===null&&Ve&&((r=u=rt)&&(u=cR(u,a.pendingProps,_i),u!==null?(a.stateNode=u,Xt=a,rt=null,r=!0):r=!1),r||Ss(a)),null;case 13:return sS(r,a,u);case 4:return $t(a,a.stateNode.containerInfo),h=a.pendingProps,r===null?a.child=xr(a,null,h,u):Vt(r,a,h,u),a.child;case 11:return H1(r,a,a.type,a.pendingProps,u);case 7:return Vt(r,a,a.pendingProps,u),a.child;case 8:return Vt(r,a,a.pendingProps.children,u),a.child;case 12:return Vt(r,a,a.pendingProps.children,u),a.child;case 10:return h=a.pendingProps,xs(a,a.type,h.value),Vt(r,a,h.children,u),a.child;case 9:return O=a.type._context,h=a.pendingProps.children,gr(a),O=Lt(O),h=h(O),a.flags|=1,Vt(r,a,h,u),a.child;case 14:return I1(r,a,a.type,a.pendingProps,u);case 15:return F1(r,a,a.type,a.pendingProps,u);case 19:return lS(r,a,u);case 31:return ME(r,a,u);case 22:return K1(r,a,u,a.pendingProps);case 24:return gr(a),h=Lt(yt),r===null?(O=Yd(),O===null&&(O=Je,g=Bd(),O.pooledCache=g,g.refCount++,g!==null&&(O.pooledCacheLanes|=u),O=g),a.memoizedState={parent:h,cache:O},Ud(a),xs(a,yt,O)):((r.lanes&u)!==0&&(Gd(r,a),Ba(a,null,null,u),ja()),O=r.memoizedState,g=a.memoizedState,O.parent!==h?(O={parent:h,cache:h},a.memoizedState=O,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=O),xs(a,yt,h)):(h=g.cache,xs(a,yt,h),h!==O.cache&&jd(a,[yt],u,!0))),Vt(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(n(156,a.tag))}function Wn(r){r.flags|=4}function Ap(r,a,u,h,O){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(O&335544128)===O)if(r.stateNode.complete)r.flags|=8192;else if(zS())r.flags|=8192;else throw Sr=au,qd}else r.flags&=-16777217}function oS(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!wx(a))if(zS())r.flags|=8192;else throw Sr=au,qd}function Qu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?jy():536870912,r.lanes|=a,Ql|=a)}function Wa(r,a){if(!Ve)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function lt(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,h=0;if(a)for(var O=r.child;O!==null;)u|=O.lanes|O.childLanes,h|=O.subtreeFlags&65011712,h|=O.flags&65011712,O.return=r,O=O.sibling;else for(O=r.child;O!==null;)u|=O.lanes|O.childLanes,h|=O.subtreeFlags,h|=O.flags,O.return=r,O=O.sibling;return r.subtreeFlags|=h,r.childLanes=u,a}function RE(r,a,u){var h=a.pendingProps;switch(Zd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(a),null;case 1:return lt(a),null;case 3:return u=a.stateNode,h=null,r!==null&&(h=r.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),Yn(yt),$e(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(fl(a)?Wn(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ld())),lt(a),null;case 26:var O=a.type,g=a.memoizedState;return r===null?(Wn(a),g!==null?(lt(a),oS(a,g)):(lt(a),Ap(a,O,null,h,u))):g?g!==r.memoizedState?(Wn(a),lt(a),oS(a,g)):(lt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==h&&Wn(a),lt(a),Ap(a,O,r,h,u)),null;case 27:if(Xn(a),u=ye.current,O=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&Wn(a);else{if(!h){if(a.stateNode===null)throw Error(n(166));return lt(a),null}r=re.current,fl(a)?jb(a):(r=mx(O,h,u),a.stateNode=r,Wn(a))}return lt(a),null;case 5:if(Xn(a),O=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==h&&Wn(a);else{if(!h){if(a.stateNode===null)throw Error(n(166));return lt(a),null}if(g=re.current,fl(a))jb(a);else{var x=Vu(ye.current);switch(g){case 1:g=x.createElementNS("http://www.w3.org/2000/svg",O);break;case 2:g=x.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;default:switch(O){case"svg":g=x.createElementNS("http://www.w3.org/2000/svg",O);break;case"math":g=x.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;case"script":g=x.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof h.is=="string"?x.createElement("select",{is:h.is}):x.createElement("select"),h.multiple?g.multiple=!0:h.size&&(g.size=h.size);break;default:g=typeof h.is=="string"?x.createElement(O,{is:h.is}):x.createElement(O)}}g[Zt]=a,g[ii]=h;e:for(x=a.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===a)break e;for(;x.sibling===null;){if(x.return===null||x.return===a)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}a.stateNode=g;e:switch(_t(g,O,h),O){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Wn(a)}}return lt(a),Ap(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==h&&Wn(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(n(166));if(r=ye.current,fl(a)){if(r=a.stateNode,u=a.memoizedProps,h=null,O=Xt,O!==null)switch(O.tag){case 27:case 5:h=O.memoizedProps}r[Zt]=a,r=!!(r.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||sx(r.nodeValue,u)),r||Ss(a,!0)}else r=Vu(r).createTextNode(h),r[Zt]=a,a.stateNode=r}return lt(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(h=fl(a),u!==null){if(r===null){if(!h)throw Error(n(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(557));r[Zt]=a}else mr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;lt(a),r=!1}else u=Ld(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(xi(a),a):(xi(a),null);if((a.flags&128)!==0)throw Error(n(558))}return lt(a),null;case 13:if(h=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(O=fl(a),h!==null&&h.dehydrated!==null){if(r===null){if(!O)throw Error(n(318));if(O=a.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(n(317));O[Zt]=a}else mr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;lt(a),O=!1}else O=Ld(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=O),O=!0;if(!O)return a.flags&256?(xi(a),a):(xi(a),null)}return xi(a),(a.flags&128)!==0?(a.lanes=u,a):(u=h!==null,r=r!==null&&r.memoizedState!==null,u&&(h=a.child,O=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(O=h.alternate.memoizedState.cachePool.pool),g=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(g=h.memoizedState.cachePool.pool),g!==O&&(h.flags|=2048)),u!==r&&u&&(a.child.flags|=8192),Qu(a,a.updateQueue),lt(a),null);case 4:return $e(),r===null&&Ip(a.stateNode.containerInfo),lt(a),null;case 10:return Yn(a.type),lt(a),null;case 19:if(Y(pt),h=a.memoizedState,h===null)return lt(a),null;if(O=(a.flags&128)!==0,g=h.rendering,g===null)if(O)Wa(h,!1);else{if(ht!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=fu(r),g!==null){for(a.flags|=128,Wa(h,!1),r=g.updateQueue,a.updateQueue=r,Qu(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)Zb(u,r),u=u.sibling;return ee(pt,pt.current&1|2),Ve&&Bn(a,h.treeForkCount),a.child}r=r.sibling}h.tail!==null&&mi()>Pu&&(a.flags|=128,O=!0,Wa(h,!1),a.lanes=4194304)}else{if(!O)if(r=fu(g),r!==null){if(a.flags|=128,O=!0,r=r.updateQueue,a.updateQueue=r,Qu(a,r),Wa(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!Ve)return lt(a),null}else 2*mi()-h.renderingStartTime>Pu&&u!==536870912&&(a.flags|=128,O=!0,Wa(h,!1),a.lanes=4194304);h.isBackwards?(g.sibling=a.child,a.child=g):(r=h.last,r!==null?r.sibling=g:a.child=g,h.last=g)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=mi(),r.sibling=null,u=pt.current,ee(pt,O?u&1|2:u&1),Ve&&Bn(a,h.treeForkCount),r):(lt(a),null);case 22:case 23:return xi(a),Fd(),h=a.memoizedState!==null,r!==null?r.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(u&536870912)!==0&&(a.flags&128)===0&&(lt(a),a.subtreeFlags&6&&(a.flags|=8192)):lt(a),u=a.updateQueue,u!==null&&Qu(a,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==u&&(a.flags|=2048),r!==null&&Y(yr),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Yn(yt),lt(a),null;case 25:return null;case 30:return null}throw Error(n(156,a.tag))}function zE(r,a){switch(Zd(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Yn(yt),$e(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return Xn(a),null;case 31:if(a.memoizedState!==null){if(xi(a),a.alternate===null)throw Error(n(340));mr()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(xi(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(n(340));mr()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return Y(pt),null;case 4:return $e(),null;case 10:return Yn(a.type),null;case 22:case 23:return xi(a),Fd(),r!==null&&Y(yr),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Yn(yt),null;case 25:return null;default:return null}}function cS(r,a){switch(Zd(a),a.tag){case 3:Yn(yt),$e();break;case 26:case 27:case 5:Xn(a);break;case 4:$e();break;case 31:a.memoizedState!==null&&xi(a);break;case 13:xi(a);break;case 19:Y(pt);break;case 10:Yn(a.type);break;case 22:case 23:xi(a),Fd(),r!==null&&Y(yr);break;case 24:Yn(yt)}}function Ha(r,a){try{var u=a.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var O=h.next;u=O;do{if((u.tag&r)===r){h=void 0;var g=u.create,x=u.inst;h=g(),x.destroy=h}u=u.next}while(u!==O)}}catch(Q){We(a,a.return,Q)}}function Cs(r,a,u){try{var h=a.updateQueue,O=h!==null?h.lastEffect:null;if(O!==null){var g=O.next;h=g;do{if((h.tag&r)===r){var x=h.inst,Q=x.destroy;if(Q!==void 0){x.destroy=void 0,O=a;var $=u,Z=Q;try{Z()}catch(U){We(O,$,U)}}}h=h.next}while(h!==g)}}catch(U){We(a,a.return,U)}}function uS(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{e1(a,u)}catch(h){We(r,r.return,h)}}}function fS(r,a,u){u.props=wr(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(h){We(r,a,h)}}function Ia(r,a){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var h=r.stateNode;break;case 30:h=r.stateNode;break;default:h=r.stateNode}typeof u=="function"?r.refCleanup=u(h):u.current=h}}catch(O){We(r,a,O)}}function gn(r,a){var u=r.ref,h=r.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(O){We(r,a,O)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(O){We(r,a,O)}else u.current=null}function hS(r){var a=r.type,u=r.memoizedProps,h=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(O){We(r,r.return,O)}}function Pp(r,a,u){try{var h=r.stateNode;iR(h,r.type,u,a),h[ii]=a}catch(O){We(r,r.return,O)}}function dS(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&zs(r.type)||r.tag===4}function $p(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||dS(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&zs(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Mp(r,a,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(r),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Vn));else if(h!==4&&(h===27&&zs(r.type)&&(u=r.stateNode,a=null),r=r.child,r!==null))for(Mp(r,a,u),r=r.sibling;r!==null;)Mp(r,a,u),r=r.sibling}function ku(r,a,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(h!==4&&(h===27&&zs(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(ku(r,a,u),r=r.sibling;r!==null;)ku(r,a,u),r=r.sibling}function pS(r){var a=r.stateNode,u=r.memoizedProps;try{for(var h=r.type,O=a.attributes;O.length;)a.removeAttributeNode(O[0]);_t(a,h,u),a[Zt]=r,a[ii]=u}catch(g){We(r,r.return,g)}}var Hn=!1,xt=!1,Ep=!1,mS=typeof WeakSet=="function"?WeakSet:Set,Et=null;function DE(r,a){if(r=r.containerInfo,Jp=Uu,r=Cb(r),kd(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var O=h.anchorOffset,g=h.focusNode;h=h.focusOffset;try{u.nodeType,g.nodeType}catch{u=null;break e}var x=0,Q=-1,$=-1,Z=0,U=0,I=r,L=null;t:for(;;){for(var B;I!==u||O!==0&&I.nodeType!==3||(Q=x+O),I!==g||h!==0&&I.nodeType!==3||($=x+h),I.nodeType===3&&(x+=I.nodeValue.length),(B=I.firstChild)!==null;)L=I,I=B;for(;;){if(I===r)break t;if(L===u&&++Z===O&&(Q=x),L===g&&++U===h&&($=x),(B=I.nextSibling)!==null)break;I=L,L=I.parentNode}I=B}u=Q===-1||$===-1?null:{start:Q,end:$}}else u=null}u=u||{start:0,end:0}}else u=null;for(em={focusedElem:r,selectionRange:u},Uu=!1,Et=a;Et!==null;)if(a=Et,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,Et=r;else for(;Et!==null;){switch(a=Et,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)O=r[u],O.ref.impl=O.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,u=a,O=g.memoizedProps,g=g.memoizedState,h=u.stateNode;try{var fe=wr(u.type,O);r=h.getSnapshotBeforeUpdate(fe,g),h.__reactInternalSnapshotBeforeUpdate=r}catch(Qe){We(u,u.return,Qe)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,u=r.nodeType,u===9)nm(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":nm(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(n(163))}if(r=a.sibling,r!==null){r.return=a.return,Et=r;break}Et=a.return}}function OS(r,a,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:Fn(r,u),h&4&&Ha(5,u);break;case 1:if(Fn(r,u),h&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(x){We(u,u.return,x)}else{var O=wr(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(O,a,r.__reactInternalSnapshotBeforeUpdate)}catch(x){We(u,u.return,x)}}h&64&&uS(u),h&512&&Ia(u,u.return);break;case 3:if(Fn(r,u),h&64&&(r=u.updateQueue,r!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{e1(r,a)}catch(x){We(u,u.return,x)}}break;case 27:a===null&&h&4&&pS(u);case 26:case 5:Fn(r,u),a===null&&h&4&&hS(u),h&512&&Ia(u,u.return);break;case 12:Fn(r,u);break;case 31:Fn(r,u),h&4&&bS(r,u);break;case 13:Fn(r,u),h&4&&SS(r,u),h&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=YE.bind(null,u),uR(r,u))));break;case 22:if(h=u.memoizedState!==null||Hn,!h){a=a!==null&&a.memoizedState!==null||xt,O=Hn;var g=xt;Hn=h,(xt=a)&&!g?Kn(r,u,(u.subtreeFlags&8772)!==0):Fn(r,u),Hn=O,xt=g}break;case 30:break;default:Fn(r,u)}}function gS(r){var a=r.alternate;a!==null&&(r.alternate=null,gS(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&od(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var at=null,si=!1;function In(r,a,u){for(u=u.child;u!==null;)yS(r,a,u),u=u.sibling}function yS(r,a,u){if(Oi&&typeof Oi.onCommitFiberUnmount=="function")try{Oi.onCommitFiberUnmount(Sa,u)}catch{}switch(u.tag){case 26:xt||gn(u,a),In(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:xt||gn(u,a);var h=at,O=si;zs(u.type)&&(at=u.stateNode,si=!1),In(r,a,u),ro(u.stateNode),at=h,si=O;break;case 5:xt||gn(u,a);case 6:if(h=at,O=si,at=null,In(r,a,u),at=h,si=O,at!==null)if(si)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(u.stateNode)}catch(g){We(u,a,g)}else try{at.removeChild(u.stateNode)}catch(g){We(u,a,g)}break;case 18:at!==null&&(si?(r=at,ux(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),El(r)):ux(at,u.stateNode));break;case 4:h=at,O=si,at=u.stateNode.containerInfo,si=!0,In(r,a,u),at=h,si=O;break;case 0:case 11:case 14:case 15:Cs(2,u,a),xt||Cs(4,u,a),In(r,a,u);break;case 1:xt||(gn(u,a),h=u.stateNode,typeof h.componentWillUnmount=="function"&&fS(u,a,h)),In(r,a,u);break;case 21:In(r,a,u);break;case 22:xt=(h=xt)||u.memoizedState!==null,In(r,a,u),xt=h;break;default:In(r,a,u)}}function bS(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{El(r)}catch(u){We(a,a.return,u)}}}function SS(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{El(r)}catch(u){We(a,a.return,u)}}function ZE(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new mS),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new mS),a;default:throw Error(n(435,r.tag))}}function Tu(r,a){var u=ZE(r);a.forEach(function(h){if(!u.has(h)){u.add(h);var O=qE.bind(null,r,h);h.then(O,O)}})}function ri(r,a){var u=a.deletions;if(u!==null)for(var h=0;h<u.length;h++){var O=u[h],g=r,x=a,Q=x;e:for(;Q!==null;){switch(Q.tag){case 27:if(zs(Q.type)){at=Q.stateNode,si=!1;break e}break;case 5:at=Q.stateNode,si=!1;break e;case 3:case 4:at=Q.stateNode.containerInfo,si=!0;break e}Q=Q.return}if(at===null)throw Error(n(160));yS(g,x,O),at=null,si=!1,g=O.alternate,g!==null&&(g.return=null),O.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)xS(a,r),a=a.sibling}var tn=null;function xS(r,a){var u=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:ri(a,r),li(r),h&4&&(Cs(3,r,r.return),Ha(3,r),Cs(5,r,r.return));break;case 1:ri(a,r),li(r),h&512&&(xt||u===null||gn(u,u.return)),h&64&&Hn&&(r=r.updateQueue,r!==null&&(h=r.callbacks,h!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var O=tn;if(ri(a,r),li(r),h&512&&(xt||u===null||gn(u,u.return)),h&4){var g=u!==null?u.memoizedState:null;if(h=r.memoizedState,u===null)if(h===null)if(r.stateNode===null){e:{h=r.type,u=r.memoizedProps,O=O.ownerDocument||O;t:switch(h){case"title":g=O.getElementsByTagName("title")[0],(!g||g[wa]||g[Zt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=O.createElement(h),O.head.insertBefore(g,O.querySelector("head > title"))),_t(g,h,u),g[Zt]=r,Mt(g),h=g;break e;case"link":var x=xx("link","href",O).get(h+(u.href||""));if(x){for(var Q=0;Q<x.length;Q++)if(g=x[Q],g.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&g.getAttribute("rel")===(u.rel==null?null:u.rel)&&g.getAttribute("title")===(u.title==null?null:u.title)&&g.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){x.splice(Q,1);break t}}g=O.createElement(h),_t(g,h,u),O.head.appendChild(g);break;case"meta":if(x=xx("meta","content",O).get(h+(u.content||""))){for(Q=0;Q<x.length;Q++)if(g=x[Q],g.getAttribute("content")===(u.content==null?null:""+u.content)&&g.getAttribute("name")===(u.name==null?null:u.name)&&g.getAttribute("property")===(u.property==null?null:u.property)&&g.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&g.getAttribute("charset")===(u.charSet==null?null:u.charSet)){x.splice(Q,1);break t}}g=O.createElement(h),_t(g,h,u),O.head.appendChild(g);break;default:throw Error(n(468,h))}g[Zt]=r,Mt(g),h=g}r.stateNode=h}else vx(O,r.type,r.stateNode);else r.stateNode=Sx(O,h,r.memoizedProps);else g!==h?(g===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):g.count--,h===null?vx(O,r.type,r.stateNode):Sx(O,h,r.memoizedProps)):h===null&&r.stateNode!==null&&Pp(r,r.memoizedProps,u.memoizedProps)}break;case 27:ri(a,r),li(r),h&512&&(xt||u===null||gn(u,u.return)),u!==null&&h&4&&Pp(r,r.memoizedProps,u.memoizedProps);break;case 5:if(ri(a,r),li(r),h&512&&(xt||u===null||gn(u,u.return)),r.flags&32){O=r.stateNode;try{tl(O,"")}catch(fe){We(r,r.return,fe)}}h&4&&r.stateNode!=null&&(O=r.memoizedProps,Pp(r,O,u!==null?u.memoizedProps:O)),h&1024&&(Ep=!0);break;case 6:if(ri(a,r),li(r),h&4){if(r.stateNode===null)throw Error(n(162));h=r.memoizedProps,u=r.stateNode;try{u.nodeValue=h}catch(fe){We(r,r.return,fe)}}break;case 3:if(Bu=null,O=tn,tn=_u(a.containerInfo),ri(a,r),tn=O,li(r),h&4&&u!==null&&u.memoizedState.isDehydrated)try{El(a.containerInfo)}catch(fe){We(r,r.return,fe)}Ep&&(Ep=!1,vS(r));break;case 4:h=tn,tn=_u(r.stateNode.containerInfo),ri(a,r),li(r),tn=h;break;case 12:ri(a,r),li(r);break;case 31:ri(a,r),li(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Tu(r,h)));break;case 13:ri(a,r),li(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Au=mi()),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Tu(r,h)));break;case 22:O=r.memoizedState!==null;var $=u!==null&&u.memoizedState!==null,Z=Hn,U=xt;if(Hn=Z||O,xt=U||$,ri(a,r),xt=U,Hn=Z,li(r),h&8192)e:for(a=r.stateNode,a._visibility=O?a._visibility&-2:a._visibility|1,O&&(u===null||$||Hn||xt||Qr(r)),u=null,a=r;;){if(a.tag===5||a.tag===26){if(u===null){$=u=a;try{if(g=$.stateNode,O)x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{Q=$.stateNode;var I=$.memoizedProps.style,L=I!=null&&I.hasOwnProperty("display")?I.display:null;Q.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(fe){We($,$.return,fe)}}}else if(a.tag===6){if(u===null){$=a;try{$.stateNode.nodeValue=O?"":$.memoizedProps}catch(fe){We($,$.return,fe)}}}else if(a.tag===18){if(u===null){$=a;try{var B=$.stateNode;O?fx(B,!0):fx($.stateNode,!1)}catch(fe){We($,$.return,fe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=r.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Tu(r,u))));break;case 19:ri(a,r),li(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Tu(r,h)));break;case 30:break;case 21:break;default:ri(a,r),li(r)}}function li(r){var a=r.flags;if(a&2){try{for(var u,h=r.return;h!==null;){if(dS(h)){u=h;break}h=h.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var O=u.stateNode,g=$p(r);ku(r,g,O);break;case 5:var x=u.stateNode;u.flags&32&&(tl(x,""),u.flags&=-33);var Q=$p(r);ku(r,Q,x);break;case 3:case 4:var $=u.stateNode.containerInfo,Z=$p(r);Mp(r,Z,$);break;default:throw Error(n(161))}}catch(U){We(r,r.return,U)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function vS(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;vS(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Fn(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)OS(r,a.alternate,a),a=a.sibling}function Qr(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Cs(4,a,a.return),Qr(a);break;case 1:gn(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&fS(a,a.return,u),Qr(a);break;case 27:ro(a.stateNode);case 26:case 5:gn(a,a.return),Qr(a);break;case 22:a.memoizedState===null&&Qr(a);break;case 30:Qr(a);break;default:Qr(a)}r=r.sibling}}function Kn(r,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,O=r,g=a,x=g.flags;switch(g.tag){case 0:case 11:case 15:Kn(O,g,u),Ha(4,g);break;case 1:if(Kn(O,g,u),h=g,O=h.stateNode,typeof O.componentDidMount=="function")try{O.componentDidMount()}catch(Z){We(h,h.return,Z)}if(h=g,O=h.updateQueue,O!==null){var Q=h.stateNode;try{var $=O.shared.hiddenCallbacks;if($!==null)for(O.shared.hiddenCallbacks=null,O=0;O<$.length;O++)Jb($[O],Q)}catch(Z){We(h,h.return,Z)}}u&&x&64&&uS(g),Ia(g,g.return);break;case 27:pS(g);case 26:case 5:Kn(O,g,u),u&&h===null&&x&4&&hS(g),Ia(g,g.return);break;case 12:Kn(O,g,u);break;case 31:Kn(O,g,u),u&&x&4&&bS(O,g);break;case 13:Kn(O,g,u),u&&x&4&&SS(O,g);break;case 22:g.memoizedState===null&&Kn(O,g,u),Ia(g,g.return);break;case 30:break;default:Kn(O,g,u)}a=a.sibling}}function Rp(r,a){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&Za(u))}function zp(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Za(r))}function nn(r,a,u,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)wS(r,a,u,h),a=a.sibling}function wS(r,a,u,h){var O=a.flags;switch(a.tag){case 0:case 11:case 15:nn(r,a,u,h),O&2048&&Ha(9,a);break;case 1:nn(r,a,u,h);break;case 3:nn(r,a,u,h),O&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Za(r)));break;case 12:if(O&2048){nn(r,a,u,h),r=a.stateNode;try{var g=a.memoizedProps,x=g.id,Q=g.onPostCommit;typeof Q=="function"&&Q(x,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch($){We(a,a.return,$)}}else nn(r,a,u,h);break;case 31:nn(r,a,u,h);break;case 13:nn(r,a,u,h);break;case 23:break;case 22:g=a.stateNode,x=a.alternate,a.memoizedState!==null?g._visibility&2?nn(r,a,u,h):Fa(r,a):g._visibility&2?nn(r,a,u,h):(g._visibility|=2,xl(r,a,u,h,(a.subtreeFlags&10256)!==0||!1)),O&2048&&Rp(x,a);break;case 24:nn(r,a,u,h),O&2048&&zp(a.alternate,a);break;default:nn(r,a,u,h)}}function xl(r,a,u,h,O){for(O=O&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,x=a,Q=u,$=h,Z=x.flags;switch(x.tag){case 0:case 11:case 15:xl(g,x,Q,$,O),Ha(8,x);break;case 23:break;case 22:var U=x.stateNode;x.memoizedState!==null?U._visibility&2?xl(g,x,Q,$,O):Fa(g,x):(U._visibility|=2,xl(g,x,Q,$,O)),O&&Z&2048&&Rp(x.alternate,x);break;case 24:xl(g,x,Q,$,O),O&&Z&2048&&zp(x.alternate,x);break;default:xl(g,x,Q,$,O)}a=a.sibling}}function Fa(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=r,h=a,O=h.flags;switch(h.tag){case 22:Fa(u,h),O&2048&&Rp(h.alternate,h);break;case 24:Fa(u,h),O&2048&&zp(h.alternate,h);break;default:Fa(u,h)}a=a.sibling}}var Ka=8192;function vl(r,a,u){if(r.subtreeFlags&Ka)for(r=r.child;r!==null;)QS(r,a,u),r=r.sibling}function QS(r,a,u){switch(r.tag){case 26:vl(r,a,u),r.flags&Ka&&r.memoizedState!==null&&vR(u,tn,r.memoizedState,r.memoizedProps);break;case 5:vl(r,a,u);break;case 3:case 4:var h=tn;tn=_u(r.stateNode.containerInfo),vl(r,a,u),tn=h;break;case 22:r.memoizedState===null&&(h=r.alternate,h!==null&&h.memoizedState!==null?(h=Ka,Ka=16777216,vl(r,a,u),Ka=h):vl(r,a,u));break;default:vl(r,a,u)}}function kS(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Ja(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Et=h,CS(h,r)}kS(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)TS(r),r=r.sibling}function TS(r){switch(r.tag){case 0:case 11:case 15:Ja(r),r.flags&2048&&Cs(9,r,r.return);break;case 3:Ja(r);break;case 12:Ja(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,Cu(r)):Ja(r);break;default:Ja(r)}}function Cu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Et=h,CS(h,r)}kS(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Cs(8,a,a.return),Cu(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Cu(a));break;default:Cu(a)}r=r.sibling}}function CS(r,a){for(;Et!==null;){var u=Et;switch(u.tag){case 0:case 11:case 15:Cs(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Za(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,Et=h;else e:for(u=r;Et!==null;){h=Et;var O=h.sibling,g=h.return;if(gS(h),h===u){Et=null;break e}if(O!==null){O.return=g,Et=O;break e}Et=g}}}var XE={getCacheForType:function(r){var a=Lt(yt),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return Lt(yt).controller.signal}},LE=typeof WeakMap=="function"?WeakMap:Map,Ye=0,Je=null,Re=null,Ze=0,Ge=0,vi=null,As=!1,wl=!1,Dp=!1,Jn=0,ht=0,Ps=0,kr=0,Zp=0,wi=0,Ql=0,eo=null,ai=null,Xp=!1,Au=0,AS=0,Pu=1/0,$u=null,$s=null,kt=0,Ms=null,kl=null,es=0,Lp=0,Vp=null,PS=null,to=0,_p=null;function Qi(){return(Ye&2)!==0&&Ze!==0?Ze&-Ze:X.T!==null?Up():qy()}function $S(){if(wi===0)if((Ze&536870912)===0||Ve){var r=Lc;Lc<<=1,(Lc&3932160)===0&&(Lc=262144),wi=r}else wi=536870912;return r=Si.current,r!==null&&(r.flags|=32),wi}function oi(r,a,u){(r===Je&&(Ge===2||Ge===9)||r.cancelPendingCommit!==null)&&(Tl(r,0),Es(r,Ze,wi,!1)),va(r,u),((Ye&2)===0||r!==Je)&&(r===Je&&((Ye&2)===0&&(kr|=u),ht===4&&Es(r,Ze,wi,!1)),yn(r))}function MS(r,a,u){if((Ye&6)!==0)throw Error(n(327));var h=!u&&(a&127)===0&&(a&r.expiredLanes)===0||xa(r,a),O=h?jE(r,a):Bp(r,a,!0),g=h;do{if(O===0){wl&&!h&&Es(r,a,0,!1);break}else{if(u=r.current.alternate,g&&!VE(u)){O=Bp(r,a,!1),g=!1;continue}if(O===2){if(g=a,r.errorRecoveryDisabledLanes&g)var x=0;else x=r.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){a=x;e:{var Q=r;O=eo;var $=Q.current.memoizedState.isDehydrated;if($&&(Tl(Q,x).flags|=256),x=Bp(Q,x,!1),x!==2){if(Dp&&!$){Q.errorRecoveryDisabledLanes|=g,kr|=g,O=4;break e}g=ai,ai=O,g!==null&&(ai===null?ai=g:ai.push.apply(ai,g))}O=x}if(g=!1,O!==2)continue}}if(O===1){Tl(r,0),Es(r,a,0,!0);break}e:{switch(h=r,g=O,g){case 0:case 1:throw Error(n(345));case 4:if((a&4194048)!==a)break;case 6:Es(h,a,wi,!As);break e;case 2:ai=null;break;case 3:case 5:break;default:throw Error(n(329))}if((a&62914560)===a&&(O=Au+300-mi(),10<O)){if(Es(h,a,wi,!As),_c(h,0,!0)!==0)break e;es=a,h.timeoutHandle=ox(ES.bind(null,h,u,ai,$u,Xp,a,wi,kr,Ql,As,g,"Throttled",-0,0),O);break e}ES(h,u,ai,$u,Xp,a,wi,kr,Ql,As,g,null,-0,0)}}break}while(!0);yn(r)}function ES(r,a,u,h,O,g,x,Q,$,Z,U,I,L,B){if(r.timeoutHandle=-1,I=a.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},QS(a,g,I);var fe=(g&62914560)===g?Au-mi():(g&4194048)===g?AS-mi():0;if(fe=wR(I,fe),fe!==null){es=g,r.cancelPendingCommit=fe(_S.bind(null,r,a,g,u,h,O,x,Q,$,U,I,null,L,B)),Es(r,g,x,!Z);return}}_S(r,a,g,u,h,O,x,Q,$)}function VE(r){for(var a=r;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var O=u[h],g=O.getSnapshot;O=O.value;try{if(!yi(g(),O))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Es(r,a,u,h){a&=~Zp,a&=~kr,r.suspendedLanes|=a,r.pingedLanes&=~a,h&&(r.warmLanes|=a),h=r.expirationTimes;for(var O=a;0<O;){var g=31-gi(O),x=1<<g;h[g]=-1,O&=~x}u!==0&&By(r,u,a)}function Mu(){return(Ye&6)===0?(io(0),!1):!0}function jp(){if(Re!==null){if(Ge===0)var r=Re.return;else r=Re,Nn=Or=null,np(r),Ol=null,La=0,r=Re;for(;r!==null;)cS(r.alternate,r),r=r.return;Re=null}}function Tl(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,rR(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),es=0,jp(),Je=r,Re=u=jn(r.current,null),Ze=a,Ge=0,vi=null,As=!1,wl=xa(r,a),Dp=!1,Ql=wi=Zp=kr=Ps=ht=0,ai=eo=null,Xp=!1,(a&8)!==0&&(a|=a&32);var h=r.entangledLanes;if(h!==0)for(r=r.entanglements,h&=a;0<h;){var O=31-gi(h),g=1<<O;a|=r[O],h&=~g}return Jn=a,Kc(),u}function RS(r,a){Ae=null,X.H=Ua,a===ml||a===lu?(a=Hb(),Ge=3):a===qd?(a=Hb(),Ge=4):Ge=a===bp?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,vi=a,Re===null&&(ht=1,Su(r,Xi(a,r.current)))}function zS(){var r=Si.current;return r===null?!0:(Ze&4194048)===Ze?ji===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?r===ji:!1}function DS(){var r=X.H;return X.H=Ua,r===null?Ua:r}function ZS(){var r=X.A;return X.A=XE,r}function Eu(){ht=4,As||(Ze&4194048)!==Ze&&Si.current!==null||(wl=!0),(Ps&134217727)===0&&(kr&134217727)===0||Je===null||Es(Je,Ze,wi,!1)}function Bp(r,a,u){var h=Ye;Ye|=2;var O=DS(),g=ZS();(Je!==r||Ze!==a)&&($u=null,Tl(r,a)),a=!1;var x=ht;e:do try{if(Ge!==0&&Re!==null){var Q=Re,$=vi;switch(Ge){case 8:jp(),x=6;break e;case 3:case 2:case 9:case 6:Si.current===null&&(a=!0);var Z=Ge;if(Ge=0,vi=null,Cl(r,Q,$,Z),u&&wl){x=0;break e}break;default:Z=Ge,Ge=0,vi=null,Cl(r,Q,$,Z)}}_E(),x=ht;break}catch(U){RS(r,U)}while(!0);return a&&r.shellSuspendCounter++,Nn=Or=null,Ye=h,X.H=O,X.A=g,Re===null&&(Je=null,Ze=0,Kc()),x}function _E(){for(;Re!==null;)XS(Re)}function jE(r,a){var u=Ye;Ye|=2;var h=DS(),O=ZS();Je!==r||Ze!==a?($u=null,Pu=mi()+500,Tl(r,a)):wl=xa(r,a);e:do try{if(Ge!==0&&Re!==null){a=Re;var g=vi;t:switch(Ge){case 1:Ge=0,vi=null,Cl(r,a,g,1);break;case 2:case 9:if(Gb(g)){Ge=0,vi=null,LS(a);break}a=function(){Ge!==2&&Ge!==9||Je!==r||(Ge=7),yn(r)},g.then(a,a);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Gb(g)?(Ge=0,vi=null,LS(a)):(Ge=0,vi=null,Cl(r,a,g,7));break;case 5:var x=null;switch(Re.tag){case 26:x=Re.memoizedState;case 5:case 27:var Q=Re;if(x?wx(x):Q.stateNode.complete){Ge=0,vi=null;var $=Q.sibling;if($!==null)Re=$;else{var Z=Q.return;Z!==null?(Re=Z,Ru(Z)):Re=null}break t}}Ge=0,vi=null,Cl(r,a,g,5);break;case 6:Ge=0,vi=null,Cl(r,a,g,6);break;case 8:jp(),ht=6;break e;default:throw Error(n(462))}}BE();break}catch(U){RS(r,U)}while(!0);return Nn=Or=null,X.H=h,X.A=O,Ye=u,Re!==null?0:(Je=null,Ze=0,Kc(),ht)}function BE(){for(;Re!==null&&!fM();)XS(Re)}function XS(r){var a=aS(r.alternate,r,Jn);r.memoizedProps=r.pendingProps,a===null?Ru(r):Re=a}function LS(r){var a=r,u=a.alternate;switch(a.tag){case 15:case 0:a=tS(u,a,a.pendingProps,a.type,void 0,Ze);break;case 11:a=tS(u,a,a.pendingProps,a.type.render,a.ref,Ze);break;case 5:np(a);default:cS(u,a),a=Re=Zb(a,Jn),a=aS(u,a,Jn)}r.memoizedProps=r.pendingProps,a===null?Ru(r):Re=a}function Cl(r,a,u,h){Nn=Or=null,np(a),Ol=null,La=0;var O=a.return;try{if($E(r,O,a,u,Ze)){ht=1,Su(r,Xi(u,r.current)),Re=null;return}}catch(g){if(O!==null)throw Re=O,g;ht=1,Su(r,Xi(u,r.current)),Re=null;return}a.flags&32768?(Ve||h===1?r=!0:wl||(Ze&536870912)!==0?r=!1:(As=r=!0,(h===2||h===9||h===3||h===6)&&(h=Si.current,h!==null&&h.tag===13&&(h.flags|=16384))),VS(a,r)):Ru(a)}function Ru(r){var a=r;do{if((a.flags&32768)!==0){VS(a,As);return}r=a.return;var u=RE(a.alternate,a,Jn);if(u!==null){Re=u;return}if(a=a.sibling,a!==null){Re=a;return}Re=a=r}while(a!==null);ht===0&&(ht=5)}function VS(r,a){do{var u=zE(r.alternate,r);if(u!==null){u.flags&=32767,Re=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(r=r.sibling,r!==null)){Re=r;return}Re=r=u}while(r!==null);ht=6,Re=null}function _S(r,a,u,h,O,g,x,Q,$){r.cancelPendingCommit=null;do zu();while(kt!==0);if((Ye&6)!==0)throw Error(n(327));if(a!==null){if(a===r.current)throw Error(n(177));if(g=a.lanes|a.childLanes,g|=$d,xM(r,u,g,x,Q,$),r===Je&&(Re=Je=null,Ze=0),kl=a,Ms=r,es=u,Lp=g,Vp=O,PS=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,UE(Zc,function(){return qS(),null})):(r.callbackNode=null,r.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=X.T,X.T=null,O=W.p,W.p=2,x=Ye,Ye|=4;try{DE(r,a,u)}finally{Ye=x,W.p=O,X.T=h}}kt=1,jS(),BS(),NS()}}function jS(){if(kt===1){kt=0;var r=Ms,a=kl,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=X.T,X.T=null;var h=W.p;W.p=2;var O=Ye;Ye|=4;try{xS(a,r);var g=em,x=Cb(r.containerInfo),Q=g.focusedElem,$=g.selectionRange;if(x!==Q&&Q&&Q.ownerDocument&&Tb(Q.ownerDocument.documentElement,Q)){if($!==null&&kd(Q)){var Z=$.start,U=$.end;if(U===void 0&&(U=Z),"selectionStart"in Q)Q.selectionStart=Z,Q.selectionEnd=Math.min(U,Q.value.length);else{var I=Q.ownerDocument||document,L=I&&I.defaultView||window;if(L.getSelection){var B=L.getSelection(),fe=Q.textContent.length,Qe=Math.min($.start,fe),Fe=$.end===void 0?Qe:Math.min($.end,fe);!B.extend&&Qe>Fe&&(x=Fe,Fe=Qe,Qe=x);var z=kb(Q,Qe),E=kb(Q,Fe);if(z&&E&&(B.rangeCount!==1||B.anchorNode!==z.node||B.anchorOffset!==z.offset||B.focusNode!==E.node||B.focusOffset!==E.offset)){var D=I.createRange();D.setStart(z.node,z.offset),B.removeAllRanges(),Qe>Fe?(B.addRange(D),B.extend(E.node,E.offset)):(D.setEnd(E.node,E.offset),B.addRange(D))}}}}for(I=[],B=Q;B=B.parentNode;)B.nodeType===1&&I.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof Q.focus=="function"&&Q.focus(),Q=0;Q<I.length;Q++){var H=I[Q];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Uu=!!Jp,em=Jp=null}finally{Ye=O,W.p=h,X.T=u}}r.current=a,kt=2}}function BS(){if(kt===2){kt=0;var r=Ms,a=kl,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=X.T,X.T=null;var h=W.p;W.p=2;var O=Ye;Ye|=4;try{OS(r,a.alternate,a)}finally{Ye=O,W.p=h,X.T=u}}kt=3}}function NS(){if(kt===4||kt===3){kt=0,hM();var r=Ms,a=kl,u=es,h=PS;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?kt=5:(kt=0,kl=Ms=null,YS(r,r.pendingLanes));var O=r.pendingLanes;if(O===0&&($s=null),ld(u),a=a.stateNode,Oi&&typeof Oi.onCommitFiberRoot=="function")try{Oi.onCommitFiberRoot(Sa,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=X.T,O=W.p,W.p=2,X.T=null;try{for(var g=r.onRecoverableError,x=0;x<h.length;x++){var Q=h[x];g(Q.value,{componentStack:Q.stack})}}finally{X.T=a,W.p=O}}(es&3)!==0&&zu(),yn(r),O=r.pendingLanes,(u&261930)!==0&&(O&42)!==0?r===_p?to++:(to=0,_p=r):to=0,io(0)}}function YS(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Za(a)))}function zu(){return jS(),BS(),NS(),qS()}function qS(){if(kt!==5)return!1;var r=Ms,a=Lp;Lp=0;var u=ld(es),h=X.T,O=W.p;try{W.p=32>u?32:u,X.T=null,u=Vp,Vp=null;var g=Ms,x=es;if(kt=0,kl=Ms=null,es=0,(Ye&6)!==0)throw Error(n(331));var Q=Ye;if(Ye|=4,TS(g.current),wS(g,g.current,x,u),Ye=Q,io(0,!1),Oi&&typeof Oi.onPostCommitFiberRoot=="function")try{Oi.onPostCommitFiberRoot(Sa,g)}catch{}return!0}finally{W.p=O,X.T=h,YS(r,a)}}function US(r,a,u){a=Xi(u,a),a=yp(r.stateNode,a,2),r=Qs(r,a,2),r!==null&&(va(r,2),yn(r))}function We(r,a,u){if(r.tag===3)US(r,r,u);else for(;a!==null;){if(a.tag===3){US(a,r,u);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&($s===null||!$s.has(h))){r=Xi(u,r),u=G1(2),h=Qs(a,u,2),h!==null&&(W1(u,h,a,r),va(h,2),yn(h));break}}a=a.return}}function Np(r,a,u){var h=r.pingCache;if(h===null){h=r.pingCache=new LE;var O=new Set;h.set(a,O)}else O=h.get(a),O===void 0&&(O=new Set,h.set(a,O));O.has(u)||(Dp=!0,O.add(u),r=NE.bind(null,r,a,u),a.then(r,r))}function NE(r,a,u){var h=r.pingCache;h!==null&&h.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,Je===r&&(Ze&u)===u&&(ht===4||ht===3&&(Ze&62914560)===Ze&&300>mi()-Au?(Ye&2)===0&&Tl(r,0):Zp|=u,Ql===Ze&&(Ql=0)),yn(r)}function GS(r,a){a===0&&(a=jy()),r=dr(r,a),r!==null&&(va(r,a),yn(r))}function YE(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),GS(r,u)}function qE(r,a){var u=0;switch(r.tag){case 31:case 13:var h=r.stateNode,O=r.memoizedState;O!==null&&(u=O.retryLane);break;case 19:h=r.stateNode;break;case 22:h=r.stateNode._retryCache;break;default:throw Error(n(314))}h!==null&&h.delete(a),GS(r,u)}function UE(r,a){return id(r,a)}var Du=null,Al=null,Yp=!1,Zu=!1,qp=!1,Rs=0;function yn(r){r!==Al&&r.next===null&&(Al===null?Du=Al=r:Al=Al.next=r),Zu=!0,Yp||(Yp=!0,WE())}function io(r,a){if(!qp&&Zu){qp=!0;do for(var u=!1,h=Du;h!==null;){if(r!==0){var O=h.pendingLanes;if(O===0)var g=0;else{var x=h.suspendedLanes,Q=h.pingedLanes;g=(1<<31-gi(42|r)+1)-1,g&=O&~(x&~Q),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(u=!0,FS(h,g))}else g=Ze,g=_c(h,h===Je?g:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(g&3)===0||xa(h,g)||(u=!0,FS(h,g));h=h.next}while(u);qp=!1}}function GE(){WS()}function WS(){Zu=Yp=!1;var r=0;Rs!==0&&sR()&&(r=Rs);for(var a=mi(),u=null,h=Du;h!==null;){var O=h.next,g=HS(h,a);g===0?(h.next=null,u===null?Du=O:u.next=O,O===null&&(Al=u)):(u=h,(r!==0||(g&3)!==0)&&(Zu=!0)),h=O}kt!==0&&kt!==5||io(r),Rs!==0&&(Rs=0)}function HS(r,a){for(var u=r.suspendedLanes,h=r.pingedLanes,O=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var x=31-gi(g),Q=1<<x,$=O[x];$===-1?((Q&u)===0||(Q&h)!==0)&&(O[x]=SM(Q,a)):$<=a&&(r.expiredLanes|=Q),g&=~Q}if(a=Je,u=Ze,u=_c(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h=r.callbackNode,u===0||r===a&&(Ge===2||Ge===9)||r.cancelPendingCommit!==null)return h!==null&&h!==null&&nd(h),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||xa(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(h!==null&&nd(h),ld(u)){case 2:case 8:u=Vy;break;case 32:u=Zc;break;case 268435456:u=_y;break;default:u=Zc}return h=IS.bind(null,r),u=id(u,h),r.callbackPriority=a,r.callbackNode=u,a}return h!==null&&h!==null&&nd(h),r.callbackPriority=2,r.callbackNode=null,2}function IS(r,a){if(kt!==0&&kt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(zu()&&r.callbackNode!==u)return null;var h=Ze;return h=_c(r,r===Je?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h===0?null:(MS(r,h,a),HS(r,mi()),r.callbackNode!=null&&r.callbackNode===u?IS.bind(null,r):null)}function FS(r,a){if(zu())return null;MS(r,a,!0)}function WE(){lR(function(){(Ye&6)!==0?id(Ly,GE):WS()})}function Up(){if(Rs===0){var r=dl;r===0&&(r=Xc,Xc<<=1,(Xc&261888)===0&&(Xc=256)),Rs=r}return Rs}function KS(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Yc(""+r)}function JS(r,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,r.id&&u.setAttribute("form",r.id),a.parentNode.insertBefore(u,a),r=new FormData(r),u.parentNode.removeChild(u),r}function HE(r,a,u,h,O){if(a==="submit"&&u&&u.stateNode===O){var g=KS((O[ii]||null).action),x=h.submitter;x&&(a=(a=x[ii]||null)?KS(a.formAction):x.getAttribute("formAction"),a!==null&&(g=a,x=null));var Q=new Wc("action","action",null,h,O);r.push({event:Q,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Rs!==0){var $=x?JS(O,x):new FormData(O);hp(u,{pending:!0,data:$,method:O.method,action:g},null,$)}}else typeof g=="function"&&(Q.preventDefault(),$=x?JS(O,x):new FormData(O),hp(u,{pending:!0,data:$,method:O.method,action:g},g,$))},currentTarget:O}]})}}for(var Gp=0;Gp<Pd.length;Gp++){var Wp=Pd[Gp],IE=Wp.toLowerCase(),FE=Wp[0].toUpperCase()+Wp.slice(1);en(IE,"on"+FE)}en($b,"onAnimationEnd"),en(Mb,"onAnimationIteration"),en(Eb,"onAnimationStart"),en("dblclick","onDoubleClick"),en("focusin","onFocus"),en("focusout","onBlur"),en(dE,"onTransitionRun"),en(pE,"onTransitionStart"),en(mE,"onTransitionCancel"),en(Rb,"onTransitionEnd"),Jr("onMouseEnter",["mouseout","mouseover"]),Jr("onMouseLeave",["mouseout","mouseover"]),Jr("onPointerEnter",["pointerout","pointerover"]),Jr("onPointerLeave",["pointerout","pointerover"]),cr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cr("onBeforeInput",["compositionend","keypress","textInput","paste"]),cr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var no="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(" "),KE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(no));function ex(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var h=r[u],O=h.event;h=h.listeners;e:{var g=void 0;if(a)for(var x=h.length-1;0<=x;x--){var Q=h[x],$=Q.instance,Z=Q.currentTarget;if(Q=Q.listener,$!==g&&O.isPropagationStopped())break e;g=Q,O.currentTarget=Z;try{g(O)}catch(U){Fc(U)}O.currentTarget=null,g=$}else for(x=0;x<h.length;x++){if(Q=h[x],$=Q.instance,Z=Q.currentTarget,Q=Q.listener,$!==g&&O.isPropagationStopped())break e;g=Q,O.currentTarget=Z;try{g(O)}catch(U){Fc(U)}O.currentTarget=null,g=$}}}}function ze(r,a){var u=a[ad];u===void 0&&(u=a[ad]=new Set);var h=r+"__bubble";u.has(h)||(tx(a,r,2,!1),u.add(h))}function Hp(r,a,u){var h=0;a&&(h|=4),tx(u,r,h,a)}var Xu="_reactListening"+Math.random().toString(36).slice(2);function Ip(r){if(!r[Xu]){r[Xu]=!0,Wy.forEach(function(u){u!=="selectionchange"&&(KE.has(u)||Hp(u,!1,r),Hp(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Xu]||(a[Xu]=!0,Hp("selectionchange",!1,a))}}function tx(r,a,u,h){switch($x(a)){case 2:var O=TR;break;case 8:O=CR;break;default:O=fm}u=O.bind(null,a,u,r),O=void 0,!Od||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(O=!0),h?O!==void 0?r.addEventListener(a,u,{capture:!0,passive:O}):r.addEventListener(a,u,!0):O!==void 0?r.addEventListener(a,u,{passive:O}):r.addEventListener(a,u,!1)}function Fp(r,a,u,h,O){var g=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var Q=h.stateNode.containerInfo;if(Q===O)break;if(x===4)for(x=h.return;x!==null;){var $=x.tag;if(($===3||$===4)&&x.stateNode.containerInfo===O)return;x=x.return}for(;Q!==null;){if(x=Ir(Q),x===null)return;if($=x.tag,$===5||$===6||$===26||$===27){h=g=x;continue e}Q=Q.parentNode}}h=h.return}lb(function(){var Z=g,U=pd(u),I=[];e:{var L=zb.get(r);if(L!==void 0){var B=Wc,fe=r;switch(r){case"keypress":if(Uc(u)===0)break e;case"keydown":case"keyup":B=qM;break;case"focusin":fe="focus",B=Sd;break;case"focusout":fe="blur",B=Sd;break;case"beforeblur":case"afterblur":B=Sd;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":B=cb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=RM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=WM;break;case $b:case Mb:case Eb:B=ZM;break;case Rb:B=IM;break;case"scroll":case"scrollend":B=MM;break;case"wheel":B=KM;break;case"copy":case"cut":case"paste":B=LM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=fb;break;case"toggle":case"beforetoggle":B=eE}var Qe=(a&4)!==0,Fe=!Qe&&(r==="scroll"||r==="scrollend"),z=Qe?L!==null?L+"Capture":null:L;Qe=[];for(var E=Z,D;E!==null;){var H=E;if(D=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||D===null||z===null||(H=ka(E,z),H!=null&&Qe.push(so(E,H,D))),Fe)break;E=E.return}0<Qe.length&&(L=new B(L,fe,null,u,U),I.push({event:L,listeners:Qe}))}}if((a&7)===0){e:{if(L=r==="mouseover"||r==="pointerover",B=r==="mouseout"||r==="pointerout",L&&u!==dd&&(fe=u.relatedTarget||u.fromElement)&&(Ir(fe)||fe[Hr]))break e;if((B||L)&&(L=U.window===U?U:(L=U.ownerDocument)?L.defaultView||L.parentWindow:window,B?(fe=u.relatedTarget||u.toElement,B=Z,fe=fe?Ir(fe):null,fe!==null&&(Fe=l(fe),Qe=fe.tag,fe!==Fe||Qe!==5&&Qe!==27&&Qe!==6)&&(fe=null)):(B=null,fe=Z),B!==fe)){if(Qe=cb,H="onMouseLeave",z="onMouseEnter",E="mouse",(r==="pointerout"||r==="pointerover")&&(Qe=fb,H="onPointerLeave",z="onPointerEnter",E="pointer"),Fe=B==null?L:Qa(B),D=fe==null?L:Qa(fe),L=new Qe(H,E+"leave",B,u,U),L.target=Fe,L.relatedTarget=D,H=null,Ir(U)===Z&&(Qe=new Qe(z,E+"enter",fe,u,U),Qe.target=D,Qe.relatedTarget=Fe,H=Qe),Fe=H,B&&fe)t:{for(Qe=JE,z=B,E=fe,D=0,H=z;H;H=Qe(H))D++;H=0;for(var ve=E;ve;ve=Qe(ve))H++;for(;0<D-H;)z=Qe(z),D--;for(;0<H-D;)E=Qe(E),H--;for(;D--;){if(z===E||E!==null&&z===E.alternate){Qe=z;break t}z=Qe(z),E=Qe(E)}Qe=null}else Qe=null;B!==null&&ix(I,L,B,Qe,!1),fe!==null&&Fe!==null&&ix(I,Fe,fe,Qe,!0)}}e:{if(L=Z?Qa(Z):window,B=L.nodeName&&L.nodeName.toLowerCase(),B==="select"||B==="input"&&L.type==="file")var Be=bb;else if(gb(L))if(Sb)Be=uE;else{Be=oE;var me=aE}else B=L.nodeName,!B||B.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?Z&&hd(Z.elementType)&&(Be=bb):Be=cE;if(Be&&(Be=Be(r,Z))){yb(I,Be,u,U);break e}me&&me(r,L,Z),r==="focusout"&&Z&&L.type==="number"&&Z.memoizedProps.value!=null&&fd(L,"number",L.value)}switch(me=Z?Qa(Z):window,r){case"focusin":(gb(me)||me.contentEditable==="true")&&(rl=me,Td=Z,Ra=null);break;case"focusout":Ra=Td=rl=null;break;case"mousedown":Cd=!0;break;case"contextmenu":case"mouseup":case"dragend":Cd=!1,Ab(I,u,U);break;case"selectionchange":if(hE)break;case"keydown":case"keyup":Ab(I,u,U)}var Pe;if(vd)e:{switch(r){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else sl?mb(r,u)&&(Xe="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Xe="onCompositionStart");Xe&&(hb&&u.locale!=="ko"&&(sl||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&sl&&(Pe=ab()):(gs=U,gd="value"in gs?gs.value:gs.textContent,sl=!0)),me=Lu(Z,Xe),0<me.length&&(Xe=new ub(Xe,r,null,u,U),I.push({event:Xe,listeners:me}),Pe?Xe.data=Pe:(Pe=Ob(u),Pe!==null&&(Xe.data=Pe)))),(Pe=iE?nE(r,u):sE(r,u))&&(Xe=Lu(Z,"onBeforeInput"),0<Xe.length&&(me=new ub("onBeforeInput","beforeinput",null,u,U),I.push({event:me,listeners:Xe}),me.data=Pe)),HE(I,r,Z,u,U)}ex(I,a)})}function so(r,a,u){return{instance:r,listener:a,currentTarget:u}}function Lu(r,a){for(var u=a+"Capture",h=[];r!==null;){var O=r,g=O.stateNode;if(O=O.tag,O!==5&&O!==26&&O!==27||g===null||(O=ka(r,u),O!=null&&h.unshift(so(r,O,g)),O=ka(r,a),O!=null&&h.push(so(r,O,g))),r.tag===3)return h;r=r.return}return[]}function JE(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function ix(r,a,u,h,O){for(var g=a._reactName,x=[];u!==null&&u!==h;){var Q=u,$=Q.alternate,Z=Q.stateNode;if(Q=Q.tag,$!==null&&$===h)break;Q!==5&&Q!==26&&Q!==27||Z===null||($=Z,O?(Z=ka(u,g),Z!=null&&x.unshift(so(u,Z,$))):O||(Z=ka(u,g),Z!=null&&x.push(so(u,Z,$)))),u=u.return}x.length!==0&&r.push({event:a,listeners:x})}var eR=/\r\n?/g,tR=/\u0000|\uFFFD/g;function nx(r){return(typeof r=="string"?r:""+r).replace(eR,`
|
|
49
|
-
`).replace(tR,"")}function sx(r,a){return a=nx(a),nx(r)===a}function Ie(r,a,u,h,O,g){switch(u){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||tl(r,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&tl(r,""+h);break;case"className":Bc(r,"class",h);break;case"tabIndex":Bc(r,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Bc(r,u,h);break;case"style":sb(r,h,g);break;case"data":if(a!=="object"){Bc(r,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(u);break}h=Yc(""+h),r.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){r.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 g=="function"&&(u==="formAction"?(a!=="input"&&Ie(r,a,"name",O.name,O,null),Ie(r,a,"formEncType",O.formEncType,O,null),Ie(r,a,"formMethod",O.formMethod,O,null),Ie(r,a,"formTarget",O.formTarget,O,null)):(Ie(r,a,"encType",O.encType,O,null),Ie(r,a,"method",O.method,O,null),Ie(r,a,"target",O.target,O,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(u);break}h=Yc(""+h),r.setAttribute(u,h);break;case"onClick":h!=null&&(r.onclick=Vn);break;case"onScroll":h!=null&&ze("scroll",r);break;case"onScrollEnd":h!=null&&ze("scrollend",r);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(n(61));if(u=h.__html,u!=null){if(O.children!=null)throw Error(n(60));r.innerHTML=u}}break;case"multiple":r.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":r.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){r.removeAttribute("xlink:href");break}u=Yc(""+h),r.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":h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,""+h):r.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":h&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":h===!0?r.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(u,h):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?r.setAttribute(u,h):r.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?r.removeAttribute(u):r.setAttribute(u,h);break;case"popover":ze("beforetoggle",r),ze("toggle",r),jc(r,"popover",h);break;case"xlinkActuate":Ln(r,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Ln(r,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Ln(r,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Ln(r,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Ln(r,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Ln(r,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Ln(r,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Ln(r,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Ln(r,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":jc(r,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=PM.get(u)||u,jc(r,u,h))}}function Kp(r,a,u,h,O,g){switch(u){case"style":sb(r,h,g);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(n(61));if(u=h.__html,u!=null){if(O.children!=null)throw Error(n(60));r.innerHTML=u}}break;case"children":typeof h=="string"?tl(r,h):(typeof h=="number"||typeof h=="bigint")&&tl(r,""+h);break;case"onScroll":h!=null&&ze("scroll",r);break;case"onScrollEnd":h!=null&&ze("scrollend",r);break;case"onClick":h!=null&&(r.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hy.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(O=u.endsWith("Capture"),a=u.slice(2,O?u.length-7:void 0),g=r[ii]||null,g=g!=null?g[u]:null,typeof g=="function"&&r.removeEventListener(a,g,O),typeof h=="function")){typeof g!="function"&&g!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,h,O);break e}u in r?r[u]=h:h===!0?r.setAttribute(u,""):jc(r,u,h)}}}function _t(r,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",r),ze("load",r);var h=!1,O=!1,g;for(g in u)if(u.hasOwnProperty(g)){var x=u[g];if(x!=null)switch(g){case"src":h=!0;break;case"srcSet":O=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,a));default:Ie(r,a,g,x,u,null)}}O&&Ie(r,a,"srcSet",u.srcSet,u,null),h&&Ie(r,a,"src",u.src,u,null);return;case"input":ze("invalid",r);var Q=g=x=O=null,$=null,Z=null;for(h in u)if(u.hasOwnProperty(h)){var U=u[h];if(U!=null)switch(h){case"name":O=U;break;case"type":x=U;break;case"checked":$=U;break;case"defaultChecked":Z=U;break;case"value":g=U;break;case"defaultValue":Q=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(n(137,a));break;default:Ie(r,a,h,U,u,null)}}eb(r,g,Q,$,Z,x,O,!1);return;case"select":ze("invalid",r),h=x=g=null;for(O in u)if(u.hasOwnProperty(O)&&(Q=u[O],Q!=null))switch(O){case"value":g=Q;break;case"defaultValue":x=Q;break;case"multiple":h=Q;default:Ie(r,a,O,Q,u,null)}a=g,u=x,r.multiple=!!h,a!=null?el(r,!!h,a,!1):u!=null&&el(r,!!h,u,!0);return;case"textarea":ze("invalid",r),g=O=h=null;for(x in u)if(u.hasOwnProperty(x)&&(Q=u[x],Q!=null))switch(x){case"value":h=Q;break;case"defaultValue":O=Q;break;case"children":g=Q;break;case"dangerouslySetInnerHTML":if(Q!=null)throw Error(n(91));break;default:Ie(r,a,x,Q,u,null)}ib(r,h,O,g);return;case"option":for($ in u)if(u.hasOwnProperty($)&&(h=u[$],h!=null))switch($){case"selected":r.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Ie(r,a,$,h,u,null)}return;case"dialog":ze("beforetoggle",r),ze("toggle",r),ze("cancel",r),ze("close",r);break;case"iframe":case"object":ze("load",r);break;case"video":case"audio":for(h=0;h<no.length;h++)ze(no[h],r);break;case"image":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"embed":case"source":case"link":ze("error",r),ze("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in u)if(u.hasOwnProperty(Z)&&(h=u[Z],h!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,a));default:Ie(r,a,Z,h,u,null)}return;default:if(hd(a)){for(U in u)u.hasOwnProperty(U)&&(h=u[U],h!==void 0&&Kp(r,a,U,h,u,void 0));return}}for(Q in u)u.hasOwnProperty(Q)&&(h=u[Q],h!=null&&Ie(r,a,Q,h,u,null))}function iR(r,a,u,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var O=null,g=null,x=null,Q=null,$=null,Z=null,U=null;for(B in u){var I=u[B];if(u.hasOwnProperty(B)&&I!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":$=I;default:h.hasOwnProperty(B)||Ie(r,a,B,null,h,I)}}for(var L in h){var B=h[L];if(I=u[L],h.hasOwnProperty(L)&&(B!=null||I!=null))switch(L){case"type":g=B;break;case"name":O=B;break;case"checked":Z=B;break;case"defaultChecked":U=B;break;case"value":x=B;break;case"defaultValue":Q=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(n(137,a));break;default:B!==I&&Ie(r,a,L,B,h,I)}}ud(r,x,Q,$,Z,U,g,O);return;case"select":B=x=Q=L=null;for(g in u)if($=u[g],u.hasOwnProperty(g)&&$!=null)switch(g){case"value":break;case"multiple":B=$;default:h.hasOwnProperty(g)||Ie(r,a,g,null,h,$)}for(O in h)if(g=h[O],$=u[O],h.hasOwnProperty(O)&&(g!=null||$!=null))switch(O){case"value":L=g;break;case"defaultValue":Q=g;break;case"multiple":x=g;default:g!==$&&Ie(r,a,O,g,h,$)}a=Q,u=x,h=B,L!=null?el(r,!!u,L,!1):!!h!=!!u&&(a!=null?el(r,!!u,a,!0):el(r,!!u,u?[]:"",!1));return;case"textarea":B=L=null;for(Q in u)if(O=u[Q],u.hasOwnProperty(Q)&&O!=null&&!h.hasOwnProperty(Q))switch(Q){case"value":break;case"children":break;default:Ie(r,a,Q,null,h,O)}for(x in h)if(O=h[x],g=u[x],h.hasOwnProperty(x)&&(O!=null||g!=null))switch(x){case"value":L=O;break;case"defaultValue":B=O;break;case"children":break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(n(91));break;default:O!==g&&Ie(r,a,x,O,h,g)}tb(r,L,B);return;case"option":for(var fe in u)if(L=u[fe],u.hasOwnProperty(fe)&&L!=null&&!h.hasOwnProperty(fe))switch(fe){case"selected":r.selected=!1;break;default:Ie(r,a,fe,null,h,L)}for($ in h)if(L=h[$],B=u[$],h.hasOwnProperty($)&&L!==B&&(L!=null||B!=null))switch($){case"selected":r.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:Ie(r,a,$,L,h,B)}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 Qe in u)L=u[Qe],u.hasOwnProperty(Qe)&&L!=null&&!h.hasOwnProperty(Qe)&&Ie(r,a,Qe,null,h,L);for(Z in h)if(L=h[Z],B=u[Z],h.hasOwnProperty(Z)&&L!==B&&(L!=null||B!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(n(137,a));break;default:Ie(r,a,Z,L,h,B)}return;default:if(hd(a)){for(var Fe in u)L=u[Fe],u.hasOwnProperty(Fe)&&L!==void 0&&!h.hasOwnProperty(Fe)&&Kp(r,a,Fe,void 0,h,L);for(U in h)L=h[U],B=u[U],!h.hasOwnProperty(U)||L===B||L===void 0&&B===void 0||Kp(r,a,U,L,h,B);return}}for(var z in u)L=u[z],u.hasOwnProperty(z)&&L!=null&&!h.hasOwnProperty(z)&&Ie(r,a,z,null,h,L);for(I in h)L=h[I],B=u[I],!h.hasOwnProperty(I)||L===B||L==null&&B==null||Ie(r,a,I,L,h,B)}function rx(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nR(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var O=u[h],g=O.transferSize,x=O.initiatorType,Q=O.duration;if(g&&Q&&rx(x)){for(x=0,Q=O.responseEnd,h+=1;h<u.length;h++){var $=u[h],Z=$.startTime;if(Z>Q)break;var U=$.transferSize,I=$.initiatorType;U&&rx(I)&&($=$.responseEnd,x+=U*($<Q?1:(Q-Z)/($-Z)))}if(--h,a+=8*(g+x)/(O.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Jp=null,em=null;function Vu(r){return r.nodeType===9?r:r.ownerDocument}function lx(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ax(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function tm(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var im=null;function sR(){var r=window.event;return r&&r.type==="popstate"?r===im?!1:(im=r,!0):(im=null,!1)}var ox=typeof setTimeout=="function"?setTimeout:void 0,rR=typeof clearTimeout=="function"?clearTimeout:void 0,cx=typeof Promise=="function"?Promise:void 0,lR=typeof queueMicrotask=="function"?queueMicrotask:typeof cx<"u"?function(r){return cx.resolve(null).then(r).catch(aR)}:ox;function aR(r){setTimeout(function(){throw r})}function zs(r){return r==="head"}function ux(r,a){var u=a,h=0;do{var O=u.nextSibling;if(r.removeChild(u),O&&O.nodeType===8)if(u=O.data,u==="/$"||u==="/&"){if(h===0){r.removeChild(O),El(a);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")ro(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,ro(u);for(var g=u.firstChild;g;){var x=g.nextSibling,Q=g.nodeName;g[wa]||Q==="SCRIPT"||Q==="STYLE"||Q==="LINK"&&g.rel.toLowerCase()==="stylesheet"||u.removeChild(g),g=x}}else u==="body"&&ro(r.ownerDocument.body);u=O}while(u);El(a)}function fx(r,a){var u=r;r=0;do{var h=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=h}while(u)}function nm(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":nm(u),od(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function oR(r,a,u,h){for(;r.nodeType===1;){var O=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(h){if(!r[wa])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==O.rel||r.getAttribute("href")!==(O.href==null||O.href===""?null:O.href)||r.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin)||r.getAttribute("title")!==(O.title==null?null:O.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(O.src==null?null:O.src)||r.getAttribute("type")!==(O.type==null?null:O.type)||r.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=O.name==null?null:""+O.name;if(O.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=Bi(r.nextSibling),r===null)break}return null}function cR(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=Bi(r.nextSibling),r===null))return null;return r}function hx(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Bi(r.nextSibling),r===null))return null;return r}function sm(r){return r.data==="$?"||r.data==="$~"}function rm(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function uR(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var h=function(){a(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),r._reactRetry=h}}function Bi(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var lm=null;function dx(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return Bi(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function px(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function mx(r,a,u){switch(a=Vu(u),r){case"html":if(r=a.documentElement,!r)throw Error(n(452));return r;case"head":if(r=a.head,!r)throw Error(n(453));return r;case"body":if(r=a.body,!r)throw Error(n(454));return r;default:throw Error(n(451))}}function ro(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);od(r)}var Ni=new Map,Ox=new Set;function _u(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ts=W.d;W.d={f:fR,r:hR,D:dR,C:pR,L:mR,m:OR,X:yR,S:gR,M:bR};function fR(){var r=ts.f(),a=Mu();return r||a}function hR(r){var a=Fr(r);a!==null&&a.tag===5&&a.type==="form"?R1(a):ts.r(r)}var Pl=typeof document>"u"?null:document;function gx(r,a,u){var h=Pl;if(h&&typeof a=="string"&&a){var O=Di(a);O='link[rel="'+r+'"][href="'+O+'"]',typeof u=="string"&&(O+='[crossorigin="'+u+'"]'),Ox.has(O)||(Ox.add(O),r={rel:r,crossOrigin:u,href:a},h.querySelector(O)===null&&(a=h.createElement("link"),_t(a,"link",r),Mt(a),h.head.appendChild(a)))}}function dR(r){ts.D(r),gx("dns-prefetch",r,null)}function pR(r,a){ts.C(r,a),gx("preconnect",r,a)}function mR(r,a,u){ts.L(r,a,u);var h=Pl;if(h&&r&&a){var O='link[rel="preload"][as="'+Di(a)+'"]';a==="image"&&u&&u.imageSrcSet?(O+='[imagesrcset="'+Di(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(O+='[imagesizes="'+Di(u.imageSizes)+'"]')):O+='[href="'+Di(r)+'"]';var g=O;switch(a){case"style":g=$l(r);break;case"script":g=Ml(r)}Ni.has(g)||(r=m({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),Ni.set(g,r),h.querySelector(O)!==null||a==="style"&&h.querySelector(lo(g))||a==="script"&&h.querySelector(ao(g))||(a=h.createElement("link"),_t(a,"link",r),Mt(a),h.head.appendChild(a)))}}function OR(r,a){ts.m(r,a);var u=Pl;if(u&&r){var h=a&&typeof a.as=="string"?a.as:"script",O='link[rel="modulepreload"][as="'+Di(h)+'"][href="'+Di(r)+'"]',g=O;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Ml(r)}if(!Ni.has(g)&&(r=m({rel:"modulepreload",href:r},a),Ni.set(g,r),u.querySelector(O)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(ao(g)))return}h=u.createElement("link"),_t(h,"link",r),Mt(h),u.head.appendChild(h)}}}function gR(r,a,u){ts.S(r,a,u);var h=Pl;if(h&&r){var O=Kr(h).hoistableStyles,g=$l(r);a=a||"default";var x=O.get(g);if(!x){var Q={loading:0,preload:null};if(x=h.querySelector(lo(g)))Q.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":a},u),(u=Ni.get(g))&&am(r,u);var $=x=h.createElement("link");Mt($),_t($,"link",r),$._p=new Promise(function(Z,U){$.onload=Z,$.onerror=U}),$.addEventListener("load",function(){Q.loading|=1}),$.addEventListener("error",function(){Q.loading|=2}),Q.loading|=4,ju(x,a,h)}x={type:"stylesheet",instance:x,count:1,state:Q},O.set(g,x)}}}function yR(r,a){ts.X(r,a);var u=Pl;if(u&&r){var h=Kr(u).hoistableScripts,O=Ml(r),g=h.get(O);g||(g=u.querySelector(ao(O)),g||(r=m({src:r,async:!0},a),(a=Ni.get(O))&&om(r,a),g=u.createElement("script"),Mt(g),_t(g,"link",r),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},h.set(O,g))}}function bR(r,a){ts.M(r,a);var u=Pl;if(u&&r){var h=Kr(u).hoistableScripts,O=Ml(r),g=h.get(O);g||(g=u.querySelector(ao(O)),g||(r=m({src:r,async:!0,type:"module"},a),(a=Ni.get(O))&&om(r,a),g=u.createElement("script"),Mt(g),_t(g,"link",r),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},h.set(O,g))}}function yx(r,a,u,h){var O=(O=ye.current)?_u(O):null;if(!O)throw Error(n(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=$l(u.href),u=Kr(O).hoistableStyles,h=u.get(a),h||(h={type:"style",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=$l(u.href);var g=Kr(O).hoistableStyles,x=g.get(r);if(x||(O=O.ownerDocument||O,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,x),(g=O.querySelector(lo(r)))&&!g._p&&(x.instance=g,x.state.loading=5),Ni.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ni.set(r,u),g||SR(O,r,u,x.state))),a&&h===null)throw Error(n(528,""));return x}if(a&&h!==null)throw Error(n(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ml(u),u=Kr(O).hoistableScripts,h=u.get(a),h||(h={type:"script",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,r))}}function $l(r){return'href="'+Di(r)+'"'}function lo(r){return'link[rel="stylesheet"]['+r+"]"}function bx(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function SR(r,a,u,h){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=r.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),_t(a,"link",u),Mt(a),r.head.appendChild(a))}function Ml(r){return'[src="'+Di(r)+'"]'}function ao(r){return"script[async]"+r}function Sx(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var h=r.querySelector('style[data-href~="'+Di(u.href)+'"]');if(h)return a.instance=h,Mt(h),h;var O=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(r.ownerDocument||r).createElement("style"),Mt(h),_t(h,"style",O),ju(h,u.precedence,r),a.instance=h;case"stylesheet":O=$l(u.href);var g=r.querySelector(lo(O));if(g)return a.state.loading|=4,a.instance=g,Mt(g),g;h=bx(u),(O=Ni.get(O))&&am(h,O),g=(r.ownerDocument||r).createElement("link"),Mt(g);var x=g;return x._p=new Promise(function(Q,$){x.onload=Q,x.onerror=$}),_t(g,"link",h),a.state.loading|=4,ju(g,u.precedence,r),a.instance=g;case"script":return g=Ml(u.src),(O=r.querySelector(ao(g)))?(a.instance=O,Mt(O),O):(h=u,(O=Ni.get(g))&&(h=m({},u),om(h,O)),r=r.ownerDocument||r,O=r.createElement("script"),Mt(O),_t(O,"link",h),r.head.appendChild(O),a.instance=O);case"void":return null;default:throw Error(n(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,ju(h,u.precedence,r));return a.instance}function ju(r,a,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),O=h.length?h[h.length-1]:null,g=O,x=0;x<h.length;x++){var Q=h[x];if(Q.dataset.precedence===a)g=Q;else if(g!==O)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function am(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function om(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Bu=null;function xx(r,a,u){if(Bu===null){var h=new Map,O=Bu=new Map;O.set(u,h)}else O=Bu,h=O.get(u),h||(h=new Map,O.set(u,h));if(h.has(r))return h;for(h.set(r,null),u=u.getElementsByTagName(r),O=0;O<u.length;O++){var g=u[O];if(!(g[wa]||g[Zt]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var x=g.getAttribute(a)||"";x=r+x;var Q=h.get(x);Q?Q.push(g):h.set(x,[g])}}return h}function vx(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function xR(r,a,u){if(u===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return r=a.disabled,typeof a.precedence=="string"&&r==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function wx(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function vR(r,a,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var O=$l(h.href),g=a.querySelector(lo(O));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Nu.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=g,Mt(g);return}g=a.ownerDocument||a,h=bx(h),(O=Ni.get(O))&&am(h,O),g=g.createElement("link"),Mt(g);var x=g;x._p=new Promise(function(Q,$){x.onload=Q,x.onerror=$}),_t(g,"link",h),u.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=Nu.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var cm=0;function wR(r,a){return r.stylesheets&&r.count===0&&qu(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var h=setTimeout(function(){if(r.stylesheets&&qu(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&cm===0&&(cm=62500*nR());var O=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&qu(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>cm?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(h),clearTimeout(O)}}:null}function Nu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Yu=null;function qu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Yu=new Map,a.forEach(QR,r),Yu=null,Nu.call(r))}function QR(r,a){if(!(a.state.loading&4)){var u=Yu.get(r);if(u)var h=u.get(null);else{u=new Map,Yu.set(r,u);for(var O=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<O.length;g++){var x=O[g];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(u.set(x.dataset.precedence,x),h=x)}h&&u.set(null,h)}O=a.instance,x=O.getAttribute("data-precedence"),g=u.get(x)||h,g===h&&u.set(null,O),u.set(x,O),this.count++,h=Nu.bind(this),O.addEventListener("load",h),O.addEventListener("error",h),g?g.parentNode.insertBefore(O,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(O,r.firstChild)),a.state.loading|=4}}var oo={$$typeof:P,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function kR(r,a,u,h,O,g,x,Q,$){this.tag=1,this.containerInfo=r,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=sd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sd(0),this.hiddenUpdates=sd(null),this.identifierPrefix=h,this.onUncaughtError=O,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Qx(r,a,u,h,O,g,x,Q,$,Z,U,I){return r=new kR(r,a,u,x,$,Z,U,I,Q),a=1,g===!0&&(a|=24),g=bi(3,null,null,a),r.current=g,g.stateNode=r,a=Bd(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:h,isDehydrated:u,cache:a},Ud(g),r}function kx(r){return r?(r=ol,r):ol}function Tx(r,a,u,h,O,g){O=kx(O),h.context===null?h.context=O:h.pendingContext=O,h=ws(a),h.payload={element:u},g=g===void 0?null:g,g!==null&&(h.callback=g),u=Qs(r,h,a),u!==null&&(oi(u,r,a),_a(u,r,a))}function Cx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function um(r,a){Cx(r,a),(r=r.alternate)&&Cx(r,a)}function Ax(r){if(r.tag===13||r.tag===31){var a=dr(r,67108864);a!==null&&oi(a,r,67108864),um(r,67108864)}}function Px(r){if(r.tag===13||r.tag===31){var a=Qi();a=rd(a);var u=dr(r,a);u!==null&&oi(u,r,a),um(r,a)}}var Uu=!0;function TR(r,a,u,h){var O=X.T;X.T=null;var g=W.p;try{W.p=2,fm(r,a,u,h)}finally{W.p=g,X.T=O}}function CR(r,a,u,h){var O=X.T;X.T=null;var g=W.p;try{W.p=8,fm(r,a,u,h)}finally{W.p=g,X.T=O}}function fm(r,a,u,h){if(Uu){var O=hm(h);if(O===null)Fp(r,a,h,Gu,u),Mx(r,h);else if(PR(O,r,a,u,h))h.stopPropagation();else if(Mx(r,h),a&4&&-1<AR.indexOf(r)){for(;O!==null;){var g=Fr(O);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=or(g.pendingLanes);if(x!==0){var Q=g;for(Q.pendingLanes|=2,Q.entangledLanes|=2;x;){var $=1<<31-gi(x);Q.entanglements[1]|=$,x&=~$}yn(g),(Ye&6)===0&&(Pu=mi()+500,io(0))}}break;case 31:case 13:Q=dr(g,2),Q!==null&&oi(Q,g,2),Mu(),um(g,2)}if(g=hm(h),g===null&&Fp(r,a,h,Gu,u),g===O)break;O=g}O!==null&&h.stopPropagation()}else Fp(r,a,h,null,u)}}function hm(r){return r=pd(r),dm(r)}var Gu=null;function dm(r){if(Gu=null,r=Ir(r),r!==null){var a=l(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=o(a),r!==null)return r;r=null}else if(u===31){if(r=c(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Gu=r,null}function $x(r){switch(r){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(dM()){case Ly:return 2;case Vy:return 8;case Zc:case pM:return 32;case _y:return 268435456;default:return 32}default:return 32}}var pm=!1,Ds=null,Zs=null,Xs=null,co=new Map,uo=new Map,Ls=[],AR="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 Mx(r,a){switch(r){case"focusin":case"focusout":Ds=null;break;case"dragenter":case"dragleave":Zs=null;break;case"mouseover":case"mouseout":Xs=null;break;case"pointerover":case"pointerout":co.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":uo.delete(a.pointerId)}}function fo(r,a,u,h,O,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:u,eventSystemFlags:h,nativeEvent:g,targetContainers:[O]},a!==null&&(a=Fr(a),a!==null&&Ax(a)),r):(r.eventSystemFlags|=h,a=r.targetContainers,O!==null&&a.indexOf(O)===-1&&a.push(O),r)}function PR(r,a,u,h,O){switch(a){case"focusin":return Ds=fo(Ds,r,a,u,h,O),!0;case"dragenter":return Zs=fo(Zs,r,a,u,h,O),!0;case"mouseover":return Xs=fo(Xs,r,a,u,h,O),!0;case"pointerover":var g=O.pointerId;return co.set(g,fo(co.get(g)||null,r,a,u,h,O)),!0;case"gotpointercapture":return g=O.pointerId,uo.set(g,fo(uo.get(g)||null,r,a,u,h,O)),!0}return!1}function Ex(r){var a=Ir(r.target);if(a!==null){var u=l(a);if(u!==null){if(a=u.tag,a===13){if(a=o(u),a!==null){r.blockedOn=a,Uy(r.priority,function(){Px(u)});return}}else if(a===31){if(a=c(u),a!==null){r.blockedOn=a,Uy(r.priority,function(){Px(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Wu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=hm(r.nativeEvent);if(u===null){u=r.nativeEvent;var h=new u.constructor(u.type,u);dd=h,u.target.dispatchEvent(h),dd=null}else return a=Fr(u),a!==null&&Ax(a),r.blockedOn=u,!1;a.shift()}return!0}function Rx(r,a,u){Wu(r)&&u.delete(a)}function $R(){pm=!1,Ds!==null&&Wu(Ds)&&(Ds=null),Zs!==null&&Wu(Zs)&&(Zs=null),Xs!==null&&Wu(Xs)&&(Xs=null),co.forEach(Rx),uo.forEach(Rx)}function Hu(r,a){r.blockedOn===a&&(r.blockedOn=null,pm||(pm=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$R)))}var Iu=null;function zx(r){Iu!==r&&(Iu=r,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Iu===r&&(Iu=null);for(var a=0;a<r.length;a+=3){var u=r[a],h=r[a+1],O=r[a+2];if(typeof h!="function"){if(dm(h||u)===null)continue;break}var g=Fr(u);g!==null&&(r.splice(a,3),a-=3,hp(g,{pending:!0,data:O,method:u.method,action:h},h,O))}}))}function El(r){function a($){return Hu($,r)}Ds!==null&&Hu(Ds,r),Zs!==null&&Hu(Zs,r),Xs!==null&&Hu(Xs,r),co.forEach(a),uo.forEach(a);for(var u=0;u<Ls.length;u++){var h=Ls[u];h.blockedOn===r&&(h.blockedOn=null)}for(;0<Ls.length&&(u=Ls[0],u.blockedOn===null);)Ex(u),u.blockedOn===null&&Ls.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var O=u[h],g=u[h+1],x=O[ii]||null;if(typeof g=="function")x||zx(u);else if(x){var Q=null;if(g&&g.hasAttribute("formAction")){if(O=g,x=g[ii]||null)Q=x.formAction;else if(dm(O)!==null)continue}else Q=x.action;typeof Q=="function"?u[h+1]=Q:(u.splice(h,3),h-=3),zx(u)}}}function Dx(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return O=x})},focusReset:"manual",scroll:"manual"})}function a(){O!==null&&(O(),O=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,O=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),O!==null&&(O(),O=null)}}}function mm(r){this._internalRoot=r}Fu.prototype.render=mm.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(n(409));var u=a.current,h=Qi();Tx(u,h,r,a,null,null)},Fu.prototype.unmount=mm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Tx(r.current,2,null,r,null,null),Mu(),a[Hr]=null}};function Fu(r){this._internalRoot=r}Fu.prototype.unstable_scheduleHydration=function(r){if(r){var a=qy();r={blockedOn:null,target:r,priority:a};for(var u=0;u<Ls.length&&a!==0&&a<Ls[u].priority;u++);Ls.splice(u,0,r),u===0&&Ex(r)}};var Zx=e.version;if(Zx!=="19.2.4")throw Error(n(527,Zx,"19.2.4"));W.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=d(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var MR={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{Sa=Ku.inject(MR),Oi=Ku}catch{}}return po.createRoot=function(r,a){if(!s(r))throw Error(n(299));var u=!1,h="",O=N1,g=Y1,x=q1;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(O=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=Qx(r,1,!1,null,null,u,h,null,O,g,x,Dx),r[Hr]=a.current,Ip(r),new mm(a)},po.hydrateRoot=function(r,a,u){if(!s(r))throw Error(n(299));var h=!1,O="",g=N1,x=Y1,Q=q1,$=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(O=u.identifierPrefix),u.onUncaughtError!==void 0&&(g=u.onUncaughtError),u.onCaughtError!==void 0&&(x=u.onCaughtError),u.onRecoverableError!==void 0&&(Q=u.onRecoverableError),u.formState!==void 0&&($=u.formState)),a=Qx(r,1,!0,a,u??null,h,O,$,g,x,Q,Dx),a.context=kx(null),u=a.current,h=Qi(),h=rd(h),O=ws(h),O.callback=null,Qs(u,O,h),u=h,a.current.lanes=u,va(a,u),yn(a),r[Hr]=a.current,Ip(r),new Fu(a)},po.version="19.2.4",po}var Ux;function jR(){if(Ux)return ym.exports;Ux=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),ym.exports=_R(),ym.exports}var BR=jR();const Ik=q.createContext({connected:!1,lastChange:0}),Gx=2e3,NR=3e4,YR=1.5;function qR({children:i}){const[e,t]=q.useState(!1),[n,s]=q.useState(0),l=q.useRef(null),o=q.useRef(null),c=q.useRef(Gx);return q.useEffect(()=>{function f(){const p=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/ws`,m=new WebSocket(p);l.current=m,m.onopen=()=>{t(!0),c.current=Gx},m.onclose=()=>{t(!1),l.current=null;const y=c.current;c.current=Math.min(y*YR,NR),o.current=setTimeout(f,y)},m.onmessage=y=>{try{const b=JSON.parse(y.data);b.type==="file-changes"&&typeof b.timestamp=="number"&&s(b.timestamp)}catch{}},m.onerror=()=>{console.warn("[ws-provider] WebSocket error occurred")}}return f(),()=>{o.current!==null&&(clearTimeout(o.current),o.current=null),l.current&&(l.current.onclose=null,l.current.close(),l.current=null)}},[]),C.jsx(Ik.Provider,{value:{connected:e,lastChange:n},children:i})}function Sc(){return q.useContext(Ik)}function r0(){const{lastChange:i}=Sc(),[e,t]=q.useState(null),[n,s]=q.useState(null),[l,o]=q.useState(null),[c,f]=q.useState(!0),[d,p]=q.useState(null),m=q.useCallback(async()=>{try{p(null);const[y,b,S]=await Promise.all([fetch("/api/roadmap"),fetch("/api/state"),fetch("/api/todos")]);if(!y.ok&&y.status!==404)throw new Error(`Roadmap fetch failed: ${y.status}`);if(!b.ok&&b.status!==404)throw new Error(`State fetch failed: ${b.status}`);if(!S.ok)throw new Error(`Todos fetch failed: ${S.status}`);const v=y.ok?await y.json():null,w=b.ok?await b.json():null,k=S.ok?await S.json():{pending:[],completed:[]};t(v),s(w),o(k)}catch(y){const b=y instanceof Error?y.message:"Failed to fetch dashboard data";p(b),console.error("[use-dashboard-data]",b)}finally{f(!1)}},[]);return q.useEffect(()=>{m()},[m]),q.useEffect(()=>{i>0&&m()},[i,m]),{roadmap:e,state:n,todos:l,loading:c,error:d}}const Fk=q.createContext({});function UR(i){const e=q.useRef(null);return e.current===null&&(e.current=i()),e.current}const Kk=typeof window<"u",GR=Kk?q.useLayoutEffect:q.useEffect,l0=q.createContext(null);function a0(i,e){i.indexOf(e)===-1&&i.push(e)}function Wf(i,e){const t=i.indexOf(e);t>-1&&i.splice(t,1)}const zn=(i,e,t)=>t>e?e:t<i?i:t;let o0=()=>{};const os={},Jk=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i);function eT(i){return typeof i=="object"&&i!==null}const tT=i=>/^0[^.\s]+$/u.test(i);function iT(i){let e;return()=>(e===void 0&&(e=i()),e)}const Ii=i=>i,WR=(i,e)=>t=>e(i(t)),xc=(...i)=>i.reduce(WR),Yo=(i,e,t)=>{const n=e-i;return n===0?1:(t-i)/n};class c0{constructor(){this.subscriptions=[]}add(e){return a0(this.subscriptions,e),()=>Wf(this.subscriptions,e)}notify(e,t,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,t,n);else for(let l=0;l<s;l++){const o=this.subscriptions[l];o&&o(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const on=i=>i*1e3,Yi=i=>i/1e3;function nT(i,e){return e?i*(1e3/e):0}const sT=(i,e,t)=>(((1-3*t+3*e)*i+(3*t-6*e))*i+3*e)*i,HR=1e-7,IR=12;function FR(i,e,t,n,s){let l,o,c=0;do o=e+(t-e)/2,l=sT(o,n,s)-i,l>0?t=o:e=o;while(Math.abs(l)>HR&&++c<IR);return o}function vc(i,e,t,n){if(i===e&&t===n)return Ii;const s=l=>FR(l,0,1,i,t);return l=>l===0||l===1?l:sT(s(l),e,n)}const rT=i=>e=>e<=.5?i(2*e)/2:(2-i(2*(1-e)))/2,lT=i=>e=>1-i(1-e),aT=vc(.33,1.53,.69,.99),u0=lT(aT),oT=rT(u0),cT=i=>(i*=2)<1?.5*u0(i):.5*(2-Math.pow(2,-10*(i-1))),f0=i=>1-Math.sin(Math.acos(i)),uT=lT(f0),fT=rT(f0),KR=vc(.42,0,1,1),JR=vc(0,0,.58,1),hT=vc(.42,0,.58,1),e5=i=>Array.isArray(i)&&typeof i[0]!="number",dT=i=>Array.isArray(i)&&typeof i[0]=="number",t5={linear:Ii,easeIn:KR,easeInOut:hT,easeOut:JR,circIn:f0,circInOut:fT,circOut:uT,backIn:u0,backInOut:oT,backOut:aT,anticipate:cT},i5=i=>typeof i=="string",Wx=i=>{if(dT(i)){o0(i.length===4);const[e,t,n,s]=i;return vc(e,t,n,s)}else if(i5(i))return t5[i];return i},Ju=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function n5(i,e){let t=new Set,n=new Set,s=!1,l=!1;const o=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function f(p){o.has(p)&&(d.schedule(p),i()),p(c)}const d={schedule:(p,m=!1,y=!1)=>{const S=y&&s?t:n;return m&&o.add(p),S.has(p)||S.add(p),p},cancel:p=>{n.delete(p),o.delete(p)},process:p=>{if(c=p,s){l=!0;return}s=!0,[t,n]=[n,t],t.forEach(f),t.clear(),s=!1,l&&(l=!1,d.process(p))}};return d}const s5=40;function pT(i,e){let t=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>t=!0,o=Ju.reduce((P,V)=>(P[V]=n5(l),P),{}),{setup:c,read:f,resolveKeyframes:d,preUpdate:p,update:m,preRender:y,render:b,postRender:S}=o,v=()=>{const P=os.useManualTiming?s.timestamp:performance.now();t=!1,os.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(P-s.timestamp,s5),1)),s.timestamp=P,s.isProcessing=!0,c.process(s),f.process(s),d.process(s),p.process(s),m.process(s),y.process(s),b.process(s),S.process(s),s.isProcessing=!1,t&&e&&(n=!1,i(v))},w=()=>{t=!0,n=!0,s.isProcessing||i(v)};return{schedule:Ju.reduce((P,V)=>{const R=o[V];return P[V]=(N,_=!1,j=!1)=>(t||w(),R.schedule(N,_,j)),P},{}),cancel:P=>{for(let V=0;V<Ju.length;V++)o[Ju[V]].cancel(P)},state:s,steps:o}}const{schedule:st,cancel:Fs,state:jt,steps:vm}=pT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ii,!0);let $f;function r5(){$f=void 0}const Jt={now:()=>($f===void 0&&Jt.set(jt.isProcessing||os.useManualTiming?jt.timestamp:performance.now()),$f),set:i=>{$f=i,queueMicrotask(r5)}},mT=i=>e=>typeof e=="string"&&e.startsWith(i),OT=mT("--"),l5=mT("var(--"),h0=i=>l5(i)?a5.test(i.split("/*")[0].trim()):!1,a5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Hx(i){return typeof i!="string"?!1:i.split("/*")[0].includes("var(--")}const fa={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},qo={...fa,transform:i=>zn(0,1,i)},ef={...fa,default:1},Mo=i=>Math.round(i*1e5)/1e5,d0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function o5(i){return i==null}const c5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,p0=(i,e)=>t=>!!(typeof t=="string"&&c5.test(t)&&t.startsWith(i)||e&&!o5(t)&&Object.prototype.hasOwnProperty.call(t,e)),gT=(i,e,t)=>n=>{if(typeof n!="string")return n;const[s,l,o,c]=n.match(d0);return{[i]:parseFloat(s),[e]:parseFloat(l),[t]:parseFloat(o),alpha:c!==void 0?parseFloat(c):1}},u5=i=>zn(0,255,i),wm={...fa,transform:i=>Math.round(u5(i))},zr={test:p0("rgb","red"),parse:gT("red","green","blue"),transform:({red:i,green:e,blue:t,alpha:n=1})=>"rgba("+wm.transform(i)+", "+wm.transform(e)+", "+wm.transform(t)+", "+Mo(qo.transform(n))+")"};function f5(i){let e="",t="",n="",s="";return i.length>5?(e=i.substring(1,3),t=i.substring(3,5),n=i.substring(5,7),s=i.substring(7,9)):(e=i.substring(1,2),t=i.substring(2,3),n=i.substring(3,4),s=i.substring(4,5),e+=e,t+=t,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const MO={test:p0("#"),parse:f5,transform:zr.transform},wc=i=>({test:e=>typeof e=="string"&&e.endsWith(i)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${i}`}),Ns=wc("deg"),Mn=wc("%"),de=wc("px"),h5=wc("vh"),d5=wc("vw"),Ix={...Mn,parse:i=>Mn.parse(i)/100,transform:i=>Mn.transform(i*100)},Zl={test:p0("hsl","hue"),parse:gT("hue","saturation","lightness"),transform:({hue:i,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(i)+", "+Mn.transform(Mo(e))+", "+Mn.transform(Mo(t))+", "+Mo(qo.transform(n))+")"},vt={test:i=>zr.test(i)||MO.test(i)||Zl.test(i),parse:i=>zr.test(i)?zr.parse(i):Zl.test(i)?Zl.parse(i):MO.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?zr.transform(i):Zl.transform(i),getAnimatableNone:i=>{const e=vt.parse(i);return e.alpha=0,vt.transform(e)}},p5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function m5(i){var e,t;return isNaN(i)&&typeof i=="string"&&(((e=i.match(d0))==null?void 0:e.length)||0)+(((t=i.match(p5))==null?void 0:t.length)||0)>0}const yT="number",bT="color",O5="var",g5="var(",Fx="${}",y5=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Uo(i){const e=i.toString(),t=[],n={color:[],number:[],var:[]},s=[];let l=0;const c=e.replace(y5,f=>(vt.test(f)?(n.color.push(l),s.push(bT),t.push(vt.parse(f))):f.startsWith(g5)?(n.var.push(l),s.push(O5),t.push(f)):(n.number.push(l),s.push(yT),t.push(parseFloat(f))),++l,Fx)).split(Fx);return{values:t,split:c,indexes:n,types:s}}function ST(i){return Uo(i).values}function xT(i){const{split:e,types:t}=Uo(i),n=e.length;return s=>{let l="";for(let o=0;o<n;o++)if(l+=e[o],s[o]!==void 0){const c=t[o];c===yT?l+=Mo(s[o]):c===bT?l+=vt.transform(s[o]):l+=s[o]}return l}}const b5=i=>typeof i=="number"?0:vt.test(i)?vt.getAnimatableNone(i):i;function S5(i){const e=ST(i);return xT(i)(e.map(b5))}const cn={test:m5,parse:ST,createTransformer:xT,getAnimatableNone:S5};function Qm(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}function x5({hue:i,saturation:e,lightness:t,alpha:n}){i/=360,e/=100,t/=100;let s=0,l=0,o=0;if(!e)s=l=o=t;else{const c=t<.5?t*(1+e):t+e-t*e,f=2*t-c;s=Qm(f,c,i+1/3),l=Qm(f,c,i),o=Qm(f,c,i-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(o*255),alpha:n}}function Hf(i,e){return t=>t>0?e:i}const ut=(i,e,t)=>i+(e-i)*t,km=(i,e,t)=>{const n=i*i,s=t*(e*e-n)+n;return s<0?0:Math.sqrt(s)},v5=[MO,zr,Zl],w5=i=>v5.find(e=>e.test(i));function Kx(i){const e=w5(i);if(!e)return!1;let t=e.parse(i);return e===Zl&&(t=x5(t)),t}const Jx=(i,e)=>{const t=Kx(i),n=Kx(e);if(!t||!n)return Hf(i,e);const s={...t};return l=>(s.red=km(t.red,n.red,l),s.green=km(t.green,n.green,l),s.blue=km(t.blue,n.blue,l),s.alpha=ut(t.alpha,n.alpha,l),zr.transform(s))},EO=new Set(["none","hidden"]);function Q5(i,e){return EO.has(i)?t=>t<=0?i:e:t=>t>=1?e:i}function k5(i,e){return t=>ut(i,e,t)}function m0(i){return typeof i=="number"?k5:typeof i=="string"?h0(i)?Hf:vt.test(i)?Jx:A5:Array.isArray(i)?vT:typeof i=="object"?vt.test(i)?Jx:T5:Hf}function vT(i,e){const t=[...i],n=t.length,s=i.map((l,o)=>m0(l)(l,e[o]));return l=>{for(let o=0;o<n;o++)t[o]=s[o](l);return t}}function T5(i,e){const t={...i,...e},n={};for(const s in t)i[s]!==void 0&&e[s]!==void 0&&(n[s]=m0(i[s])(i[s],e[s]));return s=>{for(const l in n)t[l]=n[l](s);return t}}function C5(i,e){const t=[],n={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const l=e.types[s],o=i.indexes[l][n[l]],c=i.values[o]??0;t[s]=c,n[l]++}return t}const A5=(i,e)=>{const t=cn.createTransformer(e),n=Uo(i),s=Uo(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?EO.has(i)&&!s.values.length||EO.has(e)&&!n.values.length?Q5(i,e):xc(vT(C5(n,s),s.values),t):Hf(i,e)};function wT(i,e,t){return typeof i=="number"&&typeof e=="number"&&typeof t=="number"?ut(i,e,t):m0(i)(i,e)}const P5=i=>{const e=({timestamp:t})=>i(t);return{start:(t=!0)=>st.update(e,t),stop:()=>Fs(e),now:()=>jt.isProcessing?jt.timestamp:Jt.now()}},QT=(i,e,t=10)=>{let n="";const s=Math.max(Math.round(e/t),2);for(let l=0;l<s;l++)n+=Math.round(i(l/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},If=2e4;function O0(i){let e=0;const t=50;let n=i.next(e);for(;!n.done&&e<If;)e+=t,n=i.next(e);return e>=If?1/0:e}function $5(i,e=100,t){const n=t({...i,keyframes:[0,e]}),s=Math.min(O0(n),If);return{type:"keyframes",ease:l=>n.next(s*l).value/e,duration:Yi(s)}}const M5=5;function kT(i,e,t){const n=Math.max(e-M5,0);return nT(t-i(n),e-n)}const dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Tm=.001;function E5({duration:i=dt.duration,bounce:e=dt.bounce,velocity:t=dt.velocity,mass:n=dt.mass}){let s,l,o=1-e;o=zn(dt.minDamping,dt.maxDamping,o),i=zn(dt.minDuration,dt.maxDuration,Yi(i)),o<1?(s=d=>{const p=d*o,m=p*i,y=p-t,b=RO(d,o),S=Math.exp(-m);return Tm-y/b*S},l=d=>{const m=d*o*i,y=m*t+t,b=Math.pow(o,2)*Math.pow(d,2)*i,S=Math.exp(-m),v=RO(Math.pow(d,2),o);return(-s(d)+Tm>0?-1:1)*((y-b)*S)/v}):(s=d=>{const p=Math.exp(-d*i),m=(d-t)*i+1;return-Tm+p*m},l=d=>{const p=Math.exp(-d*i),m=(t-d)*(i*i);return p*m});const c=5/i,f=z5(s,l,c);if(i=on(i),isNaN(f))return{stiffness:dt.stiffness,damping:dt.damping,duration:i};{const d=Math.pow(f,2)*n;return{stiffness:d,damping:o*2*Math.sqrt(n*d),duration:i}}}const R5=12;function z5(i,e,t){let n=t;for(let s=1;s<R5;s++)n=n-i(n)/e(n);return n}function RO(i,e){return i*Math.sqrt(1-e*e)}const D5=["duration","bounce"],Z5=["stiffness","damping","mass"];function ev(i,e){return e.some(t=>i[t]!==void 0)}function X5(i){let e={velocity:dt.velocity,stiffness:dt.stiffness,damping:dt.damping,mass:dt.mass,isResolvedFromDuration:!1,...i};if(!ev(i,Z5)&&ev(i,D5))if(e.velocity=0,i.visualDuration){const t=i.visualDuration,n=2*Math.PI/(t*1.2),s=n*n,l=2*zn(.05,1,1-(i.bounce||0))*Math.sqrt(s);e={...e,mass:dt.mass,stiffness:s,damping:l}}else{const t=E5({...i,velocity:0});e={...e,...t,mass:dt.mass},e.isResolvedFromDuration=!0}return e}function Ff(i=dt.visualDuration,e=dt.bounce){const t=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:e}:i;let{restSpeed:n,restDelta:s}=t;const l=t.keyframes[0],o=t.keyframes[t.keyframes.length-1],c={done:!1,value:l},{stiffness:f,damping:d,mass:p,duration:m,velocity:y,isResolvedFromDuration:b}=X5({...t,velocity:-Yi(t.velocity||0)}),S=y||0,v=d/(2*Math.sqrt(f*p)),w=o-l,k=Yi(Math.sqrt(f/p)),A=Math.abs(w)<5;n||(n=A?dt.restSpeed.granular:dt.restSpeed.default),s||(s=A?dt.restDelta.granular:dt.restDelta.default);let P;if(v<1){const R=RO(k,v);P=N=>{const _=Math.exp(-v*k*N);return o-_*((S+v*k*w)/R*Math.sin(R*N)+w*Math.cos(R*N))}}else if(v===1)P=R=>o-Math.exp(-k*R)*(w+(S+k*w)*R);else{const R=k*Math.sqrt(v*v-1);P=N=>{const _=Math.exp(-v*k*N),j=Math.min(R*N,300);return o-_*((S+v*k*w)*Math.sinh(j)+R*w*Math.cosh(j))/R}}const V={calculatedDuration:b&&m||null,next:R=>{const N=P(R);if(b)c.done=R>=m;else{let _=R===0?S:0;v<1&&(_=R===0?on(S):kT(P,R,N));const j=Math.abs(_)<=n,K=Math.abs(o-N)<=s;c.done=j&&K}return c.value=c.done?o:N,c},toString:()=>{const R=Math.min(O0(V),If),N=QT(_=>V.next(R*_).value,R,30);return R+"ms "+N},toTransition:()=>{}};return V}Ff.applyToOptions=i=>{const e=$5(i,100,Ff);return i.ease=e.ease,i.duration=on(e.duration),i.type="keyframes",i};function zO({keyframes:i,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:o,min:c,max:f,restDelta:d=.5,restSpeed:p}){const m=i[0],y={done:!1,value:m},b=j=>c!==void 0&&j<c||f!==void 0&&j>f,S=j=>c===void 0?f:f===void 0||Math.abs(c-j)<Math.abs(f-j)?c:f;let v=t*e;const w=m+v,k=o===void 0?w:o(w);k!==w&&(v=k-m);const A=j=>-v*Math.exp(-j/n),P=j=>k+A(j),V=j=>{const K=A(j),Oe=P(j);y.done=Math.abs(K)<=d,y.value=y.done?k:Oe};let R,N;const _=j=>{b(y.value)&&(R=j,N=Ff({keyframes:[y.value,S(y.value)],velocity:kT(P,j,y.value),damping:s,stiffness:l,restDelta:d,restSpeed:p}))};return _(0),{calculatedDuration:null,next:j=>{let K=!1;return!N&&R===void 0&&(K=!0,V(j),_(j)),R!==void 0&&j>=R?N.next(j-R):(!K&&V(j),y)}}}function L5(i,e,t){const n=[],s=t||os.mix||wT,l=i.length-1;for(let o=0;o<l;o++){let c=s(i[o],i[o+1]);if(e){const f=Array.isArray(e)?e[o]||Ii:e;c=xc(f,c)}n.push(c)}return n}function V5(i,e,{clamp:t=!0,ease:n,mixer:s}={}){const l=i.length;if(o0(l===e.length),l===1)return()=>e[0];if(l===2&&e[0]===e[1])return()=>e[1];const o=i[0]===i[1];i[0]>i[l-1]&&(i=[...i].reverse(),e=[...e].reverse());const c=L5(e,n,s),f=c.length,d=p=>{if(o&&p<i[0])return e[0];let m=0;if(f>1)for(;m<i.length-2&&!(p<i[m+1]);m++);const y=Yo(i[m],i[m+1],p);return c[m](y)};return t?p=>d(zn(i[0],i[l-1],p)):d}function _5(i,e){const t=i[i.length-1];for(let n=1;n<=e;n++){const s=Yo(0,e,n);i.push(ut(t,1,s))}}function j5(i){const e=[0];return _5(e,i.length-1),e}function B5(i,e){return i.map(t=>t*e)}function N5(i,e){return i.map(()=>e||hT).splice(0,i.length-1)}function Eo({duration:i=300,keyframes:e,times:t,ease:n="easeInOut"}){const s=e5(n)?n.map(Wx):Wx(n),l={done:!1,value:e[0]},o=B5(t&&t.length===e.length?t:j5(e),i),c=V5(o,e,{ease:Array.isArray(s)?s:N5(e,s)});return{calculatedDuration:i,next:f=>(l.value=c(f),l.done=f>=i,l)}}const Y5=i=>i!==null;function g0(i,{repeat:e,repeatType:t="loop"},n,s=1){const l=i.filter(Y5),c=s<0||e&&t!=="loop"&&e%2===1?0:l.length-1;return!c||n===void 0?l[c]:n}const q5={decay:zO,inertia:zO,tween:Eo,keyframes:Eo,spring:Ff};function TT(i){typeof i.type=="string"&&(i.type=q5[i.type])}class y0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const U5=i=>i/100;class b0 extends y0{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:t}=this.options;t&&t.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;TT(e);const{type:t=Eo,repeat:n=0,repeatDelay:s=0,repeatType:l,velocity:o=0}=e;let{keyframes:c}=e;const f=t||Eo;f!==Eo&&typeof c[0]!="number"&&(this.mixKeyframes=xc(U5,wT(c[0],c[1])),c=[0,100]);const d=f({...e,keyframes:c});l==="mirror"&&(this.mirroredGenerator=f({...e,keyframes:[...c].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=O0(d));const{calculatedDuration:p}=d;this.calculatedDuration=p,this.resolvedDuration=p+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=d}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:s,mixKeyframes:l,mirroredGenerator:o,resolvedDuration:c,calculatedDuration:f}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:p,repeat:m,repeatType:y,repeatDelay:b,type:S,onUpdate:v,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const k=this.currentTime-d*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?k<0:k>s;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let P=this.currentTime,V=n;if(m){const j=Math.min(this.currentTime,s)/c;let K=Math.floor(j),Oe=j%1;!Oe&&j>=1&&(Oe=1),Oe===1&&K--,K=Math.min(K,m+1),!!(K%2)&&(y==="reverse"?(Oe=1-Oe,b&&(Oe-=b/c)):y==="mirror"&&(V=o)),P=zn(0,1,Oe)*c}const R=A?{done:!1,value:p[0]}:V.next(P);l&&(R.value=l(R.value));let{done:N}=R;!A&&f!==null&&(N=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return _&&S!==zO&&(R.value=g0(p,this.options,w,this.speed)),v&&v(R.value),_&&this.finish(),R}then(e,t){return this.finished.then(e,t)}get duration(){return Yi(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Yi(e)}get time(){return Yi(this.currentTime)}set time(e){var t;e=on(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(t=this.driver)==null||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Jt.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Yi(this.currentTime))}play(){var s,l;if(this.isStopped)return;const{driver:e=P5,startTime:t}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(l=(s=this.options).onPlay)==null||l.call(s);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function G5(i){for(let e=1;e<i.length;e++)i[e]??(i[e]=i[e-1])}const Dr=i=>i*180/Math.PI,DO=i=>{const e=Dr(Math.atan2(i[1],i[0]));return ZO(e)},W5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i=>(Math.abs(i[0])+Math.abs(i[3]))/2,rotate:DO,rotateZ:DO,skewX:i=>Dr(Math.atan(i[1])),skewY:i=>Dr(Math.atan(i[2])),skew:i=>(Math.abs(i[1])+Math.abs(i[2]))/2},ZO=i=>(i=i%360,i<0&&(i+=360),i),tv=DO,iv=i=>Math.sqrt(i[0]*i[0]+i[1]*i[1]),nv=i=>Math.sqrt(i[4]*i[4]+i[5]*i[5]),H5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:iv,scaleY:nv,scale:i=>(iv(i)+nv(i))/2,rotateX:i=>ZO(Dr(Math.atan2(i[6],i[5]))),rotateY:i=>ZO(Dr(Math.atan2(-i[2],i[0]))),rotateZ:tv,rotate:tv,skewX:i=>Dr(Math.atan(i[4])),skewY:i=>Dr(Math.atan(i[1])),skew:i=>(Math.abs(i[1])+Math.abs(i[4]))/2};function XO(i){return i.includes("scale")?1:0}function LO(i,e){if(!i||i==="none")return XO(e);const t=i.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(t)n=H5,s=t;else{const c=i.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=W5,s=c}if(!s)return XO(e);const l=n[e],o=s[1].split(",").map(F5);return typeof l=="function"?l(o):o[l]}const I5=(i,e)=>{const{transform:t="none"}=getComputedStyle(i);return LO(t,e)};function F5(i){return parseFloat(i.trim())}const ha=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],da=new Set(ha),sv=i=>i===fa||i===de,K5=new Set(["x","y","z"]),J5=ha.filter(i=>!K5.has(i));function ez(i){const e=[];return J5.forEach(t=>{const n=i.getValue(t);n!==void 0&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}const Ws={width:({x:i},{paddingLeft:e="0",paddingRight:t="0"})=>i.max-i.min-parseFloat(e)-parseFloat(t),height:({y:i},{paddingTop:e="0",paddingBottom:t="0"})=>i.max-i.min-parseFloat(e)-parseFloat(t),top:(i,{top:e})=>parseFloat(e),left:(i,{left:e})=>parseFloat(e),bottom:({y:i},{top:e})=>parseFloat(e)+(i.max-i.min),right:({x:i},{left:e})=>parseFloat(e)+(i.max-i.min),x:(i,{transform:e})=>LO(e,"x"),y:(i,{transform:e})=>LO(e,"y")};Ws.translateX=Ws.x;Ws.translateY=Ws.y;const _r=new Set;let VO=!1,_O=!1,jO=!1;function CT(){if(_O){const i=Array.from(_r).filter(n=>n.needsMeasurement),e=new Set(i.map(n=>n.element)),t=new Map;e.forEach(n=>{const s=ez(n);s.length&&(t.set(n,s),n.render())}),i.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const s=t.get(n);s&&s.forEach(([l,o])=>{var c;(c=n.getValue(l))==null||c.set(o)})}),i.forEach(n=>n.measureEndState()),i.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}_O=!1,VO=!1,_r.forEach(i=>i.complete(jO)),_r.clear()}function AT(){_r.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(_O=!0)})}function tz(){jO=!0,AT(),CT(),jO=!1}class S0{constructor(e,t,n,s,l,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=s,this.element=l,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(_r.add(this),VO||(VO=!0,st.read(AT),st.resolveKeyframes(CT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:s}=this;if(e[0]===null){const l=s==null?void 0:s.get(),o=e[e.length-1];if(l!==void 0)e[0]=l;else if(n&&t){const c=n.readValue(t,o);c!=null&&(e[0]=c)}e[0]===void 0&&(e[0]=o),s&&l===void 0&&s.set(e[0])}G5(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),_r.delete(this)}cancel(){this.state==="scheduled"&&(_r.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const iz=i=>i.startsWith("--");function nz(i,e,t){iz(e)?i.style.setProperty(e,t):i.style[e]=t}const sz={};function PT(i,e){const t=iT(i);return()=>sz[e]??t()}const rz=PT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),$T=PT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ko=([i,e,t,n])=>`cubic-bezier(${i}, ${e}, ${t}, ${n})`,rv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ko([0,.65,.55,1]),circOut:ko([.55,0,1,.45]),backIn:ko([.31,.01,.66,-.59]),backOut:ko([.33,1.53,.69,.99])};function MT(i,e){if(i)return typeof i=="function"?$T()?QT(i,e):"ease-out":dT(i)?ko(i):Array.isArray(i)?i.map(t=>MT(t,e)||rv.easeOut):rv[i]}function lz(i,e,t,{delay:n=0,duration:s=300,repeat:l=0,repeatType:o="loop",ease:c="easeOut",times:f}={},d=void 0){const p={[e]:t};f&&(p.offset=f);const m=MT(c,s);Array.isArray(m)&&(p.easing=m);const y={delay:n,duration:s,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:l+1,direction:o==="reverse"?"alternate":"normal"};return d&&(y.pseudoElement=d),i.animate(p,y)}function ET(i){return typeof i=="function"&&"applyToOptions"in i}function az({type:i,...e}){return ET(i)&&$T()?i.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class RT extends y0{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:s,pseudoElement:l,allowFlatten:o=!1,finalKeyframe:c,onComplete:f}=e;this.isPseudoElement=!!l,this.allowFlatten=o,this.options=e,o0(typeof e.type!="string");const d=az(e);this.animation=lz(t,n,s,d,l),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const p=g0(s,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(p):nz(t,n,p),this.animation.cancel()}f==null||f(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n,s;const e=(t=this.options)==null?void 0:t.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(n=this.animation).commitStyles)==null||s.call(n))}get duration(){var t,n;const e=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return Yi(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Yi(e)}get time(){return Yi(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=on(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&rz()?(this.animation.timeline=e,Ii):t(this)}}const zT={anticipate:cT,backInOut:oT,circInOut:fT};function oz(i){return i in zT}function cz(i){typeof i.ease=="string"&&oz(i.ease)&&(i.ease=zT[i.ease])}const Cm=10;class uz extends RT{constructor(e){cz(e),TT(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:s,element:l,...o}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const c=new b0({...o,autoplay:!1}),f=Math.max(Cm,Jt.now()-this.startTime),d=zn(0,Cm,f-Cm);t.setWithVelocity(c.sample(Math.max(0,f-d)).value,c.sample(f).value,d),c.stop()}}const lv=(i,e)=>e==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(cn.test(i)||i==="0")&&!i.startsWith("url("));function fz(i){const e=i[0];if(i.length===1)return!0;for(let t=0;t<i.length;t++)if(i[t]!==e)return!0}function hz(i,e,t,n){const s=i[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const l=i[i.length-1],o=lv(s,e),c=lv(l,e);return!o||!c?!1:fz(i)||(t==="spring"||ET(t))&&n}function BO(i){i.duration=0,i.type="keyframes"}const dz=new Set(["opacity","clipPath","filter","transform"]),pz=iT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mz(i){var p;const{motionValue:e,name:t,repeatDelay:n,repeatType:s,damping:l,type:o}=i;if(!(((p=e==null?void 0:e.owner)==null?void 0:p.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:d}=e.owner.getProps();return pz()&&t&&dz.has(t)&&(t!=="transform"||!d)&&!f&&!n&&s!=="mirror"&&l!==0&&o!=="inertia"}const Oz=40;class gz extends y0{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:o="loop",keyframes:c,name:f,motionValue:d,element:p,...m}){var S;super(),this.stop=()=>{var v,w;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=Jt.now();const y={autoplay:e,delay:t,type:n,repeat:s,repeatDelay:l,repeatType:o,name:f,motionValue:d,element:p,...m},b=(p==null?void 0:p.KeyframeResolver)||S0;this.keyframeResolver=new b(c,(v,w,k)=>this.onKeyframesResolved(v,w,y,!k),f,d,p),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(e,t,n,s){var w,k;this.keyframeResolver=void 0;const{name:l,type:o,velocity:c,delay:f,isHandoff:d,onUpdate:p}=n;this.resolvedAt=Jt.now(),hz(e,l,o,c)||((os.instantAnimations||!f)&&(p==null||p(g0(e,n,t))),e[0]=e[e.length-1],BO(n),n.repeat=0);const y={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Oz?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},b=!d&&mz(y),S=(k=(w=y.motionValue)==null?void 0:w.owner)==null?void 0:k.current,v=b?new uz({...y,element:S}):new b0(y);v.finished.then(()=>{this.notifyFinished()}).catch(Ii),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),tz()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function DT(i,e,t,n=0,s=1){const l=Array.from(i).sort((d,p)=>d.sortNodePosition(p)).indexOf(e),o=i.size,c=(o-1)*n;return typeof t=="function"?t(l,o):s===1?l*n:c-l*n}const yz=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bz(i){const e=yz.exec(i);if(!e)return[,];const[,t,n,s]=e;return[`--${t??n}`,s]}function ZT(i,e,t=1){const[n,s]=bz(i);if(!n)return;const l=window.getComputedStyle(e).getPropertyValue(n);if(l){const o=l.trim();return Jk(o)?parseFloat(o):o}return h0(s)?ZT(s,e,t+1):s}const Sz={type:"spring",stiffness:500,damping:25,restSpeed:10},xz=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),vz={type:"keyframes",duration:.8},wz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qz=(i,{keyframes:e})=>e.length>2?vz:da.has(i)?i.startsWith("scale")?xz(e[1]):Sz:wz,kz=i=>i!==null;function Tz(i,{repeat:e,repeatType:t="loop"},n){const s=i.filter(kz),l=e&&t!=="loop"&&e%2===1?0:s.length-1;return s[l]}function XT(i,e){if(i!=null&&i.inherit&&e){const{inherit:t,...n}=i;return{...e,...n}}return i}function x0(i,e){const t=(i==null?void 0:i[e])??(i==null?void 0:i.default)??i;return t!==i?XT(t,i):t}function Cz({when:i,delay:e,delayChildren:t,staggerChildren:n,staggerDirection:s,repeat:l,repeatType:o,repeatDelay:c,from:f,elapsed:d,...p}){return!!Object.keys(p).length}const v0=(i,e,t,n={},s,l)=>o=>{const c=x0(n,i)||{},f=c.delay||n.delay||0;let{elapsed:d=0}=n;d=d-on(f);const p={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...c,delay:-d,onUpdate:y=>{e.set(y),c.onUpdate&&c.onUpdate(y)},onComplete:()=>{o(),c.onComplete&&c.onComplete()},name:i,motionValue:e,element:l?void 0:s};Cz(c)||Object.assign(p,Qz(i,p)),p.duration&&(p.duration=on(p.duration)),p.repeatDelay&&(p.repeatDelay=on(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let m=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(BO(p),p.delay===0&&(m=!0)),(os.instantAnimations||os.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(m=!0,BO(p),p.delay=0),p.allowFlatten=!c.type&&!c.ease,m&&!l&&e.get()!==void 0){const y=Tz(p.keyframes,c);if(y!==void 0){st.update(()=>{p.onUpdate(y),p.onComplete()});return}}return c.isSync?new b0(p):new gz(p)};function av(i){const e=[{},{}];return i==null||i.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function w0(i,e,t,n){if(typeof e=="function"){const[s,l]=av(n);e=e(t!==void 0?t:i.custom,s,l)}if(typeof e=="string"&&(e=i.variants&&i.variants[e]),typeof e=="function"){const[s,l]=av(n);e=e(t!==void 0?t:i.custom,s,l)}return e}function Yl(i,e,t){const n=i.getProps();return w0(n,e,t!==void 0?t:n.custom,i)}const LT=new Set(["width","height","top","left","right","bottom",...ha]),ov=30,Az=i=>!isNaN(parseFloat(i));class Pz{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var l;const s=Jt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Az(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new c0);const n=this.events[e].add(t);return e==="change"?()=>{n(),st.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ov)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,ov);return nT(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jl(i,e){return new Pz(i,e)}const NO=i=>Array.isArray(i);function $z(i,e,t){i.hasValue(e)?i.getValue(e).set(t):i.addValue(e,Jl(t))}function Mz(i){return NO(i)?i[i.length-1]||0:i}function Ez(i,e){const t=Yl(i,e);let{transitionEnd:n={},transition:s={},...l}=t||{};l={...l,...n};for(const o in l){const c=Mz(l[o]);$z(i,o,c)}}const Wt=i=>!!(i&&i.getVelocity);function Rz(i){return!!(Wt(i)&&i.add)}function YO(i,e){const t=i.getValue("willChange");if(Rz(t))return t.add(e);if(!t&&os.WillChange){const n=new os.WillChange("auto");i.addValue("willChange",n),n.add(e)}}function Q0(i){return i.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const zz="framerAppearId",VT="data-"+Q0(zz);function _T(i){return i.props[VT]}function Dz({protectedKeys:i,needsAnimating:e},t){const n=i.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,n}function jT(i,e,{delay:t=0,transitionOverride:n,type:s}={}){let{transition:l,transitionEnd:o,...c}=e;const f=i.getDefaultTransition();l=l?XT(l,f):f;const d=l==null?void 0:l.reduceMotion;n&&(l=n);const p=[],m=s&&i.animationState&&i.animationState.getState()[s];for(const y in c){const b=i.getValue(y,i.latestValues[y]??null),S=c[y];if(S===void 0||m&&Dz(m,y))continue;const v={delay:t,...x0(l||{},y)},w=b.get();if(w!==void 0&&!b.isAnimating&&!Array.isArray(S)&&S===w&&!v.velocity)continue;let k=!1;if(window.MotionHandoffAnimation){const V=_T(i);if(V){const R=window.MotionHandoffAnimation(V,y,st);R!==null&&(v.startTime=R,k=!0)}}YO(i,y);const A=d??i.shouldReduceMotion;b.start(v0(y,b,S,A&<.has(y)?{type:!1}:v,i,k));const P=b.animation;P&&p.push(P)}if(o){const y=()=>st.update(()=>{o&&Ez(i,o)});p.length?Promise.all(p).then(y):y()}return p}function qO(i,e,t={}){var f;const n=Yl(i,e,t.type==="exit"?(f=i.presenceContext)==null?void 0:f.custom:void 0);let{transition:s=i.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(s=t.transitionOverride);const l=n?()=>Promise.all(jT(i,n,t)):()=>Promise.resolve(),o=i.variantChildren&&i.variantChildren.size?(d=0)=>{const{delayChildren:p=0,staggerChildren:m,staggerDirection:y}=s;return Zz(i,e,d,p,m,y,t)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,p]=c==="beforeChildren"?[l,o]:[o,l];return d().then(()=>p())}else return Promise.all([l(),o(t.delay)])}function Zz(i,e,t=0,n=0,s=0,l=1,o){const c=[];for(const f of i.variantChildren)f.notify("AnimationStart",e),c.push(qO(f,e,{...o,delay:t+(typeof n=="function"?0:n)+DT(i.variantChildren,f,n,s,l)}).then(()=>f.notify("AnimationComplete",e)));return Promise.all(c)}function Xz(i,e,t={}){i.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(l=>qO(i,l,t));n=Promise.all(s)}else if(typeof e=="string")n=qO(i,e,t);else{const s=typeof e=="function"?Yl(i,e,t.custom):e;n=Promise.all(jT(i,s,t))}return n.then(()=>{i.notify("AnimationComplete",e)})}const Lz={test:i=>i==="auto",parse:i=>i},BT=i=>e=>e.test(i),NT=[fa,de,Mn,Ns,d5,h5,Lz],cv=i=>NT.find(BT(i));function Vz(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||tT(i):!0}const _z=new Set(["brightness","contrast","saturate","opacity"]);function jz(i){const[e,t]=i.slice(0,-1).split("(");if(e==="drop-shadow")return i;const[n]=t.match(d0)||[];if(!n)return i;const s=t.replace(n,"");let l=_z.has(e)?1:0;return n!==t&&(l*=100),e+"("+l+s+")"}const Bz=/\b([a-z-]*)\(.*?\)/gu,UO={...cn,getAnimatableNone:i=>{const e=i.match(Bz);return e?e.map(jz).join(" "):i}},GO={...cn,getAnimatableNone:i=>{const e=cn.parse(i);return cn.createTransformer(i)(e.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},uv={...fa,transform:Math.round},Nz={rotate:Ns,rotateX:Ns,rotateY:Ns,rotateZ:Ns,scale:ef,scaleX:ef,scaleY:ef,scaleZ:ef,skew:Ns,skewX:Ns,skewY:Ns,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:qo,originX:Ix,originY:Ix,originZ:de},k0={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,top:de,right:de,bottom:de,left:de,inset:de,insetBlock:de,insetBlockStart:de,insetBlockEnd:de,insetInline:de,insetInlineStart:de,insetInlineEnd:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,paddingBlock:de,paddingBlockStart:de,paddingBlockEnd:de,paddingInline:de,paddingInlineStart:de,paddingInlineEnd:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,marginBlock:de,marginBlockStart:de,marginBlockEnd:de,marginInline:de,marginInlineStart:de,marginInlineEnd:de,fontSize:de,backgroundPositionX:de,backgroundPositionY:de,...Nz,zIndex:uv,fillOpacity:qo,strokeOpacity:qo,numOctaves:uv},Yz={...k0,color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:UO,WebkitFilter:UO,mask:GO,WebkitMask:GO},YT=i=>Yz[i],qz=new Set([UO,GO]);function qT(i,e){let t=YT(i);return qz.has(t)||(t=cn),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const Uz=new Set(["auto","none","0"]);function Gz(i,e,t){let n=0,s;for(;n<i.length&&!s;){const l=i[n];typeof l=="string"&&!Uz.has(l)&&Uo(l).values.length&&(s=i[n]),n++}if(s&&t)for(const l of e)i[l]=qT(t,s)}class Wz extends S0{constructor(e,t,n,s,l){super(e,t,n,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let p=0;p<e.length;p++){let m=e[p];if(typeof m=="string"&&(m=m.trim(),h0(m))){const y=ZT(m,t.current);y!==void 0&&(e[p]=y),p===e.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!LT.has(n)||e.length!==2)return;const[s,l]=e,o=cv(s),c=cv(l),f=Hx(s),d=Hx(l);if(f!==d&&Ws[n]){this.needsMeasurement=!0;return}if(o!==c)if(sv(o)&&sv(c))for(let p=0;p<e.length;p++){const m=e[p];typeof m=="string"&&(e[p]=parseFloat(m))}else Ws[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let s=0;s<e.length;s++)(e[s]===null||Vz(e[s]))&&n.push(s);n.length&&Gz(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ws[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&e.getValue(n,s).jump(s,!1)}measureEndState(){var c;const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const s=e.getValue(t);s&&s.jump(this.measuredOrigin,!1);const l=n.length-1,o=n[l];n[l]=Ws[t](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEach(([f,d])=>{e.getValue(f).set(d)}),this.resolveNoneKeyframes()}}const Hz=new Set(["opacity","clipPath","filter","transform"]);function UT(i,e,t){if(i==null)return[];if(i instanceof EventTarget)return[i];if(typeof i=="string"){let n=document;const s=(t==null?void 0:t[i])??n.querySelectorAll(i);return s?Array.from(s):[]}return Array.from(i).filter(n=>n!=null)}const GT=(i,e)=>e&&typeof i=="number"?e.transform(i):i;function Iz(i){return eT(i)&&"offsetHeight"in i}const{schedule:T0}=pT(queueMicrotask,!1),rn={x:!1,y:!1};function WT(){return rn.x||rn.y}function Fz(i){return i==="x"||i==="y"?rn[i]?null:(rn[i]=!0,()=>{rn[i]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}function HT(i,e){const t=UT(i),n=new AbortController,s={passive:!0,...e,signal:n.signal};return[t,s,()=>n.abort()]}function Kz(i){return!(i.pointerType==="touch"||WT())}function Jz(i,e,t={}){const[n,s,l]=HT(i,t);return n.forEach(o=>{let c=!1,f=!1,d;const p=()=>{o.removeEventListener("pointerleave",S)},m=w=>{d&&(d(w),d=void 0),p()},y=w=>{c=!1,window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),f&&(f=!1,m(w))},b=()=>{c=!0,window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",y,s)},S=w=>{if(w.pointerType!=="touch"){if(c){f=!0;return}m(w)}},v=w=>{if(!Kz(w))return;f=!1;const k=e(o,w);typeof k=="function"&&(d=k,o.addEventListener("pointerleave",S,s))};o.addEventListener("pointerenter",v,s),o.addEventListener("pointerdown",b,s)}),l}const IT=(i,e)=>e?i===e?!0:IT(i,e.parentElement):!1,C0=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1,eD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tD(i){return eD.has(i.tagName)||i.isContentEditable===!0}const iD=new Set(["INPUT","SELECT","TEXTAREA"]);function nD(i){return iD.has(i.tagName)||i.isContentEditable===!0}const Mf=new WeakSet;function fv(i){return e=>{e.key==="Enter"&&i(e)}}function Am(i,e){i.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const sD=(i,e)=>{const t=i.currentTarget;if(!t)return;const n=fv(()=>{if(Mf.has(t))return;Am(t,"down");const s=fv(()=>{Am(t,"up")}),l=()=>Am(t,"cancel");t.addEventListener("keyup",s,e),t.addEventListener("blur",l,e)});t.addEventListener("keydown",n,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),e)};function hv(i){return C0(i)&&!WT()}const dv=new WeakSet;function rD(i,e,t={}){const[n,s,l]=HT(i,t),o=c=>{const f=c.currentTarget;if(!hv(c)||dv.has(c))return;Mf.add(f),t.stopPropagation&&dv.add(c);const d=e(f,c),p=(b,S)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",y),Mf.has(f)&&Mf.delete(f),hv(b)&&typeof d=="function"&&d(b,{success:S})},m=b=>{p(b,f===window||f===document||t.useGlobalTarget||IT(f,b.target))},y=b=>{p(b,!1)};window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",y,s)};return n.forEach(c=>{(t.useGlobalTarget?window:c).addEventListener("pointerdown",o,s),Iz(c)&&(c.addEventListener("focus",d=>sD(d,s)),!tD(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),l}function A0(i){return eT(i)&&"ownerSVGElement"in i}const Ef=new WeakMap;let Ys;const FT=(i,e,t)=>(n,s)=>s&&s[0]?s[0][i+"Size"]:A0(n)&&"getBBox"in n?n.getBBox()[e]:n[t],lD=FT("inline","width","offsetWidth"),aD=FT("block","height","offsetHeight");function oD({target:i,borderBoxSize:e}){var t;(t=Ef.get(i))==null||t.forEach(n=>{n(i,{get width(){return lD(i,e)},get height(){return aD(i,e)}})})}function cD(i){i.forEach(oD)}function uD(){typeof ResizeObserver>"u"||(Ys=new ResizeObserver(cD))}function fD(i,e){Ys||uD();const t=UT(i);return t.forEach(n=>{let s=Ef.get(n);s||(s=new Set,Ef.set(n,s)),s.add(e),Ys==null||Ys.observe(n)}),()=>{t.forEach(n=>{const s=Ef.get(n);s==null||s.delete(e),s!=null&&s.size||Ys==null||Ys.unobserve(n)})}}const Rf=new Set;let Xl;function hD(){Xl=()=>{const i={get width(){return window.innerWidth},get height(){return window.innerHeight}};Rf.forEach(e=>e(i))},window.addEventListener("resize",Xl)}function dD(i){return Rf.add(i),Xl||hD(),()=>{Rf.delete(i),!Rf.size&&typeof Xl=="function"&&(window.removeEventListener("resize",Xl),Xl=void 0)}}function pv(i,e){return typeof i=="function"?dD(i):fD(i,e)}function pD(i){return A0(i)&&i.tagName==="svg"}const mD=[...NT,vt,cn],OD=i=>mD.find(BT(i)),mv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ll=()=>({x:mv(),y:mv()}),Ov=()=>({min:0,max:0}),Ct=()=>({x:Ov(),y:Ov()}),gD=new WeakMap;function Dh(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}function Go(i){return typeof i=="string"||Array.isArray(i)}const P0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$0=["initial",...P0];function Zh(i){return Dh(i.animate)||$0.some(e=>Go(i[e]))}function KT(i){return!!(Zh(i)||i.variants)}function yD(i,e,t){for(const n in e){const s=e[n],l=t[n];if(Wt(s))i.addValue(n,s);else if(Wt(l))i.addValue(n,Jl(s,{owner:i}));else if(l!==s)if(i.hasValue(n)){const o=i.getValue(n);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=i.getStaticValue(n);i.addValue(n,Jl(o!==void 0?o:s,{owner:i}))}}for(const n in t)e[n]===void 0&&i.removeValue(n);return e}const WO={current:null},JT={current:!1},bD=typeof window<"u";function SD(){if(JT.current=!0,!!bD)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),e=()=>WO.current=i.matches;i.addEventListener("change",e),e()}else WO.current=!1}const gv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Kf={};function eC(i){Kf=i}function xD(){return Kf}class vD{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:o,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=S0,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=Jt.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,st.render(this.render,!1,!0))};const{latestValues:d,renderState:p}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=t.initial?{...d}:{},this.renderState=p,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=f,this.blockInitialAnimation=!!o,this.isControllingVariants=Zh(t),this.isVariantNode=KT(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(t,{},this);for(const b in y){const S=y[b];d[b]!==void 0&&Wt(S)&&S.set(d[b])}}mount(e){var t,n;if(this.hasBeenMounted)for(const s in this.initialValues)(t=this.values.get(s))==null||t.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,gD.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,l)=>this.bindToMotionValue(l,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(JT.current||SD(),this.shouldReduceMotion=WO.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),Fs(this.notifyUpdate),Fs(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Hz.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:c,times:f,ease:d,duration:p}=t.accelerate,m=new RT({element:this.current,name:e,keyframes:c,times:f,ease:d,duration:on(p)}),y=o(m);this.valueSubscriptions.set(e,()=>{y(),m.cancel()});return}const n=da.has(e);n&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&st.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{s(),l&&l(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Kf){const t=Kf[e];if(!t)continue;const{isEnabled:n,Feature:s}=t;if(!this.features[e]&&s&&n(this.props)&&(this.features[e]=new s(this)),this.features[e]){const l=this.features[e];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ct()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<gv.length;n++){const s=gv[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,o=e[l];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=yD(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Jl(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(Jk(n)||tT(n))?n=parseFloat(n):!OD(n)&&cn.test(t)&&(n=qT(e,t)),this.setBaseTarget(e,Wt(n)?n.get():n)),Wt(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var l;const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const o=w0(this.props,t,(l=this.presenceContext)==null?void 0:l.custom);o&&(n=o[e])}if(t&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Wt(s)?s:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new c0),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){T0.render(this.render)}}class tC extends vD{constructor(){super(...arguments),this.KeyframeResolver=Wz}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Wt(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class rr{constructor(e){this.isMounted=!1,this.node=e}update(){}}function iC({top:i,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:i,max:n}}}function wD({x:i,y:e}){return{top:e.min,right:i.max,bottom:e.max,left:i.min}}function QD(i,e){if(!e)return i;const t=e({x:i.left,y:i.top}),n=e({x:i.right,y:i.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function Pm(i){return i===void 0||i===1}function HO({scale:i,scaleX:e,scaleY:t}){return!Pm(i)||!Pm(e)||!Pm(t)}function Pr(i){return HO(i)||nC(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function nC(i){return yv(i.x)||yv(i.y)}function yv(i){return i&&i!=="0%"}function Jf(i,e,t){const n=i-t,s=e*n;return t+s}function bv(i,e,t,n,s){return s!==void 0&&(i=Jf(i,s,n)),Jf(i,t,n)+e}function IO(i,e=0,t=1,n,s){i.min=bv(i.min,e,t,n,s),i.max=bv(i.max,e,t,n,s)}function sC(i,{x:e,y:t}){IO(i.x,e.translate,e.scale,e.originPoint),IO(i.y,t.translate,t.scale,t.originPoint)}const Sv=.999999999999,xv=1.0000000000001;function kD(i,e,t,n=!1){const s=t.length;if(!s)return;e.x=e.y=1;let l,o;for(let c=0;c<s;c++){l=t[c],o=l.projectionDelta;const{visualElement:f}=l.options;f&&f.props.style&&f.props.style.display==="contents"||(n&&l.options.layoutScroll&&l.scroll&&l!==l.root&&_l(i,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,sC(i,o)),n&&Pr(l.latestValues)&&_l(i,l.latestValues))}e.x<xv&&e.x>Sv&&(e.x=1),e.y<xv&&e.y>Sv&&(e.y=1)}function Vl(i,e){i.min=i.min+e,i.max=i.max+e}function vv(i,e,t,n,s=.5){const l=ut(i.min,i.max,s);IO(i,e,t,l,n)}function _l(i,e){vv(i.x,e.x,e.scaleX,e.scale,e.originX),vv(i.y,e.y,e.scaleY,e.scale,e.originY)}function rC(i,e){return iC(QD(i.getBoundingClientRect(),e))}function TD(i,e,t){const n=rC(i,t),{scroll:s}=e;return s&&(Vl(n.x,s.offset.x),Vl(n.y,s.offset.y)),n}const CD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},AD=ha.length;function PD(i,e,t){let n="",s=!0;for(let l=0;l<AD;l++){const o=ha[l],c=i[o];if(c===void 0)continue;let f=!0;if(typeof c=="number")f=c===(o.startsWith("scale")?1:0);else{const d=parseFloat(c);f=o.startsWith("scale")?d===1:d===0}if(!f||t){const d=GT(c,k0[o]);if(!f){s=!1;const p=CD[o]||o;n+=`${p}(${d}) `}t&&(e[o]=d)}}return n=n.trim(),t?n=t(e,s?"":n):s&&(n="none"),n}function M0(i,e,t){const{style:n,vars:s,transformOrigin:l}=i;let o=!1,c=!1;for(const f in e){const d=e[f];if(da.has(f)){o=!0;continue}else if(OT(f)){s[f]=d;continue}else{const p=GT(d,k0[f]);f.startsWith("origin")?(c=!0,l[f]=p):n[f]=p}}if(e.transform||(o||t?n.transform=PD(e,i.transform,t):n.transform&&(n.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:p=0}=l;n.transformOrigin=`${f} ${d} ${p}`}}function lC(i,{style:e,vars:t},n,s){const l=i.style;let o;for(o in e)l[o]=e[o];s==null||s.applyProjectionStyles(l,n);for(o in t)l.setProperty(o,t[o])}function wv(i,e){return e.max===e.min?0:i/(e.max-e.min)*100}const mo={correct:(i,e)=>{if(!e.target)return i;if(typeof i=="string")if(de.test(i))i=parseFloat(i);else return i;const t=wv(i,e.target.x),n=wv(i,e.target.y);return`${t}% ${n}%`}},$D={correct:(i,{treeScale:e,projectionDelta:t})=>{const n=i,s=cn.parse(i);if(s.length>5)return n;const l=cn.createTransformer(i),o=typeof s[0]!="number"?1:0,c=t.x.scale*e.x,f=t.y.scale*e.y;s[0+o]/=c,s[1+o]/=f;const d=ut(c,f,.5);return typeof s[2+o]=="number"&&(s[2+o]/=d),typeof s[3+o]=="number"&&(s[3+o]/=d),l(s)}},FO={borderRadius:{...mo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mo,borderTopRightRadius:mo,borderBottomLeftRadius:mo,borderBottomRightRadius:mo,boxShadow:$D};function aC(i,{layout:e,layoutId:t}){return da.has(i)||i.startsWith("origin")||(e||t!==void 0)&&(!!FO[i]||i==="opacity")}function E0(i,e,t){var o;const n=i.style,s=e==null?void 0:e.style,l={};if(!n)return l;for(const c in n)(Wt(n[c])||s&&Wt(s[c])||aC(c,i)||((o=t==null?void 0:t.getValue(c))==null?void 0:o.liveStyle)!==void 0)&&(l[c]=n[c]);return l}function MD(i){return window.getComputedStyle(i)}class ED extends tC{constructor(){super(...arguments),this.type="html",this.renderInstance=lC}readValueFromInstance(e,t){var n;if(da.has(t))return(n=this.projection)!=null&&n.isProjecting?XO(t):I5(e,t);{const s=MD(e),l=(OT(t)?s.getPropertyValue(t):s[t])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(e,{transformPagePoint:t}){return rC(e,t)}build(e,t,n){M0(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return E0(e,t,n)}}const RD={offset:"stroke-dashoffset",array:"stroke-dasharray"},zD={offset:"strokeDashoffset",array:"strokeDasharray"};function DD(i,e,t=1,n=0,s=!0){i.pathLength=1;const l=s?RD:zD;i[l.offset]=`${-n}`,i[l.array]=`${e} ${t}`}const ZD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function oC(i,{attrX:e,attrY:t,attrScale:n,pathLength:s,pathSpacing:l=1,pathOffset:o=0,...c},f,d,p){if(M0(i,c,d),f){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:m,style:y}=i;m.transform&&(y.transform=m.transform,delete m.transform),(y.transform||m.transformOrigin)&&(y.transformOrigin=m.transformOrigin??"50% 50%",delete m.transformOrigin),y.transform&&(y.transformBox=(p==null?void 0:p.transformBox)??"fill-box",delete m.transformBox);for(const b of ZD)m[b]!==void 0&&(y[b]=m[b],delete m[b]);e!==void 0&&(m.x=e),t!==void 0&&(m.y=t),n!==void 0&&(m.scale=n),s!==void 0&&DD(m,s,l,o,!1)}const cC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),uC=i=>typeof i=="string"&&i.toLowerCase()==="svg";function XD(i,e,t,n){lC(i,e,void 0,n);for(const s in e.attrs)i.setAttribute(cC.has(s)?s:Q0(s),e.attrs[s])}function fC(i,e,t){const n=E0(i,e,t);for(const s in i)if(Wt(i[s])||Wt(e[s])){const l=ha.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[l]=i[s]}return n}class LD extends tC{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ct}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(da.has(t)){const n=YT(t);return n&&n.default||0}return t=cC.has(t)?t:Q0(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return fC(e,t,n)}build(e,t,n){oC(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,s){XD(e,t,n,s)}mount(e){this.isSVGTag=uC(e.tagName),super.mount(e)}}const VD=$0.length;function hC(i){if(!i)return;if(!i.isControllingVariants){const t=i.parent?hC(i.parent)||{}:{};return i.props.initial!==void 0&&(t.initial=i.props.initial),t}const e={};for(let t=0;t<VD;t++){const n=$0[t],s=i.props[n];(Go(s)||s===!1)&&(e[n]=s)}return e}function dC(i,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==i.length)return!1;for(let n=0;n<t;n++)if(e[n]!==i[n])return!1;return!0}const _D=[...P0].reverse(),jD=P0.length;function BD(i){return e=>Promise.all(e.map(({animation:t,options:n})=>Xz(i,t,n)))}function ND(i){let e=BD(i),t=Qv(),n=!0;const s=f=>(d,p)=>{var y;const m=Yl(i,p,f==="exit"?(y=i.presenceContext)==null?void 0:y.custom:void 0);if(m){const{transition:b,transitionEnd:S,...v}=m;d={...d,...v,...S}}return d};function l(f){e=f(i)}function o(f){const{props:d}=i,p=hC(i.parent)||{},m=[],y=new Set;let b={},S=1/0;for(let w=0;w<jD;w++){const k=_D[w],A=t[k],P=d[k]!==void 0?d[k]:p[k],V=Go(P),R=k===f?A.isActive:null;R===!1&&(S=w);let N=P===p[k]&&P!==d[k]&&V;if(N&&n&&i.manuallyAnimateOnMount&&(N=!1),A.protectedKeys={...b},!A.isActive&&R===null||!P&&!A.prevProp||Dh(P)||typeof P=="boolean")continue;if(k==="exit"&&A.isActive&&R!==!0){A.prevResolvedValues&&(b={...b,...A.prevResolvedValues});continue}const _=YD(A.prevProp,P);let j=_||k===f&&A.isActive&&!N&&V||w>S&&V,K=!1;const Oe=Array.isArray(P)?P:[P];let ce=Oe.reduce(s(k),{});R===!1&&(ce={});const{prevResolvedValues:ie={}}=A,xe={...ie,...ce},Se=W=>{j=!0,y.has(W)&&(K=!0,y.delete(W)),A.needsAnimating[W]=!0;const te=i.getValue(W);te&&(te.liveStyle=!1)};for(const W in xe){const te=ce[W],oe=ie[W];if(b.hasOwnProperty(W))continue;let F=!1;NO(te)&&NO(oe)?F=!dC(te,oe):F=te!==oe,F?te!=null?Se(W):y.add(W):te!==void 0&&y.has(W)?Se(W):A.protectedKeys[W]=!0}A.prevProp=P,A.prevResolvedValues=ce,A.isActive&&(b={...b,...ce}),n&&i.blockInitialAnimation&&(j=!1);const we=N&&_;j&&(!we||K)&&m.push(...Oe.map(W=>{const te={type:k};if(typeof W=="string"&&n&&!we&&i.manuallyAnimateOnMount&&i.parent){const{parent:oe}=i,F=Yl(oe,W);if(oe.enteringChildren&&F){const{delayChildren:M}=F.transition||{};te.delay=DT(oe.enteringChildren,i,M)}}return{animation:W,options:te}}))}if(y.size){const w={};if(typeof d.initial!="boolean"){const k=Yl(i,Array.isArray(d.initial)?d.initial[0]:d.initial);k&&k.transition&&(w.transition=k.transition)}y.forEach(k=>{const A=i.getBaseTarget(k),P=i.getValue(k);P&&(P.liveStyle=!0),w[k]=A??null}),m.push({animation:w})}let v=!!m.length;return n&&(d.initial===!1||d.initial===d.animate)&&!i.manuallyAnimateOnMount&&(v=!1),n=!1,v?e(m):Promise.resolve()}function c(f,d){var m;if(t[f].isActive===d)return Promise.resolve();(m=i.variantChildren)==null||m.forEach(y=>{var b;return(b=y.animationState)==null?void 0:b.setActive(f,d)}),t[f].isActive=d;const p=o(f);for(const y in t)t[y].protectedKeys={};return p}return{animateChanges:o,setActive:c,setAnimateFunction:l,getState:()=>t,reset:()=>{t=Qv()}}}function YD(i,e){return typeof e=="string"?e!==i:Array.isArray(e)?!dC(e,i):!1}function Tr(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qv(){return{animate:Tr(!0),whileInView:Tr(),whileHover:Tr(),whileTap:Tr(),whileDrag:Tr(),whileFocus:Tr(),exit:Tr()}}function kv(i,e){i.min=e.min,i.max=e.max}function sn(i,e){kv(i.x,e.x),kv(i.y,e.y)}function Tv(i,e){i.translate=e.translate,i.scale=e.scale,i.originPoint=e.originPoint,i.origin=e.origin}const pC=1e-4,qD=1-pC,UD=1+pC,mC=.01,GD=0-mC,WD=0+mC;function ei(i){return i.max-i.min}function HD(i,e,t){return Math.abs(i-e)<=t}function Cv(i,e,t,n=.5){i.origin=n,i.originPoint=ut(e.min,e.max,i.origin),i.scale=ei(t)/ei(e),i.translate=ut(t.min,t.max,i.origin)-i.originPoint,(i.scale>=qD&&i.scale<=UD||isNaN(i.scale))&&(i.scale=1),(i.translate>=GD&&i.translate<=WD||isNaN(i.translate))&&(i.translate=0)}function Ro(i,e,t,n){Cv(i.x,e.x,t.x,n?n.originX:void 0),Cv(i.y,e.y,t.y,n?n.originY:void 0)}function Av(i,e,t){i.min=t.min+e.min,i.max=i.min+ei(e)}function ID(i,e,t){Av(i.x,e.x,t.x),Av(i.y,e.y,t.y)}function Pv(i,e,t){i.min=e.min-t.min,i.max=i.min+ei(e)}function eh(i,e,t){Pv(i.x,e.x,t.x),Pv(i.y,e.y,t.y)}function $v(i,e,t,n,s){return i-=e,i=Jf(i,1/t,n),s!==void 0&&(i=Jf(i,1/s,n)),i}function FD(i,e=0,t=1,n=.5,s,l=i,o=i){if(Mn.test(e)&&(e=parseFloat(e),e=ut(o.min,o.max,e/100)-o.min),typeof e!="number")return;let c=ut(l.min,l.max,n);i===l&&(c-=e),i.min=$v(i.min,e,t,c,s),i.max=$v(i.max,e,t,c,s)}function Mv(i,e,[t,n,s],l,o){FD(i,e[t],e[n],e[s],e.scale,l,o)}const KD=["x","scaleX","originX"],JD=["y","scaleY","originY"];function Ev(i,e,t,n){Mv(i.x,e,KD,t?t.x:void 0,n?n.x:void 0),Mv(i.y,e,JD,t?t.y:void 0,n?n.y:void 0)}function Rv(i){return i.translate===0&&i.scale===1}function OC(i){return Rv(i.x)&&Rv(i.y)}function zv(i,e){return i.min===e.min&&i.max===e.max}function eZ(i,e){return zv(i.x,e.x)&&zv(i.y,e.y)}function Dv(i,e){return Math.round(i.min)===Math.round(e.min)&&Math.round(i.max)===Math.round(e.max)}function gC(i,e){return Dv(i.x,e.x)&&Dv(i.y,e.y)}function Zv(i){return ei(i.x)/ei(i.y)}function Xv(i,e){return i.translate===e.translate&&i.scale===e.scale&&i.originPoint===e.originPoint}function wn(i){return[i("x"),i("y")]}function tZ(i,e,t){let n="";const s=i.x.translate/e.x,l=i.y.translate/e.y,o=(t==null?void 0:t.z)||0;if((s||l||o)&&(n=`translate3d(${s}px, ${l}px, ${o}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:d,rotate:p,rotateX:m,rotateY:y,skewX:b,skewY:S}=t;d&&(n=`perspective(${d}px) ${n}`),p&&(n+=`rotate(${p}deg) `),m&&(n+=`rotateX(${m}deg) `),y&&(n+=`rotateY(${y}deg) `),b&&(n+=`skewX(${b}deg) `),S&&(n+=`skewY(${S}deg) `)}const c=i.x.scale*e.x,f=i.y.scale*e.y;return(c!==1||f!==1)&&(n+=`scale(${c}, ${f})`),n||"none"}const yC=["TopLeft","TopRight","BottomLeft","BottomRight"],iZ=yC.length,Lv=i=>typeof i=="string"?parseFloat(i):i,Vv=i=>typeof i=="number"||de.test(i);function nZ(i,e,t,n,s,l){s?(i.opacity=ut(0,t.opacity??1,sZ(n)),i.opacityExit=ut(e.opacity??1,0,rZ(n))):l&&(i.opacity=ut(e.opacity??1,t.opacity??1,n));for(let o=0;o<iZ;o++){const c=`border${yC[o]}Radius`;let f=_v(e,c),d=_v(t,c);if(f===void 0&&d===void 0)continue;f||(f=0),d||(d=0),f===0||d===0||Vv(f)===Vv(d)?(i[c]=Math.max(ut(Lv(f),Lv(d),n),0),(Mn.test(d)||Mn.test(f))&&(i[c]+="%")):i[c]=d}(e.rotate||t.rotate)&&(i.rotate=ut(e.rotate||0,t.rotate||0,n))}function _v(i,e){return i[e]!==void 0?i[e]:i.borderRadius}const sZ=bC(0,.5,uT),rZ=bC(.5,.95,Ii);function bC(i,e,t){return n=>n<i?0:n>e?1:t(Yo(i,e,n))}function lZ(i,e,t){const n=Wt(i)?i:Jl(i);return n.start(v0("",n,e,t)),n.animation}function Wo(i,e,t,n={passive:!0}){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t)}const aZ=(i,e)=>i.depth-e.depth;class oZ{constructor(){this.children=[],this.isDirty=!1}add(e){a0(this.children,e),this.isDirty=!0}remove(e){Wf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(aZ),this.isDirty=!1,this.children.forEach(e)}}function cZ(i,e){const t=Jt.now(),n=({timestamp:s})=>{const l=s-t;l>=e&&(Fs(n),i(l-e))};return st.setup(n,!0),()=>Fs(n)}function zf(i){return Wt(i)?i.get():i}class uZ{constructor(){this.members=[]}add(e){a0(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const s=n.instance;s&&s.isConnected===!1&&n.isPresent!==!1&&!n.snapshot&&Wf(this.members,n)}e.scheduleRender()}remove(e){if(Wf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(s=>e===s);if(t===0)return!1;let n;for(let s=t;s>=0;s--){const l=this.members[s],o=l.instance;if(l.isPresent!==!1&&(!o||o.isConnected!==!1)){n=l;break}}return n?(this.promote(n),!0):!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();const s=n.options.layoutDependency,l=e.options.layoutDependency;if(!(s!==void 0&&l!==void 0&&s===l)){const f=n.instance;f&&f.isConnected===!1&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:c}=e.options;c===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Df={hasAnimatedSinceResize:!0,hasEverUpdated:!1},$m=["","X","Y","Z"],fZ=1e3;let hZ=0;function Mm(i,e,t,n){const{latestValues:s}=e;s[i]&&(t[i]=s[i],e.setStaticValue(i,0),n&&(n[i]=0))}function SC(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;const{visualElement:e}=i.options;if(!e)return;const t=_T(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:l}=i.options;window.MotionCancelOptimisedAnimation(t,"transform",st,!(s||l))}const{parent:n}=i;n&&!n.hasCheckedOptimisedAppear&&SC(n)}function xC({attachResizeListener:i,defaultParent:e,measureScroll:t,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},c=e==null?void 0:e()){this.id=hZ++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(mZ),this.nodes.forEach(bZ),this.nodes.forEach(SZ),this.nodes.forEach(OZ)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new oZ)}addEventListener(o,c){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new c0),this.eventHandlers.get(o).add(c)}notifyListeners(o,...c){const f=this.eventHandlers.get(o);f&&f.notify(...c)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=A0(o)&&!pD(o),this.instance=o;const{layoutId:c,layout:f,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||c)&&(this.isLayoutDirty=!0),i){let p,m=0;const y=()=>this.root.updateBlockedByResize=!1;st.read(()=>{m=window.innerWidth}),i(o,()=>{const b=window.innerWidth;b!==m&&(m=b,this.root.updateBlockedByResize=!0,p&&p(),p=cZ(y,250),Df.hasAnimatedSinceResize&&(Df.hasAnimatedSinceResize=!1,this.nodes.forEach(Nv)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||f)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:m,hasRelativeLayoutChanged:y,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||d.getDefaultTransition()||kZ,{onLayoutAnimationStart:v,onLayoutAnimationComplete:w}=d.getProps(),k=!this.targetLayout||!gC(this.targetLayout,b),A=!m&&y;if(this.options.layoutRoot||this.resumeFrom||A||m&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const P={...x0(S,"layout"),onPlay:v,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P),this.setAnimationOrigin(p,A)}else m||Nv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(xZ),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&SC(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const m=this.path[p];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:c,layout:f}=this.options;if(c===void 0&&!f)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yZ),this.nodes.forEach(dZ),this.nodes.forEach(pZ)):this.nodes.forEach(Bv),this.clearAllSnapshots();const c=Jt.now();jt.delta=zn(0,1e3/60,c-jt.timestamp),jt.timestamp=c,jt.isProcessing=!0,vm.update.process(jt),vm.preRender.process(jt),vm.render.process(jt),jt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,T0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gZ),this.sharedNodes.forEach(vZ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ei(this.snapshot.measuredBox.x)&&!ei(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ct(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(c=!1),c&&this.instance){const f=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:f,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!OC(this.projectionDelta),f=this.getTransformTemplate(),d=f?f(this.latestValues,""):void 0,p=d!==this.prevTransformTemplateValue;o&&this.instance&&(c||Pr(this.latestValues)||p)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const c=this.measurePageBox();let f=this.removeElementScroll(c);return o&&(f=this.removeTransform(f)),TZ(f),{animationId:this.root.animationId,measuredBox:c,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:o}=this.options;if(!o)return Ct();const c=o.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(CZ))){const{scroll:p}=this.root;p&&(Vl(c.x,p.offset.x),Vl(c.y,p.offset.y))}return c}removeElementScroll(o){var f;const c=Ct();if(sn(c,o),(f=this.scroll)!=null&&f.wasRoot)return c;for(let d=0;d<this.path.length;d++){const p=this.path[d],{scroll:m,options:y}=p;p!==this.root&&m&&y.layoutScroll&&(m.wasRoot&&sn(c,o),Vl(c.x,m.offset.x),Vl(c.y,m.offset.y))}return c}applyTransform(o,c=!1){const f=Ct();sn(f,o);for(let d=0;d<this.path.length;d++){const p=this.path[d];!c&&p.options.layoutScroll&&p.scroll&&p!==p.root&&_l(f,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),Pr(p.latestValues)&&_l(f,p.latestValues)}return Pr(this.latestValues)&&_l(f,this.latestValues),f}removeTransform(o){const c=Ct();sn(c,o);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!d.instance||!Pr(d.latestValues))continue;HO(d.latestValues)&&d.updateSnapshot();const p=Ct(),m=d.measurePageBox();sn(p,m),Ev(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,p)}return Pr(this.latestValues)&&Ev(c,this.latestValues),c}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==jt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var b;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==c;if(!(o||f&&this.isSharedProjectionDirty||this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:m}=this.options;if(!this.layout||!(p||m))return;this.resolvedRelativeTargetAt=jt.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ct(),this.targetWithTransforms=Ct()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ID(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sn(this.target,this.layout.layoutBox),sC(this.target,this.targetDelta)):sn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||HO(this.parent.latestValues)||nC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,c,f){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ct(),this.relativeTargetOrigin=Ct(),eh(this.relativeTargetOrigin,c,f),sn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var S;const o=this.getLead(),c=!!this.resumingFrom||this!==o;let f=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&(f=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===jt.timestamp&&(f=!1),f)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;sn(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,y=this.treeScale.y;kD(this.layoutCorrected,this.treeScale,this.path,c),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ct());const{target:b}=o;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tv(this.prevProjectionDelta.x,this.projectionDelta.x),Tv(this.prevProjectionDelta.y,this.projectionDelta.y)),Ro(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==y||!Xv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),o){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ll(),this.projectionDelta=Ll(),this.projectionDeltaWithTransform=Ll()}setAnimationOrigin(o,c=!1){const f=this.snapshot,d=f?f.latestValues:{},p={...this.latestValues},m=Ll();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const y=Ct(),b=f?f.source:void 0,S=this.layout?this.layout.source:void 0,v=b!==S,w=this.getStack(),k=!w||w.members.length<=1,A=!!(v&&!k&&this.options.crossfade===!0&&!this.path.some(QZ));this.animationProgress=0;let P;this.mixTargetDelta=V=>{const R=V/1e3;Yv(m.x,o.x,R),Yv(m.y,o.y,R),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(eh(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wZ(this.relativeTarget,this.relativeTargetOrigin,y,R),P&&eZ(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=Ct()),sn(P,this.relativeTarget)),v&&(this.animationValues=p,nZ(p,d,this.latestValues,R,A,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var c,f,d;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(d=(f=this.resumingFrom)==null?void 0:f.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Fs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{Df.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Jl(0)),this.motionValue.jump(0,!1),this.currentAnimation=lZ(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),o.onUpdate&&o.onUpdate(p)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fZ),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:c,target:f,layout:d,latestValues:p}=o;if(!(!c||!f||!d)){if(this!==o&&this.layout&&d&&vC(this.options.animationType,this.layout.layoutBox,d.layoutBox)){f=this.target||Ct();const m=ei(this.layout.layoutBox.x);f.x.min=o.target.x.min,f.x.max=f.x.min+m;const y=ei(this.layout.layoutBox.y);f.y.min=o.target.y.min,f.y.max=f.y.min+y}sn(c,f),_l(c,p),Ro(this.projectionDeltaWithTransform,this.layoutCorrected,c,p)}}registerSharedNode(o,c){this.sharedNodes.has(o)||this.sharedNodes.set(o,new uZ),this.sharedNodes.get(o).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var c;const{layoutId:o}=this.options;return o?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:o}=this.options;return o?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:c,preserveFollowOpacity:f}={}){const d=this.getStack();d&&d.promote(this,f),o&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let c=!1;const{latestValues:f}=o;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(c=!0),!c)return;const d={};f.z&&Mm("z",o,d,this.animationValues);for(let p=0;p<$m.length;p++)Mm(`rotate${$m[p]}`,o,d,this.animationValues),Mm(`skew${$m[p]}`,o,d,this.animationValues);o.render();for(const p in d)o.setStaticValue(p,d[p]),this.animationValues&&(this.animationValues[p]=d[p]);o.scheduleRender()}applyProjectionStyles(o,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=zf(c==null?void 0:c.pointerEvents)||"",o.transform=f?f(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=zf(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!Pr(this.latestValues)&&(o.transform=f?f({},""):"none",this.hasProjected=!1);return}o.visibility="";const p=d.animationValues||d.latestValues;this.applyTransformsToTarget();let m=tZ(this.projectionDeltaWithTransform,this.treeScale,p);f&&(m=f(p,m)),o.transform=m;const{x:y,y:b}=this.projectionDelta;o.transformOrigin=`${y.origin*100}% ${b.origin*100}% 0`,d.animationValues?o.opacity=d===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:o.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const S in FO){if(p[S]===void 0)continue;const{correct:v,applyTo:w,isCSSVariable:k}=FO[S],A=m==="none"?p[S]:v(p[S],d);if(w){const P=w.length;for(let V=0;V<P;V++)o[w[V]]=A}else k?this.options.visualElement.renderState.vars[S]=A:o[S]=A}this.options.layoutId&&(o.pointerEvents=d===this?zf(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var c;return(c=o.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(jv),this.root.sharedNodes.clear()}}}function dZ(i){i.updateLayout()}function pZ(i){var t;const e=((t=i.resumeFrom)==null?void 0:t.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&e&&i.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=i.layout,{animationType:l}=i.options,o=e.source!==i.layout.source;l==="size"?wn(m=>{const y=o?e.measuredBox[m]:e.layoutBox[m],b=ei(y);y.min=n[m].min,y.max=y.min+b}):vC(l,e.layoutBox,n)&&wn(m=>{const y=o?e.measuredBox[m]:e.layoutBox[m],b=ei(n[m]);y.max=y.min+b,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[m].max=i.relativeTarget[m].min+b)});const c=Ll();Ro(c,n,e.layoutBox);const f=Ll();o?Ro(f,i.applyTransform(s,!0),e.measuredBox):Ro(f,n,e.layoutBox);const d=!OC(c);let p=!1;if(!i.resumeFrom){const m=i.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:b}=m;if(y&&b){const S=Ct();eh(S,e.layoutBox,y.layoutBox);const v=Ct();eh(v,n,b.layoutBox),gC(S,v)||(p=!0),m.options.layoutRoot&&(i.relativeTarget=v,i.relativeTargetOrigin=S,i.relativeParent=m)}}}i.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:p})}else if(i.isLead()){const{onExitComplete:n}=i.options;n&&n()}i.options.transition=void 0}function mZ(i){i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function OZ(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function gZ(i){i.clearSnapshot()}function jv(i){i.clearMeasurements()}function Bv(i){i.isLayoutDirty=!1}function yZ(i){const{visualElement:e}=i.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),i.resetTransform()}function Nv(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function bZ(i){i.resolveTargetDelta()}function SZ(i){i.calcProjection()}function xZ(i){i.resetSkewAndRotation()}function vZ(i){i.removeLeadSnapshot()}function Yv(i,e,t){i.translate=ut(e.translate,0,t),i.scale=ut(e.scale,1,t),i.origin=e.origin,i.originPoint=e.originPoint}function qv(i,e,t,n){i.min=ut(e.min,t.min,n),i.max=ut(e.max,t.max,n)}function wZ(i,e,t,n){qv(i.x,e.x,t.x,n),qv(i.y,e.y,t.y,n)}function QZ(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const kZ={duration:.45,ease:[.4,0,.1,1]},Uv=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),Gv=Uv("applewebkit/")&&!Uv("chrome/")?Math.round:Ii;function Wv(i){i.min=Gv(i.min),i.max=Gv(i.max)}function TZ(i){Wv(i.x),Wv(i.y)}function vC(i,e,t){return i==="position"||i==="preserve-aspect"&&!HD(Zv(e),Zv(t),.2)}function CZ(i){var e;return i!==i.root&&((e=i.scroll)==null?void 0:e.wasRoot)}const AZ=xC({attachResizeListener:(i,e)=>Wo(i,"resize",e),measureScroll:()=>{var i,e;return{x:document.documentElement.scrollLeft||((i=document.body)==null?void 0:i.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Em={current:void 0},wC=xC({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!Em.current){const i=new AZ({});i.mount(window),i.setOptions({layoutScroll:!0}),Em.current=i}return Em.current},resetTransform:(i,e)=>{i.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),QC=q.createContext({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"});function PZ(i=!0){const e=q.useContext(l0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:s}=e,l=q.useId();q.useEffect(()=>{if(i)return s(l)},[i]);const o=q.useCallback(()=>i&&n&&n(l),[l,n,i]);return!t&&n?[!1,o]:[!0]}const kC=q.createContext({strict:!1}),Hv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Iv=!1;function $Z(){if(Iv)return;const i={};for(const e in Hv)i[e]={isEnabled:t=>Hv[e].some(n=>!!t[n])};eC(i),Iv=!0}function TC(){return $Z(),xD()}function MZ(i){const e=TC();for(const t in i)e[t]={...e[t],...i[t]};eC(e)}const EZ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function th(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||EZ.has(i)}let CC=i=>!th(i);function RZ(i){typeof i=="function"&&(CC=e=>e.startsWith("on")?!th(e):i(e))}try{RZ(require("@emotion/is-prop-valid").default)}catch{}function zZ(i,e,t){const n={};for(const s in i)s==="values"&&typeof i.values=="object"||(CC(s)||t===!0&&th(s)||!e&&!th(s)||i.draggable&&s.startsWith("onDrag"))&&(n[s]=i[s]);return n}const Xh=q.createContext({});function DZ(i,e){if(Zh(i)){const{initial:t,animate:n}=i;return{initial:t===!1||Go(t)?t:void 0,animate:Go(n)?n:void 0}}return i.inherit!==!1?e:{}}function ZZ(i){const{initial:e,animate:t}=DZ(i,q.useContext(Xh));return q.useMemo(()=>({initial:e,animate:t}),[Fv(e),Fv(t)])}function Fv(i){return Array.isArray(i)?i.join(" "):i}const R0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function AC(i,e,t){for(const n in e)!Wt(e[n])&&!aC(n,t)&&(i[n]=e[n])}function XZ({transformTemplate:i},e){return q.useMemo(()=>{const t=R0();return M0(t,e,i),Object.assign({},t.vars,t.style)},[e])}function LZ(i,e){const t=i.style||{},n={};return AC(n,t,i),Object.assign(n,XZ(i,e)),n}function VZ(i,e){const t={},n=LZ(i,e);return i.drag&&i.dragListener!==!1&&(t.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(t.tabIndex=0),t.style=n,t}const PC=()=>({...R0(),attrs:{}});function _Z(i,e,t,n){const s=q.useMemo(()=>{const l=PC();return oC(l,e,uC(n),i.transformTemplate,i.style),{...l.attrs,style:{...l.style}}},[e]);if(i.style){const l={};AC(l,i.style,i),s.style={...l,...s.style}}return s}const jZ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function z0(i){return typeof i!="string"||i.includes("-")?!1:!!(jZ.indexOf(i)>-1||/[A-Z]/u.test(i))}function BZ(i,e,t,{latestValues:n},s,l=!1,o){const f=(o??z0(i)?_Z:VZ)(e,n,s,i),d=zZ(e,typeof i=="string",l),p=i!==q.Fragment?{...d,...f,ref:t}:{},{children:m}=e,y=q.useMemo(()=>Wt(m)?m.get():m,[m]);return q.createElement(i,{...p,children:y})}function NZ({scrapeMotionValuesFromProps:i,createRenderState:e},t,n,s){return{latestValues:YZ(t,n,s,i),renderState:e()}}function YZ(i,e,t,n){const s={},l=n(i,{});for(const y in l)s[y]=zf(l[y]);let{initial:o,animate:c}=i;const f=Zh(i),d=KT(i);e&&d&&!f&&i.inherit!==!1&&(o===void 0&&(o=e.initial),c===void 0&&(c=e.animate));let p=t?t.initial===!1:!1;p=p||o===!1;const m=p?c:o;if(m&&typeof m!="boolean"&&!Dh(m)){const y=Array.isArray(m)?m:[m];for(let b=0;b<y.length;b++){const S=w0(i,y[b]);if(S){const{transitionEnd:v,transition:w,...k}=S;for(const A in k){let P=k[A];if(Array.isArray(P)){const V=p?P.length-1:0;P=P[V]}P!==null&&(s[A]=P)}for(const A in v)s[A]=v[A]}}}return s}const $C=i=>(e,t)=>{const n=q.useContext(Xh),s=q.useContext(l0),l=()=>NZ(i,e,n,s);return t?l():UR(l)},qZ=$C({scrapeMotionValuesFromProps:E0,createRenderState:R0}),UZ=$C({scrapeMotionValuesFromProps:fC,createRenderState:PC}),GZ=Symbol.for("motionComponentSymbol");function WZ(i,e,t){const n=q.useRef(t);q.useInsertionEffect(()=>{n.current=t});const s=q.useRef(null);return q.useCallback(l=>{var c;l&&((c=i.onMount)==null||c.call(i,l)),e&&(l?e.mount(l):e.unmount());const o=n.current;if(typeof o=="function")if(l){const f=o(l);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):o(l);else o&&(o.current=l)},[e])}const MC=q.createContext({});function Rl(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function HZ(i,e,t,n,s,l){var P,V;const{visualElement:o}=q.useContext(Xh),c=q.useContext(kC),f=q.useContext(l0),d=q.useContext(QC),p=d.reducedMotion,m=d.skipAnimations,y=q.useRef(null),b=q.useRef(!1);n=n||c.renderer,!y.current&&n&&(y.current=n(i,{visualState:e,parent:o,props:t,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:l}),b.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const S=y.current,v=q.useContext(MC);S&&!S.projection&&s&&(S.type==="html"||S.type==="svg")&&IZ(y.current,t,s,v);const w=q.useRef(!1);q.useInsertionEffect(()=>{S&&w.current&&S.update(t,f)});const k=t[VT],A=q.useRef(!!k&&!((P=window.MotionHandoffIsComplete)!=null&&P.call(window,k))&&((V=window.MotionHasOptimisedAnimation)==null?void 0:V.call(window,k)));return GR(()=>{b.current=!0,S&&(w.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),A.current&&S.animationState&&S.animationState.animateChanges())}),q.useEffect(()=>{S&&(!A.current&&S.animationState&&S.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{var R;(R=window.MotionHandoffMarkAsComplete)==null||R.call(window,k)}),A.current=!1),S.enteringChildren=void 0)}),S}function IZ(i,e,t,n){const{layoutId:s,layout:l,drag:o,dragConstraints:c,layoutScroll:f,layoutRoot:d,layoutCrossfade:p}=e;i.projection=new t(i.latestValues,e["data-framer-portal-id"]?void 0:EC(i.parent)),i.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!o||c&&Rl(c),visualElement:i,animationType:typeof l=="string"?l:"both",initialPromotionConfig:n,crossfade:p,layoutScroll:f,layoutRoot:d})}function EC(i){if(i)return i.options.allowProjection!==!1?i.projection:EC(i.parent)}function Rm(i,{forwardMotionProps:e=!1,type:t}={},n,s){n&&MZ(n);const l=t?t==="svg":z0(i),o=l?UZ:qZ;function c(d,p){let m;const y={...q.useContext(QC),...d,layoutId:FZ(d)},{isStatic:b}=y,S=ZZ(d),v=o(d,b);if(!b&&Kk){KZ();const w=JZ(y);m=w.MeasureLayout,S.visualElement=HZ(i,v,y,s,w.ProjectionNode,l)}return C.jsxs(Xh.Provider,{value:S,children:[m&&S.visualElement?C.jsx(m,{visualElement:S.visualElement,...y}):null,BZ(i,d,WZ(v,S.visualElement,p),v,b,e,l)]})}c.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const f=q.forwardRef(c);return f[GZ]=i,f}function FZ({layoutId:i}){const e=q.useContext(Fk).id;return e&&i!==void 0?e+"-"+i:i}function KZ(i,e){q.useContext(kC).strict}function JZ(i){const e=TC(),{drag:t,layout:n}=e;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(i)||n!=null&&n.isEnabled(i)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function eX(i,e){if(typeof Proxy>"u")return Rm;const t=new Map,n=(l,o)=>Rm(l,o,i,e),s=(l,o)=>n(l,o);return new Proxy(s,{get:(l,o)=>o==="create"?n:(t.has(o)||t.set(o,Rm(o,void 0,i,e)),t.get(o))})}const tX=(i,e)=>e.isSVG??z0(i)?new LD(e):new ED(e,{allowProjection:i!==q.Fragment});class iX extends rr{constructor(e){super(e),e.animationState||(e.animationState=ND(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Dh(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let nX=0;class sX extends rr{constructor(){super(...arguments),this.id=nX++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const s=this.node.animationState.setActive("exit",!e);t&&!e&&s.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const rX={animation:{Feature:iX},exit:{Feature:sX}};function Qc(i){return{point:{x:i.pageX,y:i.pageY}}}const lX=i=>e=>C0(e)&&i(e,Qc(e));function zo(i,e,t,n){return Wo(i,e,lX(t),n)}const RC=({current:i})=>i?i.ownerDocument.defaultView:null,Kv=(i,e)=>Math.abs(i-e);function aX(i,e){const t=Kv(i.x,e.x),n=Kv(i.y,e.y);return Math.sqrt(t**2+n**2)}const Jv=new Set(["auto","scroll"]);class zC{constructor(e,t,{transformPagePoint:n,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:o=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Dm(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,v=aX(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!v)return;const{point:w}=b,{timestamp:k}=jt;this.history.push({...w,timestamp:k});const{onStart:A,onMove:P}=this.handlers;S||(A&&A(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,b)},this.handlePointerMove=(b,S)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=zm(S,this.transformPagePoint),st.update(this.updatePoint,!0)},this.handlePointerUp=(b,S)=>{this.end();const{onEnd:v,onSessionEnd:w,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=Dm(b.type==="pointercancel"?this.lastMoveEventInfo:zm(S,this.transformPagePoint),this.history);this.startEvent&&v&&v(b,A),w&&w(b,A)},!C0(e))return;this.dragSnapToOrigin=l,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=s||window;const f=Qc(e),d=zm(f,this.transformPagePoint),{point:p}=d,{timestamp:m}=jt;this.history=[{...p,timestamp:m}];const{onSessionStart:y}=t;y&&y(e,Dm(d,this.history)),this.removeListeners=xc(zo(this.contextWindow,"pointermove",this.handlePointerMove),zo(this.contextWindow,"pointerup",this.handlePointerUp),zo(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);(Jv.has(n.overflowX)||Jv.has(n.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,s=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},l={x:s.x-t.x,y:s.y-t.y};l.x===0&&l.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(e,s),st.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Fs(this.updatePoint)}}function zm(i,e){return e?{point:e(i.point)}:i}function ew(i,e){return{x:i.x-e.x,y:i.y-e.y}}function Dm({point:i},e){return{point:i,delta:ew(i,DC(e)),offset:ew(i,oX(e)),velocity:cX(e,.1)}}function oX(i){return i[0]}function DC(i){return i[i.length-1]}function cX(i,e){if(i.length<2)return{x:0,y:0};let t=i.length-1,n=null;const s=DC(i);for(;t>=0&&(n=i[t],!(s.timestamp-n.timestamp>on(e)));)t--;if(!n)return{x:0,y:0};n===i[0]&&i.length>2&&s.timestamp-n.timestamp>on(e)*2&&(n=i[1]);const l=Yi(s.timestamp-n.timestamp);if(l===0)return{x:0,y:0};const o={x:(s.x-n.x)/l,y:(s.y-n.y)/l};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function uX(i,{min:e,max:t},n){return e!==void 0&&i<e?i=n?ut(e,i,n.min):Math.max(i,e):t!==void 0&&i>t&&(i=n?ut(t,i,n.max):Math.min(i,t)),i}function tw(i,e,t){return{min:e!==void 0?i.min+e:void 0,max:t!==void 0?i.max+t-(i.max-i.min):void 0}}function fX(i,{top:e,left:t,bottom:n,right:s}){return{x:tw(i.x,t,s),y:tw(i.y,e,n)}}function iw(i,e){let t=e.min-i.min,n=e.max-i.max;return e.max-e.min<i.max-i.min&&([t,n]=[n,t]),{min:t,max:n}}function hX(i,e){return{x:iw(i.x,e.x),y:iw(i.y,e.y)}}function dX(i,e){let t=.5;const n=ei(i),s=ei(e);return s>n?t=Yo(e.min,e.max-n,i.min):n>s&&(t=Yo(i.min,i.max-s,e.min)),zn(0,1,t)}function pX(i,e){const t={};return e.min!==void 0&&(t.min=e.min-i.min),e.max!==void 0&&(t.max=e.max-i.min),t}const KO=.35;function mX(i=KO){return i===!1?i=0:i===!0&&(i=KO),{x:nw(i,"left","right"),y:nw(i,"top","bottom")}}function nw(i,e,t){return{min:sw(i,e),max:sw(i,t)}}function sw(i,e){return typeof i=="number"?i:i[e]||0}const OX=new WeakMap;class gX{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ct(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=m=>{t&&this.snapToCursor(Qc(m).point),this.stopAnimation()},o=(m,y)=>{const{drag:b,dragPropagation:S,onDragStart:v}=this.getProps();if(b&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fz(b),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wn(k=>{let A=this.getAxisMotionValue(k).get()||0;if(Mn.test(A)){const{projection:P}=this.visualElement;if(P&&P.layout){const V=P.layout.layoutBox[k];V&&(A=ei(V)*(parseFloat(A)/100))}}this.originPoint[k]=A}),v&&st.update(()=>v(m,y),!1,!0),YO(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},c=(m,y)=>{this.latestPointerEvent=m,this.latestPanInfo=y;const{dragPropagation:b,dragDirectionLock:S,onDirectionLock:v,onDrag:w}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:k}=y;if(S&&this.currentDirection===null){this.currentDirection=bX(k),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",y.point,k),this.updateAxis("y",y.point,k),this.visualElement.render(),w&&st.update(()=>w(m,y),!1,!0)},f=(m,y)=>{this.latestPointerEvent=m,this.latestPanInfo=y,this.stop(m,y),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new zC(e,{onSessionStart:l,onStart:o,onMove:c,onSessionEnd:f,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:n,contextWindow:RC(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,s=t||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!n)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:c}=this.getProps();c&&st.postRender(()=>c(n,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:s}=this.getProps();if(!n||!tf(e,s,this.currentDirection))return;const l=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=uX(o,this.constraints[e],this.elastic[e])),l.set(o)}resolveConstraints(){var l;const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(l=this.visualElement.projection)==null?void 0:l.layout,s=this.constraints;e&&Rl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=fX(n.layoutBox,e):this.constraints=!1,this.elastic=mX(t),s!==this.constraints&&!Rl(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&wn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=pX(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Rl(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const l=TD(n,s.root,this.visualElement.getTransformPagePoint());let o=hX(s.layout.layoutBox,l);if(t){const c=t(wD(o));this.hasMutatedConstraints=!!c,c&&(o=iC(c))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:s,dragTransition:l,dragSnapToOrigin:o,onDragTransitionEnd:c}=this.getProps(),f=this.constraints||{},d=wn(p=>{if(!tf(p,t,this.currentDirection))return;let m=f&&f[p]||{};o&&(m={min:0,max:0});const y=s?200:1e6,b=s?40:1e7,S={type:"inertia",velocity:n?e[p]:0,bounceStiffness:y,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...l,...m};return this.startAxisValueAnimation(p,S)});return Promise.all(d).then(c)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return YO(this.visualElement,e),n.start(v0(e,n,0,t,this.visualElement,!1))}stopAnimation(){wn(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),s=n[t];return s||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){wn(t=>{const{drag:n}=this.getProps();if(!tf(t,n,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(t);if(s&&s.layout){const{min:o,max:c}=s.layout.layoutBox[t],f=l.get()||0;l.set(e[t]-ut(o,c,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Rl(t)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};wn(o=>{const c=this.getAxisMotionValue(o);if(c&&this.constraints!==!1){const f=c.get();s[o]=dX({min:f,max:f},this.constraints[o])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),wn(o=>{if(!tf(o,e,null))return;const c=this.getAxisMotionValue(o),{min:f,max:d}=this.constraints[o];c.set(ut(f,d,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;OX.set(this.visualElement,this);const e=this.visualElement.current,t=zo(e,"pointerdown",d=>{const{drag:p,dragListener:m=!0}=this.getProps(),y=d.target,b=y!==e&&nD(y);p&&m&&!b&&this.start(d)});let n;const s=()=>{const{dragConstraints:d}=this.getProps();Rl(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),n||(n=yX(e,d.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,o=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),st.read(s);const c=Wo(window,"resize",()=>this.scalePositionWithinConstraints()),f=l.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:p})=>{this.isDragging&&p&&(wn(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())}));return()=>{c(),t(),o(),f&&f(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:o=KO,dragMomentum:c=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:s,dragConstraints:l,dragElastic:o,dragMomentum:c}}}function rw(i){let e=!0;return()=>{if(e){e=!1;return}i()}}function yX(i,e,t){const n=pv(i,rw(t)),s=pv(e,rw(t));return()=>{n(),s()}}function tf(i,e,t){return(e===!0||e===i)&&(t===null||t===i)}function bX(i,e=10){let t=null;return Math.abs(i.y)>e?t="y":Math.abs(i.x)>e&&(t="x"),t}class SX extends rr{constructor(e){super(e),this.removeGroupControls=Ii,this.removeListeners=Ii,this.controls=new gX(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ii}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zm=i=>(e,t)=>{i&&st.update(()=>i(e,t),!1,!0)};class xX extends rr{constructor(){super(...arguments),this.removePointerDownListener=Ii}onPointerDown(e){this.session=new zC(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:RC(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zm(e),onStart:Zm(t),onMove:Zm(n),onEnd:(l,o)=>{delete this.session,s&&st.postRender(()=>s(l,o))}}}mount(){this.removePointerDownListener=zo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Xm=!1;class vX extends q.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:s}=this.props,{projection:l}=e;l&&(t.group&&t.group.add(l),n&&n.register&&s&&n.register(l),Xm&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Df.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:s,isPresent:l}=this.props,{projection:o}=n;return o&&(o.isPresent=l,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),Xm=!0,s||e.layoutDependency!==t||t===void 0||e.isPresent!==l?o.willUpdate():this.safeToRemove(),e.isPresent!==l&&(l?o.promote():o.relegate()||st.postRender(()=>{const c=o.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),T0.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:s}=e;Xm=!0,s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ZC(i){const[e,t]=PZ(),n=q.useContext(Fk);return C.jsx(vX,{...i,layoutGroup:n,switchLayoutGroup:q.useContext(MC),isPresent:e,safeToRemove:t})}const wX={pan:{Feature:xX},drag:{Feature:SX,ProjectionNode:wC,MeasureLayout:ZC}};function lw(i,e,t){const{props:n}=i;i.animationState&&n.whileHover&&i.animationState.setActive("whileHover",t==="Start");const s="onHover"+t,l=n[s];l&&st.postRender(()=>l(e,Qc(e)))}class QX extends rr{mount(){const{current:e}=this.node;e&&(this.unmount=Jz(e,(t,n)=>(lw(this.node,n,"Start"),s=>lw(this.node,s,"End"))))}unmount(){}}class kX extends rr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xc(Wo(this.node.current,"focus",()=>this.onFocus()),Wo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function aw(i,e,t){const{props:n}=i;if(i.current instanceof HTMLButtonElement&&i.current.disabled)return;i.animationState&&n.whileTap&&i.animationState.setActive("whileTap",t==="Start");const s="onTap"+(t==="End"?"":t),l=n[s];l&&st.postRender(()=>l(e,Qc(e)))}class TX extends rr{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=rD(e,(s,l)=>(aw(this.node,l,"Start"),(o,{success:c})=>aw(this.node,o,c?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:(n==null?void 0:n.tap)===!1})}unmount(){}}const JO=new WeakMap,Lm=new WeakMap,CX=i=>{const e=JO.get(i.target);e&&e(i)},AX=i=>{i.forEach(CX)};function PX({root:i,...e}){const t=i||document;Lm.has(t)||Lm.set(t,{});const n=Lm.get(t),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(AX,{root:i,...e})),n[s]}function $X(i,e,t){const n=PX(e);return JO.set(i,t),n.observe(i),()=>{JO.delete(i),n.unobserve(i)}}const MX={some:0,all:1};class EX extends rr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:s="some",once:l}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:MX[s]},c=f=>{const{isIntersecting:d}=f;if(this.isInView===d||(this.isInView=d,l&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:p,onViewportLeave:m}=this.node.getProps(),y=d?p:m;y&&y(f)};return $X(this.node.current,o,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(RX(e,t))&&this.startObserver()}unmount(){}}function RX({viewport:i={}},{viewport:e={}}={}){return t=>i[t]!==e[t]}const zX={inView:{Feature:EX},tap:{Feature:TX},focus:{Feature:kX},hover:{Feature:QX}},DX={layout:{ProjectionNode:wC,MeasureLayout:ZC}},ZX={...rX,...zX,...wX,...DX},XC=eX(ZX,tX);function XX({roadmap:i,state:e,todos:t}){var m;const{connected:n}=Sc(),s=(i==null?void 0:i.progress_percent)??0,l=(i==null?void 0:i.current_phase)??(e==null?void 0:e.currentPhase)??"--",o=((m=i==null?void 0:i.phases.find(y=>y.number===i.current_phase))==null?void 0:m.name)??"",c=(e==null?void 0:e.blockers.filter(y=>!y.includes("RESOLVED")).length)??0,f=(t==null?void 0:t.pending.length)??0,d=(i==null?void 0:i.completed_phases)??0,p=(i==null?void 0:i.phase_count)??0;return C.jsxs("div",{className:"flex flex-col gap-4 border-b border-border pb-5",children:[C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${n?"bg-success":"bg-danger"}`,title:n?"Connected":"Disconnected"}),C.jsx("span",{className:"font-mono text-xs uppercase tracking-widest text-muted-foreground",children:"Milestone Progress"}),C.jsxs("span",{className:"ml-auto font-mono text-xs text-muted-foreground",children:[d,"/",p," phases"]})]}),C.jsx("div",{className:"h-2 w-full overflow-hidden rounded-sm bg-muted",children:C.jsx(XC.div,{className:"h-full rounded-sm bg-accent",initial:{width:0},animate:{width:`${s}%`},transition:{duration:.6,ease:"easeOut"}})}),C.jsxs("div",{className:"flex items-center gap-8",children:[C.jsxs("div",{className:"flex items-baseline gap-1.5",children:[C.jsxs("span",{className:"font-mono text-2xl font-bold tabular-nums text-foreground",children:[s,"%"]}),C.jsx("span",{className:"text-xs text-muted-foreground",children:"complete"})]}),C.jsxs("div",{className:"flex items-baseline gap-2 border-l border-border pl-8",children:[C.jsx("span",{className:"font-mono text-sm font-semibold text-accent",children:l}),C.jsx("span",{className:"text-sm text-foreground",children:o})]}),C.jsxs("div",{className:"ml-auto flex items-center gap-6",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Blockers"}),C.jsx("span",{className:`inline-flex h-6 min-w-6 items-center justify-center rounded-sm px-1.5 font-mono text-xs font-bold ${c>0?"bg-danger/20 text-danger shadow-[0_0_8px_rgba(239,68,68,0.3)]":"bg-muted text-muted-foreground"}`,children:c})]}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Todos"}),C.jsx("span",{className:`inline-flex h-6 min-w-6 items-center justify-center rounded-sm px-1.5 font-mono text-xs font-bold ${f>0?"bg-warning/20 text-warning":"bg-muted text-muted-foreground"}`,children:f})]})]})]})]})}function LX({status:i}){switch(i){case"complete":return C.jsx("svg",{className:"h-4 w-4 text-success",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:C.jsx("path",{d:"M3 8.5l3.5 3.5L13 4"})});case"partial":return C.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full border-2 border-accent bg-transparent"});case"planned":case"researched":case"discussed":return C.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full border-2 border-muted-foreground bg-transparent"});default:return C.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-muted"})}}function VX(i){switch(i){case"complete":return"bg-success";case"partial":return"bg-accent";default:return"bg-muted-foreground"}}function _X({phaseName:i,phaseNumber:e,completedPlans:t,totalPlans:n,status:s,isCurrent:l,onClick:o}){const c=n>0?Math.round(t/n*100):0;return C.jsxs("button",{type:"button",onClick:()=>o(e),className:`group flex w-full flex-col gap-2 rounded-sm px-4 py-3 text-left transition-colors ${l?"border-l-4 border-l-accent bg-card-hover":"border-l-4 border-l-transparent hover:bg-card-hover"}`,children:[C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx(LX,{status:s}),C.jsx("span",{className:`font-mono text-sm font-semibold ${l?"text-accent":"text-muted-foreground"}`,children:e}),C.jsx("span",{className:"truncate text-sm text-foreground",children:i}),C.jsxs("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:[t,"/",n]})]}),C.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-sm bg-muted",children:C.jsx(XC.div,{className:`h-full rounded-sm ${VX(s)}`,initial:{width:0},animate:{width:`${c}%`},transition:{duration:.5,ease:"easeOut"}})})]})}function jX({phases:i,currentPhase:e,onPhaseClick:t}){return C.jsxs("div",{className:"flex flex-col gap-1",children:[C.jsxs("div",{className:"flex items-center justify-between px-4 pb-2",children:[C.jsx("span",{className:"font-mono text-xs uppercase tracking-widest text-muted-foreground",children:"Phases"}),C.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:i.length})]}),C.jsx("div",{className:"flex flex-col gap-1",children:i.length===0?C.jsxs("div",{className:"flex flex-col items-center gap-3 px-4 py-10 text-center",children:[C.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:"No project initialized yet."}),C.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["Run"," ",C.jsx("code",{className:"rounded-sm bg-muted px-1.5 py-0.5 text-accent",children:"/maxsim:new-project"})," ","in Claude Code to get started."]})]}):i.map(n=>C.jsx(_X,{phaseNumber:n.number,phaseName:n.name,completedPlans:n.summaryCount,totalPlans:n.planCount,status:n.diskStatus,isCurrent:n.number===e,onClick:t},n.number))})]})}function LC(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var s=i.length;for(e=0;e<s;e++)i[e]&&(t=LC(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function BX(){for(var i,e,t=0,n="",s=arguments.length;t<s;t++)(i=arguments[t])&&(e=LC(i))&&(n&&(n+=" "),n+=e);return n}const NX=(i,e)=>{const t=new Array(i.length+e.length);for(let n=0;n<i.length;n++)t[n]=i[n];for(let n=0;n<e.length;n++)t[i.length+n]=e[n];return t},YX=(i,e)=>({classGroupId:i,validator:e}),VC=(i=new Map,e=null,t)=>({nextPart:i,validators:e,classGroupId:t}),ih="-",ow=[],qX="arbitrary..",UX=i=>{const e=WX(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=i;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return GX(o);const c=o.split(ih),f=c[0]===""&&c.length>1?1:0;return _C(c,f,e)},getConflictingClassGroupIds:(o,c)=>{if(c){const f=n[o],d=t[o];return f?d?NX(d,f):f:d||ow}return t[o]||ow}}},_C=(i,e,t)=>{if(i.length-e===0)return t.classGroupId;const s=i[e],l=t.nextPart.get(s);if(l){const d=_C(i,e+1,l);if(d)return d}const o=t.validators;if(o===null)return;const c=e===0?i.join(ih):i.slice(e).join(ih),f=o.length;for(let d=0;d<f;d++){const p=o[d];if(p.validator(c))return p.classGroupId}},GX=i=>i.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=i.slice(1,-1),t=e.indexOf(":"),n=e.slice(0,t);return n?qX+n:void 0})(),WX=i=>{const{theme:e,classGroups:t}=i;return HX(t,e)},HX=(i,e)=>{const t=VC();for(const n in i){const s=i[n];D0(s,t,n,e)}return t},D0=(i,e,t,n)=>{const s=i.length;for(let l=0;l<s;l++){const o=i[l];IX(o,e,t,n)}},IX=(i,e,t,n)=>{if(typeof i=="string"){FX(i,e,t);return}if(typeof i=="function"){KX(i,e,t,n);return}JX(i,e,t,n)},FX=(i,e,t)=>{const n=i===""?e:jC(e,i);n.classGroupId=t},KX=(i,e,t,n)=>{if(e3(i)){D0(i(n),e,t,n);return}e.validators===null&&(e.validators=[]),e.validators.push(YX(t,i))},JX=(i,e,t,n)=>{const s=Object.entries(i),l=s.length;for(let o=0;o<l;o++){const[c,f]=s[o];D0(f,jC(e,c),t,n)}},jC=(i,e)=>{let t=i;const n=e.split(ih),s=n.length;for(let l=0;l<s;l++){const o=n[l];let c=t.nextPart.get(o);c||(c=VC(),t.nextPart.set(o,c)),t=c}return t},e3=i=>"isThemeGetter"in i&&i.isThemeGetter===!0,t3=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),n=Object.create(null);const s=(l,o)=>{t[l]=o,e++,e>i&&(e=0,n=t,t=Object.create(null))};return{get(l){let o=t[l];if(o!==void 0)return o;if((o=n[l])!==void 0)return s(l,o),o},set(l,o){l in t?t[l]=o:s(l,o)}}},eg="!",cw=":",i3=[],uw=(i,e,t,n,s)=>({modifiers:i,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),n3=i=>{const{prefix:e,experimentalParseClassName:t}=i;let n=s=>{const l=[];let o=0,c=0,f=0,d;const p=s.length;for(let v=0;v<p;v++){const w=s[v];if(o===0&&c===0){if(w===cw){l.push(s.slice(f,v)),f=v+1;continue}if(w==="/"){d=v;continue}}w==="["?o++:w==="]"?o--:w==="("?c++:w===")"&&c--}const m=l.length===0?s:s.slice(f);let y=m,b=!1;m.endsWith(eg)?(y=m.slice(0,-1),b=!0):m.startsWith(eg)&&(y=m.slice(1),b=!0);const S=d&&d>f?d-f:void 0;return uw(l,b,y,S)};if(e){const s=e+cw,l=n;n=o=>o.startsWith(s)?l(o.slice(s.length)):uw(i3,!1,o,void 0,!0)}if(t){const s=n;n=l=>t({className:l,parseClassName:s})}return n},s3=i=>{const e=new Map;return i.orderSensitiveModifiers.forEach((t,n)=>{e.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let l=0;l<t.length;l++){const o=t[l],c=o[0]==="[",f=e.has(o);c||f?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},r3=i=>({cache:t3(i.cacheSize),parseClassName:n3(i),sortModifiers:s3(i),...UX(i)}),l3=/\s+/,a3=(i,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:l}=e,o=[],c=i.trim().split(l3);let f="";for(let d=c.length-1;d>=0;d-=1){const p=c[d],{isExternal:m,modifiers:y,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:v}=t(p);if(m){f=p+(f.length>0?" "+f:f);continue}let w=!!v,k=n(w?S.substring(0,v):S);if(!k){if(!w){f=p+(f.length>0?" "+f:f);continue}if(k=n(S),!k){f=p+(f.length>0?" "+f:f);continue}w=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),P=b?A+eg:A,V=P+k;if(o.indexOf(V)>-1)continue;o.push(V);const R=s(k,w);for(let N=0;N<R.length;++N){const _=R[N];o.push(P+_)}f=p+(f.length>0?" "+f:f)}return f},o3=(...i)=>{let e=0,t,n,s="";for(;e<i.length;)(t=i[e++])&&(n=BC(t))&&(s&&(s+=" "),s+=n);return s},BC=i=>{if(typeof i=="string")return i;let e,t="";for(let n=0;n<i.length;n++)i[n]&&(e=BC(i[n]))&&(t&&(t+=" "),t+=e);return t},c3=(i,...e)=>{let t,n,s,l;const o=f=>{const d=e.reduce((p,m)=>m(p),i());return t=r3(d),n=t.cache.get,s=t.cache.set,l=c,c(f)},c=f=>{const d=n(f);if(d)return d;const p=a3(f,t);return s(f,p),p};return l=o,(...f)=>l(o3(...f))},u3=[],Tt=i=>{const e=t=>t[i]||u3;return e.isThemeGetter=!0,e},NC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,YC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,f3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,h3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,d3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,p3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,m3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,O3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_s=i=>f3.test(i),Me=i=>!!i&&!Number.isNaN(Number(i)),js=i=>!!i&&Number.isInteger(Number(i)),Vm=i=>i.endsWith("%")&&Me(i.slice(0,-1)),is=i=>h3.test(i),qC=()=>!0,g3=i=>d3.test(i)&&!p3.test(i),Z0=()=>!1,y3=i=>m3.test(i),b3=i=>O3.test(i),S3=i=>!he(i)&&!pe(i),x3=i=>lr(i,WC,Z0),he=i=>NC.test(i),Cr=i=>lr(i,HC,g3),fw=i=>lr(i,P3,Me),v3=i=>lr(i,FC,qC),w3=i=>lr(i,IC,Z0),hw=i=>lr(i,UC,Z0),Q3=i=>lr(i,GC,b3),nf=i=>lr(i,KC,y3),pe=i=>YC.test(i),Oo=i=>Ur(i,HC),k3=i=>Ur(i,IC),dw=i=>Ur(i,UC),T3=i=>Ur(i,WC),C3=i=>Ur(i,GC),sf=i=>Ur(i,KC,!0),A3=i=>Ur(i,FC,!0),lr=(i,e,t)=>{const n=NC.exec(i);return n?n[1]?e(n[1]):t(n[2]):!1},Ur=(i,e,t=!1)=>{const n=YC.exec(i);return n?n[1]?e(n[1]):t:!1},UC=i=>i==="position"||i==="percentage",GC=i=>i==="image"||i==="url",WC=i=>i==="length"||i==="size"||i==="bg-size",HC=i=>i==="length",P3=i=>i==="number",IC=i=>i==="family-name",FC=i=>i==="number"||i==="weight",KC=i=>i==="shadow",$3=()=>{const i=Tt("color"),e=Tt("font"),t=Tt("text"),n=Tt("font-weight"),s=Tt("tracking"),l=Tt("leading"),o=Tt("breakpoint"),c=Tt("container"),f=Tt("spacing"),d=Tt("radius"),p=Tt("shadow"),m=Tt("inset-shadow"),y=Tt("text-shadow"),b=Tt("drop-shadow"),S=Tt("blur"),v=Tt("perspective"),w=Tt("aspect"),k=Tt("ease"),A=Tt("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...V(),pe,he],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],j=()=>[pe,he,f],K=()=>[_s,"full","auto",...j()],Oe=()=>[js,"none","subgrid",pe,he],ce=()=>["auto",{span:["full",js,pe,he]},js,pe,he],ie=()=>[js,"auto",pe,he],xe=()=>["auto","min","max","fr",pe,he],Se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],we=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...j()],W=()=>[_s,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],te=()=>[_s,"screen","full","dvw","lvw","svw","min","max","fit",...j()],oe=()=>[_s,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],F=()=>[i,pe,he],M=()=>[...V(),dw,hw,{position:[pe,he]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",T3,x3,{size:[pe,he]}],re=()=>[Vm,Oo,Cr],ue=()=>["","none","full",d,pe,he],ye=()=>["",Me,Oo,Cr],Ee=()=>["solid","dashed","dotted","double"],$t=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$e=()=>[Me,Vm,dw,hw],ds=()=>["","none",S,pe,he],Xn=()=>["none",Me,pe,he],ps=()=>["none",Me,pe,he],Wr=()=>[Me,pe,he],Ri=()=>[_s,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[is],breakpoint:[is],color:[qC],container:[is],"drop-shadow":[is],ease:["in","out","in-out"],font:[S3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[is],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[is],shadow:[is],spacing:["px",Me],text:[is],"text-shadow":[is],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_s,he,pe,w]}],container:["container"],columns:[{columns:[Me,he,pe,c]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[js,"auto",pe,he]}],basis:[{basis:[_s,"full","auto",c,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,_s,"auto","initial","none",he]}],grow:[{grow:["",Me,pe,he]}],shrink:[{shrink:["",Me,pe,he]}],order:[{order:[js,"first","last","none",pe,he]}],"grid-cols":[{"grid-cols":Oe()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":Oe()}],"row-start-end":[{row:ce()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...Se(),"normal"]}],"justify-items":[{"justify-items":[...we(),"normal"]}],"justify-self":[{"justify-self":["auto",...we()]}],"align-content":[{content:["normal",...Se()]}],"align-items":[{items:[...we(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...we(),{baseline:["","last"]}]}],"place-content":[{"place-content":Se()}],"place-items":[{"place-items":[...we(),"baseline"]}],"place-self":[{"place-self":["auto",...we()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mbs:[{mbs:X()}],mbe:[{mbe:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[c,"screen",...W()]}],"min-w":[{"min-w":[c,"screen","none",...W()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[o]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",t,Oo,Cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,A3,v3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vm,he]}],"font-family":[{font:[k3,w3,e]}],"font-features":[{"font-features":[he]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,pe,he]}],"line-clamp":[{"line-clamp":[Me,"none",pe,fw]}],leading:[{leading:[l,...j()]}],"list-image":[{"list-image":["none",pe,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",pe,Cr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Me,"auto",pe,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},js,pe,he],radial:["",pe,he],conic:[js,pe,he]},C3,Q3]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,pe,he]}],"outline-w":[{outline:["",Me,Oo,Cr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",p,sf,nf]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",m,sf,nf]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Me,Cr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",y,sf,nf]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Me,pe,he]}],"mix-blend":[{"mix-blend":[...$t(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$t()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":$e()}],"mask-image-linear-to-pos":[{"mask-linear-to":$e()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":$e()}],"mask-image-t-to-pos":[{"mask-t-to":$e()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":$e()}],"mask-image-r-to-pos":[{"mask-r-to":$e()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":$e()}],"mask-image-b-to-pos":[{"mask-b-to":$e()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":$e()}],"mask-image-l-to-pos":[{"mask-l-to":$e()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":$e()}],"mask-image-x-to-pos":[{"mask-x-to":$e()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":$e()}],"mask-image-y-to-pos":[{"mask-y-to":$e()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[pe,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":$e()}],"mask-image-radial-to-pos":[{"mask-radial-to":$e()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":$e()}],"mask-image-conic-to-pos":[{"mask-conic-to":$e()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,he]}],filter:[{filter:["","none",pe,he]}],blur:[{blur:ds()}],brightness:[{brightness:[Me,pe,he]}],contrast:[{contrast:[Me,pe,he]}],"drop-shadow":[{"drop-shadow":["","none",b,sf,nf]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Me,pe,he]}],"hue-rotate":[{"hue-rotate":[Me,pe,he]}],invert:[{invert:["",Me,pe,he]}],saturate:[{saturate:[Me,pe,he]}],sepia:[{sepia:["",Me,pe,he]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,he]}],"backdrop-blur":[{"backdrop-blur":ds()}],"backdrop-brightness":[{"backdrop-brightness":[Me,pe,he]}],"backdrop-contrast":[{"backdrop-contrast":[Me,pe,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,pe,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,pe,he]}],"backdrop-invert":[{"backdrop-invert":["",Me,pe,he]}],"backdrop-opacity":[{"backdrop-opacity":[Me,pe,he]}],"backdrop-saturate":[{"backdrop-saturate":[Me,pe,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,pe,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",pe,he]}],ease:[{ease:["linear","initial",k,pe,he]}],delay:[{delay:[Me,pe,he]}],animate:[{animate:["none",A,pe,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,pe,he]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Xn()}],"rotate-x":[{"rotate-x":Xn()}],"rotate-y":[{"rotate-y":Xn()}],"rotate-z":[{"rotate-z":Xn()}],scale:[{scale:ps()}],"scale-x":[{"scale-x":ps()}],"scale-y":[{"scale-y":ps()}],"scale-z":[{"scale-z":ps()}],"scale-3d":["scale-3d"],skew:[{skew:Wr()}],"skew-x":[{"skew-x":Wr()}],"skew-y":[{"skew-y":Wr()}],transform:[{transform:[pe,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ri()}],"translate-x":[{"translate-x":Ri()}],"translate-y":[{"translate-y":Ri()}],"translate-z":[{"translate-z":Ri()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,he]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Me,Oo,Cr,fw]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},M3=c3($3);function ot(...i){return M3(BX(i))}function E3(i){const[e,t]=q.useState(null),[n,s]=q.useState(!1),[l,o]=q.useState(null),{lastChange:c}=Sc(),f=q.useCallback(async()=>{if(!i){t(null),s(!1),o(null);return}s(!0),o(null);try{const d=await fetch(`/api/phase/${encodeURIComponent(i)}`);if(!d.ok){const m=await d.json().catch(()=>({}));throw new Error(m.error||`Failed to fetch phase ${i} (${d.status})`)}const p=await d.json();t(p)}catch(d){o(d instanceof Error?d.message:"Unknown error")}finally{s(!1)}},[i]);return q.useEffect(()=>{f()},[f]),q.useEffect(()=>{c>0&&f()},[c,f]),{plans:(e==null?void 0:e.plans)??[],context:(e==null?void 0:e.context)??null,research:(e==null?void 0:e.research)??null,loading:n,error:l,refetch:f}}function R3({tasks:i,planPath:e,planContent:t,onContentChange:n}){const s=q.useCallback(async l=>{const o=i[l];if(!o)return;let c=t;const f=o.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),p=new RegExp(`<name>\\s*${f}\\s*</name>`).exec(c);if(p){const m=c.slice(p.index),y=m.match(/<done>([\s\S]*?)<\/done>/);if(y){const b=y[1],S=p.index+m.indexOf(y[0]),v=S+y[0].length;let w;o.completed?w=b.replace(/^\s*\[x\]\s*/,""):w=`[x] ${b.trim()}`,c=c.slice(0,S)+`<done>${w}</done>`+c.slice(v)}}if(c!==t){n(c);try{const y=e.replace(/^\.planning[\\/]/,"").split(/[\\/]/);await fetch(`/api/plan/${y.join("/")}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:c})})}catch(m){console.error("[task-list] Failed to write checkbox change:",m)}}},[i,e,t,n]);return i.length===0?C.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No tasks defined"}):C.jsx("div",{className:"space-y-1",children:i.map((l,o)=>C.jsxs("div",{className:ot("flex items-start gap-2 py-1 px-2 rounded-md transition-colors","hover:bg-muted/50",l.completed&&"opacity-60"),children:[C.jsx("button",{type:"button",onClick:()=>s(o),className:ot("mt-0.5 flex-shrink-0 w-4 h-4 rounded-sm border transition-colors","focus:outline-none focus:ring-2 focus:ring-accent/50",l.completed?"bg-success border-success text-background":"border-muted-foreground hover:border-accent"),"aria-label":`Toggle ${l.name}`,children:l.completed&&C.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:C.jsx("path",{d:"M3 8l3 3 7-7"})})}),C.jsxs("div",{className:"flex-1 min-w-0",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("span",{className:ot("text-sm font-sans",l.completed&&"line-through text-muted-foreground"),children:l.name}),C.jsx("span",{className:ot("text-xs px-1.5 py-0.5 rounded-sm font-mono",l.type.startsWith("checkpoint")?"bg-warning/20 text-warning":"bg-muted text-muted-foreground"),children:l.type})]}),l.files.length>0&&C.jsx("div",{className:"mt-0.5",children:l.files.map((c,f)=>C.jsx("span",{className:"text-xs font-mono text-muted-foreground mr-2",children:c},f))})]})]},o))})}function z3({plan:i,onEdit:e}){const[t,n]=q.useState(i.content),s=i.frontmatter,l=s.plan??"?",o=s.wave,c=s.autonomous,f=s.depends_on??[],d=s.files_modified??[];let p="";const m=i.content.match(/<objective>([\s\S]*?)<\/objective>/);if(m){const S=m[1].trim().split(`
|
|
50
|
-
`)[0];p=S.length>120?S.slice(0,117)+"...":S}const y=q.useCallback(b=>{n(b)},[]);return C.jsxs("div",{className:ot("bg-card border border-border rounded-lg p-4","transition-colors hover:bg-card-hover"),children:[C.jsxs("div",{className:"flex items-center justify-between mb-3",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsxs("span",{className:"text-lg font-semibold font-mono text-accent",children:["#",String(l).padStart(2,"0")]}),o!==void 0&&C.jsxs("span",{className:"text-xs px-1.5 py-0.5 rounded-sm bg-accent/20 text-accent-glow font-mono",children:["wave ",o]}),c&&C.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-sm bg-success/20 text-success font-mono",children:"autonomous"})]}),C.jsx("button",{type:"button",onClick:()=>e(i.path),className:ot("text-xs px-3 py-1 rounded-md font-mono","bg-muted text-muted-foreground","hover:bg-accent/20 hover:text-accent-glow","transition-colors focus:outline-none focus:ring-2 focus:ring-accent/50"),children:"Edit"})]}),p&&C.jsx("p",{className:"text-sm text-muted-foreground mb-3 leading-relaxed",children:p}),C.jsxs("div",{className:"flex gap-4 mb-3 text-xs text-muted-foreground font-mono",children:[f.length>0&&C.jsxs("span",{children:["depends: ",f.join(", ")]}),d.length>0&&C.jsxs("span",{children:[d.length," file",d.length!==1?"s":""]}),C.jsxs("span",{children:[i.tasks.length," task",i.tasks.length!==1?"s":""]})]}),C.jsx(R3,{tasks:i.tasks,planPath:i.path,planContent:t,onContentChange:y})]})}function tg(){return tg=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},tg.apply(null,arguments)}function D3(i,e){if(i==null)return{};var t={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.indexOf(n)!==-1)continue;t[n]=i[n]}return t}let ig=[],JC=[];(()=>{let i="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,t=0;e<i.length;e++)(e%2?JC:ig).push(t=t+i[e])})();function Z3(i){if(i<768)return!1;for(let e=0,t=ig.length;;){let n=e+t>>1;if(i<ig[n])t=n;else if(i>=JC[n])e=n+1;else return!0;if(e==t)return!1}}function pw(i){return i>=127462&&i<=127487}const mw=8205;function X3(i,e,t=!0,n=!0){return(t?e2:L3)(i,e,n)}function e2(i,e,t){if(e==i.length)return e;e&&t2(i.charCodeAt(e))&&i2(i.charCodeAt(e-1))&&e--;let n=_m(i,e);for(e+=Ow(n);e<i.length;){let s=_m(i,e);if(n==mw||s==mw||t&&Z3(s))e+=Ow(s),n=s;else if(pw(s)){let l=0,o=e-2;for(;o>=0&&pw(_m(i,o));)l++,o-=2;if(l%2==0)break;e+=2}else break}return e}function L3(i,e,t){for(;e>0;){let n=e2(i,e-2,t);if(n<e)return n;e--}return 0}function _m(i,e){let t=i.charCodeAt(e);if(!i2(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return t2(n)?(t-55296<<10)+(n-56320)+65536:t}function t2(i){return i>=56320&&i<57344}function i2(i){return i>=55296&&i<56320}function Ow(i){return i<65536?1:2}class je{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,t,n){[e,t]=ea(this,e,t);let s=[];return this.decompose(0,e,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(t,this.length,s,1),Qn.from(s,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=ea(this,e,t);let n=[];return this.decompose(e,t,n,0),Qn.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),s=new Do(this),l=new Do(e);for(let o=t,c=t;;){if(s.next(o),l.next(o),o=0,s.lineBreak!=l.lineBreak||s.done!=l.done||s.value!=l.value)return!1;if(c+=s.value.length,s.done||c>=n)return!0}}iter(e=1){return new Do(this,e)}iterRange(e,t=this.length){return new n2(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;n=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new s2(n)}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]?je.empty:e.length<=32?new Ot(e):Qn.from(Ot.split(e,[]))}}class Ot extends je{constructor(e,t=V3(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,s){for(let l=0;;l++){let o=this.text[l],c=s+o.length;if((t?n:c)>=e)return new _3(s,c,n,o);s=c+1,n++}}decompose(e,t,n,s){let l=e<=0&&t>=this.length?this:new Ot(gw(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=n.pop(),c=Zf(l.text,o.text.slice(),0,l.length);if(c.length<=32)n.push(new Ot(c,o.length+l.length));else{let f=c.length>>1;n.push(new Ot(c.slice(0,f)),new Ot(c.slice(f)))}}else n.push(l)}replace(e,t,n){if(!(n instanceof Ot))return super.replace(e,t,n);[e,t]=ea(this,e,t);let s=Zf(this.text,Zf(n.text,gw(this.text,0,e)),t),l=this.length+n.length-(t-e);return s.length<=32?new Ot(s,l):Qn.from(Ot.split(s,[]),l)}sliceString(e,t=this.length,n=`
|
|
51
|
-
`){[e,t]=ea(this,e,t);let s="";for(let l=0,o=0;l<=t&&o<this.text.length;o++){let c=this.text[o],f=l+c.length;l>e&&o&&(s+=n),e<f&&t>l&&(s+=c.slice(Math.max(0,e-l),t-l)),l=f+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],s=-1;for(let l of e)n.push(l),s+=l.length+1,n.length==32&&(t.push(new Ot(n,s)),n=[],s=-1);return s>-1&&t.push(new Ot(n,s)),t}}class Qn extends je{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,s){for(let l=0;;l++){let o=this.children[l],c=s+o.length,f=n+o.lines-1;if((t?f:c)>=e)return o.lineInner(e,t,n,s);s=c+1,n=f+1}}decompose(e,t,n,s){for(let l=0,o=0;o<=t&&l<this.children.length;l++){let c=this.children[l],f=o+c.length;if(e<=f&&t>=o){let d=s&((o<=e?1:0)|(f>=t?2:0));o>=e&&f<=t&&!d?n.push(c):c.decompose(e-o,t-o,n,d)}o=f+1}}replace(e,t,n){if([e,t]=ea(this,e,t),n.lines<this.lines)for(let s=0,l=0;s<this.children.length;s++){let o=this.children[s],c=l+o.length;if(e>=l&&t<=c){let f=o.replace(e-l,t-l,n),d=this.lines-o.lines+f.lines;if(f.lines<d>>4&&f.lines>d>>6){let p=this.children.slice();return p[s]=f,new Qn(p,this.length-(t-e)+n.length)}return super.replace(l,c,f)}l=c+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
|
|
52
|
-
`){[e,t]=ea(this,e,t);let s="";for(let l=0,o=0;l<this.children.length&&o<=t;l++){let c=this.children[l],f=o+c.length;o>e&&l&&(s+=n),e<f&&t>o&&(s+=c.sliceString(e-o,t-o,n)),o=f+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Qn))return 0;let n=0,[s,l,o,c]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,l+=t){if(s==o||l==c)return n;let f=this.children[s],d=e.children[l];if(f!=d)return n+f.scanIdentical(d,t);n+=f.length+1}}static from(e,t=e.reduce((n,s)=>n+s.length+1,-1)){let n=0;for(let b of e)n+=b.lines;if(n<32){let b=[];for(let S of e)S.flatten(b);return new Ot(b,t)}let s=Math.max(32,n>>5),l=s<<1,o=s>>1,c=[],f=0,d=-1,p=[];function m(b){let S;if(b.lines>l&&b instanceof Qn)for(let v of b.children)m(v);else b.lines>o&&(f>o||!f)?(y(),c.push(b)):b instanceof Ot&&f&&(S=p[p.length-1])instanceof Ot&&b.lines+S.lines<=32?(f+=b.lines,d+=b.length+1,p[p.length-1]=new Ot(S.text.concat(b.text),S.length+1+b.length)):(f+b.lines>s&&y(),f+=b.lines,d+=b.length+1,p.push(b))}function y(){f!=0&&(c.push(p.length==1?p[0]:Qn.from(p,d)),d=-1,f=p.length=0)}for(let b of e)m(b);return y(),c.length==1?c[0]:new Qn(c,t)}}je.empty=new Ot([""],0);function V3(i){let e=-1;for(let t of i)e+=t.length+1;return e}function Zf(i,e,t=0,n=1e9){for(let s=0,l=0,o=!0;l<i.length&&s<=n;l++){let c=i[l],f=s+c.length;f>=t&&(f>n&&(c=c.slice(0,n-s)),s<t&&(c=c.slice(t-s)),o?(e[e.length-1]+=c,o=!1):e.push(c)),s=f+1}return e}function gw(i,e,t){return Zf(i,[""],e,t)}class Do{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Ot?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,s=this.nodes[n],l=this.offsets[n],o=l>>1,c=s instanceof Ot?s.text.length:s.children.length;if(o==(t>0?c:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
53
|
-
`,this;e--}else if(s instanceof Ot){let f=s.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,f.length>Math.max(0,e))return this.value=e==0?f:t>0?f.slice(e):f.slice(0,f.length-e),this;e-=f.length}else{let f=s.children[o+(t<0?-1:0)];e>f.length?(e-=f.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(f),this.offsets.push(t>0?1:(f instanceof Ot?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 n2{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Do(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=n?s:t<0?s.slice(s.length-n):s.slice(0,n),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 s2{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(je.prototype[Symbol.iterator]=function(){return this.iter()},Do.prototype[Symbol.iterator]=n2.prototype[Symbol.iterator]=s2.prototype[Symbol.iterator]=function(){return this});let _3=class{constructor(e,t,n,s){this.from=e,this.to=t,this.number=n,this.text=s}get length(){return this.to-this.from}};function ea(i,e,t){return e=Math.max(0,Math.min(i.length,e)),[e,Math.max(e,Math.min(i.length,t))]}function zt(i,e,t=!0,n=!0){return X3(i,e,t,n)}function j3(i){return i>=56320&&i<57344}function B3(i){return i>=55296&&i<56320}function ui(i,e){let t=i.charCodeAt(e);if(!B3(t)||e+1==i.length)return t;let n=i.charCodeAt(e+1);return j3(n)?(t-55296<<10)+(n-56320)+65536:t}function X0(i){return i<=65535?String.fromCharCode(i):(i-=65536,String.fromCharCode((i>>10)+55296,(i&1023)+56320))}function kn(i){return i<65536?1:2}const ng=/\r\n?|\n/;var Yt=(function(i){return i[i.Simple=0]="Simple",i[i.TrackDel=1]="TrackDel",i[i.TrackBefore=2]="TrackBefore",i[i.TrackAfter=3]="TrackAfter",i})(Yt||(Yt={}));class En{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,s=0;t<this.sections.length;){let l=this.sections[t++],o=this.sections[t++];o<0?(e(n,s,l),s+=l):s+=o,n+=l}}iterChangedRanges(e,t=!1){sg(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];s<0?e.push(n,s):e.push(s,n)}return new En(e)}composeDesc(e){return this.empty?e:e.empty?this:r2(this,e)}mapDesc(e,t=!1){return e.empty?this:rg(this,e,t)}mapPos(e,t=-1,n=Yt.Simple){let s=0,l=0;for(let o=0;o<this.sections.length;){let c=this.sections[o++],f=this.sections[o++],d=s+c;if(f<0){if(d>e)return l+(e-s);l+=c}else{if(n!=Yt.Simple&&d>=e&&(n==Yt.TrackDel&&s<e&&d>e||n==Yt.TrackBefore&&s<e||n==Yt.TrackAfter&&d>e))return null;if(d>e||d==e&&t<0&&!c)return e==s||t<0?l:l+f;l+=f}s=d}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return l}touchesRange(e,t=e){for(let n=0,s=0;n<this.sections.length&&s<=t;){let l=this.sections[n++],o=this.sections[n++],c=s+l;if(o>=0&&s<=t&&c>=e)return s<e&&c>t?"cover":!0;s=c}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+n+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new En(e)}static create(e){return new En(e)}}class At extends En{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return sg(this,(t,n,s,l,o)=>e=e.replace(s,s+(n-t),o),!1),e}mapDesc(e,t=!1){return rg(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let s=0,l=0;s<t.length;s+=2){let o=t[s],c=t[s+1];if(c>=0){t[s]=c,t[s+1]=o;let f=s>>1;for(;n.length<f;)n.push(je.empty);n.push(o?e.slice(l,l+o):je.empty)}l+=o}return new At(t,n)}compose(e){return this.empty?e:e.empty?this:r2(this,e,!0)}map(e,t=!1){return e.empty?this:rg(this,e,t,!0)}iterChanges(e,t=!1){sg(this,e,t)}get desc(){return En.create(this.sections)}filter(e){let t=[],n=[],s=[],l=new Ho(this);e:for(let o=0,c=0;;){let f=o==e.length?1e9:e[o++];for(;c<f||c==f&&l.len==0;){if(l.done)break e;let p=Math.min(l.len,f-c);Gt(s,p,-1);let m=l.ins==-1?-1:l.off==0?l.ins:0;Gt(t,p,m),m>0&&Hs(n,t,l.text),l.forward(p),c+=p}let d=e[o++];for(;c<d;){if(l.done)break e;let p=Math.min(l.len,d-c);Gt(t,p,-1),Gt(s,p,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(p),c+=p}}return{changes:new At(t,n),filtered:En.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],s=this.sections[t+1];s<0?e.push(n):s==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let s=[],l=[],o=0,c=null;function f(p=!1){if(!p&&!s.length)return;o<t&&Gt(s,t-o,-1);let m=new At(s,l);c=c?c.compose(m.map(c)):m,s=[],l=[],o=0}function d(p){if(Array.isArray(p))for(let m of p)d(m);else if(p instanceof At){if(p.length!=t)throw new RangeError(`Mismatched change set length (got ${p.length}, expected ${t})`);f(),c=c?c.compose(p.map(c)):p}else{let{from:m,to:y=m,insert:b}=p;if(m>y||m<0||y>t)throw new RangeError(`Invalid change range ${m} to ${y} (in doc of length ${t})`);let S=b?typeof b=="string"?je.of(b.split(n||ng)):b:je.empty,v=S.length;if(m==y&&v==0)return;m<o&&f(),m>o&&Gt(s,m-o,-1),Gt(s,y-m,v),Hs(l,s,S),o=y}}return d(e),f(!c),c}static empty(e){return new At(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let s=0;s<e.length;s++){let l=e[s];if(typeof l=="number")t.push(l,-1);else{if(!Array.isArray(l)||typeof l[0]!="number"||l.some((o,c)=>c&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;n.length<s;)n.push(je.empty);n[s]=je.of(l.slice(1)),t.push(l[0],n[s].length)}}}return new At(t,n)}static createSet(e,t){return new At(e,t)}}function Gt(i,e,t,n=!1){if(e==0&&t<=0)return;let s=i.length-2;s>=0&&t<=0&&t==i[s+1]?i[s]+=e:s>=0&&e==0&&i[s]==0?i[s+1]+=t:n?(i[s]+=e,i[s+1]+=t):i.push(e,t)}function Hs(i,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<i.length)i[i.length-1]=i[i.length-1].append(t);else{for(;i.length<n;)i.push(je.empty);i.push(t)}}function sg(i,e,t){let n=i.inserted;for(let s=0,l=0,o=0;o<i.sections.length;){let c=i.sections[o++],f=i.sections[o++];if(f<0)s+=c,l+=c;else{let d=s,p=l,m=je.empty;for(;d+=c,p+=f,f&&n&&(m=m.append(n[o-2>>1])),!(t||o==i.sections.length||i.sections[o+1]<0);)c=i.sections[o++],f=i.sections[o++];e(s,d,l,p,m),s=d,l=p}}}function rg(i,e,t,n=!1){let s=[],l=n?[]:null,o=new Ho(i),c=new Ho(e);for(let f=-1;;){if(o.done&&c.len||c.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&c.ins==-1){let d=Math.min(o.len,c.len);Gt(s,d,-1),o.forward(d),c.forward(d)}else if(c.ins>=0&&(o.ins<0||f==o.i||o.off==0&&(c.len<o.len||c.len==o.len&&!t))){let d=c.len;for(Gt(s,c.ins,-1);d;){let p=Math.min(o.len,d);o.ins>=0&&f<o.i&&o.len<=p&&(Gt(s,0,o.ins),l&&Hs(l,s,o.text),f=o.i),o.forward(p),d-=p}c.next()}else if(o.ins>=0){let d=0,p=o.len;for(;p;)if(c.ins==-1){let m=Math.min(p,c.len);d+=m,p-=m,c.forward(m)}else if(c.ins==0&&c.len<p)p-=c.len,c.next();else break;Gt(s,d,f<o.i?o.ins:0),l&&f<o.i&&Hs(l,s,o.text),f=o.i,o.forward(o.len-p)}else{if(o.done&&c.done)return l?At.createSet(s,l):En.create(s);throw new Error("Mismatched change set lengths")}}}function r2(i,e,t=!1){let n=[],s=t?[]:null,l=new Ho(i),o=new Ho(e);for(let c=!1;;){if(l.done&&o.done)return s?At.createSet(n,s):En.create(n);if(l.ins==0)Gt(n,l.len,0,c),l.next();else if(o.len==0&&!o.done)Gt(n,0,o.ins,c),s&&Hs(s,n,o.text),o.next();else{if(l.done||o.done)throw new Error("Mismatched change set lengths");{let f=Math.min(l.len2,o.len),d=n.length;if(l.ins==-1){let p=o.ins==-1?-1:o.off?0:o.ins;Gt(n,f,p,c),s&&p&&Hs(s,n,o.text)}else o.ins==-1?(Gt(n,l.off?0:l.len,f,c),s&&Hs(s,n,l.textBit(f))):(Gt(n,l.off?0:l.len,o.off?0:o.ins,c),s&&!o.off&&Hs(s,n,o.text));c=(l.ins>f||o.ins>=0&&o.len>f)&&(c||n.length>d),l.forward2(f),o.forward(f)}}}}class Ho{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,t=this.i-2>>1;return t>=e.length?je.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?je.empty:t[n].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 Zr{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}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,t=-1){let n,s;return this.empty?n=s=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),n==this.from&&s==this.to?this:new Zr(n,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return G.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return G.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!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 G.range(e.anchor,e.head)}static create(e,t,n){return new Zr(e,t,n)}}class G{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:G.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new G([this.main],0)}addRange(e,t=!0){return G.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,G.create(n,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 G(e.ranges.map(t=>Zr.fromJSON(t)),e.main)}static single(e,t=e){return new G([G.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,s=0;s<e.length;s++){let l=e[s];if(l.empty?l.from<=n:l.from<n)return G.normalized(e.slice(),t);n=l.to}return new G(e,t)}static cursor(e,t=0,n,s){return Zr.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(s??16777215)<<6)}static range(e,t,n,s){let l=(n??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?Zr.create(t,e,48|l):Zr.create(e,t,(t>e?8:0)|l)}static normalized(e,t=0){let n=e[t];e.sort((s,l)=>s.from-l.from),t=e.indexOf(n);for(let s=1;s<e.length;s++){let l=e[s],o=e[s-1];if(l.empty?l.from<=o.to:l.from<o.to){let c=o.from,f=Math.max(l.to,o.to);s<=t&&t--,e.splice(--s,2,l.anchor>l.head?G.range(f,c):G.range(c,f))}}return new G(e,t)}}function l2(i,e){for(let t of i.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let L0=0;class le{constructor(e,t,n,s,l){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=s,this.id=L0++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new le(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:V0),!!e.static,e.enables)}of(e){return new Xf([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xf(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xf(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function V0(i,e){return i==e||i.length==e.length&&i.every((t,n)=>t===e[n])}class Xf{constructor(e,t,n,s){this.dependencies=e,this.facet=t,this.type=n,this.value=s,this.id=L0++}dynamicSlot(e){var t;let n=this.value,s=this.facet.compareInput,l=this.id,o=e[l]>>1,c=this.type==2,f=!1,d=!1,p=[];for(let m of this.dependencies)m=="doc"?f=!0:m=="selection"?d=!0:(((t=e[m.id])!==null&&t!==void 0?t:1)&1)==0&&p.push(e[m.id]);return{create(m){return m.values[o]=n(m),1},update(m,y){if(f&&y.docChanged||d&&(y.docChanged||y.selection)||lg(m,p)){let b=n(m);if(c?!yw(b,m.values[o],s):!s(b,m.values[o]))return m.values[o]=b,1}return 0},reconfigure:(m,y)=>{let b,S=y.config.address[l];if(S!=null){let v=sh(y,S);if(this.dependencies.every(w=>w instanceof le?y.facet(w)===m.facet(w):w instanceof Dt?y.field(w,!1)==m.field(w,!1):!0)||(c?yw(b=n(m),v,s):s(b=n(m),v)))return m.values[o]=v,0}else b=n(m);return m.values[o]=b,1}}}}function yw(i,e,t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!t(i[n],e[n]))return!1;return!0}function lg(i,e){let t=!1;for(let n of e)Zo(i,n)&1&&(t=!0);return t}function N3(i,e,t){let n=t.map(f=>i[f.id]),s=t.map(f=>f.type),l=n.filter(f=>!(f&1)),o=i[e.id]>>1;function c(f){let d=[];for(let p=0;p<n.length;p++){let m=sh(f,n[p]);if(s[p]==2)for(let y of m)d.push(y);else d.push(m)}return e.combine(d)}return{create(f){for(let d of n)Zo(f,d);return f.values[o]=c(f),1},update(f,d){if(!lg(f,l))return 0;let p=c(f);return e.compare(p,f.values[o])?0:(f.values[o]=p,1)},reconfigure(f,d){let p=lg(f,n),m=d.config.facets[e.id],y=d.facet(e);if(m&&!p&&V0(t,m))return f.values[o]=y,0;let b=c(f);return e.compare(b,y)?(f.values[o]=y,0):(f.values[o]=b,1)}}}const rf=le.define({static:!0});class Dt{constructor(e,t,n,s,l){this.id=e,this.createF=t,this.updateF=n,this.compareF=s,this.spec=l,this.provides=void 0}static define(e){let t=new Dt(L0++,e.create,e.update,e.compare||((n,s)=>n===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(rf).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,s)=>{let l=n.values[t],o=this.updateF(l,s);return this.compareF(l,o)?0:(n.values[t]=o,1)},reconfigure:(n,s)=>{let l=n.facet(rf),o=s.facet(rf),c;return(c=l.find(f=>f.field==this))&&c!=o.find(f=>f.field==this)?(n.values[t]=c.create(n),1):s.config.address[this.id]!=null?(n.values[t]=s.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,rf.of({field:this,create:e})]}get extension(){return this}}const Mr={lowest:4,low:3,default:2,high:1,highest:0};function go(i){return e=>new a2(e,i)}const hs={highest:go(Mr.highest),high:go(Mr.high),default:go(Mr.default),low:go(Mr.low),lowest:go(Mr.lowest)};class a2{constructor(e,t){this.inner=e,this.prec=t}}class Lh{of(e){return new ag(this,e)}reconfigure(e){return Lh.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ag{constructor(e,t){this.compartment=e,this.inner=t}}class nh{constructor(e,t,n,s,l,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=s,this.staticValues=l,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let s=[],l=Object.create(null),o=new Map;for(let y of Y3(e,t,o))y instanceof Dt?s.push(y):(l[y.facet.id]||(l[y.facet.id]=[])).push(y);let c=Object.create(null),f=[],d=[];for(let y of s)c[y.id]=d.length<<1,d.push(b=>y.slot(b));let p=n==null?void 0:n.config.facets;for(let y in l){let b=l[y],S=b[0].facet,v=p&&p[y]||[];if(b.every(w=>w.type==0))if(c[S.id]=f.length<<1|1,V0(v,b))f.push(n.facet(S));else{let w=S.combine(b.map(k=>k.value));f.push(n&&S.compare(w,n.facet(S))?n.facet(S):w)}else{for(let w of b)w.type==0?(c[w.id]=f.length<<1|1,f.push(w.value)):(c[w.id]=d.length<<1,d.push(k=>w.dynamicSlot(k)));c[S.id]=d.length<<1,d.push(w=>N3(w,S,b))}}let m=d.map(y=>y(c));return new nh(e,o,m,c,f,l)}}function Y3(i,e,t){let n=[[],[],[],[],[]],s=new Map;function l(o,c){let f=s.get(o);if(f!=null){if(f<=c)return;let d=n[f].indexOf(o);d>-1&&n[f].splice(d,1),o instanceof ag&&t.delete(o.compartment)}if(s.set(o,c),Array.isArray(o))for(let d of o)l(d,c);else if(o instanceof ag){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let d=e.get(o.compartment)||o.inner;t.set(o.compartment,d),l(d,c)}else if(o instanceof a2)l(o.inner,o.prec);else if(o instanceof Dt)n[c].push(o),o.provides&&l(o.provides,c);else if(o instanceof Xf)n[c].push(o),o.facet.extensions&&l(o.facet.extensions,Mr.default);else{let d=o.extension;if(!d)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(d,c)}}return l(i,Mr.default),n.reduce((o,c)=>o.concat(c))}function Zo(i,e){if(e&1)return 2;let t=e>>1,n=i.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;i.status[t]=4;let s=i.computeSlot(i,i.config.dynamicSlots[t]);return i.status[t]=2|s}function sh(i,e){return e&1?i.config.staticValues[e>>1]:i.values[e>>1]}const o2=le.define(),og=le.define({combine:i=>i.some(e=>e),static:!0}),c2=le.define({combine:i=>i.length?i[0]:void 0,static:!0}),u2=le.define(),f2=le.define(),h2=le.define(),d2=le.define({combine:i=>i.length?i[0]:!1});class Dn{constructor(e,t){this.type=e,this.value=t}static define(){return new q3}}class q3{of(e){return new Dn(this,e)}}class U3{constructor(e){this.map=e}of(e){return new ke(this,e)}}class ke{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ke(this.type,t)}is(e){return this.type==e}static define(e={}){return new U3(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let s of e){let l=s.map(t);l&&n.push(l)}return n}}ke.reconfigure=ke.define();ke.appendConfig=ke.define();class wt{constructor(e,t,n,s,l,o){this.startState=e,this.changes=t,this.selection=n,this.effects=s,this.annotations=l,this.scrollIntoView=o,this._doc=null,this._state=null,n&&l2(n,t.newLength),l.some(c=>c.type==wt.time)||(this.annotations=l.concat(wt.time.of(Date.now())))}static create(e,t,n,s,l,o){return new wt(e,t,n,s,l,o)}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 t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(wt.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}wt.time=Dn.define();wt.userEvent=Dn.define();wt.addToHistory=Dn.define();wt.remote=Dn.define();function G3(i,e){let t=[];for(let n=0,s=0;;){let l,o;if(n<i.length&&(s==e.length||e[s]>=i[n]))l=i[n++],o=i[n++];else if(s<e.length)l=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<l?t.push(l,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function p2(i,e,t){var n;let s,l,o;return t?(s=e.changes,l=At.empty(e.changes.length),o=i.changes.compose(e.changes)):(s=e.changes.map(i.changes),l=i.changes.mapDesc(e.changes,!0),o=i.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(l):(n=i.selection)===null||n===void 0?void 0:n.map(s),effects:ke.mapEffects(i.effects,s).concat(ke.mapEffects(e.effects,l)),annotations:i.annotations.length?i.annotations.concat(e.annotations):e.annotations,scrollIntoView:i.scrollIntoView||e.scrollIntoView}}function cg(i,e,t){let n=e.selection,s=ql(e.annotations);return e.userEvent&&(s=s.concat(wt.userEvent.of(e.userEvent))),{changes:e.changes instanceof At?e.changes:At.of(e.changes||[],t,i.facet(c2)),selection:n&&(n instanceof G?n:G.single(n.anchor,n.head)),effects:ql(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function m2(i,e,t){let n=cg(i,e.length?e[0]:{},i.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let l=1;l<e.length;l++){e[l].filter===!1&&(t=!1);let o=!!e[l].sequential;n=p2(n,cg(i,e[l],o?n.changes.newLength:i.doc.length),o)}let s=wt.create(i,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return H3(t?W3(s):s)}function W3(i){let e=i.startState,t=!0;for(let s of e.facet(u2)){let l=s(i);if(l===!1){t=!1;break}Array.isArray(l)&&(t=t===!0?l:G3(t,l))}if(t!==!0){let s,l;if(t===!1)l=i.changes.invertedDesc,s=At.empty(e.doc.length);else{let o=i.changes.filter(t);s=o.changes,l=o.filtered.mapDesc(o.changes).invertedDesc}i=wt.create(e,s,i.selection&&i.selection.map(l),ke.mapEffects(i.effects,l),i.annotations,i.scrollIntoView)}let n=e.facet(f2);for(let s=n.length-1;s>=0;s--){let l=n[s](i);l instanceof wt?i=l:Array.isArray(l)&&l.length==1&&l[0]instanceof wt?i=l[0]:i=m2(e,ql(l),!1)}return i}function H3(i){let e=i.startState,t=e.facet(h2),n=i;for(let s=t.length-1;s>=0;s--){let l=t[s](i);l&&Object.keys(l).length&&(n=p2(n,cg(e,l,i.changes.newLength),!0))}return n==i?i:wt.create(e,i.changes,i.selection,n.effects,n.annotations,n.scrollIntoView)}const I3=[];function ql(i){return i==null?I3:Array.isArray(i)?i:[i]}var ct=(function(i){return i[i.Word=0]="Word",i[i.Space=1]="Space",i[i.Other=2]="Other",i})(ct||(ct={}));const F3=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ug;try{ug=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function K3(i){if(ug)return ug.test(i);for(let e=0;e<i.length;e++){let t=i[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||F3.test(t)))return!0}return!1}function J3(i){return e=>{if(!/\S/.test(e))return ct.Space;if(K3(e))return ct.Word;for(let t=0;t<i.length;t++)if(e.indexOf(i[t])>-1)return ct.Word;return ct.Other}}class Le{constructor(e,t,n,s,l,o){this.config=e,this.doc=t,this.selection=n,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=l,o&&(o._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)Zo(this,c<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw new RangeError("Field is not present in this state");return}return Zo(this,n),sh(this,n)}update(...e){return m2(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:s}=t;for(let c of e.effects)c.is(Lh.reconfigure)?(t&&(s=new Map,t.compartments.forEach((f,d)=>s.set(d,f)),t=null),s.set(c.value.compartment,c.value.extension)):c.is(ke.reconfigure)?(t=null,n=c.value):c.is(ke.appendConfig)&&(t=null,n=ql(n).concat(c.value));let l;t?l=e.startState.values.slice():(t=nh.resolve(n,s,this),l=new Le(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(f,d)=>d.reconfigure(f,this),null).values);let o=e.startState.facet(og)?e.newSelection:e.newSelection.asSingle();new Le(t,e.newDoc,o,l,(c,f)=>f.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:G.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),s=this.changes(n.changes),l=[n.range],o=ql(n.effects);for(let c=1;c<t.ranges.length;c++){let f=e(t.ranges[c]),d=this.changes(f.changes),p=d.map(s);for(let y=0;y<c;y++)l[y]=l[y].map(p);let m=s.mapDesc(d,!0);l.push(f.range.map(m)),s=s.compose(p),o=ke.mapEffects(o,p).concat(ke.mapEffects(ql(f.effects),m))}return{changes:s,selection:G.create(l,t.mainIndex),effects:o}}changes(e=[]){return e instanceof At?e:At.of(e,this.doc.length,this.facet(Le.lineSeparator))}toText(e){return je.of(e.split(this.facet(Le.lineSeparator)||ng))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Zo(this,t),sh(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let s=e[n];s instanceof Dt&&this.config.address[s.id]!=null&&(t[n]=s.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(n){for(let l in n)if(Object.prototype.hasOwnProperty.call(e,l)){let o=n[l],c=e[l];s.push(o.init(f=>o.spec.fromJSON(c,f)))}}return Le.create({doc:e.doc,selection:G.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=nh.resolve(e.extensions||[],new Map),n=e.doc instanceof je?e.doc:je.of((e.doc||"").split(t.staticFacet(Le.lineSeparator)||ng)),s=e.selection?e.selection instanceof G?e.selection:G.single(e.selection.anchor,e.selection.head):G.single(0);return l2(s,n.length),t.staticFacet(og)||(s=s.asSingle()),new Le(t,n,s,t.dynamicSlots.map(()=>null),(l,o)=>o.create(l),null)}get tabSize(){return this.facet(Le.tabSize)}get lineBreak(){return this.facet(Le.lineSeparator)||`
|
|
54
|
-
`}get readOnly(){return this.facet(d2)}phrase(e,...t){for(let n of this.facet(Le.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,s)=>{if(s=="$")return"$";let l=+(s||1);return!l||l>t.length?n:t[l-1]})),e}languageDataAt(e,t,n=-1){let s=[];for(let l of this.facet(o2))for(let o of l(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return J3(t.length?t[0]:"")}wordAt(e){let{text:t,from:n,length:s}=this.doc.lineAt(e),l=this.charCategorizer(e),o=e-n,c=e-n;for(;o>0;){let f=zt(t,o,!1);if(l(t.slice(f,o))!=ct.Word)break;o=f}for(;c<s;){let f=zt(t,c);if(l(t.slice(c,f))!=ct.Word)break;c=f}return o==c?null:G.range(o+n,c+n)}}Le.allowMultipleSelections=og;Le.tabSize=le.define({combine:i=>i.length?i[0]:4});Le.lineSeparator=c2;Le.readOnly=d2;Le.phrases=le.define({compare(i,e){let t=Object.keys(i),n=Object.keys(e);return t.length==n.length&&t.every(s=>i[s]==e[s])}});Le.languageData=o2;Le.changeFilter=u2;Le.transactionFilter=f2;Le.transactionExtender=h2;Lh.reconfigure=ke.define();function Zn(i,e,t={}){let n={};for(let s of i)for(let l of Object.keys(s)){let o=s[l],c=n[l];if(c===void 0)n[l]=o;else if(!(c===o||o===void 0))if(Object.hasOwnProperty.call(t,l))n[l]=t[l](c,o);else throw new Error("Config merge conflict for field "+l)}for(let s in e)n[s]===void 0&&(n[s]=e[s]);return n}class Ks{eq(e){return this==e}range(e,t=e){return fg.create(e,t,this)}}Ks.prototype.startSide=Ks.prototype.endSide=0;Ks.prototype.point=!1;Ks.prototype.mapMode=Yt.TrackDel;function _0(i,e){return i==e||i.constructor==e.constructor&&i.eq(e)}let fg=class O2{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new O2(e,t,n)}};function hg(i,e){return i.from-e.from||i.value.startSide-e.value.startSide}class j0{constructor(e,t,n,s){this.from=e,this.to=t,this.value=n,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,s=0){let l=n?this.to:this.from;for(let o=s,c=l.length;;){if(o==c)return o;let f=o+c>>1,d=l[f]-e||(n?this.value[f].endSide:this.value[f].startSide)-t;if(f==o)return d>=0?o:c;d>=0?c=f:o=f+1}}between(e,t,n,s){for(let l=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,l);l<o;l++)if(s(this.from[l]+e,this.to[l]+e,this.value[l])===!1)return!1}map(e,t){let n=[],s=[],l=[],o=-1,c=-1;for(let f=0;f<this.value.length;f++){let d=this.value[f],p=this.from[f]+e,m=this.to[f]+e,y,b;if(p==m){let S=t.mapPos(p,d.startSide,d.mapMode);if(S==null||(y=b=S,d.startSide!=d.endSide&&(b=t.mapPos(p,d.endSide),b<y)))continue}else if(y=t.mapPos(p,d.startSide),b=t.mapPos(m,d.endSide),y>b||y==b&&d.startSide>0&&d.endSide<=0)continue;(b-y||d.endSide-d.startSide)<0||(o<0&&(o=y),d.point&&(c=Math.max(c,b-y)),n.push(d),s.push(y-o),l.push(b-o))}return{mapped:n.length?new j0(s,l,n,c):null,pos:o}}}class De{constructor(e,t,n,s){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=s}static create(e,t,n,s){return new De(e,t,n,s)}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 t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:s=0,filterTo:l=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(hg)),this.isEmpty)return t.length?De.of(t):this;let c=new g2(this,null,-1).goto(0),f=0,d=[],p=new cs;for(;c.value||f<t.length;)if(f<t.length&&(c.from-t[f].from||c.startSide-t[f].value.startSide)>=0){let m=t[f++];p.addInner(m.from,m.to,m.value)||d.push(m)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(f==t.length||this.chunkEnd(c.chunkIndex)<t[f].from)&&(!o||s>this.chunkEnd(c.chunkIndex)||l<this.chunkPos[c.chunkIndex])&&p.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!o||s>c.to||l<c.from||o(c.from,c.to,c.value))&&(p.addInner(c.from,c.to,c.value)||d.push(fg.create(c.from,c.to,c.value))),c.next());return p.finishInner(this.nextLayer.isEmpty&&!d.length?De.empty:this.nextLayer.update({add:d,filter:o,filterFrom:s,filterTo:l}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],s=-1;for(let o=0;o<this.chunk.length;o++){let c=this.chunkPos[o],f=this.chunk[o],d=e.touchesRange(c,c+f.length);if(d===!1)s=Math.max(s,f.maxPoint),t.push(f),n.push(e.mapPos(c));else if(d===!0){let{mapped:p,pos:m}=f.map(c,e);p&&(s=Math.max(s,p.maxPoint),t.push(p),n.push(m))}}let l=this.nextLayer.map(e);return t.length==0?l:new De(n,t,l||De.empty,s)}between(e,t,n){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let l=this.chunkPos[s],o=this.chunk[s];if(t>=l&&e<=l+o.length&&o.between(l,e-l,t-l,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return Io.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Io.from(e).goto(t)}static compare(e,t,n,s,l=-1){let o=e.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=l),c=t.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=l),f=bw(o,c,n),d=new yo(o,f,l),p=new yo(c,f,l);n.iterGaps((m,y,b)=>Sw(d,m,p,y,b,s)),n.empty&&n.length==0&&Sw(d,0,p,0,0,s)}static eq(e,t,n=0,s){s==null&&(s=999999999);let l=e.filter(p=>!p.isEmpty&&t.indexOf(p)<0),o=t.filter(p=>!p.isEmpty&&e.indexOf(p)<0);if(l.length!=o.length)return!1;if(!l.length)return!0;let c=bw(l,o),f=new yo(l,c,0).goto(n),d=new yo(o,c,0).goto(n);for(;;){if(f.to!=d.to||!dg(f.active,d.active)||f.point&&(!d.point||!_0(f.point,d.point)))return!1;if(f.to>s)return!0;f.next(),d.next()}}static spans(e,t,n,s,l=-1){let o=new yo(e,null,l).goto(t),c=t,f=o.openStart;for(;;){let d=Math.min(o.to,n);if(o.point){let p=o.activeForPoint(o.to),m=o.pointFrom<t?p.length+1:o.point.startSide<0?p.length:Math.min(p.length,f);s.point(c,d,o.point,p,m,o.pointRank),f=Math.min(o.openEnd(d),p.length)}else d>c&&(s.span(c,d,o.active,f),f=o.openEnd(d));if(o.to>n)return f+(o.point&&o.to>n?1:0);c=o.to,o.next()}}static of(e,t=!1){let n=new cs;for(let s of e instanceof fg?[e]:t?eL(e):e)n.add(s.from,s.to,s.value);return n.finish()}static join(e){if(!e.length)return De.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let s=e[n];s!=De.empty;s=s.nextLayer)t=new De(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}De.empty=new De([],[],null,-1);function eL(i){if(i.length>1)for(let e=i[0],t=1;t<i.length;t++){let n=i[t];if(hg(e,n)>0)return i.slice().sort(hg);e=n}return i}De.empty.nextLayer=De.empty;class cs{finishChunk(e){this.chunks.push(new j0(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,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new cs)).add(e,t,n)}addInner(e,t,n){let s=e-this.lastTo||n.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(De.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=De.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function bw(i,e,t){let n=new Map;for(let l of i)for(let o=0;o<l.chunk.length;o++)l.chunk[o].maxPoint<=0&&n.set(l.chunk[o],l.chunkPos[o]);let s=new Set;for(let l of e)for(let o=0;o<l.chunk.length;o++){let c=n.get(l.chunk[o]);c!=null&&(t?t.mapPos(c):c)==l.chunkPos[o]&&!(t!=null&&t.touchesRange(c,c+l.chunk[o].length))&&s.add(l.chunk[o])}return s}class g2{constructor(e,t,n,s=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<e||s.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!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],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.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 Io{constructor(e){this.heap=e}static from(e,t=null,n=-1){let s=[];for(let l=0;l<e.length;l++)for(let o=e[l];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&s.push(new g2(o,t,n,l));return s.length==1?s[0]:new Io(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)jm(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)jm(this.heap,n);(this.to-e||this.value.endSide-t)<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(),jm(this.heap,0)}}}function jm(i,e){for(let t=i[e];;){let n=(e<<1)+1;if(n>=i.length)break;let s=i[n];if(n+1<i.length&&s.compare(i[n+1])>=0&&(s=i[n+1],n++),t.compare(s)<0)break;i[n]=t,i[e]=s,e=n}}class yo{constructor(e,t,n){this.minPoint=n,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=Io.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){lf(this.active,e),lf(this.activeTo,e),lf(this.activeRank,e),this.minActive=xw(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:s,rank:l}=this.cursor;for(;t<this.activeRank.length&&(l-this.activeRank[t]||s-this.activeTo[t])>0;)t++;af(this.active,t,n),af(this.activeTo,t,s),af(this.activeRank,t,l),e&&af(e,t,this.cursor.from),this.minActive=xw(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),n&&lf(n,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=l,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=l.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let s=n.length-1;s>=0&&n[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Sw(i,e,t,n,s,l){i.goto(e),t.goto(n);let o=n+s,c=n,f=n-e,d=!!l.boundChange;for(let p=!1;;){let m=i.to+f-t.to,y=m||i.endSide-t.endSide,b=y<0?i.to+f:t.to,S=Math.min(b,o);if(i.point||t.point?(i.point&&t.point&&_0(i.point,t.point)&&dg(i.activeForPoint(i.to),t.activeForPoint(t.to))||l.comparePoint(c,S,i.point,t.point),p=!1):(p&&l.boundChange(c),S>c&&!dg(i.active,t.active)&&l.compareRange(c,S,i.active,t.active),d&&S<o&&(m||i.openEnd(b)!=t.openEnd(b))&&(p=!0)),b>o)break;c=b,y<=0&&i.next(),y>=0&&t.next()}}function dg(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(i[t]!=e[t]&&!_0(i[t],e[t]))return!1;return!0}function lf(i,e){for(let t=e,n=i.length-1;t<n;t++)i[t]=i[t+1];i.pop()}function af(i,e,t){for(let n=i.length-1;n>=e;n--)i[n+1]=i[n];i[e]=t}function xw(i,e){let t=-1,n=1e9;for(let s=0;s<e.length;s++)(e[s]-n||i[s].endSide-i[t].endSide)<0&&(t=s,n=e[s]);return t}function un(i,e,t=i.length){let n=0;for(let s=0;s<t&&s<i.length;)i.charCodeAt(s)==9?(n+=e-n%e,s++):(n++,s=zt(i,s));return n}function pg(i,e,t,n){for(let s=0,l=0;;){if(l>=e)return s;if(s==i.length)break;l+=i.charCodeAt(s)==9?t-l%t:1,s=zt(i,s)}return n===!0?-1:i.length}const mg="ͼ",vw=typeof Symbol>"u"?"__"+mg:Symbol.for(mg),Og=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ww=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Js{constructor(e,t){this.rules=[];let{finish:n}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function l(o,c,f,d){let p=[],m=/^@(\w+)\b/.exec(o[0]),y=m&&m[1]=="keyframes";if(m&&c==null)return f.push(o[0]+";");for(let b in c){let S=c[b];if(/&/.test(b))l(b.split(/,\s*/).map(v=>o.map(w=>v.replace(/&/,w))).reduce((v,w)=>v.concat(w)),S,f);else if(S&&typeof S=="object"){if(!m)throw new RangeError("The value of a property ("+b+") should be a primitive value.");l(s(b),S,p,y)}else S!=null&&p.push(b.replace(/_.*/,"").replace(/[A-Z]/g,v=>"-"+v.toLowerCase())+": "+S+";")}(p.length||y)&&f.push((n&&!m&&!d?o.map(n):o).join(", ")+" {"+p.join(" ")+"}")}for(let o in e)l(s(o),e[o],this.rules)}getRules(){return this.rules.join(`
|
|
55
|
-
`)}static newName(){let e=ww[vw]||1;return ww[vw]=e+1,mg+e.toString(36)}static mount(e,t,n){let s=e[Og],l=n&&n.nonce;s?l&&s.setNonce(l):s=new tL(e,l),s.mount(Array.isArray(t)?t:[t],e)}}let Qw=new Map;class tL{constructor(e,t){let n=e.ownerDocument||e,s=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let l=Qw.get(n);if(l)return e[Og]=l;this.sheet=new s.CSSStyleSheet,Qw.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Og]=this}mount(e,t){let n=this.sheet,s=0,l=0;for(let o=0;o<e.length;o++){let c=e[o],f=this.modules.indexOf(c);if(f<l&&f>-1&&(this.modules.splice(f,1),l--,f=-1),f==-1){if(this.modules.splice(l++,0,c),n)for(let d=0;d<c.rules.length;d++)n.insertRule(c.rules[d],s++)}else{for(;l<f;)s+=this.modules[l++].rules.length;s+=c.rules.length,l++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let f=0;f<this.modules.length;f++)o+=this.modules[f].getRules()+`
|
|
56
|
-
`;this.styleTag.textContent=o;let c=t.head||t;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 er={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:"'"},Fo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},iL=typeof navigator<"u"&&/Mac/.test(navigator.platform),nL=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Nt=0;Nt<10;Nt++)er[48+Nt]=er[96+Nt]=String(Nt);for(var Nt=1;Nt<=24;Nt++)er[Nt+111]="F"+Nt;for(var Nt=65;Nt<=90;Nt++)er[Nt]=String.fromCharCode(Nt+32),Fo[Nt]=String.fromCharCode(Nt);for(var Bm in er)Fo.hasOwnProperty(Bm)||(Fo[Bm]=er[Bm]);function sL(i){var e=iL&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||nL&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?Fo:er)[i.keyCode]||i.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ke(){var i=arguments[0];typeof i=="string"&&(i=document.createElement(i));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n];typeof s=="string"?i.setAttribute(n,s):s!=null&&(i[n]=s)}e++}for(;e<arguments.length;e++)y2(i,arguments[e]);return i}function y2(i,e){if(typeof e=="string")i.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)i.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)y2(i,e[t]);else throw new RangeError("Unsupported child node: "+e)}let Kt=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},gg=typeof document<"u"?document:{documentElement:{style:{}}};const yg=/Edge\/(\d+)/.exec(Kt.userAgent),b2=/MSIE \d/.test(Kt.userAgent),bg=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kt.userAgent),Vh=!!(b2||bg||yg),kw=!Vh&&/gecko\/(\d+)/i.test(Kt.userAgent),Nm=!Vh&&/Chrome\/(\d+)/.exec(Kt.userAgent),rL="webkitFontSmoothing"in gg.documentElement.style,Sg=!Vh&&/Apple Computer/.test(Kt.vendor),Tw=Sg&&(/Mobile\/\w+/.test(Kt.userAgent)||Kt.maxTouchPoints>2);var ae={mac:Tw||/Mac/.test(Kt.platform),windows:/Win/.test(Kt.platform),linux:/Linux|X11/.test(Kt.platform),ie:Vh,ie_version:b2?gg.documentMode||6:bg?+bg[1]:yg?+yg[1]:0,gecko:kw,gecko_version:kw?+(/Firefox\/(\d+)/.exec(Kt.userAgent)||[0,0])[1]:0,chrome:!!Nm,chrome_version:Nm?+Nm[1]:0,ios:Tw,android:/Android\b/.test(Kt.userAgent),webkit_version:rL?+(/\bAppleWebKit\/(\d+)/.exec(Kt.userAgent)||[0,0])[1]:0,safari:Sg,safari_version:Sg?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Kt.userAgent)||[0,0])[1]:0,tabSize:gg.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function B0(i,e){for(let t in i)t=="class"&&e.class?e.class+=" "+i.class:t=="style"&&e.style?e.style+=";"+i.style:e[t]=i[t];return e}const rh=Object.create(null);function N0(i,e,t){if(i==e)return!0;i||(i=rh),e||(e=rh);let n=Object.keys(i),s=Object.keys(e);if(n.length-0!=s.length-0)return!1;for(let l of n)if(l!=t&&(s.indexOf(l)==-1||i[l]!==e[l]))return!1;return!0}function lL(i,e){for(let t=i.attributes.length-1;t>=0;t--){let n=i.attributes[t].name;e[n]==null&&i.removeAttribute(n)}for(let t in e){let n=e[t];t=="style"?i.style.cssText=n:i.getAttribute(t)!=n&&i.setAttribute(t,n)}}function Cw(i,e,t){let n=!1;if(e)for(let s in e)t&&s in t||(n=!0,s=="style"?i.style.cssText="":i.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(n=!0,s=="style"?i.style.cssText=t[s]:i.setAttribute(s,t[s]));return n}function aL(i){let e=Object.create(null);for(let t=0;t<i.attributes.length;t++){let n=i.attributes[t];e[n.name]=n.value}return e}class hn{eq(e){return!1}updateDOM(e,t){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,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var qt=(function(i){return i[i.Text=0]="Text",i[i.WidgetBefore=1]="WidgetBefore",i[i.WidgetAfter=2]="WidgetAfter",i[i.WidgetRange=3]="WidgetRange",i})(qt||(qt={}));class be extends Ks{constructor(e,t,n,s){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=s}get heightRelevant(){return!1}static mark(e){return new kc(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Br(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,s;if(e.isBlockGap)n=-5e8,s=4e8;else{let{start:l,end:o}=S2(e,t);n=(l?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Br(e,n,s,t,e.widget||null,!0)}static line(e){return new Tc(e)}static set(e,t=!1){return De.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}be.none=De.empty;class kc extends be{constructor(e){let{start:t,end:n}=S2(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?B0(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||rh}eq(e){return this==e||e instanceof kc&&this.tagName==e.tagName&&N0(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}kc.prototype.point=!1;class Tc extends be{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Tc&&this.spec.class==e.spec.class&&N0(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Tc.prototype.mapMode=Yt.TrackBefore;Tc.prototype.point=!0;class Br extends be{constructor(e,t,n,s,l,o){super(t,n,l,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?Yt.TrackBefore:Yt.TrackAfter:Yt.TrackDel}get type(){return this.startSide!=this.endSide?qt.WidgetRange:this.startSide<=0?qt.WidgetBefore:qt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Br&&oL(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Br.prototype.point=!0;function S2(i,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=i;return t==null&&(t=i.inclusive),n==null&&(n=i.inclusive),{start:t??e,end:n??e}}function oL(i,e){return i==e||!!(i&&e&&i.compare(e))}function Ul(i,e,t,n=0){let s=t.length-1;s>=0&&t[s]+n>=i?t[s]=Math.max(t[s],e):t.push(i,e)}class Ko extends Ks{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof Ko&&this.tagName==e.tagName&&N0(this.attributes,e.attributes)}static create(e){return new Ko(e.tagName,e.attributes||rh)}static set(e,t=!1){return De.of(e,t)}}Ko.prototype.startSide=Ko.prototype.endSide=-1;function Jo(i){let e;return i.nodeType==11?e=i.getSelection?i:i.ownerDocument:e=i,e.getSelection()}function xg(i,e){return e?i==e||i.contains(e.nodeType!=1?e.parentNode:e):!1}function Xo(i,e){if(!e.anchorNode)return!1;try{return xg(i,e.anchorNode)}catch{return!1}}function Lo(i){return i.nodeType==3?tc(i,0,i.nodeValue.length).getClientRects():i.nodeType==1?i.getClientRects():[]}function Vo(i,e,t,n){return t?Aw(i,e,t,n,-1)||Aw(i,e,t,n,1):!1}function tr(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e}function lh(i){return i.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName)}function Aw(i,e,t,n,s){for(;;){if(i==t&&e==n)return!0;if(e==(s<0?0:us(i))){if(i.nodeName=="DIV")return!1;let l=i.parentNode;if(!l||l.nodeType!=1)return!1;e=tr(i)+(s<0?0:1),i=l}else if(i.nodeType==1){if(i=i.childNodes[e+(s<0?-1:0)],i.nodeType==1&&i.contentEditable=="false")return!1;e=s<0?us(i):0}else return!1}}function us(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function ec(i,e){let t=e?i.left:i.right;return{left:t,right:t,top:i.top,bottom:i.bottom}}function cL(i){let e=i.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.innerWidth,top:0,bottom:i.innerHeight}}function x2(i,e){let t=e.width/i.offsetWidth,n=e.height/i.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-i.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-i.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function uL(i,e,t,n,s,l,o,c){let f=i.ownerDocument,d=f.defaultView||window;for(let p=i,m=!1;p&&!m;)if(p.nodeType==1){let y,b=p==f.body,S=1,v=1;if(b)y=cL(d);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 A=p.getBoundingClientRect();({scaleX:S,scaleY:v}=x2(p,A)),y={left:A.left,right:A.left+p.clientWidth*S,top:A.top,bottom:A.top+p.clientHeight*v}}let w=0,k=0;if(s=="nearest")e.top<y.top?(k=e.top-(y.top+o),t>0&&e.bottom>y.bottom+k&&(k=e.bottom-y.bottom+o)):e.bottom>y.bottom&&(k=e.bottom-y.bottom+o,t<0&&e.top-k<y.top&&(k=e.top-(y.top+o)));else{let A=e.bottom-e.top,P=y.bottom-y.top;k=(s=="center"&&A<=P?e.top+A/2-P/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-P+o)-y.top}if(n=="nearest"?e.left<y.left?(w=e.left-(y.left+l),t>0&&e.right>y.right+w&&(w=e.right-y.right+l)):e.right>y.right&&(w=e.right-y.right+l,t<0&&e.left<y.left+w&&(w=e.left-(y.left+l))):w=(n=="center"?e.left+(e.right-e.left)/2-(y.right-y.left)/2:n=="start"==c?e.left-l:e.right-(y.right-y.left)+l)-y.left,w||k)if(b)d.scrollBy(w,k);else{let A=0,P=0;if(k){let V=p.scrollTop;p.scrollTop+=k/v,P=(p.scrollTop-V)*v}if(w){let V=p.scrollLeft;p.scrollLeft+=w/S,A=(p.scrollLeft-V)*S}e={left:e.left-A,top:e.top-P,right:e.right-A,bottom:e.bottom-P},A&&Math.abs(A-w)<1&&(n="nearest"),P&&Math.abs(P-k)<1&&(s="nearest")}if(b)break;(e.top<y.top||e.bottom>y.bottom||e.left<y.left||e.right>y.right)&&(e={left:Math.max(e.left,y.left),right:Math.min(e.right,y.right),top:Math.max(e.top,y.top),bottom:Math.min(e.bottom,y.bottom)}),p=p.assignedSlot||p.parentNode}else if(p.nodeType==11)p=p.host;else break}function fL(i){let e=i.ownerDocument,t,n;for(let s=i.parentNode;s&&!(s==e.body||t&&n);)if(s.nodeType==1)!n&&s.scrollHeight>s.clientHeight&&(n=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:n}}class hL{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:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?us(t):0),n,Math.min(e.focusOffset,n?us(n):0))}set(e,t,n,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=s}}let $r=null;ae.safari&&ae.safari_version>=26&&($r=!1);function v2(i){if(i.setActive)return i.setActive();if($r)return i.focus($r);let e=[];for(let t=i;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(i.focus($r==null?{get preventScroll(){return $r={preventScroll:!0},!0}}:void 0),!$r){$r=!1;for(let t=0;t<e.length;){let n=e[t++],s=e[t++],l=e[t++];n.scrollTop!=s&&(n.scrollTop=s),n.scrollLeft!=l&&(n.scrollLeft=l)}}}let Pw;function tc(i,e,t=e){let n=Pw||(Pw=document.createRange());return n.setEnd(i,t),n.setStart(i,e),n}function Gl(i,e,t,n){let s={key:e,code:e,keyCode:t,which:t,cancelable:!0};n&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=n);let l=new KeyboardEvent("keydown",s);l.synthetic=!0,i.dispatchEvent(l);let o=new KeyboardEvent("keyup",s);return o.synthetic=!0,i.dispatchEvent(o),l.defaultPrevented||o.defaultPrevented}function dL(i){for(;i;){if(i&&(i.nodeType==9||i.nodeType==11&&i.host))return i;i=i.assignedSlot||i.parentNode}return null}function pL(i,e){let t=e.focusNode,n=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=n)return!1;for(n=Math.min(n,us(t));;)if(n){if(t.nodeType!=1)return!1;let s=t.childNodes[n-1];s.contentEditable=="false"?n--:(t=s,n=us(t))}else{if(t==i)return!0;n=tr(t),t=t.parentNode}}function w2(i){return i.scrollTop>Math.max(1,i.scrollHeight-i.clientHeight-4)}function Q2(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=us(t)}else if(t.parentNode&&!lh(t))n=tr(t),t=t.parentNode;else return null}}function k2(i,e){for(let t=i,n=e;;){if(t.nodeType==3&&n<t.nodeValue.length)return{node:t,offset:n};if(t.nodeType==1&&n<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[n],n=0}else if(t.parentNode&&!lh(t))n=tr(t)+1,t=t.parentNode;else return null}}class an{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new an(e.parentNode,tr(e),t)}static after(e,t){return new an(e.parentNode,tr(e)+1,t)}}var tt=(function(i){return i[i.LTR=0]="LTR",i[i.RTL=1]="RTL",i})(tt||(tt={}));const Nr=tt.LTR,Y0=tt.RTL;function T2(i){let e=[];for(let t=0;t<i.length;t++)e.push(1<<+i[t]);return e}const mL=T2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),OL=T2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),vg=Object.create(null),bn=[];for(let i of["()","[]","{}"]){let e=i.charCodeAt(0),t=i.charCodeAt(1);vg[e]=t,vg[t]=-e}function C2(i){return i<=247?mL[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?OL[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8204?256:64336<=i&&i<=65023?4:1}const gL=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Cn{get dir(){return this.level%2?Y0:Nr}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,s){let l=-1;for(let o=0;o<e.length;o++){let c=e[o];if(c.from<=t&&c.to>=t){if(c.level==n)return o;(l<0||(s!=0?s<0?c.from<t:c.to>t:e[l].level>c.level))&&(l=o)}}if(l<0)throw new RangeError("Index out of range");return l}}function A2(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++){let n=i[t],s=e[t];if(n.from!=s.from||n.to!=s.to||n.direction!=s.direction||!A2(n.inner,s.inner))return!1}return!0}const et=[];function yL(i,e,t,n,s){for(let l=0;l<=n.length;l++){let o=l?n[l-1].to:e,c=l<n.length?n[l].from:t,f=l?256:s;for(let d=o,p=f,m=f;d<c;d++){let y=C2(i.charCodeAt(d));y==512?y=p:y==8&&m==4&&(y=16),et[d]=y==4?2:y,y&7&&(m=y),p=y}for(let d=o,p=f,m=f;d<c;d++){let y=et[d];if(y==128)d<c-1&&p==et[d+1]&&p&24?y=et[d]=p:et[d]=256;else if(y==64){let b=d+1;for(;b<c&&et[b]==64;)b++;let S=d&&p==8||b<t&&et[b]==8?m==1?1:8:256;for(let v=d;v<b;v++)et[v]=S;d=b-1}else y==8&&m==1&&(et[d]=1);p=y,y&7&&(m=y)}}}function bL(i,e,t,n,s){let l=s==1?2:1;for(let o=0,c=0,f=0;o<=n.length;o++){let d=o?n[o-1].to:e,p=o<n.length?n[o].from:t;for(let m=d,y,b,S;m<p;m++)if(b=vg[y=i.charCodeAt(m)])if(b<0){for(let v=c-3;v>=0;v-=3)if(bn[v+1]==-b){let w=bn[v+2],k=w&2?s:w&4?w&1?l:s:0;k&&(et[m]=et[bn[v]]=k),c=v;break}}else{if(bn.length==189)break;bn[c++]=m,bn[c++]=y,bn[c++]=f}else if((S=et[m])==2||S==1){let v=S==s;f=v?0:1;for(let w=c-3;w>=0;w-=3){let k=bn[w+2];if(k&2)break;if(v)bn[w+2]|=2;else{if(k&4)break;bn[w+2]|=4}}}}}function SL(i,e,t,n){for(let s=0,l=n;s<=t.length;s++){let o=s?t[s-1].to:i,c=s<t.length?t[s].from:e;for(let f=o;f<c;){let d=et[f];if(d==256){let p=f+1;for(;;)if(p==c){if(s==t.length)break;p=t[s++].to,c=s<t.length?t[s].from:e}else if(et[p]==256)p++;else break;let m=l==1,y=(p<e?et[p]:n)==1,b=m==y?m?1:2:n;for(let S=p,v=s,w=v?t[v-1].to:i;S>f;)S==w&&(S=t[--v].from,w=v?t[v-1].to:i),et[--S]=b;f=p}else l=d,f++}}}function wg(i,e,t,n,s,l,o){let c=n%2?2:1;if(n%2==s%2)for(let f=e,d=0;f<t;){let p=!0,m=!1;if(d==l.length||f<l[d].from){let v=et[f];v!=c&&(p=!1,m=v==16)}let y=!p&&c==1?[]:null,b=p?n:n+1,S=f;e:for(;;)if(d<l.length&&S==l[d].from){if(m)break e;let v=l[d];if(!p)for(let w=v.to,k=d+1;;){if(w==t)break e;if(k<l.length&&l[k].from==w)w=l[k++].to;else{if(et[w]==c)break e;break}}if(d++,y)y.push(v);else{v.from>f&&o.push(new Cn(f,v.from,b));let w=v.direction==Nr!=!(b%2);Qg(i,w?n+1:n,s,v.inner,v.from,v.to,o),f=v.to}S=v.to}else{if(S==t||(p?et[S]!=c:et[S]==c))break;S++}y?wg(i,f,S,n+1,s,y,o):f<S&&o.push(new Cn(f,S,b)),f=S}else for(let f=t,d=l.length;f>e;){let p=!0,m=!1;if(!d||f>l[d-1].to){let v=et[f-1];v!=c&&(p=!1,m=v==16)}let y=!p&&c==1?[]:null,b=p?n:n+1,S=f;e:for(;;)if(d&&S==l[d-1].to){if(m)break e;let v=l[--d];if(!p)for(let w=v.from,k=d;;){if(w==e)break e;if(k&&l[k-1].to==w)w=l[--k].from;else{if(et[w-1]==c)break e;break}}if(y)y.push(v);else{v.to<f&&o.push(new Cn(v.to,f,b));let w=v.direction==Nr!=!(b%2);Qg(i,w?n+1:n,s,v.inner,v.from,v.to,o),f=v.from}S=v.from}else{if(S==e||(p?et[S-1]!=c:et[S-1]==c))break;S--}y?wg(i,S,f,n+1,s,y,o):S<f&&o.push(new Cn(S,f,b)),f=S}}function Qg(i,e,t,n,s,l,o){let c=e%2?2:1;yL(i,s,l,n,c),bL(i,s,l,n,c),SL(s,l,n,c),wg(i,s,l,e,t,n,o)}function xL(i,e,t){if(!i)return[new Cn(0,0,e==Y0?1:0)];if(e==Nr&&!t.length&&!gL.test(i))return P2(i.length);if(t.length)for(;i.length>et.length;)et[et.length]=256;let n=[],s=e==Nr?0:1;return Qg(i,s,s,t,0,i.length,n),n}function P2(i){return[new Cn(0,i,0)]}let $2="";function vL(i,e,t,n,s){var l;let o=n.head-i.from,c=Cn.find(e,o,(l=n.bidiLevel)!==null&&l!==void 0?l:-1,n.assoc),f=e[c],d=f.side(s,t);if(o==d){let y=c+=s?1:-1;if(y<0||y>=e.length)return null;f=e[c=y],o=f.side(!s,t),d=f.side(s,t)}let p=zt(i.text,o,f.forward(s,t));(p<f.from||p>f.to)&&(p=d),$2=i.text.slice(Math.min(o,p),Math.max(o,p));let m=c==(s?e.length-1:0)?null:e[c+(s?1:-1)];return m&&p==d&&m.level+(s?0:1)<f.level?G.cursor(m.side(!s,t)+i.from,m.forward(s,t)?1:-1,m.level):G.cursor(p+i.from,f.forward(s,t)?-1:1,f.level)}function wL(i,e,t){for(let n=e;n<t;n++){let s=C2(i.charCodeAt(n));if(s==1)return Nr;if(s==2||s==4)return Y0}return Nr}const M2=le.define(),E2=le.define(),R2=le.define(),z2=le.define(),kg=le.define(),D2=le.define(),Z2=le.define(),q0=le.define(),U0=le.define(),X2=le.define({combine:i=>i.some(e=>e)}),L2=le.define({combine:i=>i.some(e=>e)}),V2=le.define();class Wl{constructor(e,t="nearest",n="nearest",s=5,l=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=s,this.xMargin=l,this.isSnapshot=o}map(e){return e.empty?this:new Wl(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 Wl(G.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const of=ke.define({map:(i,e)=>i.map(e)}),_2=ke.define();function di(i,e,t){let n=i.facet(z2);n.length?n[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const rs=le.define({combine:i=>i.length?i[0]:!0});let QL=0;const jl=le.define({combine(i){return i.filter((e,t)=>{for(let n=0;n<t;n++)if(i[n].plugin==e.plugin)return!1;return!0})}});class gt{constructor(e,t,n,s,l){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=s,this.baseExtensions=l(this),this.extension=this.baseExtensions.concat(jl.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(jl.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:n,eventObservers:s,provide:l,decorations:o}=t||{};return new gt(QL++,e,n,s,c=>{let f=[];return o&&f.push(_h.of(d=>{let p=d.plugin(c);return p?o(p):be.none})),l&&f.push(l(c)),f})}static fromClass(e,t){return gt.define((n,s)=>new e(n,s),t)}}class Ym{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 t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(di(t.state,n,"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(t){di(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){di(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const j2=le.define(),G0=le.define(),_h=le.define(),B2=le.define(),W0=le.define(),Cc=le.define(),N2=le.define();function $w(i,e){let t=i.state.facet(N2);if(!t.length)return t;let n=t.map(l=>l instanceof Function?l(i):l),s=[];return De.spans(n,e.from,e.to,{point(){},span(l,o,c,f){let d=l-e.from,p=o-e.from,m=s;for(let y=c.length-1;y>=0;y--,f--){let b=c[y].spec.bidiIsolate,S;if(b==null&&(b=wL(e.text,d,p)),f>0&&m.length&&(S=m[m.length-1]).to==d&&S.direction==b)S.to=p,m=S.inner;else{let v={from:d,to:p,direction:b,inner:[]};m.push(v),m=v.inner}}}}),s}const Y2=le.define();function H0(i){let e=0,t=0,n=0,s=0;for(let l of i.state.facet(Y2)){let o=l(i);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:n,bottom:s}}const To=le.define();class qi{constructor(e,t,n,s){this.fromA=e,this.toA=t,this.fromB=n,this.toB=s}join(e){return new qi(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 t=e.length,n=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>n.toA)){if(s.toA<n.fromA)break;n=n.join(s),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let s=0,l=0,o=0;;){let c=s<e.length?e[s].fromB:1e9,f=l<t.length?t[l]:1e9,d=Math.min(c,f);if(d==1e9)break;let p=d+o,m=d,y=p;for(;;)if(l<t.length&&t[l]<=m){let b=t[l+1];l+=2,m=Math.max(m,b);for(let S=s;S<e.length&&e[S].fromB<=m;S++)o=e[S].toA-e[S].toB;y=Math.max(y,b+o)}else if(s<e.length&&e[s].fromB<=m){let b=e[s++];m=Math.max(m,b.toB),y=Math.max(y,b.toA),o=b.toA-b.toB}else break;n.push(new qi(p,y,d,m))}return n}}class ah{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=At.empty(this.startState.doc.length);for(let l of n)this.changes=this.changes.compose(l.changes);let s=[];this.changes.iterChangedRanges((l,o,c,f)=>s.push(new qi(l,o,c,f))),this.changedRanges=s}static create(e,t,n){return new ah(e,t,n)}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 kL=[];class Qt{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return kL}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 t=this.domAttrs;t&&lL(this.dom,t)}}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,t=this.posAtStart){let n=t;for(let s of this.children){if(s==e)return n;n+=s.length+s.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=tr(this.dom),s=this.length?e>0:t>0;return new an(this.parent.dom,n+(s?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 Bh)return e;return null}static get(e){return e.cmTile}}class jh extends Qt{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 t=this.dom,n=null,s,l=(e==null?void 0:e.node)==t?e:null,o=0;for(let c of this.children){if(c.sync(e),o+=c.length+c.breakAfter,s=n?n.nextSibling:t.firstChild,l&&s!=c.dom&&(l.written=!0),c.dom.parentNode==t)for(;s&&s!=c.dom;)s=Mw(s);else t.insertBefore(c.dom,s);n=c.dom}for(s=n?n.nextSibling:t.firstChild,l&&s&&(l.written=!0);s;)s=Mw(s);this.length=o}}function Mw(i){let e=i.nextSibling;return i.parentNode.removeChild(i),e}class Bh extends jh{constructor(e,t){super(t),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 t=Qt.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,s=0,l=0;;)if(s==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&l++,s=t.pop()}else{let o=n.children[s++];if(o instanceof ls)t.push(s),n=o,s=0;else{let c=l+o.length,f=e(o,l);if(f!==void 0)return f;l=c+o.breakAfter}}}resolveBlock(e,t){let n,s=-1,l,o=-1;if(this.blockTiles((c,f)=>{let d=f+c.length;if(e>=f&&e<=d){if(c.isWidget()&&t>=-1&&t<=1){if(c.flags&32)return!0;c.flags&16&&(n=void 0)}(f<e||e==d&&(t<-1?c.length:c.covers(1)))&&(!n||!c.isWidget()&&n.isWidget())&&(n=c,s=e-f),(d>e||e==f&&(t>1?c.length:c.covers(-1)))&&(!l||!c.isWidget()&&l.isWidget())&&(l=c,o=e-f)}}),!n&&!l)throw new Error("No tile at position "+e);return n&&t<0||!l?{tile:n,offset:s}:{tile:l,offset:o}}}class ls extends jh{constructor(e,t){super(e),this.wrapper=t}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,t){let n=new ls(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class ta extends jh{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,n){let s=new ta(t||document.createElement("div"),e);return(!t||!n)&&(s.flags|=4),s}get domAttrs(){return this.attrs}resolveInline(e,t,n){let s=null,l=-1,o=null,c=-1;function f(p,m){for(let y=0,b=0;y<p.children.length&&b<=m;y++){let S=p.children[y],v=b+S.length;v>=m&&(S.isComposite()?f(S,m-b):(!o||o.isHidden&&(t>0||n&&CL(o,S)))&&(v>m||S.flags&32)?(o=S,c=m-b):(b<m||S.flags&16&&!S.isHidden)&&(s=S,l=m-b)),b=v}}f(this,e);let d=(t<0?s:o)||s||o;return d?{tile:d,offset:d==s?l:c}:null}coordsIn(e,t){let n=this.resolveInline(e,t,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),t):TL(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:s,offset:l}=n;if(this.dom.contains(s.dom))return s.isText()?new an(s.dom,Math.min(s.dom.nodeValue.length,l)):s.domPosFor(l,s.flags&16?1:s.flags&32?-1:t);let o=n.tile.parent,c=!1;for(let f of o.children){if(c)return new an(f.dom,0);f==n.tile&&(c=!0)}}return new an(this.dom,0)}}function TL(i){let e=i.dom.lastChild;if(!e)return i.dom.getBoundingClientRect();let t=Lo(e);return t[t.length-1]||null}function CL(i,e){let t=i.coordsIn(0,1),n=e.coordsIn(0,1);return t&&n&&n.top<t.bottom}class hi extends jh{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let n=new hi(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class Xr extends Qt{constructor(e,t){super(e,t.length),this.text=t}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,t){let n=this.dom.nodeValue.length;e>n&&(e=n);let s=e,l=e,o=0;e==0&&t<0||e==n&&t>=0?ae.chrome||ae.gecko||(e?(s--,o=1):l<n&&(l++,o=-1)):t<0?s--:l<n&&l++;let c=tc(this.dom,s,l).getClientRects();if(!c.length)return null;let f=c[(o?o<0:t>=0)?0:c.length-1];return ae.safari&&!o&&f.width==0&&(f=Array.prototype.find.call(c,d=>d.width)||f),o?ec(f,o<0):f||null}static of(e,t){let n=new Xr(t||document.createTextNode(e),e);return t||(n.flags|=2),n}}class Yr extends Qt{constructor(e,t,n,s){super(e,t,s),this.widget=n}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,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let s=this.widget.coordsAt(this.dom,e,t);if(s)return s;if(n)return ec(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let l=this.dom.getClientRects(),o=null;if(!l.length)return null;let c=this.flags&16?!0:this.flags&32?!1:e>0;for(let f=c?l.length-1:0;o=l[f],!(e>0?f==0:f==l.length-1||o.top<o.bottom);f+=c?-1:1);return ec(o,!c)}}get overrideDOMText(){if(!this.length)return je.empty;let{root:e}=this;if(!e)return je.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,n,s,l){return l||(l=e.toDOM(t),e.editable||(l.contentEditable="false")),new Yr(l,n,e,s)}}class oh extends Qt{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return je.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class AL{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:s,index:l,beforeBreak:o,parents:c}=this;for(;e||t>0;)if(s.isComposite())if(o){if(!e)break;n&&n.break(),e--,o=!1}else if(l==s.children.length){if(!e&&!c.length)break;n&&n.leave(s),o=!!s.breakAfter,{tile:s,index:l}=c.pop(),l++}else{let f=s.children[l],d=f.breakAfter;(t>0?f.length<=e:f.length<e)&&(!n||n.skip(f,0,f.length)!==!1||!f.isComposite)?(o=!!d,l++,e-=f.length):(c.push({tile:s,index:l}),s=f,l=0,n&&f.isComposite()&&n.enter(f))}else if(l==s.length)o=!!s.breakAfter,{tile:s,index:l}=c.pop(),l++;else if(e){let f=Math.min(e,s.length-l);n&&n.skip(s,l,l+f),e-=f,l+=f}else break;return this.tile=s,this.index=l,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class PL{constructor(e,t,n,s){this.from=e,this.to=t,this.wrapper=n,this.rank=s}}class $L{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,s){var l;this.flushBuffer();let o=this.ensureMarks(t,n),c=o.lastChild;if(c&&c.isText()&&!(c.flags&8)&&c.length+e.length<512){this.cache.reused.set(c,2);let f=o.children[o.children.length-1]=new Xr(c.dom,c.text+e);f.parent=o}else o.append(s||Xr.of(e,(l=this.cache.find(Xr))===null||l===void 0?void 0:l.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?qm(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let s=n;for(let c=t.marks.length-1;c>=0;c--){let f=t.marks[c],d=s.lastChild;if(d instanceof hi&&d.mark.eq(f.mark))d.dom!=f.dom&&d.setDOM(qm(f.dom)),s=d;else{if(this.cache.reused.get(f)){let m=Qt.get(f.dom);m&&m.setDOM(qm(f.dom))}let p=hi.of(f.mark,f.dom);s.append(p),s=p}this.cache.reused.set(f,2)}let l=Qt.get(e.text);l&&this.cache.reused.set(l,2);let o=new Xr(e.text,e.text.nodeValue);o.flags|=8,s.append(o)}addInlineWidget(e,t,n){let s=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);s||this.flushBuffer();let l=this.ensureMarks(t,n);!s&&!(e.flags&16)&&l.append(this.getBuffer(1)),l.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).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 t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=q2);let s=ta.start(e,t||((n=this.cache.find(ta))===null||n===void 0?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=s)}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,t){var n;let s=this.curLine;for(let l=e.length-1;l>=0;l--){let o=e[l],c;if(t>0&&(c=s.lastChild)&&c instanceof hi&&c.mark.eq(o))s=c,t--;else{let f=hi.of(o,(n=this.cache.find(hi,d=>d.mark.eq(o)))===null||n===void 0?void 0:n.dom);s.append(f),s=f,t=0}}return s}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Ew(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(ae.ios&&Ew(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(Um,0,32)||new Yr(Um.toDOM(),0,Um,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 t=new PL(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let s=t.lastChild;if(n.from<this.pos&&s instanceof ls&&s.wrapper.eq(n.wrapper))t=s;else{let l=ls.of(n.wrapper,(e=this.cache.find(ls,o=>o.wrapper.eq(n.wrapper)))===null||e===void 0?void 0:e.dom);t.append(l),t=l}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(oh,void 0,1);return n&&(n.flags=t),n||new oh(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class ML{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:s,lineBreak:l,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=s;let c=this.textOff=Math.min(e,s.length);return l?null:s.slice(0,c)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}}const ch=[Yr,ta,Xr,hi,oh,ls,Bh];for(let i=0;i<ch.length;i++)ch[i].bucket=i;class EL{constructor(e){this.view=e,this.buckets=ch.map(()=>[]),this.index=ch.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let s=e.bucket,l=this.buckets[s],o=this.index[s];for(let c=l.length-1;c>=0;c--){let f=(c+o)%l.length,d=l[f];if((!t||t(d))&&!this.reused.has(d))return l.splice(f,1),f<o&&this.index[s]--,this.reused.set(d,n),d}return null}findWidget(e,t,n){let s=this.buckets[0];if(s.length)for(let l=0,o=0;;l++){if(l==s.length){if(o)return null;o=1,l=0}let c=s[l];if(!this.reused.has(c)&&(o==0?c.widget.compare(e):c.widget.constructor==e.constructor&&e.updateDOM(c.dom,this.view)))return s.splice(l,1),l<this.index[0]&&this.index[0]--,c.widget==e&&c.length==t&&(c.flags&497)==n?(this.reused.set(c,1),c):(this.reused.set(c,2),new Yr(c.dom,t,e,c.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class RL{constructor(e,t,n,s,l){this.view=e,this.decorations=s,this.disallowBlockEffectsFor=l,this.openWidget=!1,this.openMarks=0,this.cache=new EL(e),this.text=new ML(e.state.doc),this.builder=new $L(this.cache,new Bh(e,e.contentDOM),De.iter(n)),this.cache.reused.set(t,2),this.old=new AL(t),this.reuseWalker={skip:(o,c,f)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let s=0,l=0,o=0;;){let c=o<e.length?e[o++]:null,f=c?c.fromA:this.old.root.length;if(f>s){let d=f-s;this.preserve(d,!o,!c),s=f,l+=d}if(!c)break;t&&c.fromA<=t.range.fromA&&c.toA>=t.range.toA?(this.forward(c.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(l,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,c.toA),this.emit(t.range.toB,c.toB)):(this.forward(c.fromA,c.toA),this.emit(l,c.toB)),l=c.toB,s=c.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let s=ZL(this.old),l=this.openMarks;this.old.advance(e,n?1:-1,{skip:(o,c,f)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(f-c);else{let d=f>0||c<o.length?Yr.of(o.widget,this.view,f-c,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);d.flags&256?(d.flags&=-2,this.builder.addBlockWidget(d)):(this.builder.ensureLine(null),this.builder.addInlineWidget(d,s,l),l=s.length)}else if(o.isText())this.builder.ensureLine(null),!c&&f==o.length?this.builder.addText(o.text,s,l,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(c,f),s,l)),l=s.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof oh)this.cache.add(o);else if(o instanceof hi)this.builder.ensureLine(null),this.builder.addMark(o,s,l),this.cache.reused.set(o,1),l=s.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof hi&&s.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?s.length&&(s.length=l=0):o instanceof hi&&(s.shift(),l=Math.min(l,s.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,s=this.builder,l=0,o=De.spans(this.decorations,e,t,{point:(c,f,d,p,m,y)=>{if(d instanceof Br){if(this.disallowBlockEffectsFor[y]){if(d.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(l=p.length,m>p.length)s.continueWidget(f-c);else{let b=d.widget||(d.block?ia.block:ia.inline),S=zL(d),v=this.cache.findWidget(b,f-c,S)||Yr.of(b,this.view,f-c,S);d.block?(d.startSide>0&&s.addLineStartIfNotCovered(n),s.addBlockWidget(v)):(s.ensureLine(n),s.addInlineWidget(v,p,m))}n=null}else n=DL(n,d);f>c&&this.text.skip(f-c)},span:(c,f,d,p)=>{for(let m=c;m<f;){let y=this.text.next(Math.min(512,f-m));y==null?(s.addLineStartIfNotCovered(n),s.addBreak(),m++):(s.ensureLine(n),s.addText(y,d,m==c?p:d.length),m+=y.length),n=null}}});s.addLineStartIfNotCovered(n),this.openWidget=o>l,this.openMarks=o}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let s=e.parentNode;;s=s.parentNode){let l=Qt.get(s);if(s==this.view.contentDOM)break;l instanceof hi?t.push(l):l!=null&&l.isLine()?n=l:l instanceof ls||(s.nodeName=="DIV"&&!n&&s!=this.view.contentDOM?n=new ta(s,q2):n||t.push(hi.of(new kc({tagName:s.nodeName.toLowerCase(),attributes:aL(s)}),s)))}return{line:n,marks:t}}}function Ew(i,e){let t=n=>{for(let s of n.children)if((e?s.isText():s.length)||t(s))return!0;return!1};return t(i)}function zL(i){let e=i.isReplace?(i.startSide<0?64:0)|(i.endSide>0?128:0):i.startSide>0?32:16;return i.block&&(e|=256),e}const q2={class:"cm-line"};function DL(i,e){let t=e.spec.attributes,n=e.spec.class;return!t&&!n||(i||(i={class:"cm-line"}),t&&B0(t,i),n&&(i.class+=" "+n)),i}function ZL(i){let e=[];for(let t=i.parents.length;t>1;t--){let n=t==i.parents.length?i.tile:i.parents[t].tile;n instanceof hi&&e.push(n.mark)}return e}function qm(i){let e=Qt.get(i);return e&&e.setDOM(i.cloneNode()),i}class ia extends hn{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}}ia.inline=new ia("span");ia.block=new ia("div");const Um=new class extends hn{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Rw{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=be.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 Bh(e,e.contentDOM),this.updateInner([new qi(0,0,0,e.state.doc.length)],null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.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 s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!qL(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let l=s>-1?LL(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){let{from:p,to:m}=this.hasComposition;n=new qi(p,m,e.changes.mapPos(p,-1),e.changes.mapPos(m,1)).addToSet(n.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(ae.ie||ae.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,c=this.blockWrappers;this.updateDeco();let f=jL(o,this.decorations,e.changes);f.length&&(n=qi.extendWithRanges(n,f));let d=NL(c,this.blockWrappers,e.changes);return d.length&&(n=qi.extendWithRanges(n,d)),l&&!n.some(p=>p.fromA<=l.range.fromA&&p.toA>=l.range.toA)&&(n=l.range.addToSet(n.slice())),this.tile.flags&2&&n.length==0?!1:(this.updateInner(n,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let o=this.tile,c=new RL(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=c.run(e,t),Tg(o,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 l=ae.chrome||ae.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(l),l&&(l.written||n.selectionRange.focusNode!=l.node||!this.tile.dom.contains(l.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let l of this.tile.children)l.isWidget()&&l.widget instanceof Gm&&s.push(l.dom);n.updateGaps(s)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(_2)&&(this.editContextFormatting=n.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,s=this.view.root.activeElement,l=s==n,o=!l&&!(this.view.state.facet(rs)||n.tabIndex>-1)&&Xo(n,this.view.observer.selectionRange)&&!(s&&n.contains(s));if(!(l||t||o))return;let c=this.forceSelection;this.forceSelection=!1;let f=this.view.state.selection.main,d,p;if(f.empty?p=d=this.inlineDOMNearPos(f.anchor,f.assoc||1):(p=this.inlineDOMNearPos(f.head,f.head==f.from?1:-1),d=this.inlineDOMNearPos(f.anchor,f.anchor==f.from?1:-1)),ae.gecko&&f.empty&&!this.hasComposition&&XL(d)){let y=document.createTextNode("");this.view.observer.ignore(()=>d.node.insertBefore(y,d.node.childNodes[d.offset]||null)),d=p=new an(y,0),c=!0}let m=this.view.observer.selectionRange;(c||!m.focusNode||(!Vo(d.node,d.offset,m.anchorNode,m.anchorOffset)||!Vo(p.node,p.offset,m.focusNode,m.focusOffset))&&!this.suppressWidgetCursorChange(m,f))&&(this.view.observer.ignore(()=>{ae.android&&ae.chrome&&n.contains(m.focusNode)&&YL(m.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let y=Jo(this.view.root);if(y)if(f.empty){if(ae.gecko){let b=VL(d.node,d.offset);if(b&&b!=3){let S=(b==1?Q2:k2)(d.node,d.offset);S&&(d=new an(S.node,S.offset))}}y.collapse(d.node,d.offset),f.bidiLevel!=null&&y.caretBidiLevel!==void 0&&(y.caretBidiLevel=f.bidiLevel)}else if(y.extend){y.collapse(d.node,d.offset);try{y.extend(p.node,p.offset)}catch{}}else{let b=document.createRange();f.anchor>f.head&&([d,p]=[p,d]),b.setEnd(p.node,p.offset),b.setStart(d.node,d.offset),y.removeAllRanges(),y.addRange(b)}o&&this.view.root.activeElement==n&&(n.blur(),s&&s.focus())}),this.view.observer.setSelectionRange(d,p)),this.impreciseAnchor=d.precise?null:new an(m.anchorNode,m.anchorOffset),this.impreciseHead=p.precise?null:new an(m.focusNode,m.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Vo(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Jo(e.root),{anchorNode:s,anchorOffset:l}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let c=o.posAtStart;if(t.head==c||t.head==c+o.length)return;let f=this.coordsAt(t.head,-1),d=this.coordsAt(t.head,1);if(!f||!d||f.bottom>d.top)return;let p=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(p.node,p.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let m=e.observer.selectionRange;e.docView.posFromDOM(m.anchorNode,m.anchorOffset)!=t.from&&n.collapse(s,l)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let s=n.posAtStart;if(n.isComposite()){let l;if(e==n.dom)l=n.dom.childNodes[t];else{let o=us(e)==0?0:t==0?-1:1;for(;;){let c=e.parentNode;if(c==n.dom)break;o==0&&c.firstChild!=c.lastChild&&(e==c.firstChild?o=-1:o=1),e=c}o<0?l=e:l=e.nextSibling}if(l==n.dom.firstChild)return s;for(;l&&!Qt.get(l);)l=l.nextSibling;if(!l)return s+n.length;for(let o=0,c=s;;o++){let f=n.children[o];if(f.dom==l)return c;c+=f.length+f.breakAfter}}else return n.isText()?e==n.dom?s+t:s+(t?n.length:0):s}domAtPos(e,t){let{tile:n,offset:s}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(s,t)}inlineDOMNearPos(e,t){let n,s=-1,l=!1,o,c=-1,f=!1;return this.tile.blockTiles((d,p)=>{if(d.isWidget()){if(d.flags&32&&p>=e)return!0;d.flags&16&&(l=!0)}else{let m=p+d.length;if(p<=e&&(n=d,s=e-p,l=m<e),m>=e&&!o&&(o=d,c=e-p,f=p>e),p>e&&o)return!0}}),!n&&!o?this.domAtPos(e,t):(l&&o?n=null:f&&n&&(o=null),n&&t<0||!o?n.domIn(s,t):o.domIn(c,t))}coordsAt(e,t){let{tile:n,offset:s}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof Gm?null:n.coordsInWidget(s,t,!0):n.coordsIn(s,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function s(l,o){if(l.isComposite())for(let c of l.children){if(c.length>=o){let f=s(c,o);if(f)return f}if(o-=c.length,o<0)break}else if(l.isText()&&o<l.length){let c=zt(l.text,o);if(c==o)return null;let f=tc(l.dom,o,c).getClientRects();for(let d=0;d<f.length;d++){let p=f[d];if(d==f.length-1||p.top<p.bottom&&p.left<p.right)return p}}return null}return s(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:s}=e,l=this.view.contentDOM.clientWidth,o=l>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,f=this.view.textDirection==tt.LTR,d=0,p=(m,y,b)=>{for(let S=0;S<m.children.length&&!(y>s);S++){let v=m.children[S],w=y+v.length,k=v.dom.getBoundingClientRect(),{height:A}=k;if(b&&!S&&(d+=k.top-b.top),v instanceof ls)w>n&&p(v,y,k);else if(y>=n&&(d>0&&t.push(-d),t.push(A+d),d=0,o)){let P=v.dom.lastChild,V=P?Lo(P):[];if(V.length){let R=V[V.length-1],N=f?R.right-k.left:k.right-R.left;N>c&&(c=N,this.minWidth=l,this.minWidthFrom=y,this.minWidthTo=w)}}b&&S==m.children.length-1&&(d+=b.bottom-k.bottom),y=w+v.breakAfter}};return p(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?tt.RTL:tt.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let c=0,f;for(let d of o.children){if(!d.isText()||/[^ -~]/.test(d.text))return;let p=Lo(d.dom);if(p.length!=1)return;c+=p[0].width,f=p[0].height}if(c)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:c/o.length,textHeight:f}}});if(e)return e;let t=document.createElement("div"),n,s,l;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let o=Lo(t.firstChild)[0];n=t.getBoundingClientRect().height,s=o&&o.width?o.width/27:7,l=o&&o.height?o.height:n,t.remove()}),{lineHeight:n,charWidth:s,textHeight:l}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,s=0;;s++){let l=s==t.viewports.length?null:t.viewports[s],o=l?l.from-1:this.view.state.doc.length;if(o>n){let c=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(be.replace({widget:new Gm(c),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!l)break;n=l.to+1}return be.set(e)}updateDeco(){let e=1,t=this.view.state.facet(_h).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),n=!1,s=this.view.state.facet(W0).map((l,o)=>{let c=typeof l=="function";return c&&(n=!0),c?l(this.view):l});for(s.length&&(this.dynamicDecorationMap[e++]=n,t.push(De.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(B2).map(l=>typeof l=="function"?l(this.view):l)}scrollIntoView(e){if(e.isSnapshot){let d=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=d.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let d of this.view.state.facet(V2))try{if(d(this.view,e.range,e))return!0}catch(p){di(this.view.state,p,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),s;if(!n)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,s.left),top:Math.min(n.top,s.top),right:Math.max(n.right,s.right),bottom:Math.max(n.bottom,s.bottom)});let l=H0(this.view),o={left:n.left-l.left,top:n.top-l.top,right:n.right+l.right,bottom:n.bottom+l.bottom},{offsetWidth:c,offsetHeight:f}=this.view.scrollDOM;if(uL(this.view.scrollDOM,o,t.head<t.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==tt.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let d=this.view.docView.lineAt(t.head,1);d&&d.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=n=>n.isWidget()||n.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Tg(this.tile)}}function Tg(i,e){let t=e==null?void 0:e.get(i);if(t!=1){t==null&&i.destroy();for(let n of i.children)Tg(n,e)}}function XL(i){return i.node.nodeType==1&&i.node.firstChild&&(i.offset==0||i.node.childNodes[i.offset-1].contentEditable=="false")&&(i.offset==i.node.childNodes.length||i.node.childNodes[i.offset].contentEditable=="false")}function U2(i,e){let t=i.observer.selectionRange;if(!t.focusNode)return null;let n=Q2(t.focusNode,t.focusOffset),s=k2(t.focusNode,t.focusOffset),l=n||s;if(s&&n&&s.node!=n.node){let c=Qt.get(s.node);if(!c||c.isText()&&c.text!=s.node.nodeValue)l=s;else if(i.docView.lastCompositionAfterCursor){let f=Qt.get(n.node);!f||f.isText()&&f.text!=n.node.nodeValue||(l=s)}}if(i.docView.lastCompositionAfterCursor=l!=n,!l)return null;let o=e-l.offset;return{from:o,to:o+l.node.nodeValue.length,node:l.node}}function LL(i,e,t){let n=U2(i,t);if(!n)return null;let{node:s,from:l,to:o}=n,c=s.nodeValue;if(/[\n\r]/.test(c)||i.state.doc.sliceString(n.from,n.to)!=c)return null;let f=e.invertedDesc;return{range:new qi(f.mapPos(l),f.mapPos(o),l,o),text:s}}function VL(i,e){return i.nodeType!=1?0:(e&&i.childNodes[e-1].contentEditable=="false"?1:0)|(e<i.childNodes.length&&i.childNodes[e].contentEditable=="false"?2:0)}let _L=class{constructor(){this.changes=[]}compareRange(e,t){Ul(e,t,this.changes)}comparePoint(e,t){Ul(e,t,this.changes)}boundChange(e){Ul(e,e,this.changes)}};function jL(i,e,t){let n=new _L;return De.compare(i,e,t,n),n.changes}class BL{constructor(){this.changes=[]}compareRange(e,t){Ul(e,t,this.changes)}comparePoint(){}boundChange(e){Ul(e,e,this.changes)}}function NL(i,e,t){let n=new BL;return De.compare(i,e,t,n),n.changes}function YL(i,e){for(let t=i;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function qL(i,e){let t=!1;return e&&i.iterChangedRanges((n,s)=>{n<e.to&&s>e.from&&(t=!0)}),t}class Gm extends hn{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 UL(i,e,t=1){let n=i.charCategorizer(e),s=i.doc.lineAt(e),l=e-s.from;if(s.length==0)return G.cursor(e);l==0?t=1:l==s.length&&(t=-1);let o=l,c=l;t<0?o=zt(s.text,l,!1):c=zt(s.text,l);let f=n(s.text.slice(o,c));for(;o>0;){let d=zt(s.text,o,!1);if(n(s.text.slice(d,o))!=f)break;o=d}for(;c<s.length;){let d=zt(s.text,c);if(n(s.text.slice(c,d))!=f)break;c=d}return G.range(o+s.from,c+s.from)}function GL(i,e,t,n,s){let l=Math.round((n-e.left)*i.defaultCharacterWidth);if(i.lineWrapping&&t.height>i.defaultLineHeight*1.5){let c=i.viewState.heightOracle.textHeight,f=Math.floor((s-t.top-(i.defaultLineHeight-c)*.5)/c);l+=f*i.viewState.heightOracle.lineLength}let o=i.state.sliceDoc(t.from,t.to);return t.from+pg(o,l,i.state.tabSize)}function Cg(i,e,t){let n=i.lineBlockAt(e);if(Array.isArray(n.type)){let s;for(let l of n.type){if(l.from>e)break;if(!(l.to<e)){if(l.from<e&&l.to>e)return l;(!s||l.type==qt.Text&&(s.type!=l.type||(t<0?l.from<e:l.to>e)))&&(s=l)}}return s||n}return n}function WL(i,e,t,n){let s=Cg(i,e.head,e.assoc||-1),l=!n||s.type!=qt.Text||!(i.lineWrapping||s.widgetLineBreaks)?null:i.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(l){let o=i.dom.getBoundingClientRect(),c=i.textDirectionAt(s.from),f=i.posAtCoords({x:t==(c==tt.LTR)?o.right-1:o.left+1,y:(l.top+l.bottom)/2});if(f!=null)return G.cursor(f,t?-1:1)}return G.cursor(t?s.to:s.from,t?-1:1)}function zw(i,e,t,n){let s=i.state.doc.lineAt(e.head),l=i.bidiSpans(s),o=i.textDirectionAt(s.from);for(let c=e,f=null;;){let d=vL(s,l,o,c,t),p=$2;if(!d){if(s.number==(t?i.state.doc.lines:1))return c;p=`
|
|
57
|
-
`,s=i.state.doc.line(s.number+(t?1:-1)),l=i.bidiSpans(s),d=i.visualLineSide(s,!t)}if(f){if(!f(p))return c}else{if(!n)return d;f=n(p)}c=d}}function HL(i,e,t){let n=i.state.charCategorizer(e),s=n(t);return l=>{let o=n(l);return s==ct.Space&&(s=o),s==o}}function IL(i,e,t,n){let s=e.head,l=t?1:-1;if(s==(t?i.state.doc.length:0))return G.cursor(s,e.assoc);let o=e.goalColumn,c,f=i.contentDOM.getBoundingClientRect(),d=i.coordsAtPos(s,(e.empty?e.assoc:0)||(t?1:-1)),p=i.documentTop;if(d)o==null&&(o=d.left-f.left),c=l<0?d.top:d.bottom;else{let S=i.viewState.lineBlockAt(s);o==null&&(o=Math.min(f.right-f.left,i.defaultCharacterWidth*(s-S.from))),c=(l<0?S.top:S.bottom)+p}let m=f.left+o,y=n??i.viewState.heightOracle.textHeight>>1,b=Ag(i,{x:m,y:c+y*l},!1,l);return G.cursor(b.pos,b.assoc,void 0,o)}function _o(i,e,t){for(;;){let n=0;for(let s of i)s.between(e-1,e+1,(l,o,c)=>{if(e>l&&e<o){let f=n||t||(e-l<o-e?-1:1);e=f<0?l:o,n=f}});if(!n)return e}}function G2(i,e){let t=null;for(let n=0;n<e.ranges.length;n++){let s=e.ranges[n],l=null;if(s.empty){let o=_o(i,s.from,0);o!=s.from&&(l=G.cursor(o,-1))}else{let o=_o(i,s.from,-1),c=_o(i,s.to,1);(o!=s.from||c!=s.to)&&(l=G.range(s.from==s.anchor?o:c,s.from==s.head?o:c))}l&&(t||(t=e.ranges.slice()),t[n]=l)}return t?G.create(t,e.mainIndex):e}function Wm(i,e,t){let n=_o(i.state.facet(Cc).map(s=>s(i)),t.from,e.head>t.from?-1:1);return n==t.from?t:G.cursor(n,n<t.from?1:-1)}class Tn{constructor(e,t){this.pos=e,this.assoc=t}}function Ag(i,e,t,n){let s=i.contentDOM.getBoundingClientRect(),l=s.top+i.viewState.paddingTop,{x:o,y:c}=e,f=c-l,d;for(;;){if(f<0)return new Tn(0,1);if(f>i.viewState.docHeight)return new Tn(i.state.doc.length,-1);if(d=i.elementAtHeight(f),n==null)break;if(d.type==qt.Text){if(n<0?d.to<i.viewport.from:d.from>i.viewport.to)break;let y=i.docView.coordsAt(n<0?d.from:d.to,n>0?-1:1);if(y&&(n<0?y.top<=f+l:y.bottom>=f+l))break}let m=i.viewState.heightOracle.textHeight/2;f=n>0?d.bottom+m:d.top-m}if(i.viewport.from>=d.to||i.viewport.to<=d.from){if(t)return null;if(d.type==qt.Text){let m=GL(i,s,d,o,c);return new Tn(m,m==d.from?1:-1)}}if(d.type!=qt.Text)return f<(d.top+d.bottom)/2?new Tn(d.from,1):new Tn(d.to,-1);let p=i.docView.lineAt(d.from,2);return(!p||p.length!=d.length)&&(p=i.docView.lineAt(d.from,-2)),new FL(i,o,c,i.textDirectionAt(d.from)).scanTile(p,d.from)}class FL{constructor(e,t,n,s){this.view=e,this.x=t,this.y=n,this.baseDir=s,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:s}=this.bidiSpansAt(e);return s[Cn.find(s,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:s}=this.bidiSpansAt(e);return s[Cn.find(s,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:s}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+s.from<t)}scan(e,t){let n=0,s=e.length-1,l=new Set,o=this.bidiIn(e[0],e[s]),c,f,d=-1,p=1e9,m;e:for(;n<s;){let b=s-n,S=n+s>>1;t:if(l.has(S)){let w=n+Math.floor(Math.random()*b);for(let k=0;k<b;k++){if(!l.has(w)){S=w;break t}w++,w==s&&(w=n)}break e}l.add(S);let v=t(S);if(v)for(let w=0;w<v.length;w++){let k=v[w],A=0;if(k.bottom<this.y)(!c||c.bottom<k.bottom)&&(c=k),A=1;else if(k.top>this.y)(!f||f.top>k.top)&&(f=k),A=-1;else{let P=k.left>this.x?this.x-k.left:k.right<this.x?this.x-k.right:0,V=Math.abs(P);V<p&&(d=S,p=V,m=k),P&&(A=P<0==(this.baseDir==tt.LTR)?-1:1)}A==-1&&(!o||this.baseDirAt(e[S],1))?s=S:A==1&&(!o||this.baseDirAt(e[S+1],-1))&&(n=S+1)}}if(!m){let b=c&&(!f||this.y-c.bottom<f.top-this.y)?c:f;return this.y=(b.top+b.bottom)/2,this.scan(e,t)}let y=(o?this.dirAt(e[d],1):this.baseDir)==tt.LTR;return{i:d,after:this.x>(m.left+m.right)/2==y}}scanText(e,t){let n=[];for(let l=0;l<e.length;l=zt(e.text,l))n.push(t+l);n.push(t+e.length);let s=this.scan(n,l=>{let o=n[l]-t,c=n[l+1]-t;return tc(e.dom,o,c).getClientRects()});return s.after?new Tn(n[s.i+1],-1):new Tn(n[s.i],1)}scanTile(e,t){if(!e.length)return new Tn(t,1);if(e.children.length==1){let c=e.children[0];if(c.isText())return this.scanText(c,t);if(c.isComposite())return this.scanTile(c,t)}let n=[t];for(let c=0,f=t;c<e.children.length;c++)n.push(f+=e.children[c].length);let s=this.scan(n,c=>{let f=e.children[c];return f.flags&48?null:(f.dom.nodeType==1?f.dom:tc(f.dom,0,f.length)).getClientRects()}),l=e.children[s.i],o=n[s.i];return l.isText()?this.scanText(l,o):l.isComposite()?this.scanTile(l,o):s.after?new Tn(n[s.i+1],-1):new Tn(o,1)}}const Co="";class KL{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Le.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Co}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let s=e;;){this.findPointBefore(n,s);let l=this.text.length;this.readNode(s);let o=Qt.get(s),c=s.nextSibling;if(c==t){o!=null&&o.breakAfter&&!c&&n!=this.view.contentDOM&&this.lineBreak();break}let f=Qt.get(c);(o&&f?o.breakAfter:(o?o.breakAfter:lh(s))||lh(c)&&(s.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>l)&&!eV(c,t)&&this.lineBreak(),s=c}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,o=1,c;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(c=s.exec(t))&&(l=c.index,o=c[0].length),this.append(t.slice(n,l<0?t.length:l)),l<0)break;if(this.lineBreak(),o>1)for(let f of this.points)f.node==e&&f.pos>this.text.length&&(f.pos-=o-1);n=l+o}}readNode(e){let t=Qt.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let s=n.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.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,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(JL(e,n.node,n.offset)?t:0))}}function JL(i,e,t){for(;;){if(!e||t<us(e))return!1;if(e==i)return!0;t=tr(e)+1,e=e.parentNode}}function eV(i,e){let t;for(;!(i==e||!i);i=i.nextSibling){let n=Qt.get(i);if(!(n!=null&&n.isWidget()))return!1;n&&(t||(t=[])).push(n)}if(t)for(let n of t){let s=n.overrideDOMText;if(s!=null&&s.length)return!1}return!0}class Dw{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class tV{constructor(e,t,n,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=W2(e.docView.tile,t,n,0))){let c=l||o?[]:nV(e),f=new KL(c,e);f.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=f.text,this.newSel=sV(c,this.bounds.from)}else{let c=e.observer.selectionRange,f=l&&l.node==c.focusNode&&l.offset==c.focusOffset||!xg(e.contentDOM,c.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(c.focusNode,c.focusOffset),d=o&&o.node==c.anchorNode&&o.offset==c.anchorOffset||!xg(e.contentDOM,c.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(c.anchorNode,c.anchorOffset),p=e.viewport;if((ae.ios||ae.chrome)&&e.state.selection.main.empty&&f!=d&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(f,d),y=Math.max(f,d),b=p.from-m,S=p.to-y;(b==0||b==1||m==0)&&(S==0||S==-1||y==e.state.doc.length)&&(f=0,d=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(G.range(d,f)):this.newSel=G.single(d,f)}}}function W2(i,e,t,n){if(i.isComposite()){let s=-1,l=-1,o=-1,c=-1;for(let f=0,d=n,p=n;f<i.children.length;f++){let m=i.children[f],y=d+m.length;if(d<e&&y>t)return W2(m,e,t,d);if(y>=e&&s==-1&&(s=f,l=d),d>t&&m.dom.parentNode==i.dom){o=f,c=p;break}p=y,d=y+m.breakAfter}return{from:l,to:c<0?n+i.length:c,startDOM:(s?i.children[s-1].dom.nextSibling:null)||i.dom.firstChild,endDOM:o<i.children.length&&o>=0?i.children[o].dom:null}}else return i.isText()?{from:n,to:n+i.length,startDOM:i.dom,endDOM:i.dom.nextSibling}:null}function H2(i,e){let t,{newSel:n}=e,s=i.state.selection.main,l=i.inputState.lastKeyTime>Date.now()-100?i.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:c}=e.bounds,f=s.from,d=null;(l===8||ae.android&&e.text.length<c-o)&&(f=s.to,d="end");let p=I2(i.state.doc.sliceString(o,c,Co),e.text,f-o,d);p&&(ae.chrome&&l==13&&p.toB==p.from+2&&e.text.slice(p.from,p.toB)==Co+Co&&p.toB--,t={from:o+p.from,to:o+p.toA,insert:je.of(e.text.slice(p.from,p.toB).split(Co))})}else n&&(!i.hasFocus&&i.state.facet(rs)||uh(n,s))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!s.empty&&n&&n.main.empty?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,s.to)}:(ae.mac||ae.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&i.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=G.single(n.main.anchor-1,n.main.head-1)),t={from:t.from,to:t.to,insert:je.of([t.insert.toString().replace("."," ")])}):t&&t.from>=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:i.state.doc.slice(s.from,t.from).append(t.insert).append(i.state.doc.slice(t.to,s.to))}:i.state.doc.lineAt(s.from).to<s.to&&i.docView.lineHasWidget(s.to)&&i.inputState.insertingTextAt>Date.now()-50?t={from:s.from,to:s.to,insert:i.state.toText(i.inputState.insertingText)}:ae.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
|
|
58
|
-
`&&i.lineWrapping&&(n&&(n=G.single(n.main.anchor-1,n.main.head-1)),t={from:s.from,to:s.to,insert:je.of([" "])}),t)return I0(i,t,n,l);if(n&&!uh(n,s)){let o=!1,c="select";return i.inputState.lastSelectionTime>Date.now()-50&&(i.inputState.lastSelectionOrigin=="select"&&(o=!0),c=i.inputState.lastSelectionOrigin,c=="select.pointer"&&(n=G2(i.state.facet(Cc).map(f=>f(i)),n))),i.dispatch({selection:n,scrollIntoView:o,userEvent:c}),!0}else return!1}function I0(i,e,t,n=-1){if(ae.ios&&i.inputState.flushIOSKey(e))return!0;let s=i.state.selection.main;if(ae.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&i.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Gl(i.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&Gl(i.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Gl(i.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();i.inputState.composing>=0&&i.inputState.composing++;let o,c=()=>o||(o=iV(i,e,t));return i.state.facet(D2).some(f=>f(i,e.from,e.to,l,c))||i.dispatch(c()),!0}function iV(i,e,t){let n,s=i.state,l=s.selection.main,o=-1;if(e.from==e.to&&e.from<l.from||e.from>l.to){let f=e.from<l.from?-1:1,d=f<0?l.from:l.to,p=_o(s.facet(Cc).map(m=>m(i)),d,f);e.from==p&&(o=p)}if(o>-1)n={changes:e,selection:G.cursor(e.from+e.insert.length,-1)};else if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&i.inputState.composing<0){let f=l.from<e.from?s.sliceDoc(l.from,e.from):"",d=l.to>e.to?s.sliceDoc(e.to,l.to):"";n=s.replaceSelection(i.state.toText(f+e.insert.sliceString(0,void 0,i.state.lineBreak)+d))}else{let f=s.changes(e),d=t&&t.main.to<=f.newLength?t.main:void 0;if(s.selection.ranges.length>1&&(i.inputState.composing>=0||i.inputState.compositionPendingChange)&&e.to<=l.to+10&&e.to>=l.to-10){let p=i.state.sliceDoc(e.from,e.to),m,y=t&&U2(i,t.main.head);if(y){let S=e.insert.length-(e.to-e.from);m={from:y.from,to:y.to-S}}else m=i.state.doc.lineAt(l.head);let b=l.to-e.to;n=s.changeByRange(S=>{if(S.from==l.from&&S.to==l.to)return{changes:f,range:d||S.map(f)};let v=S.to-b,w=v-p.length;if(i.state.sliceDoc(w,v)!=p||v>=m.from&&w<=m.to)return{range:S};let k=s.changes({from:w,to:v,insert:e.insert}),A=S.to-l.to;return{changes:k,range:d?G.range(Math.max(0,d.anchor+A),Math.max(0,d.head+A)):S.map(k)}})}else n={changes:f,selection:d&&s.selection.replaceRange(d)}}let c="input.type";return(i.composing||i.inputState.compositionPendingChange&&i.inputState.compositionEndedAt>Date.now()-50)&&(i.inputState.compositionPendingChange=!1,c+=".compose",i.inputState.compositionFirstChange&&(c+=".start",i.inputState.compositionFirstChange=!1)),s.update(n,{userEvent:c,scrollIntoView:!0})}function I2(i,e,t,n){let s=Math.min(i.length,e.length),l=0;for(;l<s&&i.charCodeAt(l)==e.charCodeAt(l);)l++;if(l==s&&i.length==e.length)return null;let o=i.length,c=e.length;for(;o>0&&c>0&&i.charCodeAt(o-1)==e.charCodeAt(c-1);)o--,c--;if(n=="end"){let f=Math.max(0,l-Math.min(o,c));t-=o+f-l}if(o<l&&i.length<e.length){let f=t<=l&&t>=o?l-t:0;l-=f,c=l+(c-o),o=l}else if(c<l){let f=t<=l&&t>=c?l-t:0;l-=f,o=l+(o-c),c=l}return{from:l,toA:o,toB:c}}function nV(i){let e=[];if(i.root.activeElement!=i.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:l}=i.observer.selectionRange;return t&&(e.push(new Dw(t,n)),(s!=t||l!=n)&&e.push(new Dw(s,l))),e}function sV(i,e){if(i.length==0)return null;let t=i[0].pos,n=i.length==2?i[1].pos:t;return t>-1&&n>-1?G.single(t+e,n+e):null}function uh(i,e){return e.head==i.main.head&&e.anchor==i.main.anchor}class rV{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,ae.safari&&e.contentDOM.addEventListener("input",()=>null),ae.gecko&&SV(e.contentDOM.ownerDocument)}handleEvent(e){!dV(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,t){let n=this.handlers[e];if(n){for(let s of n.observers)s(this.view,t);for(let s of n.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=lV(e),n=this.handlers,s=this.view.contentDOM;for(let l in t)if(l!="scroll"){let o=!t[l].handlers.length,c=n[l];c&&o!=!c.handlers.length&&(s.removeEventListener(l,this.handleEvent),c=null),c||s.addEventListener(l,this.handleEvent,{passive:o})}for(let l in n)l!="scroll"&&!t[l]&&s.removeEventListener(l,this.handleEvent);this.handlers=t}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&&K2.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ae.android&&ae.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return ae.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=F2.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||aV.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Gl(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:ae.safari&&!ae.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 Zw(i,e){return(t,n)=>{try{return e.call(i,n,t)}catch(s){di(t.state,s)}}}function lV(i){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of i){let s=n.spec,l=s&&s.plugin.domEventHandlers,o=s&&s.plugin.domEventObservers;if(l)for(let c in l){let f=l[c];f&&t(c).handlers.push(Zw(n.value,f))}if(o)for(let c in o){let f=o[c];f&&t(c).observers.push(Zw(n.value,f))}}for(let n in fn)t(n).handlers.push(fn[n]);for(let n in Fi)t(n).observers.push(Fi[n]);return e}const F2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],aV="dthko",K2=[16,17,18,20,91,92,224,225],cf=6;function uf(i){return Math.max(0,i)*.7+8}function oV(i,e){return Math.max(Math.abs(i.clientX-e.clientX),Math.abs(i.clientY-e.clientY))}class cV{constructor(e,t,n,s){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=fL(e.contentDOM),this.atoms=e.state.facet(Cc).map(o=>o(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Le.allowMultipleSelections)&&uV(e,t),this.dragging=hV(e,t)&&tA(t)==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&&oV(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,s=0,l=0,o=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:c}=this.scrollParents.y.getBoundingClientRect());let f=H0(this.view);e.clientX-f.left<=s+cf?t=-uf(s-e.clientX):e.clientX+f.right>=o-cf&&(t=uf(e.clientX-o)),e.clientY-f.top<=l+cf?n=-uf(l-e.clientY):e.clientY+f.bottom>=c-cf&&(n=uf(e.clientY-c)),this.setScrollSpeed(t,n)}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,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=G2(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function uV(i,e){let t=i.state.facet(M2);return t.length?t[0](e):ae.mac?e.metaKey:e.ctrlKey}function fV(i,e){let t=i.state.facet(E2);return t.length?t[0](e):ae.mac?!e.altKey:!e.ctrlKey}function hV(i,e){let{main:t}=i.state.selection;if(t.empty)return!1;let n=Jo(i.root);if(!n||n.rangeCount==0)return!0;let s=n.getRangeAt(0).getClientRects();for(let l=0;l<s.length;l++){let o=s[l];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function dV(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=i.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=Qt.get(t))&&n.isWidget()&&!n.isHidden&&n.widget.ignoreEvent(e))return!1;return!0}const fn=Object.create(null),Fi=Object.create(null),J2=ae.ie&&ae.ie_version<15||ae.ios&&ae.webkit_version<604;function pV(i){let e=i.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{i.focus(),t.remove(),eA(i,t.value)},50)}function Nh(i,e,t){for(let n of i.facet(e))t=n(t,i);return t}function eA(i,e){e=Nh(i.state,q0,e);let{state:t}=i,n,s=1,l=t.toText(e),o=l.lines==t.selection.ranges.length;if(Pg!=null&&t.selection.ranges.every(f=>f.empty)&&Pg==l.toString()){let f=-1;n=t.changeByRange(d=>{let p=t.doc.lineAt(d.from);if(p.from==f)return{range:d};f=p.from;let m=t.toText((o?l.line(s++).text:e)+t.lineBreak);return{changes:{from:p.from,insert:m},range:G.cursor(d.from+m.length)}})}else o?n=t.changeByRange(f=>{let d=l.line(s++);return{changes:{from:f.from,to:f.to,insert:d.text},range:G.cursor(f.from+d.length)}}):n=t.replaceSelection(l);i.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}Fi.scroll=i=>{i.inputState.lastScrollTop=i.scrollDOM.scrollTop,i.inputState.lastScrollLeft=i.scrollDOM.scrollLeft};fn.keydown=(i,e)=>(i.inputState.setSelectionOrigin("select"),e.keyCode==27&&i.inputState.tabFocusMode!=0&&(i.inputState.tabFocusMode=Date.now()+2e3),!1);Fi.touchstart=(i,e)=>{i.inputState.lastTouchTime=Date.now(),i.inputState.setSelectionOrigin("select.pointer")};Fi.touchmove=i=>{i.inputState.setSelectionOrigin("select.pointer")};fn.mousedown=(i,e)=>{if(i.observer.flush(),i.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of i.state.facet(R2))if(t=n(i,e),t)break;if(!t&&e.button==0&&(t=OV(i,e)),t){let n=!i.hasFocus;i.inputState.startMouseSelection(new cV(i,e,t,n)),n&&i.observer.ignore(()=>{v2(i.contentDOM);let l=i.root.activeElement;l&&!l.contains(i.contentDOM)&&l.blur()});let s=i.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}else i.inputState.setSelectionOrigin("select.pointer");return!1};function Xw(i,e,t,n){if(n==1)return G.cursor(e,t);if(n==2)return UL(i.state,e,t);{let s=i.docView.lineAt(e,t),l=i.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:l.from,c=s?s.posAtEnd:l.to;return c<i.state.doc.length&&c==l.to&&c++,G.range(o,c)}}const mV=ae.ie&&ae.ie_version<=11;let Lw=null,Vw=0,_w=0;function tA(i){if(!mV)return i.detail;let e=Lw,t=_w;return Lw=i,_w=Date.now(),Vw=!e||t>Date.now()-400&&Math.abs(e.clientX-i.clientX)<2&&Math.abs(e.clientY-i.clientY)<2?(Vw+1)%3:1}function OV(i,e){let t=i.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),n=tA(e),s=i.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),s=s.map(l.changes))},get(l,o,c){let f=i.posAndSideAtCoords({x:l.clientX,y:l.clientY},!1),d,p=Xw(i,f.pos,f.assoc,n);if(t.pos!=f.pos&&!o){let m=Xw(i,t.pos,t.assoc,n),y=Math.min(m.from,p.from),b=Math.max(m.to,p.to);p=y<p.from?G.range(y,b):G.range(b,y)}return o?s.replaceRange(s.main.extend(p.from,p.to)):c&&n==1&&s.ranges.length>1&&(d=gV(s,f.pos))?d:c?s.addRange(p):G.create([p])}}}function gV(i,e){for(let t=0;t<i.ranges.length;t++){let{from:n,to:s}=i.ranges[t];if(n<=e&&s>=e)return G.create(i.ranges.slice(0,t).concat(i.ranges.slice(t+1)),i.mainIndex==t?0:i.mainIndex-(i.mainIndex>t?1:0))}return null}fn.dragstart=(i,e)=>{let{selection:{main:t}}=i.state;if(e.target.draggable){let s=i.docView.tile.nearest(e.target);if(s&&s.isWidget()){let l=s.posAtStart,o=l+s.length;(l>=t.to||o<=t.from)&&(t=G.range(l,o))}}let{inputState:n}=i;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Nh(i.state,U0,i.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};fn.dragend=i=>(i.inputState.draggedContent=null,!1);function jw(i,e,t,n){if(t=Nh(i.state,q0,t),!t)return;let s=i.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=i.inputState,o=n&&l&&fV(i,e)?{from:l.from,to:l.to}:null,c={from:s,insert:t},f=i.state.changes(o?[o,c]:c);i.focus(),i.dispatch({changes:f,selection:{anchor:f.mapPos(s,-1),head:f.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),i.inputState.draggedContent=null}fn.drop=(i,e)=>{if(!e.dataTransfer)return!1;if(i.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),s=0,l=()=>{++s==t.length&&jw(i,e,n.filter(o=>o!=null).join(i.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let c=new FileReader;c.onerror=l,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(n[o]=c.result),l()},c.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return jw(i,e,n,!0),!0}return!1};fn.paste=(i,e)=>{if(i.state.readOnly)return!0;i.observer.flush();let t=J2?null:e.clipboardData;return t?(eA(i,t.getData("text/plain")||t.getData("text/uri-list")),!0):(pV(i),!1)};function yV(i,e){let t=i.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),i.focus()},50)}function bV(i){let e=[],t=[],n=!1;for(let s of i.selection.ranges)s.empty||(e.push(i.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:l}of i.selection.ranges){let o=i.doc.lineAt(l);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(i.doc.length,o.to+1)})),s=o.number}n=!0}return{text:Nh(i,U0,e.join(i.lineBreak)),ranges:t,linewise:n}}let Pg=null;fn.copy=fn.cut=(i,e)=>{if(!Xo(i.contentDOM,i.observer.selectionRange))return!1;let{text:t,ranges:n,linewise:s}=bV(i.state);if(!t&&!s)return!1;Pg=s?t:null,e.type=="cut"&&!i.state.readOnly&&i.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let l=J2?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(yV(i,t),!1)};const iA=Dn.define();function nA(i,e){let t=[];for(let n of i.facet(Z2)){let s=n(i,e);s&&t.push(s)}return t.length?i.update({effects:t,annotations:iA.of(!0)}):null}function sA(i){setTimeout(()=>{let e=i.hasFocus;if(e!=i.inputState.notifiedFocused){let t=nA(i.state,e);t?i.dispatch(t):i.update([])}},10)}Fi.focus=i=>{i.inputState.lastFocusTime=Date.now(),!i.scrollDOM.scrollTop&&(i.inputState.lastScrollTop||i.inputState.lastScrollLeft)&&(i.scrollDOM.scrollTop=i.inputState.lastScrollTop,i.scrollDOM.scrollLeft=i.inputState.lastScrollLeft),sA(i)};Fi.blur=i=>{i.observer.clearSelectionRange(),sA(i)};Fi.compositionstart=Fi.compositionupdate=i=>{i.observer.editContext||(i.inputState.compositionFirstChange==null&&(i.inputState.compositionFirstChange=!0),i.inputState.composing<0&&(i.inputState.composing=0))};Fi.compositionend=i=>{i.observer.editContext||(i.inputState.composing=-1,i.inputState.compositionEndedAt=Date.now(),i.inputState.compositionPendingKey=!0,i.inputState.compositionPendingChange=i.observer.pendingRecords().length>0,i.inputState.compositionFirstChange=null,ae.chrome&&ae.android?i.observer.flushSoon():i.inputState.compositionPendingChange?Promise.resolve().then(()=>i.observer.flush()):setTimeout(()=>{i.inputState.composing<0&&i.docView.hasComposition&&i.update([])},50))};Fi.contextmenu=i=>{i.inputState.lastContextMenu=Date.now()};fn.beforeinput=(i,e)=>{var t,n;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(i.inputState.insertingText=e.data,i.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&i.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(l&&o.length){let c=o[0],f=i.posAtDOM(c.startContainer,c.startOffset),d=i.posAtDOM(c.endContainer,c.endOffset);return I0(i,{from:f,to:d,insert:i.state.toText(l)},null),!0}}let s;if(ae.chrome&&ae.android&&(s=F2.find(l=>l.inputType==e.inputType))&&(i.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let l=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>l+10&&i.hasFocus&&(i.contentDOM.blur(),i.focus())},100)}return ae.ios&&e.inputType=="deleteContentForward"&&i.observer.flushSoon(),ae.safari&&e.inputType=="insertText"&&i.inputState.composing>=0&&setTimeout(()=>Fi.compositionend(i,e),20),!1};const Bw=new Set;function SV(i){Bw.has(i)||(Bw.add(i),i.addEventListener("copy",()=>{}),i.addEventListener("cut",()=>{}))}const Nw=["pre-wrap","normal","pre-line","break-spaces"];let na=!1;function Yw(){na=!1}class xV{constructor(e){this.lineWrapping=e,this.doc=je.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}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 Nw.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let s=e[n];s<0?n++:this.heightSamples[Math.floor(s*10)]||(t=!0,this.heightSamples[Math.floor(s*10)]=!0)}return t}refresh(e,t,n,s,l,o){let c=Nw.indexOf(e)>-1,f=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=c||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=c,this.lineHeight=t,this.charWidth=n,this.textHeight=s,this.lineLength=l,f){this.heightSamples={};for(let d=0;d<o.length;d++){let p=o[d];p<0?d++:this.heightSamples[Math.floor(p*10)]=!0}}return f}}class vV{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class ln{constructor(e,t,n,s,l){this.from=e,this.length=t,this.top=n,this.height=s,this._content=l}get type(){return typeof this._content=="number"?qt.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 Br?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new ln(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var nt=(function(i){return i[i.ByPos=0]="ByPos",i[i.ByHeight=1]="ByHeight",i[i.ByPosNoHeight=2]="ByPosNoHeight",i})(nt||(nt={}));const Lf=.001;class ti{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}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)>Lf&&(na=!0),this.height=e)}replace(e,t,n){return ti.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,s){let l=this,o=n.doc;for(let c=s.length-1;c>=0;c--){let{fromA:f,toA:d,fromB:p,toB:m}=s[c],y=l.lineAt(f,nt.ByPosNoHeight,n.setDoc(t),0,0),b=y.to>=d?y:l.lineAt(d,nt.ByPosNoHeight,n,0,0);for(m+=b.to-d,d=b.to;c>0&&y.from<=s[c-1].toA;)f=s[c-1].fromA,p=s[c-1].fromB,c--,f<y.from&&(y=l.lineAt(f,nt.ByPosNoHeight,n,0,0));p+=y.from-f,f=y.from;let S=F0.build(n.setDoc(o),e,p,m);l=fh(l,l.replace(f,d,S))}return l.updateHeight(n,0)}static empty(){return new Ai(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,s=0,l=0;for(;;)if(t==n)if(s>l*2){let c=e[t-1];c.break?e.splice(--t,1,c.left,null,c.right):e.splice(--t,1,c.left,c.right),n+=1+c.break,s-=c.size}else if(l>s*2){let c=e[n];c.break?e.splice(n,1,c.left,null,c.right):e.splice(n,1,c.left,c.right),n+=2+c.break,l-=c.size}else break;else if(s<l){let c=e[t++];c&&(s+=c.size)}else{let c=e[--n];c&&(l+=c.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,n++),new QV(ti.of(e.slice(0,t)),o,ti.of(e.slice(n)))}}function fh(i,e){return i==e?i:(i.constructor!=e.constructor&&(na=!0),e)}ti.prototype.size=1;const wV=be.replace({});class rA extends ti{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new ln(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,s){return this.spaceAbove&&e<n+this.spaceAbove?new ln(s,0,n,this.spaceAbove,wV):this.mainBlock(n,s)}lineAt(e,t,n,s,l){let o=this.mainBlock(s,l);return this.spaceAbove?this.blockAt(0,n,s,l).join(o):o}forEachLine(e,t,n,s,l,o){e<=l+this.length&&t>=l&&o(this.lineAt(0,nt.ByPos,n,s,l))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more&&this.setMeasuredHeight(s),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ai extends rA{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new ln(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,n){let s=n[0];return n.length==1&&(s instanceof Ai||s instanceof Bt&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof Bt?s=new Ai(s.length,this.height,this.spaceAbove):s.height=this.height,this.outdated||(s.outdated=!1),s):ti.of(n)}updateHeight(e,t=0,n=!1,s){return s&&s.from<=t&&s.more?this.setMeasuredHeight(s):(n||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 Bt extends ti{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,l=s-n+1,o,c=0;if(e.lineWrapping){let f=Math.min(this.height,e.lineHeight*l);o=f/l,this.length>l+1&&(c=(this.height-f)/(this.length-l-1))}else o=this.height/l;return{firstLine:n,lastLine:s,perLine:o,perChar:c}}blockAt(e,t,n,s){let{firstLine:l,lastLine:o,perLine:c,perChar:f}=this.heightMetrics(t,s);if(t.lineWrapping){let d=s+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),p=t.doc.lineAt(d),m=c+p.length*f,y=Math.max(n,e-m/2);return new ln(p.from,p.length,y,m,0)}else{let d=Math.max(0,Math.min(o-l,Math.floor((e-n)/c))),{from:p,length:m}=t.doc.line(l+d);return new ln(p,m,n+c*d,c,0)}}lineAt(e,t,n,s,l){if(t==nt.ByHeight)return this.blockAt(e,n,s,l);if(t==nt.ByPosNoHeight){let{from:b,to:S}=n.doc.lineAt(e);return new ln(b,S-b,0,0,0)}let{firstLine:o,perLine:c,perChar:f}=this.heightMetrics(n,l),d=n.doc.lineAt(e),p=c+d.length*f,m=d.number-o,y=s+c*m+f*(d.from-l-m);return new ln(d.from,d.length,Math.max(s,Math.min(y,s+this.height-p)),p,0)}forEachLine(e,t,n,s,l,o){e=Math.max(e,l),t=Math.min(t,l+this.length);let{firstLine:c,perLine:f,perChar:d}=this.heightMetrics(n,l);for(let p=e,m=s;p<=t;){let y=n.doc.lineAt(p);if(p==e){let S=y.number-c;m+=f*S+d*(e-l-S)}let b=f+d*y.length;o(new ln(y.from,y.length,m,b,0)),m+=b,p=y.to+1}}replace(e,t,n){let s=this.length-t;if(s>0){let l=n[n.length-1];l instanceof Bt?n[n.length-1]=new Bt(l.length+s):n.push(null,new Bt(s-1))}if(e>0){let l=n[0];l instanceof Bt?n[0]=new Bt(e+l.length):n.unshift(new Bt(e-1),null)}return ti.of(n)}decomposeLeft(e,t){t.push(new Bt(e-1),null)}decomposeRight(e,t){t.push(null,new Bt(this.length-e-1))}updateHeight(e,t=0,n=!1,s){let l=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],c=Math.max(t,s.from),f=-1;for(s.from>t&&o.push(new Bt(s.from-t-1).updateHeight(e,t));c<=l&&s.more;){let p=e.doc.lineAt(c).length;o.length&&o.push(null);let m=s.heights[s.index++],y=0;m<0&&(y=-m,m=s.heights[s.index++]),f==-1?f=m:Math.abs(m-f)>=Lf&&(f=-2);let b=new Ai(p,m,y);b.outdated=!1,o.push(b),c+=p+1}c<=l&&o.push(null,new Bt(l-c).updateHeight(e,c));let d=ti.of(o);return(f<0||Math.abs(d.height-this.height)>=Lf||Math.abs(f-this.heightMetrics(e,t).perLine)>=Lf)&&(na=!0),fh(this,d)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class QV extends ti{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,s){let l=n+this.left.height;return e<l?this.left.blockAt(e,t,n,s):this.right.blockAt(e,t,l,s+this.left.length+this.break)}lineAt(e,t,n,s,l){let o=s+this.left.height,c=l+this.left.length+this.break,f=t==nt.ByHeight?e<o:e<c,d=f?this.left.lineAt(e,t,n,s,l):this.right.lineAt(e,t,n,o,c);if(this.break||(f?d.to<c:d.from>c))return d;let p=t==nt.ByPosNoHeight?nt.ByPosNoHeight:nt.ByPos;return f?d.join(this.right.lineAt(c,p,n,o,c)):this.left.lineAt(c,p,n,s,l).join(d)}forEachLine(e,t,n,s,l,o){let c=s+this.left.height,f=l+this.left.length+this.break;if(this.break)e<f&&this.left.forEachLine(e,t,n,s,l,o),t>=f&&this.right.forEachLine(e,t,n,c,f,o);else{let d=this.lineAt(f,nt.ByPos,n,s,l);e<d.from&&this.left.forEachLine(e,d.from-1,n,s,l,o),d.to>=e&&d.from<=t&&o(d),t>d.to&&this.right.forEachLine(d.to+1,t,n,c,f,o)}}replace(e,t,n){let s=this.left.length+this.break;if(t<s)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,n));let l=[];e>0&&this.decomposeLeft(e,l);let o=l.length;for(let c of n)l.push(c);if(e>0&&qw(l,o-1),t<this.length){let c=l.length;this.decomposeRight(t,l),qw(l,c)}return ti.of(l)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,s=n+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<s&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ti.of(this.break?[e,null,t]:[e,t]):(this.left=fh(this.left,e),this.right=fh(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,s){let{left:l,right:o}=this,c=t+l.length+this.break,f=null;return s&&s.from<=t+l.length&&s.more?f=l=l.updateHeight(e,t,n,s):l.updateHeight(e,t,n),s&&s.from<=c+o.length&&s.more?f=o=o.updateHeight(e,c,n,s):o.updateHeight(e,c,n),f?this.balanced(l,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function qw(i,e){let t,n;i[e]==null&&(t=i[e-1])instanceof Bt&&(n=i[e+1])instanceof Bt&&i.splice(e-1,3,new Bt(t.length+1+n.length))}const kV=5;class F0{constructor(e,t){this.pos=e,this.oracle=t,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,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Ai?s.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new Ai(n-this.pos,-1,0)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let s=n.widget?n.widget.estimatedHeight:0,l=n.widget?n.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new rA(o,s,n)):(o||l||s>=kV)&&this.addLineDeco(s,l,o)}else t>e&&this.span(e,t);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:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,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 Ai(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new Bt(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ai)return e;let t=new Ai(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let s=this.ensureLine();s.length+=n,s.collapsed+=n,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ai)&&!this.isCovered?this.nodes.push(new Ai(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let s of this.nodes)s instanceof Ai&&s.updateHeight(this.oracle,n),n+=s?s.length:1;return this.nodes}static build(e,t,n,s){let l=new F0(n,e);return De.spans(t,n,s,l,0),l.finish(n)}}function TV(i,e,t){let n=new CV;return De.compare(i,e,t,n,0),n.changes}class CV{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,s){(e<t||n&&n.heightRelevant||s&&s.heightRelevant)&&Ul(e,t,this.changes,5)}}function AV(i,e){let t=i.getBoundingClientRect(),n=i.ownerDocument,s=n.defaultView||window,l=Math.max(0,t.left),o=Math.min(s.innerWidth,t.right),c=Math.max(0,t.top),f=Math.min(s.innerHeight,t.bottom);for(let d=i.parentNode;d&&d!=n.body;)if(d.nodeType==1){let p=d,m=window.getComputedStyle(p);if((p.scrollHeight>p.clientHeight||p.scrollWidth>p.clientWidth)&&m.overflow!="visible"){let y=p.getBoundingClientRect();l=Math.max(l,y.left),o=Math.min(o,y.right),c=Math.max(c,y.top),f=Math.min(d==i.parentNode?s.innerHeight:f,y.bottom)}d=m.position=="absolute"||m.position=="fixed"?p.offsetParent:p.parentNode}else if(d.nodeType==11)d=d.host;else break;return{left:l-t.left,right:Math.max(l,o)-t.left,top:c-(t.top+e),bottom:Math.max(c,f)-(t.top+e)}}function PV(i){let e=i.getBoundingClientRect(),t=i.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function $V(i,e){let t=i.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Hm{constructor(e,t,n,s){this.from=e,this.to=t,this.size=n,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let s=e[n],l=t[n];if(s.from!=l.from||s.to!=l.to||s.size!=l.size)return!1}return!0}draw(e,t){return be.replace({widget:new MV(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class MV extends hn{constructor(e,t){super(),this.size=e,this.vertical=t}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 Uw{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=Gw,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=tt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(G0).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new xV(t),this.stateDeco=Ww(e),this.heightMap=ti.empty().applyChanges(this.stateDeco,je.empty,this.heightOracle.setDoc(e.doc),[new qi(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=be.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let s=n?t.head:t.anchor;if(!e.some(({from:l,to:o})=>s>=l&&s<=o)){let{from:l,to:o}=this.lineBlockAt(s);e.push(new ff(l,o))}}return this.viewports=e.sort((n,s)=>n.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Gw:new K0(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(Ao(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=Ww(this.state);let s=e.changedRanges,l=qi.extendWithRanges(s,TV(n,this.stateDeco,e?e.changes:At.empty(this.state.doc.length))),o=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Yw(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=o||na)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let f=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<f.from||t.range.head>f.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,t));let d=f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,e.flags|=this.updateForViewport(),(d||!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),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(L2)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),s=this.heightOracle,l=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?tt.RTL:tt.LTR;let o=this.heightOracle.mustRefreshForWrapping(l)||this.mustMeasureContent==="refresh",c=t.getBoundingClientRect(),f=o||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let d=0,p=0;if(c.width&&c.height){let{scaleX:V,scaleY:R}=x2(t,c);(V>.005&&Math.abs(this.scaleX-V)>.005||R>.005&&Math.abs(this.scaleY-R)>.005)&&(this.scaleX=V,this.scaleY=R,d|=16,o=f=!0)}let m=(parseInt(n.paddingTop)||0)*this.scaleY,y=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=m||this.paddingBottom!=y)&&(this.paddingTop=m,this.paddingBottom=y,d|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(f=!0),this.editorWidth=e.scrollDOM.clientWidth,d|=16);let b=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=b&&(this.scrollAnchorHeight=-1,this.scrollTop=b),this.scrolledToBottom=w2(e.scrollDOM);let S=(this.printing?$V:AV)(t,this.paddingTop),v=S.top-this.pixelViewport.top,w=S.bottom-this.pixelViewport.bottom;this.pixelViewport=S;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(f=!0)),!this.inView&&!this.scrollTarget&&!PV(e.dom))return 0;let A=c.width;if((this.contentDOMWidth!=A||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,d|=16),f){let V=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(V)&&(o=!0),o||s.lineWrapping&&Math.abs(A-this.contentDOMWidth)>s.charWidth){let{lineHeight:R,charWidth:N,textHeight:_}=e.docView.measureTextSize();o=R>0&&s.refresh(l,R,N,_,Math.max(5,A/N),V),o&&(e.docView.minWidth=0,d|=16)}v>0&&w>0?p=Math.max(v,w):v<0&&w<0&&(p=Math.min(v,w)),Yw();for(let R of this.viewports){let N=R.from==this.viewport.from?V:e.docView.measureVisibleLineHeights(R);this.heightMap=(o?ti.empty().applyChanges(this.stateDeco,je.empty,this.heightOracle,[new qi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new vV(R.from,N))}na&&(d|=2)}let P=!this.viewportIsAppropriate(this.viewport,p)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return P&&(d&2&&(d|=this.updateScaler()),this.viewport=this.getViewport(p,this.scrollTarget),d|=this.updateForViewport()),(d&2||P)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),d|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),d}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,l=this.heightOracle,{visibleTop:o,visibleBottom:c}=this,f=new ff(s.lineAt(o-n*1e3,nt.ByHeight,l,0,0).from,s.lineAt(c+(1-n)*1e3,nt.ByHeight,l,0,0).to);if(t){let{head:d}=t.range;if(d<f.from||d>f.to){let p=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),m=s.lineAt(d,nt.ByPos,l,0,0),y;t.y=="center"?y=(m.top+m.bottom)/2-p/2:t.y=="start"||t.y=="nearest"&&d<f.from?y=m.top:y=m.bottom-p,f=new ff(s.lineAt(y-1e3/2,nt.ByHeight,l,0,0).from,s.lineAt(y+p+1e3/2,nt.ByHeight,l,0,0).to)}}return f}mapViewport(e,t){let n=t.mapPos(e.from,-1),s=t.mapPos(e.to,1);return new ff(this.heightMap.lineAt(n,nt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,nt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,nt.ByPos,this.heightOracle,0,0),{bottom:l}=this.heightMap.lineAt(t,nt.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:c}=this;return(e==0||s<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||l>=c+Math.max(10,Math.min(n,250)))&&s>o-2*1e3&&l<c+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let s of e)t.touchesRange(s.from,s.to)||n.push(new Hm(t.mapPos(s.from),t.mapPos(s.to),s.size,s.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,s=n?1e4:2e3,l=s>>1,o=s<<1;if(this.defaultTextDirection!=tt.LTR&&!n)return[];let c=[],f=(p,m,y,b)=>{if(m-p<l)return;let S=this.state.selection.main,v=[S.from];S.empty||v.push(S.to);for(let k of v)if(k>p&&k<m){f(p,k-10,y,b),f(k+10,m,y,b);return}let w=RV(e,k=>k.from>=y.from&&k.to<=y.to&&Math.abs(k.from-p)<l&&Math.abs(k.to-m)<l&&!v.some(A=>k.from<A&&k.to>A));if(!w){if(m<y.to&&t&&n&&t.visibleRanges.some(P=>P.from<=m&&P.to>=m)){let P=t.moveToLineBoundary(G.cursor(m),!1,!0).head;P>p&&(m=P)}let k=this.gapSize(y,p,m,b),A=n||k<2e6?k:2e6;w=new Hm(p,m,k,A)}c.push(w)},d=p=>{if(p.length<o||p.type!=qt.Text)return;let m=EV(p.from,p.to,this.stateDeco);if(m.total<o)return;let y=this.scrollTarget?this.scrollTarget.range.head:null,b,S;if(n){let v=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,w,k;if(y!=null){let A=df(m,y),P=((this.visibleBottom-this.visibleTop)/2+v)/p.height;w=A-P,k=A+P}else w=(this.visibleTop-p.top-v)/p.height,k=(this.visibleBottom-p.top+v)/p.height;b=hf(m,w),S=hf(m,k)}else{let v=m.total*this.heightOracle.charWidth,w=s*this.heightOracle.charWidth,k=0;if(v>2e6)for(let N of e)N.from>=p.from&&N.from<p.to&&N.size!=N.displaySize&&N.from*this.heightOracle.charWidth+k<this.pixelViewport.left&&(k=N.size-N.displaySize);let A=this.pixelViewport.left+k,P=this.pixelViewport.right+k,V,R;if(y!=null){let N=df(m,y),_=((P-A)/2+w)/v;V=N-_,R=N+_}else V=(A-w)/v,R=(P+w)/v;b=hf(m,V),S=hf(m,R)}b>p.from&&f(p.from,b,p,m),S<p.to&&f(S,p.to,p,m)};for(let p of this.viewportLines)Array.isArray(p.type)?p.type.forEach(d):d(p);return c}gapSize(e,t,n,s){let l=df(s,n)-df(s,t);return this.heightOracle.lineWrapping?e.height*l:s.total*this.heightOracle.charWidth*l}updateLineGaps(e){Hm.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=be.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];De.spans(t,this.viewport.from,this.viewport.to,{span(l,o){n.push({from:l,to:o})},point(){}},20);let s=0;if(n.length!=this.visibleRanges.length)s=12;else for(let l=0;l<n.length&&!(s&8);l++){let o=this.visibleRanges[l],c=n[l];(o.from!=c.from||o.to!=c.to)&&(s|=4,e&&e.mapPos(o.from,-1)==c.from&&e.mapPos(o.to,1)==c.to||(s|=8))}return this.visibleRanges=n,s}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ao(this.heightMap.lineAt(e,nt.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(t=>t.top<=e&&t.bottom>=e)||Ao(this.heightMap.lineAt(this.scaler.fromDOM(e),nt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Ao(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 ff{constructor(e,t){this.from=e,this.to=t}}function EV(i,e,t){let n=[],s=i,l=0;return De.spans(t,i,e,{span(){},point(o,c){o>s&&(n.push({from:s,to:o}),l+=o-s),s=c}},20),s<e&&(n.push({from:s,to:e}),l+=e-s),{total:l,ranges:n}}function hf({total:i,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(i*t);for(let s=0;;s++){let{from:l,to:o}=e[s],c=o-l;if(n<=c)return l+n;n-=c}}function df(i,e){let t=0;for(let{from:n,to:s}of i.ranges){if(e<=s){t+=e-n;break}t+=s-n}return t/i.total}function RV(i,e){for(let t of i)if(e(t))return t}const Gw={toDOM(i){return i},fromDOM(i){return i},scale:1,eq(i){return i==this}};function Ww(i){let e=i.facet(_h).filter(n=>typeof n!="function"),t=i.facet(W0).filter(n=>typeof n!="function");return t.length&&e.push(De.join(t)),e}class K0{constructor(e,t,n){let s=0,l=0,o=0;this.viewports=n.map(({from:c,to:f})=>{let d=t.lineAt(c,nt.ByPos,e,0,0).top,p=t.lineAt(f,nt.ByPos,e,0,0).bottom;return s+=p-d,{from:c,to:f,top:d,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let c of this.viewports)c.domTop=o+(c.top-l)*this.scale,o=c.domBottom=c.domTop+(c.bottom-c.top),l=c.bottom}toDOM(e){for(let t=0,n=0,s=0;;t++){let l=t<this.viewports.length?this.viewports[t]:null;if(!l||e<l.top)return s+(e-n)*this.scale;if(e<=l.bottom)return l.domTop+(e-l.top);n=l.bottom,s=l.domBottom}}fromDOM(e){for(let t=0,n=0,s=0;;t++){let l=t<this.viewports.length?this.viewports[t]:null;if(!l||e<l.domTop)return n+(e-s)/this.scale;if(e<=l.domBottom)return l.top+(e-l.domTop);n=l.bottom,s=l.domBottom}}eq(e){return e instanceof K0?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function Ao(i,e){if(e.scale==1)return i;let t=e.toDOM(i.top),n=e.toDOM(i.bottom);return new ln(i.from,i.length,t,n-t,Array.isArray(i._content)?i._content.map(s=>Ao(s,e)):i._content)}const pf=le.define({combine:i=>i.join(" ")}),$g=le.define({combine:i=>i.indexOf(!0)>-1}),Mg=Js.newName(),lA=Js.newName(),aA=Js.newName(),oA={"&light":"."+lA,"&dark":"."+aA};function Eg(i,e,t){return new Js(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,s=>{if(s=="&")return i;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):i+" "+n}})}const zV=Eg("."+Mg,{"&":{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"}},oA),DV={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Im=ae.ie&&ae.ie_version<=11;class ZV{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new hL,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(t=>{for(let n of t)this.queue.push(n);(ae.ie&&ae.ie_version<=11||ae.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ae.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ae.chrome&&ae.chrome_version<126)&&(this.editContext=new LV(e),e.state.facet(rs)&&(e.contentDOM.editContext=this.editContext.editContext)),Im&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.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 t;((t=this.view.docView)===null||t===void 0?void 0:t.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(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.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(t=>{t.length>0&&t[t.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((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,s=this.selectionRange;if(n.state.facet(rs)?n.root.activeElement!=this.dom:!Xo(this.dom,s))return;let l=s.anchorNode&&n.docView.tile.nearest(s.anchorNode);if(l&&l.isWidget()&&l.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(ae.ie&&ae.ie_version<=11||ae.android&&ae.chrome)&&!n.state.selection.main.empty&&s.focusNode&&Vo(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Jo(e.root);if(!t)return!1;let n=ae.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&XV(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let s=Xo(this.dom,n);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&pL(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),s&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.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,DV),Im&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Im&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let s=()=>{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Gl(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.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 t=-1,n=-1,s=!1;for(let l of e){let o=this.readMutation(l);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:s}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),s=this.selectionChanged&&Xo(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new tV(this.view,e,t,n);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,s=H2(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!uh(this.view.state.selection,t.newSel.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let n=Hw(t,e.previousSibling||e.target.previousSibling,-1),s=Hw(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.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(rs)!=e.state.facet(rs)&&(e.view.contentDOM.editContext=e.state.facet(rs)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let s of this.scrollTargets)s.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 Hw(i,e,t){for(;e;){let n=Qt.get(e);if(n&&n.parent==i)return n;let s=e.parentNode;e=s!=i.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Iw(i,e){let t=e.startContainer,n=e.startOffset,s=e.endContainer,l=e.endOffset,o=i.docView.domAtPos(i.state.selection.main.anchor,1);return Vo(o.node,o.offset,s,l)&&([t,n,s,l]=[s,l,t,n]),{anchorNode:t,anchorOffset:n,focusNode:s,focusOffset:l}}function XV(i,e){if(e.getComposedRanges){let s=e.getComposedRanges(i.root)[0];if(s)return Iw(i,s)}let t=null;function n(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return i.contentDOM.addEventListener("beforeinput",n,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",n,!0),t?Iw(i,t):null}class LV{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=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=n=>{let s=e.state.selection.main,{anchor:l,head:o}=s,c=this.toEditorPos(n.updateRangeStart),f=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:c,drifted:!1});let d=f-c>n.text.length;c==this.from&&l<this.from?c=l:f==this.to&&l>this.to&&(f=l);let p=I2(e.state.sliceDoc(c,f),n.text,(d?s.from:s.to)-c,d?"end":null);if(!p){let y=G.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));uh(y,s)||e.dispatch({selection:y,userEvent:"select"});return}let m={from:p.from+c,to:p.toA+c,insert:je.of(n.text.slice(p.from,p.toB).split(`
|
|
59
|
-
`))};if((ae.mac||ae.android)&&m.from==o-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(m={from:c,to:f,insert:je.of([n.text.replace("."," ")])}),this.pendingContextChange=m,!e.state.readOnly){let y=this.to-this.from+(m.to-m.from+m.insert.length);I0(e,m,G.single(this.toEditorPos(n.selectionStart,y),this.toEditorPos(n.selectionEnd,y)))}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(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let s=[],l=null;for(let o=this.toEditorPos(n.rangeStart),c=this.toEditorPos(n.rangeEnd);o<c;o++){let f=e.coordsForChar(o);l=f&&new DOMRect(f.left,f.top,f.right-f.left,f.bottom-f.top)||l||new DOMRect,s.push(l)}t.updateCharacterBounds(n.rangeStart,s)},this.handlers.textformatupdate=n=>{let s=[];for(let l of n.getTextFormats()){let o=l.underlineStyle,c=l.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(c)){let f=this.toEditorPos(l.rangeStart),d=this.toEditorPos(l.rangeEnd);if(f<d){let p=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(c)?1:2}px`;s.push(be.mark({attributes:{style:p}}).range(f,d))}}}e.dispatch({effects:_2.of(be.set(s))})},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:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let s=Jo(n.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,s=this.pendingContextChange;return e.changes.iterChanges((l,o,c,f,d)=>{if(n)return;let p=d.length-(o-l);if(s&&o>=s.to)if(s.from==l&&s.to==o&&s.insert.eq(d)){s=this.pendingContextChange=null,t+=p,this.to+=p;return}else s=null,this.revertPending(e.state);if(l+=t,o+=t,o<=this.from)this.from+=p,this.to+=p;else if(l<this.to){if(l<this.from||o>this.to||this.to-this.from+d.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(o),d.toString()),this.to+=p}t+=p}),s&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.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||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+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 t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(n,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ne{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 t;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:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(s=>s.forEach(l=>n(l,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||dL(e.parent)||document,this.viewState=new Uw(e.state||Le.create(e)),e.scrollTo&&e.scrollTo.is(of)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(jl).map(s=>new Ym(s));for(let s of this.plugins)s.update(this);this.observer=new ZV(this),this.inputState=new rV(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Rw(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof wt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,s,l=this.state;for(let y of e){if(y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=y.state}if(this.destroyed){this.viewState.state=l;return}let o=this.hasFocus,c=0,f=null;e.some(y=>y.annotation(iA))?(this.inputState.notifiedFocused=o,c=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,f=nA(l,o),f||(c=1));let d=this.observer.delayedAndroidKey,p=null;if(d?(this.observer.clearDelayedAndroidKey(),p=this.observer.readChange(),(p&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(p=null)):this.observer.clear(),l.facet(Le.phrases)!=this.state.facet(Le.phrases))return this.setState(l);s=ah.create(this,l,e),s.flags|=c;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let y of e){if(m&&(m=m.map(y.changes)),y.scrollIntoView){let{main:b}=y.state.selection;m=new Wl(b.empty?b:G.cursor(b.head,b.head>b.anchor?-1:1))}for(let b of y.effects)b.is(of)&&(m=b.value.clip(this.state))}this.viewState.update(s,m),this.bidiCache=hh.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(To)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(y=>y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(pf)!=s.state.facet(pf)&&(this.viewState.mustMeasureContent=!0),(t||n||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let y of this.state.facet(kg))try{y(s)}catch(b){di(this.state,b,"update listener")}(f||p)&&Promise.resolve().then(()=>{f&&this.state==f.startState&&this.dispatch(f),p&&!H2(this,p)&&d.force&&Gl(this.contentDOM,d.key,d.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 t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new Uw(e),this.plugins=e.facet(jl).map(n=>new Ym(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new Rw(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(jl),n=e.state.facet(jl);if(t!=n){let s=[];for(let l of n){let o=t.indexOf(l);if(o<0)s.push(new Ym(l));else{let c=this.plugins[o];c.mustUpdate=e,s.push(c)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(n){di(this.state,n,"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 t=null,n=this.scrollDOM,s=n.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let c=0;;c++){if(o<0)if(w2(n))l=-1,o=this.viewState.heightMap.height;else{let b=this.viewState.scrollAnchorAt(s);l=b.from,o=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 d=[];f&4||([this.measureRequests,d]=[d,this.measureRequests]);let p=d.map(b=>{try{return b.read(this)}catch(S){return di(this.state,S),Fw}}),m=ah.create(this,this.state,[]),y=!1;m.flags|=f,t?t.flags|=f:t=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),y=this.docView.update(m),y&&this.docViewUpdate());for(let b=0;b<d.length;b++)if(p[b]!=Fw)try{let S=d[b];S.write&&S.write(p[b],this)}catch(S){di(this.state,S)}if(y&&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,o=-1;continue}else{let S=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-o;if(S>1||S<-1){s=s+S,n.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let c of this.state.facet(kg))c(t)}get themeClasses(){return Mg+" "+(this.state.facet($g)?aA:lA)+" "+this.state.facet(pf)}updateAttrs(){let e=Kw(this,j2,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(rs)?"true":"false",class:"cm-content",style:`${ae.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Kw(this,G0,t);let n=this.observer.ignore(()=>{let s=Cw(this.contentDOM,this.contentAttrs,t),l=Cw(this.dom,this.editorAttrs,e);return s||l});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let s of n.effects)if(s.is(ne.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(To);let e=this.state.facet(ne.cspNonce);Js.mount(this.root,this.styleModules.concat(zV).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 t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.plugin==e)||null),t&&t.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,t,n){return Wm(this,e,zw(this,e,t,n))}moveByGroup(e,t){return Wm(this,e,zw(this,e,t,n=>HL(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),s=this.textDirectionAt(e.from),l=n[t?n.length-1:0];return G.cursor(l.side(t,s)+e.from,l.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,n=!0){return WL(this,e,t,n)}moveVertically(e,t,n){return Wm(this,e,IL(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Ag(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Ag(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let s=this.state.doc.lineAt(e),l=this.bidiSpans(s),o=l[Cn.find(l,e-s.from,-1,t)];return ec(n,o.dir==tt.LTR==t>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(X2)||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>VV)return P2(e.length);let t=this.textDirectionAt(e.from),n;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||A2(l.isolates,n=$w(this,e))))return l.order;n||(n=$w(this,e));let s=xL(e.text,t,n);return this.bidiCache.push(new hh(e.from,e.to,t,n,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ae.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{v2(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,t={}){return of.of(new Wl(typeof e=="number"?G.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return of.of(new Wl(G.cursor(n.from),"start","start",n.top-e,t,!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 gt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return gt.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Js.newName(),s=[pf.of(n),To.of(Eg(`.${n}`,e))];return t&&t.dark&&s.push($g.of(!0)),s}static baseTheme(e){return hs.lowest(To.of(Eg("."+Mg,e,oA)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),s=n&&Qt.get(n)||Qt.get(e);return((t=s==null?void 0:s.root)===null||t===void 0?void 0:t.view)||null}}ne.styleModule=To;ne.inputHandler=D2;ne.clipboardInputFilter=q0;ne.clipboardOutputFilter=U0;ne.scrollHandler=V2;ne.focusChangeEffect=Z2;ne.perLineTextDirection=X2;ne.exceptionSink=z2;ne.updateListener=kg;ne.editable=rs;ne.mouseSelectionStyle=R2;ne.dragMovesSelection=E2;ne.clickAddsSelectionRange=M2;ne.decorations=_h;ne.blockWrappers=B2;ne.outerDecorations=W0;ne.atomicRanges=Cc;ne.bidiIsolatedRanges=N2;ne.scrollMargins=Y2;ne.darkTheme=$g;ne.cspNonce=le.define({combine:i=>i.length?i[0]:""});ne.contentAttributes=G0;ne.editorAttributes=j2;ne.lineWrapping=ne.contentAttributes.of({class:"cm-lineWrapping"});ne.announce=ke.define();const VV=4096,Fw={};class hh{constructor(e,t,n,s,l,o){this.from=e,this.to=t,this.dir=n,this.isolates=s,this.fresh=l,this.order=o}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let n=[],s=e.length?e[e.length-1].dir:tt.LTR;for(let l=Math.max(0,e.length-10);l<e.length;l++){let o=e[l];o.dir==s&&!t.touchesRange(o.from,o.to)&&n.push(new hh(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function Kw(i,e,t){for(let n=i.state.facet(e),s=n.length-1;s>=0;s--){let l=n[s],o=typeof l=="function"?l(i):l;o&&B0(o,t)}return t}const _V=ae.mac?"mac":ae.windows?"win":ae.linux?"linux":"key";function jV(i,e){const t=i.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let s,l,o,c;for(let f=0;f<t.length-1;++f){const d=t[f];if(/^(cmd|meta|m)$/i.test(d))c=!0;else if(/^a(lt)?$/i.test(d))s=!0;else if(/^(c|ctrl|control)$/i.test(d))l=!0;else if(/^s(hift)?$/i.test(d))o=!0;else if(/^mod$/i.test(d))e=="mac"?c=!0:l=!0;else throw new Error("Unrecognized modifier name: "+d)}return s&&(n="Alt-"+n),l&&(n="Ctrl-"+n),c&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function mf(i,e,t){return e.altKey&&(i="Alt-"+i),e.ctrlKey&&(i="Ctrl-"+i),e.metaKey&&(i="Meta-"+i),t!==!1&&e.shiftKey&&(i="Shift-"+i),i}const BV=hs.default(ne.domEventHandlers({keydown(i,e){return uA(cA(e.state),i,e,"editor")}})),Gr=le.define({enables:BV}),Jw=new WeakMap;function cA(i){let e=i.facet(Gr),t=Jw.get(e);return t||Jw.set(e,t=qV(e.reduce((n,s)=>n.concat(s),[]))),t}function NV(i,e,t){return uA(cA(i.state),e,i,t)}let Gs=null;const YV=4e3;function qV(i,e=_V){let t=Object.create(null),n=Object.create(null),s=(o,c)=>{let f=n[o];if(f==null)n[o]=c;else if(f!=c)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},l=(o,c,f,d,p)=>{var m,y;let b=t[o]||(t[o]=Object.create(null)),S=c.split(/ (?!$)/).map(k=>jV(k,e));for(let k=1;k<S.length;k++){let A=S.slice(0,k).join(" ");s(A,!0),b[A]||(b[A]={preventDefault:!0,stopPropagation:!1,run:[P=>{let V=Gs={view:P,prefix:A,scope:o};return setTimeout(()=>{Gs==V&&(Gs=null)},YV),!0}]})}let v=S.join(" ");s(v,!1);let w=b[v]||(b[v]={preventDefault:!1,stopPropagation:!1,run:((y=(m=b._any)===null||m===void 0?void 0:m.run)===null||y===void 0?void 0:y.slice())||[]});f&&w.run.push(f),d&&(w.preventDefault=!0),p&&(w.stopPropagation=!0)};for(let o of i){let c=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let d of c){let p=t[d]||(t[d]=Object.create(null));p._any||(p._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=o;for(let y in p)p[y].run.push(b=>m(b,Rg))}let f=o[e]||o.key;if(f)for(let d of c)l(d,f,o.run,o.preventDefault,o.stopPropagation),o.shift&&l(d,"Shift-"+f,o.shift,o.preventDefault,o.stopPropagation)}return t}let Rg=null;function uA(i,e,t,n){Rg=e;let s=sL(e),l=ui(s,0),o=kn(l)==s.length&&s!=" ",c="",f=!1,d=!1,p=!1;Gs&&Gs.view==t&&Gs.scope==n&&(c=Gs.prefix+" ",K2.indexOf(e.keyCode)<0&&(d=!0,Gs=null));let m=new Set,y=w=>{if(w){for(let k of w.run)if(!m.has(k)&&(m.add(k),k(t)))return w.stopPropagation&&(p=!0),!0;w.preventDefault&&(w.stopPropagation&&(p=!0),d=!0)}return!1},b=i[n],S,v;return b&&(y(b[c+mf(s,e,!o)])?f=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ae.windows&&e.ctrlKey&&e.altKey)&&!(ae.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(S=er[e.keyCode])&&S!=s?(y(b[c+mf(S,e,!0)])||e.shiftKey&&(v=Fo[e.keyCode])!=s&&v!=S&&y(b[c+mf(v,e,!1)]))&&(f=!0):o&&e.shiftKey&&y(b[c+mf(s,e,!0)])&&(f=!0),!f&&y(b._any)&&(f=!0)),d&&(f=!0),f&&p&&e.stopPropagation(),Rg=null,f}class Ac{constructor(e,t,n,s,l){this.className=e,this.left=t,this.top=n,this.width=s,this.height=l}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.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,t,n){if(n.empty){let s=e.coordsAtPos(n.head,n.assoc||1);if(!s)return[];let l=fA(e);return[new Ac(t,s.left-l.left,s.top-l.top,null,s.bottom-s.top)]}else return UV(e,t,n)}}function fA(i){let e=i.scrollDOM.getBoundingClientRect();return{left:(i.textDirection==tt.LTR?e.left:e.right-i.scrollDOM.clientWidth*i.scaleX)-i.scrollDOM.scrollLeft*i.scaleX,top:e.top-i.scrollDOM.scrollTop*i.scaleY}}function eQ(i,e,t,n){let s=i.coordsAtPos(e,t*2);if(!s)return n;let l=i.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,c=i.posAtCoords({x:l.left+1,y:o}),f=i.posAtCoords({x:l.right-1,y:o});return c==null||f==null?n:{from:Math.max(n.from,Math.min(c,f)),to:Math.min(n.to,Math.max(c,f))}}function UV(i,e,t){if(t.to<=i.viewport.from||t.from>=i.viewport.to)return[];let n=Math.max(t.from,i.viewport.from),s=Math.min(t.to,i.viewport.to),l=i.textDirection==tt.LTR,o=i.contentDOM,c=o.getBoundingClientRect(),f=fA(i),d=o.querySelector(".cm-line"),p=d&&window.getComputedStyle(d),m=c.left+(p?parseInt(p.paddingLeft)+Math.min(0,parseInt(p.textIndent)):0),y=c.right-(p?parseInt(p.paddingRight):0),b=Cg(i,n,1),S=Cg(i,s,-1),v=b.type==qt.Text?b:null,w=S.type==qt.Text?S:null;if(v&&(i.lineWrapping||b.widgetLineBreaks)&&(v=eQ(i,n,1,v)),w&&(i.lineWrapping||S.widgetLineBreaks)&&(w=eQ(i,s,-1,w)),v&&w&&v.from==w.from&&v.to==w.to)return A(P(t.from,t.to,v));{let R=v?P(t.from,null,v):V(b,!1),N=w?P(null,t.to,w):V(S,!0),_=[];return(v||b).to<(w||S).from-(v&&w?1:0)||b.widgetLineBreaks>1&&R.bottom+i.defaultLineHeight/2<N.top?_.push(k(m,R.bottom,y,N.top)):R.bottom<N.top&&i.elementAtHeight((R.bottom+N.top)/2).type==qt.Text&&(R.bottom=N.top=(R.bottom+N.top)/2),A(R).concat(_).concat(A(N))}function k(R,N,_,j){return new Ac(e,R-f.left,N-f.top,Math.max(0,_-R),j-N)}function A({top:R,bottom:N,horizontal:_}){let j=[];for(let K=0;K<_.length;K+=2)j.push(k(_[K],R,_[K+1],N));return j}function P(R,N,_){let j=1e9,K=-1e9,Oe=[];function ce(Se,we,X,W,te){let oe=i.coordsAtPos(Se,Se==_.to?-2:2),F=i.coordsAtPos(X,X==_.from?2:-2);!oe||!F||(j=Math.min(oe.top,F.top,j),K=Math.max(oe.bottom,F.bottom,K),te==tt.LTR?Oe.push(l&&we?m:oe.left,l&&W?y:F.right):Oe.push(!l&&W?m:F.left,!l&&we?y:oe.right))}let ie=R??_.from,xe=N??_.to;for(let Se of i.visibleRanges)if(Se.to>ie&&Se.from<xe)for(let we=Math.max(Se.from,ie),X=Math.min(Se.to,xe);;){let W=i.state.doc.lineAt(we);for(let te of i.bidiSpans(W)){let oe=te.from+W.from,F=te.to+W.from;if(oe>=X)break;F>we&&ce(Math.max(oe,we),R==null&&oe<=ie,Math.min(F,X),N==null&&F>=xe,te.dir)}if(we=W.to+1,we>=X)break}return Oe.length==0&&ce(ie,R==null,xe,N==null,i.textDirection),{top:j,bottom:K,horizontal:Oe}}function V(R,N){let _=c.top+(N?R.top:R.bottom);return{top:_,bottom:_,horizontal:[]}}}function GV(i,e){return i.constructor==e.constructor&&i.eq(e)}class WV{constructor(e,t){this.view=e,this.layer=t,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"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Vf)!=e.state.facet(Vf)&&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 t=0,n=e.facet(Vf);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,n)=>!GV(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[n].constructor&&s.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e,ae.safari&&ae.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 Vf=le.define();function hA(i){return[gt.define(e=>new WV(e,i)),Vf.of(i)]}const ic=le.define({combine(i){return Zn(i,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function HV(i={}){return[ic.of(i),IV,FV,KV,L2.of(!0)]}function dA(i){return i.startState.facet(ic)!=i.state.facet(ic)}const IV=hA({above:!0,markers(i){let{state:e}=i,t=e.facet(ic),n=[];for(let s of e.selection.ranges){let l=s==e.selection.main;if(s.empty||t.drawRangeCursor){let o=l?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",c=s.empty?s:G.cursor(s.head,s.head>s.anchor?-1:1);for(let f of Ac.forRange(i,o,c))n.push(f)}}return n},update(i,e){i.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=dA(i);return t&&tQ(i.state,e),i.docChanged||i.selectionSet||t},mount(i,e){tQ(e.state,i)},class:"cm-cursorLayer"});function tQ(i,e){e.style.animationDuration=i.facet(ic).cursorBlinkRate+"ms"}const FV=hA({above:!1,markers(i){return i.state.selection.ranges.map(e=>e.empty?[]:Ac.forRange(i,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(i,e){return i.docChanged||i.selectionSet||i.viewportChanged||dA(i)},class:"cm-selectionLayer"}),KV=hs.highest(ne.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"}}}})),pA=ke.define({map(i,e){return i==null?null:e.mapPos(i)}}),Po=Dt.define({create(){return null},update(i,e){return i!=null&&(i=e.changes.mapPos(i)),e.effects.reduce((t,n)=>n.is(pA)?n.value:t,i)}}),JV=gt.fromClass(class{constructor(i){this.view=i,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(i){var e;let t=i.state.field(Po);t==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"),(i.startState.field(Po)!=t||i.docChanged||i.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:i}=this,e=i.state.field(Po),t=e!=null&&i.coordsAtPos(e);if(!t)return null;let n=i.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+i.scrollDOM.scrollLeft*i.scaleX,top:t.top-n.top+i.scrollDOM.scrollTop*i.scaleY,height:t.bottom-t.top}}drawCursor(i){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;i?(this.cursor.style.left=i.left/e+"px",this.cursor.style.top=i.top/t+"px",this.cursor.style.height=i.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(i){this.view.state.field(Po)!=i&&this.view.dispatch({effects:pA.of(i)})}},{eventObservers:{dragover(i){this.setDropPos(this.view.posAtCoords({x:i.clientX,y:i.clientY}))},dragleave(i){(i.target==this.view.contentDOM||!this.view.contentDOM.contains(i.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function e_(){return[Po,JV]}function iQ(i,e,t,n,s){e.lastIndex=0;for(let l=i.iterRange(t,n),o=t,c;!l.next().done;o+=l.value.length)if(!l.lineBreak)for(;c=e.exec(l.value);)s(o+c.index,c)}function t_(i,e){let t=i.visibleRanges;if(t.length==1&&t[0].from==i.viewport.from&&t[0].to==i.viewport.to)return t;let n=[];for(let{from:s,to:l}of t)s=Math.max(i.state.doc.lineAt(s).from,s-e),l=Math.min(i.state.doc.lineAt(l).to,l+e),n.length&&n[n.length-1].to>=s?n[n.length-1].to=l:n.push({from:s,to:l});return n}class i_{constructor(e){const{regexp:t,decoration:n,decorate:s,boundary:l,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(c,f,d,p)=>s(p,d,d+c[0].length,c,f);else if(typeof n=="function")this.addMatch=(c,f,d,p)=>{let m=n(c,f,d);m&&p(d,d+c[0].length,m)};else if(n)this.addMatch=(c,f,d,p)=>p(d,d+c[0].length,n);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=l,this.maxLength=o}createDeco(e){let t=new cs,n=t.add.bind(t);for(let{from:s,to:l}of t_(e,this.maxLength))iQ(e.state.doc,this.regexp,s,l,(o,c)=>this.addMatch(c,e,o,n));return t.finish()}updateDeco(e,t){let n=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((l,o,c,f)=>{f>=e.view.viewport.from&&c<=e.view.viewport.to&&(n=Math.min(c,n),s=Math.max(f,s))}),e.viewportMoved||s-n>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),n,s):t}updateRange(e,t,n,s){for(let l of e.visibleRanges){let o=Math.max(l.from,n),c=Math.min(l.to,s);if(c>=o){let f=e.state.doc.lineAt(o),d=f.to<c?e.state.doc.lineAt(c):f,p=Math.max(l.from,f.from),m=Math.min(l.to,d.to);if(this.boundary){for(;o>f.from;o--)if(this.boundary.test(f.text[o-1-f.from])){p=o;break}for(;c<d.to;c++)if(this.boundary.test(d.text[c-d.from])){m=c;break}}let y=[],b,S=(v,w,k)=>y.push(k.range(v,w));if(f==d)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,S);else iQ(e.state.doc,this.regexp,p,m,(v,w)=>this.addMatch(w,e,v,S));t=t.update({filterFrom:p,filterTo:m,filter:(v,w)=>v<p||w>m,add:y})}}return t}}const zg=/x/.unicode!=null?"gu":"g",n_=new RegExp(`[\0-\b
|
|
60
|
-
--\u2028\u2029\uFEFF-]`,zg),s_={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 Fm=null;function r_(){var i;if(Fm==null&&typeof document<"u"&&document.body){let e=document.body.style;Fm=((i=e.tabSize)!==null&&i!==void 0?i:e.MozTabSize)!=null}return Fm||!1}const _f=le.define({combine(i){let e=Zn(i,{render:null,specialChars:n_,addSpecialChars:null});return(e.replaceTabs=!r_())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,zg)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,zg)),e}});function l_(i={}){return[_f.of(i),a_()]}let nQ=null;function a_(){return nQ||(nQ=gt.fromClass(class{constructor(i){this.view=i,this.decorations=be.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(i.state.facet(_f)),this.decorations=this.decorator.createDeco(i)}makeDecorator(i){return new i_({regexp:i.specialChars,decoration:(e,t,n)=>{let{doc:s}=t.state,l=ui(e[0],0);if(l==9){let o=s.lineAt(n),c=t.state.tabSize,f=un(o.text,c,n-o.from);return be.replace({widget:new f_((c-f%c)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=be.replace({widget:new u_(i,l)}))},boundary:i.replaceTabs?void 0:/[^]/})}update(i){let e=i.state.facet(_f);i.startState.facet(_f)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(i.view)):this.decorations=this.decorator.updateDeco(i,this.decorations)}},{decorations:i=>i.decorations}))}const o_="•";function c_(i){return i>=32?o_:i==10?"":String.fromCharCode(9216+i)}class u_ extends hn{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=c_(this.code),n=e.state.phrase("Control character")+" "+(s_[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,n,t);if(s)return s;let l=document.createElement("span");return l.textContent=t,l.title=n,l.setAttribute("aria-label",n),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class f_ extends hn{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 h_(){return p_}const d_=be.line({class:"cm-activeLine"}),p_=gt.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.docChanged||i.selectionSet)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=-1,t=[];for(let n of i.state.selection.ranges){let s=i.lineBlockAt(n.head);s.from>e&&(t.push(d_.range(s.from)),e=s.from)}return be.set(t)}},{decorations:i=>i.decorations});class m_ extends hn{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Lo(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),s=ec(t[0],n.direction!="rtl"),l=parseInt(n.lineHeight);return s.bottom-s.top>l*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+l}:s}ignoreEvent(){return!1}}function O_(i){let e=gt.fromClass(class{constructor(t){this.view=t,this.placeholder=i?be.set([be.widget({widget:new m_(i),side:1}).range(0)]):be.none}get decorations(){return this.view.state.doc.length?be.none:this.placeholder}},{decorations:t=>t.decorations});return typeof i=="string"?[e,ne.contentAttributes.of({"aria-placeholder":i})]:e}const Dg=2e3;function g_(i,e,t){let n=Math.min(e.line,t.line),s=Math.max(e.line,t.line),l=[];if(e.off>Dg||t.off>Dg||e.col<0||t.col<0){let o=Math.min(e.off,t.off),c=Math.max(e.off,t.off);for(let f=n;f<=s;f++){let d=i.doc.line(f);d.length<=c&&l.push(G.range(d.from+o,d.to+c))}}else{let o=Math.min(e.col,t.col),c=Math.max(e.col,t.col);for(let f=n;f<=s;f++){let d=i.doc.line(f),p=pg(d.text,o,i.tabSize,!0);if(p<0)l.push(G.cursor(d.to));else{let m=pg(d.text,c,i.tabSize);l.push(G.range(d.from+p,d.from+m))}}}return l}function y_(i,e){let t=i.coordsAtPos(i.viewport.from);return t?Math.round(Math.abs((t.left-e)/i.defaultCharacterWidth)):-1}function sQ(i,e){let t=i.posAtCoords({x:e.clientX,y:e.clientY},!1),n=i.state.doc.lineAt(t),s=t-n.from,l=s>Dg?-1:s==n.length?y_(i,e.clientX):un(n.text,i.state.tabSize,t-n.from);return{line:n.number,col:l,off:s}}function b_(i,e){let t=sQ(i,e),n=i.state.selection;return t?{update(s){if(s.docChanged){let l=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(l);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},n=n.map(s.changes)}},get(s,l,o){let c=sQ(i,s);if(!c)return n;let f=g_(i.state,t,c);return f.length?o?G.create(f.concat(n.ranges)):G.create(f):n}}:null}function S_(i){let e=(t=>t.altKey&&t.button==0);return ne.mouseSelectionStyle.of((t,n)=>e(n)?b_(t,n):null)}const x_={Alt:[18,i=>!!i.altKey],Control:[17,i=>!!i.ctrlKey],Shift:[16,i=>!!i.shiftKey],Meta:[91,i=>!!i.metaKey]},v_={style:"cursor: crosshair"};function w_(i={}){let[e,t]=x_[i.key||"Alt"],n=gt.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[n,ne.contentAttributes.of(s=>{var l;return!((l=s.plugin(n))===null||l===void 0)&&l.isDown?v_:null})]}const Of="-10000px";class mA{constructor(e,t,n,s){this.facet=t,this.createTooltipView=n,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let l=null;this.tooltipViews=this.tooltips.map(o=>l=n(o,l))}update(e,t){var n;let s=e.state.facet(this.facet),l=s.filter(f=>f);if(s===this.input){for(let f of this.tooltipViews)f.update&&f.update(e);return!1}let o=[],c=t?[]:null;for(let f=0;f<l.length;f++){let d=l[f],p=-1;if(d){for(let m=0;m<this.tooltips.length;m++){let y=this.tooltips[m];y&&y.create==d.create&&(p=m)}if(p<0)o[f]=this.createTooltipView(d,f?o[f-1]:null),c&&(c[f]=!!d.above);else{let m=o[f]=this.tooltipViews[p];c&&(c[f]=t[p]),m.update&&m.update(e)}}}for(let f of this.tooltipViews)o.indexOf(f)<0&&(this.removeTooltipView(f),(n=f.destroy)===null||n===void 0||n.call(f));return t&&(c.forEach((f,d)=>t[d]=f),t.length=c.length),this.input=s,this.tooltips=l,this.tooltipViews=o,!0}}function Q_(i){let e=i.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Km=le.define({combine:i=>{var e,t,n;return{position:ae.ios?"absolute":((e=i.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=i.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=i.find(s=>s.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||Q_}}}),rQ=new WeakMap,J0=gt.fromClass(class{constructor(i){this.view=i,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=i.state.facet(Km);this.position=e.position,this.parent=e.parent,this.classes=i.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 mA(i,ey,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),i.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 i of this.manager.tooltipViews)this.intersectionObserver.observe(i.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(i){i.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(i,this.above);e&&this.observeIntersection();let t=e||i.geometryChanged,n=i.state.facet(Km);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(i,e){let t=i.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),i.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Of,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var i,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(i=n.destroy)===null||i===void 0||i.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let i=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:l}=this.manager.tooltipViews[0];if(ae.safari){let o=l.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else t=!!l.offsetParent&&l.offsetParent!=this.container.ownerDocument.body}if(t||this.position=="absolute")if(this.parent){let l=this.parent.getBoundingClientRect();l.width&&l.height&&(i=l.width/this.parent.offsetWidth,e=l.height/this.parent.offsetHeight)}else({scaleX:i,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=H0(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((l,o)=>{let c=this.manager.tooltipViews[o];return c.getCoords?c.getCoords(l.pos):this.view.coordsAtPos(l.pos)}),size:this.manager.tooltipViews.map(({dom:l})=>l.getBoundingClientRect()),space:this.view.state.facet(Km).tooltipSpace(this.view),scaleX:i,scaleY:e,makeAbsolute:t}}writeMeasure(i){var e;if(i.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let c of this.manager.tooltipViews)c.dom.style.position="absolute"}let{visible:t,space:n,scaleX:s,scaleY:l}=i,o=[];for(let c=0;c<this.manager.tooltips.length;c++){let f=this.manager.tooltips[c],d=this.manager.tooltipViews[c],{dom:p}=d,m=i.pos[c],y=i.size[c];if(!m||f.clip!==!1&&(m.bottom<=Math.max(t.top,n.top)||m.top>=Math.min(t.bottom,n.bottom)||m.right<Math.max(t.left,n.left)-.1||m.left>Math.min(t.right,n.right)+.1)){p.style.top=Of;continue}let b=f.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,S=b?7:0,v=y.right-y.left,w=(e=rQ.get(d))!==null&&e!==void 0?e:y.bottom-y.top,k=d.offset||T_,A=this.view.textDirection==tt.LTR,P=y.width>n.right-n.left?A?n.left:n.right-y.width:A?Math.max(n.left,Math.min(m.left-(b?14:0)+k.x,n.right-v)):Math.min(Math.max(n.left,m.left-v+(b?14:0)-k.x),n.right-v),V=this.above[c];!f.strictSide&&(V?m.top-w-S-k.y<n.top:m.bottom+w+S+k.y>n.bottom)&&V==n.bottom-m.bottom>m.top-n.top&&(V=this.above[c]=!V);let R=(V?m.top-n.top:n.bottom-m.bottom)-S;if(R<w&&d.resize!==!1){if(R<this.view.defaultLineHeight){p.style.top=Of;continue}rQ.set(d,w),p.style.height=(w=R)/l+"px"}else p.style.height&&(p.style.height="");let N=V?m.top-w-S-k.y:m.bottom+S+k.y,_=P+v;if(d.overlap!==!0)for(let j of o)j.left<_&&j.right>P&&j.top<N+w&&j.bottom>N&&(N=V?j.top-w-2-S:j.bottom+S+2);if(this.position=="absolute"?(p.style.top=(N-i.parent.top)/l+"px",lQ(p,(P-i.parent.left)/s)):(p.style.top=N/l+"px",lQ(p,P/s)),b){let j=m.left+(A?k.x:-k.x)-(P+14-7);b.style.left=j/s+"px"}d.overlap!==!0&&o.push({left:P,top:N,right:_,bottom:N+w}),p.classList.toggle("cm-tooltip-above",V),p.classList.toggle("cm-tooltip-below",!V),d.positioned&&d.positioned(i.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 i of this.manager.tooltipViews)i.dom.style.top=Of}},{eventObservers:{scroll(){this.maybeMeasure()}}});function lQ(i,e){let t=parseInt(i.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(i.style.left=e+"px")}const k_=ne.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"}}}),T_={x:0,y:0},ey=le.define({enables:[J0,k_]}),dh=le.define({combine:i=>i.reduce((e,t)=>e.concat(t),[])});class Yh{static create(e){return new Yh(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new mA(e,dh,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let s=n[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}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 C_=ey.compute([dh],i=>{let e=i.facet(dh);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:Yh.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class A_{constructor(e,t,n,s,l){this.view=e,this.source=t,this.field=n,this.setHover=s,this.hoverTime=l,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:t}=this,n=e.docView.tile.nearest(t.target);if(!n)return;let s,l=1;if(n.isWidget())s=n.posAtStart;else{if(s=e.posAtCoords(t),s==null)return;let c=e.coordsAtPos(s);if(!c||t.y<c.top||t.y>c.bottom||t.x<c.left-e.defaultCharacterWidth||t.x>c.right+e.defaultCharacterWidth)return;let f=e.bidiSpans(e.state.doc.lineAt(s)).find(p=>p.from<=s&&p.to>=s),d=f&&f.dir==tt.RTL?-1:1;l=t.x<c.left?-d:d}let o=this.source(e,s,l);if(o!=null&&o.then){let c=this.pending={pos:s};o.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=>di(e.state,f,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(J0),t=e?e.manager.tooltips.findIndex(n=>n.create==Yh.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;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:s,tooltip:l}=this;if(s.length&&l&&!P_(l.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,c=(n=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==c?this.view.posAtCoords(this.lastMove)!=o:!$_(this.view,o,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:t}=this;if(t.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const gf=4;function P_(i,e){let{left:t,right:n,top:s,bottom:l}=i.getBoundingClientRect(),o;if(o=i.querySelector(".cm-tooltip-arrow")){let c=o.getBoundingClientRect();s=Math.min(c.top,s),l=Math.max(c.bottom,l)}return e.clientX>=t-gf&&e.clientX<=n+gf&&e.clientY>=s-gf&&e.clientY<=l+gf}function $_(i,e,t,n,s,l){let o=i.scrollDOM.getBoundingClientRect(),c=i.documentTop+i.documentPadding.top+i.contentHeight;if(o.left>n||o.right<n||o.top>s||Math.min(o.bottom,c)<s)return!1;let f=i.posAtCoords({x:n,y:s},!1);return f>=e&&f<=t}function M_(i,e={}){let t=ke.define(),n=Dt.define({create(){return[]},update(s,l){if(s.length&&(e.hideOnChange&&(l.docChanged||l.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(l,o))),l.docChanged)){let o=[];for(let c of s){let f=l.changes.mapPos(c.pos,-1,Yt.TrackDel);if(f!=null){let d=Object.assign(Object.create(null),c);d.pos=f,d.end!=null&&(d.end=l.changes.mapPos(d.end)),o.push(d)}}s=o}for(let o of l.effects)o.is(t)&&(s=o.value),o.is(E_)&&(s=[]);return s},provide:s=>dh.from(s)});return{active:n,extension:[n,gt.define(s=>new A_(s,i,n,t,e.hoverTime||300)),C_]}}function OA(i,e){let t=i.plugin(J0);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const E_=ke.define(),aQ=le.define({combine(i){let e,t;for(let n of i)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function ty(i,e){let t=i.plugin(gA),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const gA=gt.fromClass(class{constructor(i){this.input=i.state.facet(nc),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(i));let e=i.state.facet(aQ);this.top=new yf(i,!0,e.topContainer),this.bottom=new yf(i,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(i){let e=i.state.facet(aQ);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new yf(i.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new yf(i.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=i.state.facet(nc);if(t!=this.input){let n=t.filter(f=>f),s=[],l=[],o=[],c=[];for(let f of n){let d=this.specs.indexOf(f),p;d<0?(p=f(i.view),c.push(p)):(p=this.panels[d],p.update&&p.update(i)),s.push(p),(p.top?l:o).push(p)}this.specs=n,this.panels=s,this.top.sync(l),this.bottom.sync(o);for(let f of c)f.dom.classList.add("cm-panel"),f.mount&&f.mount()}else for(let n of this.panels)n.update&&n.update(i)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:i=>ne.scrollMargins.of(e=>{let t=e.plugin(i);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class yf{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.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 t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=oQ(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=oQ(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 oQ(i){let e=i.nextSibling;return i.remove(),e}const nc=le.define({enables:gA});function R_(i,e){let t,n=new Promise(o=>t=o),s=o=>z_(o,e,t);i.state.field(Jm,!1)?i.dispatch({effects:yA.of(s)}):i.dispatch({effects:ke.appendConfig.of(Jm.init(()=>[s]))});let l=bA.of(s);return{close:l,result:n.then(o=>((i.win.queueMicrotask||(f=>i.win.setTimeout(f,10)))(()=>{i.state.field(Jm).indexOf(s)>-1&&i.dispatch({effects:l})}),o))}}const Jm=Dt.define({create(){return[]},update(i,e){for(let t of e.effects)t.is(yA)?i=[t.value].concat(i):t.is(bA)&&(i=i.filter(n=>n!=t.value));return i},provide:i=>nc.computeN([i],e=>e.field(i))}),yA=ke.define(),bA=ke.define();function z_(i,e,t){let n=e.content?e.content(i,()=>o(null)):null;if(!n){if(n=Ke("form"),e.input){let c=Ke("input",e.input);/^(text|password|number|email|tel|url)$/.test(c.type)&&c.classList.add("cm-textfield"),c.name||(c.name="input"),n.appendChild(Ke("label",(e.label||"")+": ",c))}else n.appendChild(document.createTextNode(e.label||""));n.appendChild(document.createTextNode(" ")),n.appendChild(Ke("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let s=n.nodeName=="FORM"?[n]:n.querySelectorAll("form");for(let c=0;c<s.length;c++){let f=s[c];f.addEventListener("keydown",d=>{d.keyCode==27?(d.preventDefault(),o(null)):d.keyCode==13&&(d.preventDefault(),o(f))}),f.addEventListener("submit",d=>{d.preventDefault(),o(f)})}let l=Ke("div",n,Ke("button",{onclick:()=>o(null),"aria-label":i.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(l.className=e.class),l.classList.add("cm-dialog");function o(c){l.contains(l.ownerDocument.activeElement)&&i.focus(),t(c)}return{dom:l,top:e.top,mount:()=>{if(e.focus){let c;typeof e.focus=="string"?c=n.querySelector(e.focus):c=n.querySelector("input")||n.querySelector("button"),c&&"select"in c?c.select():c&&"focus"in c&&c.focus()}}}}class fs extends Ks{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}fs.prototype.elementClass="";fs.prototype.toDOM=void 0;fs.prototype.mapMode=Yt.TrackBefore;fs.prototype.startSide=fs.prototype.endSide=-1;fs.prototype.point=!0;const jf=le.define(),D_=le.define(),Z_={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>De.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},jo=le.define();function X_(i){return[SA(),jo.of({...Z_,...i})]}const cQ=le.define({combine:i=>i.some(e=>e)});function SA(i){return[L_]}const L_=gt.fromClass(class{constructor(i){this.view=i,this.domAfter=null,this.prevViewport=i.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=i.state.facet(jo).map(e=>new fQ(i,e)),this.fixed=!i.state.facet(cQ);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),i.scrollDOM.insertBefore(this.dom,i.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(i){if(this.updateGutters(i)){let e=this.prevViewport,t=i.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<(t.to-t.from)*.8)}if(i.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(cQ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=i.view.viewport}syncGutters(i){let e=this.dom.nextSibling;i&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=De.iter(this.view.state.facet(jf),this.view.viewport.from),n=[],s=this.gutters.map(l=>new V_(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(l.type)){let o=!0;for(let c of l.type)if(c.type==qt.Text&&o){Zg(t,n,c.from);for(let f of s)f.line(this.view,c,n);o=!1}else if(c.widget)for(let f of s)f.widget(this.view,c)}else if(l.type==qt.Text){Zg(t,n,l.from);for(let o of s)o.line(this.view,l,n)}else if(l.widget)for(let o of s)o.widget(this.view,l);for(let l of s)l.finish();i&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(i){let e=i.startState.facet(jo),t=i.state.facet(jo),n=i.docChanged||i.heightChanged||i.viewportChanged||!De.eq(i.startState.facet(jf),i.state.facet(jf),i.view.viewport.from,i.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(i)&&(n=!0);else{n=!0;let s=[];for(let l of t){let o=e.indexOf(l);o<0?s.push(new fQ(this.view,l)):(this.gutters[o].update(i),s.push(this.gutters[o]))}for(let l of this.gutters)l.dom.remove(),s.indexOf(l)<0&&l.destroy();for(let l of s)l.config.side=="after"?this.getDOMAfter().appendChild(l.dom):this.dom.appendChild(l.dom);this.gutters=s}return n}destroy(){for(let i of this.gutters)i.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:i=>ne.scrollMargins.of(e=>{let t=e.plugin(i);if(!t||t.gutters.length==0||!t.fixed)return null;let n=t.dom.offsetWidth*e.scaleX,s=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==tt.LTR?{left:n,right:s}:{right:n,left:s}})});function uQ(i){return Array.isArray(i)?i:[i]}function Zg(i,e,t){for(;i.value&&i.from<=t;)i.from==t&&e.push(i.value),i.next()}class V_{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=De.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:s}=this,l=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let c=new xA(e,o,l,n);s.elements.push(c),s.dom.appendChild(c.dom)}else s.elements[this.i].update(e,o,l,n);this.height=t.bottom,this.i++}line(e,t,n){let s=[];Zg(this.cursor,s,t.from),n.length&&(s=s.concat(n));let l=this.gutter.config.lineMarker(e,t,s);l&&s.unshift(l);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),s=n?[n]:null;for(let l of e.state.facet(D_)){let o=l(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class fQ{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,s=>{let l=s.target,o;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let f=l.getBoundingClientRect();o=(f.top+f.bottom)/2}else o=s.clientY;let c=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,c,s)&&s.preventDefault()});this.markers=uQ(t.markers(e)),t.initialSpacer&&(this.spacer=new xA(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=uQ(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let n=e.view.viewport;return!De.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class xA{constructor(e,t,n,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,s)}update(e,t,n,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),__(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let n="cm-gutterElement",s=this.dom.firstChild;for(let l=0,o=0;;){let c=o,f=l<t.length?t[l++]:null,d=!1;if(f){let p=f.elementClass;p&&(n+=" "+p);for(let m=o;m<this.markers.length;m++)if(this.markers[m].compare(f)){c=m,d=!0;break}}else c=this.markers.length;for(;o<c;){let p=this.markers[o++];if(p.toDOM){p.destroy(s);let m=s.nextSibling;s.remove(),s=m}}if(!f)break;f.toDOM&&(d?s=s.nextSibling:this.dom.insertBefore(f.toDOM(e),s)),d&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}function __(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(!i[t].compare(e[t]))return!1;return!0}const j_=le.define(),B_=le.define(),Bl=le.define({combine(i){return Zn(i,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let s in t){let l=n[s],o=t[s];n[s]=l?(c,f,d)=>l(c,f,d)||o(c,f,d):o}return n}})}});class eO extends fs{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function tO(i,e){return i.state.facet(Bl).formatNumber(e,i.state)}const N_=jo.compute([Bl],i=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(j_)},lineMarker(e,t,n){return n.some(s=>s.toDOM)?null:new eO(tO(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let s of e.state.facet(B_)){let l=s(e,t,n);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Bl)!=e.state.facet(Bl),initialSpacer(e){return new eO(tO(e,hQ(e.state.doc.lines)))},updateSpacer(e,t){let n=tO(t.view,hQ(t.view.state.doc.lines));return n==e.number?e:new eO(n)},domEventHandlers:i.facet(Bl).domEventHandlers,side:"before"}));function Y_(i={}){return[Bl.of(i),SA(),N_]}function hQ(i){let e=9;for(;e<i;)e=e*10+9;return e}const q_=new class extends fs{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},U_=jf.compute(["selection"],i=>{let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head).from;s>t&&(t=s,e.push(q_.range(s)))}return De.of(e)});function G_(){return U_}const vA=1024;let W_=0;class Ui{constructor(e,t){this.from=e,this.to=t}}class Te{constructor(e={}){this.id=W_++,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=Pt.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}Te.closedBy=new Te({deserialize:i=>i.split(" ")});Te.openedBy=new Te({deserialize:i=>i.split(" ")});Te.group=new Te({deserialize:i=>i.split(" ")});Te.isolate=new Te({deserialize:i=>{if(i&&i!="rtl"&&i!="ltr"&&i!="auto")throw new RangeError("Invalid value for isolate: "+i);return i||"auto"}});Te.contextHash=new Te({perNode:!0});Te.lookAhead=new Te({perNode:!0});Te.mounted=new Te({perNode:!0});class Hl{constructor(e,t,n,s=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=s}static get(e){return e&&e.props&&e.props[Te.mounted.id]}}const H_=Object.create(null);class Pt{constructor(e,t,n,s=0){this.name=e,this.props=t,this.id=n,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):H_,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Pt(e.name||"",t,e.id,n);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(s)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return s}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 t=this.prop(Te.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let s of n.split(" "))t[s]=e[n];return n=>{for(let s=n.prop(Te.group),l=-1;l<(s?s.length:0);l++){let o=t[l<0?n.name:s[l]];if(o)return o}}}}Pt.none=new Pt("",Object.create(null),0,8);class Pc{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let s=null;for(let l of e){let o=l(n);if(o){s||(s=Object.assign({},n.props));let c=o[1],f=o[0];f.combine&&f.id in s&&(c=f.combine(s[f.id],c)),s[f.id]=c}}t.push(s?new Pt(n.name,s,n.id,n.flags):n)}return new Pc(t)}}const bf=new WeakMap,dQ=new WeakMap;var Ue;(function(i){i[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays",i[i.EnterBracketed=16]="EnterBracketed"})(Ue||(Ue={}));class qe{constructor(e,t,n,s,l){if(this.type=e,this.children=t,this.positions=n,this.length=s,this.props=null,l&&l.length){this.props=Object.create(null);for(let[o,c]of l)this.props[typeof o=="number"?o:o.id]=c}}toString(){let e=Hl.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let s=n.toString();s&&(t&&(t+=","),t+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new ph(this.topNode,e)}cursorAt(e,t=0,n=0){let s=bf.get(this)||this.topNode,l=new ph(s);return l.moveTo(e,t),bf.set(this,l._tree),l}get topNode(){return new Ht(this,0,0,null)}resolve(e,t=0){let n=sc(bf.get(this)||this.topNode,e,t,!1);return bf.set(this,n),n}resolveInner(e,t=0){let n=sc(dQ.get(this)||this.topNode,e,t,!0);return dQ.set(this,n),n}resolveStack(e,t=0){return K_(this,e,t)}iterate(e){let{enter:t,leave:n,from:s=0,to:l=this.length}=e,o=e.mode||0,c=(o&Ue.IncludeAnonymous)>0;for(let f=this.cursor(o|Ue.IncludeAnonymous);;){let d=!1;if(f.from<=l&&f.to>=s&&(!c&&f.type.isAnonymous||t(f)!==!1)){if(f.firstChild())continue;d=!0}for(;d&&n&&(c||!f.type.isAnonymous)&&n(f),!f.nextSibling();){if(!f.parent())return;d=!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 t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:sy(Pt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,s)=>new qe(this.type,t,n,s,this.propValues),e.makeTree||((t,n,s)=>new qe(Pt.none,t,n,s)))}static build(e){return J_(e)}}qe.empty=new qe(Pt.none,[],[],0);class iy{constructor(e,t){this.buffer=e,this.index=t}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 iy(this.buffer,this.index)}}class ir{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Pt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],s=this.set.types[t],l=s.name;if(/\W/.test(l)&&!s.isError&&(l=JSON.stringify(l)),e+=4,n==e)return l;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return l+"("+o.join(",")+")"}findChild(e,t,n,s,l){let{buffer:o}=this,c=-1;for(let f=e;f!=t&&!(wA(l,s,o[f+1],o[f+2])&&(c=f,n>0));f=o[f+3]);return c}slice(e,t,n){let s=this.buffer,l=new Uint16Array(t-e),o=0;for(let c=e,f=0;c<t;){l[f++]=s[c++],l[f++]=s[c++]-n;let d=l[f++]=s[c++]-n;l[f++]=s[c++]-e,o=Math.max(o,d)}return new ir(l,o,this.set)}}function wA(i,e,t,n){switch(i){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function sc(i,e,t,n){for(var s;i.from==i.to||(t<1?i.from>=e:i.from>e)||(t>-1?i.to<=e:i.to<e);){let o=!n&&i instanceof Ht&&i.index<0?null:i.parent;if(!o)return i;i=o}let l=n?0:Ue.IgnoreOverlays;if(n)for(let o=i,c=o.parent;c;o=c,c=o.parent)o instanceof Ht&&o.index<0&&((s=c.enter(e,t,l))===null||s===void 0?void 0:s.from)!=o.from&&(i=c);for(;;){let o=i.enter(e,t,l);if(!o)return i;i=o}}class QA{cursor(e=0){return new ph(this,e)}getChild(e,t=null,n=null){let s=pQ(this,e,t,n);return s.length?s[0]:null}getChildren(e,t=null,n=null){return pQ(this,e,t,n)}resolve(e,t=0){return sc(this,e,t,!1)}resolveInner(e,t=0){return sc(this,e,t,!0)}matchContext(e){return Xg(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let s=t.lastChild;if(!s||s.to!=t.to)break;s.type.isError&&s.from==s.to?(n=t,t=s.prevSibling):t=s}return n}get node(){return this}get next(){return this.parent}}class Ht extends QA{constructor(e,t,n,s){super(),this._tree=e,this.from=t,this.index=n,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,s,l=0){for(let o=this;;){for(let{children:c,positions:f}=o._tree,d=t>0?c.length:-1;e!=d;e+=t){let p=c[e],m=f[e]+o.from,y;if(!(!(l&Ue.EnterBracketed&&p instanceof qe&&(y=Hl.get(p))&&!y.overlay&&y.bracketed&&n>=m&&n<=m+p.length)&&!wA(s,n,m,m+p.length))){if(p instanceof ir){if(l&Ue.ExcludeBuffers)continue;let b=p.findChild(0,p.buffer.length,t,n-m,s);if(b>-1)return new An(new I_(o,p,e,m),null,b)}else if(l&Ue.IncludeAnonymous||!p.type.isAnonymous||ny(p)){let b;if(!(l&Ue.IgnoreMounts)&&(b=Hl.get(p))&&!b.overlay)return new Ht(b.tree,m,e,o);let S=new Ht(p,m,e,o);return l&Ue.IncludeAnonymous||!S.type.isAnonymous?S:S.nextChild(t<0?p.children.length-1:0,t,n,s,l)}}}if(l&Ue.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))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,t,n=0){let s;if(!(n&Ue.IgnoreOverlays)&&(s=Hl.get(this._tree))&&s.overlay){let l=e-this.from,o=n&Ue.EnterBracketed&&s.bracketed;for(let{from:c,to:f}of s.overlay)if((t>0||o?c<=l:c<l)&&(t<0||o?f>=l:f>l))return new Ht(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}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 pQ(i,e,t,n){let s=i.cursor(),l=[];if(!s.firstChild())return l;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return l}for(;;){if(n!=null&&s.type.is(n))return l;if(s.type.is(e)&&l.push(s.node),!s.nextSibling())return n==null?l:[]}}function Xg(i,e,t=e.length-1){for(let n=i;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class I_{constructor(e,t,n,s){this.parent=e,this.buffer=t,this.index=n,this.start=s}}class An extends QA{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,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:s}=this.context,l=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,n);return l<0?null:new An(this.context,this,l)}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,t,n=0){if(n&Ue.ExcludeBuffers)return null;let{buffer:s}=this.context,l=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new An(this.context,this,l)}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,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new An(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new An(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,s=this.index+4,l=n.buffer[this.index+3];if(l>s){let o=n.buffer[this.index+1];e.push(n.slice(s,l,o)),t.push(0)}return new qe(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function kA(i){if(!i.length)return null;let e=0,t=i[0];for(let l=1;l<i.length;l++){let o=i[l];(o.from>t.from||o.to<t.to)&&(t=o,e=l)}let n=t instanceof Ht&&t.index<0?null:t.parent,s=i.slice();return n?s[e]=n:s.splice(e,1),new F_(s,t)}class F_{constructor(e,t){this.heads=e,this.node=t}get next(){return kA(this.heads)}}function K_(i,e,t){let n=i.resolveInner(e,t),s=null;for(let l=n instanceof Ht?n:n.context.parent;l;l=l.parent)if(l.index<0){let o=l.parent;(s||(s=[n])).push(o.resolve(e,t)),l=o}else{let o=Hl.get(l.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let c=new Ht(o.tree,o.overlay[0].from+l.from,-1,l);(s||(s=[n])).push(sc(c,e,t,!1))}}return s?kA(s):n}class ph{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Ue.EnterBracketed,e instanceof Ht)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.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,t){this.index=e;let{start:n,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=n+s.buffer[e+1],this.to=n+s.buffer[e+2],!0}yield(e){return e?e instanceof Ht?(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,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:s}=this.buffer,l=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,n);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}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,t,n=this.mode){return this.buffer?n&Ue.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ue.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ue.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:t}=this.buffer,n=this.stack.length-1;if(e<0){let s=n<0?0:this.stack[n]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(s)}return n<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 t,n,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let l=0;l<this.index;l++)if(s.buffer.buffer[l+3]<this.index)return!1;({index:t,parent:n}=s)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let l=t+e,o=e<0?-1:n._tree.children.length;l!=o;l+=e){let c=n._tree.children[l];if(this.mode&Ue.IncludeAnonymous||c instanceof ir||!c.type.isAnonymous||ny(c))return!1}return!0}move(e,t){if(t&&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,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let s=this.index,l=this.stack.length;l>=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,n=l+1;break e}s=this.stack[--l]}for(let s=n;s<this.stack.length;s++)t=new An(this.buffer,t,this.stack[s]);return this.bufferNode=new An(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&t&&t(this),s=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,s=!0}}}matchContext(e){if(!this.buffer)return Xg(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let s=e.length-1,l=this.stack.length-1;s>=0;l--){if(l<0)return Xg(this._tree,e,s);let o=n[t.buffer[this.stack[l]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function ny(i){return i.children.some(e=>e instanceof ir||!e.type.isAnonymous||ny(e))}function J_(i){var e;let{buffer:t,nodeSet:n,maxBufferLength:s=vA,reused:l=[],minRepeatType:o=n.types.length}=i,c=Array.isArray(t)?new iy(t,t.length):t,f=n.types,d=0,p=0;function m(R,N,_,j,K,Oe){let{id:ce,start:ie,end:xe,size:Se}=c,we=p,X=d;if(Se<0)if(c.next(),Se==-1){let M=l[ce];_.push(M),j.push(ie-R);return}else if(Se==-3){d=ce;return}else if(Se==-4){p=ce;return}else throw new RangeError(`Unrecognized record size: ${Se}`);let W=f[ce],te,oe,F=ie-R;if(xe-ie<=s&&(oe=w(c.pos-N,K))){let M=new Uint16Array(oe.size-oe.skip),Y=c.pos-oe.size,ee=M.length;for(;c.pos>Y;)ee=k(oe.start,M,ee);te=new ir(M,xe-oe.start,n),F=oe.start-R}else{let M=c.pos-Se;c.next();let Y=[],ee=[],re=ce>=o?ce:-1,ue=0,ye=xe;for(;c.pos>M;)re>=0&&c.id==re&&c.size>=0?(c.end<=ye-s&&(S(Y,ee,ie,ue,c.end,ye,re,we,X),ue=Y.length,ye=c.end),c.next()):Oe>2500?y(ie,M,Y,ee):m(ie,M,Y,ee,re,Oe+1);if(re>=0&&ue>0&&ue<Y.length&&S(Y,ee,ie,ue,ie,ye,re,we,X),Y.reverse(),ee.reverse(),re>-1&&ue>0){let Ee=b(W,X);te=sy(W,Y,ee,0,Y.length,0,xe-ie,Ee,Ee)}else te=v(W,Y,ee,xe-ie,we-xe,X)}_.push(te),j.push(F)}function y(R,N,_,j){let K=[],Oe=0,ce=-1;for(;c.pos>N;){let{id:ie,start:xe,end:Se,size:we}=c;if(we>4)c.next();else{if(ce>-1&&xe<ce)break;ce<0&&(ce=Se-s),K.push(ie,xe,Se),Oe++,c.next()}}if(Oe){let ie=new Uint16Array(Oe*4),xe=K[K.length-2];for(let Se=K.length-3,we=0;Se>=0;Se-=3)ie[we++]=K[Se],ie[we++]=K[Se+1]-xe,ie[we++]=K[Se+2]-xe,ie[we++]=we;_.push(new ir(ie,K[2]-xe,n)),j.push(xe-R)}}function b(R,N){return(_,j,K)=>{let Oe=0,ce=_.length-1,ie,xe;if(ce>=0&&(ie=_[ce])instanceof qe){if(!ce&&ie.type==R&&ie.length==K)return ie;(xe=ie.prop(Te.lookAhead))&&(Oe=j[ce]+ie.length+xe)}return v(R,_,j,K,Oe,N)}}function S(R,N,_,j,K,Oe,ce,ie,xe){let Se=[],we=[];for(;R.length>j;)Se.push(R.pop()),we.push(N.pop()+_-K);R.push(v(n.types[ce],Se,we,Oe-K,ie-Oe,xe)),N.push(K-_)}function v(R,N,_,j,K,Oe,ce){if(Oe){let ie=[Te.contextHash,Oe];ce=ce?[ie].concat(ce):[ie]}if(K>25){let ie=[Te.lookAhead,K];ce=ce?[ie].concat(ce):[ie]}return new qe(R,N,_,j,ce)}function w(R,N){let _=c.fork(),j=0,K=0,Oe=0,ce=_.end-s,ie={size:0,start:0,skip:0};e:for(let xe=_.pos-R;_.pos>xe;){let Se=_.size;if(_.id==N&&Se>=0){ie.size=j,ie.start=K,ie.skip=Oe,Oe+=4,j+=4,_.next();continue}let we=_.pos-Se;if(Se<0||we<xe||_.start<ce)break;let X=_.id>=o?4:0,W=_.start;for(_.next();_.pos>we;){if(_.size<0)if(_.size==-3||_.size==-4)X+=4;else break e;else _.id>=o&&(X+=4);_.next()}K=W,j+=Se,Oe+=X}return(N<0||j==R)&&(ie.size=j,ie.start=K,ie.skip=Oe),ie.size>4?ie:void 0}function k(R,N,_){let{id:j,start:K,end:Oe,size:ce}=c;if(c.next(),ce>=0&&j<o){let ie=_;if(ce>4){let xe=c.pos-(ce-4);for(;c.pos>xe;)_=k(R,N,_)}N[--_]=ie,N[--_]=Oe-R,N[--_]=K-R,N[--_]=j}else ce==-3?d=j:ce==-4&&(p=j);return _}let A=[],P=[];for(;c.pos>0;)m(i.start||0,i.bufferStart||0,A,P,-1,0);let V=(e=i.length)!==null&&e!==void 0?e:A.length?P[0]+A[0].length:0;return new qe(f[i.topID],A.reverse(),P.reverse(),V)}const mQ=new WeakMap;function Bf(i,e){if(!i.isAnonymous||e instanceof ir||e.type!=i)return 1;let t=mQ.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=i||!(n instanceof qe)){t=1;break}t+=Bf(i,n)}mQ.set(e,t)}return t}function sy(i,e,t,n,s,l,o,c,f){let d=0;for(let S=n;S<s;S++)d+=Bf(i,e[S]);let p=Math.ceil(d*1.5/8),m=[],y=[];function b(S,v,w,k,A){for(let P=w;P<k;){let V=P,R=v[P],N=Bf(i,S[P]);for(P++;P<k;P++){let _=Bf(i,S[P]);if(N+_>=p)break;N+=_}if(P==V+1){if(N>p){let _=S[V];b(_.children,_.positions,0,_.children.length,v[V]+A);continue}m.push(S[V])}else{let _=v[P-1]+S[P-1].length-R;m.push(sy(i,S,v,V,P,R,_,null,f))}y.push(R+A-l)}}return b(e,t,n,s,0),(c||f)(m,y,o)}class TA{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof An?this.setBuffer(e.context.buffer,e.index,t):e instanceof Ht&&this.map.set(e.tree,t)}get(e){return e instanceof An?this.getBuffer(e.context.buffer,e.index):e instanceof Ht?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class as{constructor(e,t,n,s,l=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=s,this.open=(l?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let s=[new as(0,e.length,e,0,!1,n)];for(let l of t)l.to>e.length&&s.push(l);return s}static applyChanges(e,t,n=128){if(!t.length)return e;let s=[],l=1,o=e.length?e[0]:null;for(let c=0,f=0,d=0;;c++){let p=c<t.length?t[c]:null,m=p?p.fromA:1e9;if(m-f>=n)for(;o&&o.from<m;){let y=o;if(f>=y.from||m<=y.to||d){let b=Math.max(y.from,f)-d,S=Math.min(y.to,m)-d;y=b>=S?null:new as(b,S,y.tree,y.offset+d,c>0,!!p)}if(y&&s.push(y),o.to>m)break;o=l<e.length?e[l++]:null}if(!p)break;f=p.toA,d=p.toA-p.toB}return s}}class ry{startParse(e,t,n){return typeof e=="string"&&(e=new ej(e)),n=n?n.length?n.map(s=>new Ui(s.from,s.to)):[new Ui(0,0)]:[new Ui(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let s=this.startParse(e,t,n);for(;;){let l=s.advance();if(l)return l}}}class ej{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function CA(i){return(e,t,n,s)=>new ij(e,i,t,n,s)}class OQ{constructor(e,t,n,s,l,o){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=s,this.target=l,this.from=o}}function gQ(i){if(!i.length||i.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(i))}class tj{constructor(e,t,n,s,l,o,c,f){this.parser=e,this.predicate=t,this.mounts=n,this.index=s,this.start=l,this.bracketed=o,this.target=c,this.prev=f,this.depth=0,this.ranges=[]}}const Lg=new Te({perNode:!0});class ij{constructor(e,t,n,s,l){this.nest=t,this.input=n,this.fragments=s,this.ranges=l,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new qe(n.type,n.children,n.positions,n.length,n.propValues.concat([[Lg,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Te.mounted.id]=new Hl(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new rj(this.fragments),t=null,n=null,s=new ph(new Ht(this.baseTree,this.ranges[0].from,0,null),Ue.IncludeAnonymous|Ue.IgnoreMounts);e:for(let l,o;;){let c=!0,f;if(this.stoppedAt!=null&&s.from>=this.stoppedAt)c=!1;else if(e.hasNode(s)){if(t){let d=t.mounts.find(p=>p.frag.from<=s.from&&p.frag.to>=s.to&&p.mount.overlay);if(d)for(let p of d.mount.overlay){let m=p.from+d.pos,y=p.to+d.pos;m>=s.from&&y<=s.to&&!t.ranges.some(b=>b.from<y&&b.to>m)&&t.ranges.push({from:m,to:y})}}c=!1}else if(n&&(o=nj(n.ranges,s.from,s.to)))c=o!=2;else if(!s.type.isAnonymous&&(l=this.nest(s,this.input))&&(s.from<s.to||!l.overlay)){s.tree||(sj(s),t&&t.depth++,n&&n.depth++);let d=e.findMounts(s.from,l.parser);if(typeof l.overlay=="function")t=new tj(l.parser,l.overlay,d,this.inner.length,s.from,!!l.bracketed,s.tree,t);else{let p=SQ(this.ranges,l.overlay||(s.from<s.to?[new Ui(s.from,s.to)]:[]));p.length&&gQ(p),(p.length||!l.overlay)&&this.inner.push(new OQ(l.parser,p.length?l.parser.startParse(this.input,xQ(d,p),p):l.parser.startParse(""),l.overlay?l.overlay.map(m=>new Ui(m.from-s.from,m.to-s.from)):null,!!l.bracketed,s.tree,p.length?p[0].from:s.from)),l.overlay?p.length&&(n={ranges:p,depth:0,prev:n}):c=!1}}else if(t&&(f=t.predicate(s))&&(f===!0&&(f=new Ui(s.from,s.to)),f.from<f.to)){let d=t.ranges.length-1;d>=0&&t.ranges[d].to==f.from?t.ranges[d]={from:t.ranges[d].from,to:f.to}:t.ranges.push(f)}if(c&&s.firstChild())t&&t.depth++,n&&n.depth++;else for(;!s.nextSibling();){if(!s.parent())break e;if(t&&!--t.depth){let d=SQ(this.ranges,t.ranges);d.length&&(gQ(d),this.inner.splice(t.index,0,new OQ(t.parser,t.parser.startParse(this.input,xQ(t.mounts,d),d),t.ranges.map(p=>new Ui(p.from-t.start,p.to-t.start)),t.bracketed,t.target,d[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function nj(i,e,t){for(let n of i){if(n.from>=t)break;if(n.to>e)return n.from<=e&&n.to>=t?2:1}return 0}function yQ(i,e,t,n,s,l){if(e<t){let o=i.buffer[e+1];n.push(i.slice(e,t,o)),s.push(o-l)}}function sj(i){let{node:e}=i,t=[],n=e.context.buffer;do t.push(i.index),i.parent();while(!i.tree);let s=i.tree,l=s.children.indexOf(n),o=s.children[l],c=o.buffer,f=[l];function d(p,m,y,b,S,v){let w=t[v],k=[],A=[];yQ(o,p,w,k,A,b);let P=c[w+1],V=c[w+2];f.push(k.length);let R=v?d(w+4,c[w+3],o.set.types[c[w]],P,V-P,v-1):e.toTree();return k.push(R),A.push(P-b),yQ(o,c[w+3],m,k,A,b),new qe(y,k,A,S)}s.children[l]=d(0,c.length,Pt.none,0,o.length,t.length-1);for(let p of f){let m=i.tree.children[p],y=i.tree.positions[p];i.yield(new Ht(m,y+i.from,p,i._tree))}}class bQ{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Ue.IncludeAnonymous|Ue.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,Ue.IgnoreOverlays|Ue.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof qe)t=t.children[0];else break}return!1}}let rj=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(Lg))!==null&&t!==void 0?t:n.to,this.inner=new bQ(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Lg))!==null&&e!==void 0?e:t.to,this.inner=new bQ(t.tree,-t.offset)}}findMounts(e,t){var n;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let l=this.inner.cursor.node;l;l=l.parent){let o=(n=l.tree)===null||n===void 0?void 0:n.prop(Te.mounted);if(o&&o.parser==t)for(let c=this.fragI;c<this.fragments.length;c++){let f=this.fragments[c];if(f.from>=l.to)break;f.tree==this.curFrag.tree&&s.push({frag:f,pos:l.from-f.offset,mount:o})}}}return s}};function SQ(i,e){let t=null,n=e;for(let s=1,l=0;s<i.length;s++){let o=i[s-1].to,c=i[s].from;for(;l<n.length;l++){let f=n[l];if(f.from>=c)break;f.to<=o||(t||(n=t=e.slice()),f.from<o?(t[l]=new Ui(f.from,o),f.to>c&&t.splice(l+1,0,new Ui(c,f.to))):f.to>c?t[l--]=new Ui(c,f.to):t.splice(l--,1))}}return n}function lj(i,e,t,n){let s=0,l=0,o=!1,c=!1,f=-1e9,d=[];for(;;){let p=s==i.length?1e9:o?i[s].to:i[s].from,m=l==e.length?1e9:c?e[l].to:e[l].from;if(o!=c){let y=Math.max(f,t),b=Math.min(p,m,n);y<b&&d.push(new Ui(y,b))}if(f=Math.min(p,m),f==1e9)break;p==f&&(o?(o=!1,s++):o=!0),m==f&&(c?(c=!1,l++):c=!0)}return d}function xQ(i,e){let t=[];for(let{pos:n,mount:s,frag:l}of i){let o=n+(s.overlay?s.overlay[0].from:0),c=o+s.tree.length,f=Math.max(l.from,o),d=Math.min(l.to,c);if(s.overlay){let p=s.overlay.map(y=>new Ui(y.from+n,y.to+n)),m=lj(e,p,f,d);for(let y=0,b=f;;y++){let S=y==m.length,v=S?d:m[y].from;if(v>b&&t.push(new as(b,v,s.tree,-o,l.from>=b||l.openStart,l.to<=v||l.openEnd)),S)break;b=m[y].to}}else t.push(new as(f,d,s.tree,-o,l.from>=o||l.openStart,l.to<=c||l.openEnd))}return t}let aj=0;class $i{constructor(e,t,n,s){this.name=e,this.set=t,this.base=n,this.modified=s,this.id=aj++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof $i&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let s=new $i(n,[],null,[]);if(s.set.push(s),t)for(let l of t.set)s.set.push(l);return s}static defineModifier(e){let t=new mh(e);return n=>n.modified.indexOf(t)>-1?n:mh.get(n.base||n,n.modified.concat(t).sort((s,l)=>s.id-l.id))}}let oj=0;class mh{constructor(e){this.name=e,this.instances=[],this.id=oj++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(c=>c.base==e&&cj(t,c.modified));if(n)return n;let s=[],l=new $i(e.name,s,e,t);for(let c of t)c.instances.push(l);let o=uj(t);for(let c of e.set)if(!c.modified.length)for(let f of o)s.push(mh.get(c,f));return l}}function cj(i,e){return i.length==e.length&&i.every((t,n)=>t==e[n])}function uj(i){let e=[[]];for(let t=0;t<i.length;t++)for(let n=0,s=e.length;n<s;n++)e.push(e[n].concat(i[t]));return e.sort((t,n)=>n.length-t.length)}function pa(i){let e=Object.create(null);for(let t in i){let n=i[t];Array.isArray(n)||(n=[n]);for(let s of t.split(" "))if(s){let l=[],o=2,c=s;for(let m=0;;){if(c=="..."&&m>0&&m+3==s.length){o=1;break}let y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!y)throw new RangeError("Invalid path: "+s);if(l.push(y[0]=="*"?"":y[0][0]=='"'?JSON.parse(y[0]):y[0]),m+=y[0].length,m==s.length)break;let b=s[m++];if(m==s.length&&b=="!"){o=0;break}if(b!="/")throw new RangeError("Invalid path: "+s);c=s.slice(m)}let f=l.length-1,d=l[f];if(!d)throw new RangeError("Invalid path: "+s);let p=new rc(n,o,f>0?l.slice(0,f):null);e[d]=p.sort(e[d])}}return AA.add(e)}const AA=new Te({combine(i,e){let t,n,s;for(;i||e;){if(!i||e&&i.depth>=e.depth?(s=e,e=e.next):(s=i,i=i.next),t&&t.mode==s.mode&&!s.context&&!t.context)continue;let l=new rc(s.tags,s.mode,s.context);t?t.next=l:n=l,t=l}return n}});class rc{constructor(e,t,n,s){this.tags=e,this.mode=t,this.context=n,this.next=s}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}}rc.empty=new rc([],2,null);function PA(i,e){let t=Object.create(null);for(let l of i)if(!Array.isArray(l.tag))t[l.tag.id]=l.class;else for(let o of l.tag)t[o.id]=l.class;let{scope:n,all:s=null}=e||{};return{style:l=>{let o=s;for(let c of l)for(let f of c.set){let d=t[f.id];if(d){o=o?o+" "+d:d;break}}return o},scope:n}}function fj(i,e){let t=null;for(let n of i){let s=n.style(e);s&&(t=t?t+" "+s:s)}return t}function hj(i,e,t,n=0,s=i.length){let l=new dj(n,Array.isArray(e)?e:[e],t);l.highlightRange(i.cursor(),n,s,"",l.highlighters),l.flush(s)}class dj{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,s,l){let{type:o,from:c,to:f}=e;if(c>=n||f<=t)return;o.isTop&&(l=this.highlighters.filter(b=>!b.scope||b.scope(o)));let d=s,p=pj(e)||rc.empty,m=fj(l,p.tags);if(m&&(d&&(d+=" "),d+=m,p.mode==1&&(s+=(s?" ":"")+m)),this.startSpan(Math.max(t,c),d),p.opaque)return;let y=e.tree&&e.tree.prop(Te.mounted);if(y&&y.overlay){let b=e.node.enter(y.overlay[0].from+c,1),S=this.highlighters.filter(w=>!w.scope||w.scope(y.tree.type)),v=e.firstChild();for(let w=0,k=c;;w++){let A=w<y.overlay.length?y.overlay[w]:null,P=A?A.from+c:f,V=Math.max(t,k),R=Math.min(n,P);if(V<R&&v)for(;e.from<R&&(this.highlightRange(e,V,R,s,l),this.startSpan(Math.min(R,e.to),d),!(e.to>=P||!e.nextSibling())););if(!A||P>n)break;k=A.to+c,k>t&&(this.highlightRange(b.cursor(),Math.max(t,A.from+c),Math.min(n,k),"",S),this.startSpan(Math.min(n,k),d))}v&&e.parent()}else if(e.firstChild()){y&&(s="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,s,l),this.startSpan(Math.min(n,e.to),d)}while(e.nextSibling());e.parent()}}}function pj(i){let e=i.type.prop(AA);for(;e&&e.context&&!i.matchContext(e.context);)e=e.next;return e||null}const se=$i.define,Sf=se(),qs=se(),vQ=se(qs),wQ=se(qs),Us=se(),xf=se(Us),iO=se(Us),vn=se(),Ar=se(vn),Sn=se(),xn=se(),Vg=se(),bo=se(Vg),vf=se(),T={comment:Sf,lineComment:se(Sf),blockComment:se(Sf),docComment:se(Sf),name:qs,variableName:se(qs),typeName:vQ,tagName:se(vQ),propertyName:wQ,attributeName:se(wQ),className:se(qs),labelName:se(qs),namespace:se(qs),macroName:se(qs),literal:Us,string:xf,docString:se(xf),character:se(xf),attributeValue:se(xf),number:iO,integer:se(iO),float:se(iO),bool:se(Us),regexp:se(Us),escape:se(Us),color:se(Us),url:se(Us),keyword:Sn,self:se(Sn),null:se(Sn),atom:se(Sn),unit:se(Sn),modifier:se(Sn),operatorKeyword:se(Sn),controlKeyword:se(Sn),definitionKeyword:se(Sn),moduleKeyword:se(Sn),operator:xn,derefOperator:se(xn),arithmeticOperator:se(xn),logicOperator:se(xn),bitwiseOperator:se(xn),compareOperator:se(xn),updateOperator:se(xn),definitionOperator:se(xn),typeOperator:se(xn),controlOperator:se(xn),punctuation:Vg,separator:se(Vg),bracket:bo,angleBracket:se(bo),squareBracket:se(bo),paren:se(bo),brace:se(bo),content:vn,heading:Ar,heading1:se(Ar),heading2:se(Ar),heading3:se(Ar),heading4:se(Ar),heading5:se(Ar),heading6:se(Ar),contentSeparator:se(vn),list:se(vn),quote:se(vn),emphasis:se(vn),strong:se(vn),link:se(vn),monospace:se(vn),strikethrough:se(vn),inserted:se(),deleted:se(),changed:se(),invalid:se(),meta:vf,documentMeta:se(vf),annotation:se(vf),processingInstruction:se(vf),definition:$i.defineModifier("definition"),constant:$i.defineModifier("constant"),function:$i.defineModifier("function"),standard:$i.defineModifier("standard"),local:$i.defineModifier("local"),special:$i.defineModifier("special")};for(let i in T){let e=T[i];e instanceof $i&&(e.name=i)}PA([{tag:T.link,class:"tok-link"},{tag:T.heading,class:"tok-heading"},{tag:T.emphasis,class:"tok-emphasis"},{tag:T.strong,class:"tok-strong"},{tag:T.keyword,class:"tok-keyword"},{tag:T.atom,class:"tok-atom"},{tag:T.bool,class:"tok-bool"},{tag:T.url,class:"tok-url"},{tag:T.labelName,class:"tok-labelName"},{tag:T.inserted,class:"tok-inserted"},{tag:T.deleted,class:"tok-deleted"},{tag:T.literal,class:"tok-literal"},{tag:T.string,class:"tok-string"},{tag:T.number,class:"tok-number"},{tag:[T.regexp,T.escape,T.special(T.string)],class:"tok-string2"},{tag:T.variableName,class:"tok-variableName"},{tag:T.local(T.variableName),class:"tok-variableName tok-local"},{tag:T.definition(T.variableName),class:"tok-variableName tok-definition"},{tag:T.special(T.variableName),class:"tok-variableName2"},{tag:T.definition(T.propertyName),class:"tok-propertyName tok-definition"},{tag:T.typeName,class:"tok-typeName"},{tag:T.namespace,class:"tok-namespace"},{tag:T.className,class:"tok-className"},{tag:T.macroName,class:"tok-macroName"},{tag:T.propertyName,class:"tok-propertyName"},{tag:T.operator,class:"tok-operator"},{tag:T.comment,class:"tok-comment"},{tag:T.meta,class:"tok-meta"},{tag:T.invalid,class:"tok-invalid"},{tag:T.punctuation,class:"tok-punctuation"}]);var nO;const Lr=new Te;function ly(i){return le.define({combine:i?e=>e.concat(i):void 0})}const ay=new Te;class Gi{constructor(e,t,n=[],s=""){this.data=e,this.name=s,Le.prototype.hasOwnProperty("tree")||Object.defineProperty(Le.prototype,"tree",{get(){return it(this)}}),this.parser=t,this.extension=[nr.of(this),Le.languageData.of((l,o,c)=>{let f=QQ(l,o,c),d=f.type.prop(Lr);if(!d)return[];let p=l.facet(d),m=f.type.prop(ay);if(m){let y=f.resolve(o-f.from,c);for(let b of m)if(b.test(y,l)){let S=l.facet(b.facet);return b.type=="replace"?S:S.concat(p)}}return p})].concat(n)}isActiveAt(e,t,n=-1){return QQ(e,t,n).type.prop(Lr)==this.data}findRegions(e){let t=e.facet(nr);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],s=(l,o)=>{if(l.prop(Lr)==this.data){n.push({from:o,to:o+l.length});return}let c=l.prop(Te.mounted);if(c){if(c.tree.prop(Lr)==this.data){if(c.overlay)for(let f of c.overlay)n.push({from:f.from+o,to:f.to+o});else n.push({from:o,to:o+l.length});return}else if(c.overlay){let f=n.length;if(s(c.tree,c.overlay[0].from+o),n.length>f)return}}for(let f=0;f<l.children.length;f++){let d=l.children[f];d instanceof qe&&s(d,l.positions[f]+o)}};return s(it(e),0),n}get allowsNesting(){return!0}}Gi.setState=ke.define();function QQ(i,e,t){let n=i.facet(nr),s=it(i).topNode;if(!n||n.allowsNesting)for(let l=s;l;l=l.enter(e,t,Ue.ExcludeBuffers|Ue.EnterBracketed))l.type.isTop&&(s=l);return s}class sa extends Gi{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=ly(e.languageData);return new sa(t,e.parser.configure({props:[Lr.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new sa(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function it(i){let e=i.field(Gi.state,!1);return e?e.tree:qe.empty}class mj{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,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let So=null;class lc{constructor(e,t,n=[],s,l,o,c,f){this.parser=e,this.state=t,this.fragments=n,this.tree=s,this.treeLen=l,this.viewport=o,this.skipped=c,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new lc(e,t,[],qe.empty,0,n,[],null)}startParse(){return this.parser.startParse(new mj(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=qe.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(as.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(as.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=So;So=this;try{return e()}finally{So=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=kQ(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:s,treeLen:l,viewport:o,skipped:c}=this;if(this.takeTree(),!e.empty){let f=[];if(e.iterChangedRanges((d,p,m,y)=>f.push({fromA:d,toA:p,fromB:m,toB:y})),n=as.applyChanges(n,f),s=qe.empty,l=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){c=[];for(let d of this.skipped){let p=e.mapPos(d.from,1),m=e.mapPos(d.to,-1);p<m&&c.push({from:p,to:m})}}}return new lc(this.parser,t,n,s,l,o,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:s,to:l}=this.skipped[n];s<e.to&&l>e.from&&(this.fragments=kQ(this.fragments,s,l),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends ry{createParse(t,n,s){let l=s[0].from,o=s[s.length-1].to;return{parsedPos:l,advance(){let f=So;if(f){for(let d of s)f.tempSkipped.push(d);e&&(f.scheduleOn=f.scheduleOn?Promise.all([f.scheduleOn,e]):e)}return this.parsedPos=o,new qe(Pt.none,[],[],o-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return So}}function kQ(i,e,t){return as.applyChanges(i,[{fromA:e,toA:t,fromB:e,toB:t}])}class ra{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new ra(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=lc.create(e.facet(nr).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new ra(n)}}Gi.state=Dt.define({create:ra.init,update(i,e){for(let t of e.effects)if(t.is(Gi.setState))return t.value;return e.startState.facet(nr)!=e.state.facet(nr)?ra.init(e.state):i.apply(e)}});let $A=i=>{let e=setTimeout(()=>i(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&($A=i=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(i,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const sO=typeof navigator<"u"&&(!((nO=navigator.scheduling)===null||nO===void 0)&&nO.isInputPending)?()=>navigator.scheduling.isInputPending():null,Oj=gt.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 t=this.view.state.field(Gi.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Gi.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=$A(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:s}}=this.view,l=n.field(Gi.state);if(l.tree==l.context.tree&&l.context.isDone(s+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!sO?Math.max(25,e.timeRemaining()-5):1e9),c=l.context.treeLen<s&&n.doc.length>s+1e3,f=l.context.work(()=>sO&&sO()||Date.now()>o,s+(c?0:1e5));this.chunkBudget-=Date.now()-t,(f||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:Gi.setState.of(new ra(l.context))})),this.chunkBudget>0&&!(f&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>di(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),nr=le.define({combine(i){return i.length?i[0]:null},enables:i=>[Gi.state,Oj,ne.contentAttributes.compute([i],e=>{let t=e.facet(i);return t&&t.name?{"data-language":t.name}:{}})]});class ac{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Oh{constructor(e,t,n,s,l,o=void 0){this.name=e,this.alias=t,this.extensions=n,this.filename=s,this.loadFunc=l,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:n}=e;if(!t){if(!n)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(n)}return new Oh(e.name,(e.alias||[]).concat(e.name).map(s=>s.toLowerCase()),e.extensions||[],e.filename,t,n)}static matchFilename(e,t){for(let s of e)if(s.filename&&s.filename.test(t))return s;let n=/\.([^.]+)$/.exec(t);if(n){for(let s of e)if(s.extensions.indexOf(n[1])>-1)return s}return null}static matchLanguageName(e,t,n=!0){t=t.toLowerCase();for(let s of e)if(s.alias.some(l=>l==t))return s;if(n)for(let s of e)for(let l of s.alias){let o=t.indexOf(l);if(o>-1&&(l.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+l.length])))return s}return null}}const gj=le.define(),ma=le.define({combine:i=>{if(!i.length)return" ";let e=i[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(i[0]));return e}});function gh(i){let e=i.facet(ma);return e.charCodeAt(0)==9?i.tabSize*e.length:e.length}function oc(i,e){let t="",n=i.tabSize,s=i.facet(ma)[0];if(s==" "){for(;e>=n;)t+=" ",e-=n;s=" "}for(let l=0;l<e;l++)t+=s;return t}function oy(i,e){i instanceof Le&&(i=new qh(i));for(let n of i.state.facet(gj)){let s=n(i,e);if(s!==void 0)return s}let t=it(i.state);return t.length>=e?yj(i,t,e):null}class qh{constructor(e,t={}){this.state=e,this.options=t,this.unit=gh(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:l}=this.options;return s!=null&&s>=n.from&&s<=n.to?l&&s==e?{text:"",from:e}:(t<0?s<e:s<=e)?{text:n.text.slice(s-n.from),from:s}:{text:n.text.slice(0,s-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:s}=this.lineAt(e,t);return n.slice(e-s,Math.min(n.length,e+100-s))}column(e,t=1){let{text:n,from:s}=this.lineAt(e,t),l=this.countColumn(n,e-s),o=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return o>-1&&(l+=o-this.countColumn(n,n.search(/\S|$/))),l}countColumn(e,t=e.length){return un(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:s}=this.lineAt(e,t),l=this.options.overrideIndentation;if(l){let o=l(s);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const $c=new Te;function yj(i,e,t){let n=e.resolveStack(t),s=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(s!=n.node){let l=[];for(let o=s;o&&!(o.from<n.node.from||o.to>n.node.to||o.from==n.node.from&&o.type==n.node.type);o=o.parent)l.push(o);for(let o=l.length-1;o>=0;o--)n={node:l[o],next:n}}return MA(n,i,t)}function MA(i,e,t){for(let n=i;n;n=n.next){let s=Sj(n.node);if(s)return s(cy.create(e,t,n))}return 0}function bj(i){return i.pos==i.options.simulateBreak&&i.options.simulateDoubleBreak}function Sj(i){let e=i.type.prop($c);if(e)return e;let t=i.firstChild,n;if(t&&(n=t.type.prop(Te.closedBy))){let s=i.lastChild,l=s&&n.indexOf(s.name)>-1;return o=>EA(o,!0,1,void 0,l&&!bj(o)?s.from:void 0)}return i.parent==null?xj:null}function xj(){return 0}class cy extends qh{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new cy(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(vj(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return MA(this.context.next,this.base,this.pos)}}function vj(i,e){for(let t=e;t;t=t.parent)if(i==t)return!0;return!1}function wj(i){let e=i.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let s=i.options.simulateBreak,l=i.state.doc.lineAt(t.from),o=s==null||s<=l.from?l.to:Math.min(l.to,s);for(let c=t.to;;){let f=e.childAfter(c);if(!f||f==n)return null;if(!f.type.isSkipped){if(f.from>=o)return null;let d=/^ */.exec(l.text.slice(t.to-l.from))[0].length;return{from:t.from,to:t.to+d}}c=f.to}}function Qj({closing:i,align:e=!0,units:t=1}){return n=>EA(n,e,t,i)}function EA(i,e,t,n,s){let l=i.textAfter,o=l.match(/^\s*/)[0].length,c=n&&l.slice(o,o+n.length)==n||s==i.pos+o,f=e?wj(i):null;return f?c?i.column(f.from):i.column(f.to):i.baseIndent+(c?0:i.unit*t)}const kj=i=>i.baseIndent;function Nf({except:i,units:e=1}={}){return t=>{let n=i&&i.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const Tj=200;function Cj(){return Le.transactionFilter.of(i=>{if(!i.docChanged||!i.isUserEvent("input.type")&&!i.isUserEvent("input.complete"))return i;let e=i.startState.languageDataAt("indentOnInput",i.startState.selection.main.head);if(!e.length)return i;let t=i.newDoc,{head:n}=i.newSelection.main,s=t.lineAt(n);if(n>s.from+Tj)return i;let l=t.sliceString(s.from,n);if(!e.some(d=>d.test(l)))return i;let{state:o}=i,c=-1,f=[];for(let{head:d}of o.selection.ranges){let p=o.doc.lineAt(d);if(p.from==c)continue;c=p.from;let m=oy(o,p.from);if(m==null)continue;let y=/^\s*/.exec(p.text)[0],b=oc(o,m);y!=b&&f.push({from:p.from,to:p.from+y.length,insert:b})}return f.length?[i,{changes:f,sequential:!0}]:i})}const RA=le.define(),Oa=new Te;function zA(i){let e=i.firstChild,t=i.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?i.to:t.from}:null}function Aj(i,e,t){let n=it(i);if(n.length<t)return null;let s=n.resolveStack(t,1),l=null;for(let o=s;o;o=o.next){let c=o.node;if(c.to<=t||c.from>t)continue;if(l&&c.from<e)break;let f=c.type.prop(Oa);if(f&&(c.to<n.length-50||n.length==i.doc.length||!Pj(c))){let d=f(c,i);d&&d.from<=t&&d.from>=e&&d.to>t&&(l=d)}}return l}function Pj(i){let e=i.lastChild;return e&&e.to==i.to&&e.type.isError}function yh(i,e,t){for(let n of i.facet(RA)){let s=n(i,e,t);if(s)return s}return Aj(i,e,t)}function DA(i,e){let t=e.mapPos(i.from,1),n=e.mapPos(i.to,-1);return t>=n?void 0:{from:t,to:n}}const Uh=ke.define({map:DA}),Mc=ke.define({map:DA});function ZA(i){let e=[];for(let{head:t}of i.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(i.lineBlockAt(t));return e}const qr=Dt.define({create(){return be.none},update(i,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,n)=>i=TQ(i,t,n)),i=i.map(e.changes);for(let t of e.effects)if(t.is(Uh)&&!$j(i,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(VA),s=n?be.replace({widget:new Xj(n(e.state,t.value))}):CQ;i=i.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(Mc)&&(i=i.update({filter:(n,s)=>t.value.from!=n||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(i=TQ(i,e.selection.main.head)),i},provide:i=>ne.decorations.from(i),toJSON(i,e){let t=[];return i.between(0,e.doc.length,(n,s)=>{t.push(n,s)}),t},fromJSON(i){if(!Array.isArray(i)||i.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<i.length;){let n=i[t++],s=i[t++];if(typeof n!="number"||typeof s!="number")throw new RangeError("Invalid JSON for fold state");e.push(CQ.range(n,s))}return be.set(e,!0)}});function TQ(i,e,t=e){let n=!1;return i.between(e,t,(s,l)=>{s<t&&l>e&&(n=!0)}),n?i.update({filterFrom:e,filterTo:t,filter:(s,l)=>s>=t||l<=e}):i}function bh(i,e,t){var n;let s=null;return(n=i.field(qr,!1))===null||n===void 0||n.between(e,t,(l,o)=>{(!s||s.from>l)&&(s={from:l,to:o})}),s}function $j(i,e,t){let n=!1;return i.between(e,e,(s,l)=>{s==e&&l==t&&(n=!0)}),n}function XA(i,e){return i.field(qr,!1)?e:e.concat(ke.appendConfig.of(_A()))}const Mj=i=>{for(let e of ZA(i)){let t=yh(i.state,e.from,e.to);if(t)return i.dispatch({effects:XA(i.state,[Uh.of(t),LA(i,t)])}),!0}return!1},Ej=i=>{if(!i.state.field(qr,!1))return!1;let e=[];for(let t of ZA(i)){let n=bh(i.state,t.from,t.to);n&&e.push(Mc.of(n),LA(i,n,!1))}return e.length&&i.dispatch({effects:e}),e.length>0};function LA(i,e,t=!0){let n=i.state.doc.lineAt(e.from).number,s=i.state.doc.lineAt(e.to).number;return ne.announce.of(`${i.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${i.state.phrase("to")} ${s}.`)}const Rj=i=>{let{state:e}=i,t=[];for(let n=0;n<e.doc.length;){let s=i.lineBlockAt(n),l=yh(e,s.from,s.to);l&&t.push(Uh.of(l)),n=(l?i.lineBlockAt(l.to):s).to+1}return t.length&&i.dispatch({effects:XA(i.state,t)}),!!t.length},zj=i=>{let e=i.state.field(qr,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,i.state.doc.length,(n,s)=>{t.push(Mc.of({from:n,to:s}))}),i.dispatch({effects:t}),!0},Dj=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Mj},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Ej},{key:"Ctrl-Alt-[",run:Rj},{key:"Ctrl-Alt-]",run:zj}],Zj={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},VA=le.define({combine(i){return Zn(i,Zj)}});function _A(i){return[qr,_j]}function jA(i,e){let{state:t}=i,n=t.facet(VA),s=o=>{let c=i.lineBlockAt(i.posAtDOM(o.target)),f=bh(i.state,c.from,c.to);f&&i.dispatch({effects:Mc.of(f)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(i,s,e);let l=document.createElement("span");return l.textContent=n.placeholderText,l.setAttribute("aria-label",t.phrase("folded code")),l.title=t.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=s,l}const CQ=be.replace({widget:new class extends hn{toDOM(i){return jA(i,null)}}});class Xj extends hn{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return jA(e,this.value)}}const Lj={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class rO extends fs{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function Vj(i={}){let e={...Lj,...i},t=new rO(e,!0),n=new rO(e,!1),s=gt.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(nr)!=o.state.facet(nr)||o.startState.field(qr,!1)!=o.state.field(qr,!1)||it(o.startState)!=it(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let c=new cs;for(let f of o.viewportLineBlocks){let d=bh(o.state,f.from,f.to)?n:yh(o.state,f.from,f.to)?t:null;d&&c.add(f.from,f.from,d)}return c.finish()}}),{domEventHandlers:l}=e;return[s,X_({class:"cm-foldGutter",markers(o){var c;return((c=o.plugin(s))===null||c===void 0?void 0:c.markers)||De.empty},initialSpacer(){return new rO(e,!1)},domEventHandlers:{...l,click:(o,c,f)=>{if(l.click&&l.click(o,c,f))return!0;let d=bh(o.state,c.from,c.to);if(d)return o.dispatch({effects:Mc.of(d)}),!0;let p=yh(o.state,c.from,c.to);return p?(o.dispatch({effects:Uh.of(p)}),!0):!1}}}),_A()]}const _j=ne.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 Ec{constructor(e,t){this.specs=e;let n;function s(c){let f=Js.newName();return(n||(n=Object.create(null)))["."+f]=c,f}const l=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof Gi?c=>c.prop(Lr)==o.data:o?c=>c==o:void 0,this.style=PA(e.map(c=>({tag:c.tag,class:c.class||s(Object.assign({},c,{tag:null}))})),{all:l}).style,this.module=n?new Js(n):null,this.themeType=t.themeType}static define(e,t){return new Ec(e,t||{})}}const _g=le.define(),BA=le.define({combine(i){return i.length?[i[0]]:null}});function lO(i){let e=i.facet(_g);return e.length?e:i.facet(BA)}function NA(i,e){let t=[Bj],n;return i instanceof Ec&&(i.module&&t.push(ne.styleModule.of(i.module)),n=i.themeType),e!=null&&e.fallback?t.push(BA.of(i)):n?t.push(_g.computeN([ne.darkTheme],s=>s.facet(ne.darkTheme)==(n=="dark")?[i]:[])):t.push(_g.of(i)),t}class jj{constructor(e){this.markCache=Object.create(null),this.tree=it(e.state),this.decorations=this.buildDeco(e,lO(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=it(e.state),n=lO(e.state),s=n!=lO(e.startState),{viewport:l}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<l.to&&!s&&t.type==this.tree.type&&o>=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=l.to)}buildDeco(e,t){if(!t||!this.tree.length)return be.none;let n=new cs;for(let{from:s,to:l}of e.visibleRanges)hj(this.tree,t,(o,c,f)=>{n.add(o,c,this.markCache[f]||(this.markCache[f]=be.mark({class:f})))},s,l);return n.finish()}}const Bj=hs.high(gt.fromClass(jj,{decorations:i=>i.decorations})),Nj=Ec.define([{tag:T.meta,color:"#404740"},{tag:T.link,textDecoration:"underline"},{tag:T.heading,textDecoration:"underline",fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strong,fontWeight:"bold"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.keyword,color:"#708"},{tag:[T.atom,T.bool,T.url,T.contentSeparator,T.labelName],color:"#219"},{tag:[T.literal,T.inserted],color:"#164"},{tag:[T.string,T.deleted],color:"#a11"},{tag:[T.regexp,T.escape,T.special(T.string)],color:"#e40"},{tag:T.definition(T.variableName),color:"#00f"},{tag:T.local(T.variableName),color:"#30a"},{tag:[T.typeName,T.namespace],color:"#085"},{tag:T.className,color:"#167"},{tag:[T.special(T.variableName),T.macroName],color:"#256"},{tag:T.definition(T.propertyName),color:"#00c"},{tag:T.comment,color:"#940"},{tag:T.invalid,color:"#f00"}]),Yj=ne.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),YA=1e4,qA="()[]{}",UA=le.define({combine(i){return Zn(i,{afterCursor:!0,brackets:qA,maxScanDistance:YA,renderMatch:Gj})}}),qj=be.mark({class:"cm-matchingBracket"}),Uj=be.mark({class:"cm-nonmatchingBracket"});function Gj(i){let e=[],t=i.matched?qj:Uj;return e.push(t.range(i.start.from,i.start.to)),i.end&&e.push(t.range(i.end.from,i.end.to)),e}const Wj=Dt.define({create(){return be.none},update(i,e){if(!e.docChanged&&!e.selection)return i;let t=[],n=e.state.facet(UA);for(let s of e.state.selection.ranges){if(!s.empty)continue;let l=Pn(e.state,s.head,-1,n)||s.head>0&&Pn(e.state,s.head-1,1,n)||n.afterCursor&&(Pn(e.state,s.head,1,n)||s.head<e.state.doc.length&&Pn(e.state,s.head+1,-1,n));l&&(t=t.concat(n.renderMatch(l,e.state)))}return be.set(t,!0)},provide:i=>ne.decorations.from(i)}),Hj=[Wj,Yj];function Ij(i={}){return[UA.of(i),Hj]}const GA=new Te;function jg(i,e,t){let n=i.prop(e<0?Te.openedBy:Te.closedBy);if(n)return n;if(i.name.length==1){let s=t.indexOf(i.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Bg(i){let e=i.type.prop(GA);return e?e(i.node):i}function Pn(i,e,t,n={}){let s=n.maxScanDistance||YA,l=n.brackets||qA,o=it(i),c=o.resolveInner(e,t);for(let f=c;f;f=f.parent){let d=jg(f.type,t,l);if(d&&f.from<f.to){let p=Bg(f);if(p&&(t>0?e>=p.from&&e<p.to:e>p.from&&e<=p.to))return Fj(i,e,t,f,p,d,l)}}return Kj(i,e,t,o,c.type,s,l)}function Fj(i,e,t,n,s,l,o){let c=n.parent,f={from:s.from,to:s.to},d=0,p=c==null?void 0:c.cursor();if(p&&(t<0?p.childBefore(n.from):p.childAfter(n.to)))do if(t<0?p.to<=n.from:p.from>=n.to){if(d==0&&l.indexOf(p.type.name)>-1&&p.from<p.to){let m=Bg(p);return{start:f,end:m?{from:m.from,to:m.to}:void 0,matched:!0}}else if(jg(p.type,t,o))d++;else if(jg(p.type,-t,o)){if(d==0){let m=Bg(p);return{start:f,end:m&&m.from<m.to?{from:m.from,to:m.to}:void 0,matched:!1}}d--}}while(t<0?p.prevSibling():p.nextSibling());return{start:f,matched:!1}}function Kj(i,e,t,n,s,l,o){let c=t<0?i.sliceDoc(e-1,e):i.sliceDoc(e,e+1),f=o.indexOf(c);if(f<0||f%2==0!=t>0)return null;let d={from:t<0?e-1:e,to:t>0?e+1:e},p=i.doc.iterRange(e,t>0?i.doc.length:0),m=0;for(let y=0;!p.next().done&&y<=l;){let b=p.value;t<0&&(y+=b.length);let S=e+y*t;for(let v=t>0?0:b.length-1,w=t>0?b.length:-1;v!=w;v+=t){let k=o.indexOf(b[v]);if(!(k<0||n.resolveInner(S+v,1).type!=s))if(k%2==0==t>0)m++;else{if(m==1)return{start:d,end:{from:S+v,to:S+v+1},matched:k>>1==f>>1};m--}}t>0&&(y+=b.length)}return p.done?{start:d,matched:!1}:null}const Jj=Object.create(null),AQ=[Pt.none],PQ=[],$Q=Object.create(null),eB=Object.create(null);for(let[i,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"]])eB[i]=tB(Jj,e);function aO(i,e){PQ.indexOf(i)>-1||(PQ.push(i),console.warn(e))}function tB(i,e){let t=[];for(let c of e.split(" ")){let f=[];for(let d of c.split(".")){let p=i[d]||T[d];p?typeof p=="function"?f.length?f=f.map(p):aO(d,`Modifier ${d} used at start of tag`):f.length?aO(d,`Tag ${d} used as modifier`):f=Array.isArray(p)?p:[p]:aO(d,`Unknown highlighting tag ${d}`)}for(let d of f)t.push(d)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),s=n+" "+t.map(c=>c.id),l=$Q[s];if(l)return l.id;let o=$Q[s]=Pt.define({id:AQ.length,name:n,props:[pa({[n]:t})]});return AQ.push(o),o.id}tt.RTL,tt.LTR;const iB=i=>{let{state:e}=i,t=e.doc.lineAt(e.selection.main.from),n=fy(i.state,t.from);return n.line?nB(i):n.block?rB(i):!1};function uy(i,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=i(e,t);return s?(n(t.update(s)),!0):!1}}const nB=uy(oB,0),sB=uy(WA,0),rB=uy((i,e)=>WA(i,e,aB(e)),0);function fy(i,e){let t=i.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const xo=50;function lB(i,{open:e,close:t},n,s){let l=i.sliceDoc(n-xo,n),o=i.sliceDoc(s,s+xo),c=/\s*$/.exec(l)[0].length,f=/^\s*/.exec(o)[0].length,d=l.length-c;if(l.slice(d-e.length,d)==e&&o.slice(f,f+t.length)==t)return{open:{pos:n-c,margin:c&&1},close:{pos:s+f,margin:f&&1}};let p,m;s-n<=2*xo?p=m=i.sliceDoc(n,s):(p=i.sliceDoc(n,n+xo),m=i.sliceDoc(s-xo,s));let y=/^\s*/.exec(p)[0].length,b=/\s*$/.exec(m)[0].length,S=m.length-b-t.length;return p.slice(y,y+e.length)==e&&m.slice(S,S+t.length)==t?{open:{pos:n+y+e.length,margin:/\s/.test(p.charAt(y+e.length))?1:0},close:{pos:s-b-t.length,margin:/\s/.test(m.charAt(S-1))?1:0}}:null}function aB(i){let e=[];for(let t of i.selection.ranges){let n=i.doc.lineAt(t.from),s=t.to<=n.to?n:i.doc.lineAt(t.to);s.from>n.from&&s.from==t.to&&(s=t.to==n.to+1?n:i.doc.lineAt(t.to-1));let l=e.length-1;l>=0&&e[l].to>n.from?e[l].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}function WA(i,e,t=e.selection.ranges){let n=t.map(l=>fy(e,l.from).block);if(!n.every(l=>l))return null;let s=t.map((l,o)=>lB(e,n[o],l.from,l.to));if(i!=2&&!s.every(l=>l))return{changes:e.changes(t.map((l,o)=>s[o]?[]:[{from:l.from,insert:n[o].open+" "},{from:l.to,insert:" "+n[o].close}]))};if(i!=1&&s.some(l=>l)){let l=[];for(let o=0,c;o<s.length;o++)if(c=s[o]){let f=n[o],{open:d,close:p}=c;l.push({from:d.pos-f.open.length,to:d.pos+d.margin},{from:p.pos-p.margin,to:p.pos+f.close.length})}return{changes:l}}return null}function oB(i,e,t=e.selection.ranges){let n=[],s=-1;e:for(let{from:l,to:o}of t){let c=n.length,f=1e9,d;for(let p=l;p<=o;){let m=e.doc.lineAt(p);if(d==null&&(d=fy(e,m.from).line,!d))continue e;if(m.from>s&&(l==o||o>m.from)){s=m.from;let y=/^\s*/.exec(m.text)[0].length,b=y==m.length,S=m.text.slice(y,y+d.length)==d?y:-1;y<m.text.length&&y<f&&(f=y),n.push({line:m,comment:S,token:d,indent:y,empty:b,single:!1})}p=m.to+1}if(f<1e9)for(let p=c;p<n.length;p++)n[p].indent<n[p].line.text.length&&(n[p].indent=f);n.length==c+1&&(n[c].single=!0)}if(i!=2&&n.some(l=>l.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:c,token:f,indent:d,empty:p,single:m}of n)(m||!p)&&l.push({from:c.from+d,insert:f+" "});let o=e.changes(l);return{changes:o,selection:e.selection.map(o,1)}}else if(i!=1&&n.some(l=>l.comment>=0)){let l=[];for(let{line:o,comment:c,token:f}of n)if(c>=0){let d=o.from+c,p=d+f.length;o.text[p-o.from]==" "&&p++,l.push({from:d,to:p})}return{changes:l}}return null}const Ng=Dn.define(),cB=Dn.define(),uB=le.define(),HA=le.define({combine(i){return Zn(i,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,s)=>e(n,s)||t(n,s)})}}),IA=Dt.define({create(){return $n.empty},update(i,e){let t=e.state.facet(HA),n=e.annotation(Ng);if(n){let f=pi.fromTransaction(e,n.selection),d=n.side,p=d==0?i.undone:i.done;return f?p=Sh(p,p.length,t.minDepth,f):p=JA(p,e.startState.selection),new $n(d==0?n.rest:p,d==0?p:n.rest)}let s=e.annotation(cB);if((s=="full"||s=="before")&&(i=i.isolate()),e.annotation(wt.addToHistory)===!1)return e.changes.empty?i:i.addMapping(e.changes.desc);let l=pi.fromTransaction(e),o=e.annotation(wt.time),c=e.annotation(wt.userEvent);return l?i=i.addChanges(l,o,c,t,e):e.selection&&(i=i.addSelection(e.startState.selection,o,c,t.newGroupDelay)),(s=="full"||s=="after")&&(i=i.isolate()),i},toJSON(i){return{done:i.done.map(e=>e.toJSON()),undone:i.undone.map(e=>e.toJSON())}},fromJSON(i){return new $n(i.done.map(pi.fromJSON),i.undone.map(pi.fromJSON))}});function fB(i={}){return[IA,HA.of(i),ne.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?FA:e.inputType=="historyRedo"?Yg:null;return n?(e.preventDefault(),n(t)):!1}})]}function Gh(i,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let s=t.field(IA,!1);if(!s)return!1;let l=s.pop(i,t,e);return l?(n(l),!0):!1}}const FA=Gh(0,!1),Yg=Gh(1,!1),hB=Gh(0,!0),dB=Gh(1,!0);class pi{constructor(e,t,n,s,l){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=s,this.selectionsAfter=l}setSelAfter(e){return new pi(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new pi(e.changes&&At.fromJSON(e.changes),[],e.mapped&&En.fromJSON(e.mapped),e.startSelection&&G.fromJSON(e.startSelection),e.selectionsAfter.map(G.fromJSON))}static fromTransaction(e,t){let n=Wi;for(let s of e.startState.facet(uB)){let l=s(e);l.length&&(n=n.concat(l))}return!n.length&&e.changes.empty?null:new pi(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Wi)}static selection(e){return new pi(void 0,Wi,void 0,void 0,e)}}function Sh(i,e,t,n){let s=e+1>t+20?e-t-1:0,l=i.slice(s,e);return l.push(n),l}function pB(i,e){let t=[],n=!1;return i.iterChangedRanges((s,l)=>t.push(s,l)),e.iterChangedRanges((s,l,o,c)=>{for(let f=0;f<t.length;){let d=t[f++],p=t[f++];c>=d&&o<=p&&(n=!0)}}),n}function mB(i,e){return i.ranges.length==e.ranges.length&&i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function KA(i,e){return i.length?e.length?i.concat(e):i:e}const Wi=[],OB=200;function JA(i,e){if(i.length){let t=i[i.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-OB));return n.length&&n[n.length-1].eq(e)?i:(n.push(e),Sh(i,i.length-1,1e9,t.setSelAfter(n)))}else return[pi.selection([e])]}function gB(i){let e=i[i.length-1],t=i.slice();return t[i.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function oO(i,e){if(!i.length)return i;let t=i.length,n=Wi;for(;t;){let s=yB(i[t-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let l=i.slice(0,t);return l[t-1]=s,l}else e=s.mapped,t--,n=s.selectionsAfter}return n.length?[pi.selection(n)]:Wi}function yB(i,e,t){let n=KA(i.selectionsAfter.length?i.selectionsAfter.map(c=>c.map(e)):Wi,t);if(!i.changes)return pi.selection(n);let s=i.changes.map(e),l=e.mapDesc(i.changes,!0),o=i.mapped?i.mapped.composeDesc(l):l;return new pi(s,ke.mapEffects(i.effects,e),o,i.startSelection.map(l),n)}const bB=/^(input\.type|delete)($|\.)/;class $n{constructor(e,t,n=0,s=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=s}isolate(){return this.prevTime?new $n(this.done,this.undone):this}addChanges(e,t,n,s,l){let o=this.done,c=o[o.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!n||bB.test(n))&&(!c.selectionsAfter.length&&t-this.prevTime<s.newGroupDelay&&s.joinToEvent(l,pB(c.changes,e.changes))||n=="input.type.compose")?o=Sh(o,o.length-1,s.minDepth,new pi(e.changes.compose(c.changes),KA(ke.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,Wi)):o=Sh(o,o.length,s.minDepth,e),new $n(o,Wi,t,n)}addSelection(e,t,n,s){let l=this.done.length?this.done[this.done.length-1].selectionsAfter:Wi;return l.length>0&&t-this.prevTime<s&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&mB(l[l.length-1],e)?this:new $n(JA(this.done,e),this.undone,t,n)}addMapping(e){return new $n(oO(this.done,e),oO(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let s=e==0?this.done:this.undone;if(s.length==0)return null;let l=s[s.length-1],o=l.selectionsAfter[0]||(l.startSelection?l.startSelection.map(l.changes.invertedDesc,1):t.selection);if(n&&l.selectionsAfter.length)return t.update({selection:l.selectionsAfter[l.selectionsAfter.length-1],annotations:Ng.of({side:e,rest:gB(s),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(l.changes){let c=s.length==1?Wi:s.slice(0,s.length-1);return l.mapped&&(c=oO(c,l.mapped)),t.update({changes:l.changes,selection:l.startSelection,effects:l.effects,annotations:Ng.of({side:e,rest:c,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}$n.empty=new $n(Wi,Wi);const SB=[{key:"Mod-z",run:FA,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Yg,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Yg,preventDefault:!0},{key:"Mod-u",run:hB,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:dB,preventDefault:!0}];function ga(i,e){return G.create(i.ranges.map(e),i.mainIndex)}function dn(i,e){return i.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function pn({state:i,dispatch:e},t){let n=ga(i.selection,t);return n.eq(i.selection,!0)?!1:(e(dn(i,n)),!0)}function Wh(i,e){return G.cursor(e?i.to:i.from)}function eP(i,e){return pn(i,t=>t.empty?i.moveByChar(t,e):Wh(t,e))}function It(i){return i.textDirectionAt(i.state.selection.main.head)==tt.LTR}const tP=i=>eP(i,!It(i)),iP=i=>eP(i,It(i));function nP(i,e){return pn(i,t=>t.empty?i.moveByGroup(t,e):Wh(t,e))}const xB=i=>nP(i,!It(i)),vB=i=>nP(i,It(i));function wB(i,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(i.sliceDoc(e.from,e.to)))||e.firstChild}function Hh(i,e,t){let n=it(i).resolveInner(e.head),s=t?Te.closedBy:Te.openedBy;for(let f=e.head;;){let d=t?n.childAfter(f):n.childBefore(f);if(!d)break;wB(i,d,s)?n=d:f=t?d.to:d.from}let l=n.type.prop(s),o,c;return l&&(o=t?Pn(i,n.from,1):Pn(i,n.to,-1))&&o.matched?c=t?o.end.to:o.end.from:c=t?n.to:n.from,G.cursor(c,t?-1:1)}const QB=i=>pn(i,e=>Hh(i.state,e,!It(i))),kB=i=>pn(i,e=>Hh(i.state,e,It(i)));function sP(i,e){return pn(i,t=>{if(!t.empty)return Wh(t,e);let n=i.moveVertically(t,e);return n.head!=t.head?n:i.moveToLineBoundary(t,e)})}const rP=i=>sP(i,!1),lP=i=>sP(i,!0);function aP(i){let e=i.scrollDOM.clientHeight<i.scrollDOM.scrollHeight-2,t=0,n=0,s;if(e){for(let l of i.state.facet(ne.scrollMargins)){let o=l(i);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(n=Math.max(o==null?void 0:o.bottom,n))}s=i.scrollDOM.clientHeight-t-n}else s=(i.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:n,selfScroll:e,height:Math.max(i.defaultLineHeight,s-5)}}function oP(i,e){let t=aP(i),{state:n}=i,s=ga(n.selection,o=>o.empty?i.moveVertically(o,e,t.height):Wh(o,e));if(s.eq(n.selection))return!1;let l;if(t.selfScroll){let o=i.coordsAtPos(n.selection.main.head),c=i.scrollDOM.getBoundingClientRect(),f=c.top+t.marginTop,d=c.bottom-t.marginBottom;o&&o.top>f&&o.bottom<d&&(l=ne.scrollIntoView(s.main.head,{y:"start",yMargin:o.top-f}))}return i.dispatch(dn(n,s),{effects:l}),!0}const MQ=i=>oP(i,!1),qg=i=>oP(i,!0);function ar(i,e,t){let n=i.lineBlockAt(e.head),s=i.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?n.to:n.from)&&(s=i.moveToLineBoundary(e,t,!1)),!t&&s.head==n.from&&n.length){let l=/^\s*/.exec(i.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;l&&e.head!=n.from+l&&(s=G.cursor(n.from+l))}return s}const TB=i=>pn(i,e=>ar(i,e,!0)),CB=i=>pn(i,e=>ar(i,e,!1)),AB=i=>pn(i,e=>ar(i,e,!It(i))),PB=i=>pn(i,e=>ar(i,e,It(i))),$B=i=>pn(i,e=>G.cursor(i.lineBlockAt(e.head).from,1)),MB=i=>pn(i,e=>G.cursor(i.lineBlockAt(e.head).to,-1));function EB(i,e,t){let n=!1,s=ga(i.selection,l=>{let o=Pn(i,l.head,-1)||Pn(i,l.head,1)||l.head>0&&Pn(i,l.head-1,1)||l.head<i.doc.length&&Pn(i,l.head+1,-1);if(!o||!o.end)return l;n=!0;let c=o.start.from==l.head?o.end.to:o.end.from;return G.cursor(c)});return n?(e(dn(i,s)),!0):!1}const RB=({state:i,dispatch:e})=>EB(i,e);function Ki(i,e){let t=ga(i.state.selection,n=>{let s=e(n);return G.range(n.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(i.state.selection)?!1:(i.dispatch(dn(i.state,t)),!0)}function cP(i,e){return Ki(i,t=>i.moveByChar(t,e))}const uP=i=>cP(i,!It(i)),fP=i=>cP(i,It(i));function hP(i,e){return Ki(i,t=>i.moveByGroup(t,e))}const zB=i=>hP(i,!It(i)),DB=i=>hP(i,It(i)),ZB=i=>Ki(i,e=>Hh(i.state,e,!It(i))),XB=i=>Ki(i,e=>Hh(i.state,e,It(i)));function dP(i,e){return Ki(i,t=>i.moveVertically(t,e))}const pP=i=>dP(i,!1),mP=i=>dP(i,!0);function OP(i,e){return Ki(i,t=>i.moveVertically(t,e,aP(i).height))}const EQ=i=>OP(i,!1),RQ=i=>OP(i,!0),LB=i=>Ki(i,e=>ar(i,e,!0)),VB=i=>Ki(i,e=>ar(i,e,!1)),_B=i=>Ki(i,e=>ar(i,e,!It(i))),jB=i=>Ki(i,e=>ar(i,e,It(i))),BB=i=>Ki(i,e=>G.cursor(i.lineBlockAt(e.head).from)),NB=i=>Ki(i,e=>G.cursor(i.lineBlockAt(e.head).to)),zQ=({state:i,dispatch:e})=>(e(dn(i,{anchor:0})),!0),DQ=({state:i,dispatch:e})=>(e(dn(i,{anchor:i.doc.length})),!0),ZQ=({state:i,dispatch:e})=>(e(dn(i,{anchor:i.selection.main.anchor,head:0})),!0),XQ=({state:i,dispatch:e})=>(e(dn(i,{anchor:i.selection.main.anchor,head:i.doc.length})),!0),YB=({state:i,dispatch:e})=>(e(i.update({selection:{anchor:0,head:i.doc.length},userEvent:"select"})),!0),qB=({state:i,dispatch:e})=>{let t=Ih(i).map(({from:n,to:s})=>G.range(n,Math.min(s+1,i.doc.length)));return e(i.update({selection:G.create(t),userEvent:"select"})),!0},UB=({state:i,dispatch:e})=>{let t=ga(i.selection,n=>{let s=it(i),l=s.resolveStack(n.from,1);if(n.empty){let o=s.resolveStack(n.from,-1);o.node.from>=l.node.from&&o.node.to<=l.node.to&&(l=o)}for(let o=l;o;o=o.next){let{node:c}=o;if((c.from<n.from&&c.to>=n.to||c.to>n.to&&c.from<=n.from)&&o.next)return G.range(c.to,c.from)}return n});return t.eq(i.selection)?!1:(e(dn(i,t)),!0)};function gP(i,e){let{state:t}=i,n=t.selection,s=t.selection.ranges.slice();for(let l of t.selection.ranges){let o=t.doc.lineAt(l.head);if(e?o.to<i.state.doc.length:o.from>0)for(let c=l;;){let f=i.moveVertically(c,e);if(f.head<o.from||f.head>o.to){s.some(d=>d.head==f.head)||s.push(f);break}else{if(f.head==c.head)break;c=f}}}return s.length==n.ranges.length?!1:(i.dispatch(dn(t,G.create(s,s.length-1))),!0)}const GB=i=>gP(i,!1),WB=i=>gP(i,!0),HB=({state:i,dispatch:e})=>{let t=i.selection,n=null;return t.ranges.length>1?n=G.create([t.main]):t.main.empty||(n=G.create([G.cursor(t.main.head)])),n?(e(dn(i,n)),!0):!1};function Rc(i,e){if(i.state.readOnly)return!1;let t="delete.selection",{state:n}=i,s=n.changeByRange(l=>{let{from:o,to:c}=l;if(o==c){let f=e(l);f<o?(t="delete.backward",f=wf(i,f,!1)):f>o&&(t="delete.forward",f=wf(i,f,!0)),o=Math.min(o,f),c=Math.max(c,f)}else o=wf(i,o,!1),c=wf(i,c,!0);return o==c?{range:l}:{changes:{from:o,to:c},range:G.cursor(o,o<l.head?-1:1)}});return s.changes.empty?!1:(i.dispatch(n.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?ne.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function wf(i,e,t){if(i instanceof ne)for(let n of i.state.facet(ne.atomicRanges).map(s=>s(i)))n.between(e,e,(s,l)=>{s<e&&l>e&&(e=t?l:s)});return e}const yP=(i,e,t)=>Rc(i,n=>{let s=n.from,{state:l}=i,o=l.doc.lineAt(s),c,f;if(t&&!e&&s>o.from&&s<o.from+200&&!/[^ \t]/.test(c=o.text.slice(0,s-o.from))){if(c[c.length-1]==" ")return s-1;let d=un(c,l.tabSize),p=d%gh(l)||gh(l);for(let m=0;m<p&&c[c.length-1-m]==" ";m++)s--;f=s}else f=zt(o.text,s-o.from,e,e)+o.from,f==s&&o.number!=(e?l.doc.lines:1)?f+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(f-o.from,s-o.from))&&(f=zt(o.text,f-o.from,!1,!1)+o.from);return f}),Ug=i=>yP(i,!1,!0),bP=i=>yP(i,!0,!1),SP=(i,e)=>Rc(i,t=>{let n=t.head,{state:s}=i,l=s.doc.lineAt(n),o=s.charCategorizer(n);for(let c=null;;){if(n==(e?l.to:l.from)){n==t.head&&l.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let f=zt(l.text,n-l.from,e)+l.from,d=l.text.slice(Math.min(n,f)-l.from,Math.max(n,f)-l.from),p=o(d);if(c!=null&&p!=c)break;(d!=" "||n!=t.head)&&(c=p),n=f}return n}),xP=i=>SP(i,!1),IB=i=>SP(i,!0),FB=i=>Rc(i,e=>{let t=i.lineBlockAt(e.head).to;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),KB=i=>Rc(i,e=>{let t=i.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),JB=i=>Rc(i,e=>{let t=i.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(i.state.doc.length,e.head+1)}),e4=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:je.of(["",""])},range:G.cursor(n.from)}));return e(i.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},t4=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=i.changeByRange(n=>{if(!n.empty||n.from==0||n.from==i.doc.length)return{range:n};let s=n.from,l=i.doc.lineAt(s),o=s==l.from?s-1:zt(l.text,s-l.from,!1)+l.from,c=s==l.to?s+1:zt(l.text,s-l.from,!0)+l.from;return{changes:{from:o,to:c,insert:i.doc.slice(s,c).append(i.doc.slice(o,s))},range:G.cursor(c)}});return t.changes.empty?!1:(e(i.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ih(i){let e=[],t=-1;for(let n of i.selection.ranges){let s=i.doc.lineAt(n.from),l=i.doc.lineAt(n.to);if(!n.empty&&n.to==l.from&&(l=i.doc.lineAt(n.to-1)),t>=s.number){let o=e[e.length-1];o.to=l.to,o.ranges.push(n)}else e.push({from:s.from,to:l.to,ranges:[n]});t=l.number+1}return e}function vP(i,e,t){if(i.readOnly)return!1;let n=[],s=[];for(let l of Ih(i)){if(t?l.to==i.doc.length:l.from==0)continue;let o=i.doc.lineAt(t?l.to+1:l.from-1),c=o.length+1;if(t){n.push({from:l.to,to:o.to},{from:l.from,insert:o.text+i.lineBreak});for(let f of l.ranges)s.push(G.range(Math.min(i.doc.length,f.anchor+c),Math.min(i.doc.length,f.head+c)))}else{n.push({from:o.from,to:l.from},{from:l.to,insert:i.lineBreak+o.text});for(let f of l.ranges)s.push(G.range(f.anchor-c,f.head-c))}}return n.length?(e(i.update({changes:n,scrollIntoView:!0,selection:G.create(s,i.selection.mainIndex),userEvent:"move.line"})),!0):!1}const i4=({state:i,dispatch:e})=>vP(i,e,!1),n4=({state:i,dispatch:e})=>vP(i,e,!0);function wP(i,e,t){if(i.readOnly)return!1;let n=[];for(let l of Ih(i))t?n.push({from:l.from,insert:i.doc.slice(l.from,l.to)+i.lineBreak}):n.push({from:l.to,insert:i.lineBreak+i.doc.slice(l.from,l.to)});let s=i.changes(n);return e(i.update({changes:s,selection:i.selection.map(s,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const s4=({state:i,dispatch:e})=>wP(i,e,!1),r4=({state:i,dispatch:e})=>wP(i,e,!0),l4=i=>{if(i.state.readOnly)return!1;let{state:e}=i,t=e.changes(Ih(e).map(({from:s,to:l})=>(s>0?s--:l<e.doc.length&&l++,{from:s,to:l}))),n=ga(e.selection,s=>{let l;if(i.lineWrapping){let o=i.lineBlockAt(s.head),c=i.coordsAtPos(s.head,s.assoc||1);c&&(l=o.bottom+i.documentTop-c.bottom+i.defaultLineHeight/2)}return i.moveVertically(s,!0,l)}).map(t);return i.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function a4(i,e){if(/\(\)|\[\]|\{\}/.test(i.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=it(i).resolveInner(e),n=t.childBefore(e),s=t.childAfter(e),l;return n&&s&&n.to<=e&&s.from>=e&&(l=n.type.prop(Te.closedBy))&&l.indexOf(s.name)>-1&&i.doc.lineAt(n.to).from==i.doc.lineAt(s.from).from&&!/\S/.test(i.sliceDoc(n.to,s.from))?{from:n.to,to:s.from}:null}const LQ=QP(!1),o4=QP(!0);function QP(i){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>{let{from:l,to:o}=s,c=e.doc.lineAt(l),f=!i&&l==o&&a4(e,l);i&&(l=o=(o<=c.to?c:e.doc.lineAt(o)).to);let d=new qh(e,{simulateBreak:l,simulateDoubleBreak:!!f}),p=oy(d,l);for(p==null&&(p=un(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));o<c.to&&/\s/.test(c.text[o-c.from]);)o++;f?{from:l,to:o}=f:l>c.from&&l<c.from+100&&!/\S/.test(c.text.slice(0,l))&&(l=c.from);let m=["",oc(e,p)];return f&&m.push(oc(e,d.lineIndent(c.from,-1))),{changes:{from:l,to:o,insert:je.of(m)},range:G.cursor(l+1+m[1].length)}});return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function hy(i,e){let t=-1;return i.changeByRange(n=>{let s=[];for(let o=n.from;o<=n.to;){let c=i.doc.lineAt(o);c.number>t&&(n.empty||n.to>c.from)&&(e(c,s,n),t=c.number),o=c.to+1}let l=i.changes(s);return{changes:s,range:G.range(l.mapPos(n.anchor,1),l.mapPos(n.head,1))}})}const c4=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let t=Object.create(null),n=new qh(i,{overrideIndentation:l=>{let o=t[l];return o??-1}}),s=hy(i,(l,o,c)=>{let f=oy(n,l.from);if(f==null)return;/\S/.test(l.text)||(f=0);let d=/^\s*/.exec(l.text)[0],p=oc(i,f);(d!=p||c.from<l.from+d.length)&&(t[l.from]=f,o.push({from:l.from,to:l.from+d.length,insert:p}))});return s.changes.empty||e(i.update(s,{userEvent:"indent"})),!0},kP=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(hy(i,(t,n)=>{n.push({from:t.from,insert:i.facet(ma)})}),{userEvent:"input.indent"})),!0),TP=({state:i,dispatch:e})=>i.readOnly?!1:(e(i.update(hy(i,(t,n)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let l=un(s,i.tabSize),o=0,c=oc(i,Math.max(0,l-gh(i)));for(;o<s.length&&o<c.length&&s.charCodeAt(o)==c.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+s.length,insert:c.slice(o)})}),{userEvent:"delete.dedent"})),!0),u4=i=>(i.setTabFocusMode(),!0),f4=[{key:"Ctrl-b",run:tP,shift:uP,preventDefault:!0},{key:"Ctrl-f",run:iP,shift:fP},{key:"Ctrl-p",run:rP,shift:pP},{key:"Ctrl-n",run:lP,shift:mP},{key:"Ctrl-a",run:$B,shift:BB},{key:"Ctrl-e",run:MB,shift:NB},{key:"Ctrl-d",run:bP},{key:"Ctrl-h",run:Ug},{key:"Ctrl-k",run:FB},{key:"Ctrl-Alt-h",run:xP},{key:"Ctrl-o",run:e4},{key:"Ctrl-t",run:t4},{key:"Ctrl-v",run:qg}],h4=[{key:"ArrowLeft",run:tP,shift:uP,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:xB,shift:zB,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:AB,shift:_B,preventDefault:!0},{key:"ArrowRight",run:iP,shift:fP,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:vB,shift:DB,preventDefault:!0},{mac:"Cmd-ArrowRight",run:PB,shift:jB,preventDefault:!0},{key:"ArrowUp",run:rP,shift:pP,preventDefault:!0},{mac:"Cmd-ArrowUp",run:zQ,shift:ZQ},{mac:"Ctrl-ArrowUp",run:MQ,shift:EQ},{key:"ArrowDown",run:lP,shift:mP,preventDefault:!0},{mac:"Cmd-ArrowDown",run:DQ,shift:XQ},{mac:"Ctrl-ArrowDown",run:qg,shift:RQ},{key:"PageUp",run:MQ,shift:EQ},{key:"PageDown",run:qg,shift:RQ},{key:"Home",run:CB,shift:VB,preventDefault:!0},{key:"Mod-Home",run:zQ,shift:ZQ},{key:"End",run:TB,shift:LB,preventDefault:!0},{key:"Mod-End",run:DQ,shift:XQ},{key:"Enter",run:LQ,shift:LQ},{key:"Mod-a",run:YB},{key:"Backspace",run:Ug,shift:Ug,preventDefault:!0},{key:"Delete",run:bP,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:xP,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:IB,preventDefault:!0},{mac:"Mod-Backspace",run:KB,preventDefault:!0},{mac:"Mod-Delete",run:JB,preventDefault:!0}].concat(f4.map(i=>({mac:i.key,run:i.run,shift:i.shift}))),d4=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:QB,shift:ZB},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:kB,shift:XB},{key:"Alt-ArrowUp",run:i4},{key:"Shift-Alt-ArrowUp",run:s4},{key:"Alt-ArrowDown",run:n4},{key:"Shift-Alt-ArrowDown",run:r4},{key:"Mod-Alt-ArrowUp",run:GB},{key:"Mod-Alt-ArrowDown",run:WB},{key:"Escape",run:HB},{key:"Mod-Enter",run:o4},{key:"Alt-l",mac:"Ctrl-l",run:qB},{key:"Mod-i",run:UB,preventDefault:!0},{key:"Mod-[",run:TP},{key:"Mod-]",run:kP},{key:"Mod-Alt-\\",run:c4},{key:"Shift-Mod-k",run:l4},{key:"Shift-Mod-\\",run:RB},{key:"Mod-/",run:iB},{key:"Alt-A",run:sB},{key:"Ctrl-m",mac:"Shift-Alt-m",run:u4}].concat(h4),p4={key:"Tab",run:kP,shift:TP},VQ=typeof String.prototype.normalize=="function"?i=>i.normalize("NFKD"):i=>i;class la{constructor(e,t,n=0,s=e.length,l,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,s),this.bufferStart=n,this.normalize=l?c=>l(VQ(c)):VQ,this.query=this.normalize(t)}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 ui(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 t=X0(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=kn(e);let s=this.normalize(t);if(s.length)for(let l=0,o=n;;l++){let c=s.charCodeAt(l),f=this.match(c,o,this.bufferPos+this.bufferStart);if(l==s.length-1){if(f)return this.value=f,this;break}o==n&&l<t.length&&t.charCodeAt(l)==c&&o++}}}match(e,t,n){let s=null;for(let l=0;l<this.matches.length;l+=2){let o=this.matches[l],c=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?s={from:this.matches[l+1],to:n}:(this.matches[l]++,c=!0)),c||(this.matches.splice(l,2),l-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?s={from:t,to:n}:this.matches.push(1,t)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}typeof Symbol<"u"&&(la.prototype[Symbol.iterator]=function(){return this});const CP={from:-1,to:-1,match:/.*/.exec("")},dy="gm"+(/x/.unicode==null?"":"u");class AP{constructor(e,t,n,s=0,l=e.length){if(this.text=e,this.to=l,this.curLine="",this.done=!1,this.value=CP,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new PP(e,t,n,s,l);this.re=new RegExp(t,dy+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.iter=e.iter();let o=e.lineAt(s);this.curLineStart=o.from,this.matchPos=xh(e,s),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 t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,s=n+t[0].length;if(this.matchPos=xh(this.text,s+(n==s?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<s||n>this.value.to)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},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 cO=new WeakMap;class Il{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let s=cO.get(e);if(!s||s.from>=n||s.to<=t){let c=new Il(t,e.sliceString(t,n));return cO.set(e,c),c}if(s.from==t&&s.to==n)return s;let{text:l,from:o}=s;return o>t&&(l=e.sliceString(t,o)+l,o=t),s.to<n&&(l+=e.sliceString(s.to,n)),cO.set(e,new Il(o,l)),new Il(t,l.slice(t-o,n-o))}}class PP{constructor(e,t,n,s,l){this.text=e,this.to=l,this.done=!1,this.value=CP,this.matchPos=xh(e,s),this.re=new RegExp(t,dy+(n!=null&&n.ignoreCase?"i":"")),this.test=n==null?void 0:n.test,this.flat=Il.get(e,s,this.chunkEnd(s+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,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,s=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,s,t)))return this.value={from:n,to:s,match:t},this.matchPos=xh(this.text,s+(n==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Il.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(AP.prototype[Symbol.iterator]=PP.prototype[Symbol.iterator]=function(){return this});function m4(i){try{return new RegExp(i,dy),!0}catch{return!1}}function xh(i,e){if(e>=i.length)return e;let t=i.lineAt(e),n;for(;e<t.to&&(n=t.text.charCodeAt(e-t.from))>=56320&&n<57344;)e++;return e}const O4=i=>{let{state:e}=i,t=String(e.doc.lineAt(i.state.selection.main.head).number),{close:n,result:s}=R_(i,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:t},focus:!0,submitLabel:e.phrase("go")});return s.then(l=>{let o=l&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(l.elements.line.value);if(!o){i.dispatch({effects:n});return}let c=e.doc.lineAt(e.selection.main.head),[,f,d,p,m]=o,y=p?+p.slice(1):0,b=d?+d:c.number;if(d&&m){let w=b/100;f&&(w=w*(f=="-"?-1:1)+c.number/e.doc.lines),b=Math.round(e.doc.lines*w)}else d&&f&&(b=b*(f=="-"?-1:1)+c.number);let S=e.doc.line(Math.max(1,Math.min(e.doc.lines,b))),v=G.cursor(S.from+Math.max(0,Math.min(y,S.length)));i.dispatch({effects:[n,ne.scrollIntoView(v.from,{y:"center"})],selection:v})}),!0},g4={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},y4=le.define({combine(i){return Zn(i,g4,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function b4(i){return[Q4,w4]}const S4=be.mark({class:"cm-selectionMatch"}),x4=be.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function _Q(i,e,t,n){return(t==0||i(e.sliceDoc(t-1,t))!=ct.Word)&&(n==e.doc.length||i(e.sliceDoc(n,n+1))!=ct.Word)}function v4(i,e,t,n){return i(e.sliceDoc(t,t+1))==ct.Word&&i(e.sliceDoc(n-1,n))==ct.Word}const w4=gt.fromClass(class{constructor(i){this.decorations=this.getDeco(i)}update(i){(i.selectionSet||i.docChanged||i.viewportChanged)&&(this.decorations=this.getDeco(i.view))}getDeco(i){let e=i.state.facet(y4),{state:t}=i,n=t.selection;if(n.ranges.length>1)return be.none;let s=n.main,l,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return be.none;let f=t.wordAt(s.head);if(!f)return be.none;o=t.charCategorizer(s.head),l=t.sliceDoc(f.from,f.to)}else{let f=s.to-s.from;if(f<e.minSelectionLength||f>200)return be.none;if(e.wholeWords){if(l=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(_Q(o,t,s.from,s.to)&&v4(o,t,s.from,s.to)))return be.none}else if(l=t.sliceDoc(s.from,s.to),!l)return be.none}let c=[];for(let f of i.visibleRanges){let d=new la(t.doc,l,f.from,f.to);for(;!d.next().done;){let{from:p,to:m}=d.value;if((!o||_Q(o,t,p,m))&&(s.empty&&p<=s.from&&m>=s.to?c.push(x4.range(p,m)):(p>=s.to||m<=s.from)&&c.push(S4.range(p,m)),c.length>e.maxMatches))return be.none}}return be.set(c)}},{decorations:i=>i.decorations}),Q4=ne.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),k4=({state:i,dispatch:e})=>{let{selection:t}=i,n=G.create(t.ranges.map(s=>i.wordAt(s.head)||G.cursor(s.head)),t.mainIndex);return n.eq(t)?!1:(e(i.update({selection:n})),!0)};function T4(i,e){let{main:t,ranges:n}=i.selection,s=i.wordAt(t.head),l=s&&s.from==t.from&&s.to==t.to;for(let o=!1,c=new la(i.doc,e,n[n.length-1].to);;)if(c.next(),c.done){if(o)return null;c=new la(i.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(f=>f.from==c.value.from))continue;if(l){let f=i.wordAt(c.value.from);if(!f||f.from!=c.value.from||f.to!=c.value.to)continue}return c.value}}const C4=({state:i,dispatch:e})=>{let{ranges:t}=i.selection;if(t.some(l=>l.from===l.to))return k4({state:i,dispatch:e});let n=i.sliceDoc(t[0].from,t[0].to);if(i.selection.ranges.some(l=>i.sliceDoc(l.from,l.to)!=n))return!1;let s=T4(i,n);return s?(e(i.update({selection:i.selection.addRange(G.range(s.from,s.to),!1),effects:ne.scrollIntoView(s.to)})),!0):!1},ya=le.define({combine(i){return Zn(i,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new j4(e),scrollToMatch:e=>ne.scrollIntoView(e)})}});class $P{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||m4(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,(t,n)=>n=="n"?`
|
|
61
|
-
`:n=="r"?"\r":n=="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 R4(this):new $4(this)}getCursor(e,t=0,n){let s=e.doc?e:Le.create({doc:e});return n==null&&(n=s.doc.length),this.regexp?Dl(this,s,t,n):zl(this,s,t,n)}}class MP{constructor(e){this.spec=e}}function A4(i,e,t){return(n,s,l,o)=>{if(t&&!t(n,s,l,o))return!1;let c=n>=o&&s<=o+l.length?l.slice(n-o,s-o):e.doc.sliceString(n,s);return i(c,e,n,s)}}function zl(i,e,t,n){let s;return i.wholeWord&&(s=P4(e.doc,e.charCategorizer(e.selection.main.head))),i.test&&(s=A4(i.test,e,s)),new la(e.doc,i.unquoted,t,n,i.caseSensitive?void 0:l=>l.toLowerCase(),s)}function P4(i,e){return(t,n,s,l)=>((l>t||l+s.length<n)&&(l=Math.max(0,t-2),s=i.sliceString(l,Math.min(i.length,n+2))),(e(vh(s,t-l))!=ct.Word||e(wh(s,t-l))!=ct.Word)&&(e(wh(s,n-l))!=ct.Word||e(vh(s,n-l))!=ct.Word))}class $4 extends MP{constructor(e){super(e)}nextMatch(e,t,n){let s=zl(this.spec,e,n,e.doc.length).nextOverlapping();if(s.done){let l=Math.min(e.doc.length,t+this.spec.unquoted.length);s=zl(this.spec,e,0,l).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==n?null:s.value}prevMatchInRange(e,t,n){for(let s=n;;){let l=Math.max(t,s-1e4-this.spec.unquoted.length),o=zl(this.spec,e,l,s),c=null;for(;!o.nextOverlapping().done;)c=o.value;if(c)return c;if(l==t)return null;s-=1e4}}prevMatch(e,t,n){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=n)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=zl(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let l=zl(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)s(l.value.from,l.value.to)}}function M4(i,e,t){return(n,s,l)=>(!t||t(n,s,l))&&i(l[0],e,n,s)}function Dl(i,e,t,n){let s;return i.wholeWord&&(s=E4(e.charCategorizer(e.selection.main.head))),i.test&&(s=M4(i.test,e,s)),new AP(e.doc,i.search,{ignoreCase:!i.caseSensitive,test:s},t,n)}function vh(i,e){return i.slice(zt(i,e,!1),e)}function wh(i,e){return i.slice(e,zt(i,e))}function E4(i){return(e,t,n)=>!n[0].length||(i(vh(n.input,n.index))!=ct.Word||i(wh(n.input,n.index))!=ct.Word)&&(i(wh(n.input,n.index+n[0].length))!=ct.Word||i(vh(n.input,n.index+n[0].length))!=ct.Word)}class R4 extends MP{nextMatch(e,t,n){let s=Dl(this.spec,e,n,e.doc.length).next();return s.done&&(s=Dl(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,n){for(let s=1;;s++){let l=Math.max(t,n-s*1e4),o=Dl(this.spec,e,l,n),c=null;for(;!o.next().done;)c=o.value;if(c&&(l==t||c.from>l+10))return c;if(l==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let s=n.length;s>0;s--){let l=+n.slice(0,s);if(l>0&&l<e.match.length)return e.match[l]+n.slice(s)}return t})}matchAll(e,t){let n=Dl(this.spec,e,0,e.doc.length),s=[];for(;!n.next().done;){if(s.length>=t)return null;s.push(n.value)}return s}highlight(e,t,n,s){let l=Dl(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!l.next().done;)s(l.value.from,l.value.to)}}const cc=ke.define(),py=ke.define(),Is=Dt.define({create(i){return new uO(Gg(i).create(),null)},update(i,e){for(let t of e.effects)t.is(cc)?i=new uO(t.value.create(),i.panel):t.is(py)&&(i=new uO(i.query,t.value?my:null));return i},provide:i=>nc.from(i,e=>e.panel)});class uO{constructor(e,t){this.query=e,this.panel=t}}const z4=be.mark({class:"cm-searchMatch"}),D4=be.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Z4=gt.fromClass(class{constructor(i){this.view=i,this.decorations=this.highlight(i.state.field(Is))}update(i){let e=i.state.field(Is);(e!=i.startState.field(Is)||i.docChanged||i.selectionSet||i.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:i,panel:e}){if(!e||!i.spec.valid)return be.none;let{view:t}=this,n=new cs;for(let s=0,l=t.visibleRanges,o=l.length;s<o;s++){let{from:c,to:f}=l[s];for(;s<o-1&&f>l[s+1].from-500;)f=l[++s].to;i.highlight(t.state,c,f,(d,p)=>{let m=t.state.selection.ranges.some(y=>y.from==d&&y.to==p);n.add(d,p,m?D4:z4)})}return n.finish()}},{decorations:i=>i.decorations});function zc(i){return e=>{let t=e.state.field(Is,!1);return t&&t.query.spec.valid?i(e,t):zP(e)}}const Qh=zc((i,{query:e})=>{let{to:t}=i.state.selection.main,n=e.nextMatch(i.state,t,t);if(!n)return!1;let s=G.single(n.from,n.to),l=i.state.facet(ya);return i.dispatch({selection:s,effects:[Oy(i,n),l.scrollToMatch(s.main,i)],userEvent:"select.search"}),RP(i),!0}),kh=zc((i,{query:e})=>{let{state:t}=i,{from:n}=t.selection.main,s=e.prevMatch(t,n,n);if(!s)return!1;let l=G.single(s.from,s.to),o=i.state.facet(ya);return i.dispatch({selection:l,effects:[Oy(i,s),o.scrollToMatch(l.main,i)],userEvent:"select.search"}),RP(i),!0}),X4=zc((i,{query:e})=>{let t=e.matchAll(i.state,1e3);return!t||!t.length?!1:(i.dispatch({selection:G.create(t.map(n=>G.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),L4=({state:i,dispatch:e})=>{let t=i.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:s}=t.main,l=[],o=0;for(let c=new la(i.doc,i.sliceDoc(n,s));!c.next().done;){if(l.length>1e3)return!1;c.value.from==n&&(o=l.length),l.push(G.range(c.value.from,c.value.to))}return e(i.update({selection:G.create(l,o),userEvent:"select.search.matches"})),!0},jQ=zc((i,{query:e})=>{let{state:t}=i,{from:n,to:s}=t.selection.main;if(t.readOnly)return!1;let l=e.nextMatch(t,n,n);if(!l)return!1;let o=l,c=[],f,d,p=[];o.from==n&&o.to==s&&(d=t.toText(e.getReplacement(o)),c.push({from:o.from,to:o.to,insert:d}),o=e.nextMatch(t,o.from,o.to),p.push(ne.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+".")));let m=i.state.changes(c);return o&&(f=G.single(o.from,o.to).map(m),p.push(Oy(i,o)),p.push(t.facet(ya).scrollToMatch(f.main,i))),i.dispatch({changes:m,selection:f,effects:p,userEvent:"input.replace"}),!0}),V4=zc((i,{query:e})=>{if(i.state.readOnly)return!1;let t=e.matchAll(i.state,1e9).map(s=>{let{from:l,to:o}=s;return{from:l,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let n=i.state.phrase("replaced $ matches",t.length)+".";return i.dispatch({changes:t,effects:ne.announce.of(n),userEvent:"input.replace.all"}),!0});function my(i){return i.state.facet(ya).createPanel(i)}function Gg(i,e){var t,n,s,l,o;let c=i.selection.main,f=c.empty||c.to>c.from+100?"":i.sliceDoc(c.from,c.to);if(e&&!f)return e;let d=i.facet(ya);return new $P({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:d.literal)?f:f.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:d.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:d.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:d.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:d.wholeWord})}function EP(i){let e=ty(i,my);return e&&e.dom.querySelector("[main-field]")}function RP(i){let e=EP(i);e&&e==i.root.activeElement&&e.select()}const zP=i=>{let e=i.state.field(Is,!1);if(e&&e.panel){let t=EP(i);if(t&&t!=i.root.activeElement){let n=Gg(i.state,e.query.spec);n.valid&&i.dispatch({effects:cc.of(n)}),t.focus(),t.select()}}else i.dispatch({effects:[py.of(!0),e?cc.of(Gg(i.state,e.query.spec)):ke.appendConfig.of(N4)]});return!0},DP=i=>{let e=i.state.field(Is,!1);if(!e||!e.panel)return!1;let t=ty(i,my);return t&&t.dom.contains(i.root.activeElement)&&i.focus(),i.dispatch({effects:py.of(!1)}),!0},_4=[{key:"Mod-f",run:zP,scope:"editor search-panel"},{key:"F3",run:Qh,shift:kh,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Qh,shift:kh,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:DP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:L4},{key:"Mod-Alt-g",run:O4},{key:"Mod-d",run:C4,preventDefault:!0}];class j4{constructor(e){this.view=e;let t=this.query=e.state.field(Is).query.spec;this.commit=this.commit.bind(this),this.searchField=Ke("input",{value:t.search,placeholder:ki(e,"Find"),"aria-label":ki(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ke("input",{value:t.replace,placeholder:ki(e,"Replace"),"aria-label":ki(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ke("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Ke("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Ke("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(s,l,o){return Ke("button",{class:"cm-button",name:s,onclick:l,type:"button"},o)}this.dom=Ke("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,n("next",()=>Qh(e),[ki(e,"next")]),n("prev",()=>kh(e),[ki(e,"previous")]),n("select",()=>X4(e),[ki(e,"all")]),Ke("label",null,[this.caseField,ki(e,"match case")]),Ke("label",null,[this.reField,ki(e,"regexp")]),Ke("label",null,[this.wordField,ki(e,"by word")]),...e.state.readOnly?[]:[Ke("br"),this.replaceField,n("replace",()=>jQ(e),[ki(e,"replace")]),n("replaceAll",()=>V4(e),[ki(e,"replace all")])],Ke("button",{name:"close",onclick:()=>DP(e),"aria-label":ki(e,"close"),type:"button"},["×"])])}commit(){let e=new $P({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:cc.of(e)}))}keydown(e){NV(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?kh:Qh)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),jQ(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(cc)&&!n.value.eq(this.query)&&this.setQuery(n.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(ya).top}}function ki(i,e){return i.state.phrase(e)}const Qf=30,kf=/[\s\.,:;?!]/;function Oy(i,{from:e,to:t}){let n=i.state.doc.lineAt(e),s=i.state.doc.lineAt(t).to,l=Math.max(n.from,e-Qf),o=Math.min(s,t+Qf),c=i.state.sliceDoc(l,o);if(l!=n.from){for(let f=0;f<Qf;f++)if(!kf.test(c[f+1])&&kf.test(c[f])){c=c.slice(f);break}}if(o!=s){for(let f=c.length-1;f>c.length-Qf;f--)if(!kf.test(c[f-1])&&kf.test(c[f])){c=c.slice(0,f);break}}return ne.announce.of(`${i.state.phrase("current match")}. ${c} ${i.state.phrase("on line")} ${n.number}.`)}const B4=ne.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"}}),N4=[Is,hs.low(Z4),B4];class gy{constructor(e,t,n,s){this.state=e,this.pos=t,this.explicit=n,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=it(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),s=t.text.slice(n-t.from,this.pos-t.from),l=s.search(XP(e,!1));return l<0?null:{from:n+l,to:this.pos,text:s.slice(l)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function BQ(i){let e=Object.keys(i).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Y4(i){let e=Object.create(null),t=Object.create(null);for(let{label:s}of i){e[s[0]]=!0;for(let l=1;l<s.length;l++)t[s[l]]=!0}let n=BQ(e)+BQ(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function ZP(i){let e=i.map(s=>typeof s=="string"?{label:s}:s),[t,n]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:Y4(e);return s=>{let l=s.matchBefore(n);return l||s.explicit?{from:l?l.from:s.pos,options:e,validFor:t}:null}}function q4(i,e){return t=>{for(let n=it(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(i.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class NQ{constructor(e,t,n,s){this.completion=e,this.source=t,this.match=n,this.score=s}}function jr(i){return i.selection.main.from}function XP(i,e){var t;let{source:n}=i,s=e&&n[0]!="^",l=n[n.length-1]!="$";return!s&&!l?i:new RegExp(`${s?"^":""}(?:${n})${l?"$":""}`,(t=i.flags)!==null&&t!==void 0?t:i.ignoreCase?"i":"")}const yy=Dn.define();function U4(i,e,t,n){let{main:s}=i.selection,l=t-s.from,o=n-s.from;return{...i.changeByRange(c=>{if(c!=s&&t!=n&&i.sliceDoc(c.from+l,c.from+o)!=i.sliceDoc(t,n))return{range:c};let f=i.toText(e);return{changes:{from:c.from+l,to:n==s.from?c.to:c.from+o,insert:f},range:G.cursor(c.from+l+f.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const YQ=new WeakMap;function G4(i){if(!Array.isArray(i))return i;let e=YQ.get(i);return e||YQ.set(i,e=ZP(i)),e}const Th=ke.define(),uc=ke.define();class W4{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=ui(e,t),s=kn(n);this.chars.push(n);let l=e.slice(t,t+s),o=l.toUpperCase();this.folded.push(ui(o==l?l.toLowerCase():o,0)),t+=s}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:s,precise:l,byWord:o}=this;if(t.length==1){let A=ui(e,0),P=kn(A),V=P==e.length?0:-100;if(A!=t[0])if(A==n[0])V+=-200;else return null;return this.ret(V,[0,P])}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=t.length,d=0;if(c<0){for(let A=0,P=Math.min(e.length,200);A<P&&d<f;){let V=ui(e,A);(V==t[d]||V==n[d])&&(s[d++]=A),A+=kn(V)}if(d<f)return null}let p=0,m=0,y=!1,b=0,S=-1,v=-1,w=/[a-z]/.test(e),k=!0;for(let A=0,P=Math.min(e.length,200),V=0;A<P&&m<f;){let R=ui(e,A);c<0&&(p<f&&R==t[p]&&(l[p++]=A),b<f&&(R==t[b]||R==n[b]?(b==0&&(S=A),v=A+1,b++):b=0));let N,_=R<255?R>=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(N=X0(R))!=N.toLowerCase()?1:N!=N.toUpperCase()?2:0;(!A||_==1&&w||V==0&&_!=0)&&(t[m]==R||n[m]==R&&(y=!0)?o[m++]=A:o.length&&(k=!1)),V=_,A+=kn(R)}return m==f&&o[0]==0&&k?this.result(-100+(y?-200:0),o,e):b==f&&S==0?this.ret(-200-e.length+(v==e.length?0:-100),[0,v]):c>-1?this.ret(-700-e.length,[c,c+this.pattern.length]):b==f?this.ret(-900-e.length,[S,v]):m==f?this.result(-100+(y?-200:0)+-700+(k?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],l=0;for(let o of t){let c=o+(this.astral?kn(ui(n,o)):1);l&&s[l-1]==o?s[l-1]=c:(s[l++]=o,s[l++]=c)}return this.ret(e-n.length,s)}}class H4{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 t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const Rt=le.define({combine(i){return Zn(i,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:I4,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>qQ(e(n),t(n)),optionClass:(e,t)=>n=>qQ(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function qQ(i,e){return i?e?i+" "+e:i:e}function I4(i,e,t,n,s,l){let o=i.textDirection==tt.RTL,c=o,f=!1,d="top",p,m,y=e.left-s.left,b=s.right-e.right,S=n.right-n.left,v=n.bottom-n.top;if(c&&y<Math.min(S,b)?c=!1:!c&&b<Math.min(S,y)&&(c=!0),S<=(c?y:b))p=Math.max(s.top,Math.min(t.top,s.bottom-v))-e.top,m=Math.min(400,c?y:b);else{f=!0,m=Math.min(400,(o?e.right:s.right-e.left)-30);let A=s.bottom-e.bottom;A>=v||A>e.top?p=t.bottom-e.top:(d="bottom",p=e.bottom-t.top)}let w=(e.bottom-e.top)/l.offsetHeight,k=(e.right-e.left)/l.offsetWidth;return{style:`${d}: ${p/w}px; max-width: ${m/k}px`,class:"cm-completionInfo-"+(f?o?"left-narrow":"right-narrow":c?"left":"right")}}function F4(i){let e=i.addToOptions.slice();return i.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,s,l){let o=document.createElement("span");o.className="cm-completionLabel";let c=t.displayLabel||t.label,f=0;for(let d=0;d<l.length;){let p=l[d++],m=l[d++];p>f&&o.appendChild(document.createTextNode(c.slice(f,p)));let y=o.appendChild(document.createElement("span"));y.appendChild(document.createTextNode(c.slice(p,m))),y.className="cm-completionMatchedText",f=m}return f<c.length&&o.appendChild(document.createTextNode(c.slice(f))),o},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function fO(i,e,t){if(i<=t)return{from:0,to:i};if(e<0&&(e=0),e<=i>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let n=Math.floor((i-e)/t);return{from:i-(n+1)*t,to:i-n*t}}class K4{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:f=>this.placeInfo(f),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:l,selected:o}=s.open,c=e.state.facet(Rt);this.optionContent=F4(c),this.optionClass=c.optionClass,this.tooltipClass=c.tooltipClass,this.range=fO(l.length,o,c.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",f=>{let{options:d}=e.state.field(t).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]<d.length){this.applyCompletion(e,d[+m[1]]),f.preventDefault();return}}),this.dom.addEventListener("focusout",f=>{let d=e.state.field(this.stateField,!1);d&&d.tooltip&&e.state.facet(Rt).closeOnBlur&&f.relatedTarget!=e.contentDOM&&e.dispatch({effects:uc.of(null)})}),this.showOptions(l,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=s){let{options:l,selected:o,disabled:c}=n.open;(!s.open||s.open.options!=l)&&(this.range=fO(l.length,o,e.state.facet(Rt).maxRenderedOptions),this.showOptions(l,n.id)),this.updateSel(),c!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!c)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=fO(t.options.length,t.selected,this.view.state.facet(Rt).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:s}=t.options[t.selected],{info:l}=s;if(!l)return;let o=typeof l=="string"?document.createTextNode(l):l(s);if(!o)return;"then"in o?o.then(c=>{c&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(c,s)}).catch(c=>di(this.view.state,c,"completion info")):(this.addInfoPane(o,s),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:l}=e;n.appendChild(s),this.infoDestroy=l||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,s=this.range.from;n;n=n.nextSibling,s++)n.nodeName!="LI"||!n.id?s--:s==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&eN(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),l=this.space;if(!l){let o=this.dom.ownerDocument.documentElement;l={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return s.top>Math.min(l.bottom,t.bottom)-10||s.bottom<Math.max(l.top,t.top)+10?null:this.view.state.facet(Rt).positionInfo(this.view,t,s,n,l,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,t,n){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions")),s.addEventListener("mousedown",o=>{o.target==s&&o.preventDefault()});let l=null;for(let o=n.from;o<n.to;o++){let{completion:c,match:f}=e[o],{section:d}=c;if(d){let y=typeof d=="string"?d:d.name;if(y!=l&&(o>n.from||n.from==0))if(l=y,typeof d!="string"&&d.header)s.appendChild(d.header(d));else{let b=s.appendChild(document.createElement("completion-section"));b.textContent=y}}const p=s.appendChild(document.createElement("li"));p.id=t+"-"+o,p.setAttribute("role","option");let m=this.optionClass(c);m&&(p.className=m);for(let y of this.optionContent){let b=y(c,this.view.state,this.view,f);b&&p.appendChild(b)}}return n.from&&s.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function J4(i,e){return t=>new K4(t,i,e)}function eN(i,e){let t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.height/i.offsetHeight;n.top<t.top?i.scrollTop-=(t.top-n.top)/s:n.bottom>t.bottom&&(i.scrollTop+=(n.bottom-t.bottom)/s)}function UQ(i){return(i.boost||0)*100+(i.apply?10:0)+(i.info?5:0)+(i.type?1:0)}function tN(i,e){let t=[],n=null,s=null,l=p=>{t.push(p);let{section:m}=p.completion;if(m){n||(n=[]);let y=typeof m=="string"?m:m.name;n.some(b=>b.name==y)||n.push(typeof m=="string"?{name:y}:m)}},o=e.facet(Rt);for(let p of i)if(p.hasResult()){let m=p.result.getMatch;if(p.result.filter===!1)for(let y of p.result.options)l(new NQ(y,p.source,m?m(y):[],1e9-t.length));else{let y=e.sliceDoc(p.from,p.to),b,S=o.filterStrict?new H4(y):new W4(y);for(let v of p.result.options)if(b=S.match(v.label)){let w=v.displayLabel?m?m(v,b.matched):[]:b.matched,k=b.score+(v.boost||0);if(l(new NQ(v,p.source,w,k)),typeof v.section=="object"&&v.section.rank==="dynamic"){let{name:A}=v.section;s||(s=Object.create(null)),s[A]=Math.max(k,s[A]||-1e9)}}}}if(n){let p=Object.create(null),m=0,y=(b,S)=>(b.rank==="dynamic"&&S.rank==="dynamic"?s[S.name]-s[b.name]:0)||(typeof b.rank=="number"?b.rank:1e9)-(typeof S.rank=="number"?S.rank:1e9)||(b.name<S.name?-1:1);for(let b of n.sort(y))m-=1e5,p[b.name]=m;for(let b of t){let{section:S}=b.completion;S&&(b.score+=p[typeof S=="string"?S:S.name])}}let c=[],f=null,d=o.compareCompletions;for(let p of t.sort((m,y)=>y.score-m.score||d(m.completion,y.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):UQ(p.completion)>UQ(f)&&(c[c.length-1]=p),f=p.completion}return c}class Nl{constructor(e,t,n,s,l,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=s,this.selected=l,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Nl(this.options,GQ(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,s,l,o){if(s&&!o&&e.some(d=>d.isPending))return s.setDisabled();let c=tN(e,t);if(!c.length)return s&&e.some(d=>d.isPending)?s.setDisabled():null;let f=t.facet(Rt).selectOnOpen?0:-1;if(s&&s.selected!=f&&s.selected!=-1){let d=s.options[s.selected].completion;for(let p=0;p<c.length;p++)if(c[p].completion==d){f=p;break}}return new Nl(c,GQ(n,f),{pos:e.reduce((d,p)=>p.hasResult()?Math.min(d,p.from):d,1e8),create:aN,above:l.aboveCursor},s?s.timestamp:Date.now(),f,!1)}map(e){return new Nl(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Nl(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Ch{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Ch(rN,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Rt),l=(n.override||t.languageDataAt("autocomplete",jr(t)).map(G4)).map(f=>(this.active.find(p=>p.source==f)||new Hi(f,this.active.some(p=>p.state!=0)?1:0)).update(e,n));l.length==this.active.length&&l.every((f,d)=>f==this.active[d])&&(l=this.active);let o=this.open,c=e.effects.some(f=>f.is(by));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||l.some(f=>f.hasResult()&&e.changes.touchesRange(f.from,f.to))||!iN(l,this.active)||c?o=Nl.build(l,t,this.id,o,n,c):o&&o.disabled&&!l.some(f=>f.isPending)&&(o=null),!o&&l.every(f=>!f.isPending)&&l.some(f=>f.hasResult())&&(l=l.map(f=>f.hasResult()?new Hi(f.source,0):f));for(let f of e.effects)f.is(VP)&&(o=o&&o.setSelected(f.value,this.id));return l==this.active&&o==this.open?this:new Ch(l,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?nN:sN}}function iN(i,e){if(i==e)return!0;for(let t=0,n=0;;){for(;t<i.length&&!i[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let s=t==i.length,l=n==e.length;if(s||l)return s==l;if(i[t++].result!=e[n++].result)return!1}}const nN={"aria-autocomplete":"list"},sN={};function GQ(i,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":i};return e>-1&&(t["aria-activedescendant"]=i+"-"+e),t}const rN=[];function LP(i,e){if(i.isUserEvent("input.complete")){let n=i.annotation(yy);if(n&&e.activateOnCompletion(n))return 12}let t=i.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:i.isUserEvent("delete.backward")?2:i.selection?8:i.docChanged?16:0}class Hi{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=LP(e,t),s=this;(n&8||n&16&&this.touches(e))&&(s=new Hi(s.source,0)),n&4&&s.state==0&&(s=new Hi(this.source,1)),s=s.updateFor(e,n);for(let l of e.effects)if(l.is(Th))s=new Hi(s.source,1,l.value);else if(l.is(uc))s=new Hi(s.source,0);else if(l.is(by))for(let o of l.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(jr(e.state))}}class Fl extends Hi{constructor(e,t,n,s,l,o){super(e,3,t),this.limit=n,this.result=s,this.from=l,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let l=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),c=jr(e.state);if(c>o||!s||t&2&&(jr(e.startState)==this.from||c<this.limit))return new Hi(this.source,t&4?1:0);let f=e.changes.mapPos(this.limit);return lN(s.validFor,e.state,l,o)?new Fl(this.source,this.explicit,f,s,l,o):s.update&&(s=s.update(s,l,o,new gy(e.state,c,!1)))?new Fl(this.source,this.explicit,f,s,s.from,(n=s.to)!==null&&n!==void 0?n:jr(e.state)):new Hi(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Fl(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Hi(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function lN(i,e,t,n){if(!i)return!1;let s=e.sliceDoc(t,n);return typeof i=="function"?i(s,t,n,e):XP(i,!0).test(s)}const by=ke.define({map(i,e){return i.map(t=>t.map(e))}}),VP=ke.define(),fi=Dt.define({create(){return Ch.start()},update(i,e){return i.update(e)},provide:i=>[ey.from(i,e=>e.tooltip),ne.contentAttributes.from(i,e=>e.attrs)]});function Sy(i,e){const t=e.completion.apply||e.completion.label;let n=i.state.field(fi).active.find(s=>s.source==e.source);return n instanceof Fl?(typeof t=="string"?i.dispatch({...U4(i.state,t,n.from,n.to),annotations:yy.of(e.completion)}):t(i,e.completion,n.from,n.to),!0):!1}const aN=J4(fi,Sy);function Tf(i,e="option"){return t=>{let n=t.state.field(fi,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(Rt).interactionDelay)return!1;let s=1,l;e=="page"&&(l=OA(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(l.dom.offsetHeight/l.dom.querySelector("li").offsetHeight)-1));let{length:o}=n.open.options,c=n.open.selected>-1?n.open.selected+s*(i?1:-1):i?0:o-1;return c<0?c=e=="page"?0:o-1:c>=o&&(c=e=="page"?o-1:0),t.dispatch({effects:VP.of(c)}),!0}}const oN=i=>{let e=i.state.field(fi,!1);return i.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<i.state.facet(Rt).interactionDelay?!1:Sy(i,e.open.options[e.open.selected])},hO=i=>i.state.field(fi,!1)?(i.dispatch({effects:Th.of(!0)}),!0):!1,cN=i=>{let e=i.state.field(fi,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(i.dispatch({effects:uc.of(null)}),!0)};class uN{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const fN=50,hN=1e3,dN=gt.fromClass(class{constructor(i){this.view=i,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of i.state.field(fi).active)e.isPending&&this.startQuery(e)}update(i){let e=i.state.field(fi),t=i.state.facet(Rt);if(!i.selectionSet&&!i.docChanged&&i.startState.field(fi)==e)return;let n=i.transactions.some(l=>{let o=LP(l,t);return o&8||(l.selection||l.docChanged)&&!(o&3)});for(let l=0;l<this.running.length;l++){let o=this.running[l];if(n||o.context.abortOnDocChange&&i.docChanged||o.updates.length+i.transactions.length>fN&&Date.now()-o.time>hN){for(let c of o.context.abortListeners)try{c()}catch(f){di(this.view.state,f)}o.context.abortListeners=null,this.running.splice(l--,1)}else o.updates.push(...i.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),i.transactions.some(l=>l.effects.some(o=>o.is(Th)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(l=>l.isPending&&!this.running.some(o=>o.active.source==l.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let l of i.transactions)l.isUserEvent("input.type")?this.composing=2:this.composing==2&&l.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:i}=this.view,e=i.field(fi);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Rt).updateSyncTime))}startQuery(i){let{state:e}=this.view,t=jr(e),n=new gy(e,t,i.explicit,this.view),s=new uN(i,n);this.running.push(s),Promise.resolve(i.source(n)).then(l=>{s.context.aborted||(s.done=l||null,this.scheduleAccept())},l=>{this.view.dispatch({effects:uc.of(null)}),di(this.view.state,l)})}scheduleAccept(){this.running.every(i=>i.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Rt).updateSyncTime))}accept(){var i;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Rt),n=this.view.state.field(fi);for(let s=0;s<this.running.length;s++){let l=this.running[s];if(l.done===void 0)continue;if(this.running.splice(s--,1),l.done){let c=jr(l.updates.length?l.updates[0].startState:this.view.state),f=Math.min(c,l.done.from+(l.active.explicit?0:1)),d=new Fl(l.active.source,l.active.explicit,f,l.done,l.done.from,(i=l.done.to)!==null&&i!==void 0?i:c);for(let p of l.updates)d=d.update(p,t);if(d.hasResult()){e.push(d);continue}}let o=n.active.find(c=>c.source==l.active.source);if(o&&o.isPending)if(l.done==null){let c=new Hi(l.active.source,0);for(let f of l.updates)c=c.update(f,t);c.isPending||e.push(c)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:by.of(e)})}},{eventHandlers:{blur(i){let e=this.view.state.field(fi,!1);if(e&&e.tooltip&&this.view.state.facet(Rt).closeOnBlur){let t=e.open&&OA(this.view,e.open.tooltip);(!t||!t.dom.contains(i.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:uc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Th.of(!1)}),20),this.composing=0}}}),pN=typeof navigator=="object"&&/Win/.test(navigator.platform),mN=hs.highest(ne.domEventHandlers({keydown(i,e){let t=e.state.field(fi,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||i.key.length>1||i.ctrlKey&&!(pN&&i.altKey)||i.metaKey)return!1;let n=t.open.options[t.open.selected],s=t.active.find(o=>o.source==n.source),l=n.completion.commitCharacters||s.result.commitCharacters;return l&&l.indexOf(i.key)>-1&&Sy(e,n),!1}})),_P=ne.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 ON{constructor(e,t,n,s){this.field=e,this.line=t,this.from=n,this.to=s}}class xy{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,Yt.TrackDel),n=e.mapPos(this.to,1,Yt.TrackDel);return t==null||n==null?null:new xy(this.field,t,n)}}class vy{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],s=[t],l=e.doc.lineAt(t),o=/^\s*/.exec(l.text)[0];for(let f of this.lines){if(n.length){let d=o,p=/^\t*/.exec(f)[0].length;for(let m=0;m<p;m++)d+=e.facet(ma);s.push(t+d.length-p),f=d+f.slice(p)}n.push(f),t+=f.length+1}let c=this.fieldPositions.map(f=>new xy(f.field,s[f.line]+f.from,s[f.line]+f.to));return{text:n,ranges:c}}static parse(e){let t=[],n=[],s=[],l;for(let o of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let c=l[1]?+l[1]:null,f=l[2]||l[3]||"",d=-1,p=f.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<t.length;m++)(c!=null?t[m].seq==c:p&&t[m].name==p)&&(d=m);if(d<0){let m=0;for(;m<t.length&&(c==null||t[m].seq!=null&&t[m].seq<c);)m++;t.splice(m,0,{seq:c,name:p}),d=m;for(let y of s)y.field>=d&&y.field++}for(let m of s)if(m.line==n.length&&m.from>l.index){let y=l[2]?3+(l[1]||"").length:2;m.from-=y,m.to-=y}s.push(new ON(d,n.length,l.index,l.index+p.length)),o=o.slice(0,l.index)+f+o.slice(l.index+l[0].length)}o=o.replace(/\\([{}])/g,(c,f,d)=>{for(let p of s)p.line==n.length&&p.from>d&&(p.from--,p.to--);return f}),n.push(o)}return new vy(n,s)}}let gN=be.widget({widget:new class extends hn{toDOM(){let i=document.createElement("span");return i.className="cm-snippetFieldPosition",i}ignoreEvent(){return!1}}}),yN=be.mark({class:"cm-snippetField"});class ba{constructor(e,t){this.ranges=e,this.active=t,this.deco=be.set(e.map(n=>(n.from==n.to?gN:yN).range(n.from,n.to)),!0)}map(e){let t=[];for(let n of this.ranges){let s=n.map(e);if(!s)return null;t.push(s)}return new ba(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}const Dc=ke.define({map(i,e){return i&&i.map(e)}}),bN=ke.define(),fc=Dt.define({create(){return null},update(i,e){for(let t of e.effects){if(t.is(Dc))return t.value;if(t.is(bN)&&i)return new ba(i.ranges,t.value)}return i&&e.docChanged&&(i=i.map(e.changes)),i&&e.selection&&!i.selectionInsideField(e.selection)&&(i=null),i},provide:i=>ne.decorations.from(i,e=>e?e.deco:be.none)});function wy(i,e){return G.create(i.filter(t=>t.field==e).map(t=>G.range(t.from,t.to)))}function SN(i){let e=vy.parse(i);return(t,n,s,l)=>{let{text:o,ranges:c}=e.instantiate(t.state,s),{main:f}=t.state.selection,d={changes:{from:s,to:l==f.from?f.to:l,insert:je.of(o)},scrollIntoView:!0,annotations:n?[yy.of(n),wt.userEvent.of("input.complete")]:void 0};if(c.length&&(d.selection=wy(c,0)),c.some(p=>p.field>0)){let p=new ba(c,0),m=d.effects=[Dc.of(p)];t.state.field(fc,!1)===void 0&&m.push(ke.appendConfig.of([fc,kN,TN,_P]))}t.dispatch(t.state.update(d))}}function jP(i){return({state:e,dispatch:t})=>{let n=e.field(fc,!1);if(!n||i<0&&n.active==0)return!1;let s=n.active+i,l=i>0&&!n.ranges.some(o=>o.field==s+i);return t(e.update({selection:wy(n.ranges,s),effects:Dc.of(l?null:new ba(n.ranges,s)),scrollIntoView:!0})),!0}}const xN=({state:i,dispatch:e})=>i.field(fc,!1)?(e(i.update({effects:Dc.of(null)})),!0):!1,vN=jP(1),wN=jP(-1),QN=[{key:"Tab",run:vN,shift:wN},{key:"Escape",run:xN}],WQ=le.define({combine(i){return i.length?i[0]:QN}}),kN=hs.highest(Gr.compute([WQ],i=>i.facet(WQ)));function ci(i,e){return{...e,apply:SN(i)}}const TN=ne.domEventHandlers({mousedown(i,e){let t=e.state.field(fc,!1),n;if(!t||(n=e.posAtCoords({x:i.clientX,y:i.clientY}))==null)return!1;let s=t.ranges.find(l=>l.from<=n&&l.to>=n);return!s||s.field==t.active?!1:(e.dispatch({selection:wy(t.ranges,s.field),effects:Dc.of(t.ranges.some(l=>l.field>s.field)?new ba(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),hc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Vr=ke.define({map(i,e){let t=e.mapPos(i,-1,Yt.TrackAfter);return t??void 0}}),Qy=new class extends Ks{};Qy.startSide=1;Qy.endSide=-1;const BP=Dt.define({create(){return De.empty},update(i,e){if(i=i.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);i=i.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(Vr)&&(i=i.update({add:[Qy.range(t.value,t.value+1)]}));return i}});function CN(){return[PN,BP]}const dO="()[]{}<>«»»«[]{}";function NP(i){for(let e=0;e<dO.length;e+=2)if(dO.charCodeAt(e)==i)return dO.charAt(e+1);return X0(i<128?i:i+1)}function YP(i,e){return i.languageDataAt("closeBrackets",e)[0]||hc}const AN=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),PN=ne.inputHandler.of((i,e,t,n)=>{if((AN?i.composing:i.compositionStarted)||i.state.readOnly)return!1;let s=i.state.selection.main;if(n.length>2||n.length==2&&kn(ui(n,0))==1||e!=s.from||t!=s.to)return!1;let l=EN(i.state,n);return l?(i.dispatch(l),!0):!1}),$N=({state:i,dispatch:e})=>{if(i.readOnly)return!1;let n=YP(i,i.selection.main.head).brackets||hc.brackets,s=null,l=i.changeByRange(o=>{if(o.empty){let c=RN(i.doc,o.head);for(let f of n)if(f==c&&Fh(i.doc,o.head)==NP(ui(f,0)))return{changes:{from:o.head-f.length,to:o.head+f.length},range:G.cursor(o.head-f.length)}}return{range:s=o}});return s||e(i.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},MN=[{key:"Backspace",run:$N}];function EN(i,e){let t=YP(i,i.selection.main.head),n=t.brackets||hc.brackets;for(let s of n){let l=NP(ui(s,0));if(e==s)return l==s?ZN(i,s,n.indexOf(s+s+s)>-1,t):zN(i,s,l,t.before||hc.before);if(e==l&&qP(i,i.selection.main.from))return DN(i,s,l)}return null}function qP(i,e){let t=!1;return i.field(BP).between(0,i.doc.length,n=>{n==e&&(t=!0)}),t}function Fh(i,e){let t=i.sliceString(e,e+2);return t.slice(0,kn(ui(t,0)))}function RN(i,e){let t=i.sliceString(e-2,e);return kn(ui(t,0))==t.length?t:t.slice(1)}function zN(i,e,t,n){let s=null,l=i.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:Vr.of(o.to+e.length),range:G.range(o.anchor+e.length,o.head+e.length)};let c=Fh(i.doc,o.head);return!c||/\s/.test(c)||n.indexOf(c)>-1?{changes:{insert:e+t,from:o.head},effects:Vr.of(o.head+e.length),range:G.cursor(o.head+e.length)}:{range:s=o}});return s?null:i.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function DN(i,e,t){let n=null,s=i.changeByRange(l=>l.empty&&Fh(i.doc,l.head)==t?{changes:{from:l.head,to:l.head+t.length,insert:t},range:G.cursor(l.head+t.length)}:n={range:l});return n?null:i.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ZN(i,e,t,n){let s=n.stringPrefixes||hc.stringPrefixes,l=null,o=i.changeByRange(c=>{if(!c.empty)return{changes:[{insert:e,from:c.from},{insert:e,from:c.to}],effects:Vr.of(c.to+e.length),range:G.range(c.anchor+e.length,c.head+e.length)};let f=c.head,d=Fh(i.doc,f),p;if(d==e){if(HQ(i,f))return{changes:{insert:e+e,from:f},effects:Vr.of(f+e.length),range:G.cursor(f+e.length)};if(qP(i,f)){let y=t&&i.sliceDoc(f,f+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:f,to:f+y.length,insert:y},range:G.cursor(f+y.length)}}}else{if(t&&i.sliceDoc(f-2*e.length,f)==e+e&&(p=IQ(i,f-2*e.length,s))>-1&&HQ(i,p))return{changes:{insert:e+e+e+e,from:f},effects:Vr.of(f+e.length),range:G.cursor(f+e.length)};if(i.charCategorizer(f)(d)!=ct.Word&&IQ(i,f,s)>-1&&!XN(i,f,e,s))return{changes:{insert:e+e,from:f},effects:Vr.of(f+e.length),range:G.cursor(f+e.length)}}return{range:l=c}});return l?null:i.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function HQ(i,e){let t=it(i).resolveInner(e+1);return t.parent&&t.from==e}function XN(i,e,t,n){let s=it(i).resolveInner(e,-1),l=n.reduce((o,c)=>Math.max(o,c.length),0);for(let o=0;o<5;o++){let c=i.sliceDoc(s.from,Math.min(s.to,s.from+t.length+l)),f=c.indexOf(t);if(!f||f>-1&&n.indexOf(c.slice(0,f))>-1){let p=s.firstChild;for(;p&&p.from==s.from&&p.to-p.from>t.length+f;){if(i.sliceDoc(p.to-t.length,p.to)==t)return!1;p=p.firstChild}return!0}let d=s.to==e&&s.parent;if(!d)break;s=d}return!1}function IQ(i,e,t){let n=i.charCategorizer(e);if(n(i.sliceDoc(e-1,e))!=ct.Word)return e;for(let s of t){let l=e-s.length;if(i.sliceDoc(l,e)==s&&n(i.sliceDoc(l-1,l))!=ct.Word)return l}return-1}function LN(i={}){return[mN,fi,Rt.of(i),dN,VN,_P]}const UP=[{key:"Ctrl-Space",run:hO},{mac:"Alt-`",run:hO},{mac:"Alt-i",run:hO},{key:"Escape",run:cN},{key:"ArrowDown",run:Tf(!0)},{key:"ArrowUp",run:Tf(!1)},{key:"PageDown",run:Tf(!0,"page")},{key:"PageUp",run:Tf(!1,"page")},{key:"Enter",run:oN}],VN=hs.highest(Gr.computeN([Rt],i=>i.facet(Rt).defaultKeymap?[UP]:[]));class FQ{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class Er{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let s=n.facet(dc).markerFilter;s&&(e=s(e,n));let l=e.slice().sort((b,S)=>b.from-S.from||b.to-S.to),o=new cs,c=[],f=0,d=n.doc.iter(),p=0,m=n.doc.length;for(let b=0;;){let S=b==l.length?null:l[b];if(!S&&!c.length)break;let v,w;if(c.length)v=f,w=c.reduce((P,V)=>Math.min(P,V.to),S&&S.from>v?S.from:1e8);else{if(v=S.from,v>m)break;w=S.to,c.push(S),b++}for(;b<l.length;){let P=l[b];if(P.from==v&&(P.to>P.from||P.to==v))c.push(P),b++,w=Math.min(P.to,w);else{w=Math.min(P.from,w);break}}w=Math.min(w,m);let k=!1;if(c.some(P=>P.from==v&&(P.to==w||w==m))&&(k=v==w,!k&&w-v<10)){let P=v-(p+d.value.length);P>0&&(d.next(P),p=v);for(let V=v;;){if(V>=w){k=!0;break}if(!d.lineBreak&&p+d.value.length>V)break;V=p+d.value.length,p+=d.value.length,d.next()}}let A=KN(c);if(k)o.add(v,v,be.widget({widget:new WN(A),diagnostics:c.slice()}));else{let P=c.reduce((V,R)=>R.markClass?V+" "+R.markClass:V,"");o.add(v,w,be.mark({class:"cm-lintRange cm-lintRange-"+A+P,diagnostics:c.slice(),inclusiveEnd:c.some(V=>V.to>w)}))}if(f=w,f==m)break;for(let P=0;P<c.length;P++)c[P].to<=f&&c.splice(P--,1)}let y=o.finish();return new Er(y,t,sr(y))}}function sr(i,e=null,t=0){let n=null;return i.between(t,1e9,(s,l,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!n)n=new FQ(s,l,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(n.diagnostic)<0)return!1;n=new FQ(n.from,l,n.diagnostic)}}),n}function _N(i,e){let t=e.pos,n=e.end||t,s=i.state.facet(dc).hideOn(i,t,n);if(s!=null)return s;let l=i.startState.doc.lineAt(e.pos);return!!(i.effects.some(o=>o.is(GP))||i.changes.touchesRange(l.from,Math.max(l.to,n)))}function jN(i,e){return i.field(Mi,!1)?e:e.concat(ke.appendConfig.of(JN))}const GP=ke.define(),ky=ke.define(),WP=ke.define(),Mi=Dt.define({create(){return new Er(be.none,null,null)},update(i,e){if(e.docChanged&&i.diagnostics.size){let t=i.diagnostics.map(e.changes),n=null,s=i.panel;if(i.selected){let l=e.changes.mapPos(i.selected.from,1);n=sr(t,i.selected.diagnostic,l)||sr(t,null,l)}!t.size&&s&&e.state.facet(dc).autoPanel&&(s=null),i=new Er(t,s,n)}for(let t of e.effects)if(t.is(GP)){let n=e.state.facet(dc).autoPanel?t.value.length?pc.open:null:i.panel;i=Er.init(t.value,n,e.state)}else t.is(ky)?i=new Er(i.diagnostics,t.value?pc.open:null,i.selected):t.is(WP)&&(i=new Er(i.diagnostics,i.panel,t.value));return i},provide:i=>[nc.from(i,e=>e.panel),ne.decorations.from(i,e=>e.diagnostics)]}),BN=be.mark({class:"cm-lintRange cm-lintRange-active"});function NN(i,e,t){let{diagnostics:n}=i.state.field(Mi),s,l=-1,o=-1;n.between(e-(t<0?1:0),e+(t>0?1:0),(f,d,{spec:p})=>{if(e>=f&&e<=d&&(f==d||(e>f||t>0)&&(e<d||t<0)))return s=p.diagnostics,l=f,o=d,!1});let c=i.state.facet(dc).tooltipFilter;return s&&c&&(s=c(s,i.state)),s?{pos:l,end:o,above:i.state.doc.lineAt(l).to<o,create(){return{dom:YN(i,s)}}}:null}function YN(i,e){return Ke("ul",{class:"cm-tooltip-lint"},e.map(t=>IP(i,t,!1)))}const qN=i=>{let e=i.state.field(Mi,!1);(!e||!e.panel)&&i.dispatch({effects:jN(i.state,[ky.of(!0)])});let t=ty(i,pc.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},KQ=i=>{let e=i.state.field(Mi,!1);return!e||!e.panel?!1:(i.dispatch({effects:ky.of(!1)}),!0)},UN=i=>{let e=i.state.field(Mi,!1);if(!e)return!1;let t=i.state.selection.main,n=sr(e.diagnostics,null,t.to+1);return!n&&(n=sr(e.diagnostics,null,0),!n||n.from==t.from&&n.to==t.to)?!1:(i.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)},GN=[{key:"Mod-Shift-m",run:qN,preventDefault:!0},{key:"F8",run:UN}],dc=le.define({combine(i){return{sources:i.map(e=>e.source).filter(e=>e!=null),...Zn(i.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:JQ,tooltipFilter:JQ,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,s,l)=>e(n,s,l)||t(n,s,l):e:t,autoPanel:(e,t)=>e||t})}}});function JQ(i,e){return i?e?(t,n)=>e(i(t,n),n):i:e}function HP(i){let e=[];if(i)e:for(let{name:t}of i){for(let n=0;n<t.length;n++){let s=t[n];if(/[a-zA-Z]/.test(s)&&!e.some(l=>l.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function IP(i,e,t){var n;let s=t?HP(e.actions):[];return Ke("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Ke("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(i):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((l,o)=>{let c=!1,f=b=>{if(b.preventDefault(),c)return;c=!0;let S=sr(i.state.field(Mi).diagnostics,e);S&&l.apply(i,S.from,S.to)},{name:d}=l,p=s[o]?d.indexOf(s[o]):-1,m=p<0?d:[d.slice(0,p),Ke("u",d.slice(p,p+1)),d.slice(p+1)],y=l.markClass?" "+l.markClass:"";return Ke("button",{type:"button",class:"cm-diagnosticAction"+y,onclick:f,onmousedown:f,"aria-label":` Action: ${d}${p<0?"":` (access key "${s[o]})"`}.`},m)}),e.source&&Ke("div",{class:"cm-diagnosticSource"},e.source))}class WN extends hn{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ke("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class ek{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=IP(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class pc{constructor(e){this.view=e,this.items=[];let t=s=>{if(!(s.ctrlKey||s.altKey||s.metaKey)){if(s.keyCode==27)KQ(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:l}=this.items[this.selectedIndex],o=HP(l.actions);for(let c=0;c<o.length;c++)if(o[c].toUpperCase().charCodeAt(0)==s.keyCode){let f=sr(this.view.state.field(Mi).diagnostics,l);f&&l.actions[c].apply(e,f.from,f.to)}}else return;s.preventDefault()}},n=s=>{for(let l=0;l<this.items.length;l++)this.items[l].dom.contains(s.target)&&this.moveSelection(l)};this.list=Ke("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=Ke("div",{class:"cm-panel-lint"},this.list,Ke("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>KQ(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Mi).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Mi),n=0,s=!1,l=null,o=new Set;for(e.between(0,this.view.state.doc.length,(c,f,{spec:d})=>{for(let p of d.diagnostics){if(o.has(p))continue;o.add(p);let m=-1,y;for(let b=n;b<this.items.length;b++)if(this.items[b].diagnostic==p){m=b;break}m<0?(y=new ek(this.view,p),this.items.splice(n,0,y),s=!0):(y=this.items[m],m>n&&(this.items.splice(n,m-n),s=!0)),t&&y.diagnostic==t.diagnostic?y.dom.hasAttribute("aria-selected")||(y.dom.setAttribute("aria-selected","true"),l=y):y.dom.hasAttribute("aria-selected")&&y.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();this.items.length==0&&(this.items.push(new ek(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),l?(this.list.setAttribute("aria-activedescendant",l.id),this.view.requestMeasure({key:this,read:()=>({sel:l.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:c,panel:f})=>{let d=f.height/this.list.offsetHeight;c.top<f.top?this.list.scrollTop-=(f.top-c.top)/d:c.bottom>f.bottom&&(this.list.scrollTop+=(c.bottom-f.bottom)/d)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Mi),n=sr(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:WP.of(n)})}static open(e){return new pc(e)}}function HN(i,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(i)}</svg>')`}function Cf(i){return HN(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${i}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const IN=ne.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:Cf("#d11")},".cm-lintRange-warning":{backgroundImage:Cf("orange")},".cm-lintRange-info":{backgroundImage:Cf("#999")},".cm-lintRange-hint":{backgroundImage:Cf("#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 FN(i){return i=="error"?4:i=="warning"?3:i=="info"?2:1}function KN(i){let e="hint",t=1;for(let n of i){let s=FN(n.severity);s>t&&(t=s,e=n.severity)}return e}const JN=[Mi,ne.decorations.compute([Mi],i=>{let{selected:e,panel:t}=i.field(Mi);return!e||!t||e.from==e.to?be.none:be.set([BN.range(e.from,e.to)])}),M_(NN,{hideOn:_N}),IN];var tk=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,n=[];e.closeBracketsKeymap!==!1&&(n=n.concat(MN)),e.defaultKeymap!==!1&&(n=n.concat(d4)),e.searchKeymap!==!1&&(n=n.concat(_4)),e.historyKeymap!==!1&&(n=n.concat(SB)),e.foldKeymap!==!1&&(n=n.concat(Dj)),e.completionKeymap!==!1&&(n=n.concat(UP)),e.lintKeymap!==!1&&(n=n.concat(GN));var s=[];return e.lineNumbers!==!1&&s.push(Y_()),e.highlightActiveLineGutter!==!1&&s.push(G_()),e.highlightSpecialChars!==!1&&s.push(l_()),e.history!==!1&&s.push(fB()),e.foldGutter!==!1&&s.push(Vj()),e.drawSelection!==!1&&s.push(HV()),e.dropCursor!==!1&&s.push(e_()),e.allowMultipleSelections!==!1&&s.push(Le.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&s.push(Cj()),e.syntaxHighlighting!==!1&&s.push(NA(Nj,{fallback:!0})),e.bracketMatching!==!1&&s.push(Ij()),e.closeBrackets!==!1&&s.push(CN()),e.autocompletion!==!1&&s.push(LN()),e.rectangularSelection!==!1&&s.push(S_()),t!==!1&&s.push(w_()),e.highlightActiveLine!==!1&&s.push(h_()),e.highlightSelectionMatches!==!1&&s.push(b4()),e.tabSize&&typeof e.tabSize=="number"&&s.push(ma.of(" ".repeat(e.tabSize))),s.concat([Gr.of(n.flat())]).filter(Boolean)};const eY="#e5c07b",ik="#e06c75",tY="#56b6c2",iY="#ffffff",Yf="#abb2bf",Wg="#7d8799",nY="#61afef",sY="#98c379",nk="#d19a66",rY="#c678dd",lY="#21252b",sk="#2c313a",rk="#282c34",pO="#353a42",aY="#3E4451",lk="#528bff",oY=ne.theme({"&":{color:Yf,backgroundColor:rk},".cm-content":{caretColor:lk},".cm-cursor, .cm-dropCursor":{borderLeftColor:lk},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:aY},".cm-panels":{backgroundColor:lY,color:Yf},".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:rk,color:Wg,border:"none"},".cm-activeLineGutter":{backgroundColor:sk},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:pO},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:pO,borderBottomColor:pO},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:sk,color:Yf}}},{dark:!0}),cY=Ec.define([{tag:T.keyword,color:rY},{tag:[T.name,T.deleted,T.character,T.propertyName,T.macroName],color:ik},{tag:[T.function(T.variableName),T.labelName],color:nY},{tag:[T.color,T.constant(T.name),T.standard(T.name)],color:nk},{tag:[T.definition(T.name),T.separator],color:Yf},{tag:[T.typeName,T.className,T.number,T.changed,T.annotation,T.modifier,T.self,T.namespace],color:eY},{tag:[T.operator,T.operatorKeyword,T.url,T.escape,T.regexp,T.link,T.special(T.string)],color:tY},{tag:[T.meta,T.comment],color:Wg},{tag:T.strong,fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.link,color:Wg,textDecoration:"underline"},{tag:T.heading,fontWeight:"bold",color:ik},{tag:[T.atom,T.bool,T.special(T.variableName)],color:nk},{tag:[T.processingInstruction,T.string,T.inserted],color:sY},{tag:T.invalid,color:iY}]),FP=[oY,NA(cY)];var uY=ne.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),fY=function(e){e===void 0&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:s=!1,theme:l="light",placeholder:o="",basicSetup:c=!0}=e,f=[];switch(t&&f.unshift(Gr.of([p4])),c&&(typeof c=="boolean"?f.unshift(tk()):f.unshift(tk(c))),o&&f.unshift(O_(o)),l){case"light":f.push(uY);break;case"dark":f.push(FP);break;case"none":break;default:f.push(l);break}return n===!1&&f.push(ne.editable.of(!1)),s&&f.push(Le.readOnly.of(!0)),[...f]},hY=i=>({line:i.state.doc.lineAt(i.state.selection.main.from),lineCount:i.state.doc.lines,lineBreak:i.state.lineBreak,length:i.state.doc.length,readOnly:i.state.readOnly,tabSize:i.state.tabSize,selection:i.state.selection,selectionAsSingle:i.state.selection.asSingle().main,ranges:i.state.selection.ranges,selectionCode:i.state.sliceDoc(i.state.selection.main.from,i.state.selection.main.to),selections:i.state.selection.ranges.map(e=>i.state.sliceDoc(e.from,e.to)),selectedText:i.state.selection.ranges.some(e=>!e.empty)});class dY{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,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(t=>{try{t()}catch(n){console.error("TimeoutLatch callback error:",n)}})}}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 ak{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 mO=null,pY=()=>typeof window>"u"?new ak:(mO||(mO=new ak),mO),ok=Dn.define(),mY=200,OY=[];function gY(i){var{value:e,selection:t,onChange:n,onStatistics:s,onCreateEditor:l,onUpdate:o,extensions:c=OY,autoFocus:f,theme:d="light",height:p=null,minHeight:m=null,maxHeight:y=null,width:b=null,minWidth:S=null,maxWidth:v=null,placeholder:w="",editable:k=!0,readOnly:A=!1,indentWithTab:P=!0,basicSetup:V=!0,root:R,initialState:N}=i,[_,j]=q.useState(),[K,Oe]=q.useState(),[ce,ie]=q.useState(),xe=q.useState(()=>({current:null}))[0],Se=q.useState(()=>({current:null}))[0],we=ne.theme({"&":{height:p,minHeight:m,maxHeight:y,width:b,minWidth:S,maxWidth:v},"& .cm-scroller":{height:"100% !important"}}),X=ne.updateListener.of(oe=>{if(oe.docChanged&&typeof n=="function"&&!oe.transactions.some(Y=>Y.annotation(ok))){xe.current?xe.current.reset():(xe.current=new dY(()=>{if(Se.current){var Y=Se.current;Se.current=null,Y()}xe.current=null},mY),pY().add(xe.current));var F=oe.state.doc,M=F.toString();n(M,oe)}s&&s(hY(oe))}),W=fY({theme:d,editable:k,readOnly:A,placeholder:w,indentWithTab:P,basicSetup:V}),te=[X,we,...W];return o&&typeof o=="function"&&te.push(ne.updateListener.of(o)),te=te.concat(c),q.useLayoutEffect(()=>{if(_&&!ce){var oe={doc:e,selection:t,extensions:te},F=N?Le.fromJSON(N.json,oe,N.fields):Le.create(oe);if(ie(F),!K){var M=new ne({state:F,parent:_,root:R});Oe(M),l&&l(M,F)}}return()=>{K&&(ie(void 0),Oe(void 0))}},[_,ce]),q.useEffect(()=>{i.container&&j(i.container)},[i.container]),q.useEffect(()=>()=>{K&&(K.destroy(),Oe(void 0)),xe.current&&(xe.current.cancel(),xe.current=null)},[K]),q.useEffect(()=>{f&&K&&K.focus()},[f,K]),q.useEffect(()=>{K&&K.dispatch({effects:ke.reconfigure.of(te)})},[d,c,p,m,y,b,S,v,w,k,A,P,V,n,o]),q.useEffect(()=>{if(e!==void 0){var oe=K?K.state.doc.toString():"";if(K&&e!==oe){var F=xe.current&&!xe.current.isDone,M=()=>{K&&e!==K.state.doc.toString()&&K.dispatch({changes:{from:0,to:K.state.doc.toString().length,insert:e||""},annotations:[ok.of(!0)]})};F?Se.current=M:M()}}},[e,K]),{state:ce,setState:ie,view:K,setView:Oe,container:_,setContainer:j}}var yY=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],KP=q.forwardRef((i,e)=>{var{className:t,value:n="",selection:s,extensions:l=[],onChange:o,onStatistics:c,onCreateEditor:f,onUpdate:d,autoFocus:p,theme:m="light",height:y,minHeight:b,maxHeight:S,width:v,minWidth:w,maxWidth:k,basicSetup:A,placeholder:P,indentWithTab:V,editable:R,readOnly:N,root:_,initialState:j}=i,K=D3(i,yY),Oe=q.useRef(null),{state:ce,view:ie,container:xe,setContainer:Se}=gY({root:_,value:n,autoFocus:p,theme:m,height:y,minHeight:b,maxHeight:S,width:v,minWidth:w,maxWidth:k,basicSetup:A,placeholder:P,indentWithTab:V,editable:R,readOnly:N,selection:s,onChange:o,onStatistics:c,onCreateEditor:f,onUpdate:d,extensions:l,initialState:j});q.useImperativeHandle(e,()=>({editor:Oe.current,state:ce,view:ie}),[Oe,xe,ce,ie]);var we=q.useCallback(W=>{Oe.current=W,Se(W)},[Se]);if(typeof n!="string")throw new Error("value must be typeof string but got "+typeof n);var X=typeof m=="string"?"cm-theme-"+m:"cm-theme";return C.jsx("div",tg({ref:we,className:""+X+(t?" "+t:"")},K))});KP.displayName="CodeMirror";class Ah{static create(e,t,n,s,l){let o=s+(s<<8)+e+(t<<4)|0;return new Ah(e,t,n,o,l,[],[])}constructor(e,t,n,s,l,o,c){this.type=e,this.value=t,this.from=n,this.hash=s,this.end=l,this.children=o,this.positions=c,this.hashProp=[[Te.contextHash,s]]}addChild(e,t){e.prop(Te.contextHash)!=this.hash&&(e=new qe(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new qe(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(s,l,o)=>new qe(Pt.none,s,l,o,this.hashProp)})}}var J;(function(i){i[i.Document=1]="Document",i[i.CodeBlock=2]="CodeBlock",i[i.FencedCode=3]="FencedCode",i[i.Blockquote=4]="Blockquote",i[i.HorizontalRule=5]="HorizontalRule",i[i.BulletList=6]="BulletList",i[i.OrderedList=7]="OrderedList",i[i.ListItem=8]="ListItem",i[i.ATXHeading1=9]="ATXHeading1",i[i.ATXHeading2=10]="ATXHeading2",i[i.ATXHeading3=11]="ATXHeading3",i[i.ATXHeading4=12]="ATXHeading4",i[i.ATXHeading5=13]="ATXHeading5",i[i.ATXHeading6=14]="ATXHeading6",i[i.SetextHeading1=15]="SetextHeading1",i[i.SetextHeading2=16]="SetextHeading2",i[i.HTMLBlock=17]="HTMLBlock",i[i.LinkReference=18]="LinkReference",i[i.Paragraph=19]="Paragraph",i[i.CommentBlock=20]="CommentBlock",i[i.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",i[i.Escape=22]="Escape",i[i.Entity=23]="Entity",i[i.HardBreak=24]="HardBreak",i[i.Emphasis=25]="Emphasis",i[i.StrongEmphasis=26]="StrongEmphasis",i[i.Link=27]="Link",i[i.Image=28]="Image",i[i.InlineCode=29]="InlineCode",i[i.HTMLTag=30]="HTMLTag",i[i.Comment=31]="Comment",i[i.ProcessingInstruction=32]="ProcessingInstruction",i[i.Autolink=33]="Autolink",i[i.HeaderMark=34]="HeaderMark",i[i.QuoteMark=35]="QuoteMark",i[i.ListMark=36]="ListMark",i[i.LinkMark=37]="LinkMark",i[i.EmphasisMark=38]="EmphasisMark",i[i.CodeMark=39]="CodeMark",i[i.CodeText=40]="CodeText",i[i.CodeInfo=41]="CodeInfo",i[i.LinkTitle=42]="LinkTitle",i[i.LinkLabel=43]="LinkLabel",i[i.URL=44]="URL"})(J||(J={}));class bY{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class SY{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Bo(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let s=t;s<e;s++)n+=this.text.charCodeAt(s)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function ck(i,e,t){if(t.pos==t.text.length||i!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let n=(i.type==J.OrderedList?Ay:Cy)(t,e,!1);return n>0&&(i.type!=J.BulletList||Ty(t,e,!1)<0)&&t.text.charCodeAt(t.pos+n-1)==i.value}const JP={[J.Blockquote](i,e,t){return t.next!=62?!1:(t.markers.push(_e(J.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(Ji(t.text.charCodeAt(t.pos+1))?2:1)),i.end=e.lineStart+t.text.length,!0)},[J.ListItem](i,e,t){return t.indent<t.baseIndent+i.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+i.value),!0)},[J.OrderedList]:ck,[J.BulletList]:ck,[J.Document](){return!0}};function Ji(i){return i==32||i==9||i==10||i==13}function Bo(i,e=0){for(;e<i.length&&Ji(i.charCodeAt(e));)e++;return e}function uk(i,e,t){for(;e>t&&Ji(i.charCodeAt(e-1));)e--;return e}function e$(i){if(i.next!=96&&i.next!=126)return-1;let e=i.pos+1;for(;e<i.text.length&&i.text.charCodeAt(e)==i.next;)e++;if(e<i.pos+3)return-1;if(i.next==96){for(let t=e;t<i.text.length;t++)if(i.text.charCodeAt(t)==96)return-1}return e}function t$(i){return i.next!=62?-1:i.text.charCodeAt(i.pos+1)==32?2:1}function Ty(i,e,t){if(i.next!=42&&i.next!=45&&i.next!=95)return-1;let n=1;for(let s=i.pos+1;s<i.text.length;s++){let l=i.text.charCodeAt(s);if(l==i.next)n++;else if(!Ji(l))return-1}return t&&i.next==45&&s$(i)>-1&&i.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(o$.SetextHeading)>-1||n<3?-1:1}function i$(i,e){for(let t=i.stack.length-1;t>=0;t--)if(i.stack[t].type==e)return!0;return!1}function Cy(i,e,t){return(i.next==45||i.next==43||i.next==42)&&(i.pos==i.text.length-1||Ji(i.text.charCodeAt(i.pos+1)))&&(!t||i$(e,J.BulletList)||i.skipSpace(i.pos+2)<i.text.length)?1:-1}function Ay(i,e,t){let n=i.pos,s=i.next;for(;s>=48&&s<=57;){n++;if(n==i.text.length)return-1;s=i.text.charCodeAt(n)}return n==i.pos||n>i.pos+9||s!=46&&s!=41||n<i.text.length-1&&!Ji(i.text.charCodeAt(n+1))||t&&!i$(e,J.OrderedList)&&(i.skipSpace(n+1)==i.text.length||n>i.pos+1||i.next!=49)?-1:n+1-i.pos}function n$(i){if(i.next!=35)return-1;let e=i.pos+1;for(;e<i.text.length&&i.text.charCodeAt(e)==35;)e++;if(e<i.text.length&&i.text.charCodeAt(e)!=32)return-1;let t=e-i.pos;return t>6?-1:t}function s$(i){if(i.next!=45&&i.next!=61||i.indent>=i.baseIndent+4)return-1;let e=i.pos+1;for(;e<i.text.length&&i.text.charCodeAt(e)==i.next;)e++;let t=e;for(;e<i.text.length&&Ji(i.text.charCodeAt(e));)e++;return e==i.text.length?t:-1}const Hg=/^[ \t]*$/,r$=/-->/,l$=/\?>/,Ig=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,r$],[/^\s*<\?/,l$],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Hg],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Hg]];function a$(i,e,t){if(i.next!=60)return-1;let n=i.text.slice(i.pos);for(let s=0,l=Ig.length-(t?1:0);s<l;s++)if(Ig[s][0].test(n))return s;return-1}function fk(i,e){let t=i.countIndent(e,i.pos,i.indent),n=i.countIndent(i.skipSpace(e),e,t);return n>=t+5?t+1:n}function Bs(i,e,t){let n=i.length-1;n>=0&&i[n].to==e&&i[n].type==J.CodeText?i[n].to=t:i.push(_e(J.CodeText,e,t))}const Af={LinkReference:void 0,IndentedCode(i,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let n=e.findColumn(t),s=i.lineStart+n,l=i.lineStart+e.text.length,o=[],c=[];for(Bs(o,s,l);i.nextLine()&&e.depth>=i.stack.length;)if(e.pos==e.text.length){Bs(c,i.lineStart-1,i.lineStart);for(let f of e.markers)c.push(f)}else{if(e.indent<t)break;{if(c.length){for(let d of c)d.type==J.CodeText?Bs(o,d.from,d.to):o.push(d);c=[]}Bs(o,i.lineStart-1,i.lineStart);for(let d of e.markers)o.push(d);l=i.lineStart+e.text.length;let f=i.lineStart+e.findColumn(e.baseIndent+4);f<l&&Bs(o,f,l)}}return c.length&&(c=c.filter(f=>f.type!=J.CodeText),c.length&&(e.markers=c.concat(e.markers))),i.addNode(i.buffer.writeElements(o,-s).finish(J.CodeBlock,l-s),s),!0},FencedCode(i,e){let t=e$(e);if(t<0)return!1;let n=i.lineStart+e.pos,s=e.next,l=t-e.pos,o=e.skipSpace(t),c=uk(e.text,e.text.length,o),f=[_e(J.CodeMark,n,n+l)];o<c&&f.push(_e(J.CodeInfo,i.lineStart+o,i.lineStart+c));for(let d=!0,p=!0,m=!1;i.nextLine()&&e.depth>=i.stack.length;d=!1){let y=e.pos;if(e.indent-e.baseIndent<4)for(;y<e.text.length&&e.text.charCodeAt(y)==s;)y++;if(y-e.pos>=l&&e.skipSpace(y)==e.text.length){for(let b of e.markers)f.push(b);p&&m&&Bs(f,i.lineStart-1,i.lineStart),f.push(_e(J.CodeMark,i.lineStart+e.pos,i.lineStart+y)),i.nextLine();break}else{m=!0,d||(Bs(f,i.lineStart-1,i.lineStart),p=!1);for(let v of e.markers)f.push(v);let b=i.lineStart+e.basePos,S=i.lineStart+e.text.length;b<S&&(Bs(f,b,S),p=!1)}}return i.addNode(i.buffer.writeElements(f,-n).finish(J.FencedCode,i.prevLineEnd()-n),n),!0},Blockquote(i,e){let t=t$(e);return t<0?!1:(i.startContext(J.Blockquote,e.pos),i.addNode(J.QuoteMark,i.lineStart+e.pos,i.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(i,e){if(Ty(e,i,!1)<0)return!1;let t=i.lineStart+e.pos;return i.nextLine(),i.addNode(J.HorizontalRule,t),!0},BulletList(i,e){let t=Cy(e,i,!1);if(t<0)return!1;i.block.type!=J.BulletList&&i.startContext(J.BulletList,e.basePos,e.next);let n=fk(e,e.pos+1);return i.startContext(J.ListItem,e.basePos,n-e.baseIndent),i.addNode(J.ListMark,i.lineStart+e.pos,i.lineStart+e.pos+t),e.moveBaseColumn(n),null},OrderedList(i,e){let t=Ay(e,i,!1);if(t<0)return!1;i.block.type!=J.OrderedList&&i.startContext(J.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let n=fk(e,e.pos+t);return i.startContext(J.ListItem,e.basePos,n-e.baseIndent),i.addNode(J.ListMark,i.lineStart+e.pos,i.lineStart+e.pos+t),e.moveBaseColumn(n),null},ATXHeading(i,e){let t=n$(e);if(t<0)return!1;let n=e.pos,s=i.lineStart+n,l=uk(e.text,e.text.length,n),o=l;for(;o>n&&e.text.charCodeAt(o-1)==e.next;)o--;(o==l||o==n||!Ji(e.text.charCodeAt(o-1)))&&(o=e.text.length);let c=i.buffer.write(J.HeaderMark,0,t).writeElements(i.parser.parseInline(e.text.slice(n+t+1,o),s+t+1),-s);o<e.text.length&&c.write(J.HeaderMark,o-n,l-n);let f=c.finish(J.ATXHeading1-1+t,e.text.length-n);return i.nextLine(),i.addNode(f,s),!0},HTMLBlock(i,e){let t=a$(e,i,!1);if(t<0)return!1;let n=i.lineStart+e.pos,s=Ig[t][1],l=[],o=s!=Hg;for(;!s.test(e.text)&&i.nextLine();){if(e.depth<i.stack.length){o=!1;break}for(let d of e.markers)l.push(d)}o&&i.nextLine();let c=s==r$?J.CommentBlock:s==l$?J.ProcessingInstructionBlock:J.HTMLBlock,f=i.prevLineEnd();return i.addNode(i.buffer.writeElements(l,-n).finish(c,f-n),n),!0},SetextHeading:void 0};class xY{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let s=n.content+`
|
|
62
|
-
`+t.scrub(),l=this.advance(s);return l>-1&&l<s.length?this.complete(e,n,l):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Bo(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,_e(J.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(g$(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(_e(J.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(m$(e,Bo(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Bo(e,this.pos),n=0;if(t>this.pos){let s=O$(e,t,this.start);if(s){let l=OO(e,s.to-this.start);l>0&&(this.nextStage(s),n=l)}}return n||(n=OO(e,this.pos)),n>0&&n<e.length?n:-1}else return OO(e,this.pos)}}}function OO(i,e){for(;e<i.length;e++){let t=i.charCodeAt(e);if(t==10)break;if(!Ji(t))return-1}return e}class vY{nextLine(e,t,n){let s=t.depth<e.stack.length?-1:s$(t),l=t.next;if(s<0)return!1;let o=_e(J.HeaderMark,e.lineStart+t.pos,e.lineStart+s);return e.nextLine(),e.addLeafElement(n,_e(l==61?J.SetextHeading1:J.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),o])),!0}finish(){return!1}}const o$={LinkReference(i,e){return e.content.charCodeAt(0)==91?new xY(e):null},SetextHeading(){return new vY}},wY=[(i,e)=>n$(e)>=0,(i,e)=>e$(e)>=0,(i,e)=>t$(e)>=0,(i,e)=>Cy(e,i,!0)>=0,(i,e)=>Ay(e,i,!0)>=0,(i,e)=>Ty(e,i,!0)>=0,(i,e)=>a$(e,i,!0)>=0],QY={text:"",end:0};class kY{constructor(e,t,n,s){this.parser=e,this.input=t,this.ranges=s,this.line=new SY,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=s[s.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=s[0].from,this.block=Ah.create(J.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new AY(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let s=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!s||e.markers[n].from<s.end);){let l=e.markers[n++];this.addNode(l.type,l.from,l.to)}if(!s)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let s=n(this,e);if(s!=!1){if(s==!0)return null;e.forward();continue e}}break}let t=new bY(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let s=n(this,t);s&&t.parsers.push(s)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break e}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
|
|
63
|
-
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=y$(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=QY;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let n=this.absoluteLineStart,s=this.rangeI;for(;this.ranges[s].to<t.end;){s++;let l=this.ranges[s].from,o=this.lineChunkAt(l);t.end=l+o.length,t.text=t.text.slice(0,this.ranges[s-1].to-n)+o,n=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let s=this.stack[e.depth],l=this.parser.skipContextMarkup[s.type];if(!l)throw new Error("Unhandled block context "+J[s.type]);let o=this.line.markers.length;if(!l(s,this,e)){this.line.markers.length>o&&(s.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
64
|
-
`?"":t;else{let s=t.indexOf(`
|
|
65
|
-
`);n=s<0?t:t.slice(0,s)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=Ah.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e=="number"&&(e=new qe(this.parser.nodeSet.types[e],aa,aa,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Kg(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?c$(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let t=Kg(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(J.Paragraph,e.content.length),e.start)}elt(e,t,n,s){return typeof e=="string"?_e(this.parser.getNodeType(e),t,n,s):new h$(e,t)}get buffer(){return new f$(this.parser.nodeSet)}}function c$(i,e,t,n,s){let l=i[e].to,o=[],c=[],f=t.from+n;function d(p,m){for(;m?p>=l:p>l;){let y=i[e+1].from-l;n+=y,p+=y,e++,l=i[e].to}}for(let p=t.firstChild;p;p=p.nextSibling){d(p.from+n,!0);let m=p.from+n,y,b=s.get(p.tree);b?y=b:p.to+n>l?(y=c$(i,e,p,n,s),d(p.to+n,!1)):y=p.toTree(),o.push(y),c.push(m-f)}return d(t.to+n,!1),new qe(t.type,o,c,t.to+n-f,t.tree?t.tree.propValues:void 0)}class Kh extends ry{constructor(e,t,n,s,l,o,c,f,d){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=s,this.endLeafBlock=l,this.skipContextMarkup=o,this.inlineParsers=c,this.inlineNames=f,this.wrappers=d,this.nodeTypes=Object.create(null);for(let p of e.types)this.nodeTypes[p.name]=p.id}createParse(e,t,n){let s=new kY(this,e,t,n);for(let l of this.wrappers)s=l(s,e,t,n);return s}configure(e){let t=Fg(e);if(!t)return this;let{nodeSet:n,skipContextMarkup:s}=this,l=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),c=this.blockNames.slice(),f=this.inlineParsers.slice(),d=this.inlineNames.slice(),p=this.endLeafBlock.slice(),m=this.wrappers;if(vo(t.defineNodes)){s=Object.assign({},s);let y=n.types.slice(),b;for(let S of t.defineNodes){let{name:v,block:w,composite:k,style:A}=typeof S=="string"?{name:S}:S;if(y.some(R=>R.name==v))continue;k&&(s[y.length]=(R,N,_)=>k(N,_,R.value));let P=y.length,V=k?["Block","BlockContext"]:w?P>=J.ATXHeading1&&P<=J.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;y.push(Pt.define({id:P,name:v,props:V&&[[Te.group,V]]})),A&&(b||(b={}),Array.isArray(A)||A instanceof $i?b[v]=A:Object.assign(b,A))}n=new Pc(y),b&&(n=n.extend(pa(b)))}if(vo(t.props)&&(n=n.extend(...t.props)),vo(t.remove))for(let y of t.remove){let b=this.blockNames.indexOf(y),S=this.inlineNames.indexOf(y);b>-1&&(l[b]=o[b]=void 0),S>-1&&(f[S]=void 0)}if(vo(t.parseBlock))for(let y of t.parseBlock){let b=c.indexOf(y.name);if(b>-1)l[b]=y.parse,o[b]=y.leaf;else{let S=y.before?Pf(c,y.before):y.after?Pf(c,y.after)+1:c.length-1;l.splice(S,0,y.parse),o.splice(S,0,y.leaf),c.splice(S,0,y.name)}y.endLeaf&&p.push(y.endLeaf)}if(vo(t.parseInline))for(let y of t.parseInline){let b=d.indexOf(y.name);if(b>-1)f[b]=y.parse;else{let S=y.before?Pf(d,y.before):y.after?Pf(d,y.after)+1:d.length-1;f.splice(S,0,y.parse),d.splice(S,0,y.name)}}return t.wrap&&(m=m.concat(t.wrap)),new Kh(n,l,o,c,p,s,f,d,m)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new Py(this,e,t);e:for(let s=t;s<n.end;){let l=n.char(s);for(let o of this.inlineParsers)if(o){let c=o(n,l,s);if(c>=0){s=c;continue e}}s++}return n.resolveMarkers(0)}}function vo(i){return i!=null&&i.length>0}function Fg(i){if(!Array.isArray(i))return i;if(i.length==0)return null;let e=Fg(i[0]);if(i.length==1)return e;let t=Fg(i.slice(1));if(!t||!e)return e||t;let n=(o,c)=>(o||aa).concat(c||aa),s=e.wrap,l=t.wrap;return{props:n(e.props,t.props),defineNodes:n(e.defineNodes,t.defineNodes),parseBlock:n(e.parseBlock,t.parseBlock),parseInline:n(e.parseInline,t.parseInline),remove:n(e.remove,t.remove),wrap:s?l?(o,c,f,d)=>s(l(o,c,f,d),c,f,d):s:l}}function Pf(i,e){let t=i.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let u$=[Pt.none];for(let i=1,e;e=J[i];i++)u$[i]=Pt.define({id:i,name:e,props:i>=J.Escape?[]:[[Te.group,i in JP?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const aa=[];class f${constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,s=0){return this.content.push(e,t,n,4+s*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return qe.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let mc=class{constructor(e,t,n,s=aa){this.type=e,this.from=t,this.to=n,this.children=s}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new f$(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class h${constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return aa}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function _e(i,e,t,n){return new mc(i,e,t,n)}const d$={resolve:"Emphasis",mark:"EmphasisMark"},p$={resolve:"Emphasis",mark:"EmphasisMark"},Rr={},Ph={};class Pi{constructor(e,t,n,s){this.type=e,this.from=t,this.to=n,this.side=s}}const hk="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Oc=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Oc=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const gO={Escape(i,e,t){if(e!=92||t==i.end-1)return-1;let n=i.char(t+1);for(let s=0;s<hk.length;s++)if(hk.charCodeAt(s)==n)return i.append(_e(J.Escape,t,t+2));return-1},Entity(i,e,t){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(i.slice(t+1,t+31));return n?i.append(_e(J.Entity,t,t+1+n[0].length)):-1},InlineCode(i,e,t){if(e!=96||t&&i.char(t-1)==96)return-1;let n=t+1;for(;n<i.end&&i.char(n)==96;)n++;let s=n-t,l=0;for(;n<i.end;n++)if(i.char(n)==96){if(l++,l==s&&i.char(n+1)!=96)return i.append(_e(J.InlineCode,t,n+1,[_e(J.CodeMark,t,t+s),_e(J.CodeMark,n+1-s,n+1)]))}else l=0;return-1},HTMLTag(i,e,t){if(e!=60||t==i.end-1)return-1;let n=i.slice(t+1,i.end),s=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(s)return i.append(_e(J.Autolink,t,t+1+s[0].length,[_e(J.LinkMark,t,t+1),_e(J.URL,t+1,t+s[0].length),_e(J.LinkMark,t+s[0].length,t+1+s[0].length)]));let l=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(l)return i.append(_e(J.Comment,t,t+1+l[0].length));let o=/^\?[^]*?\?>/.exec(n);if(o)return i.append(_e(J.ProcessingInstruction,t,t+1+o[0].length));let c=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return c?i.append(_e(J.HTMLTag,t,t+1+c[0].length)):-1},Emphasis(i,e,t){if(e!=95&&e!=42)return-1;let n=t+1;for(;i.char(n)==e;)n++;let s=i.slice(t-1,t),l=i.slice(n,n+1),o=Oc.test(s),c=Oc.test(l),f=/\s|^$/.test(s),d=/\s|^$/.test(l),p=!d&&(!c||f||o),m=!f&&(!o||d||c),y=p&&(e==42||!m||o),b=m&&(e==42||!p||c);return i.append(new Pi(e==95?d$:p$,t,n,(y?1:0)|(b?2:0)))},HardBreak(i,e,t){if(e==92&&i.char(t+1)==10)return i.append(_e(J.HardBreak,t,t+2));if(e==32){let n=t+1;for(;i.char(n)==32;)n++;if(i.char(n)==10&&n>=t+2)return i.append(_e(J.HardBreak,t,n+1))}return-1},Link(i,e,t){return e==91?i.append(new Pi(Rr,t,t+1,1)):-1},Image(i,e,t){return e==33&&i.char(t+1)==91?i.append(new Pi(Ph,t,t+2,1)):-1},LinkEnd(i,e,t){if(e!=93)return-1;for(let n=i.parts.length-1;n>=0;n--){let s=i.parts[n];if(s instanceof Pi&&(s.type==Rr||s.type==Ph)){if(!s.side||i.skipSpace(s.to)==t&&!/[(\[]/.test(i.slice(t+1,t+2)))return i.parts[n]=null,-1;let l=i.takeContent(n),o=i.parts[n]=TY(i,l,s.type==Rr?J.Link:J.Image,s.from,t+1);if(s.type==Rr)for(let c=0;c<n;c++){let f=i.parts[c];f instanceof Pi&&f.type==Rr&&(f.side=0)}return o.to}}return-1}};function TY(i,e,t,n,s){let{text:l}=i,o=i.char(s),c=s;if(e.unshift(_e(J.LinkMark,n,n+(t==J.Image?2:1))),e.push(_e(J.LinkMark,s-1,s)),o==40){let f=i.skipSpace(s+1),d=m$(l,f-i.offset,i.offset),p;d&&(f=i.skipSpace(d.to),f!=d.to&&(p=O$(l,f-i.offset,i.offset),p&&(f=i.skipSpace(p.to)))),i.char(f)==41&&(e.push(_e(J.LinkMark,s,s+1)),c=f+1,d&&e.push(d),p&&e.push(p),e.push(_e(J.LinkMark,f,c)))}else if(o==91){let f=g$(l,s-i.offset,i.offset,!1);f&&(e.push(f),c=f.to)}return _e(t,n,c,e)}function m$(i,e,t){if(i.charCodeAt(e)==60){for(let s=e+1;s<i.length;s++){let l=i.charCodeAt(s);if(l==62)return _e(J.URL,e+t,s+1+t);if(l==60||l==10)return!1}return null}else{let s=0,l=e;for(let o=!1;l<i.length;l++){let c=i.charCodeAt(l);if(Ji(c))break;if(o)o=!1;else if(c==40)s++;else if(c==41){if(!s)break;s--}else c==92&&(o=!0)}return l>e?_e(J.URL,e+t,l+t):l==i.length?null:!1}}function O$(i,e,t){let n=i.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let s=n==40?41:n;for(let l=e+1,o=!1;l<i.length;l++){let c=i.charCodeAt(l);if(o)o=!1;else{if(c==s)return _e(J.LinkTitle,e+t,l+1+t);c==92&&(o=!0)}}return null}function g$(i,e,t,n){for(let s=!1,l=e+1,o=Math.min(i.length,l+999);l<o;l++){let c=i.charCodeAt(l);if(s)s=!1;else{if(c==93)return n?!1:_e(J.LinkLabel,e+t,l+1+t);if(n&&!Ji(c)&&(n=!1),c==91)return!1;c==92&&(s=!0)}}return null}class Py{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,s,l){return this.append(new Pi(e,t,n,(s?1:0)|(l?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Pi&&(t.type==Rr||t.type==Ph))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let s=this.parts[n];if(!(s instanceof Pi&&s.type.resolve&&s.side&2))continue;let l=s.type==d$||s.type==p$,o=s.to-s.from,c,f=n-1;for(;f>=e;f--){let v=this.parts[f];if(v instanceof Pi&&v.side&1&&v.type==s.type&&!(l&&(s.side&1||v.side&2)&&(v.to-v.from+o)%3==0&&((v.to-v.from)%3||o%3))){c=v;break}}if(!c)continue;let d=s.type.resolve,p=[],m=c.from,y=s.to;if(l){let v=Math.min(2,c.to-c.from,o);m=c.to-v,y=s.from+v,d=v==1?"Emphasis":"StrongEmphasis"}c.type.mark&&p.push(this.elt(c.type.mark,m,c.to));for(let v=f+1;v<n;v++)this.parts[v]instanceof mc&&p.push(this.parts[v]),this.parts[v]=null;s.type.mark&&p.push(this.elt(s.type.mark,s.from,y));let b=this.elt(d,m,y,p);this.parts[f]=l&&c.from!=m?new Pi(c.type,c.from,m,c.side):null,(this.parts[n]=l&&s.to!=y?new Pi(s.type,y,s.to,s.side):null)?this.parts.splice(n,0,b):this.parts[n]=b}let t=[];for(let n=e;n<this.parts.length;n++){let s=this.parts[n];s instanceof mc&&t.push(s)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Pi&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Pi?t:null}skipSpace(e){return Bo(this.text,e-this.offset)+this.offset}elt(e,t,n,s){return typeof e=="string"?_e(this.parser.getNodeType(e),t,n,s):new h$(e,t)}}Py.linkStart=Rr;Py.imageStart=Ph;function Kg(i,e){if(!e.length)return i;if(!i.length)return e;let t=i.slice(),n=0;for(let s of e){for(;n<t.length&&t[n].to<s.to;)n++;if(n<t.length&&t[n].from<s.from){let l=t[n];l instanceof mc&&(t[n]=new mc(l.type,l.from,l.to,Kg(l.children,[s])))}else t.splice(n++,0,s)}return t}const CY=[J.CodeBlock,J.ListItem,J.OrderedList,J.BulletList];let AY=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let l=this.fragment.to;for(;l>0&&this.input.read(l-1,l)!=`
|
|
66
|
-
`;)l--;this.fragmentEnd=l?l-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let s=e+this.fragment.offset;for(;n.to<=s;)if(!n.parent())return!1;for(;;){if(n.from>=s)return this.fragment.from<=t;if(!n.childAfter(s))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(Te.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,s=this.fragmentEnd-(this.fragment.openEnd?1:0),l=e.absoluteLineStart,o=l,c=e.block.children.length,f=o,d=c;for(;;){if(t.to-n>s){if(t.type.isAnonymous&&t.firstChild())continue;break}let p=y$(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,p);else{let m=new qe(e.parser.nodeSet.types[J.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(m,t.tree),e.addNode(m,p)}if(t.type.is("Block")&&(CY.indexOf(t.type.id)<0?(o=t.to-n,c=e.block.children.length):(o=f,c=d),f=t.to-n,d=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>c;)e.block.children.pop(),e.block.positions.pop();return o-l}};function y$(i,e){let t=i;for(let n=1;n<e.length;n++){let s=e[n-1].to,l=e[n].from;s<i&&(t-=l-s)}return t}const PY=pa({"Blockquote/...":T.quote,HorizontalRule:T.contentSeparator,"ATXHeading1/... SetextHeading1/...":T.heading1,"ATXHeading2/... SetextHeading2/...":T.heading2,"ATXHeading3/...":T.heading3,"ATXHeading4/...":T.heading4,"ATXHeading5/...":T.heading5,"ATXHeading6/...":T.heading6,"Comment CommentBlock":T.comment,Escape:T.escape,Entity:T.character,"Emphasis/...":T.emphasis,"StrongEmphasis/...":T.strong,"Link/... Image/...":T.link,"OrderedList/... BulletList/...":T.list,"BlockQuote/...":T.quote,"InlineCode CodeText":T.monospace,"URL Autolink":T.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":T.processingInstruction,"CodeInfo LinkLabel":T.labelName,LinkTitle:T.string,Paragraph:T.content}),$Y=new Kh(new Pc(u$).extend(PY),Object.keys(Af).map(i=>Af[i]),Object.keys(Af).map(i=>o$[i]),Object.keys(Af),wY,JP,Object.keys(gO).map(i=>gO[i]),Object.keys(gO),[]);function MY(i,e,t){let n=[];for(let s=i.firstChild,l=e;;s=s.nextSibling){let o=s?s.from:t;if(o>l&&n.push({from:l,to:o}),!s)break;l=s.to}return n}function EY(i){let{codeParser:e,htmlParser:t}=i;return{wrap:CA((s,l)=>{let o=s.type.id;if(e&&(o==J.CodeBlock||o==J.FencedCode)){let c="";if(o==J.FencedCode){let d=s.node.getChild(J.CodeInfo);d&&(c=l.read(d.from,d.to))}let f=e(c);if(f)return{parser:f,overlay:d=>d.type.id==J.CodeText,bracketed:o==J.FencedCode}}else if(t&&(o==J.HTMLBlock||o==J.HTMLTag||o==J.CommentBlock))return{parser:t,overlay:MY(s.node,s.from,s.to)};return null})}}const RY={resolve:"Strikethrough",mark:"StrikethroughMark"},zY={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":T.strikethrough}},{name:"StrikethroughMark",style:T.processingInstruction}],parseInline:[{name:"Strikethrough",parse(i,e,t){if(e!=126||i.char(t+1)!=126||i.char(t+2)==126)return-1;let n=i.slice(t-1,t),s=i.slice(t+2,t+3),l=/\s|^$/.test(n),o=/\s|^$/.test(s),c=Oc.test(n),f=Oc.test(s);return i.addDelimiter(RY,t,t+2,!o&&(!f||l||c),!l&&(!c||o||f))},after:"Emphasis"}]};function No(i,e,t=0,n,s=0){let l=0,o=!0,c=-1,f=-1,d=!1,p=()=>{n.push(i.elt("TableCell",s+c,s+f,i.parser.parseInline(e.slice(c,f),s+c)))};for(let m=t;m<e.length;m++){let y=e.charCodeAt(m);y==124&&!d?((!o||c>-1)&&l++,o=!1,n&&(c>-1&&p(),n.push(i.elt("TableDelimiter",m+s,m+s+1))),c=f=-1):(d||y!=32&&y!=9)&&(c<0&&(c=m),f=m+1),d=!d&&y==92}return c>-1&&(l++,n&&p()),l}function dk(i,e){for(let t=e;t<i.length;t++){let n=i.charCodeAt(t);if(n==124)return!0;n==92&&t++}return!1}const b$=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class pk{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let s;if((t.next==45||t.next==58||t.next==124)&&b$.test(s=t.text.slice(t.pos))){let l=[];No(e,n.content,0,l,n.start)==No(e,s,t.pos)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,l),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let s=[];No(e,t.text,t.pos,s,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,s))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const DY={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":T.heading}},"TableRow",{name:"TableCell",style:T.content},{name:"TableDelimiter",style:T.processingInstruction}],parseBlock:[{name:"Table",leaf(i,e){return dk(e.content,0)?new pk:null},endLeaf(i,e,t){if(t.parsers.some(s=>s instanceof pk)||!dk(e.text,e.basePos))return!1;let n=i.peekLine();return b$.test(n)&&No(i,e.text,e.basePos)==No(i,n,e.basePos)},before:"SetextHeading"}]};class ZY{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const XY={defineNodes:[{name:"Task",block:!0,style:T.list},{name:"TaskMarker",style:T.atom}],parseBlock:[{name:"TaskList",leaf(i,e){return/^\[[ xX]\][ \t]/.test(e.content)&&i.parentType().name=="ListItem"?new ZY:null},after:"SetextHeading"}]},mk=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Ok=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,LY=/[\w-]+\.[\w-]+($|\/)/,gk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,yk=/\/[a-zA-Z\d@.]+/gy;function bk(i,e,t,n){let s=0;for(let l=e;l<t;l++)i[l]==n&&s++;return s}function VY(i,e){Ok.lastIndex=e;let t=Ok.exec(i);if(!t||LY.exec(t[0])[0].indexOf("_")>-1)return-1;let n=e+t[0].length;for(;;){let s=i[n-1],l;if(/[?!.,:*_~]/.test(s)||s==")"&&bk(i,e,n,")")>bk(i,e,n,"("))n--;else if(s==";"&&(l=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(i.slice(e,n))))n=e+l.index;else break}return n}function Sk(i,e){gk.lastIndex=e;let t=gk.exec(i);if(!t)return-1;let n=t[0][t[0].length-1];return n=="_"||n=="-"?-1:e+t[0].length-(n=="."?1:0)}const _Y={parseInline:[{name:"Autolink",parse(i,e,t){let n=t-i.offset;if(n&&/\w/.test(i.text[n-1]))return-1;mk.lastIndex=n;let s=mk.exec(i.text),l=-1;if(!s)return-1;if(s[1]||s[2]){if(l=VY(i.text,n+s[0].length),l>-1&&i.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(i.text.slice(n,l));l=n+o[0].length}}else s[3]?l=Sk(i.text,n):(l=Sk(i.text,n+s[0].length),l>-1&&s[0]=="xmpp:"&&(yk.lastIndex=l,s=yk.exec(i.text),s&&(l=s.index+s[0].length)));return l<0?-1:(i.addElement(i.elt("URL",t,l+i.offset)),l+i.offset)}}]},jY=[DY,XY,zY,_Y];function S$(i,e,t){return(n,s,l)=>{if(s!=i||n.char(l+1)==i)return-1;let o=[n.elt(t,l,l+1)];for(let c=l+1;c<n.end;c++){let f=n.char(c);if(f==i)return n.addElement(n.elt(e,l,c+1,o.concat(n.elt(t,c,c+1))));if(f==92&&o.push(n.elt("Escape",c,c+++2)),Ji(f))break}return-1}}const BY={defineNodes:[{name:"Superscript",style:T.special(T.content)},{name:"SuperscriptMark",style:T.processingInstruction}],parseInline:[{name:"Superscript",parse:S$(94,"Superscript","SuperscriptMark")}]},NY={defineNodes:[{name:"Subscript",style:T.special(T.content)},{name:"SubscriptMark",style:T.processingInstruction}],parseInline:[{name:"Subscript",parse:S$(126,"Subscript","SubscriptMark")}]},YY={defineNodes:[{name:"Emoji",style:T.character}],parseInline:[{name:"Emoji",parse(i,e,t){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(i.slice(t+1,i.end)))?-1:i.addElement(i.elt("Emoji",t,t+1+n[0].length))}}]};var xk={};class $h{constructor(e,t,n,s,l,o,c,f,d,p=0,m){this.p=e,this.stack=t,this.state=n,this.reducePos=s,this.pos=l,this.score=o,this.buffer=c,this.bufferBase=f,this.curContext=d,this.lookAhead=p,this.parent=m}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let s=e.parser.context;return new $h(e,[],t,n,n,0,[],0,s?new vk(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,s=e&65535,{parser:l}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),c=l.dynamicPrecedence(s);if(c&&(this.score+=c),n==0){this.pushState(l.getGoto(this.state,s,!0),this.reducePos),s<l.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let f=this.stack.length-(n-1)*3-(e&262144?6:0),d=f?this.stack[f-2]:this.p.ranges[0].from,p=this.reducePos-d;p>=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(d==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=p):this.p.lastBigReductionSize<p&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=d,this.p.lastBigReductionSize=p));let m=f?this.stack[f-1]:0,y=this.bufferBase+this.buffer.length-m;if(s<l.minRepeatTerm||e&131072){let b=l.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,d,b,y+4,!0)}if(e&262144)this.state=this.stack[f];else{let b=this.stack[f-3];this.state=l.getGoto(b,s,!0)}for(;this.stack.length>f;)this.stack.pop();this.reduceContext(s,d)}storeNode(e,t,n,s=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,c=this.buffer.length;if(c==0&&o.parent&&(c=o.bufferBase-o.parent.bufferBase,o=o.parent),c>0&&o.buffer[c-4]==0&&o.buffer[c-1]>-1){if(t==n)return;if(o.buffer[c-2]>=t){o.buffer[c-2]=n;return}}}if(!l||this.pos==n)this.buffer.push(e,t,n,s);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let c=!1;for(let f=o;f>0&&this.buffer[f-2]>n;f-=4)if(this.buffer[f-1]>=0){c=!0;break}if(c)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=s}}shift(e,t,n,s){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let l=e,{parser:o}=this.p;this.pos=s;let c=o.stateFlag(l,1);!c&&(s>n||t<=o.maxNode)&&(this.reducePos=s),this.pushState(l,c?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,s,4)}else this.pos=s,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,s,4)}apply(e,t,n,s){e&65536?this.reduce(e):this.shift(e,t,n,s)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(n,s,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,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new $h(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new qY(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let s=[];for(let l=0,o;l<t.length;l+=2)(o=t[l+1])!=this.state&&this.p.parser.hasAction(o,e)&&s.push(t[l],o);if(this.stack.length<120)for(let l=0;s.length<8&&l<t.length;l+=2){let o=t[l+1];s.some((c,f)=>f&1&&c==o)||s.push(t[l],o)}t=s}let n=[];for(let s=0;s<t.length&&n.length<4;s+=2){let l=t[s+1];if(l==this.state)continue;let o=this.split();o.pushState(l,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[s],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,s=t&65535,l=this.stack.length-n*3;if(l<0||e.getGoto(this.stack[l],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(s,l)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let c=(o>>19)-l;if(c>1){let f=o&65535,d=this.stack.length-c*3;if(d>=0&&e.getGoto(this.stack[d],f,!1)>=0)return c<<19|65536|f}}else{let c=n(o,l+1);if(c!=null)return c}})};return n(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 t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}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 t=new vk(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}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 vk{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class qY{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Mh{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Mh(e,t,t-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 Mh(this.stack,this.pos,this.index)}}function $o(i,e=Uint16Array){if(typeof i!="string")return i;let t=null;for(let n=0,s=0;n<i.length;){let l=0;for(;;){let o=i.charCodeAt(n++),c=!1;if(o==126){l=65535;break}o>=92&&o--,o>=34&&o--;let f=o-32;if(f>=46&&(f-=46,c=!0),l+=f,c)break;l*=46}t?t[s++]=l:t=new e(l)}return t}class qf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const wk=new qf;class UY{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=wk,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,s=this.rangeIndex,l=this.pos+e;for(;l<n.from;){if(!s)return null;let o=this.ranges[--s];l-=n.from-o.to,n=o}for(;t<0?l>n.to:l>=n.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];l+=o.from-n.to,n=o}return l}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,s;if(t>=0&&t<this.chunk.length)n=this.pos+e,s=this.chunk.charCodeAt(t);else{let l=this.resolveOffset(e,1);if(l==null)return-1;if(n=l,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let o=this.rangeIndex,c=this.range;for(;c.to<=n;)c=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-n)),s=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),s}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>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,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=wk,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,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(n+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return n}}class Kl{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;x$(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}Kl.prototype.contextual=Kl.prototype.fallback=Kl.prototype.extend=!1;class Eh{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?$o(e):e}token(e,t){let n=e.pos,s=0;for(;;){let l=e.next<0,o=e.resolveOffset(1,1);if(x$(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(n,e.token),e.acceptToken(this.elseToken,s))}}Eh.prototype.contextual=Kl.prototype.fallback=Kl.prototype.extend=!1;class Ei{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function x$(i,e,t,n,s,l){let o=0,c=1<<n,{dialect:f}=t.p.parser;e:for(;(c&i[o])!=0;){let d=i[o+1];for(let b=o+3;b<d;b+=2)if((i[b+1]&c)>0){let S=i[b];if(f.allows(S)&&(e.token.value==-1||e.token.value==S||GY(S,e.token.value,s,l))){e.acceptToken(S);break}}let p=e.next,m=0,y=i[o+2];if(e.next<0&&y>m&&i[d+y*3-3]==65535){o=i[d+y*3-1];continue e}for(;m<y;){let b=m+y>>1,S=d+b+(b<<1),v=i[S],w=i[S+1]||65536;if(p<v)y=b;else if(p>=w)m=b+1;else{o=i[S+2],e.advance();continue e}}break}}function Qk(i,e,t){for(let n=e,s;(s=i[n])!=65535;n++)if(s==t)return n-e;return-1}function GY(i,e,t,n){let s=Qk(t,n,e);return s<0||Qk(t,n,i)<s}const Ti=typeof process<"u"&&xk&&/\bparse\b/.test(xk.LOG);let yO=null;function kk(i,e,t){let n=i.cursor(Ue.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(i.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:i.length}}class WY{constructor(e,t){this.fragments=e,this.nodeSet=t,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?kk(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?kk(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 t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],s=this.index[t];if(s==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let l=n.children[s],o=this.start[t]+n.positions[s];if(o>e)return this.nextStart=o,null;if(l instanceof qe){if(o==e){if(o<this.safeFrom)return null;let c=o+l.length;if(c<=this.safeTo){let f=l.prop(Te.lookAhead);if(!f||c+f<this.fragment.to)return l}}this.index[t]++,o+l.length>=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+l.length}}}class HY{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new qf)}getActions(e){let t=0,n=null,{parser:s}=e.p,{tokenizers:l}=s,o=s.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,f=0;for(let d=0;d<l.length;d++){if((1<<d&o)==0)continue;let p=l[d],m=this.tokens[d];if(!(n&&!p.fallback)&&((p.contextual||m.start!=e.pos||m.mask!=o||m.context!=c)&&(this.updateCachedToken(m,p,e),m.mask=o,m.context=c),m.lookAhead>m.end+25&&(f=Math.max(m.lookAhead,f)),m.value!=0)){let y=t;if(m.extended>-1&&(t=this.addActions(e,m.extended,m.end,t)),t=this.addActions(e,m.value,m.end,t),!p.extend&&(n=m,t>y))break}}for(;this.actions.length>t;)this.actions.pop();return f&&e.setLookAhead(f),!n&&e.pos==this.stream.end&&(n=new qf,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new qf,{pos:n,p:s}=e;return t.start=n,t.end=Math.min(n+1,s.stream.end),t.value=n==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,n){let s=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(s,e),n),e.value>-1){let{parser:l}=n.p;for(let o=0;o<l.specialized.length;o++)if(l.specialized[o]==e.value){let c=l.specializers[o](this.stream.read(e.start,e.end),n);if(c>=0&&n.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(s+1)}putAction(e,t,n,s){for(let l=0;l<s;l+=3)if(this.actions[l]==e)return s;return this.actions[s++]=e,this.actions[s++]=t,this.actions[s++]=n,s}addActions(e,t,n,s){let{state:l}=e,{parser:o}=e.p,{data:c}=o;for(let f=0;f<2;f++)for(let d=o.stateSlot(l,f?2:1);;d+=3){if(c[d]==65535)if(c[d+1]==1)d=ss(c,d+2);else{s==0&&c[d+1]==2&&(s=this.putAction(ss(c,d+2),t,n,s));break}c[d]==t&&(s=this.putAction(ss(c,d+1),t,n,s))}return s}}class IY{constructor(e,t,n,s){this.parser=e,this.input=t,this.ranges=s,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 UY(t,s),this.tokens=new HY(e,this.stream),this.topTerm=e.top[1];let{from:l}=s[0];this.stacks=[$h.start(this,e.top[0],l)],this.fragments=n.length&&this.stream.end-l>e.bufferLength*4?new WY(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],s,l;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let c=e[o];for(;;){if(this.tokens.mainToken=null,c.pos>t)n.push(c);else{if(this.advanceStack(c,n,e))continue;{s||(s=[],l=[]),s.push(c);let f=this.tokens.getMainToken(c);l.push(f.value,f.end)}}break}}if(!n.length){let o=s&&KY(s);if(o)return Ti&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Ti&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,l,n);if(o)return Ti&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((c,f)=>f.score-c.score);n.length>o;)n.pop();n.some(c=>c.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o<n.length-1;o++){let c=n[o];for(let f=o+1;f<n.length;f++){let d=n[f];if(c.sameState(d)||c.buffer.length>500&&d.buffer.length>500)if((c.score-d.score||c.buffer.length-d.buffer.length)>0)n.splice(f--,1);else{n.splice(o--,1);continue e}}}n.length>12&&(n.sort((o,c)=>c.score-o.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let o=1;o<n.length;o++)n[o].pos<this.minStackPos&&(this.minStackPos=n[o].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,t,n){let s=e.pos,{parser:l}=this,o=Ti?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let d=e.curContext&&e.curContext.tracker.strict,p=d?e.curContext.hash:0;for(let m=this.fragments.nodeAt(s);m;){let y=this.parser.nodeSet.types[m.type.id]==m.type?l.getGoto(e.state,m.type.id):-1;if(y>-1&&m.length&&(!d||(m.prop(Te.contextHash)||0)==p))return e.useNode(m,y),Ti&&console.log(o+this.stackID(e)+` (via reuse of ${l.getName(m.type.id)})`),!0;if(!(m instanceof qe)||m.children.length==0||m.positions[0]>0)break;let b=m.children[0];if(b instanceof qe&&m.positions[0]==0)m=b;else break}}let c=l.stateSlot(e.state,4);if(c>0)return e.reduce(c),Ti&&console.log(o+this.stackID(e)+` (via always-reduce ${l.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let f=this.tokens.getActions(e);for(let d=0;d<f.length;){let p=f[d++],m=f[d++],y=f[d++],b=d==f.length||!n,S=b?e:e.split(),v=this.tokens.mainToken;if(S.apply(p,m,v?v.start:S.pos,y),Ti&&console.log(o+this.stackID(S)+` (via ${(p&65536)==0?"shift":`reduce of ${l.getName(p&65535)}`} for ${l.getName(m)} @ ${s}${S==e?"":", split"})`),b)return!0;S.pos>s?t.push(S):n.push(S)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Tk(e,t),!0}}runRecovery(e,t,n){let s=null,l=!1;for(let o=0;o<e.length;o++){let c=e[o],f=t[o<<1],d=t[(o<<1)+1],p=Ti?this.stackID(c)+" -> ":"";if(c.deadEnd&&(l||(l=!0,c.restart(),Ti&&console.log(p+this.stackID(c)+" (restarted)"),this.advanceFully(c,n))))continue;let m=c.split(),y=p;for(let b=0;b<10&&m.forceReduce()&&(Ti&&console.log(y+this.stackID(m)+" (via force-reduce)"),!this.advanceFully(m,n));b++)Ti&&(y=this.stackID(m)+" -> ");for(let b of c.recoverByInsert(f))Ti&&console.log(p+this.stackID(b)+" (via recover-insert)"),this.advanceFully(b,n);this.stream.end>c.pos?(d==c.pos&&(d++,f=0),c.recoverByDelete(f,d),Ti&&console.log(p+this.stackID(c)+` (via recover-delete ${this.parser.getName(f)})`),Tk(c,n)):(!s||s.score<m.score)&&(s=m)}return s}stackToTree(e){return e.close(),qe.build({buffer:Mh.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 t=(yO||(yO=new WeakMap)).get(e);return t||yO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Tk(i,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==i.pos&&n.sameState(i)){e[t].score<i.score&&(e[t]=i);return}}e.push(i)}class FY{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}const bO=i=>i;class v${constructor(e){this.start=e.start,this.shift=e.shift||bO,this.reduce=e.reduce||bO,this.reuse=e.reuse||bO,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class oa extends ry{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let c=0;c<e.repeatNodeCount;c++)t.push("");let n=Object.keys(e.topRules).map(c=>e.topRules[c][1]),s=[];for(let c=0;c<t.length;c++)s.push([]);function l(c,f,d){s[c].push([f,f.deserialize(String(d))])}if(e.nodeProps)for(let c of e.nodeProps){let f=c[0];typeof f=="string"&&(f=Te[f]);for(let d=1;d<c.length;){let p=c[d++];if(p>=0)l(p,f,c[d++]);else{let m=c[d+-p];for(let y=-p;y>0;y--)l(c[d++],f,m);d++}}}this.nodeSet=new Pc(t.map((c,f)=>Pt.define({name:f>=this.minRepeatTerm?void 0:c,id:f,props:s[f],top:n.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=vA;let o=$o(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(Ck),this.states=$o(e.states,Uint32Array),this.data=$o(e.stateData),this.goto=$o(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new Kl(o,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,t,n){let s=new IY(this,e,t,n);for(let l of this.wrappers)s=l(s,e,t,n);return s}getGoto(e,t,n=!1){let s=this.goto;if(t>=s[0])return-1;for(let l=s[t+1];;){let o=s[l++],c=o&1,f=s[l++];if(c&&n)return f;for(let d=l+(o>>1);l<d;l++)if(s[l]==e)return f;if(c)return-1}}hasAction(e,t){let n=this.data;for(let s=0;s<2;s++)for(let l=this.stateSlot(e,s?2:1),o;;l+=3){if((o=n[l])==65535)if(n[l+1]==1)o=n[l=ss(n,l+2)];else{if(n[l+1]==2)return ss(n,l+2);break}if(o==t||o==0)return ss(n,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),s=n?t(n):void 0;for(let l=this.stateSlot(e,1);s==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=ss(this.data,l+2);else break;s=t(ss(this.data,l+1))}return s}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=ss(this.data,n+2);else break;if((this.data[n+2]&1)==0){let s=this.data[n+1];t.some((l,o)=>o&1&&l==s)||t.push(this.data[n],s)}}return t}configure(e){let t=Object.assign(Object.create(oa.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let s=e.tokenizers.find(l=>l.from==n);return s?s.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,s)=>{let l=e.specializers.find(c=>c.from==n.external);if(!l)return n;let o=Object.assign(Object.assign({},n),{external:l.to});return t.specializers[s]=Ck(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}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 t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let l of e.split(" ")){let o=t.indexOf(l);o>=0&&(n[o]=!0)}let s=null;for(let l=0;l<t.length;l++)if(!n[l])for(let o=this.dialects[t[l]],c;(c=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[c]=1;return new FY(e,n,s)}static deserialize(e){return new oa(e)}}function ss(i,e){return i[e]|i[e+1]<<16}function KY(i){let e=null;for(let t of i){let n=t.p.stoppedAt;(t.pos==t.p.stream.end||n!=null&&t.pos>n)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Ck(i){if(i.external){let e=i.extend?1:0;return(t,n)=>i.external(t,n)<<1|e}return i.get}const JY=55,eq=1,tq=56,iq=2,nq=57,sq=3,Ak=4,rq=5,$y=6,w$=7,Q$=8,k$=9,T$=10,lq=11,aq=12,oq=13,SO=58,cq=14,uq=15,Pk=59,C$=21,fq=23,A$=24,hq=25,Jg=27,P$=28,dq=29,pq=32,mq=35,Oq=37,gq=38,yq=0,bq=1,Sq={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},xq={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},$k={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function vq(i){return i==45||i==46||i==58||i>=65&&i<=90||i==95||i>=97&&i<=122||i>=161}let Mk=null,Ek=null,Rk=0;function e0(i,e){let t=i.pos+e;if(Rk==t&&Ek==i)return Mk;let n=i.peek(e),s="";for(;vq(n);)s+=String.fromCharCode(n),n=i.peek(++e);return Ek=i,Rk=t,Mk=s?s.toLowerCase():n==wq||n==Qq?void 0:null}const $$=60,Rh=62,My=47,wq=63,Qq=33,kq=45;function zk(i,e){this.name=i,this.parent=e}const Tq=[$y,T$,w$,Q$,k$],Cq=new v$({start:null,shift(i,e,t,n){return Tq.indexOf(e)>-1?new zk(e0(n,1)||"",i):i},reduce(i,e){return e==C$&&i?i.parent:i},reuse(i,e,t,n){let s=e.type.id;return s==$y||s==Oq?new zk(e0(n,1)||"",i):i},strict:!1}),Aq=new Ei((i,e)=>{if(i.next!=$$){i.next<0&&e.context&&i.acceptToken(SO);return}i.advance();let t=i.next==My;t&&i.advance();let n=e0(i,0);if(n===void 0)return;if(!n)return i.acceptToken(t?uq:cq);let s=e.context?e.context.name:null;if(t){if(n==s)return i.acceptToken(lq);if(s&&xq[s])return i.acceptToken(SO,-2);if(e.dialectEnabled(yq))return i.acceptToken(aq);for(let l=e.context;l;l=l.parent)if(l.name==n)return;i.acceptToken(oq)}else{if(n=="script")return i.acceptToken(w$);if(n=="style")return i.acceptToken(Q$);if(n=="textarea")return i.acceptToken(k$);if(Sq.hasOwnProperty(n))return i.acceptToken(T$);s&&$k[s]&&$k[s][n]?i.acceptToken(SO,-1):i.acceptToken($y)}},{contextual:!0}),Pq=new Ei(i=>{for(let e=0,t=0;;t++){if(i.next<0){t&&i.acceptToken(Pk);break}if(i.next==kq)e++;else if(i.next==Rh&&e>=2){t>=3&&i.acceptToken(Pk,-2);break}else e=0;i.advance()}});function $q(i){for(;i;i=i.parent)if(i.name=="svg"||i.name=="math")return!0;return!1}const Mq=new Ei((i,e)=>{if(i.next==My&&i.peek(1)==Rh){let t=e.dialectEnabled(bq)||$q(e.context);i.acceptToken(t?rq:Ak,2)}else i.next==Rh&&i.acceptToken(Ak,1)});function Ey(i,e,t){let n=2+i.length;return new Ei(s=>{for(let l=0,o=0,c=0;;c++){if(s.next<0){c&&s.acceptToken(e);break}if(l==0&&s.next==$$||l==1&&s.next==My||l>=2&&l<n&&s.next==i.charCodeAt(l-2))l++,o++;else if(l==n&&s.next==Rh){c>o?s.acceptToken(e,-o):s.acceptToken(t,-(o-2));break}else if((s.next==10||s.next==13)&&c){s.acceptToken(e,1);break}else l=o=0;s.advance()}})}const Eq=Ey("script",JY,eq),Rq=Ey("style",tq,iq),zq=Ey("textarea",nq,sq),Dq=pa({"Text RawText IncompleteTag IncompleteCloseTag":T.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":T.angleBracket,TagName:T.tagName,"MismatchedCloseTag/TagName":[T.tagName,T.invalid],AttributeName:T.attributeName,"AttributeValue UnquotedAttributeValue":T.attributeValue,Is:T.definitionOperator,"EntityReference CharacterReference":T.character,Comment:T.blockComment,ProcessingInst:T.processingInstruction,DoctypeDecl:T.documentMeta}),Zq=oa.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*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aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Cq,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Dq],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[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],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function M$(i,e){let t=Object.create(null);for(let n of i.getChildren(A$)){let s=n.getChild(hq),l=n.getChild(Jg)||n.getChild(P$);s&&(t[e.read(s.from,s.to)]=l?l.type.id==Jg?e.read(l.from+1,l.to-1):e.read(l.from,l.to):"")}return t}function Dk(i,e){let t=i.getChild(fq);return t?e.read(t.from,t.to):" "}function xO(i,e,t){let n;for(let s of t)if(!s.attrs||s.attrs(n||(n=M$(i.node.parent.firstChild,e))))return{parser:s.parser,bracketed:!0};return null}function E$(i=[],e=[]){let t=[],n=[],s=[],l=[];for(let c of i)(c.tag=="script"?t:c.tag=="style"?n:c.tag=="textarea"?s:l).push(c);let o=e.length?Object.create(null):null;for(let c of e)(o[c.name]||(o[c.name]=[])).push(c);return CA((c,f)=>{let d=c.type.id;if(d==dq)return xO(c,f,t);if(d==pq)return xO(c,f,n);if(d==mq)return xO(c,f,s);if(d==C$&&l.length){let p=c.node,m=p.firstChild,y=m&&Dk(m,f),b;if(y){for(let S of l)if(S.tag==y&&(!S.attrs||S.attrs(b||(b=M$(m,f))))){let v=p.lastChild,w=v.type.id==gq?v.from:p.to;if(w>m.to)return{parser:S.parser,overlay:[{from:m.to,to:w}]}}}}if(o&&d==A$){let p=c.node,m;if(m=p.firstChild){let y=o[f.read(m.from,m.to)];if(y)for(let b of y){if(b.tagName&&b.tagName!=Dk(p.parent,f))continue;let S=p.lastChild;if(S.type.id==Jg){let v=S.from+1,w=S.lastChild,k=S.to-(w&&w.isError?0:1);if(k>v)return{parser:b.parser,overlay:[{from:v,to:k}],bracketed:!0}}else if(S.type.id==P$)return{parser:b.parser,overlay:[{from:S.from,to:S.to}]}}}}return null})}const Xq=122,Zk=1,Lq=123,Vq=124,R$=2,_q=125,jq=3,Bq=4,z$=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Nq=58,Yq=40,D$=95,qq=91,Uf=45,Uq=46,Gq=35,Wq=37,Hq=38,Iq=92,Fq=10,Kq=42;function gc(i){return i>=65&&i<=90||i>=97&&i<=122||i>=161}function Ry(i){return i>=48&&i<=57}function Xk(i){return Ry(i)||i>=97&&i<=102||i>=65&&i<=70}const Z$=(i,e,t)=>(n,s)=>{for(let l=!1,o=0,c=0;;c++){let{next:f}=n;if(gc(f)||f==Uf||f==D$||l&&Ry(f))!l&&(f!=Uf||c>0)&&(l=!0),o===c&&f==Uf&&o++,n.advance();else if(f==Iq&&n.peek(1)!=Fq){if(n.advance(),Xk(n.next)){do n.advance();while(Xk(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();l=!0}else{l&&n.acceptToken(o==2&&s.canShift(R$)?e:f==Yq?t:i);break}}},Jq=new Ei(Z$(Lq,R$,Vq)),e6=new Ei(Z$(_q,jq,Bq)),t6=new Ei(i=>{if(z$.includes(i.peek(-1))){let{next:e}=i;(gc(e)||e==D$||e==Gq||e==Uq||e==Kq||e==qq||e==Nq&&gc(i.peek(1))||e==Uf||e==Hq)&&i.acceptToken(Xq)}}),i6=new Ei(i=>{if(!z$.includes(i.peek(-1))){let{next:e}=i;if(e==Wq&&(i.advance(),i.acceptToken(Zk)),gc(e)){do i.advance();while(gc(i.next)||Ry(i.next));i.acceptToken(Zk)}}}),n6=pa({"AtKeyword import charset namespace keyframes media supports":T.definitionKeyword,"from to selector":T.keyword,NamespaceName:T.namespace,KeyframeName:T.labelName,KeyframeRangeName:T.operatorKeyword,TagName:T.tagName,ClassName:T.className,PseudoClassName:T.constant(T.className),IdName:T.labelName,"FeatureName PropertyName":T.propertyName,AttributeName:T.attributeName,NumberLiteral:T.number,KeywordQuery:T.keyword,UnaryQueryOp:T.operatorKeyword,"CallTag ValueName":T.atom,VariableName:T.variableName,Callee:T.operatorKeyword,Unit:T.unit,"UniversalSelector NestingSelector":T.definitionOperator,"MatchOp CompareOp":T.compareOperator,"ChildOp SiblingOp, LogicOp":T.logicOperator,BinOp:T.arithmeticOperator,Important:T.modifier,Comment:T.blockComment,ColorLiteral:T.color,"ParenthesizedContent StringLiteral":T.string,":":T.punctuation,"PseudoOp #":T.derefOperator,"; ,":T.separator,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace}),s6={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},r6={__proto__:null,or:98,and:98,not:106,only:106,layer:170},l6={__proto__:null,selector:112,layer:166},a6={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},o6={__proto__:null,to:207},c6=oa.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#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#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[n6],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({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});let vO=null;function wO(){if(!vO&&typeof document=="object"&&document.body){let{style:i}=document.body,e=[],t=new Set;for(let n in i)n!="cssText"&&n!="cssFloat"&&typeof i[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())),t.has(n)||(e.push(n),t.add(n)));vO=e.sort().map(n=>({type:"property",label:n,apply:n+": "}))}return vO||[]}const Lk=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(i=>({type:"class",label:i})),Vk=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(i=>({type:"keyword",label:i})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(i=>({type:"constant",label:i}))),u6=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(i=>({type:"type",label:i})),f6=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(i=>({type:"keyword",label:i})),ns=/^(\w[\w-]*|-\w[\w-]*|)$/,h6=/^-(-[\w-]*)?$/;function d6(i,e){var t;if((i.name=="("||i.type.isError)&&(i=i.parent||i),i.name!="ArgList")return!1;let n=(t=i.parent)===null||t===void 0?void 0:t.firstChild;return(n==null?void 0:n.name)!="Callee"?!1:e.sliceString(n.from,n.to)=="var"}const _k=new TA,p6=["Declaration"];function m6(i){for(let e=i;;){if(e.type.isTop)return e;if(!(e=e.parent))return i}}function X$(i,e,t){if(e.to-e.from>4096){let n=_k.get(e);if(n)return n;let s=[],l=new Set,o=e.cursor(Ue.IncludeAnonymous);if(o.firstChild())do for(let c of X$(i,o.node,t))l.has(c.label)||(l.add(c.label),s.push(c));while(o.nextSibling());return _k.set(e,s),s}else{let n=[],s=new Set;return e.cursor().iterate(l=>{var o;if(t(l)&&l.matchContext(p6)&&((o=l.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let c=i.sliceString(l.from,l.to);s.has(c)||(s.add(c),n.push({label:c,type:"variable"}))}}),n}}const O6=i=>e=>{let{state:t,pos:n}=e,s=it(t).resolveInner(n,-1),l=s.type.isError&&s.from==s.to-1&&t.doc.sliceString(s.from,s.to)=="-";if(s.name=="PropertyName"||(l||s.name=="TagName")&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:wO(),validFor:ns};if(s.name=="ValueName")return{from:s.from,options:Vk,validFor:ns};if(s.name=="PseudoClassName")return{from:s.from,options:Lk,validFor:ns};if(i(s)||(e.explicit||l)&&d6(s,t.doc))return{from:i(s)||l?s.from:n,options:X$(t.doc,m6(s),i),validFor:h6};if(s.name=="TagName"){for(let{parent:f}=s;f;f=f.parent)if(f.name=="Block")return{from:s.from,options:wO(),validFor:ns};return{from:s.from,options:u6,validFor:ns}}if(s.name=="AtKeyword")return{from:s.from,options:f6,validFor:ns};if(!e.explicit)return null;let o=s.resolve(n),c=o.childBefore(n);return c&&c.name==":"&&o.name=="PseudoClassSelector"?{from:n,options:Lk,validFor:ns}:c&&c.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:n,options:Vk,validFor:ns}:o.name=="Block"||o.name=="Styles"?{from:n,options:wO(),validFor:ns}:null},g6=O6(i=>i.name=="VariableName"),zh=sa.define({name:"css",parser:c6.configure({props:[$c.add({Declaration:Nf()}),Oa.add({"Block KeyframeList":zA})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function y6(){return new ac(zh,zh.data.of({autocomplete:g6}))}const b6=316,S6=317,jk=1,x6=2,v6=3,w6=4,Q6=318,k6=320,T6=321,C6=5,A6=6,P6=0,t0=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],L$=125,$6=59,i0=47,M6=42,E6=43,R6=45,z6=60,D6=44,Z6=63,X6=46,L6=91,V6=new v$({start:!1,shift(i,e){return e==C6||e==A6||e==k6?i:e==T6},strict:!1}),_6=new Ei((i,e)=>{let{next:t}=i;(t==L$||t==-1||e.context)&&i.acceptToken(Q6)},{contextual:!0,fallback:!0}),j6=new Ei((i,e)=>{let{next:t}=i,n;t0.indexOf(t)>-1||t==i0&&((n=i.peek(1))==i0||n==M6)||t!=L$&&t!=$6&&t!=-1&&!e.context&&i.acceptToken(b6)},{contextual:!0}),B6=new Ei((i,e)=>{i.next==L6&&!e.context&&i.acceptToken(S6)},{contextual:!0}),N6=new Ei((i,e)=>{let{next:t}=i;if(t==E6||t==R6){if(i.advance(),t==i.next){i.advance();let n=!e.context&&e.canShift(jk);i.acceptToken(n?jk:x6)}}else t==Z6&&i.peek(1)==X6&&(i.advance(),i.advance(),(i.next<48||i.next>57)&&i.acceptToken(v6))},{contextual:!0});function QO(i,e){return i>=65&&i<=90||i>=97&&i<=122||i==95||i>=192||!e&&i>=48&&i<=57}const Y6=new Ei((i,e)=>{if(i.next!=z6||!e.dialectEnabled(P6)||(i.advance(),i.next==i0))return;let t=0;for(;t0.indexOf(i.next)>-1;)i.advance(),t++;if(QO(i.next,!0)){for(i.advance(),t++;QO(i.next,!1);)i.advance(),t++;for(;t0.indexOf(i.next)>-1;)i.advance(),t++;if(i.next==D6)return;for(let n=0;;n++){if(n==7){if(!QO(i.next,!0))return;break}if(i.next!="extends".charCodeAt(n))break;i.advance(),t++}}i.acceptToken(w6,-t)}),q6=pa({"get set async static":T.modifier,"for while do if else switch try catch finally return throw break continue default case defer":T.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":T.operatorKeyword,"let var const using function class extends":T.definitionKeyword,"import export from":T.moduleKeyword,"with debugger new":T.keyword,TemplateString:T.special(T.string),super:T.atom,BooleanLiteral:T.bool,this:T.self,null:T.null,Star:T.modifier,VariableName:T.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":T.function(T.variableName),VariableDefinition:T.definition(T.variableName),Label:T.labelName,PropertyName:T.propertyName,PrivatePropertyName:T.special(T.propertyName),"CallExpression/MemberExpression/PropertyName":T.function(T.propertyName),"FunctionDeclaration/VariableDefinition":T.function(T.definition(T.variableName)),"ClassDeclaration/VariableDefinition":T.definition(T.className),"NewExpression/VariableName":T.className,PropertyDefinition:T.definition(T.propertyName),PrivatePropertyDefinition:T.definition(T.special(T.propertyName)),UpdateOp:T.updateOperator,"LineComment Hashbang":T.lineComment,BlockComment:T.blockComment,Number:T.number,String:T.string,Escape:T.escape,ArithOp:T.arithmeticOperator,LogicOp:T.logicOperator,BitOp:T.bitwiseOperator,CompareOp:T.compareOperator,RegExp:T.regexp,Equals:T.definitionOperator,Arrow:T.function(T.punctuation),": Spread":T.punctuation,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace,"InterpolationStart InterpolationEnd":T.special(T.brace),".":T.derefOperator,", ;":T.separator,"@":T.meta,TypeName:T.typeName,TypeDefinition:T.definition(T.typeName),"type enum interface implements namespace module declare":T.definitionKeyword,"abstract global Privacy readonly override":T.modifier,"is keyof unique infer asserts":T.operatorKeyword,JSXAttributeValue:T.attributeValue,JSXText:T.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":T.angleBracket,"JSXIdentifier JSXNameSpacedName":T.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":T.attributeName,"JSXBuiltin/JSXIdentifier":T.standard(T.tagName)}),U6={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},G6={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},W6={__proto__:null,"<":193},H6=oa.deserialize({version:14,states:"$F|Q%T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aration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:V6,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[q6],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HT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r&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[j6,B6,N6,Y6,2,3,4,5,6,7,8,9,10,11,12,13,14,_6,new Eh("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Eh("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:i=>U6[i]||-1},{term:343,get:i=>G6[i]||-1},{term:95,get:i=>W6[i]||-1}],tokenPrec:15201}),V$=[ci("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),ci("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),ci("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),ci("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),ci("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),ci(`try {
|
|
67
|
-
\${}
|
|
68
|
-
} catch (\${error}) {
|
|
69
|
-
\${}
|
|
70
|
-
}`,{label:"try",detail:"/ catch block",type:"keyword"}),ci("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),ci(`if (\${}) {
|
|
71
|
-
\${}
|
|
72
|
-
} else {
|
|
73
|
-
\${}
|
|
74
|
-
}`,{label:"if",detail:"/ else block",type:"keyword"}),ci(`class \${name} {
|
|
75
|
-
constructor(\${params}) {
|
|
76
|
-
\${}
|
|
77
|
-
}
|
|
78
|
-
}`,{label:"class",detail:"definition",type:"keyword"}),ci('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ci('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],I6=V$.concat([ci("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ci("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ci("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Bk=new TA,_$=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function wo(i){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,i),!0}}const F6=["FunctionDeclaration"],K6={FunctionDeclaration:wo("function"),ClassDeclaration:wo("class"),ClassExpression:()=>!0,EnumDeclaration:wo("constant"),TypeAliasDeclaration:wo("type"),NamespaceDeclaration:wo("namespace"),VariableDefinition(i,e){i.matchContext(F6)||e(i,"variable")},TypeDefinition(i,e){e(i,"type")},__proto__:null};function j$(i,e){let t=Bk.get(e);if(t)return t;let n=[],s=!0;function l(o,c){let f=i.sliceString(o.from,o.to);n.push({label:f,type:c})}return e.cursor(Ue.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let c=K6[o.name];if(c&&c(o,l)||_$.has(o.name))return!1}else if(o.to-o.from>8192){for(let c of j$(i,o.node))n.push(c);return!1}}),Bk.set(e,n),n}const Nk=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,B$=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function J6(i){let e=it(i.state).resolveInner(i.pos,-1);if(B$.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Nk.test(i.state.sliceDoc(e.from,e.to));if(!t&&!i.explicit)return null;let n=[];for(let s=e;s;s=s.parent)_$.has(s.name)&&(n=n.concat(j$(i.state.doc,s)));return{options:n,from:t?e.from:i.pos,validFor:Nk}}const Rn=sa.define({name:"javascript",parser:H6.configure({props:[$c.add({IfStatement:Nf({except:/^\s*({|else\b)/}),TryStatement:Nf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:kj,SwitchBody:i=>{let e=i.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return i.baseIndent+(t?0:n?1:2)*i.unit},Block:Qj({closing:"}"}),ArrowFunction:i=>i.baseIndent+i.unit,"TemplateString BlockComment":()=>null,"Statement Property":Nf({except:/^\s*{/}),JSXElement(i){let e=/^\s*<\//.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},JSXEscape(i){let e=/\s*\}/.test(i.textAfter);return i.lineIndent(i.node.from)+(e?0:i.unit)},"JSXOpenTag JSXSelfClosingTag"(i){return i.column(i.node.from)+i.unit}}),Oa.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zA,BlockComment(i){return{from:i.from+2,to:i.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),N$={test:i=>/^JSX/.test(i.name),facet:ly({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Y$=Rn.configure({dialect:"ts"},"typescript"),q$=Rn.configure({dialect:"jsx",props:[ay.add(i=>i.isTop?[N$]:void 0)]}),U$=Rn.configure({dialect:"jsx ts",props:[ay.add(i=>i.isTop?[N$]:void 0)]},"typescript");let G$=i=>({label:i,type:"keyword"});const W$="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(G$),e8=W$.concat(["declare","implements","private","protected","public"].map(G$));function t8(i={}){let e=i.jsx?i.typescript?U$:q$:i.typescript?Y$:Rn,t=i.typescript?I6.concat(e8):V$.concat(W$);return new ac(e,[Rn.data.of({autocomplete:q4(B$,ZP(t))}),Rn.data.of({autocomplete:J6}),i.jsx?s8:[]])}function i8(i){for(;;){if(i.name=="JSXOpenTag"||i.name=="JSXSelfClosingTag"||i.name=="JSXFragmentTag")return i;if(i.name=="JSXEscape"||!i.parent)return null;i=i.parent}}function Yk(i,e,t=i.length){for(let n=e==null?void 0:e.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return i.sliceString(n.from,Math.min(n.to,t));return""}const n8=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),s8=ne.inputHandler.of((i,e,t,n,s)=>{if((n8?i.composing:i.compositionStarted)||i.state.readOnly||e!=t||n!=">"&&n!="/"||!Rn.isActiveAt(i.state,e,-1))return!1;let l=s(),{state:o}=l,c=o.changeByRange(f=>{var d;let{head:p}=f,m=it(o).resolveInner(p-1,-1),y;if(m.name=="JSXStartTag"&&(m=m.parent),!(o.doc.sliceString(p-1,p)!=n||m.name=="JSXAttributeValue"&&m.to>p)){if(n==">"&&m.name=="JSXFragmentTag")return{range:f,changes:{from:p,insert:"</>"}};if(n=="/"&&m.name=="JSXStartCloseTag"){let b=m.parent,S=b.parent;if(S&&b.from==p-2&&((y=Yk(o.doc,S.firstChild,p))||((d=S.firstChild)===null||d===void 0?void 0:d.name)=="JSXFragmentTag")){let v=`${y}>`;return{range:G.cursor(p+v.length,-1),changes:{from:p,insert:v}}}}else if(n==">"){let b=i8(m);if(b&&b.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(p,p+2))&&(y=Yk(o.doc,b,p)))return{range:f,changes:{from:p,insert:`</${y}>`}}}}return{range:f}});return c.changes.empty?!1:(i.dispatch([l,o.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Qo=["_blank","_self","_top","_parent"],kO=["ascii","utf-8","utf-16","latin1","latin1"],TO=["get","post","put","delete"],CO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ci=["true","false"],ge={},r8={a:{attrs:{href:null,ping:null,type:null,media:null,target:Qo,hreflang:null}},abbr:ge,address:ge,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ge,aside:ge,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ge,base:{attrs:{href:null,target:Qo}},bdi:ge,bdo:ge,blockquote:{attrs:{cite:null}},body:ge,br:ge,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:CO,formmethod:TO,formnovalidate:["novalidate"],formtarget:Qo,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ge,center:ge,cite:ge,code:ge,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ge,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ge,div:ge,dl:ge,dt:ge,em:ge,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ge,figure:ge,footer:ge,form:{attrs:{action:null,name:null,"accept-charset":kO,autocomplete:["on","off"],enctype:CO,method:TO,novalidate:["novalidate"],target:Qo}},h1:ge,h2:ge,h3:ge,h4:ge,h5:ge,h6:ge,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ge,hgroup:ge,hr:ge,html:{attrs:{manifest:null}},i:ge,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:CO,formmethod:TO,formnovalidate:["novalidate"],formtarget:Qo,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ge,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ge,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ge,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:kO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ge,noscript:ge,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ge,param:{attrs:{name:null,value:null}},pre:ge,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ge,rt:ge,ruby:ge,samp:ge,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:kO}},section:ge,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ge,source:{attrs:{src:null,type:null,media:null}},span:ge,strong:ge,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ge,summary:ge,sup:ge,table:ge,tbody:ge,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ge,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ge,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ge,time:{attrs:{datetime:null}},title:ge,tr:ge,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ge,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ge},H$={accesskey:null,class:null,contenteditable:Ci,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ci,autocorrect:Ci,autocapitalize:Ci,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ci,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ci,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ci,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ci,"aria-hidden":Ci,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ci,"aria-multiselectable":Ci,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ci,"aria-relevant":null,"aria-required":Ci,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},I$="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(i=>"on"+i);for(let i of I$)H$[i]=null;class yc{constructor(e,t){this.tags={...r8,...e},this.globalAttrs={...H$,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}yc.default=new yc;function ca(i,e,t=i.length){if(!e)return"";let n=e.firstChild,s=n&&n.getChild("TagName");return s?i.sliceString(s.from,Math.min(s.to,t)):""}function ua(i,e=!1){for(;i;i=i.parent)if(i.name=="Element")if(e)e=!1;else return i;return null}function F$(i,e,t){let n=t.tags[ca(i,ua(e))];return(n==null?void 0:n.children)||t.allTags}function zy(i,e){let t=[];for(let n=ua(e);n&&!n.type.isTop;n=ua(n.parent)){let s=ca(i,n);if(s&&n.lastChild.name=="CloseTag")break;s&&t.indexOf(s)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&t.push(s)}return t}const K$=/^[:\-\.\w\u00b7-\uffff]*$/;function qk(i,e,t,n,s){let l=/\s*>/.test(i.sliceDoc(s,s+5))?"":">",o=ua(t,t.name=="StartTag"||t.name=="TagName");return{from:n,to:s,options:F$(i.doc,o,e).map(c=>({label:c,type:"type"})).concat(zy(i.doc,t).map((c,f)=>({label:"/"+c,apply:"/"+c+l,type:"type",boost:99-f}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Uk(i,e,t,n){let s=/\s*>/.test(i.sliceDoc(n,n+5))?"":">";return{from:t,to:n,options:zy(i.doc,e).map((l,o)=>({label:l,apply:l+s,type:"type",boost:99-o})),validFor:K$}}function l8(i,e,t,n){let s=[],l=0;for(let o of F$(i.doc,t,e))s.push({label:"<"+o,type:"type"});for(let o of zy(i.doc,t))s.push({label:"</"+o+">",type:"type",boost:99-l++});return{from:n,to:n,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function a8(i,e,t,n,s){let l=ua(t),o=l?e.tags[ca(i.doc,l)]:null,c=o&&o.attrs?Object.keys(o.attrs):[],f=o&&o.globalAttrs===!1?c:c.length?c.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:s,options:f.map(d=>({label:d,type:"property"})),validFor:K$}}function o8(i,e,t,n,s){var l;let o=(l=t.parent)===null||l===void 0?void 0:l.getChild("AttributeName"),c=[],f;if(o){let d=i.sliceDoc(o.from,o.to),p=e.globalAttrs[d];if(!p){let m=ua(t),y=m?e.tags[ca(i.doc,m)]:null;p=(y==null?void 0:y.attrs)&&y.attrs[d]}if(p){let m=i.sliceDoc(n,s).toLowerCase(),y='"',b='"';/^['"]/.test(m)?(f=m[0]=='"'?/^[^"]*$/:/^[^']*$/,y="",b=i.sliceDoc(s,s+1)==m[0]?"":m[0],m=m.slice(1),n++):f=/^[^\s<>='"]*$/;for(let S of p)c.push({label:S,apply:y+S+b,type:"constant"})}}return{from:n,to:s,options:c,validFor:f}}function J$(i,e){let{state:t,pos:n}=e,s=it(t).resolveInner(n,-1),l=s.resolve(n);for(let o=n,c;l==s&&(c=s.childBefore(o));){let f=c.lastChild;if(!f||!f.type.isError||f.from<f.to)break;l=s=c,o=f.from}return s.name=="TagName"?s.parent&&/CloseTag$/.test(s.parent.name)?Uk(t,s,s.from,n):qk(t,i,s,s.from,n):s.name=="StartTag"||s.name=="IncompleteTag"?qk(t,i,s,n,n):s.name=="StartCloseTag"||s.name=="IncompleteCloseTag"?Uk(t,s,n,n):s.name=="OpenTag"||s.name=="SelfClosingTag"||s.name=="AttributeName"?a8(t,i,s,s.name=="AttributeName"?s.from:n,n):s.name=="Is"||s.name=="AttributeValue"||s.name=="UnquotedAttributeValue"?o8(t,i,s,s.name=="Is"?n:s.from,n):e.explicit&&(l.name=="Element"||l.name=="Text"||l.name=="Document")?l8(t,i,s,n):null}function c8(i){return J$(yc.default,i)}function u8(i){let{extraTags:e,extraGlobalAttributes:t}=i,n=t||e?new yc(e,t):yc.default;return s=>J$(n,s)}const f8=Rn.parser.configure({top:"SingleExpression"}),eM=[{tag:"script",attrs:i=>i.type=="text/typescript"||i.lang=="ts",parser:Y$.parser},{tag:"script",attrs:i=>i.type=="text/babel"||i.type=="text/jsx",parser:q$.parser},{tag:"script",attrs:i=>i.type=="text/typescript-jsx",parser:U$.parser},{tag:"script",attrs(i){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(i.type)},parser:f8},{tag:"script",attrs(i){return!i.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(i.type)},parser:Rn.parser},{tag:"style",attrs(i){return(!i.lang||i.lang=="css")&&(!i.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(i.type))},parser:zh.parser}],tM=[{name:"style",parser:zh.parser.configure({top:"Styles"})}].concat(I$.map(i=>({name:i,parser:Rn.parser}))),iM=sa.define({name:"html",parser:Zq.configure({props:[$c.add({Element(i){let e=/^(\s*)(<\/)?/.exec(i.textAfter);return i.node.to<=i.pos+e[0].length?i.continue():i.lineIndent(i.node.from)+(e[2]?0:i.unit)},"OpenTag CloseTag SelfClosingTag"(i){return i.column(i.node.from)+i.unit},Document(i){if(i.pos+/\s*/.exec(i.textAfter)[0].length<i.node.to)return i.continue();let e=null,t;for(let n=i.node;;){let s=n.lastChild;if(!s||s.name!="Element"||s.to!=n.to)break;e=n=s}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?i.lineIndent(e.from)+i.unit:null}}),Oa.add({Element(i){let e=i.firstChild,t=i.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:i.to}}}),GA.add({"OpenTag CloseTag":i=>i.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Gf=iM.configure({wrap:E$(eM,tM)});function h8(i={}){let e="",t;i.matchClosingTags===!1&&(e="noMatch"),i.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(i.nestedLanguages&&i.nestedLanguages.length||i.nestedAttributes&&i.nestedAttributes.length)&&(t=E$((i.nestedLanguages||[]).concat(eM),(i.nestedAttributes||[]).concat(tM)));let n=t?iM.configure({wrap:t,dialect:e}):e?Gf.configure({dialect:e}):Gf;return new ac(n,[Gf.data.of({autocomplete:u8(i)}),i.autoCloseTags!==!1?d8:[],t8().support,y6().support])}const Gk=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),d8=ne.inputHandler.of((i,e,t,n,s)=>{if(i.composing||i.state.readOnly||e!=t||n!=">"&&n!="/"||!Gf.isActiveAt(i.state,e,-1))return!1;let l=s(),{state:o}=l,c=o.changeByRange(f=>{var d,p,m;let y=o.doc.sliceString(f.from-1,f.to)==n,{head:b}=f,S=it(o).resolveInner(b,-1),v;if(y&&n==">"&&S.name=="EndTag"){let w=S.parent;if(((p=(d=w.parent)===null||d===void 0?void 0:d.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(v=ca(o.doc,w.parent,b))&&!Gk.has(v)){let k=b+(o.doc.sliceString(b,b+1)===">"?1:0),A=`</${v}>`;return{range:f,changes:{from:b,to:k,insert:A}}}}else if(y&&n=="/"&&S.name=="IncompleteCloseTag"){let w=S.parent;if(S.from==b-2&&((m=w.lastChild)===null||m===void 0?void 0:m.name)!="CloseTag"&&(v=ca(o.doc,w,b))&&!Gk.has(v)){let k=b+(o.doc.sliceString(b,b+1)===">"?1:0),A=`${v}>`;return{range:G.cursor(b+A.length,-1),changes:{from:b,to:k,insert:A}}}}return{range:f}});return c.changes.empty?!1:(i.dispatch([l,o.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),nM=ly({commentTokens:{block:{open:"<!--",close:"-->"}}}),sM=new Te,rM=$Y.configure({props:[Oa.add(i=>!i.is("Block")||i.is("Document")||n0(i)!=null||p8(i)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),sM.add(n0),$c.add({Document:()=>null}),Lr.add({Document:nM})]});function n0(i){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(i.name);return e?+e[1]:void 0}function p8(i){return i.name=="OrderedList"||i.name=="BulletList"}function m8(i,e){let t=i;for(;;){let n=t.nextSibling,s;if(!n||(s=n0(n.type))!=null&&s<=e)break;t=n}return t.to}const O8=RA.of((i,e,t)=>{for(let n=it(i).resolveInner(t,-1);n&&!(n.from<e);n=n.parent){let s=n.type.prop(sM);if(s==null)continue;let l=m8(n,s);if(l>t)return{from:t,to:l}}return null});function Dy(i){return new Gi(nM,i,[],"markdown")}const g8=Dy(rM),y8=rM.configure([jY,NY,BY,YY,{props:[Oa.add({Table:(i,e)=>({from:e.doc.lineAt(i.from).to,to:i.to})})]}]),bc=Dy(y8);function b8(i,e){return t=>{if(t&&i){let n=null;if(t=/\S*/.exec(t)[0],typeof i=="function"?n=i(t):n=Oh.matchLanguageName(i,t,!0),n instanceof Oh)return n.support?n.support.language.parser:lc.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}class AO{constructor(e,t,n,s,l,o,c){this.node=e,this.from=t,this.to=n,this.spaceBefore=s,this.spaceAfter=l,this.type=o,this.item=c}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let s=this.to-this.from-n.length-this.spaceAfter.length;s>0;s--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+aM(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function lM(i,e){let t=[],n=[];for(let s=i;s;s=s.parent){if(s.name=="FencedCode")return n;(s.name=="ListItem"||s.name=="Blockquote")&&t.push(s)}for(let s=t.length-1;s>=0;s--){let l=t[s],o,c=e.lineAt(l.from),f=l.from-c.from;if(l.name=="Blockquote"&&(o=/^ *>( ?)/.exec(c.text.slice(f))))n.push(new AO(l,f,f+o[0].length,"",o[1],">",null));else if(l.name=="ListItem"&&l.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(c.text.slice(f)))){let d=o[3],p=o[0].length;d.length>=4&&(d=d.slice(0,d.length-4),p-=4),n.push(new AO(l.parent,f,f+p,o[1],d,o[2],l))}else if(l.name=="ListItem"&&l.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(c.text.slice(f)))){let d=o[4],p=o[0].length;d.length>4&&(d=d.slice(0,d.length-4),p-=4);let m=o[2];o[3]&&(m+=o[3].replace(/[xX]/," ")),n.push(new AO(l.parent,f,f+p,o[1],d,m,l))}}return n}function aM(i,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(i.from,i.from+10))}function PO(i,e,t,n=0){for(let s=-1,l=i;;){if(l.name=="ListItem"){let c=aM(l,e),f=+c[2];if(s>=0){if(f!=s+1)return;t.push({from:l.from+c[1].length,to:l.from+c[0].length,insert:String(s+2+n)})}s=f}let o=l.nextSibling;if(!o)break;l=o}}function Zy(i,e){let t=/^[ \t]*/.exec(i)[0].length;if(!t||e.facet(ma)!=" ")return i;let n=un(i,4,t),s="";for(let l=n;l>0;)l>=4?(s+=" ",l-=4):(s+=" ",l--);return s+i.slice(t)}const S8=(i={})=>({state:e,dispatch:t})=>{let n=it(e),{doc:s}=e,l=null,o=e.changeByRange(c=>{if(!c.empty||!bc.isActiveAt(e,c.from,-1)&&!bc.isActiveAt(e,c.from,1))return l={range:c};let f=c.from,d=s.lineAt(f),p=lM(n.resolveInner(f,-1),s);for(;p.length&&p[p.length-1].from>f-d.from;)p.pop();if(!p.length)return l={range:c};let m=p[p.length-1];if(m.to-m.spaceAfter.length>f-d.from)return l={range:c};let y=f>=m.to-m.spaceAfter.length&&!/\S/.test(d.text.slice(m.to));if(m.item&&y){let k=m.node.firstChild,A=m.node.getChild("ListItem","ListItem");if(k.to>=f||A&&A.to<f||d.from>0&&!/[^\s>]/.test(s.lineAt(d.from-1).text)||i.nonTightLists===!1){let P=p.length>1?p[p.length-2]:null,V,R="";P&&P.item?(V=d.from+P.from,R=P.marker(s,1)):V=d.from+(P?P.to:0);let N=[{from:V,to:f,insert:R}];return m.node.name=="OrderedList"&&PO(m.item,s,N,-2),P&&P.node.name=="OrderedList"&&PO(P.item,s,N),{range:G.cursor(V+R.length),changes:N}}else{let P=Hk(p,e,d);return{range:G.cursor(f+P.length+1),changes:{from:d.from,insert:P+e.lineBreak}}}}if(m.node.name=="Blockquote"&&y&&d.from){let k=s.lineAt(d.from-1),A=/>\s*$/.exec(k.text);if(A&&A.index==m.from){let P=e.changes([{from:k.from+A.index,to:k.to},{from:d.from+m.from,to:d.to}]);return{range:c.map(P),changes:P}}}let b=[];m.node.name=="OrderedList"&&PO(m.item,s,b);let S=m.item&&m.item.from<d.from,v="";if(!S||/^[\s\d.)\-+*>]*/.exec(d.text)[0].length>=m.to)for(let k=0,A=p.length-1;k<=A;k++)v+=k==A&&!S?p[k].marker(s,1):p[k].blank(k<A?un(d.text,4,p[k+1].from)-v.length:null);let w=f;for(;w>d.from&&/\s/.test(d.text.charAt(w-d.from-1));)w--;return v=Zy(v,e),v8(m.node,e.doc)&&(v=Hk(p,e,d)+e.lineBreak+v),b.push({from:w,to:f,insert:e.lineBreak+v}),{range:G.cursor(w+v.length+1),changes:b}});return l?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},x8=S8();function Wk(i){return i.name=="QuoteMark"||i.name=="ListMark"}function v8(i,e){if(i.name!="OrderedList"&&i.name!="BulletList")return!1;let t=i.firstChild,n=i.getChild("ListItem","ListItem");if(!n)return!1;let s=e.lineAt(t.to),l=e.lineAt(n.from),o=/^[\s>]*$/.test(s.text);return s.number+(o?0:1)<l.number}function Hk(i,e,t){let n="";for(let s=0,l=i.length-2;s<=l;s++)n+=i[s].blank(s<l?un(t.text,4,i[s+1].from)-n.length:null,s<l);return Zy(n,e)}function w8(i,e){let t=i.resolveInner(e,-1),n=e;Wk(t)&&(n=t.from,t=t.parent);for(let s;s=t.childBefore(n);)if(Wk(s))n=s.from;else if(s.name=="OrderedList"||s.name=="BulletList")t=s.lastChild,n=t.to;else break;return t}const Q8=({state:i,dispatch:e})=>{let t=it(i),n=null,s=i.changeByRange(l=>{let o=l.from,{doc:c}=i;if(l.empty&&bc.isActiveAt(i,l.from)){let f=c.lineAt(o),d=lM(w8(t,o),c);if(d.length){let p=d[d.length-1],m=p.to-p.spaceAfter.length+(p.spaceAfter?1:0);if(o-f.from>m&&!/\S/.test(f.text.slice(m,o-f.from)))return{range:G.cursor(f.from+m),changes:{from:f.from+m,to:o}};if(o-f.from==m&&(!p.item||f.from<=p.item.from||!/\S/.test(f.text.slice(0,p.to)))){let y=f.from+p.from;if(p.item&&p.node.from<p.item.from&&/\S/.test(f.text.slice(p.from,p.to))){let b=p.blank(un(f.text,4,p.to)-un(f.text,4,p.from));return y==f.from&&(b=Zy(b,i)),{range:G.cursor(y+b.length),changes:{from:y,to:f.from+p.to,insert:b}}}if(y<o)return{range:G.cursor(y),changes:{from:y,to:o}}}}}return n={range:l}});return n?!1:(e(i.update(s,{scrollIntoView:!0,userEvent:"delete"})),!0)},k8=[{key:"Enter",run:x8},{key:"Backspace",run:Q8}],oM=h8({matchClosingTags:!1});function T8(i={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:n=!0,base:{parser:s}=g8,completeHTMLTags:l=!0,pasteURLAsLink:o=!0,htmlTagLanguage:c=oM}=i;if(!(s instanceof Kh))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let f=i.extensions?[i.extensions]:[],d=[c.support,O8],p;o&&d.push($8),t instanceof ac?(d.push(t.support),p=t.language):t&&(p=t);let m=e||p?b8(e,p):void 0;f.push(EY({codeParser:m,htmlParser:c.language.parser})),n&&d.push(hs.high(Gr.of(k8)));let y=Dy(s.configure(f));return l&&d.push(y.data.of({autocomplete:C8})),new ac(y,d)}function C8(i){let{state:e,pos:t}=i,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!n)return null;let s=it(e).resolveInner(t,-1);for(;s&&!s.type.isTop;){if(s.name=="CodeBlock"||s.name=="FencedCode"||s.name=="ProcessingInstructionBlock"||s.name=="CommentBlock"||s.name=="Link"||s.name=="Image")return null;s=s.parent}return{from:t-n[0].length,to:t,options:A8(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let $O=null;function A8(){if($O)return $O;let i=c8(new gy(Le.create({extensions:oM}),0,!0));return $O=i?i.options:[]}const P8=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,$8=ne.domEventHandlers({paste:(i,e)=>{var t;let{main:n}=e.state.selection;if(n.empty)return!1;let s=(t=i.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!s||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(s)||(/^www\./.test(s)&&(s="https://"+s),!bc.isActiveAt(e.state,n.from,1)))return!1;let l=it(e.state),o=!1;return l.iterate({from:n.from,to:n.to,enter:c=>{(c.from>n.from||P8.test(c.name))&&(o=!0)},leave:c=>{c.to<n.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${s})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});function M8({initialContent:i,filePath:e,onSave:t,onClose:n}){const[s,l]=q.useState(i),[o,c]=q.useState(!1),[f,d]=q.useState(!1),p=q.useRef(s);q.useEffect(()=>{p.current=s},[s]);const m=q.useCallback(v=>{l(v),d(v!==i)},[i]),y=q.useCallback(async()=>{if(!o){c(!0);try{await t(p.current),d(!1)}catch(v){console.error("[plan-editor] Save failed:",v)}finally{c(!1)}}},[t,o]),b=q.useCallback(()=>{f&&!window.confirm("Unsaved changes -- discard?")||n()},[f,n]),S=Gr.of([{key:"Mod-s",run:()=>(y(),!0)}]);return q.useEffect(()=>{const v=w=>{(w.ctrlKey||w.metaKey)&&w.key==="s"&&w.preventDefault()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[]),C.jsxs("div",{className:"fixed inset-0 z-50 bg-background/95 flex flex-col",children:[C.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-card",children:[C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:e}),f&&C.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-sm bg-warning/20 text-warning font-mono",children:"unsaved"})]}),C.jsxs("div",{className:"flex items-center gap-2",children:[f&&C.jsx("button",{type:"button",onClick:y,disabled:o,className:ot("text-xs px-3 py-1.5 rounded-md font-mono","bg-accent text-foreground","hover:bg-accent-glow","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors focus:outline-none focus:ring-2 focus:ring-accent/50"),children:o?"Saving...":"Save"}),C.jsx("button",{type:"button",onClick:b,className:ot("text-xs px-3 py-1.5 rounded-md font-mono","bg-muted text-muted-foreground","hover:bg-danger/20 hover:text-danger","transition-colors focus:outline-none focus:ring-2 focus:ring-accent/50"),children:"Close"})]})]}),C.jsx("div",{className:"flex-1 overflow-auto",children:C.jsx(KP,{value:s,onChange:m,theme:FP,extensions:[T8({base:bc}),S],height:"calc(100vh - 56px)",basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0,bracketMatching:!0,indentOnInput:!0}})})]})}function E8({phaseId:i,onBack:e}){const{plans:t,context:n,research:s,loading:l,error:o,refetch:c}=E3(i),[f,d]=q.useState(null),[p,m]=q.useState(""),y=t.length>0?t[0].frontmatter.phase??i:i,b=q.useCallback(async w=>{try{const A=w.replace(/^\.planning[\\/]/,"").split(/[\\/]/),P=await fetch(`/api/plan/${A.join("/")}`);if(!P.ok){console.error("[phase-detail] Failed to fetch plan for editing");return}const V=await P.json();m(V.content),d(w)}catch(k){console.error("[phase-detail] Error fetching plan:",k)}},[]),S=q.useCallback(async w=>{if(!f)return;const A=f.replace(/^\.planning[\\/]/,"").split(/[\\/]/);if(!(await fetch(`/api/plan/${A.join("/")}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:w})})).ok)throw new Error("Failed to save plan")},[f]),v=q.useCallback(()=>{d(null),m(""),c()},[c]);return C.jsxs("div",{className:"space-y-6",children:[C.jsxs("button",{type:"button",onClick:e,className:ot("flex items-center gap-2 text-sm text-muted-foreground","hover:text-foreground transition-colors","focus:outline-none focus:ring-2 focus:ring-accent/50 rounded-md px-2 py-1"),children:[C.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",children:C.jsx("path",{d:"M10 3L5 8l5 5"})}),"Back to overview"]}),C.jsxs("div",{children:[C.jsxs("h2",{className:"text-2xl font-semibold tracking-tight",children:[C.jsxs("span",{className:"text-accent font-mono",children:["Phase ",i]}),C.jsx("span",{className:"mx-2 text-muted-foreground",children:"-"}),C.jsx("span",{children:y})]}),C.jsxs("div",{className:"flex gap-2 mt-2",children:[n&&C.jsx("span",{className:"text-xs px-2 py-0.5 rounded-sm bg-success/20 text-success font-mono",children:"context available"}),s&&C.jsx("span",{className:"text-xs px-2 py-0.5 rounded-sm bg-success/20 text-success font-mono",children:"research available"}),!n&&!s&&!l&&C.jsx("span",{className:"text-xs px-2 py-0.5 rounded-sm bg-muted text-muted-foreground font-mono",children:"no context or research"})]})]}),o&&C.jsx("div",{className:"p-4 rounded-lg border border-danger/50 bg-danger/10 text-danger text-sm",children:o}),l&&t.length===0&&C.jsx("div",{className:"space-y-4",children:[1,2,3].map(w=>C.jsxs("div",{className:"bg-card border border-border rounded-lg p-4 animate-pulse",children:[C.jsx("div",{className:"h-6 w-32 bg-muted rounded mb-3"}),C.jsx("div",{className:"h-4 w-3/4 bg-muted rounded mb-2"}),C.jsx("div",{className:"h-4 w-1/2 bg-muted rounded mb-3"}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("div",{className:"h-3 w-full bg-muted rounded"}),C.jsx("div",{className:"h-3 w-5/6 bg-muted rounded"})]})]},w))}),!l&&!o&&t.length===0&&C.jsx("div",{className:"p-8 text-center text-muted-foreground border border-border rounded-lg bg-card",children:C.jsxs("p",{className:"text-sm",children:["No plans yet -- run"," ",C.jsx("code",{className:"font-mono text-accent",children:"/maxsim:plan-phase"})," to create plans"]})}),t.length>0&&C.jsx("div",{className:"space-y-4",children:t.map(w=>C.jsx(z3,{plan:w,onEdit:b},w.path))}),f&&C.jsx(M8,{initialContent:p,filePath:f,onSave:S,onClose:v})]})}function R8(){const{lastChange:i}=Sc(),[e,t]=q.useState([]),[n,s]=q.useState([]),[l,o]=q.useState(!0),[c,f]=q.useState(null),[d,p]=q.useState(""),[m,y]=q.useState(!1),[b,S]=q.useState(!1),v=q.useCallback(async()=>{try{f(null);const A=await fetch("/api/todos");if(!A.ok)throw new Error(`Failed to fetch todos: ${A.status}`);const P=await A.json();t(P.pending),s(P.completed)}catch(A){f(A instanceof Error?A.message:"Failed to fetch todos")}finally{o(!1)}},[]);q.useEffect(()=>{v()},[v]),q.useEffect(()=>{i>0&&v()},[i,v]);const w=q.useCallback(async()=>{const A=d.trim();if(A){y(!0);try{if(!(await fetch("/api/todos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:A})})).ok)throw new Error("Failed to create todo");p(""),await v()}catch(P){f(P instanceof Error?P.message:"Failed to create todo")}finally{y(!1)}}},[d,v]),k=q.useCallback(async(A,P)=>{try{if(!(await fetch("/api/todos",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:A,completed:P})})).ok)throw new Error("Failed to update todo");await v()}catch(V){f(V instanceof Error?V.message:"Failed to update todo")}},[v]);return C.jsxs("div",{className:"space-y-6",children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx("h2",{className:"font-mono text-lg font-semibold tracking-tight text-foreground",children:"Todos"}),C.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[e.length," pending"]})]}),C.jsxs("div",{className:"flex gap-2",children:[C.jsx("input",{type:"text",value:d,onChange:A=>p(A.target.value),onKeyDown:A=>{A.key==="Enter"&&!m&&w()},placeholder:"Add a new todo...",className:"flex-1 rounded-sm border border-border bg-card px-3 py-2 font-mono text-sm text-foreground placeholder:text-muted-foreground focus:border-accent focus:outline-none"}),C.jsx("button",{type:"button",onClick:w,disabled:m||!d.trim(),className:ot("rounded-sm bg-accent px-4 py-2 font-mono text-xs font-semibold text-foreground transition-colors","hover:bg-accent-glow disabled:opacity-40 disabled:cursor-not-allowed"),children:"Add"})]}),c&&C.jsx("div",{className:"rounded-sm border border-danger/50 bg-danger/10 px-3 py-2 text-sm text-danger",children:c}),l&&C.jsx("div",{className:"space-y-2",children:[1,2,3].map(A=>C.jsxs("div",{className:"flex items-center gap-3 rounded-sm bg-card px-4 py-3",children:[C.jsx("div",{className:"h-4 w-4 animate-pulse rounded-sm bg-muted"}),C.jsx("div",{className:"h-4 w-48 animate-pulse rounded-sm bg-muted"})]},A))}),!l&&C.jsx("div",{className:"space-y-1",children:e.length===0?C.jsx("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"No pending todos"}):e.map(A=>C.jsxs("button",{type:"button",onClick:()=>k(A.file,!0),className:"group flex w-full items-center gap-3 rounded-sm px-4 py-2.5 text-left transition-colors hover:bg-card-hover",children:[C.jsx("span",{className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-muted-foreground transition-colors group-hover:border-accent"}),C.jsx("span",{className:"text-sm text-foreground",children:A.text})]},A.file))}),!l&&n.length>0&&C.jsxs("div",{className:"border-t border-border pt-4",children:[C.jsxs("button",{type:"button",onClick:()=>S(!b),className:"flex w-full items-center gap-2 text-left",children:[C.jsx("svg",{className:ot("h-3 w-3 text-muted-foreground transition-transform",b&&"rotate-90"),viewBox:"0 0 12 12",fill:"currentColor",children:C.jsx("path",{d:"M4 2l5 4-5 4z"})}),C.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["Completed (",n.length,")"]})]}),b&&C.jsx("div",{className:"mt-2 space-y-1",children:n.map(A=>C.jsxs("button",{type:"button",onClick:()=>k(A.file,!1),className:"group flex w-full items-center gap-3 rounded-sm px-4 py-2 text-left transition-colors hover:bg-card-hover",children:[C.jsx("span",{className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-success bg-success/20",children:C.jsx("svg",{className:"h-3 w-3 text-success",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",children:C.jsx("path",{d:"M2 6l3 3 5-5"})})}),C.jsx("span",{className:"text-sm text-muted-foreground line-through",children:A.text})]},A.file))})]})]})}function z8({onEntryAdded:i}){const[e,t]=q.useState(!1),[n,s]=q.useState("decision"),[l,o]=q.useState(""),[c,f]=q.useState(""),[d,p]=q.useState(!1),[m,y]=q.useState(null),[b,S]=q.useState(null),v=q.useCallback(async()=>{const w=c.trim();if(w){p(!0),y(null),S(null);try{if(n==="decision"){const A=`${l.trim()?`[${l.trim()}]: `:""}${w}`;if(!(await fetch("/api/state",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({field:"decisions",value:A})})).ok)throw new Error("Could not add decision - STATE.md field not found");S("Decision added")}else{if(!(await fetch("/api/state",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({field:"blockers",value:w})})).ok)throw new Error("Could not add blocker - STATE.md field not found");S("Blocker added")}f(""),o(""),i==null||i(),setTimeout(()=>S(null),2e3)}catch(k){y(k instanceof Error?k.message:"Failed to update STATE.md")}finally{p(!1)}}},[n,l,c,i]);return C.jsxs("div",{className:"border-t border-border pt-4",children:[C.jsxs("button",{type:"button",onClick:()=>t(!e),className:"flex w-full items-center gap-2 text-left",children:[C.jsx("svg",{className:ot("h-3 w-3 text-muted-foreground transition-transform",e&&"rotate-90"),viewBox:"0 0 12 12",fill:"currentColor",children:C.jsx("path",{d:"M4 2l5 4-5 4z"})}),C.jsx("span",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:"Add to STATE.md"})]}),e&&C.jsxs("div",{className:"mt-3 space-y-3",children:[C.jsxs("div",{className:"flex gap-1",children:[C.jsx("button",{type:"button",onClick:()=>s("decision"),className:ot("rounded-sm px-3 py-1 font-mono text-xs transition-colors",n==="decision"?"bg-accent/20 text-accent":"text-muted-foreground hover:text-foreground"),children:"Decision"}),C.jsx("button",{type:"button",onClick:()=>s("blocker"),className:ot("rounded-sm px-3 py-1 font-mono text-xs transition-colors",n==="blocker"?"bg-danger/20 text-danger":"text-muted-foreground hover:text-foreground"),children:"Blocker"})]}),n==="decision"&&C.jsx("input",{type:"text",value:l,onChange:w=>o(w.target.value),placeholder:"Phase (e.g. 13-06)",className:"w-full rounded-sm border border-border bg-card px-3 py-1.5 font-mono text-xs text-foreground placeholder:text-muted-foreground focus:border-accent focus:outline-none"}),C.jsx("input",{type:"text",value:c,onChange:w=>f(w.target.value),onKeyDown:w=>{w.key==="Enter"&&!d&&v()},placeholder:n==="decision"?"Decision text...":"Blocker description...",className:"w-full rounded-sm border border-border bg-card px-3 py-1.5 font-mono text-xs text-foreground placeholder:text-muted-foreground focus:border-accent focus:outline-none"}),C.jsx("button",{type:"button",onClick:v,disabled:d||!c.trim(),className:ot("rounded-sm px-3 py-1.5 font-mono text-xs font-semibold transition-colors","disabled:opacity-40 disabled:cursor-not-allowed",n==="decision"?"bg-accent/20 text-accent hover:bg-accent/30":"bg-danger/20 text-danger hover:bg-danger/30"),children:d?"Saving...":`Add ${n==="decision"?"Decision":"Blocker"}`}),m&&C.jsx("p",{className:"text-xs text-danger",children:m}),b&&C.jsx("p",{className:"text-xs text-success",children:b})]})]})}function D8(i){return i.map(e=>({text:e.replace(/~~(.+)~~/,"$1").replace(/\s*RESOLVED.*$/i,"").trim(),resolved:e.includes("RESOLVED")||e.startsWith("~~")&&e.endsWith("~~")}))}function Z8(){const{state:i}=r0(),[e,t]=q.useState(!1),[n,s]=q.useState(null),[l,o]=q.useState(null),[c,f]=q.useState(0),d=D8((i==null?void 0:i.blockers)??[]),p=d.filter(S=>!S.resolved),m=d.filter(S=>S.resolved),y=q.useCallback(async S=>{s(S),o(null);try{if(!(await fetch("/api/state",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({field:"blockers",value:`~~${S}~~ RESOLVED`})})).ok)throw new Error("Failed to resolve blocker");f(w=>w+1)}catch(v){o(v instanceof Error?v.message:"Failed to resolve blocker")}finally{s(null)}},[]),b=q.useCallback(()=>{f(S=>S+1)},[]);return C.jsxs("div",{className:"space-y-6",children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx("h2",{className:"font-mono text-lg font-semibold tracking-tight text-foreground",children:"Blockers"}),C.jsx("span",{className:ot("font-mono text-xs",p.length>0?"text-danger":"text-success"),children:p.length>0?`${p.length} active`:"No active blockers"})]}),l&&C.jsx("div",{className:"rounded-sm border border-danger/50 bg-danger/10 px-3 py-2 text-sm text-danger",children:l}),p.length===0?C.jsx("div",{className:"rounded-sm border border-success/30 bg-success/5 px-4 py-6 text-center",children:C.jsx("p",{className:"text-sm text-success",children:"No active blockers"})}):C.jsx("div",{className:"space-y-2",children:p.map(S=>C.jsxs("div",{className:"flex items-start gap-3 rounded-sm border border-border bg-card px-4 py-3",children:[C.jsx("span",{className:"mt-1 inline-block h-2 w-2 shrink-0 rounded-full bg-danger"}),C.jsx("div",{className:"flex-1",children:C.jsx("p",{className:"text-sm text-foreground",children:S.text})}),C.jsx("button",{type:"button",onClick:()=>y(S.text),disabled:n===S.text,className:ot("shrink-0 rounded-sm px-3 py-1 font-mono text-xs transition-colors","bg-success/20 text-success hover:bg-success/30","disabled:opacity-40 disabled:cursor-not-allowed"),children:n===S.text?"...":"Resolve"})]},S.text))}),m.length>0&&C.jsxs("div",{className:"border-t border-border pt-4",children:[C.jsxs("button",{type:"button",onClick:()=>t(!e),className:"flex w-full items-center gap-2 text-left",children:[C.jsx("svg",{className:ot("h-3 w-3 text-muted-foreground transition-transform",e&&"rotate-90"),viewBox:"0 0 12 12",fill:"currentColor",children:C.jsx("path",{d:"M4 2l5 4-5 4z"})}),C.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:["Resolved (",m.length,")"]})]}),e&&C.jsx("div",{className:"mt-2 space-y-1",children:m.map(S=>C.jsxs("div",{className:"flex items-center gap-3 rounded-sm px-4 py-2",children:[C.jsx("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full bg-muted"}),C.jsx("p",{className:"text-sm text-muted-foreground line-through",children:S.text})]},S.text))})]}),C.jsx(z8,{onEntryAdded:b})]},c)}function X8({sidebar:i,children:e}){return C.jsxs("div",{className:"flex h-screen overflow-hidden",children:[C.jsx("div",{className:"hidden md:flex",children:i}),C.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:e})]})}function L8(i){switch(i){case"complete":return"bg-success";case"partial":return"bg-accent";case"planned":case"researched":case"discussed":return"bg-muted-foreground";default:return"bg-muted"}}function V8({activeView:i,activePhaseId:e,onNavigate:t}){const{roadmap:n,state:s,todos:l}=r0(),{connected:o}=Sc(),c=((n==null?void 0:n.phases)??[]).map(m=>({number:m.number,name:m.name,goal:m.goal??"",dependsOn:m.depends_on?[m.depends_on]:[],planCount:m.plan_count,summaryCount:m.summary_count,diskStatus:m.disk_status,roadmapComplete:m.roadmap_complete,hasContext:m.has_context,hasResearch:m.has_research})),f=(n==null?void 0:n.current_phase)??null,d=(s==null?void 0:s.blockers.filter(m=>!m.includes("RESOLVED")).length)??0,p=(l==null?void 0:l.pending.length)??0;return C.jsxs("aside",{className:"flex h-full w-64 shrink-0 flex-col border-r border-border bg-card",children:[C.jsx("div",{className:"border-b border-border px-4 py-4",children:C.jsxs("button",{type:"button",onClick:()=>t("overview"),className:"flex flex-col gap-0.5 text-left",children:[C.jsx("span",{className:"font-mono text-lg font-bold tracking-tight text-foreground",children:"MAXSIM"}),C.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:"Dashboard"})]})}),C.jsxs("div",{className:"flex-1 overflow-y-auto py-2",children:[C.jsx("div",{className:"px-3 pb-1",children:C.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-muted-foreground",children:"Phases"})}),C.jsx("nav",{className:"flex flex-col gap-0.5 px-1",children:c.map(m=>{const y=i==="phase"&&e===m.number,b=m.number===f;return C.jsxs("button",{type:"button",onClick:()=>t("phase",m.number),className:ot("flex w-full items-center gap-2.5 rounded-sm px-3 py-1.5 text-left text-sm transition-colors",y?"border-l-2 border-l-accent bg-card-hover text-foreground":"border-l-2 border-l-transparent hover:bg-card-hover",b&&!y&&"border-l-accent-glow"),children:[C.jsx("span",{className:ot("inline-block h-2 w-2 shrink-0 rounded-full",L8(m.diskStatus))}),C.jsx("span",{className:ot("font-mono text-xs font-semibold",b||y?"text-accent":"text-muted-foreground"),children:m.number}),C.jsx("span",{className:"truncate text-xs text-foreground",children:m.name})]},m.number)})})]}),C.jsxs("div",{className:"border-t border-border px-1 py-2",children:[C.jsxs("button",{type:"button",onClick:()=>t("todos"),className:ot("flex w-full items-center justify-between rounded-sm px-3 py-2 text-left text-sm transition-colors",i==="todos"?"bg-card-hover text-foreground":"hover:bg-card-hover text-muted-foreground"),children:[C.jsx("span",{className:"font-mono text-xs uppercase tracking-wide",children:"Todos"}),p>0&&C.jsx("span",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-sm bg-warning/20 px-1 font-mono text-[10px] font-bold text-warning",children:p})]}),C.jsxs("button",{type:"button",onClick:()=>t("blockers"),className:ot("flex w-full items-center justify-between rounded-sm px-3 py-2 text-left text-sm transition-colors",i==="blockers"?"bg-card-hover text-foreground":"hover:bg-card-hover text-muted-foreground"),children:[C.jsx("span",{className:"font-mono text-xs uppercase tracking-wide",children:"Blockers"}),d>0&&C.jsx("span",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-sm bg-danger/20 px-1 font-mono text-[10px] font-bold text-danger shadow-[0_0_6px_rgba(239,68,68,0.3)]",children:d})]})]}),C.jsx("div",{className:"border-t border-border px-4 py-3",children:C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("span",{className:ot("inline-block h-2 w-2 rounded-full",o?"bg-success":"bg-danger")}),C.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:o?"Connected":"Disconnected"})]})})]})}function _8(){return C.jsxs("div",{className:"flex flex-col gap-6",children:[C.jsxs("div",{className:"flex flex-col gap-4 border-b border-border pb-5",children:[C.jsx("div",{className:"h-3 w-40 animate-pulse rounded-sm bg-muted"}),C.jsx("div",{className:"h-2 w-full animate-pulse rounded-sm bg-muted"}),C.jsxs("div",{className:"flex gap-8",children:[C.jsx("div",{className:"h-8 w-20 animate-pulse rounded-sm bg-muted"}),C.jsx("div",{className:"h-8 w-32 animate-pulse rounded-sm bg-muted"}),C.jsxs("div",{className:"ml-auto flex gap-6",children:[C.jsx("div",{className:"h-6 w-24 animate-pulse rounded-sm bg-muted"}),C.jsx("div",{className:"h-6 w-20 animate-pulse rounded-sm bg-muted"})]})]})]}),C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsxs("div",{className:"flex justify-between px-4",children:[C.jsx("div",{className:"h-3 w-16 animate-pulse rounded-sm bg-muted"}),C.jsx("div",{className:"h-3 w-6 animate-pulse rounded-sm bg-muted"})]}),Array.from({length:6}).map((i,e)=>C.jsxs("div",{className:"flex flex-col gap-2 px-4 py-3",children:[C.jsxs("div",{className:"flex gap-3",children:[C.jsx("div",{className:"h-4 w-4 animate-pulse rounded-full bg-muted"}),C.jsx("div",{className:"h-4 w-8 animate-pulse rounded-sm bg-muted"}),C.jsx("div",{className:"h-4 w-40 animate-pulse rounded-sm bg-muted"})]}),C.jsx("div",{className:"h-1.5 w-full animate-pulse rounded-sm bg-muted"})]},e))]})]})}function j8({message:i,onRetry:e}){return C.jsxs("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-4",children:[C.jsx("p",{className:"font-mono text-sm text-danger",children:i}),C.jsx("button",{type:"button",onClick:e,className:"rounded-sm bg-accent px-4 py-2 font-mono text-xs text-foreground transition-colors hover:bg-accent-glow",children:"Retry"})]})}function B8(){const{roadmap:i,state:e,todos:t,loading:n,error:s}=r0(),[l,o]=q.useState("overview"),[c,f]=q.useState(null),d=q.useCallback((v,w)=>{o(v),v==="phase"&&w&&f(w)},[]),p=q.useCallback(v=>{o("phase"),f(v)},[]),m=q.useCallback(()=>{o("overview"),f(null)},[]),y=((i==null?void 0:i.phases)??[]).map(v=>({number:v.number,name:v.name,goal:v.goal??"",dependsOn:v.depends_on?[v.depends_on]:[],planCount:v.plan_count,summaryCount:v.summary_count,diskStatus:v.disk_status,roadmapComplete:v.roadmap_complete,hasContext:v.has_context,hasResearch:v.has_research})),b=(i==null?void 0:i.current_phase)??null;function S(){if(n)return C.jsx(_8,{});if(s)return C.jsx(j8,{message:s,onRetry:()=>window.location.reload()});switch(l){case"overview":return C.jsxs("div",{className:"mx-auto flex max-w-4xl flex-col gap-6",children:[C.jsx(XX,{roadmap:i,state:e,todos:t}),C.jsx(jX,{phases:y,currentPhase:b,onPhaseClick:p})]});case"phase":return c?C.jsx("div",{className:"mx-auto max-w-4xl",children:C.jsx(E8,{phaseId:c,onBack:m})}):null;case"todos":return C.jsx("div",{className:"mx-auto max-w-3xl",children:C.jsx(R8,{})});case"blockers":return C.jsx("div",{className:"mx-auto max-w-3xl",children:C.jsx(Z8,{})});default:return null}}return C.jsx(X8,{sidebar:C.jsx(V8,{activeView:l,activePhaseId:c,onNavigate:d}),children:S()})}function N8(){return C.jsx(qR,{children:C.jsx(B8,{})})}const cM=document.getElementById("root");if(!cM)throw new Error("Root element not found");BR.createRoot(cM).render(C.jsx(q.StrictMode,{children:C.jsx(N8,{})}));
|