vzcode 0.15.0 → 0.17.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/README.md +98 -130
- package/dist/assets/index-ab3ae13e.js +115 -0
- package/dist/assets/worker-d5f0575a.js +237 -0
- package/dist/index.html +1 -1
- package/package.json +5 -5
- package/src/client/App.tsx +61 -35
- package/src/client/CodeEditor/getOrCreateEditor.ts +100 -42
- package/src/client/CodeEditor/index.tsx +22 -10
- package/src/client/Settings.tsx +17 -3
- package/src/client/main.jsx +3 -3
- package/src/client/themes.ts +30 -7
- package/src/client/useDynamicTheme.ts +26 -0
- package/src/client/useEditorCache.ts +21 -0
- package/src/client/usePrettier/index.ts +2 -5
- package/src/client/vizhubTheme.js +1 -0
- package/dist/assets/index-176d73ed.js +0 -115
- package/dist/assets/worker-aa634fce.js +0 -237
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
function rR(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var _r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wP={exports:{}},bd={},kP={exports:{}},st={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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 Gu=Symbol.for("react.element"),iR=Symbol.for("react.portal"),oR=Symbol.for("react.fragment"),sR=Symbol.for("react.strict_mode"),lR=Symbol.for("react.profiler"),aR=Symbol.for("react.provider"),uR=Symbol.for("react.context"),cR=Symbol.for("react.forward_ref"),fR=Symbol.for("react.suspense"),hR=Symbol.for("react.memo"),dR=Symbol.for("react.lazy"),C1=Symbol.iterator;function pR(t){return t===null||typeof t!="object"?null:(t=C1&&t[C1]||t["@@iterator"],typeof t=="function"?t:null)}var PP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xP=Object.assign,CP={};function Gl(t,e,n){this.props=t,this.context=e,this.refs=CP,this.updater=n||PP}Gl.prototype.isReactComponent={};Gl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Gl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function EP(){}EP.prototype=Gl.prototype;function Oy(t,e,n){this.props=t,this.context=e,this.refs=CP,this.updater=n||PP}var yy=Oy.prototype=new EP;yy.constructor=Oy;xP(yy,Gl.prototype);yy.isPureReactComponent=!0;var E1=Array.isArray,QP=Object.prototype.hasOwnProperty,vy={current:null},_P={key:!0,ref:!0,__self:!0,__source:!0};function $P(t,e,n){var r,i={},o=null,s=null;if(e!=null)for(r in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)QP.call(e,r)&&!_P.hasOwnProperty(r)&&(i[r]=e[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(t&&t.defaultProps)for(r in l=t.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Gu,type:t,key:o,ref:s,props:i,_owner:vy.current}}function gR(t,e){return{$$typeof:Gu,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Sy(t){return typeof t=="object"&&t!==null&&t.$$typeof===Gu}function mR(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Q1=/\/+/g;function $p(t,e){return typeof t=="object"&&t!==null&&t.key!=null?mR(""+t.key):e.toString(36)}function Tf(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case Gu:case iR:s=!0}}if(s)return s=t,i=i(s),t=r===""?"."+$p(s,0):r,E1(i)?(n="",t!=null&&(n=t.replace(Q1,"$&/")+"/"),Tf(i,e,n,"",function(u){return u})):i!=null&&(Sy(i)&&(i=gR(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Q1,"$&/")+"/")+t)),e.push(i)),1;if(s=0,r=r===""?".":r+":",E1(t))for(var l=0;l<t.length;l++){o=t[l];var a=r+$p(o,l);s+=Tf(o,e,n,a,i)}else if(a=pR(t),typeof a=="function")for(t=a.call(t),l=0;!(o=t.next()).done;)o=o.value,a=r+$p(o,l++),s+=Tf(o,e,n,a,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return s}function Nc(t,e,n){if(t==null)return t;var r=[],i=0;return Tf(t,r,"","",function(o){return e.call(n,o,i++)}),r}function OR(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var zn={current:null},Af={transition:null},yR={ReactCurrentDispatcher:zn,ReactCurrentBatchConfig:Af,ReactCurrentOwner:vy};st.Children={map:Nc,forEach:function(t,e,n){Nc(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Nc(t,function(){e++}),e},toArray:function(t){return Nc(t,function(e){return e})||[]},only:function(t){if(!Sy(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};st.Component=Gl;st.Fragment=oR;st.Profiler=lR;st.PureComponent=Oy;st.StrictMode=sR;st.Suspense=fR;st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yR;st.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=xP({},t.props),i=t.key,o=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,s=vy.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(a in e)QP.call(e,a)&&!_P.hasOwnProperty(a)&&(r[a]=e[a]===void 0&&l!==void 0?l[a]:e[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Gu,type:t.type,key:i,ref:o,props:r,_owner:s}};st.createContext=function(t){return t={$$typeof:uR,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:aR,_context:t},t.Consumer=t};st.createElement=$P;st.createFactory=function(t){var e=$P.bind(null,t);return e.type=t,e};st.createRef=function(){return{current:null}};st.forwardRef=function(t){return{$$typeof:cR,render:t}};st.isValidElement=Sy;st.lazy=function(t){return{$$typeof:dR,_payload:{_status:-1,_result:t},_init:OR}};st.memo=function(t,e){return{$$typeof:hR,type:t,compare:e===void 0?null:e}};st.startTransition=function(t){var e=Af.transition;Af.transition={};try{t()}finally{Af.transition=e}};st.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};st.useCallback=function(t,e){return zn.current.useCallback(t,e)};st.useContext=function(t){return zn.current.useContext(t)};st.useDebugValue=function(){};st.useDeferredValue=function(t){return zn.current.useDeferredValue(t)};st.useEffect=function(t,e){return zn.current.useEffect(t,e)};st.useId=function(){return zn.current.useId()};st.useImperativeHandle=function(t,e,n){return zn.current.useImperativeHandle(t,e,n)};st.useInsertionEffect=function(t,e){return zn.current.useInsertionEffect(t,e)};st.useLayoutEffect=function(t,e){return zn.current.useLayoutEffect(t,e)};st.useMemo=function(t,e){return zn.current.useMemo(t,e)};st.useReducer=function(t,e,n){return zn.current.useReducer(t,e,n)};st.useRef=function(t){return zn.current.useRef(t)};st.useState=function(t){return zn.current.useState(t)};st.useSyncExternalStore=function(t,e,n){return zn.current.useSyncExternalStore(t,e,n)};st.useTransition=function(){return zn.current.useTransition()};st.version="18.2.0";kP.exports=st;var I=kP.exports;const wo=Yo(I),_1=rR({__proto__:null,default:wo},[I]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its 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 vR=I,SR=Symbol.for("react.element"),bR=Symbol.for("react.fragment"),wR=Object.prototype.hasOwnProperty,kR=vR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,PR={key:!0,ref:!0,__self:!0,__source:!0};function TP(t,e,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)wR.call(e,r)&&!PR.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:SR,type:t,key:o,ref:s,props:i,_owner:kR.current}}bd.Fragment=bR;bd.jsx=TP;bd.jsxs=TP;wP.exports=bd;var ne=wP.exports,AP={exports:{}},wr={},RP={exports:{}},DP={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its 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
|
+
*/(function(t){function e(A,F){var Y=A.length;A.push(F);e:for(;0<Y;){var pe=Y-1>>>1,ae=A[pe];if(0<i(ae,F))A[pe]=F,A[Y]=ae,Y=pe;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var F=A[0],Y=A.pop();if(Y!==F){A[0]=Y;e:for(var pe=0,ae=A.length,B=ae>>>1;pe<B;){var q=2*(pe+1)-1,te=A[q],we=q+1,X=A[we];if(0>i(te,Y))we<ae&&0>i(X,te)?(A[pe]=X,A[we]=Y,pe=we):(A[pe]=te,A[q]=Y,pe=q);else if(we<ae&&0>i(X,Y))A[pe]=X,A[we]=Y,pe=we;else break e}}return F}function i(A,F){var Y=A.sortIndex-F.sortIndex;return Y!==0?Y:A.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,h=3,d=!1,p=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(A){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=A)r(u),F.sortIndex=F.expirationTime,e(a,F);else break;F=n(u)}}function b(A){if(g=!1,v(A),!p)if(n(a)!==null)p=!0,D(P);else{var F=n(u);F!==null&&N(b,F.startTime-A)}}function P(A,F){p=!1,g&&(g=!1,O(w),w=-1),d=!0;var Y=h;try{for(v(F),f=n(a);f!==null&&(!(f.expirationTime>F)||A&&!Q());){var pe=f.callback;if(typeof pe=="function"){f.callback=null,h=f.priorityLevel;var ae=pe(f.expirationTime<=F);F=t.unstable_now(),typeof ae=="function"?f.callback=ae:f===n(a)&&r(a),v(F)}else r(a);f=n(a)}if(f!==null)var B=!0;else{var q=n(u);q!==null&&N(b,q.startTime-F),B=!1}return B}finally{f=null,h=Y,d=!1}}var E=!1,T=null,w=-1,k=5,C=-1;function Q(){return!(t.unstable_now()-C<k)}function M(){if(T!==null){var A=t.unstable_now();C=A;var F=!0;try{F=T(!0,A)}finally{F?L():(E=!1,T=null)}}else E=!1}var L;if(typeof m=="function")L=function(){m(M)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,G=V.port2;V.port1.onmessage=M,L=function(){G.postMessage(null)}}else L=function(){y(M,0)};function D(A){T=A,E||(E=!0,L())}function N(A,F){w=y(function(){A(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(A){A.callback=null},t.unstable_continueExecution=function(){p||d||(p=!0,D(P))},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(a)},t.unstable_next=function(A){switch(h){case 1:case 2:case 3:var F=3;break;default:F=h}var Y=h;h=F;try{return A()}finally{h=Y}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(A,F){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var Y=h;h=A;try{return F()}finally{h=Y}},t.unstable_scheduleCallback=function(A,F,Y){var pe=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?pe+Y:pe):Y=pe,A){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=Y+ae,A={id:c++,callback:F,priorityLevel:A,startTime:Y,expirationTime:ae,sortIndex:-1},Y>pe?(A.sortIndex=Y,e(u,A),n(a)===null&&A===n(u)&&(g?(O(w),w=-1):g=!0,N(b,Y-pe))):(A.sortIndex=ae,e(a,A),p||d||(p=!0,D(P))),A},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(A){var F=h;return function(){var Y=h;h=F;try{return A.apply(this,arguments)}finally{h=Y}}}})(DP);RP.exports=DP;var xR=RP.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its 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 MP=I,br=xR;function se(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var IP=new Set,uu={};function Ts(t,e){$l(t,e),$l(t+"Capture",e)}function $l(t,e){for(uu[t]=e,t=0;t<e.length;t++)IP.add(e[t])}var Hi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nm=Object.prototype.hasOwnProperty,CR=/^[: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]*$/,$1={},T1={};function ER(t){return nm.call(T1,t)?!0:nm.call($1,t)?!1:CR.test(t)?T1[t]=!0:($1[t]=!0,!1)}function QR(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function _R(t,e,n,r){if(e===null||typeof e>"u"||QR(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function qn(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var _n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_n[t]=new qn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];_n[e]=new qn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_n[t]=new qn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_n[t]=new qn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){_n[t]=new qn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_n[t]=new qn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_n[t]=new qn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_n[t]=new qn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_n[t]=new qn(t,5,!1,t.toLowerCase(),null,!1,!1)});var by=/[\-:]([a-z])/g;function wy(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(by,wy);_n[e]=new qn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(by,wy);_n[e]=new qn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(by,wy);_n[e]=new qn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_n[t]=new qn(t,1,!1,t.toLowerCase(),null,!1,!1)});_n.xlinkHref=new qn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_n[t]=new qn(t,1,!1,t.toLowerCase(),null,!0,!0)});function ky(t,e,n,r){var i=_n.hasOwnProperty(e)?_n[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(_R(e,n,i,r)&&(n=null),r||i===null?ER(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var io=MP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Lc=Symbol.for("react.element"),Ks=Symbol.for("react.portal"),Js=Symbol.for("react.fragment"),Py=Symbol.for("react.strict_mode"),rm=Symbol.for("react.profiler"),NP=Symbol.for("react.provider"),LP=Symbol.for("react.context"),xy=Symbol.for("react.forward_ref"),im=Symbol.for("react.suspense"),om=Symbol.for("react.suspense_list"),Cy=Symbol.for("react.memo"),po=Symbol.for("react.lazy"),jP=Symbol.for("react.offscreen"),A1=Symbol.iterator;function pa(t){return t===null||typeof t!="object"?null:(t=A1&&t[A1]||t["@@iterator"],typeof t=="function"?t:null)}var zt=Object.assign,Tp;function Da(t){if(Tp===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Tp=e&&e[1]||""}return`
|
|
34
|
+
`+Tp+t}var Ap=!1;function Rp(t,e){if(!t||Ap)return"";Ap=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
|
|
37
|
+
`+i[s].replace(" at new "," at ");return t.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",t.displayName)),a}while(1<=s&&0<=l);break}}}finally{Ap=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Da(t):""}function $R(t){switch(t.tag){case 5:return Da(t.type);case 16:return Da("Lazy");case 13:return Da("Suspense");case 19:return Da("SuspenseList");case 0:case 2:case 15:return t=Rp(t.type,!1),t;case 11:return t=Rp(t.type.render,!1),t;case 1:return t=Rp(t.type,!0),t;default:return""}}function sm(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Js:return"Fragment";case Ks:return"Portal";case rm:return"Profiler";case Py:return"StrictMode";case im:return"Suspense";case om:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case LP:return(t.displayName||"Context")+".Consumer";case NP:return(t._context.displayName||"Context")+".Provider";case xy:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Cy:return e=t.displayName||null,e!==null?e:sm(t.type)||"Memo";case po:e=t._payload,t=t._init;try{return sm(t(e))}catch{}}return null}function TR(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sm(e);case 8:return e===Py?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function jo(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function VP(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function AR(t){var e=VP(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function jc(t){t._valueTracker||(t._valueTracker=AR(t))}function BP(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=VP(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ah(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function lm(t,e){var n=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function R1(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=jo(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function FP(t,e){e=e.checked,e!=null&&ky(t,"checked",e,!1)}function am(t,e){FP(t,e);var n=jo(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?um(t,e.type,n):e.hasOwnProperty("defaultValue")&&um(t,e.type,jo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function D1(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function um(t,e,n){(e!=="number"||ah(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ma=Array.isArray;function gl(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+jo(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function cm(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(se(91));return zt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function M1(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(se(92));if(Ma(n)){if(1<n.length)throw Error(se(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:jo(n)}}function XP(t,e){var n=jo(e.value),r=jo(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function I1(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function WP(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fm(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?WP(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Vc,UP=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Vc=Vc||document.createElement("div"),Vc.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Vc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function cu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ya={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},RR=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(t){RR.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ya[e]=Ya[t]})});function ZP(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ya.hasOwnProperty(t)&&Ya[t]?(""+e).trim():e+"px"}function YP(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ZP(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var DR=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hm(t,e){if(e){if(DR[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(se(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(se(62))}}function dm(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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=null;function Ey(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gm=null,ml=null,Ol=null;function N1(t){if(t=Ju(t)){if(typeof gm!="function")throw Error(se(280));var e=t.stateNode;e&&(e=Cd(e),gm(t.stateNode,t.type,e))}}function zP(t){ml?Ol?Ol.push(t):Ol=[t]:ml=t}function qP(){if(ml){var t=ml,e=Ol;if(Ol=ml=null,N1(t),e)for(t=0;t<e.length;t++)N1(e[t])}}function GP(t,e){return t(e)}function HP(){}var Dp=!1;function KP(t,e,n){if(Dp)return t(e,n);Dp=!0;try{return GP(t,e,n)}finally{Dp=!1,(ml!==null||Ol!==null)&&(HP(),qP())}}function fu(t,e){var n=t.stateNode;if(n===null)return null;var r=Cd(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(se(231,e,typeof n));return n}var mm=!1;if(Hi)try{var ga={};Object.defineProperty(ga,"passive",{get:function(){mm=!0}}),window.addEventListener("test",ga,ga),window.removeEventListener("test",ga,ga)}catch{mm=!1}function MR(t,e,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var za=!1,uh=null,ch=!1,Om=null,IR={onError:function(t){za=!0,uh=t}};function NR(t,e,n,r,i,o,s,l,a){za=!1,uh=null,MR.apply(IR,arguments)}function LR(t,e,n,r,i,o,s,l,a){if(NR.apply(this,arguments),za){if(za){var u=uh;za=!1,uh=null}else throw Error(se(198));ch||(ch=!0,Om=u)}}function As(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function JP(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function L1(t){if(As(t)!==t)throw Error(se(188))}function jR(t){var e=t.alternate;if(!e){if(e=As(t),e===null)throw Error(se(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return L1(i),t;if(o===r)return L1(i),e;o=o.sibling}throw Error(se(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(se(189))}}if(n.alternate!==r)throw Error(se(190))}if(n.tag!==3)throw Error(se(188));return n.stateNode.current===n?t:e}function ex(t){return t=jR(t),t!==null?tx(t):null}function tx(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=tx(t);if(e!==null)return e;t=t.sibling}return null}var nx=br.unstable_scheduleCallback,j1=br.unstable_cancelCallback,VR=br.unstable_shouldYield,BR=br.unstable_requestPaint,rn=br.unstable_now,FR=br.unstable_getCurrentPriorityLevel,Qy=br.unstable_ImmediatePriority,rx=br.unstable_UserBlockingPriority,fh=br.unstable_NormalPriority,XR=br.unstable_LowPriority,ix=br.unstable_IdlePriority,wd=null,Qi=null;function WR(t){if(Qi&&typeof Qi.onCommitFiberRoot=="function")try{Qi.onCommitFiberRoot(wd,t,void 0,(t.current.flags&128)===128)}catch{}}var ti=Math.clz32?Math.clz32:YR,UR=Math.log,ZR=Math.LN2;function YR(t){return t>>>=0,t===0?32:31-(UR(t)/ZR|0)|0}var Bc=64,Fc=4194304;function Ia(t){switch(t&-t){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function hh(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Ia(l):(o&=s,o!==0&&(r=Ia(o)))}else s=n&~i,s!==0?r=Ia(s):o!==0&&(r=Ia(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-ti(e),i=1<<n,r|=t[n],e&=~i;return r}function zR(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qR(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-ti(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=zR(l,e)):a<=e&&(t.expiredLanes|=l),o&=~l}}function ym(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function ox(){var t=Bc;return Bc<<=1,!(Bc&4194240)&&(Bc=64),t}function Mp(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Hu(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ti(e),t[e]=n}function GR(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-ti(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}function _y(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-ti(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var St=0;function sx(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var lx,$y,ax,ux,cx,vm=!1,Xc=[],_o=null,$o=null,To=null,hu=new Map,du=new Map,vo=[],HR="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 submit".split(" ");function V1(t,e){switch(t){case"focusin":case"focusout":_o=null;break;case"dragenter":case"dragleave":$o=null;break;case"mouseover":case"mouseout":To=null;break;case"pointerover":case"pointerout":hu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(e.pointerId)}}function ma(t,e,n,r,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Ju(e),e!==null&&$y(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function KR(t,e,n,r,i){switch(e){case"focusin":return _o=ma(_o,t,e,n,r,i),!0;case"dragenter":return $o=ma($o,t,e,n,r,i),!0;case"mouseover":return To=ma(To,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return hu.set(o,ma(hu.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,du.set(o,ma(du.get(o)||null,t,e,n,r,i)),!0}return!1}function fx(t){var e=cs(t.target);if(e!==null){var n=As(e);if(n!==null){if(e=n.tag,e===13){if(e=JP(n),e!==null){t.blockedOn=e,cx(t.priority,function(){ax(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Rf(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Sm(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);pm=r,n.target.dispatchEvent(r),pm=null}else return e=Ju(n),e!==null&&$y(e),t.blockedOn=n,!1;e.shift()}return!0}function B1(t,e,n){Rf(t)&&n.delete(e)}function JR(){vm=!1,_o!==null&&Rf(_o)&&(_o=null),$o!==null&&Rf($o)&&($o=null),To!==null&&Rf(To)&&(To=null),hu.forEach(B1),du.forEach(B1)}function Oa(t,e){t.blockedOn===e&&(t.blockedOn=null,vm||(vm=!0,br.unstable_scheduleCallback(br.unstable_NormalPriority,JR)))}function pu(t){function e(i){return Oa(i,t)}if(0<Xc.length){Oa(Xc[0],t);for(var n=1;n<Xc.length;n++){var r=Xc[n];r.blockedOn===t&&(r.blockedOn=null)}}for(_o!==null&&Oa(_o,t),$o!==null&&Oa($o,t),To!==null&&Oa(To,t),hu.forEach(e),du.forEach(e),n=0;n<vo.length;n++)r=vo[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<vo.length&&(n=vo[0],n.blockedOn===null);)fx(n),n.blockedOn===null&&vo.shift()}var yl=io.ReactCurrentBatchConfig,dh=!0;function eD(t,e,n,r){var i=St,o=yl.transition;yl.transition=null;try{St=1,Ty(t,e,n,r)}finally{St=i,yl.transition=o}}function tD(t,e,n,r){var i=St,o=yl.transition;yl.transition=null;try{St=4,Ty(t,e,n,r)}finally{St=i,yl.transition=o}}function Ty(t,e,n,r){if(dh){var i=Sm(t,e,n,r);if(i===null)Up(t,e,r,ph,n),V1(t,r);else if(KR(i,t,e,n,r))r.stopPropagation();else if(V1(t,r),e&4&&-1<HR.indexOf(t)){for(;i!==null;){var o=Ju(i);if(o!==null&&lx(o),o=Sm(t,e,n,r),o===null&&Up(t,e,r,ph,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Up(t,e,r,null,n)}}var ph=null;function Sm(t,e,n,r){if(ph=null,t=Ey(r),t=cs(t),t!==null)if(e=As(t),e===null)t=null;else if(n=e.tag,n===13){if(t=JP(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return ph=t,null}function hx(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(FR()){case Qy:return 1;case rx:return 4;case fh:case XR:return 16;case ix:return 536870912;default:return 16}default:return 16}}var ko=null,Ay=null,Df=null;function dx(){if(Df)return Df;var t,e=Ay,n=e.length,r,i="value"in ko?ko.value:ko.textContent,o=i.length;for(t=0;t<n&&e[t]===i[t];t++);var s=n-t;for(r=1;r<=s&&e[n-r]===i[o-r];r++);return Df=i.slice(t,1<r?1-r:void 0)}function Mf(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Wc(){return!0}function F1(){return!1}function kr(t){function e(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Wc:F1,this.isPropagationStopped=F1,this}return zt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Wc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Wc)},persist:function(){},isPersistent:Wc}),e}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ry=kr(Hl),Ku=zt({},Hl,{view:0,detail:0}),nD=kr(Ku),Ip,Np,ya,kd=zt({},Ku,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dy,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ya&&(ya&&t.type==="mousemove"?(Ip=t.screenX-ya.screenX,Np=t.screenY-ya.screenY):Np=Ip=0,ya=t),Ip)},movementY:function(t){return"movementY"in t?t.movementY:Np}}),X1=kr(kd),rD=zt({},kd,{dataTransfer:0}),iD=kr(rD),oD=zt({},Ku,{relatedTarget:0}),Lp=kr(oD),sD=zt({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),lD=kr(sD),aD=zt({},Hl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),uD=kr(aD),cD=zt({},Hl,{data:0}),W1=kr(cD),fD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hD={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"},dD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pD(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=dD[t])?!!e[t]:!1}function Dy(){return pD}var gD=zt({},Ku,{key:function(t){if(t.key){var e=fD[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Mf(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?hD[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dy,charCode:function(t){return t.type==="keypress"?Mf(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Mf(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),mD=kr(gD),OD=zt({},kd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),U1=kr(OD),yD=zt({},Ku,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dy}),vD=kr(yD),SD=zt({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),bD=kr(SD),wD=zt({},kd,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),kD=kr(wD),PD=[9,13,27,32],My=Hi&&"CompositionEvent"in window,qa=null;Hi&&"documentMode"in document&&(qa=document.documentMode);var xD=Hi&&"TextEvent"in window&&!qa,px=Hi&&(!My||qa&&8<qa&&11>=qa),Z1=String.fromCharCode(32),Y1=!1;function gx(t,e){switch(t){case"keyup":return PD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mx(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var el=!1;function CD(t,e){switch(t){case"compositionend":return mx(e);case"keypress":return e.which!==32?null:(Y1=!0,Z1);case"textInput":return t=e.data,t===Z1&&Y1?null:t;default:return null}}function ED(t,e){if(el)return t==="compositionend"||!My&&gx(t,e)?(t=dx(),Df=Ay=ko=null,el=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return px&&e.locale!=="ko"?null:e.data;default:return null}}var QD={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 z1(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!QD[t.type]:e==="textarea"}function Ox(t,e,n,r){zP(r),e=gh(e,"onChange"),0<e.length&&(n=new Ry("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Ga=null,gu=null;function _D(t){Qx(t,0)}function Pd(t){var e=rl(t);if(BP(e))return t}function $D(t,e){if(t==="change")return e}var yx=!1;if(Hi){var jp;if(Hi){var Vp="oninput"in document;if(!Vp){var q1=document.createElement("div");q1.setAttribute("oninput","return;"),Vp=typeof q1.oninput=="function"}jp=Vp}else jp=!1;yx=jp&&(!document.documentMode||9<document.documentMode)}function G1(){Ga&&(Ga.detachEvent("onpropertychange",vx),gu=Ga=null)}function vx(t){if(t.propertyName==="value"&&Pd(gu)){var e=[];Ox(e,gu,t,Ey(t)),KP(_D,e)}}function TD(t,e,n){t==="focusin"?(G1(),Ga=e,gu=n,Ga.attachEvent("onpropertychange",vx)):t==="focusout"&&G1()}function AD(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Pd(gu)}function RD(t,e){if(t==="click")return Pd(e)}function DD(t,e){if(t==="input"||t==="change")return Pd(e)}function MD(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ri=typeof Object.is=="function"?Object.is:MD;function mu(t,e){if(ri(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!nm.call(e,i)||!ri(t[i],e[i]))return!1}return!0}function H1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function K1(t,e){var n=H1(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=H1(n)}}function Sx(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Sx(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function bx(){for(var t=window,e=ah();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ah(t.document)}return e}function Iy(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function ID(t){var e=bx(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Sx(n.ownerDocument.documentElement,n)){if(r!==null&&Iy(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=K1(n,o);var s=K1(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var ND=Hi&&"documentMode"in document&&11>=document.documentMode,tl=null,bm=null,Ha=null,wm=!1;function J1(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wm||tl==null||tl!==ah(r)||(r=tl,"selectionStart"in r&&Iy(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ha&&mu(Ha,r)||(Ha=r,r=gh(bm,"onSelect"),0<r.length&&(e=new Ry("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=tl)))}function Uc(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var nl={animationend:Uc("Animation","AnimationEnd"),animationiteration:Uc("Animation","AnimationIteration"),animationstart:Uc("Animation","AnimationStart"),transitionend:Uc("Transition","TransitionEnd")},Bp={},wx={};Hi&&(wx=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function xd(t){if(Bp[t])return Bp[t];if(!nl[t])return t;var e=nl[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in wx)return Bp[t]=e[n];return t}var kx=xd("animationend"),Px=xd("animationiteration"),xx=xd("animationstart"),Cx=xd("transitionend"),Ex=new Map,eS="abort auxClick 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(" ");function zo(t,e){Ex.set(t,e),Ts(e,[t])}for(var Fp=0;Fp<eS.length;Fp++){var Xp=eS[Fp],LD=Xp.toLowerCase(),jD=Xp[0].toUpperCase()+Xp.slice(1);zo(LD,"on"+jD)}zo(kx,"onAnimationEnd");zo(Px,"onAnimationIteration");zo(xx,"onAnimationStart");zo("dblclick","onDoubleClick");zo("focusin","onFocus");zo("focusout","onBlur");zo(Cx,"onTransitionEnd");$l("onMouseEnter",["mouseout","mouseover"]);$l("onMouseLeave",["mouseout","mouseover"]);$l("onPointerEnter",["pointerout","pointerover"]);$l("onPointerLeave",["pointerout","pointerover"]);Ts("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ts("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ts("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ts("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ts("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ts("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Na="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(" "),VD=new Set("cancel close invalid load scroll toggle".split(" ").concat(Na));function tS(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,LR(r,e,void 0,t),t.currentTarget=null}function Qx(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;tS(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;tS(i,l,u),o=a}}}if(ch)throw t=Om,ch=!1,Om=null,t}function Dt(t,e){var n=e[Em];n===void 0&&(n=e[Em]=new Set);var r=t+"__bubble";n.has(r)||(_x(e,t,2,!1),n.add(r))}function Wp(t,e,n){var r=0;e&&(r|=4),_x(n,t,r,e)}var Zc="_reactListening"+Math.random().toString(36).slice(2);function Ou(t){if(!t[Zc]){t[Zc]=!0,IP.forEach(function(n){n!=="selectionchange"&&(VD.has(n)||Wp(n,!1,t),Wp(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Zc]||(e[Zc]=!0,Wp("selectionchange",!1,e))}}function _x(t,e,n,r){switch(hx(e)){case 1:var i=eD;break;case 4:i=tD;break;default:i=Ty}n=i.bind(null,e,n,t),i=void 0,!mm||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Up(t,e,n,r,i){var o=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=cs(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}KP(function(){var u=o,c=Ey(n),f=[];e:{var h=Ex.get(t);if(h!==void 0){var d=Ry,p=t;switch(t){case"keypress":if(Mf(n)===0)break e;case"keydown":case"keyup":d=mD;break;case"focusin":p="focus",d=Lp;break;case"focusout":p="blur",d=Lp;break;case"beforeblur":case"afterblur":d=Lp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=X1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=iD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=vD;break;case kx:case Px:case xx:d=lD;break;case Cx:d=bD;break;case"scroll":d=nD;break;case"wheel":d=kD;break;case"copy":case"cut":case"paste":d=uD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=U1}var g=(e&4)!==0,y=!g&&t==="scroll",O=g?h!==null?h+"Capture":null:h;g=[];for(var m=u,v;m!==null;){v=m;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,O!==null&&(b=fu(m,O),b!=null&&g.push(yu(m,b,v)))),y)break;m=m.return}0<g.length&&(h=new d(h,p,null,n,c),f.push({event:h,listeners:g}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",h&&n!==pm&&(p=n.relatedTarget||n.fromElement)&&(cs(p)||p[Ki]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(p=n.relatedTarget||n.toElement,d=u,p=p?cs(p):null,p!==null&&(y=As(p),p!==y||p.tag!==5&&p.tag!==6)&&(p=null)):(d=null,p=u),d!==p)){if(g=X1,b="onMouseLeave",O="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(g=U1,b="onPointerLeave",O="onPointerEnter",m="pointer"),y=d==null?h:rl(d),v=p==null?h:rl(p),h=new g(b,m+"leave",d,n,c),h.target=y,h.relatedTarget=v,b=null,cs(c)===u&&(g=new g(O,m+"enter",p,n,c),g.target=v,g.relatedTarget=y,b=g),y=b,d&&p)t:{for(g=d,O=p,m=0,v=g;v;v=Fs(v))m++;for(v=0,b=O;b;b=Fs(b))v++;for(;0<m-v;)g=Fs(g),m--;for(;0<v-m;)O=Fs(O),v--;for(;m--;){if(g===O||O!==null&&g===O.alternate)break t;g=Fs(g),O=Fs(O)}g=null}else g=null;d!==null&&nS(f,h,d,g,!1),p!==null&&y!==null&&nS(f,y,p,g,!0)}}e:{if(h=u?rl(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var P=$D;else if(z1(h))if(yx)P=DD;else{P=AD;var E=TD}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(P=RD);if(P&&(P=P(t,u))){Ox(f,P,n,c);break e}E&&E(t,h,u),t==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&um(h,"number",h.value)}switch(E=u?rl(u):window,t){case"focusin":(z1(E)||E.contentEditable==="true")&&(tl=E,bm=u,Ha=null);break;case"focusout":Ha=bm=tl=null;break;case"mousedown":wm=!0;break;case"contextmenu":case"mouseup":case"dragend":wm=!1,J1(f,n,c);break;case"selectionchange":if(ND)break;case"keydown":case"keyup":J1(f,n,c)}var T;if(My)e:{switch(t){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else el?gx(t,n)&&(w="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(w="onCompositionStart");w&&(px&&n.locale!=="ko"&&(el||w!=="onCompositionStart"?w==="onCompositionEnd"&&el&&(T=dx()):(ko=c,Ay="value"in ko?ko.value:ko.textContent,el=!0)),E=gh(u,w),0<E.length&&(w=new W1(w,t,null,n,c),f.push({event:w,listeners:E}),T?w.data=T:(T=mx(n),T!==null&&(w.data=T)))),(T=xD?CD(t,n):ED(t,n))&&(u=gh(u,"onBeforeInput"),0<u.length&&(c=new W1("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=T))}Qx(f,e)})}function yu(t,e,n){return{instance:t,listener:e,currentTarget:n}}function gh(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=fu(t,n),o!=null&&r.unshift(yu(t,o,i)),o=fu(t,e),o!=null&&r.push(yu(t,o,i))),t=t.return}return r}function Fs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function nS(t,e,n,r,i){for(var o=e._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=fu(n,o),a!=null&&s.unshift(yu(n,a,l))):i||(a=fu(n,o),a!=null&&s.push(yu(n,a,l)))),n=n.return}s.length!==0&&t.push({event:e,listeners:s})}var BD=/\r\n?/g,FD=/\u0000|\uFFFD/g;function rS(t){return(typeof t=="string"?t:""+t).replace(BD,`
|
|
38
|
+
`).replace(FD,"")}function Yc(t,e,n){if(e=rS(e),rS(t)!==e&&n)throw Error(se(425))}function mh(){}var km=null,Pm=null;function xm(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Cm=typeof setTimeout=="function"?setTimeout:void 0,XD=typeof clearTimeout=="function"?clearTimeout:void 0,iS=typeof Promise=="function"?Promise:void 0,WD=typeof queueMicrotask=="function"?queueMicrotask:typeof iS<"u"?function(t){return iS.resolve(null).then(t).catch(UD)}:Cm;function UD(t){setTimeout(function(){throw t})}function Zp(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),pu(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);pu(e)}function Ao(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function oS(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Kl=Math.random().toString(36).slice(2),Si="__reactFiber$"+Kl,vu="__reactProps$"+Kl,Ki="__reactContainer$"+Kl,Em="__reactEvents$"+Kl,ZD="__reactListeners$"+Kl,YD="__reactHandles$"+Kl;function cs(t){var e=t[Si];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ki]||n[Si]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=oS(t);t!==null;){if(n=t[Si])return n;t=oS(t)}return e}t=n,n=t.parentNode}return null}function Ju(t){return t=t[Si]||t[Ki],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function rl(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(se(33))}function Cd(t){return t[vu]||null}var Qm=[],il=-1;function qo(t){return{current:t}}function Nt(t){0>il||(t.current=Qm[il],Qm[il]=null,il--)}function Et(t,e){il++,Qm[il]=t.current,t.current=e}var Vo={},Vn=qo(Vo),ir=qo(!1),ws=Vo;function Tl(t,e){var n=t.type.contextTypes;if(!n)return Vo;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function or(t){return t=t.childContextTypes,t!=null}function Oh(){Nt(ir),Nt(Vn)}function sS(t,e,n){if(Vn.current!==Vo)throw Error(se(168));Et(Vn,e),Et(ir,n)}function $x(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(se(108,TR(t)||"Unknown",i));return zt({},n,r)}function yh(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Vo,ws=Vn.current,Et(Vn,t),Et(ir,ir.current),!0}function lS(t,e,n){var r=t.stateNode;if(!r)throw Error(se(169));n?(t=$x(t,e,ws),r.__reactInternalMemoizedMergedChildContext=t,Nt(ir),Nt(Vn),Et(Vn,t)):Nt(ir),Et(ir,n)}var Xi=null,Ed=!1,Yp=!1;function Tx(t){Xi===null?Xi=[t]:Xi.push(t)}function zD(t){Ed=!0,Tx(t)}function Go(){if(!Yp&&Xi!==null){Yp=!0;var t=0,e=St;try{var n=Xi;for(St=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Xi=null,Ed=!1}catch(i){throw Xi!==null&&(Xi=Xi.slice(t+1)),nx(Qy,Go),i}finally{St=e,Yp=!1}}return null}var ol=[],sl=0,vh=null,Sh=0,$r=[],Tr=0,ks=null,Ui=1,Zi="";function is(t,e){ol[sl++]=Sh,ol[sl++]=vh,vh=t,Sh=e}function Ax(t,e,n){$r[Tr++]=Ui,$r[Tr++]=Zi,$r[Tr++]=ks,ks=t;var r=Ui;t=Zi;var i=32-ti(r)-1;r&=~(1<<i),n+=1;var o=32-ti(e)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Ui=1<<32-ti(e)+i|n<<i|r,Zi=o+t}else Ui=1<<o|n<<i|r,Zi=t}function Ny(t){t.return!==null&&(is(t,1),Ax(t,1,0))}function Ly(t){for(;t===vh;)vh=ol[--sl],ol[sl]=null,Sh=ol[--sl],ol[sl]=null;for(;t===ks;)ks=$r[--Tr],$r[Tr]=null,Zi=$r[--Tr],$r[Tr]=null,Ui=$r[--Tr],$r[Tr]=null}var yr=null,mr=null,Vt=!1,Kr=null;function Rx(t,e){var n=Rr(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function aS(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,yr=t,mr=Ao(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,yr=t,mr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=ks!==null?{id:Ui,overflow:Zi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Rr(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,yr=t,mr=null,!0):!1;default:return!1}}function _m(t){return(t.mode&1)!==0&&(t.flags&128)===0}function $m(t){if(Vt){var e=mr;if(e){var n=e;if(!aS(t,e)){if(_m(t))throw Error(se(418));e=Ao(n.nextSibling);var r=yr;e&&aS(t,e)?Rx(r,n):(t.flags=t.flags&-4097|2,Vt=!1,yr=t)}}else{if(_m(t))throw Error(se(418));t.flags=t.flags&-4097|2,Vt=!1,yr=t}}}function uS(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;yr=t}function zc(t){if(t!==yr)return!1;if(!Vt)return uS(t),Vt=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!xm(t.type,t.memoizedProps)),e&&(e=mr)){if(_m(t))throw Dx(),Error(se(418));for(;e;)Rx(t,e),e=Ao(e.nextSibling)}if(uS(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(se(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){mr=Ao(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}mr=null}}else mr=yr?Ao(t.stateNode.nextSibling):null;return!0}function Dx(){for(var t=mr;t;)t=Ao(t.nextSibling)}function Al(){mr=yr=null,Vt=!1}function jy(t){Kr===null?Kr=[t]:Kr.push(t)}var qD=io.ReactCurrentBatchConfig;function Gr(t,e){if(t&&t.defaultProps){e=zt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var bh=qo(null),wh=null,ll=null,Vy=null;function By(){Vy=ll=wh=null}function Fy(t){var e=bh.current;Nt(bh),t._currentValue=e}function Tm(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function vl(t,e){wh=t,Vy=ll=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(tr=!0),t.firstContext=null)}function Vr(t){var e=t._currentValue;if(Vy!==t)if(t={context:t,memoizedValue:e,next:null},ll===null){if(wh===null)throw Error(se(308));ll=t,wh.dependencies={lanes:0,firstContext:t}}else ll=ll.next=t;return e}var fs=null;function Xy(t){fs===null?fs=[t]:fs.push(t)}function Mx(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Xy(e)):(n.next=i.next,i.next=n),e.interleaved=n,Ji(t,r)}function Ji(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var go=!1;function Wy(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ix(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Yi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ro(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,dt&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Ji(t,n)}return i=r.interleaved,i===null?(e.next=e,Xy(r)):(e.next=i.next,i.next=e),r.interleaved=e,Ji(t,n)}function If(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,_y(t,n)}}function cS(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function kh(t,e,n,r){var i=t.updateQueue;go=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=t.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;s=0,c=u=a=null,l=o;do{var h=l.lane,d=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=t,g=l;switch(h=e,d=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(d,f,h):p,h==null)break e;f=zt({},f,h);break e;case 2:go=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else d={eventTime:d,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=d,a=f):c=c.next=d,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(1);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);xs|=s,t.lanes=s,t.memoizedState=f}}function fS(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(se(191,i));i.call(r)}}}var Nx=new MP.Component().refs;function Am(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:zt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Qd={isMounted:function(t){return(t=t._reactInternals)?As(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Zn(),i=Mo(t),o=Yi(r,i);o.payload=e,n!=null&&(o.callback=n),e=Ro(t,o,i),e!==null&&(ni(e,t,i,r),If(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Zn(),i=Mo(t),o=Yi(r,i);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=Ro(t,o,i),e!==null&&(ni(e,t,i,r),If(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Zn(),r=Mo(t),i=Yi(n,r);i.tag=2,e!=null&&(i.callback=e),e=Ro(t,i,r),e!==null&&(ni(e,t,r,n),If(e,t,r))}};function hS(t,e,n,r,i,o,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,s):e.prototype&&e.prototype.isPureReactComponent?!mu(n,r)||!mu(i,o):!0}function Lx(t,e,n){var r=!1,i=Vo,o=e.contextType;return typeof o=="object"&&o!==null?o=Vr(o):(i=or(e)?ws:Vn.current,r=e.contextTypes,o=(r=r!=null)?Tl(t,i):Vo),e=new e(n,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Qd,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function dS(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Qd.enqueueReplaceState(e,e.state,null)}function Rm(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=Nx,Wy(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Vr(o):(o=or(e)?ws:Vn.current,i.context=Tl(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(Am(t,e,o,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Qd.enqueueReplaceState(i,i.state,null),kh(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function va(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(se(309));var r=n.stateNode}if(!r)throw Error(se(147,t));var i=r,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(s){var l=i.refs;l===Nx&&(l=i.refs={}),s===null?delete l[o]:l[o]=s},e._stringRef=o,e)}if(typeof t!="string")throw Error(se(284));if(!n._owner)throw Error(se(290,t))}return t}function qc(t,e){throw t=Object.prototype.toString.call(e),Error(se(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function pS(t){var e=t._init;return e(t._payload)}function jx(t){function e(O,m){if(t){var v=O.deletions;v===null?(O.deletions=[m],O.flags|=16):v.push(m)}}function n(O,m){if(!t)return null;for(;m!==null;)e(O,m),m=m.sibling;return null}function r(O,m){for(O=new Map;m!==null;)m.key!==null?O.set(m.key,m):O.set(m.index,m),m=m.sibling;return O}function i(O,m){return O=Io(O,m),O.index=0,O.sibling=null,O}function o(O,m,v){return O.index=v,t?(v=O.alternate,v!==null?(v=v.index,v<m?(O.flags|=2,m):v):(O.flags|=2,m)):(O.flags|=1048576,m)}function s(O){return t&&O.alternate===null&&(O.flags|=2),O}function l(O,m,v,b){return m===null||m.tag!==6?(m=eg(v,O.mode,b),m.return=O,m):(m=i(m,v),m.return=O,m)}function a(O,m,v,b){var P=v.type;return P===Js?c(O,m,v.props.children,b,v.key):m!==null&&(m.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===po&&pS(P)===m.type)?(b=i(m,v.props),b.ref=va(O,m,v),b.return=O,b):(b=Ff(v.type,v.key,v.props,null,O.mode,b),b.ref=va(O,m,v),b.return=O,b)}function u(O,m,v,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=tg(v,O.mode,b),m.return=O,m):(m=i(m,v.children||[]),m.return=O,m)}function c(O,m,v,b,P){return m===null||m.tag!==7?(m=Os(v,O.mode,b,P),m.return=O,m):(m=i(m,v),m.return=O,m)}function f(O,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=eg(""+m,O.mode,v),m.return=O,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Lc:return v=Ff(m.type,m.key,m.props,null,O.mode,v),v.ref=va(O,null,m),v.return=O,v;case Ks:return m=tg(m,O.mode,v),m.return=O,m;case po:var b=m._init;return f(O,b(m._payload),v)}if(Ma(m)||pa(m))return m=Os(m,O.mode,v,null),m.return=O,m;qc(O,m)}return null}function h(O,m,v,b){var P=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return P!==null?null:l(O,m,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Lc:return v.key===P?a(O,m,v,b):null;case Ks:return v.key===P?u(O,m,v,b):null;case po:return P=v._init,h(O,m,P(v._payload),b)}if(Ma(v)||pa(v))return P!==null?null:c(O,m,v,b,null);qc(O,v)}return null}function d(O,m,v,b,P){if(typeof b=="string"&&b!==""||typeof b=="number")return O=O.get(v)||null,l(m,O,""+b,P);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Lc:return O=O.get(b.key===null?v:b.key)||null,a(m,O,b,P);case Ks:return O=O.get(b.key===null?v:b.key)||null,u(m,O,b,P);case po:var E=b._init;return d(O,m,v,E(b._payload),P)}if(Ma(b)||pa(b))return O=O.get(v)||null,c(m,O,b,P,null);qc(m,b)}return null}function p(O,m,v,b){for(var P=null,E=null,T=m,w=m=0,k=null;T!==null&&w<v.length;w++){T.index>w?(k=T,T=null):k=T.sibling;var C=h(O,T,v[w],b);if(C===null){T===null&&(T=k);break}t&&T&&C.alternate===null&&e(O,T),m=o(C,m,w),E===null?P=C:E.sibling=C,E=C,T=k}if(w===v.length)return n(O,T),Vt&&is(O,w),P;if(T===null){for(;w<v.length;w++)T=f(O,v[w],b),T!==null&&(m=o(T,m,w),E===null?P=T:E.sibling=T,E=T);return Vt&&is(O,w),P}for(T=r(O,T);w<v.length;w++)k=d(T,O,w,v[w],b),k!==null&&(t&&k.alternate!==null&&T.delete(k.key===null?w:k.key),m=o(k,m,w),E===null?P=k:E.sibling=k,E=k);return t&&T.forEach(function(Q){return e(O,Q)}),Vt&&is(O,w),P}function g(O,m,v,b){var P=pa(v);if(typeof P!="function")throw Error(se(150));if(v=P.call(v),v==null)throw Error(se(151));for(var E=P=null,T=m,w=m=0,k=null,C=v.next();T!==null&&!C.done;w++,C=v.next()){T.index>w?(k=T,T=null):k=T.sibling;var Q=h(O,T,C.value,b);if(Q===null){T===null&&(T=k);break}t&&T&&Q.alternate===null&&e(O,T),m=o(Q,m,w),E===null?P=Q:E.sibling=Q,E=Q,T=k}if(C.done)return n(O,T),Vt&&is(O,w),P;if(T===null){for(;!C.done;w++,C=v.next())C=f(O,C.value,b),C!==null&&(m=o(C,m,w),E===null?P=C:E.sibling=C,E=C);return Vt&&is(O,w),P}for(T=r(O,T);!C.done;w++,C=v.next())C=d(T,O,w,C.value,b),C!==null&&(t&&C.alternate!==null&&T.delete(C.key===null?w:C.key),m=o(C,m,w),E===null?P=C:E.sibling=C,E=C);return t&&T.forEach(function(M){return e(O,M)}),Vt&&is(O,w),P}function y(O,m,v,b){if(typeof v=="object"&&v!==null&&v.type===Js&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Lc:e:{for(var P=v.key,E=m;E!==null;){if(E.key===P){if(P=v.type,P===Js){if(E.tag===7){n(O,E.sibling),m=i(E,v.props.children),m.return=O,O=m;break e}}else if(E.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===po&&pS(P)===E.type){n(O,E.sibling),m=i(E,v.props),m.ref=va(O,E,v),m.return=O,O=m;break e}n(O,E);break}else e(O,E);E=E.sibling}v.type===Js?(m=Os(v.props.children,O.mode,b,v.key),m.return=O,O=m):(b=Ff(v.type,v.key,v.props,null,O.mode,b),b.ref=va(O,m,v),b.return=O,O=b)}return s(O);case Ks:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(O,m.sibling),m=i(m,v.children||[]),m.return=O,O=m;break e}else{n(O,m);break}else e(O,m);m=m.sibling}m=tg(v,O.mode,b),m.return=O,O=m}return s(O);case po:return E=v._init,y(O,m,E(v._payload),b)}if(Ma(v))return p(O,m,v,b);if(pa(v))return g(O,m,v,b);qc(O,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(O,m.sibling),m=i(m,v),m.return=O,O=m):(n(O,m),m=eg(v,O.mode,b),m.return=O,O=m),s(O)):n(O,m)}return y}var Rl=jx(!0),Vx=jx(!1),ec={},_i=qo(ec),Su=qo(ec),bu=qo(ec);function hs(t){if(t===ec)throw Error(se(174));return t}function Uy(t,e){switch(Et(bu,e),Et(Su,t),Et(_i,ec),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:fm(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=fm(e,t)}Nt(_i),Et(_i,e)}function Dl(){Nt(_i),Nt(Su),Nt(bu)}function Bx(t){hs(bu.current);var e=hs(_i.current),n=fm(e,t.type);e!==n&&(Et(Su,t),Et(_i,n))}function Zy(t){Su.current===t&&(Nt(_i),Nt(Su))}var Wt=qo(0);function Ph(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var zp=[];function Yy(){for(var t=0;t<zp.length;t++)zp[t]._workInProgressVersionPrimary=null;zp.length=0}var Nf=io.ReactCurrentDispatcher,qp=io.ReactCurrentBatchConfig,Ps=0,Zt=null,fn=null,Sn=null,xh=!1,Ka=!1,wu=0,GD=0;function Dn(){throw Error(se(321))}function zy(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!ri(t[n],e[n]))return!1;return!0}function qy(t,e,n,r,i,o){if(Ps=o,Zt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Nf.current=t===null||t.memoizedState===null?eM:tM,t=n(r,i),Ka){o=0;do{if(Ka=!1,wu=0,25<=o)throw Error(se(301));o+=1,Sn=fn=null,e.updateQueue=null,Nf.current=nM,t=n(r,i)}while(Ka)}if(Nf.current=Ch,e=fn!==null&&fn.next!==null,Ps=0,Sn=fn=Zt=null,xh=!1,e)throw Error(se(300));return t}function Gy(){var t=wu!==0;return wu=0,t}function mi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Zt.memoizedState=Sn=t:Sn=Sn.next=t,Sn}function Br(){if(fn===null){var t=Zt.alternate;t=t!==null?t.memoizedState:null}else t=fn.next;var e=Sn===null?Zt.memoizedState:Sn.next;if(e!==null)Sn=e,fn=t;else{if(t===null)throw Error(se(310));fn=t,t={memoizedState:fn.memoizedState,baseState:fn.baseState,baseQueue:fn.baseQueue,queue:fn.queue,next:null},Sn===null?Zt.memoizedState=Sn=t:Sn=Sn.next=t}return Sn}function ku(t,e){return typeof e=="function"?e(t):e}function Gp(t){var e=Br(),n=e.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=t;var r=fn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((Ps&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,s=r):a=a.next=f,Zt.lanes|=c,xs|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,ri(r,e.memoizedState)||(tr=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=a,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do o=i.lane,Zt.lanes|=o,xs|=o,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Hp(t){var e=Br(),n=e.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=t(o,s.action),s=s.next;while(s!==i);ri(o,e.memoizedState)||(tr=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function Fx(){}function Xx(t,e){var n=Zt,r=Br(),i=e(),o=!ri(r.memoizedState,i);if(o&&(r.memoizedState=i,tr=!0),r=r.queue,Hy(Zx.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||Sn!==null&&Sn.memoizedState.tag&1){if(n.flags|=2048,Pu(9,Ux.bind(null,n,r,i,e),void 0,null),bn===null)throw Error(se(349));Ps&30||Wx(n,e,i)}return i}function Wx(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Zt.updateQueue,e===null?(e={lastEffect:null,stores:null},Zt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Ux(t,e,n,r){e.value=n,e.getSnapshot=r,Yx(e)&&zx(t)}function Zx(t,e,n){return n(function(){Yx(e)&&zx(t)})}function Yx(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ri(t,n)}catch{return!0}}function zx(t){var e=Ji(t,1);e!==null&&ni(e,t,1,-1)}function gS(t){var e=mi();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ku,lastRenderedState:t},e.queue=t,t=t.dispatch=JD.bind(null,Zt,t),[e.memoizedState,t]}function Pu(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Zt.updateQueue,e===null?(e={lastEffect:null,stores:null},Zt.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function qx(){return Br().memoizedState}function Lf(t,e,n,r){var i=mi();Zt.flags|=t,i.memoizedState=Pu(1|e,n,void 0,r===void 0?null:r)}function _d(t,e,n,r){var i=Br();r=r===void 0?null:r;var o=void 0;if(fn!==null){var s=fn.memoizedState;if(o=s.destroy,r!==null&&zy(r,s.deps)){i.memoizedState=Pu(e,n,o,r);return}}Zt.flags|=t,i.memoizedState=Pu(1|e,n,o,r)}function mS(t,e){return Lf(8390656,8,t,e)}function Hy(t,e){return _d(2048,8,t,e)}function Gx(t,e){return _d(4,2,t,e)}function Hx(t,e){return _d(4,4,t,e)}function Kx(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Jx(t,e,n){return n=n!=null?n.concat([t]):null,_d(4,4,Kx.bind(null,e,t),n)}function Ky(){}function eC(t,e){var n=Br();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&zy(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function tC(t,e){var n=Br();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&zy(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function nC(t,e,n){return Ps&21?(ri(n,e)||(n=ox(),Zt.lanes|=n,xs|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,tr=!0),t.memoizedState=n)}function HD(t,e){var n=St;St=n!==0&&4>n?n:4,t(!0);var r=qp.transition;qp.transition={};try{t(!1),e()}finally{St=n,qp.transition=r}}function rC(){return Br().memoizedState}function KD(t,e,n){var r=Mo(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},iC(t))oC(e,n);else if(n=Mx(t,e,n,r),n!==null){var i=Zn();ni(n,t,r,i),sC(n,e,r)}}function JD(t,e,n){var r=Mo(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(iC(t))oC(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,ri(l,s)){var a=e.interleaved;a===null?(i.next=i,Xy(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=Mx(t,e,i,r),n!==null&&(i=Zn(),ni(n,t,r,i),sC(n,e,r))}}function iC(t){var e=t.alternate;return t===Zt||e!==null&&e===Zt}function oC(t,e){Ka=xh=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function sC(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,_y(t,n)}}var Ch={readContext:Vr,useCallback:Dn,useContext:Dn,useEffect:Dn,useImperativeHandle:Dn,useInsertionEffect:Dn,useLayoutEffect:Dn,useMemo:Dn,useReducer:Dn,useRef:Dn,useState:Dn,useDebugValue:Dn,useDeferredValue:Dn,useTransition:Dn,useMutableSource:Dn,useSyncExternalStore:Dn,useId:Dn,unstable_isNewReconciler:!1},eM={readContext:Vr,useCallback:function(t,e){return mi().memoizedState=[t,e===void 0?null:e],t},useContext:Vr,useEffect:mS,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Lf(4194308,4,Kx.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Lf(4194308,4,t,e)},useInsertionEffect:function(t,e){return Lf(4,2,t,e)},useMemo:function(t,e){var n=mi();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=mi();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=KD.bind(null,Zt,t),[r.memoizedState,t]},useRef:function(t){var e=mi();return t={current:t},e.memoizedState=t},useState:gS,useDebugValue:Ky,useDeferredValue:function(t){return mi().memoizedState=t},useTransition:function(){var t=gS(!1),e=t[0];return t=HD.bind(null,t[1]),mi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Zt,i=mi();if(Vt){if(n===void 0)throw Error(se(407));n=n()}else{if(n=e(),bn===null)throw Error(se(349));Ps&30||Wx(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,mS(Zx.bind(null,r,o,t),[t]),r.flags|=2048,Pu(9,Ux.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=mi(),e=bn.identifierPrefix;if(Vt){var n=Zi,r=Ui;n=(r&~(1<<32-ti(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=wu++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=GD++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},tM={readContext:Vr,useCallback:eC,useContext:Vr,useEffect:Hy,useImperativeHandle:Jx,useInsertionEffect:Gx,useLayoutEffect:Hx,useMemo:tC,useReducer:Gp,useRef:qx,useState:function(){return Gp(ku)},useDebugValue:Ky,useDeferredValue:function(t){var e=Br();return nC(e,fn.memoizedState,t)},useTransition:function(){var t=Gp(ku)[0],e=Br().memoizedState;return[t,e]},useMutableSource:Fx,useSyncExternalStore:Xx,useId:rC,unstable_isNewReconciler:!1},nM={readContext:Vr,useCallback:eC,useContext:Vr,useEffect:Hy,useImperativeHandle:Jx,useInsertionEffect:Gx,useLayoutEffect:Hx,useMemo:tC,useReducer:Hp,useRef:qx,useState:function(){return Hp(ku)},useDebugValue:Ky,useDeferredValue:function(t){var e=Br();return fn===null?e.memoizedState=t:nC(e,fn.memoizedState,t)},useTransition:function(){var t=Hp(ku)[0],e=Br().memoizedState;return[t,e]},useMutableSource:Fx,useSyncExternalStore:Xx,useId:rC,unstable_isNewReconciler:!1};function Ml(t,e){try{var n="",r=e;do n+=$R(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:t,source:e,stack:i,digest:null}}function Kp(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Dm(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var rM=typeof WeakMap=="function"?WeakMap:Map;function lC(t,e,n){n=Yi(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Qh||(Qh=!0,Wm=r),Dm(t,e)},n}function aC(t,e,n){n=Yi(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Dm(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Dm(t,e),typeof r!="function"&&(Do===null?Do=new Set([this]):Do.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function OS(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new rM;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=OM.bind(null,t,e,n),e.then(t,t))}function yS(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function vS(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Yi(-1,1),e.tag=2,Ro(n,e,1))),n.lanes|=1),t)}var iM=io.ReactCurrentOwner,tr=!1;function Xn(t,e,n,r){e.child=t===null?Vx(e,null,n,r):Rl(e,t.child,n,r)}function SS(t,e,n,r,i){n=n.render;var o=e.ref;return vl(e,i),r=qy(t,e,n,r,o,i),n=Gy(),t!==null&&!tr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,eo(t,e,i)):(Vt&&n&&Ny(e),e.flags|=1,Xn(t,e,r,i),e.child)}function bS(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!sv(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,uC(t,e,o,r,i)):(t=Ff(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:mu,n(s,r)&&t.ref===e.ref)return eo(t,e,i)}return e.flags|=1,t=Io(o,r),t.ref=e.ref,t.return=e,e.child=t}function uC(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(mu(o,r)&&t.ref===e.ref)if(tr=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(tr=!0);else return e.lanes=t.lanes,eo(t,e,i)}return Mm(t,e,n,r,i)}function cC(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(ul,hr),hr|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Et(ul,hr),hr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Et(ul,hr),hr|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,Et(ul,hr),hr|=r;return Xn(t,e,i,n),e.child}function fC(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Mm(t,e,n,r,i){var o=or(n)?ws:Vn.current;return o=Tl(e,o),vl(e,i),n=qy(t,e,n,r,o,i),r=Gy(),t!==null&&!tr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,eo(t,e,i)):(Vt&&r&&Ny(e),e.flags|=1,Xn(t,e,n,i),e.child)}function wS(t,e,n,r,i){if(or(n)){var o=!0;yh(e)}else o=!1;if(vl(e,i),e.stateNode===null)jf(t,e),Lx(e,n,r),Rm(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,l=e.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Vr(u):(u=or(n)?ws:Vn.current,u=Tl(e,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&dS(e,s,r,u),go=!1;var h=e.memoizedState;s.state=h,kh(e,r,s,i),a=e.memoizedState,l!==r||h!==a||ir.current||go?(typeof c=="function"&&(Am(e,n,c,r),a=e.memoizedState),(l=go||hS(e,n,l,r,h,a,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,Ix(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:Gr(e.type,l),s.props=u,f=e.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Vr(a):(a=or(n)?ws:Vn.current,a=Tl(e,a));var d=n.getDerivedStateFromProps;(c=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||h!==a)&&dS(e,s,r,a),go=!1,h=e.memoizedState,s.state=h,kh(e,r,s,i);var p=e.memoizedState;l!==f||h!==p||ir.current||go?(typeof d=="function"&&(Am(e,n,d,r),p=e.memoizedState),(u=go||hS(e,n,u,r,h,p,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,a)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),s.props=r,s.state=p,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return Im(t,e,n,r,o,i)}function Im(t,e,n,r,i,o){fC(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&lS(e,n,!1),eo(t,e,o);r=e.stateNode,iM.current=e;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=Rl(e,t.child,null,o),e.child=Rl(e,null,l,o)):Xn(t,e,l,o),e.memoizedState=r.state,i&&lS(e,n,!0),e.child}function hC(t){var e=t.stateNode;e.pendingContext?sS(t,e.pendingContext,e.pendingContext!==e.context):e.context&&sS(t,e.context,!1),Uy(t,e.containerInfo)}function kS(t,e,n,r,i){return Al(),jy(i),e.flags|=256,Xn(t,e,n,r),e.child}var Nm={dehydrated:null,treeContext:null,retryLane:0};function Lm(t){return{baseLanes:t,cachePool:null,transitions:null}}function dC(t,e,n){var r=e.pendingProps,i=Wt.current,o=!1,s=(e.flags&128)!==0,l;if((l=s)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Et(Wt,i&1),t===null)return $m(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Ad(s,r,0,null),t=Os(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Lm(n),e.memoizedState=Nm,t):Jy(e,s));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return oM(t,e,s,r,l,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=Io(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Io(l,o):(o=Os(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?Lm(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=Nm,r}return o=t.child,t=o.sibling,r=Io(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Jy(t,e){return e=Ad({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Gc(t,e,n,r){return r!==null&&jy(r),Rl(e,t.child,null,n),t=Jy(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function oM(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=Kp(Error(se(422))),Gc(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=Ad({mode:"visible",children:r.children},i,0,null),o=Os(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&Rl(e,t.child,null,s),e.child.memoizedState=Lm(s),e.memoizedState=Nm,o);if(!(e.mode&1))return Gc(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(se(419)),r=Kp(o,r,void 0),Gc(t,e,s,r)}if(l=(s&t.childLanes)!==0,tr||l){if(r=bn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ji(t,i),ni(r,t,i,-1))}return ov(),r=Kp(Error(se(421))),Gc(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=yM.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,mr=Ao(i.nextSibling),yr=e,Vt=!0,Kr=null,t!==null&&($r[Tr++]=Ui,$r[Tr++]=Zi,$r[Tr++]=ks,Ui=t.id,Zi=t.overflow,ks=e),e=Jy(e,r.children),e.flags|=4096,e)}function PS(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Tm(t.return,e,n)}function Jp(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function pC(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Xn(t,e,r.children,n),r=Wt.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&PS(t,n,e);else if(t.tag===19)PS(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Et(Wt,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Ph(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Jp(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Ph(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Jp(e,!0,n,null,o);break;case"together":Jp(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function jf(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function eo(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),xs|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(se(153));if(e.child!==null){for(t=e.child,n=Io(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Io(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function sM(t,e,n){switch(e.tag){case 3:hC(e),Al();break;case 5:Bx(e);break;case 1:or(e.type)&&yh(e);break;case 4:Uy(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Et(bh,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Et(Wt,Wt.current&1),e.flags|=128,null):n&e.child.childLanes?dC(t,e,n):(Et(Wt,Wt.current&1),t=eo(t,e,n),t!==null?t.sibling:null);Et(Wt,Wt.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return pC(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Et(Wt,Wt.current),r)break;return null;case 22:case 23:return e.lanes=0,cC(t,e,n)}return eo(t,e,n)}var gC,jm,mC,OC;gC=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};jm=function(){};mC=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,hs(_i.current);var o=null;switch(n){case"input":i=lm(t,i),r=lm(t,r),o=[];break;case"select":i=zt({},i,{value:void 0}),r=zt({},r,{value:void 0}),o=[];break;case"textarea":i=cm(t,i),r=cm(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=mh)}hm(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(uu.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(uu.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Dt("scroll",t),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};OC=function(t,e,n,r){n!==r&&(e.flags|=4)};function Sa(t,e){if(!Vt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Mn(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function lM(t,e,n){var r=e.pendingProps;switch(Ly(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mn(e),null;case 1:return or(e.type)&&Oh(),Mn(e),null;case 3:return r=e.stateNode,Dl(),Nt(ir),Nt(Vn),Yy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(zc(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Kr!==null&&(Ym(Kr),Kr=null))),jm(t,e),Mn(e),null;case 5:Zy(e);var i=hs(bu.current);if(n=e.type,t!==null&&e.stateNode!=null)mC(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(se(166));return Mn(e),null}if(t=hs(_i.current),zc(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[Si]=e,r[vu]=o,t=(e.mode&1)!==0,n){case"dialog":Dt("cancel",r),Dt("close",r);break;case"iframe":case"object":case"embed":Dt("load",r);break;case"video":case"audio":for(i=0;i<Na.length;i++)Dt(Na[i],r);break;case"source":Dt("error",r);break;case"img":case"image":case"link":Dt("error",r),Dt("load",r);break;case"details":Dt("toggle",r);break;case"input":R1(r,o),Dt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Dt("invalid",r);break;case"textarea":M1(r,o),Dt("invalid",r)}hm(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Yc(r.textContent,l,t),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Yc(r.textContent,l,t),i=["children",""+l]):uu.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Dt("scroll",r)}switch(n){case"input":jc(r),D1(r,o,!0);break;case"textarea":jc(r),I1(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=mh)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=WP(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[Si]=e,t[vu]=r,gC(t,e,!1,!1),e.stateNode=t;e:{switch(s=dm(n,r),n){case"dialog":Dt("cancel",t),Dt("close",t),i=r;break;case"iframe":case"object":case"embed":Dt("load",t),i=r;break;case"video":case"audio":for(i=0;i<Na.length;i++)Dt(Na[i],t);i=r;break;case"source":Dt("error",t),i=r;break;case"img":case"image":case"link":Dt("error",t),Dt("load",t),i=r;break;case"details":Dt("toggle",t),i=r;break;case"input":R1(t,r),i=lm(t,r),Dt("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=zt({},r,{value:void 0}),Dt("invalid",t);break;case"textarea":M1(t,r),i=cm(t,r),Dt("invalid",t);break;default:i=r}hm(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?YP(t,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&UP(t,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&cu(t,a):typeof a=="number"&&cu(t,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(uu.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Dt("scroll",t):a!=null&&ky(t,o,a,s))}switch(n){case"input":jc(t),D1(t,r,!1);break;case"textarea":jc(t),I1(t);break;case"option":r.value!=null&&t.setAttribute("value",""+jo(r.value));break;case"select":t.multiple=!!r.multiple,o=r.value,o!=null?gl(t,!!r.multiple,o,!1):r.defaultValue!=null&&gl(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=mh)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Mn(e),null;case 6:if(t&&e.stateNode!=null)OC(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(se(166));if(n=hs(bu.current),hs(_i.current),zc(e)){if(r=e.stateNode,n=e.memoizedProps,r[Si]=e,(o=r.nodeValue!==n)&&(t=yr,t!==null))switch(t.tag){case 3:Yc(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Yc(r.nodeValue,n,(t.mode&1)!==0)}o&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Si]=e,e.stateNode=r}return Mn(e),null;case 13:if(Nt(Wt),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Vt&&mr!==null&&e.mode&1&&!(e.flags&128))Dx(),Al(),e.flags|=98560,o=!1;else if(o=zc(e),r!==null&&r.dehydrated!==null){if(t===null){if(!o)throw Error(se(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(se(317));o[Si]=e}else Al(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Mn(e),o=!1}else Kr!==null&&(Ym(Kr),Kr=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Wt.current&1?pn===0&&(pn=3):ov())),e.updateQueue!==null&&(e.flags|=4),Mn(e),null);case 4:return Dl(),jm(t,e),t===null&&Ou(e.stateNode.containerInfo),Mn(e),null;case 10:return Fy(e.type._context),Mn(e),null;case 17:return or(e.type)&&Oh(),Mn(e),null;case 19:if(Nt(Wt),o=e.memoizedState,o===null)return Mn(e),null;if(r=(e.flags&128)!==0,s=o.rendering,s===null)if(r)Sa(o,!1);else{if(pn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=Ph(t),s!==null){for(e.flags|=128,Sa(o,!1),r=s.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)o=n,t=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Et(Wt,Wt.current&1|2),e.child}t=t.sibling}o.tail!==null&&rn()>Il&&(e.flags|=128,r=!0,Sa(o,!1),e.lanes=4194304)}else{if(!r)if(t=Ph(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Sa(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Vt)return Mn(e),null}else 2*rn()-o.renderingStartTime>Il&&n!==1073741824&&(e.flags|=128,r=!0,Sa(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=rn(),e.sibling=null,n=Wt.current,Et(Wt,r?n&1|2:n&1),e):(Mn(e),null);case 22:case 23:return iv(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?hr&1073741824&&(Mn(e),e.subtreeFlags&6&&(e.flags|=8192)):Mn(e),null;case 24:return null;case 25:return null}throw Error(se(156,e.tag))}function aM(t,e){switch(Ly(e),e.tag){case 1:return or(e.type)&&Oh(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Dl(),Nt(ir),Nt(Vn),Yy(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Zy(e),null;case 13:if(Nt(Wt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(se(340));Al()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Nt(Wt),null;case 4:return Dl(),null;case 10:return Fy(e.type._context),null;case 22:case 23:return iv(),null;case 24:return null;default:return null}}var Hc=!1,Ln=!1,uM=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function al(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Kt(t,e,r)}else n.current=null}function Vm(t,e,n){try{n()}catch(r){Kt(t,e,r)}}var xS=!1;function cM(t,e){if(km=dh,t=bx(),Iy(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===n&&++u===i&&(l=s),h===o&&++c===r&&(a=s),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pm={focusedElem:t,selectionRange:n},dh=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,y=p.memoizedState,O=e.stateNode,m=O.getSnapshotBeforeUpdate(e.elementType===e.type?g:Gr(e.type,g),y);O.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=e.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(b){Kt(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=xS,xS=!1,p}function Ja(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Vm(e,n,o)}i=i.next}while(i!==r)}}function $d(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Bm(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function yC(t){var e=t.alternate;e!==null&&(t.alternate=null,yC(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Si],delete e[vu],delete e[Em],delete e[ZD],delete e[YD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function vC(t){return t.tag===5||t.tag===3||t.tag===4}function CS(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||vC(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Fm(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=mh));else if(r!==4&&(t=t.child,t!==null))for(Fm(t,e,n),t=t.sibling;t!==null;)Fm(t,e,n),t=t.sibling}function Xm(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Xm(t,e,n),t=t.sibling;t!==null;)Xm(t,e,n),t=t.sibling}var kn=null,Hr=!1;function fo(t,e,n){for(n=n.child;n!==null;)SC(t,e,n),n=n.sibling}function SC(t,e,n){if(Qi&&typeof Qi.onCommitFiberUnmount=="function")try{Qi.onCommitFiberUnmount(wd,n)}catch{}switch(n.tag){case 5:Ln||al(n,e);case 6:var r=kn,i=Hr;kn=null,fo(t,e,n),kn=r,Hr=i,kn!==null&&(Hr?(t=kn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):kn.removeChild(n.stateNode));break;case 18:kn!==null&&(Hr?(t=kn,n=n.stateNode,t.nodeType===8?Zp(t.parentNode,n):t.nodeType===1&&Zp(t,n),pu(t)):Zp(kn,n.stateNode));break;case 4:r=kn,i=Hr,kn=n.stateNode.containerInfo,Hr=!0,fo(t,e,n),kn=r,Hr=i;break;case 0:case 11:case 14:case 15:if(!Ln&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Vm(n,e,s),i=i.next}while(i!==r)}fo(t,e,n);break;case 1:if(!Ln&&(al(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Kt(n,e,l)}fo(t,e,n);break;case 21:fo(t,e,n);break;case 22:n.mode&1?(Ln=(r=Ln)||n.memoizedState!==null,fo(t,e,n),Ln=r):fo(t,e,n);break;default:fo(t,e,n)}}function ES(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new uM),e.forEach(function(r){var i=vM.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function zr(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,s=e,l=s;e:for(;l!==null;){switch(l.tag){case 5:kn=l.stateNode,Hr=!1;break e;case 3:kn=l.stateNode.containerInfo,Hr=!0;break e;case 4:kn=l.stateNode.containerInfo,Hr=!0;break e}l=l.return}if(kn===null)throw Error(se(160));SC(o,s,i),kn=null,Hr=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Kt(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)bC(e,t),e=e.sibling}function bC(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(zr(e,t),ci(t),r&4){try{Ja(3,t,t.return),$d(3,t)}catch(g){Kt(t,t.return,g)}try{Ja(5,t,t.return)}catch(g){Kt(t,t.return,g)}}break;case 1:zr(e,t),ci(t),r&512&&n!==null&&al(n,n.return);break;case 5:if(zr(e,t),ci(t),r&512&&n!==null&&al(n,n.return),t.flags&32){var i=t.stateNode;try{cu(i,"")}catch(g){Kt(t,t.return,g)}}if(r&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,s=n!==null?n.memoizedProps:o,l=t.type,a=t.updateQueue;if(t.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&FP(i,o),dm(l,s);var u=dm(l,o);for(s=0;s<a.length;s+=2){var c=a[s],f=a[s+1];c==="style"?YP(i,f):c==="dangerouslySetInnerHTML"?UP(i,f):c==="children"?cu(i,f):ky(i,c,f,u)}switch(l){case"input":am(i,o);break;case"textarea":XP(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var d=o.value;d!=null?gl(i,!!o.multiple,d,!1):h!==!!o.multiple&&(o.defaultValue!=null?gl(i,!!o.multiple,o.defaultValue,!0):gl(i,!!o.multiple,o.multiple?[]:"",!1))}i[vu]=o}catch(g){Kt(t,t.return,g)}}break;case 6:if(zr(e,t),ci(t),r&4){if(t.stateNode===null)throw Error(se(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(g){Kt(t,t.return,g)}}break;case 3:if(zr(e,t),ci(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{pu(e.containerInfo)}catch(g){Kt(t,t.return,g)}break;case 4:zr(e,t),ci(t);break;case 13:zr(e,t),ci(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(nv=rn())),r&4&&ES(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Ln=(u=Ln)||c,zr(e,t),Ln=u):zr(e,t),ci(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(Pe=t,c=t.child;c!==null;){for(f=Pe=c;Pe!==null;){switch(h=Pe,d=h.child,h.tag){case 0:case 11:case 14:case 15:Ja(4,h,h.return);break;case 1:al(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(g){Kt(r,n,g)}}break;case 5:al(h,h.return);break;case 22:if(h.memoizedState!==null){_S(f);continue}}d!==null?(d.return=h,Pe=d):_S(f)}c=c.sibling}e:for(c=null,f=t;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,a=f.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=ZP("display",s))}catch(g){Kt(t,t.return,g)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Kt(t,t.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:zr(e,t),ci(t),r&4&&ES(t);break;case 21:break;default:zr(e,t),ci(t)}}function ci(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(vC(n)){var r=n;break e}n=n.return}throw Error(se(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(cu(i,""),r.flags&=-33);var o=CS(t);Xm(t,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=CS(t);Fm(t,l,s);break;default:throw Error(se(161))}}catch(a){Kt(t,t.return,a)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function fM(t,e,n){Pe=t,wC(t)}function wC(t,e,n){for(var r=(t.mode&1)!==0;Pe!==null;){var i=Pe,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Hc;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||Ln;l=Hc;var u=Ln;if(Hc=s,(Ln=a)&&!u)for(Pe=i;Pe!==null;)s=Pe,a=s.child,s.tag===22&&s.memoizedState!==null?$S(i):a!==null?(a.return=s,Pe=a):$S(i);for(;o!==null;)Pe=o,wC(o),o=o.sibling;Pe=i,Hc=l,Ln=u}QS(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Pe=o):QS(t)}}function QS(t){for(;Pe!==null;){var e=Pe;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ln||$d(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Ln)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Gr(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&fS(e,o,r);break;case 3:var s=e.updateQueue;if(s!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}fS(e,s,n)}break;case 5:var l=e.stateNode;if(n===null&&e.flags&4){n=l;var a=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&pu(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(se(163))}Ln||e.flags&512&&Bm(e)}catch(h){Kt(e,e.return,h)}}if(e===t){Pe=null;break}if(n=e.sibling,n!==null){n.return=e.return,Pe=n;break}Pe=e.return}}function _S(t){for(;Pe!==null;){var e=Pe;if(e===t){Pe=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Pe=n;break}Pe=e.return}}function $S(t){for(;Pe!==null;){var e=Pe;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{$d(4,e)}catch(a){Kt(e,n,a)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(a){Kt(e,i,a)}}var o=e.return;try{Bm(e)}catch(a){Kt(e,o,a)}break;case 5:var s=e.return;try{Bm(e)}catch(a){Kt(e,s,a)}}}catch(a){Kt(e,e.return,a)}if(e===t){Pe=null;break}var l=e.sibling;if(l!==null){l.return=e.return,Pe=l;break}Pe=e.return}}var hM=Math.ceil,Eh=io.ReactCurrentDispatcher,ev=io.ReactCurrentOwner,Nr=io.ReactCurrentBatchConfig,dt=0,bn=null,ln=null,Qn=0,hr=0,ul=qo(0),pn=0,xu=null,xs=0,Td=0,tv=0,eu=null,Jn=null,nv=0,Il=1/0,Fi=null,Qh=!1,Wm=null,Do=null,Kc=!1,Po=null,_h=0,tu=0,Um=null,Vf=-1,Bf=0;function Zn(){return dt&6?rn():Vf!==-1?Vf:Vf=rn()}function Mo(t){return t.mode&1?dt&2&&Qn!==0?Qn&-Qn:qD.transition!==null?(Bf===0&&(Bf=ox()),Bf):(t=St,t!==0||(t=window.event,t=t===void 0?16:hx(t.type)),t):1}function ni(t,e,n,r){if(50<tu)throw tu=0,Um=null,Error(se(185));Hu(t,n,r),(!(dt&2)||t!==bn)&&(t===bn&&(!(dt&2)&&(Td|=n),pn===4&&So(t,Qn)),sr(t,r),n===1&&dt===0&&!(e.mode&1)&&(Il=rn()+500,Ed&&Go()))}function sr(t,e){var n=t.callbackNode;qR(t,e);var r=hh(t,t===bn?Qn:0);if(r===0)n!==null&&j1(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&j1(n),e===1)t.tag===0?zD(TS.bind(null,t)):Tx(TS.bind(null,t)),WD(function(){!(dt&6)&&Go()}),n=null;else{switch(sx(r)){case 1:n=Qy;break;case 4:n=rx;break;case 16:n=fh;break;case 536870912:n=ix;break;default:n=fh}n=$C(n,kC.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function kC(t,e){if(Vf=-1,Bf=0,dt&6)throw Error(se(327));var n=t.callbackNode;if(Sl()&&t.callbackNode!==n)return null;var r=hh(t,t===bn?Qn:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=$h(t,r);else{e=r;var i=dt;dt|=2;var o=xC();(bn!==t||Qn!==e)&&(Fi=null,Il=rn()+500,ms(t,e));do try{gM();break}catch(l){PC(t,l)}while(1);By(),Eh.current=o,dt=i,ln!==null?e=0:(bn=null,Qn=0,e=pn)}if(e!==0){if(e===2&&(i=ym(t),i!==0&&(r=i,e=Zm(t,i))),e===1)throw n=xu,ms(t,0),So(t,r),sr(t,rn()),n;if(e===6)So(t,r);else{if(i=t.current.alternate,!(r&30)&&!dM(i)&&(e=$h(t,r),e===2&&(o=ym(t),o!==0&&(r=o,e=Zm(t,o))),e===1))throw n=xu,ms(t,0),So(t,r),sr(t,rn()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(se(345));case 2:os(t,Jn,Fi);break;case 3:if(So(t,r),(r&130023424)===r&&(e=nv+500-rn(),10<e)){if(hh(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Zn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Cm(os.bind(null,t,Jn,Fi),e);break}os(t,Jn,Fi);break;case 4:if(So(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-ti(r);o=1<<s,s=e[s],s>i&&(i=s),r&=~o}if(r=i,r=rn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hM(r/1960))-r,10<r){t.timeoutHandle=Cm(os.bind(null,t,Jn,Fi),r);break}os(t,Jn,Fi);break;case 5:os(t,Jn,Fi);break;default:throw Error(se(329))}}}return sr(t,rn()),t.callbackNode===n?kC.bind(null,t):null}function Zm(t,e){var n=eu;return t.current.memoizedState.isDehydrated&&(ms(t,e).flags|=256),t=$h(t,e),t!==2&&(e=Jn,Jn=n,e!==null&&Ym(e)),t}function Ym(t){Jn===null?Jn=t:Jn.push.apply(Jn,t)}function dM(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ri(o(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function So(t,e){for(e&=~tv,e&=~Td,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-ti(e),r=1<<n;t[n]=-1,e&=~r}}function TS(t){if(dt&6)throw Error(se(327));Sl();var e=hh(t,0);if(!(e&1))return sr(t,rn()),null;var n=$h(t,e);if(t.tag!==0&&n===2){var r=ym(t);r!==0&&(e=r,n=Zm(t,r))}if(n===1)throw n=xu,ms(t,0),So(t,e),sr(t,rn()),n;if(n===6)throw Error(se(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,os(t,Jn,Fi),sr(t,rn()),null}function rv(t,e){var n=dt;dt|=1;try{return t(e)}finally{dt=n,dt===0&&(Il=rn()+500,Ed&&Go())}}function Cs(t){Po!==null&&Po.tag===0&&!(dt&6)&&Sl();var e=dt;dt|=1;var n=Nr.transition,r=St;try{if(Nr.transition=null,St=1,t)return t()}finally{St=r,Nr.transition=n,dt=e,!(dt&6)&&Go()}}function iv(){hr=ul.current,Nt(ul)}function ms(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,XD(n)),ln!==null)for(n=ln.return;n!==null;){var r=n;switch(Ly(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Oh();break;case 3:Dl(),Nt(ir),Nt(Vn),Yy();break;case 5:Zy(r);break;case 4:Dl();break;case 13:Nt(Wt);break;case 19:Nt(Wt);break;case 10:Fy(r.type._context);break;case 22:case 23:iv()}n=n.return}if(bn=t,ln=t=Io(t.current,null),Qn=hr=e,pn=0,xu=null,tv=Td=xs=0,Jn=eu=null,fs!==null){for(e=0;e<fs.length;e++)if(n=fs[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}fs=null}return t}function PC(t,e){do{var n=ln;try{if(By(),Nf.current=Ch,xh){for(var r=Zt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}xh=!1}if(Ps=0,Sn=fn=Zt=null,Ka=!1,wu=0,ev.current=null,n===null||n.return===null){pn=1,xu=e,ln=null;break}e:{var o=t,s=n.return,l=n,a=e;if(e=Qn,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=yS(s);if(d!==null){d.flags&=-257,vS(d,s,l,o,e),d.mode&1&&OS(o,u,e),e=d,a=u;var p=e.updateQueue;if(p===null){var g=new Set;g.add(a),e.updateQueue=g}else p.add(a);break e}else{if(!(e&1)){OS(o,u,e),ov();break e}a=Error(se(426))}}else if(Vt&&l.mode&1){var y=yS(s);if(y!==null){!(y.flags&65536)&&(y.flags|=256),vS(y,s,l,o,e),jy(Ml(a,l));break e}}o=a=Ml(a,l),pn!==4&&(pn=2),eu===null?eu=[o]:eu.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var O=lC(o,a,e);cS(o,O);break e;case 1:l=a;var m=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Do===null||!Do.has(v)))){o.flags|=65536,e&=-e,o.lanes|=e;var b=aC(o,l,e);cS(o,b);break e}}o=o.return}while(o!==null)}EC(n)}catch(P){e=P,ln===n&&n!==null&&(ln=n=n.return);continue}break}while(1)}function xC(){var t=Eh.current;return Eh.current=Ch,t===null?Ch:t}function ov(){(pn===0||pn===3||pn===2)&&(pn=4),bn===null||!(xs&268435455)&&!(Td&268435455)||So(bn,Qn)}function $h(t,e){var n=dt;dt|=2;var r=xC();(bn!==t||Qn!==e)&&(Fi=null,ms(t,e));do try{pM();break}catch(i){PC(t,i)}while(1);if(By(),dt=n,Eh.current=r,ln!==null)throw Error(se(261));return bn=null,Qn=0,pn}function pM(){for(;ln!==null;)CC(ln)}function gM(){for(;ln!==null&&!VR();)CC(ln)}function CC(t){var e=_C(t.alternate,t,hr);t.memoizedProps=t.pendingProps,e===null?EC(t):ln=e,ev.current=null}function EC(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=aM(n,e),n!==null){n.flags&=32767,ln=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{pn=6,ln=null;return}}else if(n=lM(n,e,hr),n!==null){ln=n;return}if(e=e.sibling,e!==null){ln=e;return}ln=e=t}while(e!==null);pn===0&&(pn=5)}function os(t,e,n){var r=St,i=Nr.transition;try{Nr.transition=null,St=1,mM(t,e,n,r)}finally{Nr.transition=i,St=r}return null}function mM(t,e,n,r){do Sl();while(Po!==null);if(dt&6)throw Error(se(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(se(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(GR(t,o),t===bn&&(ln=bn=null,Qn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Kc||(Kc=!0,$C(fh,function(){return Sl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Nr.transition,Nr.transition=null;var s=St;St=1;var l=dt;dt|=4,ev.current=null,cM(t,n),bC(n,t),ID(Pm),dh=!!km,Pm=km=null,t.current=n,fM(n),BR(),dt=l,St=s,Nr.transition=o}else t.current=n;if(Kc&&(Kc=!1,Po=t,_h=i),o=t.pendingLanes,o===0&&(Do=null),WR(n.stateNode),sr(t,rn()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Qh)throw Qh=!1,t=Wm,Wm=null,t;return _h&1&&t.tag!==0&&Sl(),o=t.pendingLanes,o&1?t===Um?tu++:(tu=0,Um=t):tu=0,Go(),null}function Sl(){if(Po!==null){var t=sx(_h),e=Nr.transition,n=St;try{if(Nr.transition=null,St=16>t?16:t,Po===null)var r=!1;else{if(t=Po,Po=null,_h=0,dt&6)throw Error(se(331));var i=dt;for(dt|=4,Pe=t.current;Pe!==null;){var o=Pe,s=o.child;if(Pe.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(Pe=u;Pe!==null;){var c=Pe;switch(c.tag){case 0:case 11:case 15:Ja(8,c,o)}var f=c.child;if(f!==null)f.return=c,Pe=f;else for(;Pe!==null;){c=Pe;var h=c.sibling,d=c.return;if(yC(c),c===u){Pe=null;break}if(h!==null){h.return=d,Pe=h;break}Pe=d}}}var p=o.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}Pe=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Pe=s;else e:for(;Pe!==null;){if(o=Pe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ja(9,o,o.return)}var O=o.sibling;if(O!==null){O.return=o.return,Pe=O;break e}Pe=o.return}}var m=t.current;for(Pe=m;Pe!==null;){s=Pe;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,Pe=v;else e:for(s=m;Pe!==null;){if(l=Pe,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:$d(9,l)}}catch(P){Kt(l,l.return,P)}if(l===s){Pe=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,Pe=b;break e}Pe=l.return}}if(dt=i,Go(),Qi&&typeof Qi.onPostCommitFiberRoot=="function")try{Qi.onPostCommitFiberRoot(wd,t)}catch{}r=!0}return r}finally{St=n,Nr.transition=e}}return!1}function AS(t,e,n){e=Ml(n,e),e=lC(t,e,1),t=Ro(t,e,1),e=Zn(),t!==null&&(Hu(t,1,e),sr(t,e))}function Kt(t,e,n){if(t.tag===3)AS(t,t,n);else for(;e!==null;){if(e.tag===3){AS(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Do===null||!Do.has(r))){t=Ml(n,t),t=aC(e,t,1),e=Ro(e,t,1),t=Zn(),e!==null&&(Hu(e,1,t),sr(e,t));break}}e=e.return}}function OM(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Zn(),t.pingedLanes|=t.suspendedLanes&n,bn===t&&(Qn&n)===n&&(pn===4||pn===3&&(Qn&130023424)===Qn&&500>rn()-nv?ms(t,0):tv|=n),sr(t,e)}function QC(t,e){e===0&&(t.mode&1?(e=Fc,Fc<<=1,!(Fc&130023424)&&(Fc=4194304)):e=1);var n=Zn();t=Ji(t,e),t!==null&&(Hu(t,e,n),sr(t,n))}function yM(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),QC(t,n)}function vM(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(se(314))}r!==null&&r.delete(e),QC(t,n)}var _C;_C=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ir.current)tr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return tr=!1,sM(t,e,n);tr=!!(t.flags&131072)}else tr=!1,Vt&&e.flags&1048576&&Ax(e,Sh,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;jf(t,e),t=e.pendingProps;var i=Tl(e,Vn.current);vl(e,n),i=qy(null,e,r,t,i,n);var o=Gy();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,or(r)?(o=!0,yh(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Wy(e),i.updater=Qd,e.stateNode=i,i._reactInternals=e,Rm(e,r,t,n),e=Im(null,e,r,!0,o,n)):(e.tag=0,Vt&&o&&Ny(e),Xn(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(jf(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=bM(r),t=Gr(r,t),i){case 0:e=Mm(null,e,r,t,n);break e;case 1:e=wS(null,e,r,t,n);break e;case 11:e=SS(null,e,r,t,n);break e;case 14:e=bS(null,e,r,Gr(r.type,t),n);break e}throw Error(se(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gr(r,i),Mm(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gr(r,i),wS(t,e,r,i,n);case 3:e:{if(hC(e),t===null)throw Error(se(387));r=e.pendingProps,o=e.memoizedState,i=o.element,Ix(t,e),kh(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Ml(Error(se(423)),e),e=kS(t,e,r,n,i);break e}else if(r!==i){i=Ml(Error(se(424)),e),e=kS(t,e,r,n,i);break e}else for(mr=Ao(e.stateNode.containerInfo.firstChild),yr=e,Vt=!0,Kr=null,n=Vx(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Al(),r===i){e=eo(t,e,n);break e}Xn(t,e,r,n)}e=e.child}return e;case 5:return Bx(e),t===null&&$m(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,xm(r,i)?s=null:o!==null&&xm(r,o)&&(e.flags|=32),fC(t,e),Xn(t,e,s,n),e.child;case 6:return t===null&&$m(e),null;case 13:return dC(t,e,n);case 4:return Uy(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Rl(e,null,r,n):Xn(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gr(r,i),SS(t,e,r,i,n);case 7:return Xn(t,e,e.pendingProps,n),e.child;case 8:return Xn(t,e,e.pendingProps.children,n),e.child;case 12:return Xn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Et(bh,r._currentValue),r._currentValue=s,o!==null)if(ri(o.value,s)){if(o.children===i.children&&!ir.current){e=eo(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Yi(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Tm(o.return,n,e),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(se(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Tm(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Xn(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,vl(e,n),i=Vr(i),r=r(i),e.flags|=1,Xn(t,e,r,n),e.child;case 14:return r=e.type,i=Gr(r,e.pendingProps),i=Gr(r.type,i),bS(t,e,r,i,n);case 15:return uC(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gr(r,i),jf(t,e),e.tag=1,or(r)?(t=!0,yh(e)):t=!1,vl(e,n),Lx(e,r,i),Rm(e,r,i,n),Im(null,e,r,!0,t,n);case 19:return pC(t,e,n);case 22:return cC(t,e,n)}throw Error(se(156,e.tag))};function $C(t,e){return nx(t,e)}function SM(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rr(t,e,n,r){return new SM(t,e,n,r)}function sv(t){return t=t.prototype,!(!t||!t.isReactComponent)}function bM(t){if(typeof t=="function")return sv(t)?1:0;if(t!=null){if(t=t.$$typeof,t===xy)return 11;if(t===Cy)return 14}return 2}function Io(t,e){var n=t.alternate;return n===null?(n=Rr(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ff(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")sv(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Js:return Os(n.children,i,o,e);case Py:s=8,i|=8;break;case rm:return t=Rr(12,n,e,i|2),t.elementType=rm,t.lanes=o,t;case im:return t=Rr(13,n,e,i),t.elementType=im,t.lanes=o,t;case om:return t=Rr(19,n,e,i),t.elementType=om,t.lanes=o,t;case jP:return Ad(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case NP:s=10;break e;case LP:s=9;break e;case xy:s=11;break e;case Cy:s=14;break e;case po:s=16,r=null;break e}throw Error(se(130,t==null?t:typeof t,""))}return e=Rr(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Os(t,e,n,r){return t=Rr(7,t,r,e),t.lanes=n,t}function Ad(t,e,n,r){return t=Rr(22,t,r,e),t.elementType=jP,t.lanes=n,t.stateNode={isHidden:!1},t}function eg(t,e,n){return t=Rr(6,t,null,e),t.lanes=n,t}function tg(t,e,n){return e=Rr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function wM(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mp(0),this.expirationTimes=Mp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mp(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function lv(t,e,n,r,i,o,s,l,a){return t=new wM(t,e,n,l,a),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Rr(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wy(o),t}function kM(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ks,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function TC(t){if(!t)return Vo;t=t._reactInternals;e:{if(As(t)!==t||t.tag!==1)throw Error(se(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(or(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(se(171))}if(t.tag===1){var n=t.type;if(or(n))return $x(t,n,e)}return e}function AC(t,e,n,r,i,o,s,l,a){return t=lv(n,r,!0,t,i,o,s,l,a),t.context=TC(null),n=t.current,r=Zn(),i=Mo(n),o=Yi(r,i),o.callback=e??null,Ro(n,o,i),t.current.lanes=i,Hu(t,i,r),sr(t,r),t}function Rd(t,e,n,r){var i=e.current,o=Zn(),s=Mo(i);return n=TC(n),e.context===null?e.context=n:e.pendingContext=n,e=Yi(o,s),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Ro(i,e,s),t!==null&&(ni(t,i,s,o),If(t,i,s)),s}function Th(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function RS(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function av(t,e){RS(t,e),(t=t.alternate)&&RS(t,e)}function PM(){return null}var RC=typeof reportError=="function"?reportError:function(t){console.error(t)};function uv(t){this._internalRoot=t}Dd.prototype.render=uv.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(se(409));Rd(t,e,null,null)};Dd.prototype.unmount=uv.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Cs(function(){Rd(null,t,null,null)}),e[Ki]=null}};function Dd(t){this._internalRoot=t}Dd.prototype.unstable_scheduleHydration=function(t){if(t){var e=ux();t={blockedOn:null,target:t,priority:e};for(var n=0;n<vo.length&&e!==0&&e<vo[n].priority;n++);vo.splice(n,0,t),n===0&&fx(t)}};function cv(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Md(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function DS(){}function xM(t,e,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Th(s);o.call(u)}}var s=AC(e,r,t,0,null,!1,!1,"",DS);return t._reactRootContainer=s,t[Ki]=s.current,Ou(t.nodeType===8?t.parentNode:t),Cs(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=Th(a);l.call(u)}}var a=lv(t,0,!1,null,null,!1,!1,"",DS);return t._reactRootContainer=a,t[Ki]=a.current,Ou(t.nodeType===8?t.parentNode:t),Cs(function(){Rd(e,a,n,r)}),a}function Id(t,e,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=Th(s);l.call(a)}}Rd(e,s,t,i)}else s=xM(n,e,t,i,r);return Th(s)}lx=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Ia(e.pendingLanes);n!==0&&(_y(e,n|1),sr(e,rn()),!(dt&6)&&(Il=rn()+500,Go()))}break;case 13:Cs(function(){var r=Ji(t,1);if(r!==null){var i=Zn();ni(r,t,1,i)}}),av(t,1)}};$y=function(t){if(t.tag===13){var e=Ji(t,134217728);if(e!==null){var n=Zn();ni(e,t,134217728,n)}av(t,134217728)}};ax=function(t){if(t.tag===13){var e=Mo(t),n=Ji(t,e);if(n!==null){var r=Zn();ni(n,t,e,r)}av(t,e)}};ux=function(){return St};cx=function(t,e){var n=St;try{return St=t,e()}finally{St=n}};gm=function(t,e,n){switch(e){case"input":if(am(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=Cd(r);if(!i)throw Error(se(90));BP(r),am(r,i)}}}break;case"textarea":XP(t,n);break;case"select":e=n.value,e!=null&&gl(t,!!n.multiple,e,!1)}};GP=rv;HP=Cs;var CM={usingClientEntryPoint:!1,Events:[Ju,rl,Cd,zP,qP,rv]},ba={findFiberByHostInstance:cs,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},EM={bundleType:ba.bundleType,version:ba.version,rendererPackageName:ba.rendererPackageName,rendererConfig:ba.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:io.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=ex(t),t===null?null:t.stateNode},findFiberByHostInstance:ba.findFiberByHostInstance||PM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jc.isDisabled&&Jc.supportsFiber)try{wd=Jc.inject(EM),Qi=Jc}catch{}}wr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CM;wr.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!cv(e))throw Error(se(200));return kM(t,e,null,n)};wr.createRoot=function(t,e){if(!cv(t))throw Error(se(299));var n=!1,r="",i=RC;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=lv(t,1,!1,null,null,n,!1,r,i),t[Ki]=e.current,Ou(t.nodeType===8?t.parentNode:t),new uv(e)};wr.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(se(188)):(t=Object.keys(t).join(","),Error(se(268,t)));return t=ex(e),t=t===null?null:t.stateNode,t};wr.flushSync=function(t){return Cs(t)};wr.hydrate=function(t,e,n){if(!Md(e))throw Error(se(200));return Id(null,t,e,!0,n)};wr.hydrateRoot=function(t,e,n){if(!cv(t))throw Error(se(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=RC;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),e=AC(e,null,t,1,n??null,i,!1,o,s),t[Ki]=e.current,Ou(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Dd(e)};wr.render=function(t,e,n){if(!Md(e))throw Error(se(200));return Id(null,t,e,!1,n)};wr.unmountComponentAtNode=function(t){if(!Md(t))throw Error(se(40));return t._reactRootContainer?(Cs(function(){Id(null,null,t,!1,function(){t._reactRootContainer=null,t[Ki]=null})}),!0):!1};wr.unstable_batchedUpdates=rv;wr.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Md(n))throw Error(se(200));if(t==null||t._reactInternals===void 0)throw Error(se(38));return Id(t,e,n,!1,r)};wr.version="18.2.0-next-9e3b772b8-20220608";function DC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(DC)}catch(t){console.error(t)}}DC(),AP.exports=wr;var fv=AP.exports;const cl=Yo(fv);var MC,MS=fv;MC=MS.createRoot,MS.hydrateRoot;function xo(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var IC={exports:{}};(function(t,e){(function(n){t.exports=n()})(function(){return function(){function n(r,i,o){function s(u,c){if(!i[u]){if(!r[u]){var f=typeof xo=="function"&&xo;if(!c&&f)return f(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[u]={exports:{}};r[u][0].call(d.exports,function(p){var g=r[u][1][p];return s(g||p)},d,d.exports,n,r,i,o)}return i[u].exports}for(var l=typeof xo=="function"&&xo,a=0;a<o.length;a++)s(o[a]);return s}return n}()({1:[function(n,r,i){(function(o,s,l){(function(){(function(a,u){u(typeof i=="object"&&typeof r<"u"?i:a.async=a.async||{})})(this,function(a){function u(x,$){$=$|0;for(var R=Math.max(x.length-$,0),j=Array(R),Z=0;Z<R;Z++)j[Z]=x[$+Z];return j}var c=function(x){var $=u(arguments,1);return function(){var R=u(arguments);return x.apply(null,$.concat(R))}},f=function(x){return function(){var $=u(arguments),R=$.pop();x.call(this,$,R)}};function h(x){var $=typeof x;return x!=null&&($=="object"||$=="function")}var d=typeof l=="function"&&l,p=typeof o=="object"&&typeof o.nextTick=="function";function g(x){setTimeout(x,0)}function y(x){return function($){var R=u(arguments,1);x(function(){$.apply(null,R)})}}var O;d?O=l:p?O=o.nextTick:O=g;var m=y(O);function v(x){return f(function($,R){var j;try{j=x.apply(this,$)}catch(Z){return R(Z)}h(j)&&typeof j.then=="function"?j.then(function(Z){b(R,null,Z)},function(Z){b(R,Z.message?Z:new Error(Z))}):R(null,j)})}function b(x,$,R){try{x($,R)}catch(j){m(P,j)}}function P(x){throw x}var E=typeof Symbol=="function";function T(x){return E&&x[Symbol.toStringTag]==="AsyncFunction"}function w(x){return T(x)?v(x):x}function k(x){return function($){var R=u(arguments,1),j=f(function(Z,U){var ee=this;return x($,function(re,he){w(re).apply(ee,Z.concat(he))},U)});return R.length?j.apply(this,R):j}}var C=typeof s=="object"&&s&&s.Object===Object&&s,Q=typeof self=="object"&&self&&self.Object===Object&&self,M=C||Q||Function("return this")(),L=M.Symbol,V=Object.prototype,G=V.hasOwnProperty,D=V.toString,N=L?L.toStringTag:void 0;function A(x){var $=G.call(x,N),R=x[N];try{x[N]=void 0;var j=!0}catch{}var Z=D.call(x);return j&&($?x[N]=R:delete x[N]),Z}var F=Object.prototype,Y=F.toString;function pe(x){return Y.call(x)}var ae="[object Null]",B="[object Undefined]",q=L?L.toStringTag:void 0;function te(x){return x==null?x===void 0?B:ae:q&&q in Object(x)?A(x):pe(x)}var we="[object AsyncFunction]",X="[object Function]",W="[object GeneratorFunction]",z="[object Proxy]";function fe(x){if(!h(x))return!1;var $=te(x);return $==X||$==W||$==we||$==z}var be=9007199254740991;function Be(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=be}function Me(x){return x!=null&&Be(x.length)&&!fe(x)}var Ne={};function ie(){}function lt(x){return function(){if(x!==null){var $=x;x=null,$.apply(this,arguments)}}}var en=typeof Symbol=="function"&&Symbol.iterator,Wr=function(x){return en&&x[en]&&x[en]()};function xr(x,$){for(var R=-1,j=Array(x);++R<x;)j[R]=$(R);return j}function yn(x){return x!=null&&typeof x=="object"}var Jo="[object Arguments]";function Li(x){return yn(x)&&te(x)==Jo}var _=Object.prototype,H=_.hasOwnProperty,K=_.propertyIsEnumerable,ue=Li(function(){return arguments}())?Li:function(x){return yn(x)&&H.call(x,"callee")&&!K.call(x,"callee")},le=Array.isArray;function Oe(){return!1}var Ge=typeof a=="object"&&a&&!a.nodeType&&a,Ke=Ge&&typeof r=="object"&&r&&!r.nodeType&&r,oe=Ke&&Ke.exports===Ge,Xe=oe?M.Buffer:void 0,Ee=Xe?Xe.isBuffer:void 0,ve=Ee||Oe,me=9007199254740991,Qe=/^(?:0|[1-9]\d*)$/;function Je(x,$){var R=typeof x;return $=$??me,!!$&&(R=="number"||R!="symbol"&&Qe.test(x))&&x>-1&&x%1==0&&x<$}var Le="[object Arguments]",ke="[object Array]",Ue="[object Boolean]",ft="[object Date]",ut="[object Error]",wt="[object Function]",Lt="[object Map]",Ft="[object Number]",$t="[object Object]",$n="[object RegExp]",Tn="[object Set]",si="[object String]",Cr="[object WeakMap]",ar="[object ArrayBuffer]",Gn="[object DataView]",rt="[object Float32Array]",Re="[object Float64Array]",Ie="[object Int8Array]",je="[object Int16Array]",ye="[object Int32Array]",_e="[object Uint8Array]",nt="[object Uint8ClampedArray]",it="[object Uint16Array]",at="[object Uint32Array]",Ye={};Ye[rt]=Ye[Re]=Ye[Ie]=Ye[je]=Ye[ye]=Ye[_e]=Ye[nt]=Ye[it]=Ye[at]=!0,Ye[Le]=Ye[ke]=Ye[ar]=Ye[Ue]=Ye[Gn]=Ye[ft]=Ye[ut]=Ye[wt]=Ye[Lt]=Ye[Ft]=Ye[$t]=Ye[$n]=Ye[Tn]=Ye[si]=Ye[Cr]=!1;function Ht(x){return yn(x)&&Be(x.length)&&!!Ye[te(x)]}function kt(x){return function($){return x($)}}var on=typeof a=="object"&&a&&!a.nodeType&&a,He=on&&typeof r=="object"&&r&&!r.nodeType&&r,et=He&&He.exports===on,Ce=et&&C.process,ht=function(){try{var x=He&&He.require&&He.require("util").types;return x||Ce&&Ce.binding&&Ce.binding("util")}catch{}}(),un=ht&&ht.isTypedArray,Ur=un?kt(un):Ht,li=Object.prototype,ur=li.hasOwnProperty;function es(x,$){var R=le(x),j=!R&&ue(x),Z=!R&&!j&&ve(x),U=!R&&!j&&!Z&&Ur(x),ee=R||j||Z||U,re=ee?xr(x.length,String):[],he=re.length;for(var De in x)($||ur.call(x,De))&&!(ee&&(De=="length"||Z&&(De=="offset"||De=="parent")||U&&(De=="buffer"||De=="byteLength"||De=="byteOffset")||Je(De,he)))&&re.push(De);return re}var ji=Object.prototype;function Zr(x){var $=x&&x.constructor,R=typeof $=="function"&&$.prototype||ji;return x===R}function ts(x,$){return function(R){return x($(R))}}var Ze=ts(Object.keys,Object),xt=Object.prototype,tn=xt.hasOwnProperty;function Tt(x){if(!Zr(x))return Ze(x);var $=[];for(var R in Object(x))tn.call(x,R)&&R!="constructor"&&$.push(R);return $}function Er(x){return Me(x)?es(x):Tt(x)}function ao(x){var $=-1,R=x.length;return function(){return++$<R?{value:x[$],key:$}:null}}function oa(x){var $=-1;return function(){var j=x.next();return j.done?null:($++,{value:j.value,key:$})}}function Ds(x){var $=Er(x),R=-1,j=$.length;return function Z(){var U=$[++R];return U==="__proto__"?Z():R<j?{value:x[U],key:U}:null}}function gc(x){if(Me(x))return ao(x);var $=Wr(x);return $?oa($):Ds(x)}function cn(x){return function(){if(x===null)throw new Error("Callback was already called.");var $=x;x=null,$.apply(this,arguments)}}function An(x){return function($,R,j){if(j=lt(j||ie),x<=0||!$)return j(null);var Z=gc($),U=!1,ee=0,re=!1;function he(ge,ze){if(ee-=1,ge)U=!0,j(ge);else{if(ze===Ne||U&&ee<=0)return U=!0,j(null);re||De()}}function De(){for(re=!0;ee<x&&!U;){var ge=Z();if(ge===null){U=!0,ee<=0&&j(null);return}ee+=1,R(ge.value,ge.key,cn(he))}re=!1}De()}}function Hn(x,$,R,j){An($)(x,w(R),j)}function At(x,$){return function(R,j,Z){return x(R,$,j,Z)}}function Vi(x,$,R){R=lt(R||ie);var j=0,Z=0,U=x.length;U===0&&R(null);function ee(re,he){re?R(re):(++Z===U||he===Ne)&&R(null)}for(;j<U;j++)$(x[j],j,cn(ee))}var n2=At(Hn,1/0),uo=function(x,$,R){var j=Me(x)?Vi:n2;j(x,w($),R)};function Ms(x){return function($,R,j){return x(uo,$,w(R),j)}}function k0(x,$,R,j){j=j||ie,$=$||[];var Z=[],U=0,ee=w(R);x($,function(re,he,De){var ge=U++;ee(re,function(ze,Rt){Z[ge]=Rt,De(ze)})},function(re){j(re,Z)})}var mc=Ms(k0),P0=k(mc);function Is(x){return function($,R,j,Z){return x(An(R),$,w(j),Z)}}var Ns=Is(k0),gp=At(Ns,1),x0=k(gp);function Oc(x,$){for(var R=-1,j=x==null?0:x.length;++R<j&&$(x[R],R,x)!==!1;);return x}function r2(x){return function($,R,j){for(var Z=-1,U=Object($),ee=j($),re=ee.length;re--;){var he=ee[x?re:++Z];if(R(U[he],he,U)===!1)break}return $}}var i2=r2();function sa(x,$){return x&&i2(x,$,Er)}function o2(x,$,R,j){for(var Z=x.length,U=R+(j?1:-1);j?U--:++U<Z;)if($(x[U],U,x))return U;return-1}function s2(x){return x!==x}function l2(x,$,R){for(var j=R-1,Z=x.length;++j<Z;)if(x[j]===$)return j;return-1}function yc(x,$,R){return $===$?l2(x,$,R):o2(x,s2,R)}var mp=function(x,$,R){typeof $=="function"&&(R=$,$=null),R=lt(R||ie);var j=Er(x),Z=j.length;if(!Z)return R(null);$||($=Z);var U={},ee=0,re=!1,he=Object.create(null),De=[],ge=[],ze={};sa(x,function(jt,Xt){if(!le(jt)){Rt(Xt,[jt]),ge.push(Xt);return}var vn=jt.slice(0,jt.length-1),Bi=vn.length;if(Bi===0){Rt(Xt,jt),ge.push(Xt);return}ze[Xt]=Bi,Oc(vn,function(Bs){if(!x[Bs])throw new Error("async.auto task `"+Xt+"` has a non-existent dependency `"+Bs+"` in "+vn.join(", "));ai(Bs,function(){Bi--,Bi===0&&Rt(Xt,jt)})})}),J2(),Rn();function Rt(jt,Xt){De.push(function(){ui(jt,Xt)})}function Rn(){if(De.length===0&&ee===0)return R(null,U);for(;De.length&&ee<$;){var jt=De.shift();jt()}}function ai(jt,Xt){var vn=he[jt];vn||(vn=he[jt]=[]),vn.push(Xt)}function Qr(jt){var Xt=he[jt]||[];Oc(Xt,function(vn){vn()}),Rn()}function ui(jt,Xt){if(!re){var vn=cn(function(Bs,Qp){if(ee--,arguments.length>2&&(Qp=u(arguments,1)),Bs){var _p={};sa(U,function(tR,nR){_p[nR]=tR}),_p[jt]=Qp,re=!0,he=Object.create(null),R(Bs,_p)}else U[jt]=Qp,Qr(jt)});ee++;var Bi=w(Xt[Xt.length-1]);Xt.length>1?Bi(U,vn):Bi(vn)}}function J2(){for(var jt,Xt=0;ge.length;)jt=ge.pop(),Xt++,Oc(eR(jt),function(vn){--ze[vn]===0&&ge.push(vn)});if(Xt!==Z)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function eR(jt){var Xt=[];return sa(x,function(vn,Bi){le(vn)&&yc(vn,jt,0)>=0&&Xt.push(Bi)}),Xt}};function Ls(x,$){for(var R=-1,j=x==null?0:x.length,Z=Array(j);++R<j;)Z[R]=$(x[R],R,x);return Z}var a2="[object Symbol]";function u2(x){return typeof x=="symbol"||yn(x)&&te(x)==a2}var c2=1/0,C0=L?L.prototype:void 0,E0=C0?C0.toString:void 0;function Op(x){if(typeof x=="string")return x;if(le(x))return Ls(x,Op)+"";if(u2(x))return E0?E0.call(x):"";var $=x+"";return $=="0"&&1/x==-c2?"-0":$}function f2(x,$,R){var j=-1,Z=x.length;$<0&&($=-$>Z?0:Z+$),R=R>Z?Z:R,R<0&&(R+=Z),Z=$>R?0:R-$>>>0,$>>>=0;for(var U=Array(Z);++j<Z;)U[j]=x[j+$];return U}function h2(x,$,R){var j=x.length;return R=R===void 0?j:R,!$&&R>=j?x:f2(x,$,R)}function d2(x,$){for(var R=x.length;R--&&yc($,x[R],0)>-1;);return R}function p2(x,$){for(var R=-1,j=x.length;++R<j&&yc($,x[R],0)>-1;);return R}function g2(x){return x.split("")}var m2="\\ud800-\\udfff",O2="\\u0300-\\u036f",y2="\\ufe20-\\ufe2f",v2="\\u20d0-\\u20ff",S2=O2+y2+v2,b2="\\ufe0e\\ufe0f",w2="\\u200d",k2=RegExp("["+w2+m2+S2+b2+"]");function P2(x){return k2.test(x)}var Q0="\\ud800-\\udfff",x2="\\u0300-\\u036f",C2="\\ufe20-\\ufe2f",E2="\\u20d0-\\u20ff",Q2=x2+C2+E2,_2="\\ufe0e\\ufe0f",$2="["+Q0+"]",yp="["+Q2+"]",vp="\\ud83c[\\udffb-\\udfff]",T2="(?:"+yp+"|"+vp+")",_0="[^"+Q0+"]",$0="(?:\\ud83c[\\udde6-\\uddff]){2}",T0="[\\ud800-\\udbff][\\udc00-\\udfff]",A2="\\u200d",A0=T2+"?",R0="["+_2+"]?",R2="(?:"+A2+"(?:"+[_0,$0,T0].join("|")+")"+R0+A0+")*",D2=R0+A0+R2,M2="(?:"+[_0+yp+"?",yp,$0,T0,$2].join("|")+")",I2=RegExp(vp+"(?="+vp+")|"+M2+D2,"g");function N2(x){return x.match(I2)||[]}function D0(x){return P2(x)?N2(x):g2(x)}function L2(x){return x==null?"":Op(x)}var j2=/^\s+|\s+$/g;function V2(x,$,R){if(x=L2(x),x&&(R||$===void 0))return x.replace(j2,"");if(!x||!($=Op($)))return x;var j=D0(x),Z=D0($),U=p2(j,Z),ee=d2(j,Z)+1;return h2(j,U,ee).join("")}var B2=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,F2=/,/,X2=/(=.+)?(\s*)$/,W2=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;function U2(x){return x=x.toString().replace(W2,""),x=x.match(B2)[2].replace(" ",""),x=x?x.split(F2):[],x=x.map(function($){return V2($.replace(X2,""))}),x}function M0(x,$){var R={};sa(x,function(j,Z){var U,ee=T(j),re=!ee&&j.length===1||ee&&j.length===0;if(le(j))U=j.slice(0,-1),j=j[j.length-1],R[Z]=U.concat(U.length>0?he:j);else if(re)R[Z]=j;else{if(U=U2(j),j.length===0&&!ee&&U.length===0)throw new Error("autoInject task functions require explicit parameters.");ee||U.pop(),R[Z]=U.concat(he)}function he(De,ge){var ze=Ls(U,function(Rt){return De[Rt]});ze.push(ge),w(j).apply(null,ze)}}),mp(R,$)}function Yr(){this.head=this.tail=null,this.length=0}function I0(x,$){x.length=1,x.head=x.tail=$}Yr.prototype.removeLink=function(x){return x.prev?x.prev.next=x.next:this.head=x.next,x.next?x.next.prev=x.prev:this.tail=x.prev,x.prev=x.next=null,this.length-=1,x},Yr.prototype.empty=function(){for(;this.head;)this.shift();return this},Yr.prototype.insertAfter=function(x,$){$.prev=x,$.next=x.next,x.next?x.next.prev=$:this.tail=$,x.next=$,this.length+=1},Yr.prototype.insertBefore=function(x,$){$.prev=x.prev,$.next=x,x.prev?x.prev.next=$:this.head=$,x.prev=$,this.length+=1},Yr.prototype.unshift=function(x){this.head?this.insertBefore(this.head,x):I0(this,x)},Yr.prototype.push=function(x){this.tail?this.insertAfter(this.tail,x):I0(this,x)},Yr.prototype.shift=function(){return this.head&&this.removeLink(this.head)},Yr.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},Yr.prototype.toArray=function(){for(var x=Array(this.length),$=this.head,R=0;R<this.length;R++)x[R]=$.data,$=$.next;return x},Yr.prototype.remove=function(x){for(var $=this.head;$;){var R=$.next;x($)&&this.removeLink($),$=R}return this};function N0(x,$,R){if($==null)$=1;else if($===0)throw new Error("Concurrency must not be zero");var j=w(x),Z=0,U=[],ee=!1;function re(ze,Rt,Rn){if(Rn!=null&&typeof Rn!="function")throw new Error("task callback must be a function");if(ge.started=!0,le(ze)||(ze=[ze]),ze.length===0&&ge.idle())return m(function(){ge.drain()});for(var ai=0,Qr=ze.length;ai<Qr;ai++){var ui={data:ze[ai],callback:Rn||ie};Rt?ge._tasks.unshift(ui):ge._tasks.push(ui)}ee||(ee=!0,m(function(){ee=!1,ge.process()}))}function he(ze){return function(Rt){Z-=1;for(var Rn=0,ai=ze.length;Rn<ai;Rn++){var Qr=ze[Rn],ui=yc(U,Qr,0);ui===0?U.shift():ui>0&&U.splice(ui,1),Qr.callback.apply(Qr,arguments),Rt!=null&&ge.error(Rt,Qr.data)}Z<=ge.concurrency-ge.buffer&&ge.unsaturated(),ge.idle()&&ge.drain(),ge.process()}}var De=!1,ge={_tasks:new Yr,concurrency:$,payload:R,saturated:ie,unsaturated:ie,buffer:$/4,empty:ie,drain:ie,error:ie,started:!1,paused:!1,push:function(ze,Rt){re(ze,!1,Rt)},kill:function(){ge.drain=ie,ge._tasks.empty()},unshift:function(ze,Rt){re(ze,!0,Rt)},remove:function(ze){ge._tasks.remove(ze)},process:function(){if(!De){for(De=!0;!ge.paused&&Z<ge.concurrency&&ge._tasks.length;){var ze=[],Rt=[],Rn=ge._tasks.length;ge.payload&&(Rn=Math.min(Rn,ge.payload));for(var ai=0;ai<Rn;ai++){var Qr=ge._tasks.shift();ze.push(Qr),U.push(Qr),Rt.push(Qr.data)}Z+=1,ge._tasks.length===0&&ge.empty(),Z===ge.concurrency&&ge.saturated();var ui=cn(he(ze));j(Rt,ui)}De=!1}},length:function(){return ge._tasks.length},running:function(){return Z},workersList:function(){return U},idle:function(){return ge._tasks.length+Z===0},pause:function(){ge.paused=!0},resume:function(){ge.paused!==!1&&(ge.paused=!1,m(ge.process))}};return ge}function L0(x,$){return N0(x,1,$)}var js=At(Hn,1);function co(x,$,R,j){j=lt(j||ie);var Z=w(R);js(x,function(U,ee,re){Z($,U,function(he,De){$=De,re(he)})},function(U){j(U,$)})}function Sp(){var x=Ls(arguments,w);return function(){var $=u(arguments),R=this,j=$[$.length-1];typeof j=="function"?$.pop():j=ie,co(x,$,function(Z,U,ee){U.apply(R,Z.concat(function(re){var he=u(arguments,1);ee(re,he)}))},function(Z,U){j.apply(R,[Z].concat(U))})}}var j0=function(){return Sp.apply(null,u(arguments).reverse())},Z2=Array.prototype.concat,vc=function(x,$,R,j){j=j||ie;var Z=w(R);Ns(x,$,function(U,ee){Z(U,function(re){return re?ee(re):ee(null,u(arguments,1))})},function(U,ee){for(var re=[],he=0;he<ee.length;he++)ee[he]&&(re=Z2.apply(re,ee[he]));return j(U,re)})},V0=At(vc,1/0),B0=At(vc,1),F0=function(){var x=u(arguments),$=[null].concat(x);return function(){var R=arguments[arguments.length-1];return R.apply(this,$)}};function la(x){return x}function Vs(x,$){return function(R,j,Z,U){U=U||ie;var ee=!1,re;R(j,function(he,De,ge){Z(he,function(ze,Rt){ze?ge(ze):x(Rt)&&!re?(ee=!0,re=$(!0,he),ge(null,Ne)):ge()})},function(he){he?U(he):U(null,ee?re:$(!1))})}}function X0(x,$){return $}var Sc=Ms(Vs(la,X0)),aa=Is(Vs(la,X0)),bc=At(aa,1);function W0(x){return function($){var R=u(arguments,1);R.push(function(j){var Z=u(arguments,1);typeof console=="object"&&(j?console.error&&console.error(j):console[x]&&Oc(Z,function(U){console[x](U)}))}),w($).apply(null,R)}}var U0=W0("dir");function Z0(x,$,R){R=cn(R||ie);var j=w(x),Z=w($);function U(re){if(re)return R(re);var he=u(arguments,1);he.push(ee),Z.apply(this,he)}function ee(re,he){if(re)return R(re);if(!he)return R(null);j(U)}ee(null,!0)}function bp(x,$,R){R=cn(R||ie);var j=w(x),Z=function(U){if(U)return R(U);var ee=u(arguments,1);if($.apply(this,ee))return j(Z);R.apply(null,[null].concat(ee))};j(Z)}function Y0(x,$,R){bp(x,function(){return!$.apply(this,arguments)},R)}function z0(x,$,R){R=cn(R||ie);var j=w($),Z=w(x);function U(re){if(re)return R(re);Z(ee)}function ee(re,he){if(re)return R(re);if(!he)return R(null);j(U)}Z(ee)}function q0(x){return function($,R,j){return x($,j)}}function wc(x,$,R){uo(x,q0(w($)),R)}function ua(x,$,R,j){An($)(x,q0(w(R)),j)}var ca=At(ua,1);function wp(x){return T(x)?x:f(function($,R){var j=!0;$.push(function(){var Z=arguments;j?m(function(){R.apply(null,Z)}):R.apply(null,Z)}),x.apply(this,$),j=!1})}function kc(x){return!x}var Pc=Ms(Vs(kc,kc)),fa=Is(Vs(kc,kc)),xc=At(fa,1);function G0(x){return function($){return $==null?void 0:$[x]}}function Y2(x,$,R,j){var Z=new Array($.length);x($,function(U,ee,re){R(U,function(he,De){Z[ee]=!!De,re(he)})},function(U){if(U)return j(U);for(var ee=[],re=0;re<$.length;re++)Z[re]&&ee.push($[re]);j(null,ee)})}function z2(x,$,R,j){var Z=[];x($,function(U,ee,re){R(U,function(he,De){he?re(he):(De&&Z.push({index:ee,value:U}),re())})},function(U){U?j(U):j(null,Ls(Z.sort(function(ee,re){return ee.index-re.index}),G0("value")))})}function kp(x,$,R,j){var Z=Me($)?Y2:z2;Z(x,$,w(R),j||ie)}var Cc=Ms(kp),ha=Is(kp),Ec=At(ha,1);function H0(x,$){var R=cn($||ie),j=w(wp(x));function Z(U){if(U)return R(U);j(Z)}Z()}var Qc=function(x,$,R,j){j=j||ie;var Z=w(R);Ns(x,$,function(U,ee){Z(U,function(re,he){return re?ee(re):ee(null,{key:he,val:U})})},function(U,ee){for(var re={},he=Object.prototype.hasOwnProperty,De=0;De<ee.length;De++)if(ee[De]){var ge=ee[De].key,ze=ee[De].val;he.call(re,ge)?re[ge].push(ze):re[ge]=[ze]}return j(U,re)})},K0=At(Qc,1/0),J0=At(Qc,1),e1=W0("log");function _c(x,$,R,j){j=lt(j||ie);var Z={},U=w(R);Hn(x,$,function(ee,re,he){U(ee,re,function(De,ge){if(De)return he(De);Z[re]=ge,he()})},function(ee){j(ee,Z)})}var t1=At(_c,1/0),n1=At(_c,1);function r1(x,$){return $ in x}function i1(x,$){var R=Object.create(null),j=Object.create(null);$=$||la;var Z=w(x),U=f(function(re,he){var De=$.apply(null,re);r1(R,De)?m(function(){he.apply(null,R[De])}):r1(j,De)?j[De].push(he):(j[De]=[he],Z.apply(null,re.concat(function(){var ge=u(arguments);R[De]=ge;var ze=j[De];delete j[De];for(var Rt=0,Rn=ze.length;Rt<Rn;Rt++)ze[Rt].apply(null,ge)})))});return U.memo=R,U.unmemoized=x,U}var $c;p?$c=o.nextTick:d?$c=l:$c=g;var o1=y($c);function Pp(x,$,R){R=R||ie;var j=Me($)?[]:{};x($,function(Z,U,ee){w(Z)(function(re,he){arguments.length>2&&(he=u(arguments,1)),j[U]=he,ee(re)})},function(Z){R(Z,j)})}function s1(x,$){Pp(uo,x,$)}function l1(x,$,R){Pp(An($),x,R)}var xp=function(x,$){var R=w(x);return N0(function(j,Z){R(j[0],Z)},$,1)},a1=function(x,$){var R=xp(x,$);return R.push=function(j,Z,U){if(U==null&&(U=ie),typeof U!="function")throw new Error("task callback must be a function");if(R.started=!0,le(j)||(j=[j]),j.length===0)return m(function(){R.drain()});Z=Z||0;for(var ee=R._tasks.head;ee&&Z>=ee.priority;)ee=ee.next;for(var re=0,he=j.length;re<he;re++){var De={data:j[re],priority:Z,callback:U};ee?R._tasks.insertBefore(ee,De):R._tasks.push(De)}m(R.process)},delete R.unshift,R};function u1(x,$){if($=lt($||ie),!le(x))return $(new TypeError("First argument to race must be an array of functions"));if(!x.length)return $();for(var R=0,j=x.length;R<j;R++)w(x[R])($)}function Tc(x,$,R,j){var Z=u(x).reverse();co(Z,$,R,j)}function Ac(x){var $=w(x);return f(function(j,Z){return j.push(function(ee,re){if(ee)Z(null,{error:ee});else{var he;arguments.length<=2?he=re:he=u(arguments,1),Z(null,{value:he})}}),$.apply(this,j)})}function c1(x){var $;return le(x)?$=Ls(x,Ac):($={},sa(x,function(R,j){$[j]=Ac.call(this,R)})),$}function f1(x,$,R,j){kp(x,$,function(Z,U){R(Z,function(ee,re){U(ee,!re)})},j)}var h1=Ms(f1),Cp=Is(f1),d1=At(Cp,1);function p1(x){return function(){return x}}function Rc(x,$,R){var j=5,Z=0,U={times:j,intervalFunc:p1(Z)};function ee(ge,ze){if(typeof ze=="object")ge.times=+ze.times||j,ge.intervalFunc=typeof ze.interval=="function"?ze.interval:p1(+ze.interval||Z),ge.errorFilter=ze.errorFilter;else if(typeof ze=="number"||typeof ze=="string")ge.times=+ze||j;else throw new Error("Invalid arguments for async.retry")}if(arguments.length<3&&typeof x=="function"?(R=$||ie,$=x):(ee(U,x),R=R||ie),typeof $!="function")throw new Error("Invalid arguments for async.retry");var re=w($),he=1;function De(){re(function(ge){ge&&he++<U.times&&(typeof U.errorFilter!="function"||U.errorFilter(ge))?setTimeout(De,U.intervalFunc(he)):R.apply(null,arguments)})}De()}var g1=function(x,$){$||($=x,x=null);var R=w($);return f(function(j,Z){function U(ee){R.apply(null,j.concat(ee))}x?Rc(x,U,Z):Rc(U,Z)})};function m1(x,$){Pp(js,x,$)}var Dc=Ms(Vs(Boolean,la)),da=Is(Vs(Boolean,la)),Mc=At(da,1);function O1(x,$,R){var j=w($);mc(x,function(U,ee){j(U,function(re,he){if(re)return ee(re);ee(null,{value:U,criteria:he})})},function(U,ee){if(U)return R(U);R(null,Ls(ee.sort(Z),G0("value")))});function Z(U,ee){var re=U.criteria,he=ee.criteria;return re<he?-1:re>he?1:0}}function y1(x,$,R){var j=w(x);return f(function(Z,U){var ee=!1,re;function he(){var De=x.name||"anonymous",ge=new Error('Callback function "'+De+'" timed out.');ge.code="ETIMEDOUT",R&&(ge.info=R),ee=!0,U(ge)}Z.push(function(){ee||(U.apply(null,arguments),clearTimeout(re))}),re=setTimeout(he,$),j.apply(null,Z)})}var q2=Math.ceil,G2=Math.max;function H2(x,$,R,j){for(var Z=-1,U=G2(q2(($-x)/(R||1)),0),ee=Array(U);U--;)ee[j?U:++Z]=x,x+=R;return ee}function Ic(x,$,R,j){var Z=w(R);Ns(H2(0,x,1),$,Z,j)}var v1=At(Ic,1/0),S1=At(Ic,1);function b1(x,$,R,j){arguments.length<=3&&(j=R,R=$,$=le(x)?[]:{}),j=lt(j||ie);var Z=w(R);uo(x,function(U,ee,re){Z($,U,ee,re)},function(U){j(U,$)})}function w1(x,$){var R=null,j;$=$||ie,ca(x,function(Z,U){w(Z)(function(ee,re){arguments.length>2?j=u(arguments,1):j=re,R=ee,U(!ee)})},function(){$(R,j)})}function k1(x){return function(){return(x.unmemoized||x).apply(null,arguments)}}function Ep(x,$,R){R=cn(R||ie);var j=w($);if(!x())return R(null);var Z=function(U){if(U)return R(U);if(x())return j(Z);var ee=u(arguments,1);R.apply(null,[null].concat(ee))};j(Z)}function P1(x,$,R){Ep(function(){return!x.apply(this,arguments)},$,R)}var x1=function(x,$){if($=lt($||ie),!le(x))return $(new Error("First argument to waterfall must be an array of functions"));if(!x.length)return $();var R=0;function j(U){var ee=w(x[R++]);U.push(cn(Z)),ee.apply(null,U)}function Z(U){if(U||R===x.length)return $.apply(null,arguments);j(u(arguments,1))}j([])},K2={apply:c,applyEach:P0,applyEachSeries:x0,asyncify:v,auto:mp,autoInject:M0,cargo:L0,compose:j0,concat:V0,concatLimit:vc,concatSeries:B0,constant:F0,detect:Sc,detectLimit:aa,detectSeries:bc,dir:U0,doDuring:Z0,doUntil:Y0,doWhilst:bp,during:z0,each:wc,eachLimit:ua,eachOf:uo,eachOfLimit:Hn,eachOfSeries:js,eachSeries:ca,ensureAsync:wp,every:Pc,everyLimit:fa,everySeries:xc,filter:Cc,filterLimit:ha,filterSeries:Ec,forever:H0,groupBy:K0,groupByLimit:Qc,groupBySeries:J0,log:e1,map:mc,mapLimit:Ns,mapSeries:gp,mapValues:t1,mapValuesLimit:_c,mapValuesSeries:n1,memoize:i1,nextTick:o1,parallel:s1,parallelLimit:l1,priorityQueue:a1,queue:xp,race:u1,reduce:co,reduceRight:Tc,reflect:Ac,reflectAll:c1,reject:h1,rejectLimit:Cp,rejectSeries:d1,retry:Rc,retryable:g1,seq:Sp,series:m1,setImmediate:m,some:Dc,someLimit:da,someSeries:Mc,sortBy:O1,timeout:y1,times:v1,timesLimit:Ic,timesSeries:S1,transform:b1,tryEach:w1,unmemoize:k1,until:P1,waterfall:x1,whilst:Ep,all:Pc,allLimit:fa,allSeries:xc,any:Dc,anyLimit:da,anySeries:Mc,find:Sc,findLimit:aa,findSeries:bc,forEach:wc,forEachSeries:ca,forEachLimit:ua,forEachOf:uo,forEachOfSeries:js,forEachOfLimit:Hn,inject:co,foldl:co,foldr:Tc,select:Cc,selectLimit:ha,selectSeries:Ec,wrapSync:v};a.default=K2,a.apply=c,a.applyEach=P0,a.applyEachSeries=x0,a.asyncify=v,a.auto=mp,a.autoInject=M0,a.cargo=L0,a.compose=j0,a.concat=V0,a.concatLimit=vc,a.concatSeries=B0,a.constant=F0,a.detect=Sc,a.detectLimit=aa,a.detectSeries=bc,a.dir=U0,a.doDuring=Z0,a.doUntil=Y0,a.doWhilst=bp,a.during=z0,a.each=wc,a.eachLimit=ua,a.eachOf=uo,a.eachOfLimit=Hn,a.eachOfSeries=js,a.eachSeries=ca,a.ensureAsync=wp,a.every=Pc,a.everyLimit=fa,a.everySeries=xc,a.filter=Cc,a.filterLimit=ha,a.filterSeries=Ec,a.forever=H0,a.groupBy=K0,a.groupByLimit=Qc,a.groupBySeries=J0,a.log=e1,a.map=mc,a.mapLimit=Ns,a.mapSeries=gp,a.mapValues=t1,a.mapValuesLimit=_c,a.mapValuesSeries=n1,a.memoize=i1,a.nextTick=o1,a.parallel=s1,a.parallelLimit=l1,a.priorityQueue=a1,a.queue=xp,a.race=u1,a.reduce=co,a.reduceRight=Tc,a.reflect=Ac,a.reflectAll=c1,a.reject=h1,a.rejectLimit=Cp,a.rejectSeries=d1,a.retry=Rc,a.retryable=g1,a.seq=Sp,a.series=m1,a.setImmediate=m,a.some=Dc,a.someLimit=da,a.someSeries=Mc,a.sortBy=O1,a.timeout=y1,a.times=v1,a.timesLimit=Ic,a.timesSeries=S1,a.transform=b1,a.tryEach=w1,a.unmemoize=k1,a.until=P1,a.waterfall=x1,a.whilst=Ep,a.all=Pc,a.allLimit=fa,a.allSeries=xc,a.any=Dc,a.anyLimit=da,a.anySeries=Mc,a.find=Sc,a.findLimit=aa,a.findSeries=bc,a.forEach=wc,a.forEachSeries=ca,a.forEachLimit=ua,a.forEachOf=uo,a.forEachOfSeries=js,a.forEachOfLimit=Hn,a.inject=co,a.foldl=co,a.foldr=Tc,a.select=Cc,a.selectLimit=ha,a.selectSeries=Ec,a.wrapSync=v,Object.defineProperty(a,"__esModule",{value:!0})})}).call(this)}).call(this,n("_process"),typeof _r<"u"?_r:typeof self<"u"?self:typeof window<"u"?window:{},n("timers").setImmediate)},{_process:9,timers:33}],2:[function(n,r,i){var o=typeof Reflect=="object"?Reflect:null,s=o&&typeof o.apply=="function"?o.apply:function(C,Q,M){return Function.prototype.apply.call(C,Q,M)},l;o&&typeof o.ownKeys=="function"?l=o.ownKeys:Object.getOwnPropertySymbols?l=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:l=function(C){return Object.getOwnPropertyNames(C)};function a(k){console&&console.warn&&console.warn(k)}var u=Number.isNaN||function(C){return C!==C};function c(){c.init.call(this)}r.exports=c,r.exports.once=E,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var f=10;function h(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(k){if(typeof k!="number"||k<0||u(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");f=k}}),c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||u(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function d(k){return k._maxListeners===void 0?c.defaultMaxListeners:k._maxListeners}c.prototype.getMaxListeners=function(){return d(this)},c.prototype.emit=function(C){for(var Q=[],M=1;M<arguments.length;M++)Q.push(arguments[M]);var L=C==="error",V=this._events;if(V!==void 0)L=L&&V.error===void 0;else if(!L)return!1;if(L){var G;if(Q.length>0&&(G=Q[0]),G instanceof Error)throw G;var D=new Error("Unhandled error."+(G?" ("+G.message+")":""));throw D.context=G,D}var N=V[C];if(N===void 0)return!1;if(typeof N=="function")s(N,this,Q);else for(var A=N.length,F=v(N,A),M=0;M<A;++M)s(F[M],this,Q);return!0};function p(k,C,Q,M){var L,V,G;if(h(Q),V=k._events,V===void 0?(V=k._events=Object.create(null),k._eventsCount=0):(V.newListener!==void 0&&(k.emit("newListener",C,Q.listener?Q.listener:Q),V=k._events),G=V[C]),G===void 0)G=V[C]=Q,++k._eventsCount;else if(typeof G=="function"?G=V[C]=M?[Q,G]:[G,Q]:M?G.unshift(Q):G.push(Q),L=d(k),L>0&&G.length>L&&!G.warned){G.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+G.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=k,D.type=C,D.count=G.length,a(D)}return k}c.prototype.addListener=function(C,Q){return p(this,C,Q,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(C,Q){return p(this,C,Q,!0)};function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(k,C,Q){var M={fired:!1,wrapFn:void 0,target:k,type:C,listener:Q},L=g.bind(M);return L.listener=Q,M.wrapFn=L,L}c.prototype.once=function(C,Q){return h(Q),this.on(C,y(this,C,Q)),this},c.prototype.prependOnceListener=function(C,Q){return h(Q),this.prependListener(C,y(this,C,Q)),this},c.prototype.removeListener=function(C,Q){var M,L,V,G,D;if(h(Q),L=this._events,L===void 0)return this;if(M=L[C],M===void 0)return this;if(M===Q||M.listener===Q)--this._eventsCount===0?this._events=Object.create(null):(delete L[C],L.removeListener&&this.emit("removeListener",C,M.listener||Q));else if(typeof M!="function"){for(V=-1,G=M.length-1;G>=0;G--)if(M[G]===Q||M[G].listener===Q){D=M[G].listener,V=G;break}if(V<0)return this;V===0?M.shift():b(M,V),M.length===1&&(L[C]=M[0]),L.removeListener!==void 0&&this.emit("removeListener",C,D||Q)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(C){var Q,M,L;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[C]),this;if(arguments.length===0){var V=Object.keys(M),G;for(L=0;L<V.length;++L)G=V[L],G!=="removeListener"&&this.removeAllListeners(G);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Q=M[C],typeof Q=="function")this.removeListener(C,Q);else if(Q!==void 0)for(L=Q.length-1;L>=0;L--)this.removeListener(C,Q[L]);return this};function O(k,C,Q){var M=k._events;if(M===void 0)return[];var L=M[C];return L===void 0?[]:typeof L=="function"?Q?[L.listener||L]:[L]:Q?P(L):v(L,L.length)}c.prototype.listeners=function(C){return O(this,C,!0)},c.prototype.rawListeners=function(C){return O(this,C,!1)},c.listenerCount=function(k,C){return typeof k.listenerCount=="function"?k.listenerCount(C):m.call(k,C)},c.prototype.listenerCount=m;function m(k){var C=this._events;if(C!==void 0){var Q=C[k];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function v(k,C){for(var Q=new Array(C),M=0;M<C;++M)Q[M]=k[M];return Q}function b(k,C){for(;C+1<k.length;C++)k[C]=k[C+1];k.pop()}function P(k){for(var C=new Array(k.length),Q=0;Q<C.length;++Q)C[Q]=k[Q].listener||k[Q];return C}function E(k,C){return new Promise(function(Q,M){function L(G){k.removeListener(C,V),M(G)}function V(){typeof k.removeListener=="function"&&k.removeListener("error",L),Q([].slice.call(arguments))}w(k,C,V,{once:!0}),C!=="error"&&T(k,L,{once:!0})})}function T(k,C,Q){typeof k.on=="function"&&w(k,"error",C,Q)}function w(k,C,Q,M){if(typeof k.on=="function")M.once?k.once(C,Q):k.on(C,Q);else if(typeof k.addEventListener=="function")k.addEventListener(C,function L(V){M.once&&k.removeEventListener(C,L),Q(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k)}},{}],3:[function(n,r,i){var o=Array.isArray,s=Object.keys,l=Object.prototype.hasOwnProperty;r.exports=function a(u,c){if(u===c)return!0;if(u&&c&&typeof u=="object"&&typeof c=="object"){var f=o(u),h=o(c),d,p,g;if(f&&h){if(p=u.length,p!=c.length)return!1;for(d=p;d--!==0;)if(!a(u[d],c[d]))return!1;return!0}if(f!=h)return!1;var y=u instanceof Date,O=c instanceof Date;if(y!=O)return!1;if(y&&O)return u.getTime()==c.getTime();var m=u instanceof RegExp,v=c instanceof RegExp;if(m!=v)return!1;if(m&&v)return u.toString()==c.toString();var b=s(u);if(p=b.length,p!==s(c).length)return!1;for(d=p;d--!==0;)if(!l.call(c,b[d]))return!1;for(d=p;d--!==0;)if(g=b[d],!a(u[g],c[g]))return!1;return!0}return u!==u&&c!==c}},{}],4:[function(n,r,i){var o=r.exports=function(s,l){if(l||(l=16),s===void 0&&(s=128),s<=0)return"0";for(var a=Math.log(Math.pow(2,s))/Math.log(l),u=2;a===1/0;u*=2)a=Math.log(Math.pow(2,s/u))/Math.log(l)*u;for(var c=a-Math.floor(a),f="",u=0;u<Math.floor(a);u++){var h=Math.floor(Math.random()*l).toString(l);f=h+f}if(c){var d=Math.pow(l,c),h=Math.floor(Math.random()*d).toString(l);f=h+f}var p=parseInt(f,l);return p!==1/0&&p>=Math.pow(2,s)?o(s,l):f};o.rack=function(s,l,a){var u=function(f){var h=0;do{if(h++>10)if(a)s+=a;else throw new Error("too many ID collisions, use more bits");var d=o(s,l)}while(Object.hasOwnProperty.call(c,d));return c[d]=f,d},c=u.hats={};return u.get=function(f){return u.hats[f]},u.set=function(f,h){return u.hats[f]=h,u},u.bits=s||128,u.base=l||16,u}},{}],5:[function(n,r,i){r.exports=o;function o(s,l,a,u){var c=function(h,d,p,g){l(p,h,d,"left"),l(g,d,h,"right")},f=s.transformX=function(h,d){a(h),a(d);for(var p=[],g=0;g<d.length;g++){for(var y=d[g],O=[],m=0;m<h.length;){var v=[];if(c(h[m],y,O,v),m++,v.length===1)y=v[0];else if(v.length===0){for(var b=m;b<h.length;b++)u(O,h[b]);y=null;break}else{for(var P=f(h.slice(m),v),E=0;E<P[0].length;E++)u(O,P[0][E]);for(var T=0;T<P[1].length;T++)u(p,P[1][T]);y=null;break}}y!=null&&u(p,y),h=O}return[h,p]};s.transform=function(h,d,p){if(!(p==="left"||p==="right"))throw new Error("type must be 'left' or 'right'");return d.length===0?h:h.length===1&&d.length===1?l([],h[0],d[0],p):p==="left"?f(h,d)[0]:f(d,h)[1]}}},{}],6:[function(n,r,i){r.exports={type:n("./json0")}},{"./json0":7}],7:[function(n,r,i){var o=function(p){return Object.prototype.toString.call(p)=="[object Array]"},s=function(p){return!!p&&p.constructor===Object},l=function(p){return JSON.parse(JSON.stringify(p))},a={name:"json0",uri:"http://sharejs.org/types/JSONv0"},u={};a.registerSubtype=function(p){u[p.name]=p},a.create=function(p){return p===void 0?null:l(p)},a.invertComponent=function(p){var g={p:p.p};return p.t&&u[p.t]&&(g.t=p.t,g.o=u[p.t].invert(p.o)),p.si!==void 0&&(g.sd=p.si),p.sd!==void 0&&(g.si=p.sd),p.oi!==void 0&&(g.od=p.oi),p.od!==void 0&&(g.oi=p.od),p.li!==void 0&&(g.ld=p.li),p.ld!==void 0&&(g.li=p.ld),p.na!==void 0&&(g.na=-p.na),p.lm!==void 0&&(g.lm=p.p[p.p.length-1],g.p=p.p.slice(0,p.p.length-1).concat([p.lm])),g},a.invert=function(p){for(var g=p.slice().reverse(),y=[],O=0;O<g.length;O++)y.push(a.invertComponent(g[O]));return y},a.checkValidOp=function(p){for(var g=0;g<p.length;g++)if(!o(p[g].p))throw new Error("Missing path")},a.checkList=function(p){if(!o(p))throw new Error("Referenced element not a list")},a.checkObj=function(p){if(!s(p))throw new Error("Referenced element not an object (it was "+JSON.stringify(p)+")")};function c(p){p.t="text0";var g={p:p.p.pop()};p.si!=null&&(g.i=p.si),p.sd!=null&&(g.d=p.sd),p.o=[g]}function f(p){p.p.push(p.o[0].p),p.o[0].i!=null&&(p.si=p.o[0].i),p.o[0].d!=null&&(p.sd=p.o[0].d),delete p.t,delete p.o}a.apply=function(p,g){a.checkValidOp(g),g=l(g);for(var y={data:p},O=0;O<g.length;O++){var m=g[O];(m.si!=null||m.sd!=null)&&c(m);for(var v=null,b=y,P="data",E=0;E<m.p.length;E++){var T=m.p[E];if(v=b,b=b[P],P=T,v==null)throw new Error("Path invalid")}if(m.t&&m.o!==void 0&&u[m.t])b[P]=u[m.t].apply(b[P],m.o);else if(m.na!==void 0){if(typeof b[P]!="number")throw new Error("Referenced element not a number");b[P]+=m.na}else if(m.li!==void 0&&m.ld!==void 0)a.checkList(b),b[P]=m.li;else if(m.li!==void 0)a.checkList(b),b.splice(P,0,m.li);else if(m.ld!==void 0)a.checkList(b),b.splice(P,1);else if(m.lm!==void 0){if(a.checkList(b),m.lm!=P){var w=b[P];b.splice(P,1),b.splice(m.lm,0,w)}}else if(m.oi!==void 0)a.checkObj(b),b[P]=m.oi;else if(m.od!==void 0)a.checkObj(b),delete b[P];else throw new Error("invalid / missing instruction in op")}return y.data},a.shatter=function(p){for(var g=[],y=0;y<p.length;y++)g.push([p[y]]);return g},a.incrementalApply=function(p,g,y){for(var O=0;O<g.length;O++){var m=[g[O]];p=a.apply(p,m),y(m,p)}return p};var h=a.pathMatches=function(p,g,y){if(p.length!=g.length)return!1;for(var O=0;O<p.length;O++)if(p[O]!==g[O]&&(!y||O!==p.length-1))return!1;return!0};a.append=function(p,g){if(g=l(g),p.length===0){p.push(g);return}var y=p[p.length-1];if((g.si!=null||g.sd!=null)&&(y.si!=null||y.sd!=null)&&(c(g),c(y)),h(g.p,y.p))if(g.t&&y.t&&g.t===y.t&&u[g.t]){if(y.o=u[g.t].compose(y.o,g.o),g.si!=null||g.sd!=null){for(var O=g.p,m=0;m<y.o.length-1;m++)g.o=[y.o.pop()],g.p=O.slice(),f(g),p.push(g);f(y)}}else y.na!=null&&g.na!=null?p[p.length-1]={p:y.p,na:y.na+g.na}:y.li!==void 0&&g.li===void 0&&g.ld===y.li?y.ld!==void 0?delete y.li:p.pop():y.od!==void 0&&y.oi===void 0&&g.oi!==void 0&&g.od===void 0?y.oi=g.oi:y.oi!==void 0&&g.od!==void 0?g.oi!==void 0?y.oi=g.oi:y.od!==void 0?delete y.oi:p.pop():g.lm!==void 0&&g.p[g.p.length-1]===g.lm||p.push(g);else(g.si!=null||g.sd!=null)&&(y.si!=null||y.sd!=null)&&(f(g),f(y)),p.push(g)},a.compose=function(p,g){a.checkValidOp(p),a.checkValidOp(g);for(var y=l(p),O=0;O<g.length;O++)a.append(y,g[O]);return y},a.normalize=function(p){var g=[];p=o(p)?p:[p];for(var y=0;y<p.length;y++){var O=p[y];O.p==null&&(O.p=[]),a.append(g,O)}return g},a.commonLengthForOps=function(p,g){var y=p.p.length,O=g.p.length;if((p.na!=null||p.t)&&y++,(g.na!=null||g.t)&&O++,y===0)return-1;if(O===0)return null;y--,O--;for(var m=0;m<y;m++){var v=p.p[m];if(m>=O||v!==g.p[m])return null}return y},a.canOpAffectPath=function(p,g){return a.commonLengthForOps({p:g},p)!=null},a.transformComponent=function(p,g,y,O){g=l(g);var m=a.commonLengthForOps(y,g),v=a.commonLengthForOps(g,y),b=g.p.length,P=y.p.length;if((g.na!=null||g.t)&&b++,(y.na!=null||y.t)&&P++,v!=null&&P>b&&g.p[v]==y.p[v]){if(g.ld!==void 0){var E=l(y);E.p=E.p.slice(b),g.ld=a.apply(l(g.ld),[E])}else if(g.od!==void 0){var E=l(y);E.p=E.p.slice(b),g.od=a.apply(l(g.od),[E])}}if(m!=null){var T=b==P,E=y;if((g.si!=null||g.sd!=null)&&(y.si!=null||y.sd!=null)&&(c(g),E=l(y),c(E)),E.t&&u[E.t]){if(g.t&&g.t===E.t){var w=u[g.t].transform(g.o,E.o,O);if(g.si!=null||g.sd!=null)for(var k=g.p,C=0;C<w.length;C++)g.o=[w[C]],g.p=k.slice(),f(g),a.append(p,g);else(!o(w)||w.length>0)&&(g.o=w,a.append(p,g));return p}}else if(y.na===void 0){if(y.li!==void 0&&y.ld!==void 0){if(y.p[m]===g.p[m])if(T){if(g.ld!==void 0)if(g.li!==void 0&&O==="left")g.ld=l(y.li);else return p}else return p}else if(y.li!==void 0)g.li!==void 0&&g.ld===void 0&&T&&g.p[m]===y.p[m]?O==="right"&&g.p[m]++:y.p[m]<=g.p[m]&&g.p[m]++,g.lm!==void 0&&T&&y.p[m]<=g.lm&&g.lm++;else if(y.ld!==void 0){if(g.lm!==void 0&&T){if(y.p[m]===g.p[m])return p;var k=y.p[m],Q=g.p[m],M=g.lm;(k<M||k===M&&Q<M)&&g.lm--}if(y.p[m]<g.p[m])g.p[m]--;else if(y.p[m]===g.p[m]){if(P<b)return p;if(g.ld!==void 0)if(g.li!==void 0)delete g.ld;else return p}}else if(y.lm!==void 0)if(g.lm!==void 0&&b===P){var Q=g.p[m],M=g.lm,L=y.p[m],V=y.lm;if(L!==V)if(Q===L)if(O==="left")g.p[m]=V,Q===M&&(g.lm=V);else return p;else Q>L&&g.p[m]--,Q>V?g.p[m]++:Q===V&&L>V&&(g.p[m]++,Q===M&&g.lm++),(M>L||M===L&&M>Q)&&g.lm--,M>V?g.lm++:M===V&&(V>L&&M>Q||V<L&&M<Q?O==="right"&&g.lm++:M>Q?g.lm++:M===L&&g.lm--)}else if(g.li!==void 0&&g.ld===void 0&&T){var Q=y.p[m],M=y.lm;k=g.p[m],k>Q&&g.p[m]--,k>M&&g.p[m]++}else{var Q=y.p[m],M=y.lm;k=g.p[m],k===Q?g.p[m]=M:(k>Q&&g.p[m]--,(k>M||k===M&&Q>M)&&g.p[m]++)}else if(y.oi!==void 0&&y.od!==void 0){if(g.p[m]===y.p[m])if(g.oi!==void 0&&T){if(O==="right")return p;g.od=y.oi}else return p}else if(y.oi!==void 0){if(g.oi!==void 0&&g.p[m]===y.p[m])if(O==="left")a.append(p,{p:g.p,od:y.oi});else return p}else if(y.od!==void 0&&g.p[m]==y.p[m]){if(!T)return p;if(g.oi!==void 0)delete g.od;else return p}}}return a.append(p,g),p},n("./bootstrapTransform")(a,a.transformComponent,a.checkValidOp,a.append);var d=n("./text0");a.registerSubtype(d),r.exports=a},{"./bootstrapTransform":5,"./text0":8}],8:[function(n,r,i){var o=r.exports={name:"text0",uri:"http://sharejs.org/types/textv0",create:function(d){if(d!=null&&typeof d!="string")throw new Error("Initial data must be a string");return d||""}},s=function(d,p,g){return d.slice(0,p)+g+d.slice(p)},l=function(d){if(typeof d.p!="number")throw new Error("component missing position field");if(typeof d.i=="string"==(typeof d.d=="string"))throw new Error("component needs an i or d field");if(d.p<0)throw new Error("position cannot be negative")},a=function(d){for(var p=0;p<d.length;p++)l(d[p])};o.apply=function(d,p){var g;a(p);for(var y=0;y<p.length;y++){var O=p[y];if(O.i!=null)d=s(d,O.p,O.i);else{if(g=d.slice(O.p,O.p+O.d.length),O.d!==g)throw new Error("Delete component '"+O.d+"' does not match deleted text '"+g+"'");d=d.slice(0,O.p)+d.slice(O.p+O.d.length)}}return d};var u=o._append=function(d,p){if(!(p.i===""||p.d===""))if(d.length===0)d.push(p);else{var g=d[d.length-1];g.i!=null&&p.i!=null&&g.p<=p.p&&p.p<=g.p+g.i.length?d[d.length-1]={i:s(g.i,p.p-g.p,p.i),p:g.p}:g.d!=null&&p.d!=null&&p.p<=g.p&&g.p<=p.p+p.d.length?d[d.length-1]={d:s(p.d,g.p-p.p,g.d),p:p.p}:d.push(p)}};o.compose=function(d,p){a(d),a(p);for(var g=d.slice(),y=0;y<p.length;y++)u(g,p[y]);return g},o.normalize=function(d){var p=[];(d.i!=null||d.p!=null)&&(d=[d]);for(var g=0;g<d.length;g++){var y=d[g];y.p==null&&(y.p=0),u(p,y)}return p};var c=function(d,p,g){return p.i!=null?p.p<d||p.p===d&&g?d+p.i.length:d:d<=p.p?d:d<=p.p+p.d.length?p.p:d-p.d.length};o.transformCursor=function(d,p,g){for(var y=g==="right",O=0;O<p.length;O++)d=c(d,p[O],y);return d};var f=o._tc=function(d,p,g,y){if(l(p),l(g),p.i!=null)u(d,{i:p.i,p:c(p.p,g,y==="right")});else if(g.i!=null){var O=p.d;p.p<g.p&&(u(d,{d:O.slice(0,g.p-p.p),p:p.p}),O=O.slice(g.p-p.p)),O!==""&&u(d,{d:O,p:p.p+g.i.length})}else if(p.p>=g.p+g.d.length)u(d,{d:p.d,p:p.p-g.d.length});else if(p.p+p.d.length<=g.p)u(d,p);else{var m={d:"",p:p.p};p.p<g.p&&(m.d=p.d.slice(0,g.p-p.p)),p.p+p.d.length>g.p+g.d.length&&(m.d+=p.d.slice(g.p+g.d.length-p.p));var v=Math.max(p.p,g.p),b=Math.min(p.p+p.d.length,g.p+g.d.length),P=p.d.slice(v-p.p,b-p.p),E=g.d.slice(v-g.p,b-g.p);if(P!==E)throw new Error("Delete ops delete different text in the same region of the document");m.d!==""&&(m.p=c(m.p,g),u(d,m))}return d},h=function(d){return d.i!=null?{d:d.i,p:d.p}:{i:d.d,p:d.p}};o.invert=function(d){d=d.slice().reverse();for(var p=0;p<d.length;p++)d[p]=h(d[p]);return d},n("./bootstrapTransform")(o,f,a,u)},{"./bootstrapTransform":5}],9:[function(n,r,i){var o=r.exports={},s,l;function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=a}catch{s=a}try{typeof clearTimeout=="function"?l=clearTimeout:l=u}catch{l=u}})();function c(b){if(s===setTimeout)return setTimeout(b,0);if((s===a||!s)&&setTimeout)return s=setTimeout,setTimeout(b,0);try{return s(b,0)}catch{try{return s.call(null,b,0)}catch{return s.call(this,b,0)}}}function f(b){if(l===clearTimeout)return clearTimeout(b);if((l===u||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(b);try{return l(b)}catch{try{return l.call(null,b)}catch{return l.call(this,b)}}}var h=[],d=!1,p,g=-1;function y(){!d||!p||(d=!1,p.length?h=p.concat(h):g=-1,h.length&&O())}function O(){if(!d){var b=c(y);d=!0;for(var P=h.length;P;){for(p=h,h=[];++g<P;)p&&p[g].run();g=-1,P=h.length}p=null,d=!1,f(b)}}o.nextTick=function(b){var P=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)P[E-1]=arguments[E];h.push(new m(b,P)),h.length===1&&!d&&c(O)};function m(b,P){this.fun=b,this.array=P}m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function v(){}o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(b){return[]},o.binding=function(b){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(b){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],10:[function(n,r,i){var o=n("./doc"),s=n("./query"),l=n("./presence/presence"),a=n("./presence/doc-presence"),u=n("./snapshot-request/snapshot-version-request"),c=n("./snapshot-request/snapshot-timestamp-request"),f=n("../emitter"),h=n("../error"),d=n("../message-actions").ACTIONS,p=n("../types"),g=n("../util"),y=n("../logger"),O=n("./presence/doc-presence-emitter"),m=h.CODES;function v(w){return w.readyState===0||w.readyState===1?"connecting":"disconnected"}r.exports=b;function b(w){f.EventEmitter.call(this),this.collections={},this.nextQueryId=1,this.nextSnapshotRequestId=1,this.queries={},this._presences={},this._docPresenceEmitter=new O,this._snapshotRequests={},this.seq=1,this._presenceSeq=1,this.id=null,this.agent=null,this.debug=!1,this.state=v(w),this.bindToSocket(w)}f.mixin(b),b.prototype.bindToSocket=function(w){this.socket&&(this.socket.close(),this.socket.onmessage=null,this.socket.onopen=null,this.socket.onerror=null,this.socket.onclose=null),this.socket=w;var k=v(w);this._setState(k),this.canSend=!1;var C=this;w.onmessage=function(Q){try{var M=typeof Q.data=="string"?JSON.parse(Q.data):Q.data}catch{y.warn("Failed to parse message",Q);return}C.debug&&y.info("RECV",JSON.stringify(M));var L={data:M};if(C.emit("receive",L),!!L.data)try{C.handleMessage(L.data)}catch(V){g.nextTick(function(){C.emit("error",V)})}},w.readyState===1&&C._initializeHandshake(),w.onopen=function(){C._setState("connecting"),C._initializeHandshake()},w.onerror=function(Q){C.emit("connection error",Q)},w.onclose=function(Q){Q==="closed"||Q==="Closed"?C._setState("closed",Q):Q==="stopped"||Q==="Stopped by server"?C._setState("stopped",Q):C._setState("disconnected",Q)}},b.prototype.handleMessage=function(w){var k=null;switch(w.error&&(k=P(w.error,w),delete w.error),w.a){case d.initLegacy:return this._handleLegacyInit(w);case d.handshake:return this._handleHandshake(k,w);case d.queryFetch:var C=this.queries[w.id];C&&C._handleFetch(k,w.data,w.extra);return;case d.querySubscribe:var C=this.queries[w.id];C&&C._handleSubscribe(k,w.data,w.extra);return;case d.queryUnsubscribe:return;case d.queryUpdate:var C=this.queries[w.id];if(!C)return;if(k)return C._handleError(k);w.diff&&C._handleDiff(w.diff),w.hasOwnProperty("extra")&&C._handleExtra(w.extra);return;case d.bulkFetch:return this._handleBulkMessage(k,w,"_handleFetch");case d.bulkSubscribe:case d.bulkUnsubscribe:return this._handleBulkMessage(k,w,"_handleSubscribe");case d.snapshotFetch:case d.snapshotFetchByTimestamp:return this._handleSnapshotFetch(k,w);case d.fetch:var Q=this.getExisting(w.c,w.d);Q&&Q._handleFetch(k,w.data);return;case d.subscribe:case d.unsubscribe:var Q=this.getExisting(w.c,w.d);Q&&Q._handleSubscribe(k,w.data);return;case d.op:var Q=this.getExisting(w.c,w.d);Q&&Q._handleOp(k,w);return;case d.presence:return this._handlePresence(k,w);case d.presenceSubscribe:return this._handlePresenceSubscribe(k,w);case d.presenceUnsubscribe:return this._handlePresenceUnsubscribe(k,w);case d.presenceRequest:return this._handlePresenceRequest(k,w);case d.pingPong:return this._handlePingPong(k);default:y.warn("Ignoring unrecognized message",w)}};function P(w,k){var C=new Error(w.message);return C.code=w.code,k&&(C.data=k),C}b.prototype._handleBulkMessage=function(w,k,C){if(k.data)for(var Q in k.data){var M=k.data[Q],L=this.getExisting(k.c,Q);L&&(w?L[C](w):M.error?L[C](P(M.error)):L[C](null,M))}else if(Array.isArray(k.b))for(var V=0;V<k.b.length;V++){var Q=k.b[V],L=this.getExisting(k.c,Q);L&&L[C](w)}else if(k.b)for(var Q in k.b){var L=this.getExisting(k.c,Q);L&&L[C](w)}else y.error("Invalid bulk message",k)},b.prototype._reset=function(){this.agent=null},b.prototype._setState=function(w,k){if(this.state!==w){if(w==="connecting"&&this.state!=="disconnected"&&this.state!=="stopped"&&this.state!=="closed"||w==="connected"&&this.state!=="connecting"){var C=new h(m.ERR_CONNECTION_STATE_TRANSITION_INVALID,"Cannot transition directly from "+this.state+" to "+w);return this.emit("error",C)}this.state=w,this.canSend=w==="connected",(w==="disconnected"||w==="stopped"||w==="closed")&&this._reset(),this.startBulk();for(var Q in this.queries){var M=this.queries[Q];M._onConnectionStateChanged()}for(var L in this.collections){var V=this.collections[L];for(var Q in V)V[Q]._onConnectionStateChanged()}for(var G in this._presences)this._presences[G]._onConnectionStateChanged();for(var Q in this._snapshotRequests){var D=this._snapshotRequests[Q];D._onConnectionStateChanged()}this.endBulk(),this.emit(w,k),this.emit("state",w,k)}},b.prototype.startBulk=function(){this.bulk||(this.bulk={})},b.prototype.endBulk=function(){if(this.bulk)for(var w in this.bulk){var k=this.bulk[w];this._sendBulk("f",w,k.f),this._sendBulk("s",w,k.s),this._sendBulk("u",w,k.u)}this.bulk=null},b.prototype._sendBulk=function(w,k,C){if(C){var Q=[],M={},L=0,V;for(var G in C){var D=C[G];D==null?Q.push(G):(M[G]=D,V=G,L++)}if(Q.length===1){var G=Q[0];this.send({a:w,c:k,d:G})}else Q.length&&this.send({a:"b"+w,c:k,b:Q});if(L===1){var N=M[V];this.send({a:w,c:k,d:V,v:N})}else L&&this.send({a:"b"+w,c:k,b:M})}},b.prototype._sendActions=function(w,k,C){if(this._addDoc(k),this.bulk){var Q=this.bulk[k.collection]||(this.bulk[k.collection]={}),M=Q[w]||(Q[w]={}),L=M.hasOwnProperty(k.id);return M[k.id]=C,L}else{var V={a:w,c:k.collection,d:k.id,v:C};this.send(V)}},b.prototype.sendFetch=function(w){return this._sendActions(d.fetch,w,w.version)},b.prototype.sendSubscribe=function(w){return this._sendActions(d.subscribe,w,w.version)},b.prototype.sendUnsubscribe=function(w){return this._sendActions(d.unsubscribe,w)},b.prototype.sendOp=function(w,k){this._addDoc(w);var C={a:d.op,c:w.collection,d:w.id,v:w.version,src:k.src,seq:k.seq,x:{}};"op"in k&&(C.op=k.op),k.create&&(C.create=k.create),k.del&&(C.del=k.del),w.submitSource&&(C.x.source=k.source),this.send(C)},b.prototype.send=function(w){this.debug&&y.info("SEND",JSON.stringify(w)),this.emit("send",w),this.socket.send(JSON.stringify(w))},b.prototype.ping=function(){if(!this.canSend)throw new h(m.ERR_CANNOT_PING_OFFLINE,"Socket must be CONNECTED to ping");var w={a:d.pingPong};this.send(w)},b.prototype.close=function(){this.socket.close()},b.prototype.getExisting=function(w,k){if(this.collections[w])return this.collections[w][k]},b.prototype.get=function(w,k){var C=this.collections[w]||(this.collections[w]={}),Q=C[k];return Q||(Q=C[k]=new o(this,w,k),this.emit("doc",Q)),Q._wantsDestroy=!1,Q},b.prototype._destroyDoc=function(w){w._wantsDestroy&&(g.digAndRemove(this.collections,w.collection,w.id),w.emit("destroy"))},b.prototype._addDoc=function(w){var k=this.collections[w.collection];k||(k=this.collections[w.collection]={}),k[w.id]!==w&&(k[w.id]=w)},b.prototype._createQuery=function(w,k,C,Q,M){var L=this.nextQueryId++,V=new s(w,this,L,k,C,Q,M);return this.queries[L]=V,V.send(),V},b.prototype._destroyQuery=function(w){delete this.queries[w.id]},b.prototype.createFetchQuery=function(w,k,C,Q){return this._createQuery(d.queryFetch,w,k,C,Q)},b.prototype.createSubscribeQuery=function(w,k,C,Q){return this._createQuery(d.querySubscribe,w,k,C,Q)},b.prototype.hasPending=function(){return!!(this._firstDoc(E)||this._firstQuery(E)||this._firstSnapshotRequest())};function E(w){return w.hasPending()}b.prototype.hasWritePending=function(){return!!this._firstDoc(T)};function T(w){return w.hasWritePending()}b.prototype.whenNothingPending=function(w){var k=this._firstDoc(E);if(k){k.once("nothing pending",this._nothingPendingRetry(w));return}var C=this._firstQuery(E);if(C){C.once("ready",this._nothingPendingRetry(w));return}var Q=this._firstSnapshotRequest();if(Q){Q.once("ready",this._nothingPendingRetry(w));return}g.nextTick(w)},b.prototype._nothingPendingRetry=function(w){var k=this;return function(){g.nextTick(function(){k.whenNothingPending(w)})}},b.prototype._firstDoc=function(w){for(var k in this.collections){var C=this.collections[k];for(var Q in C){var M=C[Q];if(w(M))return M}}},b.prototype._firstQuery=function(w){for(var k in this.queries){var C=this.queries[k];if(w(C))return C}},b.prototype._firstSnapshotRequest=function(){for(var w in this._snapshotRequests)return this._snapshotRequests[w]},b.prototype.fetchSnapshot=function(w,k,C,Q){typeof C=="function"&&(Q=C,C=null);var M=this.nextSnapshotRequestId++,L=new u(this,M,w,k,C,Q);this._snapshotRequests[L.requestId]=L,L.send()},b.prototype.fetchSnapshotByTimestamp=function(w,k,C,Q){typeof C=="function"&&(Q=C,C=null);var M=this.nextSnapshotRequestId++,L=new c(this,M,w,k,C,Q);this._snapshotRequests[L.requestId]=L,L.send()},b.prototype._handleSnapshotFetch=function(w,k){var C=this._snapshotRequests[k.id];C&&(delete this._snapshotRequests[k.id],C._handleResponse(w,k))},b.prototype._handleLegacyInit=function(w){if(w.protocolMinor)return this._initializeHandshake();this._initialize(w)},b.prototype._initializeHandshake=function(){this.send({a:d.handshake,id:this.id})},b.prototype._handleHandshake=function(w,k){if(w)return this.emit("error",w);this._initialize(k)},b.prototype._handlePingPong=function(w){if(w)return this.emit("error",w);this.emit("pong")},b.prototype._initialize=function(w){if(this.state==="connecting"){if(w.protocol!==1)return this.emit("error",new h(m.ERR_PROTOCOL_VERSION_NOT_SUPPORTED,"Unsupported protocol version: "+w.protocol));if(p.map[w.type]!==p.defaultType)return this.emit("error",new h(m.ERR_DEFAULT_TYPE_MISMATCH,w.type+" does not match the server default type"));if(typeof w.id!="string")return this.emit("error",new h(m.ERR_CLIENT_ID_BADLY_FORMED,"Client id must be a string"));this.id=w.id,this._setState("connected")}},b.prototype.getPresence=function(w){var k=this,C=g.digOrCreate(this._presences,w,function(){return new l(k,w)});return C._wantsDestroy=!1,C},b.prototype.getDocPresence=function(w,k){var C=a.channel(w,k),Q=this,M=g.digOrCreate(this._presences,C,function(){return new a(Q,w,k)});return M._wantsDestroy=!1,M},b.prototype._sendPresenceAction=function(w,k,C){this._addPresence(C);var Q={a:w,ch:C.channel,seq:k};return this.send(Q),Q.seq},b.prototype._addPresence=function(w){g.digOrCreate(this._presences,w.channel,function(){return w})},b.prototype._handlePresenceSubscribe=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._handleSubscribe(w,k.seq)},b.prototype._handlePresenceUnsubscribe=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._handleUnsubscribe(w,k.seq)},b.prototype._handlePresence=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._receiveUpdate(w,k)},b.prototype._handlePresenceRequest=function(w,k){var C=g.dig(this._presences,k.ch);C&&C._broadcastAllLocalPresence(w,k)}},{"../emitter":24,"../error":25,"../logger":26,"../message-actions":28,"../types":31,"../util":32,"./doc":11,"./presence/doc-presence":14,"./presence/doc-presence-emitter":13,"./presence/presence":17,"./query":20,"./snapshot-request/snapshot-timestamp-request":22,"./snapshot-request/snapshot-version-request":23}],11:[function(n,r,i){var o=n("../emitter"),s=n("../logger"),l=n("../error"),a=n("../types"),u=n("../util"),c=u.clone,f=n("fast-deep-equal"),h=n("../message-actions").ACTIONS,d=l.CODES;r.exports=p;function p(m,v,b){o.EventEmitter.call(this),this.connection=m,this.collection=v,this.id=b,this.version=null,this.type=null,this.data=void 0,this.inflightFetch=[],this.inflightSubscribe=null,this.pendingFetch=[],this.pendingSubscribe=[],this.subscribed=!1,this.wantSubscribe=!1,this._wantsDestroy=!1,this.inflightOp=null,this.pendingOps=[],this.type=null,this.applyStack=null,this.preventCompose=!1,this.submitSource=!1,this.paused=!1,this._dataStateVersion=0}o.mixin(p),p.prototype.destroy=function(m){this._wantsDestroy=!0;var v=this;v.whenNothingPending(function(){v.wantSubscribe?v.unsubscribe(function(b){if(b)return m?m(b):v.emit("error",b);v.connection._destroyDoc(v),m&&m()}):(v.connection._destroyDoc(v),m&&m())})},p.prototype._setType=function(m){if(typeof m=="string"&&(m=a.map[m]),m)this.type=m;else if(m===null)this.type=m,this._setData(void 0);else{var v=new l(d.ERR_DOC_TYPE_NOT_RECOGNIZED,"Missing type "+m);return this.emit("error",v)}},p.prototype._setData=function(m){this.data=m,this._dataStateVersion++},p.prototype.ingestSnapshot=function(m,v){if(!m)return v&&v();if(typeof m.v!="number"){var b=new l(d.ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION,"Missing version in ingested snapshot. "+this.collection+"."+this.id);return v?v(b):this.emit("error",b)}if(this.type||this.hasWritePending()){if(this.version==null){if(this.hasWritePending())return v&&this.once("no write pending",v);var b=new l(d.ERR_DOC_MISSING_VERSION,"Cannot ingest snapshot in doc with null version. "+this.collection+"."+this.id);return v?v(b):this.emit("error",b)}return m.v>this.version?this.fetch(v):v&&v()}if(this.version>m.v)return v&&v();this.version=m.v;var P=m.type===void 0?a.defaultType:m.type;this._setType(P),this._setData(this.type&&this.type.deserialize?this.type.deserialize(m.data):m.data),this.emit("load"),v&&v()},p.prototype.whenNothingPending=function(m){var v=this;u.nextTick(function(){if(v.hasPending()){v.once("nothing pending",m);return}m()})},p.prototype.hasPending=function(){return!!(this.inflightOp||this.pendingOps.length||this.inflightFetch.length||this.inflightSubscribe||this.pendingFetch.length||this.pendingSubscribe.length)},p.prototype.hasWritePending=function(){return!!(this.inflightOp||this.pendingOps.length)},p.prototype._emitNothingPending=function(){this.hasWritePending()||(this.emit("no write pending"),!this.hasPending()&&this.emit("nothing pending"))},p.prototype._emitResponseError=function(m,v){if(m&&m.code===d.ERR_SNAPSHOT_READ_SILENT_REJECTION){this.wantSubscribe=!1,v&&v(),this._emitNothingPending();return}if(v){v(m),this._emitNothingPending();return}this._emitNothingPending(),this.emit("error",m)},p.prototype._handleFetch=function(m,v){var b=this.pendingFetch;this.pendingFetch=[];var P=this.inflightFetch.shift();if(P&&b.push(P),b.length&&(P=function(E){u.callEach(b,E)}),m)return this._emitResponseError(m,P);this.ingestSnapshot(v,P),this._emitNothingPending()},p.prototype._handleSubscribe=function(m,v){var b=this.inflightSubscribe;this.inflightSubscribe=null;var P=this.pendingFetch;this.pendingFetch=[],b.callback&&P.push(b.callback);var E;if(P.length&&(E=function(T){u.callEach(P,T)}),m)return this._emitResponseError(m,E);this.subscribed=b.wantSubscribe,this.subscribed?this.ingestSnapshot(v,E):E&&E(),this._emitNothingPending(),this._flushSubscribe()},p.prototype._handleOp=function(m,v){if(m)return this.inflightOp?(m.code===d.ERR_OP_SUBMIT_REJECTED&&(m=null),this._rollback(m)):this.emit("error",m);if(this.inflightOp&&v.src===this.inflightOp.src&&v.seq===this.inflightOp.seq){this._opAcknowledged(v);return}if(this.version==null||v.v>this.version){this.fetch();return}if(!(v.v<this.version)){if(this.inflightOp){var b=O(this.inflightOp,v);if(b)return this._hardRollback(b)}for(var P=0;P<this.pendingOps.length;P++){var b=O(this.pendingOps[P],v);if(b)return this._hardRollback(b)}this.version++;try{this._otApply(v,!1)}catch(E){return this._hardRollback(E)}}},p.prototype._onConnectionStateChanged=function(){this.connection.canSend?(this.flush(),this._resubscribe()):(this.inflightOp&&(this.pendingOps.unshift(this.inflightOp),this.inflightOp=null),this.subscribed=!1,this.inflightSubscribe&&(this.inflightSubscribe.wantSubscribe?(this.pendingSubscribe.unshift(this.inflightSubscribe),this.inflightSubscribe=null):this._handleSubscribe()),this.inflightFetch.length&&(this.pendingFetch=this.pendingFetch.concat(this.inflightFetch),this.inflightFetch.length=0))},p.prototype._resubscribe=function(){if(!this.pendingSubscribe.length&&this.wantSubscribe)return this.subscribe();var m=this.pendingSubscribe.some(function(v){return v.wantSubscribe});!m&&this.pendingFetch.length&&this.fetch(),this._flushSubscribe()},p.prototype.fetch=function(m){this._fetch({},m)},p.prototype._fetch=function(m,v){this.pendingFetch.push(v);var b=this.connection.canSend&&(m.force||!this.inflightFetch.length);b&&(this.inflightFetch.push(this.pendingFetch.shift()),this.connection.sendFetch(this))},p.prototype.subscribe=function(m){var v=!0;this._queueSubscribe(v,m)},p.prototype.unsubscribe=function(m){var v=!1;this._queueSubscribe(v,m)},p.prototype._queueSubscribe=function(m,v){var b=this.pendingSubscribe[this.pendingSubscribe.length-1]||this.inflightSubscribe,P=b&&b.wantSubscribe===m;if(P){b.callback=g([b.callback,v]);return}this.pendingSubscribe.push({wantSubscribe:!!m,callback:v}),this._flushSubscribe()},p.prototype._flushSubscribe=function(){if(!(this.inflightSubscribe||!this.pendingSubscribe.length)){if(this.connection.canSend){this.inflightSubscribe=this.pendingSubscribe.shift(),this.wantSubscribe=this.inflightSubscribe.wantSubscribe,this.wantSubscribe?this.connection.sendSubscribe(this):(this.subscribed=!1,this.connection.sendUnsubscribe(this));return}if(!this.pendingSubscribe[0].wantSubscribe){this.inflightSubscribe=this.pendingSubscribe.shift();var m=this;u.nextTick(function(){m._handleSubscribe()})}}};function g(m){return m=m.filter(u.truthy),m.length?function(v){u.callEach(m,v)}:null}p.prototype.flush=function(){!this.connection.canSend||this.inflightOp||!this.paused&&this.pendingOps.length&&this._sendOp()};function y(m){delete m.op,delete m.create,delete m.del}function O(m,v){if(m.del)return y(v);if(v.del)return new l(d.ERR_DOC_WAS_DELETED,"Document was deleted");if(v.create)return new l(d.ERR_DOC_ALREADY_CREATED,"Document already created");if("op"in v){if(m.create)return new l(d.ERR_DOC_ALREADY_CREATED,"Document already created");if(m.type.transformX){var b=m.type.transformX(m.op,v.op);m.op=b[0],v.op=b[1]}else{var P=m.type.transform(m.op,v.op,"left"),E=m.type.transform(v.op,m.op,"right");m.op=P,v.op=E}}}p.prototype._otApply=function(m,v){if("op"in m){if(!this.type)throw new l(d.ERR_DOC_DOES_NOT_EXIST,"Cannot apply op to uncreated document. "+this.collection+"."+this.id);if(this.emit("before op batch",m.op,v),!v&&this.type===a.defaultType&&m.op.length>1){this.applyStack||(this.applyStack=[]);for(var b=this.applyStack.length,P=0;P<m.op.length;P++){var E=m.op[P],T={op:[E]};this.emit("before op",T.op,v,m.src);for(var w=b;w<this.applyStack.length;w++){var k=O(this.applyStack[w],T);if(k)return this._hardRollback(k)}this._setData(this.type.apply(this.data,T.op)),this.emit("op",T.op,v,m.src)}this.emit("op batch",m.op,v),this._popApplyStack(b);return}this.emit("before op",m.op,v,m.src),this._setData(this.type.apply(this.data,m.op)),this.emit("op",m.op,v,m.src),this.emit("op batch",m.op,v);return}if(m.create){this._setType(m.create.type),this.type.deserialize?this.type.createDeserialized?this._setData(this.type.createDeserialized(m.create.data)):this._setData(this.type.deserialize(this.type.create(m.create.data))):this._setData(this.type.create(m.create.data)),this.emit("create",v);return}if(m.del){var C=this.data;this._setType(null),this.emit("del",C,v);return}},p.prototype._sendOp=function(){if(this.connection.canSend){var m=this.connection.id;this.inflightOp||(this.inflightOp=this.pendingOps.shift());var v=this.inflightOp;if(!v){var b=new l(d.ERR_INFLIGHT_OP_MISSING,"No op to send on call to _sendOp");return this.emit("error",b)}if(v.sentAt=Date.now(),v.retries=v.retries==null?0:v.retries+1,v.seq==null){if(this.connection.seq>=u.MAX_SAFE_INTEGER)return this.emit("error",new l(d.ERR_CONNECTION_SEQ_INTEGER_OVERFLOW,"Connection seq has exceeded the max safe integer, maybe from being open for too long"));v.seq=this.connection.seq++}this.connection.sendOp(this,v),v.src==null&&(v.src=m)}},p.prototype._submit=function(m,v,b){if(v||(v=!0),"op"in m){if(!this.type){var P=new l(d.ERR_DOC_DOES_NOT_EXIST,"Cannot submit op. Document has not been created. "+this.collection+"."+this.id);return b?b(P):this.emit("error",P)}this.type.normalize&&(m.op=this.type.normalize(m.op))}try{this._pushOp(m,v,b),this._otApply(m,v)}catch(T){return this._hardRollback(T)}var E=this;u.nextTick(function(){E.flush()})},p.prototype._pushOp=function(m,v,b){if(m.source=v,this.applyStack)this.applyStack.push(m);else{var P=this._tryCompose(m);if(P){P.callbacks.push(b);return}}m.type=this.type,m.callbacks=[b],this.pendingOps.push(m)},p.prototype._popApplyStack=function(m){if(m>0){this.applyStack.length=m;return}var v=this.applyStack[0];if(this.applyStack=null,!!v){var b=this.pendingOps.indexOf(v);if(b!==-1)for(var P=this.pendingOps.splice(b),b=0;b<P.length;b++){var v=P[b],E=this._tryCompose(v);E?E.callbacks=E.callbacks.concat(v.callbacks):this.pendingOps.push(v)}}},p.prototype._tryCompose=function(m){if(!this.preventCompose){var v=this.pendingOps[this.pendingOps.length-1];if(!(!v||v.sentAt)&&!(this.submitSource&&!f(m.source,v.source))){if(v.create&&"op"in m)return v.create.data=this.type.apply(v.create.data,m.op),v;if("op"in v&&"op"in m&&this.type.compose)return v.op=this.type.compose(v.op,m.op),v}}},p.prototype.submitOp=function(m,v,b){typeof v=="function"&&(b=v,v=null);var P={op:m},E=v&&v.source;this._submit(P,E,b)},p.prototype.create=function(m,v,b,P){if(typeof v=="function"?(P=v,b=null,v=null):typeof b=="function"&&(P=b,b=null),v||(v=a.defaultType.uri),this.type){var E=new l(d.ERR_DOC_ALREADY_CREATED,"Document already exists");return P?P(E):this.emit("error",E)}var T={create:{type:v,data:m}},w=b&&b.source;this._submit(T,w,P)},p.prototype.del=function(m,v){if(typeof m=="function"&&(v=m,m=null),!this.type){var b=new l(d.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");return v?v(b):this.emit("error",b)}var P={del:!0},E=m&&m.source;this._submit(P,E,v)},p.prototype.pause=function(){this.paused=!0},p.prototype.resume=function(){this.paused=!1,this.flush()},p.prototype.toSnapshot=function(){return{v:this.version,data:c(this.data),type:this.type.uri}},p.prototype._opAcknowledged=function(m){if(this.inflightOp.create)this.version=m.v;else if(m.v!==this.version)return s.warn("Invalid version from server. Expected: "+this.version+" Received: "+m.v,m),this.fetch();if(m[h.fixup])for(var v=0;v<m[h.fixup].length;v++){for(var b=m[h.fixup][v],P=0;P<this.pendingOps.length;P++){var E=O(this.pendingOps[v],b);if(E)return this._hardRollback(E)}try{this._otApply(b,!1)}catch(T){return this._hardRollback(T)}}this.version++,this._clearInflightOp()},p.prototype._rollback=function(m){var v=this.inflightOp;if("op"in v&&v.type.invert){try{v.op=v.type.invert(v.op)}catch{return this._hardRollback(m)}for(var b=0;b<this.pendingOps.length;b++){var P=O(this.pendingOps[b],v);if(P)return this._hardRollback(P)}try{this._otApply(v,!1)}catch(E){return this._hardRollback(E)}this._clearInflightOp(m);return}this._hardRollback(m)},p.prototype._hardRollback=function(m){var v=[];this.inflightOp&&v.push(this.inflightOp),v=v.concat(this.pendingOps),this._setType(null),this.version=null,this.inflightOp=null,this.pendingOps=[];var b=this;this._fetch({force:!0},function(){for(var P=!!v.length,E=0;E<v.length;E++)P=u.callEach(v[E].callbacks,m)&&P;if(m&&!P)return b.emit("error",m)})},p.prototype._clearInflightOp=function(m){var v=this.inflightOp;this.inflightOp=null;var b=u.callEach(v.callbacks,m);if(this.flush(),this._emitNothingPending(),m&&!b)return this.emit("error",m)}},{"../emitter":24,"../error":25,"../logger":26,"../message-actions":28,"../types":31,"../util":32,"fast-deep-equal":3}],12:[function(n,r,i){i.Connection=n("./connection"),i.Doc=n("./doc"),i.Error=n("../error"),i.Query=n("./query"),i.types=n("../types"),i.logger=n("../logger")},{"../error":25,"../logger":26,"../types":31,"./connection":10,"./doc":11,"./query":20}],13:[function(n,r,i){var o=n("../../util"),s=n("events").EventEmitter,l=["create","del","destroy","load","op"];r.exports=a;function a(){this._docs={},this._forwarders={},this._emitters={}}a.prototype.addEventListener=function(u,c,f){this._registerDoc(u);var h=o.dig(this._emitters,u.collection,u.id);h.on(c,f)},a.prototype.removeEventListener=function(u,c,f){var h=o.dig(this._emitters,u.collection,u.id);h&&(h.off(c,f),h._eventsCount===1&&this._unregisterDoc(u))},a.prototype._registerDoc=function(u){var c=!0;if(o.digOrCreate(this._docs,u.collection,u.id,function(){return c=!1,u}),!c){var f=o.digOrCreate(this._emitters,u.collection,u.id,function(){var d=new s;return d.setMaxListeners(1e3),d}),h=this;l.forEach(function(d){var p=o.digOrCreate(h._forwarders,u.collection,u.id,d,function(){return f.emit.bind(f,d)});u.on(d,p)}),this.addEventListener(u,"destroy",this._unregisterDoc.bind(this,u))}},a.prototype._unregisterDoc=function(u){var c=o.dig(this._forwarders,u.collection,u.id);for(var f in c)u.off(f,c[f]);var h=o.dig(this._emitters,u.collection,u.id);h.removeAllListeners(),o.digAndRemove(this._forwarders,u.collection,u.id),o.digAndRemove(this._emitters,u.collection,u.id),o.digAndRemove(this._docs,u.collection,u.id)}},{"../../util":32,events:2}],14:[function(n,r,i){var o=n("./presence"),s=n("./local-doc-presence"),l=n("./remote-doc-presence");function a(u,c,f){var h=a.channel(c,f);o.call(this,u,h),this.collection=c,this.id=f}r.exports=a,a.prototype=Object.create(o.prototype),a.channel=function(u,c){return u+"."+c},a.prototype._createLocalPresence=function(u){return new s(this,u)},a.prototype._createRemotePresence=function(u){return new l(this,u)}},{"./local-doc-presence":15,"./presence":17,"./remote-doc-presence":18}],15:[function(n,r,i){var o=n("./local-presence"),s=n("../../error"),l=n("../../util"),a=s.CODES;r.exports=u;function u(c,f){o.call(this,c,f),this.collection=this.presence.collection,this.id=this.presence.id,this._doc=this.connection.get(this.collection,this.id),this._emitter=this.connection._docPresenceEmitter,this._isSending=!1,this._docDataVersionByPresenceVersion={},this._opHandler=this._transformAgainstOp.bind(this),this._createOrDelHandler=this._handleCreateOrDel.bind(this),this._loadHandler=this._handleLoad.bind(this),this._destroyHandler=this.destroy.bind(this),this._registerWithDoc()}u.prototype=Object.create(o.prototype),u.prototype.submit=function(c,f){if(!this._doc.type){if(c===null)return this._callbackOrEmit(null,f);var h={code:a.ERR_DOC_DOES_NOT_EXIST,message:"Cannot submit presence. Document has not been created"};return this._callbackOrEmit(h,f)}this._docDataVersionByPresenceVersion[this.presenceVersion]=this._doc._dataStateVersion,o.prototype.submit.call(this,c,f)},u.prototype.destroy=function(c){this._emitter.removeEventListener(this._doc,"op",this._opHandler),this._emitter.removeEventListener(this._doc,"create",this._createOrDelHandler),this._emitter.removeEventListener(this._doc,"del",this._createOrDelHandler),this._emitter.removeEventListener(this._doc,"load",this._loadHandler),this._emitter.removeEventListener(this._doc,"destroy",this._destroyHandler),o.prototype.destroy.call(this,c)},u.prototype._sendPending=function(){if(!this._isSending){this._isSending=!0;var c=this;this._doc.whenNothingPending(function(){c._isSending=!1,c.connection.canSend&&(c._pendingMessages.forEach(function(f){f.t=c._doc.type.uri,f.v=c._doc.version,c.connection.send(f)}),c._pendingMessages=[],c._docDataVersionByPresenceVersion={})})}},u.prototype._registerWithDoc=function(){this._emitter.addEventListener(this._doc,"op",this._opHandler),this._emitter.addEventListener(this._doc,"create",this._createOrDelHandler),this._emitter.addEventListener(this._doc,"del",this._createOrDelHandler),this._emitter.addEventListener(this._doc,"load",this._loadHandler),this._emitter.addEventListener(this._doc,"destroy",this._destroyHandler)},u.prototype._transformAgainstOp=function(c,f){var h=this,d=this._doc._dataStateVersion;this._pendingMessages.forEach(function(p){var g=h._docDataVersionByPresenceVersion[p.pv];if(!(g>=d))try{p.p=h._transformPresence(p.p,c,f),h._docDataVersionByPresenceVersion[p.pv]=d}catch(O){var y=h._getCallback(p.pv);h._callbackOrEmit(O,y)}});try{this.value=this._transformPresence(this.value,c,f)}catch(p){this.emit("error",p)}},u.prototype._handleCreateOrDel=function(){this._pendingMessages.forEach(function(c){c.p=null}),this.value=null},u.prototype._handleLoad=function(){this.value=null,this._pendingMessages=[],this._docDataVersionByPresenceVersion={}},u.prototype._message=function(){var c=o.prototype._message.call(this);return c.c=this.collection,c.d=this.id,c.v=null,c.t=null,c},u.prototype._transformPresence=function(c,f,h){var d=this._doc.type;if(!l.supportsPresence(d))throw new s(a.ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE,"Type does not support presence: "+d.name);return d.transformPresence(c,f,h)}},{"../../error":25,"../../util":32,"./local-presence":16}],16:[function(n,r,i){var o=n("../../emitter"),s=n("../../message-actions").ACTIONS,l=n("../../util");r.exports=a;function a(u,c){if(o.EventEmitter.call(this),!c||typeof c!="string")throw new Error("LocalPresence presenceId must be a string");this.presence=u,this.presenceId=c,this.connection=u.connection,this.presenceVersion=0,this.value=null,this._pendingMessages=[],this._callbacksByPresenceVersion={}}o.mixin(a),a.prototype.submit=function(u,c){this.value=u,this.send(c)},a.prototype.send=function(u){var c=this._message();this._pendingMessages.push(c),this._callbacksByPresenceVersion[c.pv]=u,this._sendPending()},a.prototype.destroy=function(u){var c=this;this.submit(null,function(f){if(f)return c._callbackOrEmit(f,u);delete c.presence.localPresences[c.presenceId],u&&u()})},a.prototype._sendPending=function(){if(this.connection.canSend){var u=this;this._pendingMessages.forEach(function(c){u.connection.send(c)}),this._pendingMessages=[]}},a.prototype._ack=function(u,c){var f=this._getCallback(c);this._callbackOrEmit(u,f)},a.prototype._message=function(){return{a:s.presence,ch:this.presence.channel,id:this.presenceId,p:this.value,pv:this.presenceVersion++}},a.prototype._getCallback=function(u){var c=this._callbacksByPresenceVersion[u];return delete this._callbacksByPresenceVersion[u],c},a.prototype._callbackOrEmit=function(u,c){if(c)return l.nextTick(c,u);u&&this.emit("error",u)}},{"../../emitter":24,"../../message-actions":28,"../../util":32}],17:[function(n,r,i){var o=n("../../emitter"),s=n("./local-presence"),l=n("./remote-presence"),a=n("../../util"),u=n("async"),c=n("hat"),f=n("../../message-actions").ACTIONS;r.exports=h;function h(d,p){if(o.EventEmitter.call(this),!p||typeof p!="string")throw new Error("Presence channel must be provided");this.connection=d,this.channel=p,this.wantSubscribe=!1,this.subscribed=!1,this.remotePresences={},this.localPresences={},this._remotePresenceInstances={},this._subscriptionCallbacksBySeq={},this._wantsDestroy=!1}o.mixin(h),h.prototype.subscribe=function(d){this._sendSubscriptionAction(!0,d)},h.prototype.unsubscribe=function(d){this._sendSubscriptionAction(!1,d)},h.prototype.create=function(d){if(this._wantsDestroy)throw new Error("Presence is being destroyed");d=d||c();var p=this._createLocalPresence(d);return this.localPresences[d]=p,p},h.prototype.destroy=function(d){this._wantsDestroy=!0;var p=this,g=Object.keys(p.localPresences);this.unsubscribe(function(y){if(y)return p._callbackOrEmit(y,d);var O=Object.keys(p._remotePresenceInstances);u.parallel([function(m){u.each(g,function(v,b){p.localPresences[v].destroy(b)},m)},function(m){if(!p._wantsDestroy)return m();u.each(O,function(v,b){p._remotePresenceInstances[v].destroy(b)},m)}],function(m){p._wantsDestroy&&delete p.connection._presences[p.channel],p._callbackOrEmit(m,d)})})},h.prototype._sendSubscriptionAction=function(d,p){this.wantSubscribe=!!d;var g=this.wantSubscribe?f.presenceSubscribe:f.presenceUnsubscribe,y=this.connection._presenceSeq++;this._subscriptionCallbacksBySeq[y]=p,this.connection.canSend&&this.connection._sendPresenceAction(g,y,this)},h.prototype._handleSubscribe=function(d,p){this.wantSubscribe&&(this.subscribed=!0);var g=this._subscriptionCallback(p);this._callbackOrEmit(d,g)},h.prototype._handleUnsubscribe=function(d,p){this.subscribed=!1;var g=this._subscriptionCallback(p);this._callbackOrEmit(d,g)},h.prototype._receiveUpdate=function(d,p){var g=a.dig(this.localPresences,p.id);if(g)return g._ack(d,p.pv);if(d)return this.emit("error",d);var y=this,O=a.digOrCreate(this._remotePresenceInstances,p.id,function(){return y._createRemotePresence(p.id)});O.receiveUpdate(p)},h.prototype._updateRemotePresence=function(d){this.remotePresences[d.presenceId]=d.value,d.value===null&&this._removeRemotePresence(d.presenceId),this.emit("receive",d.presenceId,d.value)},h.prototype._broadcastAllLocalPresence=function(d){if(d)return this.emit("error",d);for(var p in this.localPresences){var g=this.localPresences[p];g.value!==null&&g.send()}},h.prototype._removeRemotePresence=function(d){this._remotePresenceInstances[d].destroy(),delete this._remotePresenceInstances[d],delete this.remotePresences[d]},h.prototype._onConnectionStateChanged=function(){if(this.connection.canSend){this._resubscribe();for(var d in this.localPresences)this.localPresences[d]._sendPending()}},h.prototype._resubscribe=function(){var d=[];for(var p in this._subscriptionCallbacksBySeq){var g=this._subscriptionCallback(p);d.push(g)}if(!this.wantSubscribe)return this._callEachOrEmit(d);var y=this;this.subscribe(function(O){y._callEachOrEmit(d,O)})},h.prototype._subscriptionCallback=function(d){var p=this._subscriptionCallbacksBySeq[d];return delete this._subscriptionCallbacksBySeq[d],p},h.prototype._callbackOrEmit=function(d,p){if(p)return a.nextTick(p,d);d&&this.emit("error",d)},h.prototype._createLocalPresence=function(d){return new s(this,d)},h.prototype._createRemotePresence=function(d){return new l(this,d)},h.prototype._callEachOrEmit=function(d,p){var g=a.callEach(d,p);!g&&p&&this.emit("error",p)}},{"../../emitter":24,"../../message-actions":28,"../../util":32,"./local-presence":16,"./remote-presence":19,async:1,hat:4}],18:[function(n,r,i){var o=n("./remote-presence"),s=n("../../ot");r.exports=l;function l(a,u){o.call(this,a,u),this.collection=this.presence.collection,this.id=this.presence.id,this.src=null,this.presenceVersion=null,this._doc=this.connection.get(this.collection,this.id),this._emitter=this.connection._docPresenceEmitter,this._pending=null,this._opCache=null,this._pendingSetPending=!1,this._opHandler=this._handleOp.bind(this),this._createDelHandler=this._handleCreateDel.bind(this),this._loadHandler=this._handleLoad.bind(this),this._registerWithDoc()}l.prototype=Object.create(o.prototype),l.prototype.receiveUpdate=function(a){this._pending&&a.pv<this._pending.pv||(this.src=a.src,this._pending=a,this._setPendingPresence())},l.prototype.destroy=function(a){this._emitter.removeEventListener(this._doc,"op",this._opHandler),this._emitter.removeEventListener(this._doc,"create",this._createDelHandler),this._emitter.removeEventListener(this._doc,"del",this._createDelHandler),this._emitter.removeEventListener(this._doc,"load",this._loadHandler),o.prototype.destroy.call(this,a)},l.prototype._registerWithDoc=function(){this._emitter.addEventListener(this._doc,"op",this._opHandler),this._emitter.addEventListener(this._doc,"create",this._createDelHandler),this._emitter.addEventListener(this._doc,"del",this._createDelHandler),this._emitter.addEventListener(this._doc,"load",this._loadHandler)},l.prototype._setPendingPresence=function(){if(!this._pendingSetPending){this._pendingSetPending=!0;var a=this;this._doc.whenNothingPending(function(){if(a._pendingSetPending=!1,!!a._pending){if(a._pending.pv<a.presenceVersion)return a._pending=null;if(a._pending.v>a._doc.version)return a._doc.fetch();a._catchUpStalePresence()&&(a.value=a._pending.p,a.presenceVersion=a._pending.pv,a._pending=null,a.presence._updateRemotePresence(a))}})}},l.prototype._handleOp=function(a,u,c){var f=c===this.src;this._transformAgainstOp(a,f),this._cacheOp(a,f),this._setPendingPresence()},o.prototype._handleCreateDel=function(){this._cacheOp(null),this._setPendingPresence()},o.prototype._handleLoad=function(){this.value=null,this._pending=null,this._opCache=null,this.presence._updateRemotePresence(this)},l.prototype._transformAgainstOp=function(a,u){if(this.value){try{this.value=this._doc.type.transformPresence(this.value,a,u)}catch(c){return this.presence.emit("error",c)}this.presence._updateRemotePresence(this)}},l.prototype._catchUpStalePresence=function(){if(this._pending.v>=this._doc.version)return!0;if(!this._opCache)return this._startCachingOps(),this._doc.fetch(),this.presence.subscribe(),!1;for(;this._opCache[this._pending.v];){var a=this._opCache[this._pending.v],u=a.op,c=a.isOwnOp;u===null?(this._pending.p=null,this._pending.v++):s.transformPresence(this._pending,u,c)}var f=this._pending.v>=this._doc.version;return f&&this._stopCachingOps(),f},l.prototype._startCachingOps=function(){this._opCache=[]},l.prototype._stopCachingOps=function(){this._opCache=null},l.prototype._cacheOp=function(a,u){this._opCache&&(a=a?{op:a}:null,this._opCache[this._doc.version-1]={op:a,isOwnOp:u})}},{"../../ot":29,"./remote-presence":19}],19:[function(n,r,i){var o=n("../../util");r.exports=s;function s(l,a){this.presence=l,this.presenceId=a,this.connection=this.presence.connection,this.value=null,this.presenceVersion=0}s.prototype.receiveUpdate=function(l){l.pv<this.presenceVersion||(this.value=l.p,this.presenceVersion=l.pv,this.presence._updateRemotePresence(this))},s.prototype.destroy=function(l){delete this.presence._remotePresenceInstances[this.presenceId],delete this.presence.remotePresences[this.presenceId],l&&o.nextTick(l)}},{"../../util":32}],20:[function(n,r,i){var o=n("../emitter"),s=n("../message-actions").ACTIONS,l=n("../util");r.exports=a;function a(u,c,f,h,d,p,g){o.EventEmitter.call(this),this.action=u,this.connection=c,this.id=f,this.collection=h,this.query=d,this.results=null,p&&p.results&&(this.results=p.results,delete p.results),this.extra=void 0,this.options=p,this.callback=g,this.ready=!1,this.sent=!1}o.mixin(a),a.prototype.hasPending=function(){return!this.ready},a.prototype.send=function(){if(this.connection.canSend){var u={a:this.action,id:this.id,c:this.collection,q:this.query};if(this.options&&(u.o=this.options),this.results){for(var c=[],f=0;f<this.results.length;f++){var h=this.results[f];c.push([h.id,h.version])}u.r=c}this.connection.send(u),this.sent=!0}},a.prototype.destroy=function(u){this.connection.canSend&&this.action===s.querySubscribe&&this.connection.send({a:s.queryUnsubscribe,id:this.id}),this.connection._destroyQuery(this),u&&l.nextTick(u)},a.prototype._onConnectionStateChanged=function(){this.connection.canSend&&!this.sent?this.send():this.sent=!1},a.prototype._handleFetch=function(u,c,f){this.connection._destroyQuery(this),this._handleResponse(u,c,f)},a.prototype._handleSubscribe=function(u,c,f){this._handleResponse(u,c,f)},a.prototype._handleResponse=function(u,c,f){var h=this.callback;if(this.callback=null,u)return this._finishResponse(u,h);if(!c)return this._finishResponse(null,h);var d=this,p=1,g=function(v){if(v)return d._finishResponse(v,h);--p||d._finishResponse(null,h)};if(Array.isArray(c))p+=c.length,this.results=this._ingestSnapshots(c,g),this.extra=f;else for(var y in c){p++;var O=c[y],m=this.connection.get(O.c||this.collection,y);m.ingestSnapshot(O,g)}g()},a.prototype._ingestSnapshots=function(u,c){for(var f=[],h=0;h<u.length;h++){var d=u[h],p=this.connection.get(d.c||this.collection,d.d);p.ingestSnapshot(d,c),f.push(p)}return f},a.prototype._finishResponse=function(u,c){if(this.emit("ready"),this.ready=!0,u)return this.connection._destroyQuery(this),c?c(u):this.emit("error",u);c&&c(null,this.results,this.extra)},a.prototype._handleError=function(u){this.emit("error",u)},a.prototype._handleDiff=function(u){for(var c=0;c<u.length;c++){var f=u[c];f.type==="insert"&&(f.values=this._ingestSnapshots(f.values))}for(var c=0;c<u.length;c++){var f=u[c];switch(f.type){case"insert":var h=f.values;Array.prototype.splice.apply(this.results,[f.index,0].concat(h)),this.emit("insert",h,f.index);break;case"remove":var p=f.howMany||1,d=this.results.splice(f.index,p);this.emit("remove",d,f.index);break;case"move":var p=f.howMany||1,g=this.results.splice(f.from,p);Array.prototype.splice.apply(this.results,[f.to,0].concat(g)),this.emit("move",g,f.from,f.to);break}}this.emit("changed",this.results)},a.prototype._handleExtra=function(u){this.extra=u,this.emit("extra",u)}},{"../emitter":24,"../message-actions":28,"../util":32}],21:[function(n,r,i){var o=n("../../snapshot"),s=n("../../emitter");r.exports=l;function l(a,u,c,f,h){if(s.EventEmitter.call(this),typeof h!="function")throw new Error("Callback is required for SnapshotRequest");this.requestId=u,this.connection=a,this.id=f,this.collection=c,this.callback=h,this.sent=!1}s.mixin(l),l.prototype.send=function(){this.connection.canSend&&(this.connection.send(this._message()),this.sent=!0)},l.prototype._onConnectionStateChanged=function(){this.connection.canSend?this.sent||this.send():this.sent=!1},l.prototype._handleResponse=function(a,u){if(this.emit("ready"),a)return this.callback(a);var c=u.meta?u.meta:null,f=new o(this.id,u.v,u.type,u.data,c);this.callback(null,f)}},{"../../emitter":24,"../../snapshot":30}],22:[function(n,r,i){var o=n("./snapshot-request"),s=n("../../util"),l=n("../../message-actions").ACTIONS;r.exports=a;function a(u,c,f,h,d,p){if(o.call(this,u,c,f,h,p),!s.isValidTimestamp(d))throw new Error("Snapshot timestamp must be a positive integer or null");this.timestamp=d}a.prototype=Object.create(o.prototype),a.prototype._message=function(){return{a:l.snapshotFetchByTimestamp,id:this.requestId,c:this.collection,d:this.id,ts:this.timestamp}}},{"../../message-actions":28,"../../util":32,"./snapshot-request":21}],23:[function(n,r,i){var o=n("./snapshot-request"),s=n("../../util"),l=n("../../message-actions").ACTIONS;r.exports=a;function a(u,c,f,h,d,p){if(o.call(this,u,c,f,h,p),!s.isValidVersion(d))throw new Error("Snapshot version must be a positive integer or null");this.version=d}a.prototype=Object.create(o.prototype),a.prototype._message=function(){return{a:l.snapshotFetch,id:this.requestId,c:this.collection,d:this.id,v:this.version}}},{"../../message-actions":28,"../../util":32,"./snapshot-request":21}],24:[function(n,r,i){var o=n("events").EventEmitter;i.EventEmitter=o,i.mixin=s;function s(l){for(var a in o.prototype)l.prototype[a]=o.prototype[a]}},{events:2}],25:[function(n,r,i){function o(s,l){this.code=s,this.message=l||"",Error.captureStackTrace?Error.captureStackTrace(this,o):this.stack=new Error().stack}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.prototype.name="ShareDBError",o.CODES={ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT:"ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT",ERR_APPLY_SNAPSHOT_NOT_PROVIDED:"ERR_APPLY_SNAPSHOT_NOT_PROVIDED",ERR_FIXUP_IS_ONLY_VALID_ON_APPLY:"ERR_FIXUP_IS_ONLY_VALID_ON_APPLY",ERR_CANNOT_FIXUP_DELETION:"ERR_CANNOT_FIXUP_DELETION",ERR_CLIENT_ID_BADLY_FORMED:"ERR_CLIENT_ID_BADLY_FORMED",ERR_CANNOT_PING_OFFLINE:"ERR_CANNOT_PING_OFFLINE",ERR_CONNECTION_SEQ_INTEGER_OVERFLOW:"ERR_CONNECTION_SEQ_INTEGER_OVERFLOW",ERR_CONNECTION_STATE_TRANSITION_INVALID:"ERR_CONNECTION_STATE_TRANSITION_INVALID",ERR_DATABASE_ADAPTER_NOT_FOUND:"ERR_DATABASE_ADAPTER_NOT_FOUND",ERR_DATABASE_DOES_NOT_SUPPORT_SUBSCRIBE:"ERR_DATABASE_DOES_NOT_SUPPORT_SUBSCRIBE",ERR_DATABASE_METHOD_NOT_IMPLEMENTED:"ERR_DATABASE_METHOD_NOT_IMPLEMENTED",ERR_DEFAULT_TYPE_MISMATCH:"ERR_DEFAULT_TYPE_MISMATCH",ERR_DOC_MISSING_VERSION:"ERR_DOC_MISSING_VERSION",ERR_DOC_ALREADY_CREATED:"ERR_DOC_ALREADY_CREATED",ERR_DOC_DOES_NOT_EXIST:"ERR_DOC_DOES_NOT_EXIST",ERR_DOC_TYPE_NOT_RECOGNIZED:"ERR_DOC_TYPE_NOT_RECOGNIZED",ERR_DOC_WAS_DELETED:"ERR_DOC_WAS_DELETED",ERR_INFLIGHT_OP_MISSING:"ERR_INFLIGHT_OP_MISSING",ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION:"ERR_INGESTED_SNAPSHOT_HAS_NO_VERSION",ERR_MAX_SUBMIT_RETRIES_EXCEEDED:"ERR_MAX_SUBMIT_RETRIES_EXCEEDED",ERR_MESSAGE_BADLY_FORMED:"ERR_MESSAGE_BADLY_FORMED",ERR_MILESTONE_ARGUMENT_INVALID:"ERR_MILESTONE_ARGUMENT_INVALID",ERR_OP_ALREADY_SUBMITTED:"ERR_OP_ALREADY_SUBMITTED",ERR_OP_NOT_ALLOWED_IN_PROJECTION:"ERR_OP_NOT_ALLOWED_IN_PROJECTION",ERR_OP_SUBMIT_REJECTED:"ERR_OP_SUBMIT_REJECTED",ERR_OP_VERSION_MISMATCH_AFTER_TRANSFORM:"ERR_OP_VERSION_MISMATCH_AFTER_TRANSFORM",ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM:"ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM",ERR_OP_VERSION_NEWER_THAN_CURRENT_SNAPSHOT:"ERR_OP_VERSION_NEWER_THAN_CURRENT_SNAPSHOT",ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED:"ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED",ERR_OT_OP_BADLY_FORMED:"ERR_OT_OP_BADLY_FORMED",ERR_OT_OP_NOT_APPLIED:"ERR_OT_OP_NOT_APPLIED",ERR_OT_OP_NOT_PROVIDED:"ERR_OT_OP_NOT_PROVIDED",ERR_PRESENCE_TRANSFORM_FAILED:"ERR_PRESENCE_TRANSFORM_FAILED",ERR_PROTOCOL_VERSION_NOT_SUPPORTED:"ERR_PROTOCOL_VERSION_NOT_SUPPORTED",ERR_QUERY_CHANNEL_MISSING:"ERR_QUERY_CHANNEL_MISSING",ERR_QUERY_EMITTER_LISTENER_NOT_ASSIGNED:"ERR_QUERY_EMITTER_LISTENER_NOT_ASSIGNED",ERR_SNAPSHOT_READ_SILENT_REJECTION:"ERR_SNAPSHOT_READ_SILENT_REJECTION",ERR_SNAPSHOT_READS_REJECTED:"ERR_SNAPSHOT_READS_REJECTED",ERR_SUBMIT_TRANSFORM_OPS_NOT_FOUND:"ERR_SUBMIT_TRANSFORM_OPS_NOT_FOUND",ERR_TYPE_CANNOT_BE_PROJECTED:"ERR_TYPE_CANNOT_BE_PROJECTED",ERR_TYPE_DOES_NOT_SUPPORT_COMPOSE:"ERR_TYPE_DOES_NOT_SUPPORT_COMPOSE",ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE:"ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE",ERR_UNKNOWN_ERROR:"ERR_UNKNOWN_ERROR"},r.exports=o},{}],26:[function(n,r,i){var o=n("./logger"),s=new o;r.exports=s},{"./logger":27}],27:[function(n,r,i){var o=["info","warn","error"];function s(){var l={};o.forEach(function(a){l[a]=console[a].bind(console)}),this.setMethods(l)}r.exports=s,s.prototype.setMethods=function(l){l=l||{};var a=this;o.forEach(function(u){typeof l[u]=="function"&&(a[u]=l[u])})}},{}],28:[function(n,r,i){i.ACTIONS={initLegacy:"init",handshake:"hs",queryFetch:"qf",querySubscribe:"qs",queryUnsubscribe:"qu",queryUpdate:"q",bulkFetch:"bf",bulkSubscribe:"bs",bulkUnsubscribe:"bu",fetch:"f",fixup:"fixup",subscribe:"s",unsubscribe:"u",op:"op",snapshotFetch:"nf",snapshotFetchByTimestamp:"nt",pingPong:"pp",presence:"p",presenceSubscribe:"ps",presenceUnsubscribe:"pu",presenceRequest:"pr"}},{}],29:[function(n,r,i){var o=n("./types"),s=n("./error"),l=n("./util"),a=s.CODES;i.checkOp=function(f){if(f==null||typeof f!="object")return new s(a.ERR_OT_OP_BADLY_FORMED,"Op must be an object");if(f.create!=null){if(typeof f.create!="object")return new s(a.ERR_OT_OP_BADLY_FORMED,"Create data must be an object");var h=f.create.type;if(typeof h!="string")return new s(a.ERR_OT_OP_BADLY_FORMED,"Missing create type");var d=o.map[h];if(d==null||typeof d!="object")return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type")}else if(f.del!=null){if(f.del!==!0)return new s(a.ERR_OT_OP_BADLY_FORMED,"del value must be true")}else if(!("op"in f))return new s(a.ERR_OT_OP_BADLY_FORMED,"Missing op, create, or del");if(f.src!=null&&typeof f.src!="string")return new s(a.ERR_OT_OP_BADLY_FORMED,"src must be a string");if(f.seq!=null&&typeof f.seq!="number")return new s(a.ERR_OT_OP_BADLY_FORMED,"seq must be a number");if(f.src==null&&f.seq!=null||f.src!=null&&f.seq==null)return new s(a.ERR_OT_OP_BADLY_FORMED,"Both src and seq must be set together");if(f.m!=null&&typeof f.m!="object")return new s(a.ERR_OT_OP_BADLY_FORMED,"op.m must be an object or null")},i.normalizeType=function(f){return o.map[f]&&o.map[f].uri},i.apply=function(f,h){if(typeof f!="object")return new s(a.ERR_APPLY_SNAPSHOT_NOT_PROVIDED,"Missing snapshot");if(f.v!=null&&h.v!=null&&f.v!==h.v)return new s(a.ERR_APPLY_OP_VERSION_DOES_NOT_MATCH_SNAPSHOT,"Version mismatch");if(h.create){if(f.type)return new s(a.ERR_DOC_ALREADY_CREATED,"Document already exists");var d=h.create,p=o.map[d.type];if(!p)return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{f.data=p.create(d.data),f.type=p.uri,f.v++}catch(y){return y}}else if(h.del)f.data=void 0,f.type=null,f.v++;else if("op"in h){var g=u(f,h.op);if(g)return g;f.v++}else f.v++};function u(f,h){if(!f.type)return new s(a.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(h===void 0)return new s(a.ERR_OT_OP_NOT_PROVIDED,"Missing op");var d=o.map[f.type];if(!d)return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{f.data=d.apply(f.data,h)}catch(p){return new s(a.ERR_OT_OP_NOT_APPLIED,p.message)}}i.transform=function(f,h,d){if(h.v!=null&&h.v!==d.v)return new s(a.ERR_OP_VERSION_MISMATCH_DURING_TRANSFORM,"Version mismatch");if(d.del){if(h.create||"op"in h)return new s(a.ERR_DOC_WAS_DELETED,"Document was deleted")}else{if(d.create&&("op"in h||h.create||h.del)||"op"in d&&h.create)return new s(a.ERR_DOC_ALREADY_CREATED,"Document was created remotely");if("op"in d&&"op"in h){if(!f)return new s(a.ERR_DOC_DOES_NOT_EXIST,"Document does not exist");if(typeof f=="string"&&(f=o.map[f],!f))return new s(a.ERR_DOC_TYPE_NOT_RECOGNIZED,"Unknown type");try{h.op=f.transform(h.op,d.op,"left")}catch(p){return p}}}h.v!=null&&h.v++},i.applyOps=function(f,h,d){d=d||{};for(var p=0;p<h.length;p++){var g=h[p];if(d._normalizeLegacyJson0Ops)try{c(f,g)}catch{return new s(a.ERR_OT_LEGACY_JSON0_OP_CANNOT_BE_NORMALIZED,"Cannot normalize legacy json0 op")}f.v=g.v;var y=i.apply(f,g);if(y)return y}},i.transformPresence=function(f,h,d){var p=this.checkOp(h);if(p)return p;var g=f.t;if(typeof g=="string"&&(g=o.map[g]),!g)return{code:a.ERR_DOC_TYPE_NOT_RECOGNIZED,message:"Unknown type"};if(!l.supportsPresence(g))return{code:a.ERR_TYPE_DOES_NOT_SUPPORT_PRESENCE,message:"Type does not support presence"};if(h.create||h.del){f.p=null,f.v++;return}try{f.p=f.p===null?null:g.transformPresence(f.p,h.op,d)}catch(y){return{code:a.ERR_PRESENCE_TRANSFORM_FAILED,message:y.message||y}}f.v++};function c(f,h){if(f.type===o.defaultType.uri){var d=h.op;if(d){var p=f.data;d.length>1&&(p=l.clone(p));for(var g=0;g<d.length;g++){var y=d[g];typeof y.lm=="string"&&(y.lm=+y.lm);for(var O=y.p,m=p,v=0;v<O.length;v++){var b=O[v];Object.prototype.toString.call(m)=="[object Array]"?O[v]=+b:m.constructor===Object&&(O[v]=b.toString()),m=m[b]}g<d.length-1&&(p=o.defaultType.apply(p,[y]))}}}}},{"./error":25,"./types":31,"./util":32}],30:[function(n,r,i){r.exports=o;function o(s,l,a,u,c){this.id=s,this.v=l,this.type=a,this.data=u,this.m=c}},{}],31:[function(n,r,i){i.defaultType=n("ot-json0").type,i.map={},i.register=function(o){o.name&&(i.map[o.name]=o),o.uri&&(i.map[o.uri]=o)},i.register(i.defaultType)},{"ot-json0":6}],32:[function(n,r,i){(function(o){(function(){i.doNothing=s;function s(){}i.hasKeys=function(l){for(var a in l)return!0;return!1},i.isInteger=Number.isInteger||function(l){return typeof l=="number"&&isFinite(l)&&Math.floor(l)===l},i.isValidVersion=function(l){return l===null?!0:i.isInteger(l)&&l>=0},i.isValidTimestamp=function(l){return i.isValidVersion(l)},i.MAX_SAFE_INTEGER=9007199254740991,i.dig=function(){for(var l=arguments[0],a=1;a<arguments.length;a++){var u=arguments[a];l=l[u]||(a===arguments.length-1?void 0:{})}return l},i.digOrCreate=function(){for(var l=arguments[0],a=arguments[arguments.length-1],u=1;u<arguments.length-1;u++){var c=arguments[u];l=l[c]||(l[c]=u===arguments.length-2?a():{})}return l},i.digAndRemove=function(){for(var l=arguments[0],a=[l],u=1;u<arguments.length-1;u++){var c=arguments[u];if(!l.hasOwnProperty(c))break;l=l[c],a.push(l)}for(var u=a.length-1;u>=0;u--){var f=a[u],c=arguments[u+1],h=f[c];(u===a.length-1||!i.hasKeys(h))&&delete f[c]}},i.supportsPresence=function(l){return l&&typeof l.transformPresence=="function"},i.callEach=function(l,a){var u=!1;return l.forEach(function(c){c&&(c(a),u=!0)}),u},i.truthy=function(l){return!!l},i.nextTick=function(l){if(typeof o<"u"&&o.nextTick)return o.nextTick.apply(null,arguments);for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];setTimeout(function(){l.apply(null,a)})},i.clone=function(l){return l===void 0?void 0:JSON.parse(JSON.stringify(l))}}).call(this)}).call(this,n("_process"))},{_process:9}],33:[function(n,r,i){(function(o,s){(function(){var l=n("process/browser.js").nextTick,a=Function.prototype.apply,u=Array.prototype.slice,c={},f=0;i.setTimeout=function(){return new h(a.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new h(a.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(d){d.close()};function h(d,p){this._id=d,this._clearFn=p}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(d,p){clearTimeout(d._idleTimeoutId),d._idleTimeout=p},i.unenroll=function(d){clearTimeout(d._idleTimeoutId),d._idleTimeout=-1},i._unrefActive=i.active=function(d){clearTimeout(d._idleTimeoutId);var p=d._idleTimeout;p>=0&&(d._idleTimeoutId=setTimeout(function(){d._onTimeout&&d._onTimeout()},p))},i.setImmediate=typeof o=="function"?o:function(d){var p=f++,g=arguments.length<2?!1:u.call(arguments,1);return c[p]=!0,l(function(){c[p]&&(g?d.apply(null,g):d.call(null),i.clearImmediate(p))}),p},i.clearImmediate=typeof s=="function"?s:function(d){delete c[d]}}).call(this)}).call(this,n("timers").setImmediate,n("timers").clearImmediate)},{"process/browser.js":9,timers:33}],34:[function(n,r,i){r.exports=n("sharedb/lib/client")},{"sharedb/lib/client":12}]},{},[34])(34)})})(IC);var QM=IC.exports;const NC=Yo(QM);var LC={exports:{}};(function(t,e){(function(n){t.exports=n()})(function(){return function(){function n(r,i,o){function s(u,c){if(!i[u]){if(!r[u]){var f=typeof xo=="function"&&xo;if(!c&&f)return f(u,!0);if(l)return l(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[u]={exports:{}};r[u][0].call(d.exports,function(p){var g=r[u][1][p];return s(g||p)},d,d.exports,n,r,i,o)}return i[u].exports}for(var l=typeof xo=="function"&&xo,a=0;a<o.length;a++)s(o[a]);return s}return n}()({1:[function(n,r,i){(function(o){(function(){var s=n("object-assign");/*!
|
|
41
|
+
* The buffer module from node.js, for the browser.
|
|
42
|
+
*
|
|
43
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
44
|
+
* @license MIT
|
|
45
|
+
*/function l(D,N){if(D===N)return 0;for(var A=D.length,F=N.length,Y=0,pe=Math.min(A,F);Y<pe;++Y)if(D[Y]!==N[Y]){A=D[Y],F=N[Y];break}return A<F?-1:F<A?1:0}function a(D){return o.Buffer&&typeof o.Buffer.isBuffer=="function"?o.Buffer.isBuffer(D):!!(D!=null&&D._isBuffer)}var u=n("util/"),c=Object.prototype.hasOwnProperty,f=Array.prototype.slice,h=function(){return(function(){}).name==="foo"}();function d(D){return Object.prototype.toString.call(D)}function p(D){return a(D)||typeof o.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(D):D?!!(D instanceof DataView||D.buffer&&D.buffer instanceof ArrayBuffer):!1}var g=r.exports=E,y=/\s*function\s+([^\(\s]*)\s*/;function O(D){if(u.isFunction(D)){if(h)return D.name;var N=D.toString(),A=N.match(y);return A&&A[1]}}g.AssertionError=function(N){this.name="AssertionError",this.actual=N.actual,this.expected=N.expected,this.operator=N.operator,N.message?(this.message=N.message,this.generatedMessage=!1):(this.message=b(this),this.generatedMessage=!0);var A=N.stackStartFunction||P;if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var F=new Error;if(F.stack){var Y=F.stack,pe=O(A),ae=Y.indexOf(`
|
|
46
|
+
`+pe);if(ae>=0){var B=Y.indexOf(`
|
|
47
|
+
`,ae+1);Y=Y.substring(B+1)}this.stack=Y}}},u.inherits(g.AssertionError,Error);function m(D,N){return typeof D=="string"?D.length<N?D:D.slice(0,N):D}function v(D){if(h||!u.isFunction(D))return u.inspect(D);var N=O(D),A=N?": "+N:"";return"[Function"+A+"]"}function b(D){return m(v(D.actual),128)+" "+D.operator+" "+m(v(D.expected),128)}function P(D,N,A,F,Y){throw new g.AssertionError({message:A,actual:D,expected:N,operator:F,stackStartFunction:Y})}g.fail=P;function E(D,N){D||P(D,!0,N,"==",g.ok)}g.ok=E,g.equal=function(N,A,F){N!=A&&P(N,A,F,"==",g.equal)},g.notEqual=function(N,A,F){N==A&&P(N,A,F,"!=",g.notEqual)},g.deepEqual=function(N,A,F){T(N,A,!1)||P(N,A,F,"deepEqual",g.deepEqual)},g.deepStrictEqual=function(N,A,F){T(N,A,!0)||P(N,A,F,"deepStrictEqual",g.deepStrictEqual)};function T(D,N,A,F){if(D===N)return!0;if(a(D)&&a(N))return l(D,N)===0;if(u.isDate(D)&&u.isDate(N))return D.getTime()===N.getTime();if(u.isRegExp(D)&&u.isRegExp(N))return D.source===N.source&&D.global===N.global&&D.multiline===N.multiline&&D.lastIndex===N.lastIndex&&D.ignoreCase===N.ignoreCase;if((D===null||typeof D!="object")&&(N===null||typeof N!="object"))return A?D===N:D==N;if(p(D)&&p(N)&&d(D)===d(N)&&!(D instanceof Float32Array||D instanceof Float64Array))return l(new Uint8Array(D.buffer),new Uint8Array(N.buffer))===0;if(a(D)!==a(N))return!1;F=F||{actual:[],expected:[]};var Y=F.actual.indexOf(D);return Y!==-1&&Y===F.expected.indexOf(N)?!0:(F.actual.push(D),F.expected.push(N),k(D,N,A,F))}function w(D){return Object.prototype.toString.call(D)=="[object Arguments]"}function k(D,N,A,F){if(D==null||N===null||N===void 0)return!1;if(u.isPrimitive(D)||u.isPrimitive(N))return D===N;if(A&&Object.getPrototypeOf(D)!==Object.getPrototypeOf(N))return!1;var Y=w(D),pe=w(N);if(Y&&!pe||!Y&&pe)return!1;if(Y)return D=f.call(D),N=f.call(N),T(D,N,A);var ae=G(D),B=G(N),q,te;if(ae.length!==B.length)return!1;for(ae.sort(),B.sort(),te=ae.length-1;te>=0;te--)if(ae[te]!==B[te])return!1;for(te=ae.length-1;te>=0;te--)if(q=ae[te],!T(D[q],N[q],A,F))return!1;return!0}g.notDeepEqual=function(N,A,F){T(N,A,!1)&&P(N,A,F,"notDeepEqual",g.notDeepEqual)},g.notDeepStrictEqual=C;function C(D,N,A){T(D,N,!0)&&P(D,N,A,"notDeepStrictEqual",C)}g.strictEqual=function(N,A,F){N!==A&&P(N,A,F,"===",g.strictEqual)},g.notStrictEqual=function(N,A,F){N===A&&P(N,A,F,"!==",g.notStrictEqual)};function Q(D,N){if(!D||!N)return!1;if(Object.prototype.toString.call(N)=="[object RegExp]")return N.test(D);try{if(D instanceof N)return!0}catch{}return Error.isPrototypeOf(N)?!1:N.call({},D)===!0}function M(D){var N;try{D()}catch(A){N=A}return N}function L(D,N,A,F){var Y;if(typeof N!="function")throw new TypeError('"block" argument must be a function');typeof A=="string"&&(F=A,A=null),Y=M(N),F=(A&&A.name?" ("+A.name+").":".")+(F?" "+F:"."),D&&!Y&&P(Y,A,"Missing expected exception"+F);var pe=typeof F=="string",ae=!D&&u.isError(Y),B=!D&&Y&&!A;if((ae&&pe&&Q(Y,A)||B)&&P(Y,A,"Got unwanted exception"+F),D&&Y&&A&&!Q(Y,A)||!D&&Y)throw Y}g.throws=function(D,N,A){L(!0,D,N,A)},g.doesNotThrow=function(D,N,A){L(!1,D,N,A)},g.ifError=function(D){if(D)throw D};function V(D,N){D||P(D,!0,N,"==",V)}g.strict=s(V,g,{equal:g.strictEqual,deepEqual:g.deepStrictEqual,notEqual:g.notStrictEqual,notDeepEqual:g.notDeepStrictEqual}),g.strict.strict=g.strict;var G=Object.keys||function(D){var N=[];for(var A in D)c.call(D,A)&&N.push(A);return N}}).call(this)}).call(this,typeof _r<"u"?_r:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":22,"util/":4}],2:[function(n,r,i){typeof Object.create=="function"?r.exports=function(s,l){s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:r.exports=function(s,l){s.super_=l;var a=function(){};a.prototype=l.prototype,s.prototype=new a,s.prototype.constructor=s}},{}],3:[function(n,r,i){r.exports=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}},{}],4:[function(n,r,i){(function(o,s){(function(){var l=/%[sdj%]/g;i.format=function(B){if(!k(B)){for(var q=[],te=0;te<arguments.length;te++)q.push(c(arguments[te]));return q.join(" ")}for(var te=1,we=arguments,X=we.length,W=String(B).replace(l,function(fe){if(fe==="%%")return"%";if(te>=X)return fe;switch(fe){case"%s":return String(we[te++]);case"%d":return Number(we[te++]);case"%j":try{return JSON.stringify(we[te++])}catch{return"[Circular]"}default:return fe}}),z=we[te];te<X;z=we[++te])E(z)||!L(z)?W+=" "+z:W+=" "+c(z);return W},i.deprecate=function(B,q){if(Q(s.process))return function(){return i.deprecate(B,q).apply(this,arguments)};if(o.noDeprecation===!0)return B;var te=!1;function we(){if(!te){if(o.throwDeprecation)throw new Error(q);o.traceDeprecation?console.trace(q):console.error(q),te=!0}return B.apply(this,arguments)}return we};var a={},u;i.debuglog=function(B){if(Q(u)&&(u={}.NODE_DEBUG||""),B=B.toUpperCase(),!a[B])if(new RegExp("\\b"+B+"\\b","i").test(u)){var q=o.pid;a[B]=function(){var te=i.format.apply(i,arguments);console.error("%s %d: %s",B,q,te)}}else a[B]=function(){};return a[B]};function c(B,q){var te={seen:[],stylize:h};return arguments.length>=3&&(te.depth=arguments[2]),arguments.length>=4&&(te.colors=arguments[3]),P(q)?te.showHidden=q:q&&i._extend(te,q),Q(te.showHidden)&&(te.showHidden=!1),Q(te.depth)&&(te.depth=2),Q(te.colors)&&(te.colors=!1),Q(te.customInspect)&&(te.customInspect=!0),te.colors&&(te.stylize=f),p(te,B,te.depth)}i.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(B,q){var te=c.styles[q];return te?"\x1B["+c.colors[te][0]+"m"+B+"\x1B["+c.colors[te][1]+"m":B}function h(B,q){return B}function d(B){var q={};return B.forEach(function(te,we){q[te]=!0}),q}function p(B,q,te){if(B.customInspect&&q&&D(q.inspect)&&q.inspect!==i.inspect&&!(q.constructor&&q.constructor.prototype===q)){var we=q.inspect(te,B);return k(we)||(we=p(B,we,te)),we}var X=g(B,q);if(X)return X;var W=Object.keys(q),z=d(W);if(B.showHidden&&(W=Object.getOwnPropertyNames(q)),G(q)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return y(q);if(W.length===0){if(D(q)){var fe=q.name?": "+q.name:"";return B.stylize("[Function"+fe+"]","special")}if(M(q))return B.stylize(RegExp.prototype.toString.call(q),"regexp");if(V(q))return B.stylize(Date.prototype.toString.call(q),"date");if(G(q))return y(q)}var be="",Be=!1,Me=["{","}"];if(b(q)&&(Be=!0,Me=["[","]"]),D(q)){var Ne=q.name?": "+q.name:"";be=" [Function"+Ne+"]"}if(M(q)&&(be=" "+RegExp.prototype.toString.call(q)),V(q)&&(be=" "+Date.prototype.toUTCString.call(q)),G(q)&&(be=" "+y(q)),W.length===0&&(!Be||q.length==0))return Me[0]+be+Me[1];if(te<0)return M(q)?B.stylize(RegExp.prototype.toString.call(q),"regexp"):B.stylize("[Object]","special");B.seen.push(q);var ie;return Be?ie=O(B,q,te,z,W):ie=W.map(function(lt){return m(B,q,te,z,lt,Be)}),B.seen.pop(),v(ie,be,Me)}function g(B,q){if(Q(q))return B.stylize("undefined","undefined");if(k(q)){var te="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(te,"string")}if(w(q))return B.stylize(""+q,"number");if(P(q))return B.stylize(""+q,"boolean");if(E(q))return B.stylize("null","null")}function y(B){return"["+Error.prototype.toString.call(B)+"]"}function O(B,q,te,we,X){for(var W=[],z=0,fe=q.length;z<fe;++z)ae(q,String(z))?W.push(m(B,q,te,we,String(z),!0)):W.push("");return X.forEach(function(be){be.match(/^\d+$/)||W.push(m(B,q,te,we,be,!0))}),W}function m(B,q,te,we,X,W){var z,fe,be;if(be=Object.getOwnPropertyDescriptor(q,X)||{value:q[X]},be.get?be.set?fe=B.stylize("[Getter/Setter]","special"):fe=B.stylize("[Getter]","special"):be.set&&(fe=B.stylize("[Setter]","special")),ae(we,X)||(z="["+X+"]"),fe||(B.seen.indexOf(be.value)<0?(E(te)?fe=p(B,be.value,null):fe=p(B,be.value,te-1),fe.indexOf(`
|
|
48
|
+
`)>-1&&(W?fe=fe.split(`
|
|
49
|
+
`).map(function(Be){return" "+Be}).join(`
|
|
50
|
+
`).substr(2):fe=`
|
|
51
|
+
`+fe.split(`
|
|
52
|
+
`).map(function(Be){return" "+Be}).join(`
|
|
53
|
+
`))):fe=B.stylize("[Circular]","special")),Q(z)){if(W&&X.match(/^\d+$/))return fe;z=JSON.stringify(""+X),z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.substr(1,z.length-2),z=B.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=B.stylize(z,"string"))}return z+": "+fe}function v(B,q,te){var we=B.reduce(function(X,W){return W.indexOf(`
|
|
54
|
+
`)>=0,X+W.replace(/\u001b\[\d\d?m/g,"").length+1},0);return we>60?te[0]+(q===""?"":q+`
|
|
55
|
+
`)+" "+B.join(`,
|
|
56
|
+
`)+" "+te[1]:te[0]+q+" "+B.join(", ")+" "+te[1]}function b(B){return Array.isArray(B)}i.isArray=b;function P(B){return typeof B=="boolean"}i.isBoolean=P;function E(B){return B===null}i.isNull=E;function T(B){return B==null}i.isNullOrUndefined=T;function w(B){return typeof B=="number"}i.isNumber=w;function k(B){return typeof B=="string"}i.isString=k;function C(B){return typeof B=="symbol"}i.isSymbol=C;function Q(B){return B===void 0}i.isUndefined=Q;function M(B){return L(B)&&A(B)==="[object RegExp]"}i.isRegExp=M;function L(B){return typeof B=="object"&&B!==null}i.isObject=L;function V(B){return L(B)&&A(B)==="[object Date]"}i.isDate=V;function G(B){return L(B)&&(A(B)==="[object Error]"||B instanceof Error)}i.isError=G;function D(B){return typeof B=="function"}i.isFunction=D;function N(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}i.isPrimitive=N,i.isBuffer=n("./support/isBuffer");function A(B){return Object.prototype.toString.call(B)}function F(B){return B<10?"0"+B.toString(10):B.toString(10)}var Y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(){var B=new Date,q=[F(B.getHours()),F(B.getMinutes()),F(B.getSeconds())].join(":");return[B.getDate(),Y[B.getMonth()],q].join(" ")}i.log=function(){console.log("%s - %s",pe(),i.format.apply(i,arguments))},i.inherits=n("inherits"),i._extend=function(B,q){if(!q||!L(q))return B;for(var te=Object.keys(q),we=te.length;we--;)B[te[we]]=q[te[we]];return B};function ae(B,q){return Object.prototype.hasOwnProperty.call(B,q)}}).call(this)}).call(this,n("_process"),typeof _r<"u"?_r:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":3,_process:33,inherits:2}],5:[function(n,r,i){(function(o){(function(){var s=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],l=typeof globalThis>"u"?o:globalThis;r.exports=function(){for(var u=[],c=0;c<s.length;c++)typeof l[s[c]]=="function"&&(u[u.length]=s[c]);return u}}).call(this)}).call(this,typeof _r<"u"?_r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],6:[function(n,r,i){var o=n("get-intrinsic"),s=n("./"),l=s(o("String.prototype.indexOf"));r.exports=function(u,c){var f=o(u,!!c);return typeof f=="function"&&l(u,".prototype.")>-1?s(f):f}},{"./":7,"get-intrinsic":11}],7:[function(n,r,i){var o=n("function-bind"),s=n("get-intrinsic"),l=s("%Function.prototype.apply%"),a=s("%Function.prototype.call%"),u=s("%Reflect.apply%",!0)||o.call(a,l),c=s("%Object.getOwnPropertyDescriptor%",!0),f=s("%Object.defineProperty%",!0),h=s("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}r.exports=function(g){var y=u(o,a,arguments);if(c&&f){var O=c(y,"length");O.configurable&&f(y,"length",{value:1+h(0,g.length-(arguments.length-1))})}return y};var d=function(){return u(o,l,arguments)};f?f(r.exports,"apply",{value:d}):r.exports.apply=d},{"function-bind":10,"get-intrinsic":11}],8:[function(n,r,i){var o=n("is-callable"),s=Object.prototype.toString,l=Object.prototype.hasOwnProperty,a=function(d,p,g){for(var y=0,O=d.length;y<O;y++)l.call(d,y)&&(g==null?p(d[y],y,d):p.call(g,d[y],y,d))},u=function(d,p,g){for(var y=0,O=d.length;y<O;y++)g==null?p(d.charAt(y),y,d):p.call(g,d.charAt(y),y,d)},c=function(d,p,g){for(var y in d)l.call(d,y)&&(g==null?p(d[y],y,d):p.call(g,d[y],y,d))},f=function(d,p,g){if(!o(p))throw new TypeError("iterator must be a function");var y;arguments.length>=3&&(y=g),s.call(d)==="[object Array]"?a(d,p,y):typeof d=="string"?u(d,p,y):c(d,p,y)};r.exports=f},{"is-callable":19}],9:[function(n,r,i){var o="Function.prototype.bind called on incompatible ",s=Array.prototype.slice,l=Object.prototype.toString,a="[object Function]";r.exports=function(c){var f=this;if(typeof f!="function"||l.call(f)!==a)throw new TypeError(o+f);for(var h=s.call(arguments,1),d,p=function(){if(this instanceof d){var v=f.apply(this,h.concat(s.call(arguments)));return Object(v)===v?v:this}else return f.apply(c,h.concat(s.call(arguments)))},g=Math.max(0,f.length-h.length),y=[],O=0;O<g;O++)y.push("$"+O);if(d=Function("binder","return function ("+y.join(",")+"){ return binder.apply(this,arguments); }")(p),f.prototype){var m=function(){};m.prototype=f.prototype,d.prototype=new m,m.prototype=null}return d}},{}],10:[function(n,r,i){var o=n("./implementation");r.exports=Function.prototype.bind||o},{"./implementation":9}],11:[function(n,r,i){var o,s=SyntaxError,l=Function,a=TypeError,u=function(D){try{return l('"use strict"; return ('+D+").constructor;")()}catch{}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch{c=null}var f=function(){throw new a},h=c?function(){try{return arguments.callee,f}catch{try{return c(arguments,"callee").get}catch{return f}}}():f,d=n("has-symbols")(),p=Object.getPrototypeOf||function(D){return D.__proto__},g={},y=typeof Uint8Array>"u"?o:p(Uint8Array),O={"%AggregateError%":typeof AggregateError>"u"?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?o:ArrayBuffer,"%ArrayIteratorPrototype%":d?p([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":g,"%AsyncGenerator%":g,"%AsyncGeneratorFunction%":g,"%AsyncIteratorPrototype%":g,"%Atomics%":typeof Atomics>"u"?o:Atomics,"%BigInt%":typeof BigInt>"u"?o:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?o:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?o:Float32Array,"%Float64Array%":typeof Float64Array>"u"?o:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?o:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":g,"%Int8Array%":typeof Int8Array>"u"?o:Int8Array,"%Int16Array%":typeof Int16Array>"u"?o:Int16Array,"%Int32Array%":typeof Int32Array>"u"?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?p(p([][Symbol.iterator]())):o,"%JSON%":typeof JSON=="object"?JSON:o,"%Map%":typeof Map>"u"?o:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d?o:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?o:Promise,"%Proxy%":typeof Proxy>"u"?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?o:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?o:Set,"%SetIteratorPrototype%":typeof Set>"u"||!d?o:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?p(""[Symbol.iterator]()):o,"%Symbol%":d?Symbol:o,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?o:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?o:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?o:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?o:WeakMap,"%WeakRef%":typeof WeakRef>"u"?o:WeakRef,"%WeakSet%":typeof WeakSet>"u"?o:WeakSet};try{null.error}catch(D){var m=p(p(D));O["%Error.prototype%"]=m}var v=function D(N){var A;if(N==="%AsyncFunction%")A=u("async function () {}");else if(N==="%GeneratorFunction%")A=u("function* () {}");else if(N==="%AsyncGeneratorFunction%")A=u("async function* () {}");else if(N==="%AsyncGenerator%"){var F=D("%AsyncGeneratorFunction%");F&&(A=F.prototype)}else if(N==="%AsyncIteratorPrototype%"){var Y=D("%AsyncGenerator%");Y&&(A=p(Y.prototype))}return O[N]=A,A},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=n("function-bind"),E=n("has"),T=P.call(Function.call,Array.prototype.concat),w=P.call(Function.apply,Array.prototype.splice),k=P.call(Function.call,String.prototype.replace),C=P.call(Function.call,String.prototype.slice),Q=P.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,V=function(N){var A=C(N,0,1),F=C(N,-1);if(A==="%"&&F!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(F==="%"&&A!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var Y=[];return k(N,M,function(pe,ae,B,q){Y[Y.length]=B?k(q,L,"$1"):ae||pe}),Y},G=function(N,A){var F=N,Y;if(E(b,F)&&(Y=b[F],F="%"+Y[0]+"%"),E(O,F)){var pe=O[F];if(pe===g&&(pe=v(F)),typeof pe>"u"&&!A)throw new a("intrinsic "+N+" exists, but is not available. Please file an issue!");return{alias:Y,name:F,value:pe}}throw new s("intrinsic "+N+" does not exist!")};r.exports=function(N,A){if(typeof N!="string"||N.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof A!="boolean")throw new a('"allowMissing" argument must be a boolean');if(Q(/^%?[^%]*%?$/,N)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var F=V(N),Y=F.length>0?F[0]:"",pe=G("%"+Y+"%",A),ae=pe.name,B=pe.value,q=!1,te=pe.alias;te&&(Y=te[0],w(F,T([0,1],te)));for(var we=1,X=!0;we<F.length;we+=1){var W=F[we],z=C(W,0,1),fe=C(W,-1);if((z==='"'||z==="'"||z==="`"||fe==='"'||fe==="'"||fe==="`")&&z!==fe)throw new s("property names with quotes must have matching quotes");if((W==="constructor"||!X)&&(q=!0),Y+="."+W,ae="%"+Y+"%",E(O,ae))B=O[ae];else if(B!=null){if(!(W in B)){if(!A)throw new a("base intrinsic for "+N+" exists, but the property is not available.");return}if(c&&we+1>=F.length){var be=c(B,W);X=!!be,X&&"get"in be&&!("originalValue"in be.get)?B=be.get:B=B[W]}else X=E(B,W),B=B[W];X&&!q&&(O[ae]=B)}}return B}},{"function-bind":10,has:16,"has-symbols":13}],12:[function(n,r,i){var o=n("get-intrinsic"),s=o("%Object.getOwnPropertyDescriptor%",!0);if(s)try{s([],"length")}catch{s=null}r.exports=s},{"get-intrinsic":11}],13:[function(n,r,i){var o=typeof Symbol<"u"&&Symbol,s=n("./shams");r.exports=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()}},{"./shams":14}],14:[function(n,r,i){r.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},l=Symbol("test"),a=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var u=42;s[l]=u;for(l in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var c=Object.getOwnPropertySymbols(s);if(c.length!==1||c[0]!==l||!Object.prototype.propertyIsEnumerable.call(s,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(s,l);if(f.value!==u||f.enumerable!==!0)return!1}return!0}},{}],15:[function(n,r,i){var o=n("has-symbols/shams");r.exports=function(){return o()&&!!Symbol.toStringTag}},{"has-symbols/shams":14}],16:[function(n,r,i){var o=n("function-bind");r.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":10}],17:[function(n,r,i){typeof Object.create=="function"?r.exports=function(s,l){l&&(s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(s,l){if(l){s.super_=l;var a=function(){};a.prototype=l.prototype,s.prototype=new a,s.prototype.constructor=s}}},{}],18:[function(n,r,i){var o=n("has-tostringtag/shams")(),s=n("call-bind/callBound"),l=s("Object.prototype.toString"),a=function(h){return o&&h&&typeof h=="object"&&Symbol.toStringTag in h?!1:l(h)==="[object Arguments]"},u=function(h){return a(h)?!0:h!==null&&typeof h=="object"&&typeof h.length=="number"&&h.length>=0&&l(h)!=="[object Array]"&&l(h.callee)==="[object Function]"},c=function(){return a(arguments)}();a.isLegacyArguments=u,r.exports=c?a:u},{"call-bind/callBound":6,"has-tostringtag/shams":15}],19:[function(n,r,i){var o=Function.prototype.toString,s=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,l,a;if(typeof s=="function"&&typeof Object.defineProperty=="function")try{l=Object.defineProperty({},"length",{get:function(){throw a}}),a={},s(function(){throw 42},null,l)}catch(T){T!==a&&(s=null)}else s=null;var u=/^\s*class\b/,c=function(w){try{var k=o.call(w);return u.test(k)}catch{return!1}},f=function(w){try{return c(w)?!1:(o.call(w),!0)}catch{return!1}},h=Object.prototype.toString,d="[object Object]",p="[object Function]",g="[object GeneratorFunction]",y="[object HTMLAllCollection]",O="[object HTML document.all class]",m="[object HTMLCollection]",v=typeof Symbol=="function"&&!!Symbol.toStringTag,b=!(0 in[,]),P=function(){return!1};if(typeof document=="object"){var E=document.all;h.call(E)===h.call(document.all)&&(P=function(w){if((b||!w)&&(typeof w>"u"||typeof w=="object"))try{var k=h.call(w);return(k===y||k===O||k===m||k===d)&&w("")==null}catch{}return!1})}r.exports=s?function(w){if(P(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{s(w,null,l)}catch(k){if(k!==a)return!1}return!c(w)&&f(w)}:function(w){if(P(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(v)return f(w);if(c(w))return!1;var k=h.call(w);return k!==p&&k!==g&&!/^\[object HTML/.test(k)?!1:f(w)}},{}],20:[function(n,r,i){var o=Object.prototype.toString,s=Function.prototype.toString,l=/^\s*(?:function)?\*/,a=n("has-tostringtag/shams")(),u=Object.getPrototypeOf,c=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch{}},f;r.exports=function(d){if(typeof d!="function")return!1;if(l.test(s.call(d)))return!0;if(!a){var p=o.call(d);return p==="[object GeneratorFunction]"}if(!u)return!1;if(typeof f>"u"){var g=c();f=g?u(g):!1}return u(d)===f}},{"has-tostringtag/shams":15}],21:[function(n,r,i){(function(o){(function(){var s=n("for-each"),l=n("available-typed-arrays"),a=n("call-bind/callBound"),u=a("Object.prototype.toString"),c=n("has-tostringtag/shams")(),f=n("gopd"),h=typeof globalThis>"u"?o:globalThis,d=l(),p=a("Array.prototype.indexOf",!0)||function(b,P){for(var E=0;E<b.length;E+=1)if(b[E]===P)return E;return-1},g=a("String.prototype.slice"),y={},O=Object.getPrototypeOf;c&&f&&O&&s(d,function(v){var b=new h[v];if(Symbol.toStringTag in b){var P=O(b),E=f(P,Symbol.toStringTag);if(!E){var T=O(P);E=f(T,Symbol.toStringTag)}y[v]=E.get}});var m=function(b){var P=!1;return s(y,function(E,T){if(!P)try{P=E.call(b)===T}catch{}}),P};r.exports=function(b){if(!b||typeof b!="object")return!1;if(!c||!(Symbol.toStringTag in b)){var P=g(u(b),8,-1);return p(d,P)>-1}return f?m(b):!1}}).call(this)}).call(this,typeof _r<"u"?_r:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":5,"call-bind/callBound":6,"for-each":8,gopd:12,"has-tostringtag/shams":15}],22:[function(n,r,i){var o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function a(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function u(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var f={},h=0;h<10;h++)f["_"+String.fromCharCode(h)]=h;var d=Object.getOwnPropertyNames(f).map(function(g){return f[g]});if(d.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(g){p[g]=g}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}r.exports=u()?Object.assign:function(c,f){for(var h,d=a(c),p,g=1;g<arguments.length;g++){h=Object(arguments[g]);for(var y in h)s.call(h,y)&&(d[y]=h[y]);if(o){p=o(h);for(var O=0;O<p.length;O++)l.call(h,p[O])&&(d[p[O]]=h[p[O]])}}return d}},{}],23:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.eachChildOf=i.advancer=i.readCursor=i.writeCursor=i.WriteCursor=i.ReadCursor=i.isValidPathItem=void 0;function o(O,m){if(!O)throw new Error(m)}const s=O=>O!=null&&typeof O=="object"&&!Array.isArray(O),l=(O,m)=>typeof O==typeof m?O>m:typeof O=="string"&&typeof m=="number";function a(O,m){for(let v in O){const b=v;m.write(b,O[b])}}const u=O=>typeof O=="number"||typeof O=="string"&&O!=="__proto__";i.isValidPathItem=u;class c{constructor(m=null){this.parents=[],this.indexes=[],this.lcIdx=-1,this.idx=-1,this.container=m}ascend(){o(this.parents.length===this.indexes.length/2),this.idx===0?this.parents.length?(this.lcIdx=this.indexes.pop(),this.container=this.parents.pop(),this.idx=this.indexes.pop()):(this.lcIdx=0,this.idx=-1):(o(this.idx>0),this.idx--,s(this.container[this.idx])&&this.idx--)}getPath(){const m=[];let v=this.container,b=this.parents.length-1,P=this.idx;for(;P>=0;)m.unshift(v[P]),P===0?(P=this.indexes[b*2],v=this.parents[b--]):P-=s(v[P-1])?2:1;return m}}class f extends c{get(){return this.container?this.container.slice(this.idx+1):null}getKey(){return o(this.container!=null,"Invalid call to getKey before cursor descended"),this.container[this.idx]}getComponent(){let m;return this.container&&this.container.length>this.idx+1&&s(m=this.container[this.idx+1])?m:null}descendFirst(){let m=this.idx+1;if(!this.container||m>=this.container.length||s(this.container[m])&&m+1>=this.container.length)return!1;s(this.container[m])&&m++;const v=this.container[m];return Array.isArray(v)?(this.indexes.push(this.idx),this.parents.push(this.container),this.indexes.push(m),this.idx=0,this.container=v):this.idx=m,!0}nextSibling(){if(o(this.parents.length===this.indexes.length/2),this.idx>0||this.parents.length===0)return!1;const m=this.indexes[this.indexes.length-1]+1,v=this.parents[this.parents.length-1];return m>=v.length?!1:(o(!isNaN(m)),this.indexes[this.indexes.length-1]=m,this.container=v[m],!0)}_init(m,v,b,P){this.container=m,this.idx=v,this.parents=b.slice(),this.indexes=P.slice()}clone(){const m=new f;return m._init(this.container,this.idx,this.parents,this.indexes),m}*[Symbol.iterator](){if(this.descendFirst()){do yield this.getKey();while(this.nextSibling());this.ascend()}}traverse(m,v){const b=this.getComponent();b&&v(b,m);for(const P of this)m&&m.descend(P),this.traverse(m,v),m&&m.ascend()}eachPick(m,v){this.traverse(m,(b,P)=>{b.p!=null&&v(b.p,P)})}eachDrop(m,v){this.traverse(m,(b,P)=>{b.d!=null&&v(b.d,P)})}}i.ReadCursor=f;class h extends c{constructor(m=null){super(m),this.pendingDescent=[],this._op=m}flushDescent(){o(this.parents.length===this.indexes.length/2),this.container===null&&(this._op=this.container=[]);for(let m=0;m<this.pendingDescent.length;m++){const v=this.pendingDescent[m];let b=this.idx+1;if(b<this.container.length&&s(this.container[b])&&b++,o(b===this.container.length||!s(this.container[b])),b===this.container.length)this.container.push(v),this.idx=b;else if(this.container[b]===v)this.idx=b;else{if(!Array.isArray(this.container[b])){const P=this.container.splice(b,this.container.length-b);this.container.push(P),this.lcIdx>-1&&(this.lcIdx=b)}for(this.indexes.push(this.idx),this.parents.push(this.container),this.lcIdx!==-1&&(o(l(v,this.container[this.lcIdx][0])),b=this.lcIdx+1,this.lcIdx=-1);b<this.container.length&&l(v,this.container[b][0]);)b++;if(this.indexes.push(b),this.idx=0,b<this.container.length&&this.container[b][0]===v)this.container=this.container[b];else{const P=[v];this.container.splice(b,0,P),this.container=P}}}this.pendingDescent.length=0}reset(){this.lcIdx=-1}getComponent(){this.flushDescent();const m=this.idx+1;if(m<this.container.length&&s(this.container[m]))return this.container[m];{const v={};return this.container.splice(m,0,v),v}}write(m,v){const b=this.getComponent();o(b[m]==null||b[m]===v,"Internal consistency error: Overwritten component. File a bug"),b[m]=v}get(){return this._op}descend(m){if(!(0,i.isValidPathItem)(m))throw Error("Invalid JSON key");this.pendingDescent.push(m)}descendPath(m){return this.pendingDescent.push(...m),this}ascend(){this.pendingDescent.length?this.pendingDescent.pop():super.ascend()}mergeTree(m,v=a){if(m===null)return;if(o(Array.isArray(m)),m===this._op)throw Error("Cannot merge into my own tree");const b=this.lcIdx,P=this.parents.length;let E=0;for(let T=0;T<m.length;T++){const w=m[T];typeof w=="string"||typeof w=="number"?(E++,this.descend(w)):Array.isArray(w)?this.mergeTree(w,v):typeof w=="object"&&v(w,this)}for(;E--;)this.ascend();this.lcIdx=this.parents.length===P?b:-1}at(m,v){this.descendPath(m),v(this);for(let b=0;b<m.length;b++)this.ascend();return this}writeAtPath(m,v,b){return this.at(m,()=>this.write(v,b)),this.reset(),this}writeMove(m,v,b=0){return this.writeAtPath(m,"p",b).writeAtPath(v,"d",b)}getPath(){const m=super.getPath();return m.push(...this.pendingDescent),m}}i.WriteCursor=h;const d=()=>new h;i.writeCursor=d;const p=O=>new f(O);i.readCursor=p;function g(O,m,v){let b,P;P=b=O?O.descendFirst():!1;function E(T){let w;for(;P;){const k=w=O.getKey();if(T!=null){let C=!1;if(m&&typeof k=="number"&&(w=m(k,O.getComponent()),w<0&&(w=~w,C=!0)),l(w,T))return null;if(w===T&&!C)return O}v&&typeof w=="number"&&v(w,O.getComponent()),P=O.nextSibling()}return null}return E.end=()=>{b&&O.ascend()},E}i.advancer=g;function y(O,m,v){let b,P,E,T;for(b=P=O&&O.descendFirst(),E=T=m&&m.descendFirst();b||E;){let w=b?O.getKey():null,k=E?m.getKey():null;w!==null&&k!==null&&(l(k,w)?k=null:w!==k&&(w=null)),v(w??k,w!=null?O:null,k!=null?m:null),w!=null&&b&&(b=O.nextSibling()),k!=null&&E&&(E=m.nextSibling())}P&&O.ascend(),T&&m.ascend()}i.eachChildOf=y},{}],24:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function o(s){if(s===null)return null;if(Array.isArray(s))return s.map(o);if(typeof s=="object"){const l={};for(let a in s)l[a]=o(s[a]);return l}else return s}i.default=o},{}],25:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function o(a,u){if(Array.isArray(u))return!1;for(let c in a)if(!l(a[c],u[c]))return!1;for(let c in u)if(a[c]===void 0)return!1;return!0}function s(a,u){if(!Array.isArray(u)||a.length!==u.length)return!1;for(let c=0;c<a.length;c++)if(!l(a[c],u[c]))return!1;return!0}function l(a,u){return a===u?!0:a===null||u===null||typeof a!="object"||typeof u!="object"?!1:Array.isArray(a)?s(a,u):o(a,u)}i.default=l},{}],26:[function(n,r,i){var o=this&&this.__createBinding||(Object.create?function(u,c,f,h){h===void 0&&(h=f);var d=Object.getOwnPropertyDescriptor(c,f);(!d||("get"in d?!c.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,h,d)}:function(u,c,f,h){h===void 0&&(h=f),u[h]=c[f]}),s=this&&this.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&o(c,u,f)};Object.defineProperty(i,"__esModule",{value:!0}),i.ConflictType=i.WriteCursor=i.ReadCursor=void 0,s(n("./json1.release.js"),i);var l=n("./cursor.js");Object.defineProperty(i,"ReadCursor",{enumerable:!0,get:function(){return l.ReadCursor}}),Object.defineProperty(i,"WriteCursor",{enumerable:!0,get:function(){return l.WriteCursor}});var a=n("./types");Object.defineProperty(i,"ConflictType",{enumerable:!0,get:function(){return a.ConflictType}})},{"./cursor.js":23,"./json1.release.js":27,"./types":29}],27:[function(n,r,i){var o=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(i,"__esModule",{value:!0}),i.editOp=i.replaceOp=i.insertOp=i.moveOp=i.removeOp=i.type=void 0;const s=o(n("./deepEqual.js")),l=o(n("./deepClone.js")),a=n("./cursor.js"),u=n("./types.js"),c=!0,f=()=>{};function h(_,H){if(!_)throw new Error(H)}let d=!1;i.type={name:"p",uri:"p",readCursor:a.readCursor,writeCursor:a.writeCursor,create:_=>_,isNoop:_=>_==null,setDebug(_){d=_,f.quiet=!_},registerSubtype:V,checkValidOp:ae,normalize:B,apply:q,transformPosition:we,transformPresence:X,compose:z,tryTransform:en,transform:xr,makeInvertible:Be,invert:fe,invertWithDoc:Me,RM_UNEXPECTED_CONTENT:u.ConflictType.RM_UNEXPECTED_CONTENT,DROP_COLLISION:u.ConflictType.DROP_COLLISION,BLACKHOLE:u.ConflictType.BLACKHOLE,transformNoConflict:(_,H,K)=>Li(()=>!0,_,H,K),typeAllowingConflictsPred:_=>Object.assign(Object.assign({},i.type),{transform:(H,K,ue)=>Li(_,H,K,ue)})};const p=_=>_?_.getComponent():null;function g(_){return _&&typeof _=="object"&&!Array.isArray(_)}const y=_=>Array.isArray(_)?_.slice():_!==null&&typeof _=="object"?Object.assign({},_):_,O=_=>_&&(_.p!=null||_.r!==void 0),m=_=>_&&(_.d!=null||_.i!==void 0),v=(_,H=!0)=>(0,a.writeCursor)().writeAtPath(_,"r",H).get();i.removeOp=v;const b=(_,H)=>(0,a.writeCursor)().writeMove(_,H).get();i.moveOp=b;const P=(_,H)=>(0,a.writeCursor)().writeAtPath(_,"i",H).get();i.insertOp=P;const E=(_,H,K)=>(0,a.writeCursor)().at(_,ue=>{ue.write("r",H),ue.write("i",K)}).get();i.replaceOp=E;const T=(_,H,K,ue=!1)=>(0,a.writeCursor)().at(_,le=>F(le,H,K,ue)).get();function w(_,H){return h(_!=null),typeof H=="number"?(h(Array.isArray(_),"Invalid key - child is not an array"),(_=_.slice()).splice(H,1)):(h(g(_),"Invalid key - child is not an object"),delete(_=Object.assign({},_))[H]),_}function k(_,H,K){return typeof H=="number"?(h(_!=null,"Container is missing for key"),h(Array.isArray(_),"Cannot use numerical key for object container"),h(_.length>=H,"Cannot insert into out of bounds index"),_.splice(H,0,K)):(h(g(_),"Cannot insert into missing item"),h(_[H]===void 0,"Trying to overwrite value at key. Your op needs to remove it first"),_[H]=K),K}i.editOp=T;const C=(_,H,K)=>((_=y(_))[H]=K,_),Q=(_,H)=>_!=null&&(typeof H=="number"?Array.isArray(_):typeof _=="object"),M=(_,H)=>Q(_,H)?_[H]:void 0,L={};function V(_){let H=_.type?_.type:_;H.name&&(L[H.name]=H),H.uri&&(L[H.uri]=H)}const G=_=>{const H=L[_];if(H)return H;throw Error("Missing type: "+_)};V(n("ot-text-unicode"));const D=(_,H)=>_+H;V({name:"number",apply:D,compose:D,invert:_=>-_,transform:_=>_});const N=_=>_==null?null:_.et?G(_.et):_.es?L["text-unicode"]:_.ena!=null?L.number:null,A=_=>_.es?_.es:_.ena!=null?_.ena:_.e,F=(_,H,K,ue=!1)=>{const[le,Oe]=typeof H=="string"?[G(H),H]:[H,H.name];!ue&&le.isNoop&&le.isNoop(K)||(Oe==="number"?_.write("ena",K):Oe==="text-unicode"?_.write("es",K):(_.write("et",Oe),_.write("e",K)))};function Y(_){h(typeof _=="number"),h(_>=0),h(_===(0|_))}function pe(_){typeof _=="number"?Y(_):h(typeof _=="string")}function ae(_){if(_===null)return;const H=new Set,K=new Set,ue=Oe=>{let Ge=!0,Ke=!1;for(let oe in Oe){const Xe=Oe[oe];if(Ge=!1,h(oe==="p"||oe==="r"||oe==="d"||oe==="i"||oe==="e"||oe==="es"||oe==="ena"||oe==="et","Invalid component item '"+oe+"'"),oe==="p")Y(Xe),h(!H.has(Xe)),H.add(Xe),h(Oe.r===void 0);else if(oe==="d")Y(Xe),h(!K.has(Xe)),K.add(Xe),h(Oe.i===void 0);else if(oe==="e"||oe==="es"||oe==="ena"){h(!Ke),Ke=!0;const Ee=N(Oe);h(Ee,"Missing type in edit"),Ee.checkValidOp&&Ee.checkValidOp(A(Oe))}}h(!Ge)},le=(Oe,Ge,Ke)=>{if(!Array.isArray(Oe))throw Error("Op must be null or a list");if(Oe.length===0)throw Error("Empty descent");Ge||pe(Oe[0]);let oe=1,Xe=0,Ee=0;for(let ve=0;ve<Oe.length;ve++){const me=Oe[ve];if(h(me!=null),Array.isArray(me)){const Qe=le(me,!1);if(Xe){const Je=typeof Ee,Le=typeof Qe;Je===Le?h(Ee<Qe,"descent keys are not in order"):h(Je==="number"&&Le==="string")}Ee=Qe,Xe++,oe=3}else typeof me=="object"?(h(oe===1,`Prev not scalar - instead ${oe}`),ue(me),oe=2):(h(oe!==3),pe(me),h((0,a.isValidPathItem)(me),"Invalid path key"),oe=1)}return h(Xe!==1,"Operation makes multiple descents. Remove some []"),h(oe===2||oe===3),Oe[0]};le(_,!0),h(H.size===K.size,"Mismatched picks and drops in op");for(let Oe=0;Oe<H.size;Oe++)h(H.has(Oe)),h(K.has(Oe))}function B(_){let H=0,K=[];const ue=(0,a.writeCursor)();return ue.mergeTree(_,(le,Oe)=>{const Ge=N(le);if(Ge){const oe=A(le);F(Oe,Ge,Ge.normalize?Ge.normalize(oe):oe)}for(const oe of["r","p","i","d"])if(le[oe]!==void 0){const Xe=oe==="p"||oe==="d"?(Ke=le[oe],K[Ke]==null&&(K[Ke]=H++),K[Ke]):le[oe];Oe.write(oe,Xe)}var Ke}),ue.get()}function q(_,H){if(f.quiet=!d,ae(H),H===null)return _;const K=[];return _=function ue(le,Oe){let Ge=le,Ke=0,oe={root:le},Xe=0,Ee=oe,ve="root";function me(){for(;Xe<Ke;Xe++){let Qe=Oe[Xe];typeof Qe!="object"&&(h(Q(Ee,ve)),Ee=Ee[ve]=y(Ee[ve]),ve=Qe)}}for(;Ke<Oe.length;Ke++){const Qe=Oe[Ke];if(Array.isArray(Qe)){const Je=ue(Ge,Qe);Je!==Ge&&Je!==void 0&&(me(),Ge=Ee[ve]=Je)}else if(typeof Qe=="object"){Qe.d!=null?(me(),Ge=k(Ee,ve,K[Qe.d])):Qe.i!==void 0&&(me(),Ge=k(Ee,ve,Qe.i));const Je=N(Qe);if(Je)me(),Ge=Ee[ve]=Je.apply(Ge,A(Qe));else if(Qe.e!==void 0)throw Error("Subtype "+Qe.et+" undefined")}else Ge=M(Ge,Qe)}return oe.root}(_=function ue(le,Oe){const Ge=[];let Ke=0;for(;Ke<Oe.length;Ke++){const oe=Oe[Ke];if(Array.isArray(oe))break;typeof oe!="object"&&(Ge.push(le),le=M(le,oe))}for(let oe=Oe.length-1;oe>=Ke;oe--)le=ue(le,Oe[oe]);for(--Ke;Ke>=0;Ke--){const oe=Oe[Ke];if(typeof oe!="object"){const Xe=Ge.pop();le=le===M(Xe,oe)?Xe:le===void 0?w(Xe,oe):C(Xe,oe,le)}else O(oe)&&(h(le!==void 0,"Cannot pick up or remove undefined"),oe.p!=null&&(K[oe.p]=le),le=void 0)}return le}(_,H),H)}const te=()=>{};function we(_,H){_=_.slice(),ae(H);const K=(0,a.readCursor)(H);let ue,le,Oe=!1;const Ge=[];for(let oe=0;;oe++){const Xe=_[oe],Ee=K.getComponent();if(Ee&&(Ee.r!==void 0?Oe=!0:Ee.p!=null&&(Oe=!1,ue=Ee.p,le=oe)),oe>=_.length)break;let ve=0;const me=(0,a.advancer)(K,void 0,(Je,Le)=>{O(Le)&&ve++});Ge.unshift(me);const Qe=me(Xe);if(typeof Xe=="number"&&(_[oe]-=ve),!Qe)break}if(Ge.forEach(oe=>oe.end()),Oe)return null;const Ke=()=>{let oe=0;if(ue!=null){const Xe=K.getPath();oe=Xe.length,_=Xe.concat(_.slice(le))}for(c;oe<_.length;oe++){const Xe=_[oe],Ee=p(K),ve=N(Ee);if(ve){const Le=A(Ee);ve.transformPosition?_[oe]=ve.transformPosition(_[oe],Le):ve.transformCursor&&(_[oe]=ve.transformCursor(_[oe],Le));break}let me=0;const Qe=(0,a.advancer)(K,(Le,ke)=>m(ke)?~(Le-me):Le-me,(Le,ke)=>{m(ke)&&me++}),Je=Qe(Xe);if(typeof Xe=="number"&&(_[oe]+=me),!Je)break}};return ue!=null?K.eachDrop(null,oe=>{oe===ue&&Ke()}):Ke(),_}function X(_,H){if(!_||!_.start||!_.end)return null;const K=we(_.start,H),ue=we(_.end,H);return K&&ue?Object.assign(Object.assign({},_),{start:K,end:ue}):K?Object.assign(Object.assign({},_),{start:K,end:K}):ue?Object.assign(Object.assign({},_),{start:ue,end:ue}):null}const W=(_,H,K)=>{typeof H=="number"?(h(Array.isArray(_)),h(H<_.length)):(h(!Array.isArray(_)),h(_[H]!==void 0)),K===void 0?typeof H=="number"?_.splice(H,1):delete _[H]:_[H]=K};function z(_,H){if(ae(_),ae(H),_==null)return H;if(H==null)return _;let K=0;const ue=(0,a.readCursor)(_),le=(0,a.readCursor)(H),Oe=(0,a.writeCursor)(),Ge=[],Ke=[],oe=[],Xe=[],Ee=[],ve=[],me=new Set;ue.traverse(null,Le=>{Le.p!=null&&(oe[Le.p]=ue.clone())}),le.traverse(null,Le=>{Le.d!=null&&(Xe[Le.d]=le.clone())});const Qe=(0,a.writeCursor)();return function Le(ke,Ue,ft,ut,wt,Lt,Ft,$t){h(Ue||ft);const $n=p(Ue),Tn=p(ft),si=!!Tn&&Tn.r!==void 0,Cr=!!$n&&$n.i!==void 0,ar=$n?$n.d:null,Gn=Tn?Tn.p:null,rt=(Lt||si)&&Gn==null;if(Gn!=null)ut=Xe[Gn],Ft=Ke[Gn]=new a.WriteCursor;else if(Tn&&Tn.r!==void 0)ut=null;else{const Ce=p(ut);Ce&&Ce.d!=null&&(ut=null)}const Re=p(ut);if(ar!=null)if(ke=oe[ar],$t=Ge[ar]=new a.WriteCursor,rt)Lt&&!si&&$t.write("r",!0);else{const Ce=Ee[ar]=K++;Ft.write("d",Ce)}else if($n&&$n.i!==void 0)ke=null;else{const Ce=p(ke);Ce&&Ce.p!=null&&(ke=null)}let Ie;Cr?(h(wt===void 0),Ie=$n.i):Ie=wt;const je=(Gn==null?!Cr||Lt||si:Ie===void 0)?null:Ft.getComponent();if(Gn!=null){if(!(wt!==void 0||Cr)){const Ce=ar!=null?Ee[ar]:K++;ve[Gn]=Ce,$t.write("p",Ce)}}else si&&(Cr||wt!==void 0||(Tn.r,$t.write("r",Tn.r)));const ye=rt?null:N($n),_e=N(Re);if((ye||_e)&&(ye&&ye.name,_e&&_e.name),ye&&_e){h(ye===_e);const Ce=A($n),ht=A(Re),un=ye.compose(Ce,ht);F(Ft,ye,un),me.add(Re)}else ye?F(Ft,ye,A($n)):_e&&(F(Ft,_e,A(Re)),me.add(Re));const nt=typeof Ie=="object"&&Ie!=null;let it=!1,at=0,Ye=0,Ht=0,kt=0,on=0;const He=(0,a.advancer)(ut,(Ce,ht)=>m(ht)?kt-Ce-1:Ce-kt,(Ce,ht)=>{m(ht)&&kt++}),et=(0,a.advancer)(ke,(Ce,ht)=>O(ht)?at-Ce-1:Ce-at,(Ce,ht)=>{O(ht)&&at++});if((0,a.eachChildOf)(Ue,ft,(Ce,ht,un)=>{let Ur,li,ur=Ce,es=Ce,ji=Ce;if(typeof Ce=="number"){let Ze=Ce+Ht;li=He(Ze),es=Ze+kt;let xt=Ce+Ye;Ur=et(xt),m(p(li))&&(Ur=null),ur=xt+at,ji=Ce+on,h(ur>=0,"p1PickKey is negative"),h(es>=0,"p2DropKey is negative");const tn=m(p(ht)),Tt=O(p(un));(tn||Tt&&!rt)&&on--,tn&&Ye--,Tt&&Ht--}else Ur=et(Ce),li=He(Ce);$t.descend(ur),Ft.descend(es);const Zr=nt&&!m(p(ht))?Ie[ji]:void 0,ts=Le(Ur,ht,un,li,Zr,rt,Ft,$t);nt&&!rt?Zr!==ts&&(it||(Ie=Array.isArray(Ie)?Ie.slice():Object.assign({},Ie),it=!0),W(Ie,ji,ts)):h(ts===void 0),Ft.ascend(),$t.ascend()}),et.end(),He.end(),je!=null)je.i=Ie;else if(!Lt&&!si&&Gn==null)return Ie}(ue,ue.clone(),le,le.clone(),void 0,!1,Oe,Qe),Oe.reset(),Oe.mergeTree(Qe.get()),Oe.reset(),Oe.get(),Ge.map(Le=>Le.get()),Ke.map(Le=>Le.get()),ue.traverse(Oe,(Le,ke)=>{const Ue=Le.p;if(Ue!=null){const ft=Ee[Ue];ft!=null&&ke.write("p",ft);const ut=Ge[Ue];ut&&ut.get(),ut&&ke.mergeTree(ut.get())}else Le.r!==void 0&&ke.write("r",Le.r)}),Oe.reset(),Oe.get(),le.traverse(Oe,(Le,ke)=>{const Ue=Le.d;if(Ue!=null){const ut=ve[Ue];ut!=null&&ke.write("d",ut);const wt=Ke[Ue];wt&&ke.mergeTree(wt.get())}else Le.i!==void 0&&ke.write("i",Le.i);const ft=N(Le);ft&&!me.has(Le)&&F(ke,ft,A(Le))}),Oe.get()}function fe(_){if(_==null)return null;const H=new a.ReadCursor(_),K=new a.WriteCursor;let ue;const le=[],Oe=[];if(function oe(Xe,Ee,ve){const me=Xe.getComponent();let Qe,Je=!1;if(me){me.p!=null&&(Ee.write("d",me.p),le[me.p]=Xe.clone()),me.r!==void 0&&Ee.write("i",me.r),me.d!=null&&(Ee.write("p",me.d),ve=void 0),me.i!==void 0&&(ve=Qe=me.i);const ke=N(me);ke&&(ve===void 0?(ue||(ue=new Set),ue.add(me)):(A(me),ve=ke.apply(ve,A(me)),Je=!0))}let Le=0;for(const ke of Xe){Ee.descend(ke);const Ue=typeof ke=="number"?ke-Le:ke,ft=M(ve,Ue);m(Xe.getComponent())&&Le++;const ut=oe(Xe,Ee,ft);if(ve!==void 0&&ut!==void 0){if(Je||(Je=!0,ve=y(ve)),!Q(ve,Ue))throw Error("Cannot modify child - invalid operation");ve[Ue]=ut}Ee.ascend()}if(Qe===void 0)return Je?ve:void 0;Ee.write("r",ve)}(H,K,void 0),ue){let oe=function(Xe,Ee,ve){const me=Ee.getComponent();if(me){const ke=me.d;if(ke!=null&&(Xe=le[ke],ve=Oe[ke]=(0,a.writeCursor)()),ue.has(me)){const Ue=N(me);if(!Ue.invert)throw Error(`Cannot invert subtype ${Ue.name}`);F(ve,Ue,Ue.invert(A(me)))}}let Qe=0,Je=0;const Le=(0,a.advancer)(Xe,(ke,Ue)=>O(Ue)?Qe-ke-1:ke-Qe,(ke,Ue)=>{O(Ue)&&Qe++});for(const ke of Ee)if(typeof ke=="number"){const Ue=ke-Je,ft=Le(Ue),ut=Ue+Qe;ve.descend(ut),oe(ft,Ee,ve),m(Ee.getComponent())&&Je++,ve.ascend()}else ve.descend(ke),oe(Le(ke),Ee,ve),ve.ascend();Le.end()};var Ke=oe;K.reset(),oe(H.clone(),H,K),Oe.length&&(K.reset(),H.traverse(K,(Xe,Ee)=>{const ve=Xe.p;if(ve!=null){const me=Oe[ve];me&&me.get(),me&&Ee.mergeTree(me.get())}}))}return K.get()}const be=(_,H)=>_.some(K=>typeof K=="object"&&(Array.isArray(K)?be(K,H):H(K)));function Be(_,H){if(_==null||!be(_,Ee=>{var ve;return Ee.r!==void 0||((ve=N(Ee))===null||ve===void 0?void 0:ve.makeInvertible)!=null}))return _;const K=new a.ReadCursor(_),ue=new a.WriteCursor;let le=!1;const Oe=[],Ge=[],Ke=(Ee,ve,me)=>{const Qe=Ee.getComponent();let Je=!1;if(Qe){Qe.d!=null&&ve.write("d",Qe.d),Qe.i!==void 0&&ve.write("i",Qe.i);const ke=Qe.p;if(ke!=null&&(Oe[ke]=Ee.clone(),h(me!==void 0,"Operation picks up at an invalid key"),Ge[ke]=me,ve.write("p",Qe.p)),Qe.r!==void 0&&me===void 0)throw Error("Invalid doc / op in makeInvertible: removed item missing from doc");const Ue=N(Qe);Ue&&(Ue.makeInvertible?le=!0:F(ve,Ue,A(Qe),!0))}let Le=0;for(const ke of Ee){ve.descend(ke);const Ue=typeof ke=="number"?ke-Le:ke,ft=M(me,Ue),ut=Ke(Ee,ve,ft);ft!==ut&&(Je||(Je=!0,me=y(me)),ut===void 0?(me=w(me,Ue),typeof ke=="number"&&Le++):me[Ue]=ut),ve.ascend()}return Qe&&(Qe.r!==void 0?(ve.write("r",(0,l.default)(me)),me=void 0):Qe.p!=null&&(me=void 0)),me};if(Ke(K,ue,H),ue.get(),le){let Ee=function(ve,me,Qe,Je,Le){const ke=me.getComponent();if(ke){ke.i!==void 0?(Je=ke.i,Le=!0):ke.d!=null&&(Je=Ge[ke.d],ve=Oe[ke.d],Le=!1,ke.d);let wt=N(ke);if(wt&&wt.makeInvertible){const Lt=A(ke);F(Qe,wt,wt.makeInvertible(Lt,Je),!0)}}let Ue=0,ft=0;const ut=(0,a.advancer)(ve,(wt,Lt)=>O(Lt)?Ue-wt-1:wt-Ue,(wt,Lt)=>{O(Lt)&&Ue++});for(const wt of me)if(typeof wt=="number"){const Lt=wt-ft,Ft=ut(Lt),$t=M(Je,Le?Lt:Lt+Ue);Qe.descend(wt),Ee(Ft,me,Qe,$t,Le),m(me.getComponent())&&ft++,Qe.ascend()}else{const Lt=M(Je,wt);Qe.descend(wt),Ee(ut(wt),me,Qe,Lt,Le),Qe.ascend()}ut.end()};var Xe=Ee;ue.reset(),Ee(K.clone(),K,ue,H,!1)}return ue.get()}function Me(_,H){return fe(Be(_,H))}const Ne=0,ie=1,lt=_=>{if(_==null)return null;const H=_.slice();for(let K=0;K<_.length;K++){const ue=H[K];Array.isArray(ue)&&(H[K]=lt(ue))}return H};function en(_,H,K){h(K==="left"||K==="right","Direction must be left or right");const ue=K==="left"?Ne:ie;if(f.quiet=!d,f.prefix=0,H==null)return{ok:!0,result:_};ae(_),ae(H);let le=null;const Oe=[],Ge=[],Ke=[],oe=[],Xe=[],Ee=[],ve=[],me=[],Qe=[],Je=[],Le=[],ke=[],Ue=[],ft=[],ut=[];let wt=0;const Lt=(0,a.readCursor)(_),Ft=(0,a.readCursor)(H),$t=(0,a.writeCursor)();if(function rt(Re,Ie=null,je){const ye=p(Ie);ye&&(ye.r!==void 0?je=Ie.clone():ye.p!=null&&(je=null,Ee[ye.p]=Re.clone()));const _e=Re.getComponent();let nt;_e&&(nt=_e.p)!=null&&(Xe[nt]=Ie?Ie.clone():null,Ke[nt]=Re.clone(),je&&(Je[nt]=!0,Qe[nt]=je),ye&&ye.p!=null&&(ft[nt]=ye.p));const it=(0,a.advancer)(Ie);for(const at of Re)rt(Re,it(at),je);it.end()}(Ft,Lt,null),function rt(Re,Ie,je,ye,_e){const nt=je.getComponent();let it,at=!1;nt&&((it=nt.d)!=null?(oe[it]=je.clone(),ye!=null&&(ut[ye]==null&&(ut[ye]=[]),ut[ye].push(it)),Re=Xe[it]||null,Ie=Ke[it]||null,Je[it]?(_e&&(Le[it]=!0),_e=Qe[it]||null):!_e||ue!==ie&&ft[it]!=null||le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)(_e.getPath()),op2:(0,i.moveOp)(Ie.getPath(),je.getPath())}),at=!0):nt.i!==void 0&&(Re=Ie=null,at=!0,_e&&le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)(_e.getPath()),op2:(0,i.insertOp)(je.getPath(),nt.i)})));const Ye=p(Re);Ye&&(Ye.r!==void 0?_e=Re.clone():Ye.p!=null&&(Ye.p,ye=Ye.p,_e=null));const Ht=N(nt);Ht&&_e&&le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.removeOp)(_e.getPath()),op2:(0,i.editOp)(je.getPath(),Ht,A(nt),!0)});let kt=0,on=0;const He=(0,a.advancer)(Ie,(Ce,ht)=>O(ht)?kt-Ce-1:Ce-kt,(Ce,ht)=>{O(ht)&&kt++}),et=(0,a.advancer)(Re);for(const Ce of je)if(typeof Ce=="number"){const ht=Ce-on,un=He(ht);on+=+rt(et(ht+kt),un,je,ye,_e)}else{const ht=He(Ce);rt(et(Ce),ht,je,ye,_e)}return He.end(),et.end(),at}(Lt,Ft,Ft.clone(),null,null),oe.map(rt=>rt&&rt.get()),le)return{ok:!1,conflict:le};Le.map(rt=>!!rt);const $n=[];let Tn=null;(function rt(Re,Ie,je,ye,_e){let nt=!1;const it=p(Ie);if(O(it)){const He=it.p;He!=null?(je=oe[He],ye=ke[He]=(0,a.writeCursor)(),nt=!0,_e=null):(je=null,_e=Ie.clone())}else m(p(je))&&(je=null);const at=Re.getComponent();if(at){const He=at.p;He!=null?(_e&&(me[He]=_e),$n[He]=_e||ue===ie&&nt?null:ye.getComponent(),Oe[He]=Re.clone(),je&&(ve[He]=je.clone())):at.r!==void 0&&(_e||ye.write("r",!0),(_e||nt)&&(Tn==null&&(Tn=new Set),Tn.add(at)))}let Ye=0,Ht=0;const kt=(0,a.advancer)(Ie,void 0,(He,et)=>{O(et)&&Ye++}),on=(0,a.advancer)(je,(He,et)=>m(et)?~(He-Ht):He-Ht,(He,et)=>{m(et)&&Ht++});if(Re)for(const He of Re)if(typeof He=="string"){const et=kt(He),Ce=on(He);ye.descend(He),rt(Re,et,Ce,ye,_e),ye.ascend()}else{const et=kt(He),Ce=He-Ye,ht=O(p(et))?null:on(Ce),un=Ce+Ht;h(un>=0),ye.descend(un),rt(Re,et,ht,ye,_e),ye.ascend()}kt.end(),on.end()})(Lt,Ft,Ft.clone(),$t,null),$t.reset();let si=[];if(function rt(Re,Ie,je,ye,_e,nt){h(Ie);const it=Ie.getComponent();let at=p(ye),Ye=!1;const Ht=(Ze,xt,tn)=>Ze?(0,i.moveOp)(Ze.getPath(),xt.getPath()):(0,i.insertOp)(xt.getPath(),tn.i);if(m(it)){const Ze=it.d;Ze!=null&&(Ge[Ze]=Ie.clone());const xt=Ze!=null?$n[Ze]:null;let tn=!1;if(it.i!==void 0||Ze!=null&&xt){let Tt;at&&(at.i!==void 0||(Tt=at.d)!=null&&!Je[Tt])&&(tn=Tt!=null?Ze!=null&&Ze===ft[Tt]:(0,s.default)(at.i,it.i),tn||Tt!=null&&ue!==ie&&ft[Tt]!=null||le==null&&(le={type:u.ConflictType.DROP_COLLISION,op1:Ht(Ze!=null?Oe[Ze]:null,Ie,it),op2:Ht(Tt!=null?Ke[Tt]:null,ye,at)})),tn||(nt?le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:Ht(Ze!=null?Oe[Ze]:null,Ie,it),op2:(0,i.removeOp)(nt.getPath())}):(Ze!=null?(si[wt]=Ze,_e.write("d",xt.p=wt++)):_e.write("i",(0,l.default)(it.i)),Ye=!0))}else if(Ze!=null&&!xt){const Tt=me[Ze];Tt&&(nt=Tt.clone())}Ze!=null?(Re=Oe[Ze],je=Ee[Ze],ye=ve[Ze]):it.i!==void 0&&(Re=je=null,tn||(ye=null))}else O(p(Re))&&(Re=je=ye=null);const kt=p(Re),on=p(je);if(O(on)){const Ze=on.p;on.r!==void 0&&(!kt||kt.r===void 0)||Je[Ze]?(ye=null,nt=je.clone()):Ze!=null&&(ye=oe[Ze],ue!==ie&&ft[Ze]!=null||((_e=Ue[Ze])||(_e=Ue[Ze]=(0,a.writeCursor)()),_e.reset(),nt=null))}else!m(it)&&m(at)&&(ye=null);at=ye!=null?ye.getComponent():null;const He=N(it);if(He){const Ze=A(it);if(nt)le==null&&(le={type:u.ConflictType.RM_UNEXPECTED_CONTENT,op1:(0,i.editOp)(Ie.getPath(),He,Ze,!0),op2:(0,i.removeOp)(nt.getPath())});else{const xt=N(at);let tn;if(xt){if(He!==xt)throw Error("Transforming incompatible types");const Tt=A(at);tn=He.transform(Ze,Tt,K)}else tn=(0,l.default)(Ze);F(_e,He,tn)}}let et=0,Ce=0,ht=0,un=0,Ur=0,li=0,ur=Re!=null&&Re.descendFirst(),es=ur;const ji=(0,a.advancer)(je,void 0,(Ze,xt)=>{O(xt)&&ht++});let Zr=ye!=null&&ye.descendFirst(),ts=Zr;for(const Ze of Ie)if(typeof Ze=="number"){let xt;const tn=m(Ie.getComponent()),Tt=Ze-Ce;{let cn;for(te();ur&&typeof(cn=Re.getKey())=="number";){cn+=et;const An=Re.getComponent(),Hn=O(An);if(cn>Tt||cn===Tt&&(!Hn||ue===Ne&&tn))break;if(Hn){et--;const At=An.p;ft.includes(At),An.d,p(Ue[An.d]),O(p(Ue[An.d])),(An.r===void 0||Tn&&Tn.has(An))&&(At==null||!$n[At]||ue!==ie&&ft.includes(At))||Ur--}ur=Re.nextSibling()}xt=ur&&cn===Tt?Re:null}const Er=Tt-et;let ao=ji(Er);const oa=Er-ht;let Ds=null;{let cn,An;for(te();Zr&&typeof(cn=ye.getKey())=="number";){An=cn-un;const Hn=ye.getComponent(),At=m(Hn);if(An>oa)break;if(An===oa){if(!At){Ds=ye;break}{if(ue===Ne&&tn){Ds=ye;break}const Vi=ao&&O(ao.getComponent());if(ue===Ne&&Vi)break}}if(At){const Vi=Hn.d;ft[Vi],Hn.i===void 0&&(Je[Vi]||ft[Vi]!=null&&ue!==ie)?(Je[Vi]||ft[Vi]!=null&&ue===Ne)&&(un++,li--):un++}Zr=ye.nextSibling()}}const gc=oa+un+Ur+li;h(gc>=0,"trying to descend to a negative index"),_e.descend(gc),tn&&(xt=ao=Ds=null,Ce++),rt(xt,Ie,ao,Ds,_e,nt)&&li++,_e.ascend()}else{let xt;for(;ur&&(xt=Re.getKey(),typeof xt!="string"||!(xt>Ze||xt===Ze));)ur=Re.nextSibling();const tn=ur&&xt===Ze?Re:null,Tt=ji(Ze);let Er;for(;Zr&&(Er=ye.getKey(),typeof Er!="string"||!(Er>Ze||Er===Ze));)Zr=ye.nextSibling();const ao=Zr&&Er===Ze?ye:null;_e.descend(Ze),rt(tn,Ie,Tt,ao,_e,nt),_e.ascend()}return ji.end(),es&&Re.ascend(),ts&&ye.ascend(),Ye}(Lt,Lt.clone(),Ft,Ft.clone(),$t,null),le)return{ok:!1,conflict:le};$t.reset();const Cr=(rt,Re,Ie)=>rt.traverse(Re,(je,ye)=>{je.d!=null&&Ie(je.d,rt,ye)});(Je.length||ke.length)&&(Cr(Ft,$t,(rt,Re,Ie)=>{Je[rt]&&!Le[rt]&&Ie.write("r",!0),ke[rt]&&Ie.mergeTree(ke[rt].get())}),$t.reset());const ar=[],Gn=[];if((Ue.length||Je.length)&&!le){const rt=(0,a.readCursor)(lt($t.get()));if(Cr(rt,null,(Re,Ie)=>{ar[Re]=Ie.clone()}),Ue.forEach(Re=>{Re&&Cr((0,a.readCursor)(Re.get()),null,(Ie,je)=>{ar[Ie]=je.clone()})}),function Re(Ie,je,ye,_e,nt,it){f.prefix++;const at=p(je);if(at&&O(at))if(at.p!=null){const et=at.p;ar[et].getPath(),ye=ar[et],_e=Gn[et]=(0,a.writeCursor)()}else at.r!==void 0&&(ye=null);else m(p(ye))&&(ye=null);const Ye=Ie.getComponent();if(Ye){let et;if((et=Ye.d)!=null){const Ce=Ue[et];Ce&&(Ce.get(),_e.mergeTree(Ce.get()),ye=(0,a.readCursor)(Ce.get()))}}let Ht=0,kt=0;const on=(0,a.advancer)(je,void 0,(et,Ce)=>{O(Ce)&&Ht--}),He=(0,a.advancer)(ye,(et,Ce)=>m(Ce)?-(et-kt)-1:et-kt,(et,Ce)=>{m(Ce)&&kt++});for(const et of Ie)if(typeof et=="number"){const Ce=on(et),ht=et+Ht,un=He(ht),Ur=ht+kt;_e.descend(Ur),Re(Ie,Ce,un,_e),_e.ascend()}else _e.descend(et),Re(Ie,on(et),He(et),_e),_e.ascend();on.end(),He.end()}(Ft,rt,rt.clone(),$t),$t.reset(),le)return{ok:!1,conflict:le};if($t.get(),Gn.length){const Re=Gn.map(je=>je?je.get():null),Ie=(0,a.readCursor)(lt($t.get()));if(Cr(Ie,$t,(je,ye,_e)=>{const nt=Re[je];nt&&(_e.mergeTree(nt),Re[je]=null)}),Re.find(je=>je)){const je=(0,a.writeCursor)(),ye=(0,a.writeCursor)();let _e=0,nt=0;Re.forEach(it=>{it!=null&&Cr((0,a.readCursor)(it),null,at=>{const Ye=si[at];je.writeMove(Oe[Ye].getPath(),Ge[Ye].getPath(),_e++);const Ht=ut[Ye];Ht&&Ht.forEach(kt=>{Je[kt]||ue!==ie&&ft[kt]!=null||ye.writeMove(Ke[kt].getPath(),oe[kt].getPath(),nt++)})})}),le={type:u.ConflictType.BLACKHOLE,op1:je.get(),op2:ye.get()}}}}return le?{ok:!1,conflict:le}:{ok:!0,result:$t.get()}}const Wr=_=>{const H=new Error("Transform detected write conflict");throw H.conflict=_,H.type=H.name="writeConflict",H};function xr(_,H,K){const ue=en(_,H,K);if(ue.ok)return ue.result;Wr(ue.conflict)}const yn=_=>{const H=(0,a.writeCursor)();return(0,a.readCursor)(_).traverse(H,(K,ue)=>{(m(K)||N(K))&&ue.write("r",!0)}),H.get()},Jo=(_,H)=>{const{type:K,op1:ue,op2:le}=_;switch(K){case u.ConflictType.DROP_COLLISION:return H==="left"?[null,yn(le)]:[yn(ue),null];case u.ConflictType.RM_UNEXPECTED_CONTENT:let Oe=!1;return(0,a.readCursor)(ue).traverse(null,Ge=>{Ge.r!==void 0&&(Oe=!0)}),Oe?[null,yn(le)]:[yn(ue),null];case u.ConflictType.BLACKHOLE:return[yn(ue),yn(le)];default:throw Error("Unrecognised conflict: "+K)}};function Li(_,H,K,ue){let le=null;for(;;){const Oe=en(H,K,ue);if(Oe.ok)return z(le,Oe.result);{const{conflict:Ge}=Oe;_(Ge)||Wr(Ge);const[Ke,oe]=Jo(Ge,ue);H=z(B(H),Ke),K=z(B(K),oe),le=z(le,oe)}}}},{"./cursor.js":23,"./deepClone.js":24,"./deepEqual.js":25,"./log":28,"./types.js":29,assert:1,"ot-text-unicode":31}],28:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});function o(...s){if(o.quiet)return;const{inspect:l}=n("util"),a=c=>typeof c=="string"?c:l(c,{depth:10,colors:!0}),u=Array(o.prefix).fill(" ").join("");console.log(u+s.map(a).join(" "))}i.default=o,o.quiet=!0,o.prefix=0},{util:37}],29:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.ConflictType=void 0;var o;(function(s){s[s.RM_UNEXPECTED_CONTENT=1]="RM_UNEXPECTED_CONTENT",s[s.DROP_COLLISION=2]="DROP_COLLISION",s[s.BLACKHOLE=3]="BLACKHOLE"})(o||(i.ConflictType=o={}))},{}],30:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0});const o=n("./type"),s=n("unicount");function l(a,u){return{get:a,getLength(){return a().length},insert(c,f,h){const d=s.strPosToUni(a(),c);return u([d,f],h)},remove(c,f,h){const d=s.strPosToUni(a(),c);return u([d,{d:f}],h)},_onOp(c){o.eachOp(c,(f,h,d)=>{switch(typeof f){case"string":this.onInsert&&this.onInsert(d,f);break;case"object":const p=o.dlen(f.d);this.onRemove&&this.onRemove(d,p)}})},onInsert:null,onRemove:null}}i.default=l,l.provides={text:!0}},{"./type":32,unicount:34}],31:[function(n,r,i){var o=this&&this.__createBinding||(Object.create?function(y,O,m,v){v===void 0&&(v=m),Object.defineProperty(y,v,{enumerable:!0,get:function(){return O[m]}})}:function(y,O,m,v){v===void 0&&(v=m),y[v]=O[m]}),s=this&&this.__setModuleDefault||(Object.create?function(y,O){Object.defineProperty(y,"default",{enumerable:!0,value:O})}:function(y,O){y.default=O}),l=this&&this.__importStar||function(y){if(y&&y.__esModule)return y;var O={};if(y!=null)for(var m in y)Object.hasOwnProperty.call(y,m)&&o(O,y,m);return s(O,y),O},a=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(i,"__esModule",{value:!0}),i.type=i.remove=i.insert=void 0;const u=n("unicount"),c=l(n("./type")),f=a(n("./api")),h={create(y){return y},toString(y){return y},builder(y){if(typeof y!="string")throw Error("Invalid document snapshot: "+y);const O=[];return{skip(m){let v=u.uniToStrPos(y,m);if(v>y.length)throw Error("The op is too long for this document");O.push(y.slice(0,v)),y=y.slice(v)},append(m){O.push(m)},del(m){y=y.slice(u.uniToStrPos(y,m))},build(){return O.join("")+y}}},slice:c.uniSlice},d=c.default(h),p=Object.assign(Object.assign({},d),{api:f.default});i.type=p,i.insert=(y,O)=>O.length===0?[]:y===0?[O]:[y,O],i.remove=(y,O)=>c.dlen(O)===0?[]:y===0?[{d:O}]:[y,{d:O}];var g=n("./type");Object.defineProperty(i,"makeType",{enumerable:!0,get:function(){return g.default}})},{"./api":30,"./type":32,unicount:34}],32:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniSlice=i.dlen=i.eachOp=void 0;const o=n("unicount"),s=k=>{if(!Array.isArray(k))throw Error("Op must be an array of components");let C=null;for(let Q=0;Q<k.length;Q++){const M=k[Q];switch(typeof M){case"object":if(typeof M.d!="number"&&typeof M.d!="string")throw Error("Delete must be number or string");if(i.dlen(M.d)<=0)throw Error("Deletes must not be empty");break;case"string":if(!(M.length>0))throw Error("Inserts cannot be empty");break;case"number":if(!(M>0))throw Error("Skip components must be >0");if(typeof C=="number")throw Error("Adjacent skip components should be combined");break}C=M}if(typeof C=="number")throw Error("Op has a trailing skip")};function l(k,C){let Q=0,M=0;for(let L=0;L<k.length;L++){const V=k[L];switch(C(V,Q,M),typeof V){case"object":Q+=i.dlen(V.d);break;case"string":M+=o.strPosToUni(V);break;case"number":Q+=V,M+=V;break}}}i.eachOp=l;function a(k,C){const Q=[],M=f(Q);return l(k,(L,V,G)=>{M(C(L,V,G))}),g(Q)}const u=k=>k,c=k=>a(k,u);i.dlen=k=>typeof k=="number"?k:o.strPosToUni(k);const f=k=>C=>{if(!(!C||C.d===0||C.d===""))if(k.length===0)k.push(C);else if(typeof C==typeof k[k.length-1])if(typeof C=="object"){const Q=k[k.length-1];Q.d=typeof Q.d=="string"&&typeof C.d=="string"?Q.d+C.d:i.dlen(Q.d)+i.dlen(C.d)}else k[k.length-1]+=C;else k.push(C)},h=k=>typeof k=="number"?k:typeof k=="string"?o.strPosToUni(k):typeof k.d=="number"?k.d:o.strPosToUni(k.d);i.uniSlice=(k,C,Q)=>{const M=o.uniToStrPos(k,C),L=Q==null?1/0:o.uniToStrPos(k,Q);return k.slice(M,L)};const d=(k,C,Q)=>typeof k=="number"?Q==null?k-C:Math.min(k,Q)-C:i.uniSlice(k,C,Q),p=k=>{let C=0,Q=0;return{take:(V,G)=>{if(C===k.length)return V===-1?null:V;const D=k[C];let N;if(typeof D=="number")return V===-1||D-Q<=V?(N=D-Q,++C,Q=0,N):(Q+=V,V);if(typeof D=="string"){if(V===-1||G==="i"||o.strPosToUni(D.slice(Q))<=V)return N=D.slice(Q),++C,Q=0,N;{const A=Q+o.uniToStrPos(D.slice(Q),V);return N=D.slice(Q,A),Q=A,N}}else{if(V===-1||G==="d"||i.dlen(D.d)-Q<=V)return N={d:d(D.d,Q)},++C,Q=0,N;{let A=d(D.d,Q,Q+V);return Q+=V,{d:A}}}},peek:()=>k[C]}},g=k=>(k.length>0&&typeof k[k.length-1]=="number"&&k.pop(),k);function y(k,C,Q){if(Q!=="left"&&Q!=="right")throw Error("side ("+Q+") must be 'left' or 'right'");s(k),s(C);const M=[],L=f(M),{take:V,peek:G}=p(k);for(let N=0;N<C.length;N++){const A=C[N];let F,Y;switch(typeof A){case"number":for(F=A;F>0;)Y=V(F,"i"),L(Y),typeof Y!="string"&&(F-=h(Y));break;case"string":Q==="left"&&typeof G()=="string"&&L(V(-1)),L(o.strPosToUni(A));break;case"object":for(F=i.dlen(A.d);F>0;)switch(Y=V(F,"i"),typeof Y){case"number":F-=Y;break;case"string":L(Y);break;case"object":F-=i.dlen(Y.d)}break}}let D;for(;D=V(-1);)L(D);return g(M)}function O(k,C){s(k),s(C);const Q=[],M=f(Q),{take:L}=p(k);for(let G=0;G<C.length;G++){const D=C[G];let N,A;switch(typeof D){case"number":for(N=D;N>0;)A=L(N,"d"),M(A),typeof A!="object"&&(N-=h(A));break;case"string":M(D);break;case"object":N=i.dlen(D.d);let F=0;for(;F<N;)switch(A=L(N-F,"d"),typeof A){case"number":M({d:d(D.d,F,F+A)}),F+=A;break;case"string":F+=o.strPosToUni(A);break;case"object":M(A)}break}}let V;for(;V=L(-1);)M(V);return g(Q)}const m=(k,C)=>{let Q=0;for(let M=0;M<C.length&&k>Q;M++){const L=C[M];switch(typeof L){case"number":{Q+=L;break}case"string":const V=o.strPosToUni(L);Q+=V,k+=V;break;case"object":k-=Math.min(i.dlen(L.d),k-Q);break}}return k},v=(k,C)=>typeof k=="number"?m(k,C):k.map(Q=>m(Q,C));function b(k,C,Q){return a(k,(M,L)=>typeof M=="object"&&typeof M.d=="number"?{d:Q.slice(C,L,L+M.d)}:M)}function P(k){return a(k,C=>{switch(typeof C){case"object":if(typeof C.d=="number")throw Error("Cannot invert text op: Deleted characters missing from operation. makeInvertible must be called first.");return C.d;case"string":return{d:C};case"number":return C}})}function E(k){return a(k,C=>typeof C=="object"&&typeof C.d=="string"?{d:o.strPosToUni(C.d)}:C)}function T(k){let C=!0;return l(k,Q=>{typeof Q=="object"&&typeof Q.d=="number"&&(C=!1)}),C}function w(k){return{name:"text-unicode",uri:"http://sharejs.org/types/text-unicode",trim:g,normalize:c,checkOp:s,create(C=""){if(typeof C!="string")throw Error("Initial data must be a string");return k.create(C)},apply(C,Q){s(Q);const M=k.builder(C);for(let L=0;L<Q.length;L++){const V=Q[L];switch(typeof V){case"number":M.skip(V);break;case"string":M.append(V);break;case"object":M.del(i.dlen(V.d));break}}return M.build()},transform:y,compose:O,transformPosition:m,transformSelection:v,isInvertible:T,makeInvertible(C,Q){return b(C,Q,k)},stripInvertible:E,invert:P,invertWithDoc(C,Q){return P(b(C,Q,k))},isNoop:C=>C.length===0}}i.default=w},{unicount:34}],33:[function(n,r,i){var o=r.exports={},s,l;function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=a}catch{s=a}try{typeof clearTimeout=="function"?l=clearTimeout:l=u}catch{l=u}})();function c(b){if(s===setTimeout)return setTimeout(b,0);if((s===a||!s)&&setTimeout)return s=setTimeout,setTimeout(b,0);try{return s(b,0)}catch{try{return s.call(null,b,0)}catch{return s.call(this,b,0)}}}function f(b){if(l===clearTimeout)return clearTimeout(b);if((l===u||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(b);try{return l(b)}catch{try{return l.call(null,b)}catch{return l.call(this,b)}}}var h=[],d=!1,p,g=-1;function y(){!d||!p||(d=!1,p.length?h=p.concat(h):g=-1,h.length&&O())}function O(){if(!d){var b=c(y);d=!0;for(var P=h.length;P;){for(p=h,h=[];++g<P;)p&&p[g].run();g=-1,P=h.length}p=null,d=!1,f(b)}}o.nextTick=function(b){var P=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)P[E-1]=arguments[E];h.push(new m(b,P)),h.length===1&&!d&&c(O)};function m(b,P){this.fun=b,this.array=P}m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function v(){}o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(b){return[]},o.binding=function(b){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(b){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],34:[function(n,r,i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniToStrPos=i.strPosToUni=void 0,i.strPosToUni=(o,s=o.length)=>{let l=0,a=0;for(;a<s;a++){const u=o.charCodeAt(a);u>=55296&&u<=57343&&(l++,a++)}if(a!==s)throw Error("Invalid offset - splits unicode bytes");return a-l},i.uniToStrPos=(o,s)=>{let l=0;for(;s>0;s--){const a=o.charCodeAt(l);l+=a>=55296&&a<=57343?2:1}return l}},{}],35:[function(n,r,i){arguments[4][3][0].apply(i,arguments)},{dup:3}],36:[function(n,r,i){var o=n("is-arguments"),s=n("is-generator-function"),l=n("which-typed-array"),a=n("is-typed-array");function u(_){return _.call.bind(_)}var c=typeof BigInt<"u",f=typeof Symbol<"u",h=u(Object.prototype.toString),d=u(Number.prototype.valueOf),p=u(String.prototype.valueOf),g=u(Boolean.prototype.valueOf);if(c)var y=u(BigInt.prototype.valueOf);if(f)var O=u(Symbol.prototype.valueOf);function m(_,H){if(typeof _!="object")return!1;try{return H(_),!0}catch{return!1}}i.isArgumentsObject=o,i.isGeneratorFunction=s,i.isTypedArray=a;function v(_){return typeof Promise<"u"&&_ instanceof Promise||_!==null&&typeof _=="object"&&typeof _.then=="function"&&typeof _.catch=="function"}i.isPromise=v;function b(_){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(_):a(_)||X(_)}i.isArrayBufferView=b;function P(_){return l(_)==="Uint8Array"}i.isUint8Array=P;function E(_){return l(_)==="Uint8ClampedArray"}i.isUint8ClampedArray=E;function T(_){return l(_)==="Uint16Array"}i.isUint16Array=T;function w(_){return l(_)==="Uint32Array"}i.isUint32Array=w;function k(_){return l(_)==="Int8Array"}i.isInt8Array=k;function C(_){return l(_)==="Int16Array"}i.isInt16Array=C;function Q(_){return l(_)==="Int32Array"}i.isInt32Array=Q;function M(_){return l(_)==="Float32Array"}i.isFloat32Array=M;function L(_){return l(_)==="Float64Array"}i.isFloat64Array=L;function V(_){return l(_)==="BigInt64Array"}i.isBigInt64Array=V;function G(_){return l(_)==="BigUint64Array"}i.isBigUint64Array=G;function D(_){return h(_)==="[object Map]"}D.working=typeof Map<"u"&&D(new Map);function N(_){return typeof Map>"u"?!1:D.working?D(_):_ instanceof Map}i.isMap=N;function A(_){return h(_)==="[object Set]"}A.working=typeof Set<"u"&&A(new Set);function F(_){return typeof Set>"u"?!1:A.working?A(_):_ instanceof Set}i.isSet=F;function Y(_){return h(_)==="[object WeakMap]"}Y.working=typeof WeakMap<"u"&&Y(new WeakMap);function pe(_){return typeof WeakMap>"u"?!1:Y.working?Y(_):_ instanceof WeakMap}i.isWeakMap=pe;function ae(_){return h(_)==="[object WeakSet]"}ae.working=typeof WeakSet<"u"&&ae(new WeakSet);function B(_){return ae(_)}i.isWeakSet=B;function q(_){return h(_)==="[object ArrayBuffer]"}q.working=typeof ArrayBuffer<"u"&&q(new ArrayBuffer);function te(_){return typeof ArrayBuffer>"u"?!1:q.working?q(_):_ instanceof ArrayBuffer}i.isArrayBuffer=te;function we(_){return h(_)==="[object DataView]"}we.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&we(new DataView(new ArrayBuffer(1),0,1));function X(_){return typeof DataView>"u"?!1:we.working?we(_):_ instanceof DataView}i.isDataView=X;var W=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function z(_){return h(_)==="[object SharedArrayBuffer]"}function fe(_){return typeof W>"u"?!1:(typeof z.working>"u"&&(z.working=z(new W)),z.working?z(_):_ instanceof W)}i.isSharedArrayBuffer=fe;function be(_){return h(_)==="[object AsyncFunction]"}i.isAsyncFunction=be;function Be(_){return h(_)==="[object Map Iterator]"}i.isMapIterator=Be;function Me(_){return h(_)==="[object Set Iterator]"}i.isSetIterator=Me;function Ne(_){return h(_)==="[object Generator]"}i.isGeneratorObject=Ne;function ie(_){return h(_)==="[object WebAssembly.Module]"}i.isWebAssemblyCompiledModule=ie;function lt(_){return m(_,d)}i.isNumberObject=lt;function en(_){return m(_,p)}i.isStringObject=en;function Wr(_){return m(_,g)}i.isBooleanObject=Wr;function xr(_){return c&&m(_,y)}i.isBigIntObject=xr;function yn(_){return f&&m(_,O)}i.isSymbolObject=yn;function Jo(_){return lt(_)||en(_)||Wr(_)||xr(_)||yn(_)}i.isBoxedPrimitive=Jo;function Li(_){return typeof Uint8Array<"u"&&(te(_)||fe(_))}i.isAnyArrayBuffer=Li,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(_){Object.defineProperty(i,_,{enumerable:!1,value:function(){throw new Error(_+" is not supported in userland")}})})},{"is-arguments":18,"is-generator-function":20,"is-typed-array":21,"which-typed-array":38}],37:[function(n,r,i){(function(o){(function(){var s=Object.getOwnPropertyDescriptors||function(W){for(var z=Object.keys(W),fe={},be=0;be<z.length;be++)fe[z[be]]=Object.getOwnPropertyDescriptor(W,z[be]);return fe},l=/%[sdj%]/g;i.format=function(X){if(!C(X)){for(var W=[],z=0;z<arguments.length;z++)W.push(f(arguments[z]));return W.join(" ")}for(var z=1,fe=arguments,be=fe.length,Be=String(X).replace(l,function(Ne){if(Ne==="%%")return"%";if(z>=be)return Ne;switch(Ne){case"%s":return String(fe[z++]);case"%d":return Number(fe[z++]);case"%j":try{return JSON.stringify(fe[z++])}catch{return"[Circular]"}default:return Ne}}),Me=fe[z];z<be;Me=fe[++z])T(Me)||!V(Me)?Be+=" "+Me:Be+=" "+f(Me);return Be},i.deprecate=function(X,W){if(typeof o<"u"&&o.noDeprecation===!0)return X;if(typeof o>"u")return function(){return i.deprecate(X,W).apply(this,arguments)};var z=!1;function fe(){if(!z){if(o.throwDeprecation)throw new Error(W);o.traceDeprecation?console.trace(W):console.error(W),z=!0}return X.apply(this,arguments)}return fe};var a={},u=/^$/;if({}.NODE_DEBUG){var c={}.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+c+"$","i")}i.debuglog=function(X){if(X=X.toUpperCase(),!a[X])if(u.test(X)){var W=o.pid;a[X]=function(){var z=i.format.apply(i,arguments);console.error("%s %d: %s",X,W,z)}}else a[X]=function(){};return a[X]};function f(X,W){var z={seen:[],stylize:d};return arguments.length>=3&&(z.depth=arguments[2]),arguments.length>=4&&(z.colors=arguments[3]),E(W)?z.showHidden=W:W&&i._extend(z,W),M(z.showHidden)&&(z.showHidden=!1),M(z.depth)&&(z.depth=2),M(z.colors)&&(z.colors=!1),M(z.customInspect)&&(z.customInspect=!0),z.colors&&(z.stylize=h),g(z,X,z.depth)}i.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(X,W){var z=f.styles[W];return z?"\x1B["+f.colors[z][0]+"m"+X+"\x1B["+f.colors[z][1]+"m":X}function d(X,W){return X}function p(X){var W={};return X.forEach(function(z,fe){W[z]=!0}),W}function g(X,W,z){if(X.customInspect&&W&&N(W.inspect)&&W.inspect!==i.inspect&&!(W.constructor&&W.constructor.prototype===W)){var fe=W.inspect(z,X);return C(fe)||(fe=g(X,fe,z)),fe}var be=y(X,W);if(be)return be;var Be=Object.keys(W),Me=p(Be);if(X.showHidden&&(Be=Object.getOwnPropertyNames(W)),D(W)&&(Be.indexOf("message")>=0||Be.indexOf("description")>=0))return O(W);if(Be.length===0){if(N(W)){var Ne=W.name?": "+W.name:"";return X.stylize("[Function"+Ne+"]","special")}if(L(W))return X.stylize(RegExp.prototype.toString.call(W),"regexp");if(G(W))return X.stylize(Date.prototype.toString.call(W),"date");if(D(W))return O(W)}var ie="",lt=!1,en=["{","}"];if(P(W)&&(lt=!0,en=["[","]"]),N(W)){var Wr=W.name?": "+W.name:"";ie=" [Function"+Wr+"]"}if(L(W)&&(ie=" "+RegExp.prototype.toString.call(W)),G(W)&&(ie=" "+Date.prototype.toUTCString.call(W)),D(W)&&(ie=" "+O(W)),Be.length===0&&(!lt||W.length==0))return en[0]+ie+en[1];if(z<0)return L(W)?X.stylize(RegExp.prototype.toString.call(W),"regexp"):X.stylize("[Object]","special");X.seen.push(W);var xr;return lt?xr=m(X,W,z,Me,Be):xr=Be.map(function(yn){return v(X,W,z,Me,yn,lt)}),X.seen.pop(),b(xr,ie,en)}function y(X,W){if(M(W))return X.stylize("undefined","undefined");if(C(W)){var z="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return X.stylize(z,"string")}if(k(W))return X.stylize(""+W,"number");if(E(W))return X.stylize(""+W,"boolean");if(T(W))return X.stylize("null","null")}function O(X){return"["+Error.prototype.toString.call(X)+"]"}function m(X,W,z,fe,be){for(var Be=[],Me=0,Ne=W.length;Me<Ne;++Me)B(W,String(Me))?Be.push(v(X,W,z,fe,String(Me),!0)):Be.push("");return be.forEach(function(ie){ie.match(/^\d+$/)||Be.push(v(X,W,z,fe,ie,!0))}),Be}function v(X,W,z,fe,be,Be){var Me,Ne,ie;if(ie=Object.getOwnPropertyDescriptor(W,be)||{value:W[be]},ie.get?ie.set?Ne=X.stylize("[Getter/Setter]","special"):Ne=X.stylize("[Getter]","special"):ie.set&&(Ne=X.stylize("[Setter]","special")),B(fe,be)||(Me="["+be+"]"),Ne||(X.seen.indexOf(ie.value)<0?(T(z)?Ne=g(X,ie.value,null):Ne=g(X,ie.value,z-1),Ne.indexOf(`
|
|
57
|
+
`)>-1&&(Be?Ne=Ne.split(`
|
|
58
|
+
`).map(function(lt){return" "+lt}).join(`
|
|
59
|
+
`).slice(2):Ne=`
|
|
60
|
+
`+Ne.split(`
|
|
61
|
+
`).map(function(lt){return" "+lt}).join(`
|
|
62
|
+
`))):Ne=X.stylize("[Circular]","special")),M(Me)){if(Be&&be.match(/^\d+$/))return Ne;Me=JSON.stringify(""+be),Me.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Me=Me.slice(1,-1),Me=X.stylize(Me,"name")):(Me=Me.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Me=X.stylize(Me,"string"))}return Me+": "+Ne}function b(X,W,z){var fe=X.reduce(function(be,Be){return Be.indexOf(`
|
|
63
|
+
`)>=0,be+Be.replace(/\u001b\[\d\d?m/g,"").length+1},0);return fe>60?z[0]+(W===""?"":W+`
|
|
64
|
+
`)+" "+X.join(`,
|
|
65
|
+
`)+" "+z[1]:z[0]+W+" "+X.join(", ")+" "+z[1]}i.types=n("./support/types");function P(X){return Array.isArray(X)}i.isArray=P;function E(X){return typeof X=="boolean"}i.isBoolean=E;function T(X){return X===null}i.isNull=T;function w(X){return X==null}i.isNullOrUndefined=w;function k(X){return typeof X=="number"}i.isNumber=k;function C(X){return typeof X=="string"}i.isString=C;function Q(X){return typeof X=="symbol"}i.isSymbol=Q;function M(X){return X===void 0}i.isUndefined=M;function L(X){return V(X)&&F(X)==="[object RegExp]"}i.isRegExp=L,i.types.isRegExp=L;function V(X){return typeof X=="object"&&X!==null}i.isObject=V;function G(X){return V(X)&&F(X)==="[object Date]"}i.isDate=G,i.types.isDate=G;function D(X){return V(X)&&(F(X)==="[object Error]"||X instanceof Error)}i.isError=D,i.types.isNativeError=D;function N(X){return typeof X=="function"}i.isFunction=N;function A(X){return X===null||typeof X=="boolean"||typeof X=="number"||typeof X=="string"||typeof X=="symbol"||typeof X>"u"}i.isPrimitive=A,i.isBuffer=n("./support/isBuffer");function F(X){return Object.prototype.toString.call(X)}function Y(X){return X<10?"0"+X.toString(10):X.toString(10)}var pe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ae(){var X=new Date,W=[Y(X.getHours()),Y(X.getMinutes()),Y(X.getSeconds())].join(":");return[X.getDate(),pe[X.getMonth()],W].join(" ")}i.log=function(){console.log("%s - %s",ae(),i.format.apply(i,arguments))},i.inherits=n("inherits"),i._extend=function(X,W){if(!W||!V(W))return X;for(var z=Object.keys(W),fe=z.length;fe--;)X[z[fe]]=W[z[fe]];return X};function B(X,W){return Object.prototype.hasOwnProperty.call(X,W)}var q=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;i.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(q&&W[q]){var z=W[q];if(typeof z!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(z,q,{value:z,enumerable:!1,writable:!1,configurable:!0}),z}function z(){for(var fe,be,Be=new Promise(function(ie,lt){fe=ie,be=lt}),Me=[],Ne=0;Ne<arguments.length;Ne++)Me.push(arguments[Ne]);Me.push(function(ie,lt){ie?be(ie):fe(lt)});try{W.apply(this,Me)}catch(ie){be(ie)}return Be}return Object.setPrototypeOf(z,Object.getPrototypeOf(W)),q&&Object.defineProperty(z,q,{value:z,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(z,s(W))},i.promisify.custom=q;function te(X,W){if(!X){var z=new Error("Promise was rejected with a falsy value");z.reason=X,X=z}return W(X)}function we(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var z=[],fe=0;fe<arguments.length;fe++)z.push(arguments[fe]);var be=z.pop();if(typeof be!="function")throw new TypeError("The last argument must be of type Function");var Be=this,Me=function(){return be.apply(Be,arguments)};X.apply(this,z).then(function(Ne){o.nextTick(Me.bind(null,null,Ne))},function(Ne){o.nextTick(te.bind(null,Ne,Me))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(X)),Object.defineProperties(W,s(X)),W}i.callbackify=we}).call(this)}).call(this,n("_process"))},{"./support/isBuffer":35,"./support/types":36,_process:33,inherits:17}],38:[function(n,r,i){(function(o){(function(){var s=n("for-each"),l=n("available-typed-arrays"),a=n("call-bind/callBound"),u=n("gopd"),c=a("Object.prototype.toString"),f=n("has-tostringtag/shams")(),h=typeof globalThis>"u"?o:globalThis,d=l(),p=a("String.prototype.slice"),g={},y=Object.getPrototypeOf;f&&u&&y&&s(d,function(v){if(typeof h[v]=="function"){var b=new h[v];if(Symbol.toStringTag in b){var P=y(b),E=u(P,Symbol.toStringTag);if(!E){var T=y(P);E=u(T,Symbol.toStringTag)}g[v]=E.get}}});var O=function(b){var P=!1;return s(g,function(E,T){if(!P)try{var w=E.call(b);w===T&&(P=w)}catch{}}),P},m=n("is-typed-array");r.exports=function(b){return m(b)?!f||!(Symbol.toStringTag in b)?p(c(b),8,-1):O(b):!1}}).call(this)}).call(this,typeof _r<"u"?_r:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":5,"call-bind/callBound":6,"for-each":8,gopd:12,"has-tostringtag/shams":15,"is-typed-array":21}],39:[function(n,r,i){const o=n("ot-json1-presence"),s=n("ot-text-unicode");r.exports={json1Presence:o,textUnicode:s}},{"ot-json1-presence":26,"ot-text-unicode":31}]},{},[39])(39)})})(LC);var _M=LC.exports;const $M=Yo(_M),{json1Presence:hv,textUnicode:jC}=$M,IS=()=>Math.floor(Math.random()*1e10)+"";class pt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),bi.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let r=[];return this.decompose(e,n,r,0),bi.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new nu(this),o=new nu(e);for(let s=n,l=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new nu(this,e)}iterRange(e,n=this.length){return new VC(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new BC(r)}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]?pt.empty:e.length<=32?new nn(e):bi.from(nn.split(e,[]))}}class nn extends pt{constructor(e,n=TM(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],l=i+s.length;if((n?r:l)>=e)return new AM(i,l,r,s);i=l+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new nn(NS(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),l=Xf(o.text,s.text.slice(),0,o.length);if(l.length<=32)r.push(new nn(l,s.length+o.length));else{let a=l.length>>1;r.push(new nn(l.slice(0,a)),new nn(l.slice(a)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof nn))return super.replace(e,n,r);let i=Xf(this.text,Xf(r.text,NS(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new nn(i,o):bi.from(nn.split(i,[]),o)}sliceString(e,n=this.length,r=`
|
|
66
|
+
`){let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let l=this.text[s],a=o+l.length;o>e&&s&&(i+=r),e<a&&n>o&&(i+=l.slice(Math.max(0,e-o),n-o)),o=a+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new nn(r,i)),r=[],i=-1);return i>-1&&n.push(new nn(r,i)),n}}class bi extends pt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],l=i+s.length,a=r+s.lines-1;if((n?a:l)>=e)return s.lineInner(e,n,r,i);i=l+1,r=a+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let l=this.children[o],a=s+l.length;if(e<=a&&n>=s){let u=i&((s<=e?1:0)|(a>=n?2:0));s>=e&&a<=n&&!u?r.push(l):l.decompose(e-s,n-s,r,u)}s=a+1}}replace(e,n,r){if(r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],l=o+s.length;if(e>=o&&n<=l){let a=s.replace(e-o,n-o,r),u=this.lines-s.lines+a.lines;if(a.lines<u>>5-1&&a.lines>u>>5+1){let c=this.children.slice();return c[i]=a,new bi(c,this.length-(n-e)+r.length)}return super.replace(o,l,a)}o=l+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
|
|
67
|
+
`){let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let l=this.children[o],a=s+l.length;s>e&&o&&(i+=r),e<a&&n>s&&(i+=l.sliceString(e-s,n-s,r)),s=a+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof bi))return 0;let r=0,[i,o,s,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==l)return r;let a=this.children[i],u=e.children[o];if(a!=u)return r+a.scanIdentical(u,n);r+=a.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new nn(d,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,l=[],a=0,u=-1,c=[];function f(d){let p;if(d.lines>o&&d instanceof bi)for(let g of d.children)f(g);else d.lines>s&&(a>s||!a)?(h(),l.push(d)):d instanceof nn&&a&&(p=c[c.length-1])instanceof nn&&d.lines+p.lines<=32?(a+=d.lines,u+=d.length+1,c[c.length-1]=new nn(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>i&&h(),a+=d.lines,u+=d.length+1,c.push(d))}function h(){a!=0&&(l.push(c.length==1?c[0]:bi.from(c,u)),u=-1,a=c.length=0)}for(let d of e)f(d);return h(),l.length==1?l[0]:new bi(l,n)}}pt.empty=new nn([""],0);function TM(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Xf(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let l=t[o],a=i+l.length;a>=n&&(a>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),s?(e[e.length-1]+=l,s=!1):e.push(l)),i=a+1}return e}function NS(t,e,n){return Xf(t,[""],e,n)}class nu{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof nn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,l=i instanceof nn?i.text.length:i.children.length;if(s==(n>0?l:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
68
|
+
`,this;e--}else if(i instanceof nn){let a=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=i.children[s+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof nn?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class VC{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new nu(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),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 BC{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(pt.prototype[Symbol.iterator]=function(){return this.iter()},nu.prototype[Symbol.iterator]=VC.prototype[Symbol.iterator]=BC.prototype[Symbol.iterator]=function(){return this});let AM=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}},bl="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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,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(t=>t?parseInt(t,36):1);for(let t=1;t<bl.length;t++)bl[t]+=bl[t-1];function RM(t){for(let e=1;e<bl.length;e+=2)if(bl[e]>t)return bl[e-1]<=t;return!1}function LS(t){return t>=127462&&t<=127487}const jS=8205;function jn(t,e,n=!0,r=!0){return(n?FC:DM)(t,e,r)}function FC(t,e,n){if(e==t.length)return e;e&&XC(t.charCodeAt(e))&&WC(t.charCodeAt(e-1))&&e--;let r=Cn(t,e);for(e+=Ar(r);e<t.length;){let i=Cn(t,e);if(r==jS||i==jS||n&&RM(i))e+=Ar(i),r=i;else if(LS(i)){let o=0,s=e-2;for(;s>=0&&LS(Cn(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function DM(t,e,n){for(;e>0;){let r=FC(t,e-2,n);if(r<e)return r;e--}return 0}function XC(t){return t>=56320&&t<57344}function WC(t){return t>=55296&&t<56320}function Cn(t,e){let n=t.charCodeAt(e);if(!WC(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return XC(r)?(n-55296<<10)+(r-56320)+65536:n}function dv(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Ar(t){return t<65536?1:2}const zm=/\r\n?|\n/;var dn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(dn||(dn={}));class $i{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){qm(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new $i(e)}composeDesc(e){return this.empty?e:e.empty?this:UC(this,e)}mapDesc(e,n=!1){return e.empty?this:Gm(this,e,n)}mapPos(e,n=-1,r=dn.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let l=this.sections[s++],a=this.sections[s++],u=i+l;if(a<0){if(u>e)return o+(e-i);o+=l}else{if(r!=dn.Simple&&u>=e&&(r==dn.TrackDel&&i<e&&u>e||r==dn.TrackBefore&&i<e||r==dn.TrackAfter&&u>e))return null;if(u>e||u==e&&n<0&&!l)return e==i||n<0?o:o+a;o+=a}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],l=i+o;if(s>=0&&i<=n&&l>=e)return i<e&&l>n?"cover":!0;i=l}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new $i(e)}static create(e){return new $i(e)}}class hn extends $i{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return qm(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return Gm(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],l=n[i+1];if(l>=0){n[i]=l,n[i+1]=s;let a=i>>1;for(;r.length<a;)r.push(pt.empty);r.push(s?e.slice(o,o+s):pt.empty)}o+=s}return new hn(n,r)}compose(e){return this.empty?e:e.empty?this:UC(this,e,!0)}map(e,n=!1){return e.empty?this:Gm(this,e,n,!0)}iterChanges(e,n=!1){qm(this,e,n)}get desc(){return $i.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new Cu(this);e:for(let s=0,l=0;;){let a=s==e.length?1e9:e[s++];for(;l<a||l==a&&o.len==0;){if(o.done)break e;let c=Math.min(o.len,a-l);Nn(i,c,-1);let f=o.ins==-1?-1:o.off==0?o.ins:0;Nn(n,c,f),f>0&&Co(r,n,o.text),o.forward(c),l+=c}let u=e[s++];for(;l<u;){if(o.done)break e;let c=Math.min(o.len,u-l);Nn(n,c,-1),Nn(i,c,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(c),l+=c}}return{changes:new hn(n,r),filtered:$i.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,l=null;function a(c=!1){if(!c&&!i.length)return;s<n&&Nn(i,n-s,-1);let f=new hn(i,o);l=l?l.compose(f.map(l)):f,i=[],o=[],s=0}function u(c){if(Array.isArray(c))for(let f of c)u(f);else if(c instanceof hn){if(c.length!=n)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:h=f,insert:d}=c;if(f>h||f<0||h>n)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${n})`);let p=d?typeof d=="string"?pt.of(d.split(r||zm)):d:pt.empty,g=p.length;if(f==h&&g==0)return;f<s&&a(),f>s&&Nn(i,f-s,-1),Nn(i,h-f,g),Co(o,i,p),s=h}}return u(e),a(!l),l}static empty(e){return new hn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,l)=>l&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(pt.empty);r[i]=pt.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new hn(n,r)}static createSet(e,n){return new hn(e,n)}}function Nn(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Co(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(pt.empty);t.push(n)}}function qm(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let l=t.sections[s++],a=t.sections[s++];if(a<0)i+=l,o+=l;else{let u=i,c=o,f=pt.empty;for(;u+=l,c+=a,a&&r&&(f=f.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)l=t.sections[s++],a=t.sections[s++];e(i,u,o,c,f),i=u,o=c}}}function Gm(t,e,n,r=!1){let i=[],o=r?[]:null,s=new Cu(t),l=new Cu(e);for(let a=-1;;)if(s.ins==-1&&l.ins==-1){let u=Math.min(s.len,l.len);Nn(i,u,-1),s.forward(u),l.forward(u)}else if(l.ins>=0&&(s.ins<0||a==s.i||s.off==0&&(l.len<s.len||l.len==s.len&&!n))){let u=l.len;for(Nn(i,l.ins,-1);u;){let c=Math.min(s.len,u);s.ins>=0&&a<s.i&&s.len<=c&&(Nn(i,0,s.ins),o&&Co(o,i,s.text),a=s.i),s.forward(c),u-=c}l.next()}else if(s.ins>=0){let u=0,c=s.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);u+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;Nn(i,u,a<s.i?s.ins:0),o&&a<s.i&&Co(o,i,s.text),a=s.i,s.forward(s.len-c)}else{if(s.done&&l.done)return o?hn.createSet(i,o):$i.create(i);throw new Error("Mismatched change set lengths")}}function UC(t,e,n=!1){let r=[],i=n?[]:null,o=new Cu(t),s=new Cu(e);for(let l=!1;;){if(o.done&&s.done)return i?hn.createSet(r,i):$i.create(r);if(o.ins==0)Nn(r,o.len,0,l),o.next();else if(s.len==0&&!s.done)Nn(r,0,s.ins,l),i&&Co(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let a=Math.min(o.len2,s.len),u=r.length;if(o.ins==-1){let c=s.ins==-1?-1:s.off?0:s.ins;Nn(r,a,c,l),i&&c&&Co(i,r,s.text)}else s.ins==-1?(Nn(r,o.off?0:o.len,a,l),i&&Co(i,r,o.textBit(a))):(Nn(r,o.off?0:o.len,s.off?0:s.ins,l),i&&!s.off&&Co(i,r,s.text));l=(o.ins>a||s.ins>=0&&s.len>a)&&(l||r.length>u),o.forward2(a),s.forward(a)}}}}class Cu{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?pt.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?pt.empty:n[r].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 ds{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ds(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return J.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return J.range(this.anchor,r)}eq(e){return this.anchor==e.anchor&&this.head==e.head}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 J.range(e.anchor,e.head)}static create(e,n,r){return new ds(e,n,r)}}class J{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:J.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e){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]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new J([this.main],0)}addRange(e,n=!0){return J.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,J.create(r,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 J(e.ranges.map(n=>ds.fromJSON(n)),e.main)}static single(e,n=e){return new J([J.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return J.normalized(e.slice(),n);r=o.to}return new J(e,n)}static cursor(e,n=0,r,i){return ds.create(e,e,(n==0?0:n<0?4:8)|(r==null?3:Math.min(2,r))|(i??33554431)<<5)}static range(e,n,r,i){let o=(r??33554431)<<5|(i==null?3:Math.min(2,i));return n<e?ds.create(n,e,24|o):ds.create(e,n,(n>e?4:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let l=s.from,a=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?J.range(a,l):J.range(l,a))}}return new J(e,n)}}function ZC(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let pv=0;class xe{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=pv++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}static define(e={}){return new xe(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:gv),!!e.static,e.enables)}of(e){return new Wf([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Wf(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Wf(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function gv(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Wf{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=pv++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,l=this.type==2,a=!1,u=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?u=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||c.push(e[f.id]);return{create(f){return f.values[s]=r(f),1},update(f,h){if(a&&h.docChanged||u&&(h.docChanged||h.selection)||Hm(f,c)){let d=r(f);if(l?!VS(d,f.values[s],i):!i(d,f.values[s]))return f.values[s]=d,1}return 0},reconfigure:(f,h)=>{let d,p=h.config.address[o];if(p!=null){let g=Rh(h,p);if(this.dependencies.every(y=>y instanceof xe?h.facet(y)===f.facet(y):y instanceof On?h.field(y,!1)==f.field(y,!1):!0)||(l?VS(d=r(f),g,i):i(d=r(f),g)))return f.values[s]=g,0}else d=r(f);return f.values[s]=d,1}}}}function VS(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Hm(t,e){let n=!1;for(let r of e)ru(t,r)&1&&(n=!0);return n}function MM(t,e,n){let r=n.map(a=>t[a.id]),i=n.map(a=>a.type),o=r.filter(a=>!(a&1)),s=t[e.id]>>1;function l(a){let u=[];for(let c=0;c<r.length;c++){let f=Rh(a,r[c]);if(i[c]==2)for(let h of f)u.push(h);else u.push(f)}return e.combine(u)}return{create(a){for(let u of r)ru(a,u);return a.values[s]=l(a),1},update(a,u){if(!Hm(a,o))return 0;let c=l(a);return e.compare(c,a.values[s])?0:(a.values[s]=c,1)},reconfigure(a,u){let c=Hm(a,r),f=u.config.facets[e.id],h=u.facet(e);if(f&&!c&&gv(n,f))return a.values[s]=h,0;let d=l(a);return e.compare(d,h)?(a.values[s]=h,0):(a.values[s]=d,1)}}}const BS=xe.define({static:!0});class On{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new On(pv++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(BS).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,BS.of({field:this,create:e})]}get extension(){return this}}const ls={lowest:4,low:3,default:2,high:1,highest:0};function wa(t){return e=>new YC(e,t)}const Ho={highest:wa(ls.highest),high:wa(ls.high),default:wa(ls.default),low:wa(ls.low),lowest:wa(ls.lowest)};class YC{constructor(e,n){this.inner=e,this.prec=n}}class Nl{of(e){return new Km(this,e)}reconfigure(e){return Nl.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Km{constructor(e,n){this.compartment=e,this.inner=n}}class Ah{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let h of IM(e,n,s))h instanceof On?i.push(h):(o[h.facet.id]||(o[h.facet.id]=[])).push(h);let l=Object.create(null),a=[],u=[];for(let h of i)l[h.id]=u.length<<1,u.push(d=>h.slot(d));let c=r==null?void 0:r.config.facets;for(let h in o){let d=o[h],p=d[0].facet,g=c&&c[h]||[];if(d.every(y=>y.type==0))if(l[p.id]=a.length<<1|1,gv(g,d))a.push(r.facet(p));else{let y=p.combine(d.map(O=>O.value));a.push(r&&p.compare(y,r.facet(p))?r.facet(p):y)}else{for(let y of d)y.type==0?(l[y.id]=a.length<<1|1,a.push(y.value)):(l[y.id]=u.length<<1,u.push(O=>y.dynamicSlot(O)));l[p.id]=u.length<<1,u.push(y=>MM(y,p,d))}}let f=u.map(h=>h(l));return new Ah(e,s,f,l,a,o)}}function IM(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,l){let a=i.get(s);if(a!=null){if(a<=l)return;let u=r[a].indexOf(s);u>-1&&r[a].splice(u,1),s instanceof Km&&n.delete(s.compartment)}if(i.set(s,l),Array.isArray(s))for(let u of s)o(u,l);else if(s instanceof Km){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),o(u,l)}else if(s instanceof YC)o(s.inner,s.prec);else if(s instanceof On)r[l].push(s),s.provides&&o(s.provides,l);else if(s instanceof Wf)r[l].push(s),s.facet.extensions&&o(s.facet.extensions,ls.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,l)}}return o(t,ls.default),r.reduce((s,l)=>s.concat(l))}function ru(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Rh(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const zC=xe.define(),qC=xe.define({combine:t=>t.some(e=>e),static:!0}),GC=xe.define({combine:t=>t.length?t[0]:void 0,static:!0}),HC=xe.define(),KC=xe.define(),JC=xe.define(),eE=xe.define({combine:t=>t.length?t[0]:!1});class Di{constructor(e,n){this.type=e,this.value=n}static define(){return new NM}}class NM{of(e){return new Di(this,e)}}class LM{constructor(e){this.map=e}of(e){return new tt(this,e)}}class tt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new tt(this.type,n)}is(e){return this.type==e}static define(e={}){return new LM(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}tt.reconfigure=tt.define();tt.appendConfig=tt.define();class gn{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&ZC(r,n.newLength),o.some(l=>l.type==gn.time)||(this.annotations=o.concat(gn.time.of(Date.now())))}static create(e,n,r,i,o,s){return new gn(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(gn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}gn.time=Di.define();gn.userEvent=Di.define();gn.addToHistory=Di.define();gn.remote=Di.define();function jM(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function tE(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=hn.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:tt.mapEffects(t.effects,i).concat(tt.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Jm(t,e,n){let r=e.selection,i=wl(e.annotations);return e.userEvent&&(i=i.concat(gn.userEvent.of(e.userEvent))),{changes:e.changes instanceof hn?e.changes:hn.of(e.changes||[],n,t.facet(GC)),selection:r&&(r instanceof J?r:J.single(r.anchor,r.head)),effects:wl(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function nE(t,e,n){let r=Jm(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=tE(r,Jm(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=gn.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return BM(n?VM(i):i)}function VM(t){let e=t.startState,n=!0;for(let i of e.facet(HC)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:jM(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=hn.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=gn.create(e,i,t.selection&&t.selection.map(o),tt.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(KC);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof gn?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof gn?t=o[0]:t=nE(e,wl(o),!1)}return t}function BM(t){let e=t.startState,n=e.facet(JC),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=tE(r,Jm(e,o,t.changes.newLength),!0))}return r==t?t:gn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const FM=[];function wl(t){return t==null?FM:Array.isArray(t)?t:[t]}var Bt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Bt||(Bt={}));const XM=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let eO;try{eO=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function WM(t){if(eO)return eO.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||XM.test(n)))return!0}return!1}function UM(t){return e=>{if(!/\S/.test(e))return Bt.Space;if(WM(e))return Bt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Bt.Word;return Bt.Other}}class ct{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)ru(this,l<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return ru(this,r),Rh(this,r)}update(...e){return nE(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let s of e.effects)s.is(Nl.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,a)=>i.set(a,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(tt.reconfigure)?(n=null,r=s.value):s.is(tt.appendConfig)&&(n=null,r=wl(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=Ah.resolve(r,i,this),o=new ct(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new ct(n,e.newDoc,e.newSelection,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:J.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=wl(r.effects);for(let l=1;l<n.ranges.length;l++){let a=e(n.ranges[l]),u=this.changes(a.changes),c=u.map(i);for(let h=0;h<l;h++)o[h]=o[h].map(c);let f=i.mapDesc(u,!0);o.push(a.range.map(f)),i=i.compose(c),s=tt.mapEffects(s,c).concat(tt.mapEffects(wl(a.effects),f))}return{changes:i,selection:J.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof hn?e:hn.of(e,this.doc.length,this.facet(ct.lineSeparator))}toText(e){return pt.of(e.split(this.facet(ct.lineSeparator)||zm))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(ru(this,n),Rh(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof On&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],l=e[o];i.push(s.init(a=>s.spec.fromJSON(l,a)))}}return ct.create({doc:e.doc,selection:J.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Ah.resolve(e.extensions||[],new Map),r=e.doc instanceof pt?e.doc:pt.of((e.doc||"").split(n.staticFacet(ct.lineSeparator)||zm)),i=e.selection?e.selection instanceof J?e.selection:J.single(e.selection.anchor,e.selection.head):J.single(0);return ZC(i,r.length),n.staticFacet(qC)||(i=i.asSingle()),new ct(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(ct.tabSize)}get lineBreak(){return this.facet(ct.lineSeparator)||`
|
|
69
|
+
`}get readOnly(){return this.facet(eE)}phrase(e,...n){for(let r of this.facet(ct.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(zC))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return UM(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,l=e-r;for(;s>0;){let a=jn(n,s,!1);if(o(n.slice(a,s))!=Bt.Word)break;s=a}for(;l<i;){let a=jn(n,l);if(o(n.slice(l,a))!=Bt.Word)break;l=a}return s==l?null:J.range(s+r,l+r)}}ct.allowMultipleSelections=qC;ct.tabSize=xe.define({combine:t=>t.length?t[0]:4});ct.lineSeparator=GC;ct.readOnly=eE;ct.phrases=xe.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});ct.languageData=zC;ct.changeFilter=HC;ct.transactionFilter=KC;ct.transactionExtender=JC;Nl.reconfigure=tt.define();function Mi(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],l=r[o];if(l===void 0)r[o]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](l,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Es{eq(e){return this==e}range(e,n=e){return tO.create(e,n,this)}}Es.prototype.startSide=Es.prototype.endSide=0;Es.prototype.point=!1;Es.prototype.mapMode=dn.TrackDel;let tO=class rE{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new rE(e,n,r)}};function nO(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class mv{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,l=o.length;;){if(s==l)return s;let a=s+l>>1,u=o[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-n;if(a==s)return u>=0?s:l;u>=0?l=a:s=a+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,l=-1;for(let a=0;a<this.value.length;a++){let u=this.value[a],c=this.from[a]+e,f=this.to[a]+e,h,d;if(c==f){let p=n.mapPos(c,u.startSide,u.mapMode);if(p==null||(h=d=p,u.startSide!=u.endSide&&(d=n.mapPos(c,u.endSide),d<h)))continue}else if(h=n.mapPos(c,u.startSide),d=n.mapPos(f,u.endSide),h>d||h==d&&u.startSide>0&&u.endSide<=0)continue;(d-h||u.endSide-u.startSide)<0||(s<0&&(s=h),u.point&&(l=Math.max(l,d-h)),r.push(u),i.push(h-s),o.push(d-s))}return{mapped:r.length?new mv(i,o,r,l):null,pos:s}}}class Ot{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ot(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(nO)),this.isEmpty)return n.length?Ot.of(n):this;let l=new iE(this,null,-1).goto(0),a=0,u=[],c=new Bo;for(;l.value||a<n.length;)if(a<n.length&&(l.from-n[a].from||l.startSide-n[a].value.startSide)>=0){let f=n[a++];c.addInner(f.from,f.to,f.value)||u.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==n.length||this.chunkEnd(l.chunkIndex)<n[a].from)&&(!s||i>this.chunkEnd(l.chunkIndex)||o<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!s||i>l.to||o<l.from||s(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||u.push(tO.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!u.length?Ot.empty:this.nextLayer.update({add:u,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let l=this.chunkPos[s],a=this.chunk[s],u=e.touchesRange(l,l+a.length);if(u===!1)i=Math.max(i,a.maxPoint),n.push(a),r.push(e.mapPos(l));else if(u===!0){let{mapped:c,pos:f}=a.map(l,e);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(f))}}let o=this.nextLayer.map(e);return n.length==0?o:new Ot(r,n,o||Ot.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Eu.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Eu.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),l=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),a=FS(s,l,r),u=new ka(s,a,o),c=new ka(l,a,o);r.iterGaps((f,h,d)=>XS(u,f,c,h,d,i)),r.empty&&r.length==0&&XS(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let l=FS(o,s),a=new ka(o,l,0).goto(r),u=new ka(s,l,0).goto(r);for(;;){if(a.to!=u.to||!rO(a.active,u.active)||a.point&&(!u.point||!a.point.eq(u.point)))return!1;if(a.to>i)return!0;a.next(),u.next()}}static spans(e,n,r,i,o=-1){let s=new ka(e,null,o).goto(n),l=n,a=s.openStart;for(;;){let u=Math.min(s.to,r);if(s.point){let c=s.activeForPoint(s.to),f=s.pointFrom<n?c.length+1:Math.min(c.length,a);i.point(l,u,s.point,c,f,s.pointRank),a=Math.min(s.openEnd(u),c.length)}else u>l&&(i.span(l,u,s.active,a),a=s.openEnd(u));if(s.to>r)return a+(s.point&&s.to>r?1:0);l=s.to,s.next()}}static of(e,n=!1){let r=new Bo;for(let i of e instanceof tO?[e]:n?ZM(e):e)r.add(i.from,i.to,i.value);return r.finish()}}Ot.empty=new Ot([],[],null,-1);function ZM(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(nO(e,r)>0)return t.slice().sort(nO);e=r}return t}Ot.empty.nextLayer=Ot.empty;class Bo{finishChunk(e){this.chunks.push(new mv(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Bo)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ot.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ot.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function FS(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let l=r.get(o.chunk[s]);l!=null&&(n?n.mapPos(l):l)==o.chunkPos[s]&&!(n!=null&&n.touchesRange(l,l+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class iE{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Eu{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new iE(s,n,r,o));return i.length==1?i[0]:new Eu(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)ng(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)ng(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ng(this.heap,0)}}}function ng(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class ka{constructor(e,n,r){this.minPoint=r,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=Eu.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ef(this.active,e),ef(this.activeTo,e),ef(this.activeRank,e),this.minActive=WS(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&this.activeRank[n]<=o;)n++;tf(this.active,n,r),tf(this.activeTo,n,i),tf(this.activeRank,n,o),e&&tf(e,n,this.cursor.from),this.minActive=WS(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&ef(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function XS(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,l=r,a=r-e;for(;;){let u=t.to+a-n.to||t.endSide-n.endSide,c=u<0?t.to+a:n.to,f=Math.min(c,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&rO(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(l,f,t.point,n.point):f>l&&!rO(t.active,n.active)&&o.compareRange(l,f,t.active,n.active),c>s)break;l=c,u<=0&&t.next(),u>=0&&n.next()}}function rO(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function ef(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function tf(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function WS(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function tc(t,e,n=t.length){let r=0;for(let i=0;i<n;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=jn(t,i));return r}function iO(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=jn(t,i)}return r===!0?-1:t.length}const oO="ͼ",US=typeof Symbol>"u"?"__"+oO:Symbol.for(oO),sO=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ZS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Fo{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,l,a,u){let c=[],f=/^@(\w+)\b/.exec(s[0]),h=f&&f[1]=="keyframes";if(f&&l==null)return a.push(s[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))o(d.split(/,\s*/).map(g=>s.map(y=>g.replace(/&/,y))).reduce((g,y)=>g.concat(y)),p,a);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");o(i(d),p,c,h)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||h)&&a.push((r&&!f&&!u?s.map(r):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
|
|
70
|
+
`)}static newName(){let e=ZS[US]||1;return ZS[US]=e+1,oO+e.toString(36)}static mount(e,n,r){let i=e[sO],o=r&&r.nonce;i?o&&i.setNonce(o):i=new YM(e,o),i.mount(Array.isArray(n)?n:[n])}}let YS=new Map;class YM{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=YS.get(r);if(o)return e.adoptedStyleSheets=[o.sheet,...e.adoptedStyleSheets],e[sO]=o;this.sheet=new i.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],YS.set(r,this)}else{this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let o=e.head||e;o.insertBefore(this.styleTag,o.firstChild)}this.modules=[],e[sO]=this}mount(e){let n=this.sheet,r=0,i=0;for(let o=0;o<e.length;o++){let s=e[o],l=this.modules.indexOf(s);if(l<i&&l>-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,s),n)for(let a=0;a<s.rules.length;a++)n.insertRule(s.rules[a],r++)}else{for(;i<l;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(!n){let o="";for(let s=0;s<this.modules.length;s++)o+=this.modules[s].getRules()+`
|
|
71
|
+
`;this.styleTag.textContent=o}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Xo={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:"'"},Qu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},zS=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),zM=typeof navigator<"u"&&/Mac/.test(navigator.platform),qM=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),GM=zM||zS&&+zS[1]<57;for(var En=0;En<10;En++)Xo[48+En]=Xo[96+En]=String(En);for(var En=1;En<=24;En++)Xo[En+111]="F"+En;for(var En=65;En<=90;En++)Xo[En]=String.fromCharCode(En+32),Qu[En]=String.fromCharCode(En);for(var rg in Xo)Qu.hasOwnProperty(rg)||(Qu[rg]=Xo[rg]);function HM(t){var e=GM&&(t.ctrlKey||t.altKey||t.metaKey)||qM&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Qu:Xo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Dh(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function lO(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function KM(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Uf(t,e){if(!e.anchorNode)return!1;try{return lO(t,e.anchorNode)}catch{return!1}}function _u(t){return t.nodeType==3?Qs(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Mh(t,e,n,r){return n?qS(t,e,n,r,-1)||qS(t,e,n,r,1):!1}function Ih(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function qS(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Wo(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=Ih(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Wo(t):0}else return!1}}function Wo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ov(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function JM(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function eI(t,e,n,r,i,o,s,l){let a=t.ownerDocument,u=a.defaultView||window;for(let c=t,f=!1;c&&!f;)if(c.nodeType==1){let h,d=c==a.body;if(d)h=JM(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let y=c.getBoundingClientRect();h={left:y.left,right:y.left+c.clientWidth,top:y.top,bottom:y.top+c.clientHeight}}let p=0,g=0;if(i=="nearest")e.top<h.top?(g=-(h.top-e.top+s),n>0&&e.bottom>h.bottom+g&&(g=e.bottom-h.bottom+g+s)):e.bottom>h.bottom&&(g=e.bottom-h.bottom+s,n<0&&e.top-g<h.top&&(g=-(h.top+g-e.top+s)));else{let y=e.bottom-e.top,O=h.bottom-h.top;g=(i=="center"&&y<=O?e.top+y/2-O/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-O+s)-h.top}if(r=="nearest"?e.left<h.left?(p=-(h.left-e.left+o),n>0&&e.right>h.right+p&&(p=e.right-h.right+p+o)):e.right>h.right&&(p=e.right-h.right+o,n<0&&e.left<h.left+p&&(p=-(h.left+p-e.left+o))):p=(r=="center"?e.left+(e.right-e.left)/2-(h.right-h.left)/2:r=="start"==l?e.left-o:e.right-(h.right-h.left)+o)-h.left,p||g)if(d)u.scrollBy(p,g);else{let y=0,O=0;if(g){let m=c.scrollTop;c.scrollTop+=g,O=c.scrollTop-m}if(p){let m=c.scrollLeft;c.scrollLeft+=p,y=c.scrollLeft-m}e={left:e.left-y,top:e.top-O,right:e.right-y,bottom:e.bottom-O},y&&Math.abs(y-p)<1&&(r="nearest"),O&&Math.abs(O-g)<1&&(i="nearest")}if(d)break;c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function tI(t){let e=t.ownerDocument;for(let n=t.parentNode;n&&n!=e.body;)if(n.nodeType==1){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class nI{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Wo(n):0),r,Math.min(e.focusOffset,r?Wo(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Xs=null;function oE(t){if(t.setActive)return t.setActive();if(Xs)return t.focus(Xs);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Xs==null?{get preventScroll(){return Xs={preventScroll:!0},!0}}:void 0),!Xs){Xs=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let GS;function Qs(t,e,n=e){let r=GS||(GS=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function kl(t,e,n){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,t.dispatchEvent(i);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function rI(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function sE(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function iI(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Wo(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Wo(n))}else{if(n==t)return!0;r=Ih(n),n=n.parentNode}}function lE(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}class Un{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Un(e.parentNode,Ih(e),n)}static after(e,n){return new Un(e.parentNode,Ih(e)+1,n)}}const yv=[];class Qt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let l=Qt.get(o);(!l||!l.parent&&l.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=HS(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=HS(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Wo(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Qt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,l=-1;for(let a=0,u=r,c=r;a<this.children.length;a++){let f=this.children[a],h=u+f.length;if(u<e&&h>n)return f.domBoundsAround(e,n,u);if(h>=e&&i==-1&&(i=a,o=u),u>n&&f.dom.parentNode==this.dom){s=a,l=c;break}c=h,u=h+f.breakAfter}return{from:o,to:l<0?r+this.length:l,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=yv){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&o.destroy()}this.children.splice(e,n-e,...r);for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new aE(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){this.parent=null}}Qt.prototype.breakAfter=0;function HS(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class aE{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function uE(t,e,n,r,i,o,s,l,a){let{children:u}=t,c=u.length?u[e]:null,f=o.length?o[o.length-1]:null,h=f?f.breakAfter:s;if(!(e==r&&c&&!s&&!h&&o.length<2&&c.merge(n,i,o.length?f:null,n==0,l,a))){if(r<u.length){let d=u[r];d&&i<d.length?(e==r&&(d=d.split(i),i=0),!h&&f&&d.merge(0,i,f,!0,0,a)?o[o.length-1]=d:(i&&d.merge(0,i,null,!1,0,a),o.push(d))):d!=null&&d.breakAfter&&(f?f.breakAfter=1:s=1),r++}for(c&&(c.breakAfter=s,n>0&&(!s&&o.length&&c.merge(n,c.length,o[0],!1,l,0)?c.breakAfter=o.shift().breakAfter:(n<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(n,c.length,null,!1,l,0),e++));e<r&&o.length;)if(u[r-1].become(o[o.length-1]))r--,o.pop(),a=o.length?0:l;else if(u[e].become(o[0]))e++,o.shift(),l=o.length?0:a;else break;!o.length&&e&&r<u.length&&!u[e-1].breakAfter&&u[r].merge(0,0,u[e-1],!1,l,a)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function cE(t,e,n,r,i,o){let s=t.childCursor(),{i:l,off:a}=s.findPos(n,1),{i:u,off:c}=s.findPos(e,-1),f=e-n;for(let h of r)f+=h.length;t.length+=f,uE(t,u,c,l,a,r,0,i,o)}const fl="";class fE{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(ct.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=fl}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let l=Qt.get(i),a=Qt.get(s);(l&&a?l.breakAfter:(l?l.breakAfter:KS(i))||KS(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,l;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(l=i.exec(n))&&(o=l.index,s=l[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=s-1);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=Qt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+Math.min(n,r.offset))}}function KS(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class JS{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}let gr=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},aO=typeof document<"u"?document:{documentElement:{style:{}}};const uO=/Edge\/(\d+)/.exec(gr.userAgent),hE=/MSIE \d/.test(gr.userAgent),cO=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(gr.userAgent),Nd=!!(hE||cO||uO),eb=!Nd&&/gecko\/(\d+)/i.test(gr.userAgent),ig=!Nd&&/Chrome\/(\d+)/.exec(gr.userAgent),tb="webkitFontSmoothing"in aO.documentElement.style,dE=!Nd&&/Apple Computer/.test(gr.vendor),nb=dE&&(/Mobile\/\w+/.test(gr.userAgent)||gr.maxTouchPoints>2);var Te={mac:nb||/Mac/.test(gr.platform),windows:/Win/.test(gr.platform),linux:/Linux|X11/.test(gr.platform),ie:Nd,ie_version:hE?aO.documentMode||6:cO?+cO[1]:uO?+uO[1]:0,gecko:eb,gecko_version:eb?+(/Firefox\/(\d+)/.exec(gr.userAgent)||[0,0])[1]:0,chrome:!!ig,chrome_version:ig?+ig[1]:0,ios:nb,android:/Android\b/.test(gr.userAgent),webkit:tb,safari:dE,webkit_version:tb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:aO.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const oI=256;class Ri extends Qt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof Ri)||this.length-(n-e)+r.length>oI||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Ri(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new Un(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return sI(this.dom,e,n)}}class to extends Qt{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(sE(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,s){return r&&(!(r instanceof to&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(cE(this,e,n,r?r.children:[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let l of this.children){let a=r+l.length;a>e&&n.push(r<e?l.split(e-r):l),i<0&&r>=e&&(i=o),r=a,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new to(this.mark,n,s)}domAtPos(e){return pE(this,e)}coordsAt(e,n){return mE(this,e,n)}}function sI(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?Te.chrome||Te.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let l=Qs(t,i,o).getClientRects();if(!l.length)return null;let a=l[(s?s<0:n>=0)?0:l.length-1];return Te.safari&&!s&&a.width==0&&(a=Array.prototype.find.call(l,u=>u.width)||a),s?Ov(a,s<0):a||null}class Eo extends Qt{static create(e,n,r){return new Eo(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Eo.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,r,i,o,s){return r&&(!(r instanceof Eo)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Eo&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return pt.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):pt.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Un.before(this.dom):Un.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let l=s?i.length-1:0;o=i[l],!(e>0?l==0:l==i.length-1||o.top<o.bottom);l+=s?-1:1);return Ov(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Ll extends Qt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Ll&&e.side==this.side}split(){return new Ll(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Un.before(this.dom):Un.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return pt.empty}get isHidden(){return!0}}Ri.prototype.children=Eo.prototype.children=Ll.prototype.children=yv;function pE(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],l=o+s.length;if(!(l==o&&s.getSide()<=0)){if(e>o&&e<l&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=l}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new Un(n,0)}function gE(t,e,n){let r,{children:i}=t;n>0&&e instanceof to&&i.length&&(r=i[i.length-1])instanceof to&&r.mark.eq(e.mark)?gE(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function mE(t,e,n){let r=null,i=-1,o=null,s=-1;function l(u,c){for(let f=0,h=0;f<u.children.length&&h<=c;f++){let d=u.children[f],p=h+d.length;p>=c&&(d.children.length?l(d,c-h):(!o||o.isHidden&&n>0)&&(p>c||h==p&&d.getSide()>0)?(o=d,s=c-h):(h<c||h==p&&d.getSide()<0&&!d.isHidden)&&(r=d,i=c-h)),h=p}}l(t,e);let a=(n<0?r:o)||r||o;return a?a.coordsAt(Math.max(0,a==r?i:s),n):lI(t)}function lI(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=_u(e);return n[n.length-1]||null}function fO(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const rb=Object.create(null);function vv(t,e,n){if(t==e)return!0;t||(t=rb),e||(e=rb);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function hO(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function aI(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class oo{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}destroy(e){}}var Yt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Yt||(Yt={}));class Ve extends Es{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new nc(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Uo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=OE(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Uo(e,r,i,n,e.widget||null,!0)}static line(e){return new rc(e)}static set(e,n=!1){return Ot.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ve.none=Ot.empty;class nc extends Ve{constructor(e){let{start:n,end:r}=OE(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof nc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&vv(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}nc.prototype.point=!1;class rc extends Ve{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof rc&&this.spec.class==e.spec.class&&vv(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}rc.prototype.mapMode=dn.TrackBefore;rc.prototype.point=!0;class Uo extends Ve{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?dn.TrackBefore:dn.TrackAfter:dn.TrackDel}get type(){return this.startSide<this.endSide?Yt.WidgetRange:this.startSide<=0?Yt.WidgetBefore:Yt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Uo&&uI(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Uo.prototype.point=!0;function OE(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function uI(t,e){return t==e||!!(t&&e&&t.compare(e))}function dO(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Wn extends Qt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof Wn))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),cE(this,e,n,r?r.children:[],o,s),!0}split(e){let n=new Wn;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){vv(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){gE(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=fO(n,this.attrs||{})),r&&(this.attrs=fO({class:r},this.attrs||{}))}domAtPos(e){return pE(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(sE(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(hO(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&Qt.get(i)instanceof to;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Qt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Te.ios||!this.children.some(o=>o instanceof Ri))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof Ri)||/[^ -~]/.test(r.text))return null;let i=_u(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=mE(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return!1}get type(){return Yt.Text}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof Wn)return o;if(s>n)break}i=s+o.breakAfter}return null}}class ys extends Qt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.type=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof ys)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?Un.before(this.dom):Un.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new ys(this.widget,n,this.type);return r.breakAfter=this.breakAfter,r}get children(){return yv}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):pt.empty}domBoundsAround(){return null}become(e){return e instanceof ys&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.type=e.type,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){return this.widget.coordsAt(this.dom,e,n)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class iu{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!e.breakAfter&&!(e instanceof ys&&e.type==Yt.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new Wn),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(nf(new Ll(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(nf(new Ri(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Uo){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(r instanceof Uo)if(r.block){let{type:a}=r;a==Yt.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ys(r.widget||new ib("div"),l,a))}else{let a=Eo.create(r.widget||new ib("span"),l,l?0:r.startSide),u=this.atCursorPos&&!a.isEditable&&o<=i.length&&(e<n||r.startSide>0),c=!a.isEditable&&(e<n||o>i.length||r.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!u&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(f.append(nf(new Ll(1),i),o),o=i.length+Math.max(0,o-i.length)),f.append(nf(a,i),o),this.atCursorPos=c,this.pendingBuffer=c?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let s=new iu(e,n,r,o);return s.openEnd=Ot.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function nf(t,e){for(let n of e)t=new to(n,[t],t.length);return t}class ib extends oo{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}}const yE=xe.define(),vE=xe.define(),SE=xe.define(),bE=xe.define(),pO=xe.define(),wE=xe.define(),kE=xe.define(),PE=xe.define({combine:t=>t.some(e=>e)}),xE=xe.define({combine:t=>t.some(e=>e)});class Nh{constructor(e,n="nearest",r="nearest",i=5,o=5){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o}map(e){return e.empty?this:new Nh(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const ob=tt.define({map:(t,e)=>t.map(e)});function vr(t,e,n){let r=t.facet(bE);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Ld=xe.define({combine:t=>t.length?t[0]:!0});let cI=0;const La=xe.define();class qt{constructor(e,n,r,i){this.id=e,this.create=n,this.domEventHandlers=r,this.extension=i(this)}static define(e,n){const{eventHandlers:r,provide:i,decorations:o}=n||{};return new qt(cI++,e,r,s=>{let l=[La.of(s)];return o&&l.push($u.of(a=>{let u=a.plugin(s);return u?o(u):Ve.none})),i&&l.push(i(s)),l})}static fromClass(e,n){return qt.define(r=>new e(r),n)}}class og{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(vr(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){vr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){vr(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const CE=xe.define(),Sv=xe.define(),$u=xe.define(),bv=xe.define(),EE=xe.define();function sb(t,e,n){let r=t.state.facet(EE);if(!r.length)return r;let i=r.map(s=>s instanceof Function?s(t):s),o=[];return Ot.spans(i,e,n,{point(){},span(s,l,a,u){let c=o;for(let f=a.length-1;f>=0;f--,u--){let h=a[f].spec.bidiIsolate,d;if(h!=null)if(u>0&&c.length&&(d=c[c.length-1]).to==s&&d.direction==h)d.to=l,c=d.inner;else{let p={from:s,to:l,direction:h,inner:[]};c.push(p),c=p.inner}}}}),o}const QE=xe.define();function _E(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(QE)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const ja=xe.define();class Lr{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Lr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,l=0;;i++){let a=i==e.length?null:e[i],u=s-l,c=a?a.fromB:1e9;for(;o<n.length&&n[o]<c;){let f=n[o],h=n[o+1],d=Math.max(l,f),p=Math.min(c,h);if(d<=p&&new Lr(d+u,p+u,d,p).addToSet(r),h>c)break;o+=2}if(!a)return r;new Lr(a.fromA,a.toA,a.fromB,a.toB).addToSet(r),s=a.toA,l=a.toB}}}class Lh{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=hn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,l,a)=>i.push(new Lr(o,s,l,a))),this.changedRanges=i}static create(e,n,r){return new Lh(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>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}}var Ut=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ut||(Ut={}));const Tu=Ut.LTR,$E=Ut.RTL;function TE(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const fI=TE("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),hI=TE("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),gO=Object.create(null),fi=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);gO[e]=n,gO[n]=-e}function dI(t){return t<=247?fI[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?hI[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8203?256:64336<=t&&t<=65023?4:t==8204?256:1}const pI=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Qo{get dir(){return this.level%2?$E:Tu}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let l=e[s];if(l.from<=n&&l.to>=n){if(l.level==r)return s;(o<0||(i!=0?i<0?l.from<n:l.to>n:e[o].level>l.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function AE(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!AE(r.inner,i.inner))return!1}return!0}const Pt=[];function gI(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,l=o<r.length?r[o].from:n,a=o?256:i;for(let u=s,c=a,f=a;u<l;u++){let h=dI(t.charCodeAt(u));h==512?h=c:h==8&&f==4&&(h=16),Pt[u]=h==4?2:h,h&7&&(f=h),c=h}for(let u=s,c=a,f=a;u<l;u++){let h=Pt[u];if(h==128)u<l-1&&c==Pt[u+1]&&c&24?h=Pt[u]=c:Pt[u]=256;else if(h==64){let d=u+1;for(;d<l&&Pt[d]==64;)d++;let p=u&&c==8||d<n&&Pt[d]==8?f==1?1:8:256;for(let g=u;g<d;g++)Pt[g]=p;u=d-1}else h==8&&f==1&&(Pt[u]=1);c=h,h&7&&(f=h)}}}function mI(t,e,n,r,i){let o=i==1?2:1;for(let s=0,l=0,a=0;s<=r.length;s++){let u=s?r[s-1].to:e,c=s<r.length?r[s].from:n;for(let f=u,h,d,p;f<c;f++)if(d=gO[h=t.charCodeAt(f)])if(d<0){for(let g=l-3;g>=0;g-=3)if(fi[g+1]==-d){let y=fi[g+2],O=y&2?i:y&4?y&1?o:i:0;O&&(Pt[f]=Pt[fi[g]]=O),l=g;break}}else{if(fi.length==189)break;fi[l++]=f,fi[l++]=h,fi[l++]=a}else if((p=Pt[f])==2||p==1){let g=p==i;a=g?0:1;for(let y=l-3;y>=0;y-=3){let O=fi[y+2];if(O&2)break;if(g)fi[y+2]|=2;else{if(O&4)break;fi[y+2]|=4}}}}}function OI(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,l=i<n.length?n[i].from:e;for(let a=s;a<l;){let u=Pt[a];if(u==256){let c=a+1;for(;;)if(c==l){if(i==n.length)break;c=n[i++].to,l=i<n.length?n[i].from:e}else if(Pt[c]==256)c++;else break;let f=o==1,h=(c<e?Pt[c]:r)==1,d=f==h?f?1:2:r;for(let p=c,g=i,y=g?n[g-1].to:t;p>a;)p==y&&(p=n[--g].from,y=g?n[g-1].to:t),Pt[--p]=d;a=c}else o=u,a++}}}function mO(t,e,n,r,i,o,s){let l=r%2?2:1;if(r%2==i%2)for(let a=e,u=0;a<n;){let c=!0,f=!1;if(u==o.length||a<o[u].from){let g=Pt[a];g!=l&&(c=!1,f=g==16)}let h=!c&&l==1?[]:null,d=c?r:r+1,p=a;e:for(;;)if(u<o.length&&p==o[u].from){if(f)break e;let g=o[u];if(!c)for(let y=g.to,O=u+1;;){if(y==n)break e;if(O<o.length&&o[O].from==y)y=o[O++].to;else{if(Pt[y]==l)break e;break}}if(u++,h)h.push(g);else{g.from>a&&s.push(new Qo(a,g.from,d));let y=g.direction==Tu!=!(d%2);OO(t,y?r+1:r,i,g.inner,g.from,g.to,s),a=g.to}p=g.to}else{if(p==n||(c?Pt[p]!=l:Pt[p]==l))break;p++}h?mO(t,a,p,r+1,i,h,s):a<p&&s.push(new Qo(a,p,d)),a=p}else for(let a=n,u=o.length;a>e;){let c=!0,f=!1;if(!u||a>o[u-1].to){let g=Pt[a-1];g!=l&&(c=!1,f=g==16)}let h=!c&&l==1?[]:null,d=c?r:r+1,p=a;e:for(;;)if(u&&p==o[u-1].to){if(f)break e;let g=o[--u];if(!c)for(let y=g.from,O=u;;){if(y==e)break e;if(O&&o[O-1].to==y)y=o[--O].from;else{if(Pt[y-1]==l)break e;break}}if(h)h.push(g);else{g.to<a&&s.push(new Qo(g.to,a,d));let y=g.direction==Tu!=!(d%2);OO(t,y?r+1:r,i,g.inner,g.from,g.to,s),a=g.from}p=g.from}else{if(p==e||(c?Pt[p-1]!=l:Pt[p-1]==l))break;p--}h?mO(t,p,a,r+1,i,h,s):p<a&&s.push(new Qo(p,a,d)),a=p}}function OO(t,e,n,r,i,o,s){let l=e%2?2:1;gI(t,i,o,r,l),mI(t,i,o,r,l),OI(i,o,r,l),mO(t,i,o,e,n,r,s)}function yI(t,e,n){if(!t)return[new Qo(0,0,e==$E?1:0)];if(e==Tu&&!n.length&&!pI.test(t))return RE(t.length);if(n.length)for(;t.length>Pt.length;)Pt[Pt.length]=256;let r=[],i=e==Tu?0:1;return OO(t,i,i,n,0,t.length,r),r}function RE(t){return[new Qo(0,t,0)]}let DE="";function vI(t,e,n,r,i){var o;let s=r.head-t.from,l=-1;if(s==0){if(!i||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),l=0)}else if(s==t.length){if(i)return null;let h=e[e.length-1];h.level!=n&&(s=h.side(!0,n),l=e.length-1)}l<0&&(l=Qo.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc));let a=e[l];s==a.side(i,n)&&(a=e[l+=i?1:-1],s=a.side(!i,n));let u=i==(a.dir==n),c=jn(t.text,s,u);if(DE=t.text.slice(Math.min(s,c),Math.max(s,c)),c!=a.side(i,n))return J.cursor(c+t.from,u?-1:1,a.level);let f=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return!f&&a.level!=n?J.cursor(i?t.to:t.from,i?-1:1,n):f&&f.level<a.level?J.cursor(f.side(!i,n)+t.from,i?1:-1,f.level):J.cursor(c+t.from,i?-1:1,a.level)}class lb extends Qt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Wn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Lr(0,0,0,e.state.doc.length)],0,null)}update(e){let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:l,toA:a})=>a<this.minWidthFrom||l>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);let r=this.view.inputState.composing<0?null:bI(this.view,e.changes);if(this.hasComposition){this.markedForComposition.clear();let{from:l,to:a}=this.hasComposition;n=new Lr(l,a,e.changes.mapPos(l,-1),e.changes.mapPos(a,1)).addToSet(n.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(Te.ie||Te.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,o=this.updateDeco(),s=PI(i,o,e.changes);return n=Lr.extendWithRanges(n,s),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Te.chrome||Te.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof ys&&s.widget instanceof ab&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let l=s>=0?i[s]:null;if(!l)break;let{fromA:a,toA:u,fromB:c,toB:f}=l,h,d,p,g;if(r&&r.range.fromB<f&&r.range.toB>c){let b=iu.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),P=iu.build(this.view.state.doc,r.range.toB,f,this.decorations,this.dynamicDecorationMap);d=b.breakAtStart,p=b.openStart,g=P.openEnd;let E=this.compositionView(r);P.breakAtStart?E.breakAfter=1:P.content.length&&E.merge(E.length,E.length,P.content[0],!1,P.openStart,0)&&(E.breakAfter=P.content[0].breakAfter,P.content.shift()),b.content.length&&E.merge(0,0,b.content[b.content.length-1],!0,0,b.openEnd)&&b.content.pop(),h=b.content.concat(E).concat(P.content)}else({content:h,breakAtStart:d,openStart:p,openEnd:g}=iu.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:y,off:O}=o.findPos(u,1),{i:m,off:v}=o.findPos(a,-1);uE(this,m,v,y,O,h,d,p,g)}r&&this.fixCompositionDOM(r)}compositionView(e){let n=new Ri(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new to(i,[n],n.length);let r=new Wn;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8,this.markedForComposition.add(s);let l=Qt.get(o);l!=s&&(l&&(l.dom=null),s.setDOM(o))},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&Uf(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.domAtPos(l.anchor),u=l.empty?a:this.domAtPos(l.head);if(Te.gecko&&l.empty&&!this.hasComposition&&SI(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=u=new Un(f,0),s=!0}let c=this.view.observer.selectionRange;(s||!c.focusNode||!Mh(a.node,a.offset,c.anchorNode,c.anchorOffset)||!Mh(u.node,u.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{Te.android&&Te.chrome&&this.dom.contains(c.focusNode)&&xI(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Dh(this.view.root);if(f)if(l.empty){if(Te.gecko){let h=wI(a.node,a.offset);if(h&&h!=3){let d=IE(a.node,a.offset,h==1?1:-1);d&&(a=new Un(d,h==1?0:d.nodeValue.length))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&c.caretBidiLevel!=null&&(c.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();l.anchor>l.head&&([a,u]=[u,a]),h.setEnd(u.node,u.offset),h.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(h)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(a,u)),this.impreciseAnchor=a.precise?null:new Un(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new Un(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Dh(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=Wn.find(this,n.head);if(!s)return;let l=s.posAtStart;if(n.head==l||n.head==l+s.length)return;let a=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!a||!u||a.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,o)}nearest(e){for(let n=e;n;){let r=Qt.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof Wn)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){for(let r=this.length,i=this.children.length-1;;i--){let o=this.children[i],s=r-o.breakAfter-o.length;if(e>s||e==s&&o.type!=Yt.WidgetBefore&&o.type!=Yt.WidgetAfter&&(!i||n==2||this.children[i-1].breakAfter||this.children[i-1].type==Yt.WidgetBefore&&n>-2))return o.coordsAt(e-s,n);r=s}}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Wn))return null;for(;i.children.length;){let{i:l,off:a}=i.childPos(r,1);for(;;l++){if(l==i.children.length)return null;if((i=i.children[l]).length)break}r=a}if(!(i instanceof Ri))return null;let o=jn(i.text,r);if(o==r)return null;let s=Qs(i.dom,r,o).getClientRects();return!s.length||s[0].top>=s[0].bottom?null:s[0]}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==Ut.LTR;for(let u=0,c=0;c<this.children.length;c++){let f=this.children[c],h=u+f.length;if(h>i)break;if(u>=r){let d=f.dom.getBoundingClientRect();if(n.push(d.height),s){let p=f.dom.lastChild,g=p?_u(p):[];if(g.length){let y=g[g.length-1],O=a?y.right-d.left:d.right-y.left;O>l&&(l=O,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+f.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Ut.RTL:Ut.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Wn){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=_u(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new aE(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let l=n.lineBlockAt(s).bottom-n.lineBlockAt(r).top;e.push(Ve.replace({widget:new ab(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return Ve.set(e)}updateDeco(){let e=this.view.state.facet($u).map((n,r)=>(this.dynamicDecorationMap[r]=typeof n=="function")?n(this.view):n);for(let n=e.length;n<e.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=_E(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom};eI(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==Ut.LTR)}}function SI(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class ab extends oo{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function ME(t){let e=t.observer.selectionRange,n=e.focusNode&&IE(e.focusNode,e.focusOffset,0);if(!n)return null;let r=Qt.get(n),i,o;if(r instanceof Ri)i=r.posAtStart,o=i+r.length;else e:for(let s=0,l=n;;){for(let u=l.previousSibling,c;u;u=u.previousSibling){if(c=Qt.get(u)){i=o=c.posAtEnd+s;break e}let f=new fE([],t.state);if(f.readNode(u),f.text.indexOf(fl)>-1)return null;s+=f.text.length}if(l=l.parentNode,!l)return null;let a=Qt.get(l);if(a){i=o=a.posAtStart+s;break}}return{from:i,to:o,node:n}}function bI(t,e){let n=ME(t);if(!n)return null;let{from:r,to:i,node:o}=n,s=e.mapPos(r,-1),l=e.mapPos(i,1),a=o.nodeValue;if(/[\n\r]/.test(a))return null;if(l-s!=a.length){let h=e.mapPos(r,1),d=e.mapPos(i,-1);if(d-h==a.length)s=h,l=d;else if(t.state.doc.sliceString(l-a.length,l)==a)s=l-a.length;else if(t.state.doc.sliceString(s,s+a.length)==a)l=s+a.length;else return null}let{main:u}=t.state.selection;if(t.state.doc.sliceString(s,l)!=a||s>u.head||l<u.head)return null;let c=[],f=new Lr(r,i,s,l);for(let h=o.parentNode;;h=h.parentNode){let d=Qt.get(h);if(d instanceof to)c.push({node:h,deco:d.mark});else{if(d instanceof Wn||h.nodeName=="DIV"&&h.parentNode==t.contentDOM)return{range:f,text:o,marks:c,line:h};if(h!=t.contentDOM)c.push({node:h,deco:new nc({inclusive:!0,attributes:aI(h),tagName:h.tagName.toLowerCase()})});else return null}}}function IE(t,e,n){if(n<=0)for(let r=t,i=e;;){if(r.nodeType==3)return r;if(r.nodeType==1&&i>0)r=r.childNodes[i-1],i=Wo(r);else break}if(n>=0)for(let r=t,i=e;;){if(r.nodeType==3)return r;if(r.nodeType==1&&i<r.childNodes.length&&n>=0)r=r.childNodes[i],i=0;else break}return null}function wI(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let kI=class{constructor(){this.changes=[]}compareRange(e,n){dO(e,n,this.changes)}comparePoint(e,n){dO(e,n,this.changes)}};function PI(t,e,n){let r=new kI;return Ot.compare(t,e,n,r),r.changes}function xI(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function CI(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return J.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,l=o;n<0?s=jn(i.text,o,!1):l=jn(i.text,o);let a=r(i.text.slice(s,l));for(;s>0;){let u=jn(i.text,s,!1);if(r(i.text.slice(u,s))!=a)break;s=u}for(;l<i.length;){let u=jn(i.text,l);if(r(i.text.slice(l,u))!=a)break;l=u}return J.range(s+i.from,l+i.from)}function EI(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function QI(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function sg(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function ub(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function cb(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function yO(t,e,n){let r,i,o,s,l=!1,a,u,c,f;for(let p=t.firstChild;p;p=p.nextSibling){let g=_u(p);for(let y=0;y<g.length;y++){let O=g[y];i&&sg(i,O)&&(O=ub(cb(O,i.bottom),i.top));let m=EI(e,O),v=QI(n,O);if(m==0&&v==0)return p.nodeType==3?fb(p,e,n):yO(p,e,n);if(!r||s>v||s==v&&o>m){r=p,i=O,o=m,s=v;let b=v?n<O.top?-1:1:m?e<O.left?-1:1:0;l=!b||(b>0?y<g.length-1:y>0)}m==0?n>O.bottom&&(!c||c.bottom<O.bottom)?(a=p,c=O):n<O.top&&(!f||f.top>O.top)&&(u=p,f=O):c&&sg(c,O)?c=cb(c,O.bottom):f&&sg(f,O)&&(f=ub(f,O.top))}}if(c&&c.bottom>=n?(r=a,i=c):f&&f.top<=n&&(r=u,i=f),!r)return{node:t,offset:0};let h=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return fb(r,h,n);if(l&&r.contentEditable!="false")return yO(r,h,n);let d=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:d}}function fb(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let l=0;l<r;l++){let a=Qs(t,l,l+1).getClientRects();for(let u=0;u<a.length;u++){let c=a[u];if(c.top==c.bottom)continue;s||(s=e-c.left);let f=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f<o){let h=e>=(c.left+c.right)/2,d=h;if((Te.chrome||Te.gecko)&&Qs(t,l).getBoundingClientRect().left==c.right&&(d=!h),f<=0)return{node:t,offset:l+(d?1:0)};i=l+(d?1:0),o=f}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function NE(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,a,{docHeight:u}=t.viewState,{x:c,y:f}=e,h=f-l;if(h<0)return 0;if(h>u)return t.state.doc.length;for(let b=t.viewState.heightOracle.textHeight/2,P=!1;a=t.elementAtHeight(h),a.type!=Yt.Text;)for(;h=r>0?a.bottom+b:a.top-b,!(h>=0&&h<=u);){if(P)return n?null:0;P=!0,r=-r}f=l+h;let d=a.from;if(d<t.viewport.from)return t.viewport.from==0?0:n?null:hb(t,s,a,c,f);if(d>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:hb(t,s,a,c,f);let p=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:p,y=g.elementFromPoint(c,f);y&&!t.contentDOM.contains(y)&&(y=null),y||(c=Math.max(s.left+1,Math.min(s.right-1,c)),y=g.elementFromPoint(c,f),y&&!t.contentDOM.contains(y)&&(y=null));let O,m=-1;if(y&&((i=t.docView.nearest(y))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let b=p.caretPositionFromPoint(c,f);b&&({offsetNode:O,offset:m}=b)}else if(p.caretRangeFromPoint){let b=p.caretRangeFromPoint(c,f);b&&({startContainer:O,startOffset:m}=b,(!t.contentDOM.contains(O)||Te.safari&&_I(O,m,c)||Te.chrome&&$I(O,m,c))&&(O=void 0))}}if(!O||!t.docView.dom.contains(O)){let b=Wn.find(t.docView,d);if(!b)return h>a.top+a.height/2?a.to:a.from;({node:O,offset:m}=yO(b.dom,c,f))}let v=t.docView.nearest(O);if(!v)return null;if(v.isWidget&&((o=v.dom)===null||o===void 0?void 0:o.nodeType)==1){let b=v.dom.getBoundingClientRect();return e.y<b.top||e.y<=b.bottom&&e.x<=(b.left+b.right)/2?v.posAtStart:v.posAtEnd}else return v.localPosFromDOM(O,m)+v.posAtStart}function hb(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,a=Math.floor((i-n.top-(t.defaultLineHeight-l)*.5)/l);o+=a*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+iO(s,o,t.state.tabSize)}function _I(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return Qs(t,r-1,r).getBoundingClientRect().left>n}function $I(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():Qs(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function vO(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==Yt.Text))return r}return n}function TI(t,e,n,r){let i=vO(t,e.head),o=!r||i.type!=Yt.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),l=t.textDirectionAt(i.from),a=t.posAtCoords({x:n==(l==Ut.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(a!=null)return J.cursor(a,n?-1:1)}return J.cursor(n?i.to:i.from,n?-1:1)}function db(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let l=e,a=null;;){let u=vI(i,o,s,l,n),c=DE;if(!u){if(i.number==(n?t.state.doc.lines:1))return l;c=`
|
|
72
|
+
`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=J.cursor(n?i.from:i.to)}if(a){if(!a(c))return l}else{if(!r)return u;a=r(c)}l=u}}function AI(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==Bt.Space&&(i=s),i==s}}function RI(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return J.cursor(i,e.assoc);let s=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i),c=t.documentTop;if(u)s==null&&(s=u.left-a.left),l=o<0?u.top:u.bottom;else{let d=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(a.right-a.left,t.defaultCharacterWidth*(i-d.from))),l=(o<0?d.top:d.bottom)+c}let f=a.left+s,h=r??t.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=l+(h+d)*o,g=NE(t,{x:f,y:p},!1,o);if(p<a.top||p>a.bottom||(o<0?g<i:g>i))return J.cursor(g,e.assoc,void 0,s)}}function Zf(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,l)=>{if(e>o&&e<s){let a=r||n||(e-o<s-e?-1:1);e=a<0?o:s,r=a}});if(!r)return e}}function lg(t,e,n){let r=Zf(t.state.facet(bv).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:J.cursor(r,r<n.from?1:-1)}class DI{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;let n=(r,i)=>{this.ignoreDuringComposition(i)||i.type=="keydown"&&this.keydown(e,i)||(this.mustFlushObserver(i)&&e.observer.forceFlush(),this.runCustomHandlers(i.type,e,i)?i.preventDefault():r(e,i))};for(let r in an){let i=an[r];e.contentDOM.addEventListener(r,o=>{pb(e,o)&&n(i,o)},SO[r]),this.registeredEvents.push(r)}e.scrollDOM.addEventListener("mousedown",r=>{if(r.target==e.scrollDOM&&r.clientY>e.contentDOM.getBoundingClientRect().bottom&&(n(an.mousedown,r),!r.defaultPrevented&&r.button==2)){let i=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=i,200)}}),e.scrollDOM.addEventListener("drop",r=>{r.target==e.scrollDOM&&r.clientY>e.contentDOM.getBoundingClientRect().bottom&&n(an.drop,r)}),Te.chrome&&Te.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,Te.safari&&e.contentDOM.addEventListener("input",()=>null)}ensureHandlers(e,n){var r;let i;this.customHandlers=[];for(let o of n)if(i=(r=o.update(e).spec)===null||r===void 0?void 0:r.domEventHandlers){this.customHandlers.push({plugin:o.value,handlers:i});for(let s in i)this.registeredEvents.indexOf(s)<0&&s!="scroll"&&(this.registeredEvents.push(s),e.contentDOM.addEventListener(s,l=>{pb(e,l)&&this.runCustomHandlers(s,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,n,r){for(let i of this.customHandlers){let o=i.handlers[e];if(o)try{if(o.call(i.plugin,r,n)||r.defaultPrevented)return!0}catch(s){vr(n.state,s)}}return!1}runScrollHandlers(e,n){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let r of this.customHandlers){let i=r.handlers.scroll;if(i)try{i.call(r.plugin,n,e)}catch(o){vr(e.state,o)}}}keydown(e,n){if(this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(n.keyCode!=27&&jE.indexOf(n.keyCode)<0&&(e.inputState.lastEscPress=0),Te.android&&Te.chrome&&!n.synthetic&&(n.keyCode==13||n.keyCode==8))return e.observer.delayAndroidKey(n.key,n.keyCode),!0;let r;return Te.ios&&!n.synthetic&&!n.altKey&&!n.metaKey&&((r=LE.find(i=>i.keyCode==n.keyCode))&&!n.ctrlKey||MI.indexOf(n.key)>-1&&n.ctrlKey&&!n.shiftKey)?(this.pendingIOSKey=r||n,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let n=this.pendingIOSKey;return n?(this.pendingIOSKey=void 0,kl(e.contentDOM,n.key,n.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Te.safari&&!Te.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const LE=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],MI="dthko",jE=[16,17,18,20,91,92,224,225],rf=6;function of(t){return Math.max(0,t)*.7+8}function II(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class NI{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=tI(e.contentDOM),this.atoms=e.state.facet(bv).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(ct.allowMultipleSelections)&&LI(e,n),this.dragging=VI(e,n)&&XE(n)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&II(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,i=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=_E(this.view);e.clientX-s.left<=o.left+rf?r=-of(o.left-e.clientX):e.clientX+s.right>=o.right-rf&&(r=of(e.clientX-o.right)),e.clientY-s.top<=o.top+rf?i=-of(o.top-e.clientY):e.clientY+s.bottom>=o.bottom-rf&&(i=of(e.clientY-o.bottom)),this.setScrollSpeed(r,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=Zf(this.atoms,i.from,0);s!=i.from&&(o=J.cursor(s,-1))}else{let s=Zf(this.atoms,i.from,-1),l=Zf(this.atoms,i.to,1);(s!=i.from||l!=i.to)&&(o=J.range(i.from==i.anchor?s:l,i.from==i.head?s:l))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?J.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection)||r.main.assoc!=n.state.selection.main.assoc&&this.dragging===!1)&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function LI(t,e){let n=t.state.facet(yE);return n.length?n[0](e):Te.mac?e.metaKey:e.ctrlKey}function jI(t,e){let n=t.state.facet(vE);return n.length?n[0](e):Te.mac?!e.altKey:!e.ctrlKey}function VI(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Dh(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function pb(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Qt.get(n))&&r.ignoreEvent(e))return!1;return!0}const an=Object.create(null),SO=Object.create(null),VE=Te.ie&&Te.ie_version<15||Te.ios&&Te.webkit_version<604;function BI(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),BE(t,n.value)},50)}function BE(t,e){let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(bO!=null&&n.selection.ranges.every(a=>a.empty)&&bO==o.toString()){let a=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==a)return{range:u};a=c.from;let f=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:f},range:J.cursor(u.from+f.length)}})}else s?r=n.changeByRange(a=>{let u=o.line(i++);return{changes:{from:a.from,to:a.to,insert:u.text},range:J.cursor(a.from+u.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}an.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now())};an.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};an.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};SO.touchstart=SO.touchmove={passive:!0};an.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let r of t.state.facet(SE))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=WI(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new NI(t,e,n,r)),r&&t.observer.ignore(()=>oE(t.contentDOM)),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(e)}};function gb(t,e,n,r){if(r==1)return J.cursor(e,n);if(r==2)return CI(t.state,e,n);{let i=Wn.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,l=i?i.posAtEnd:o.to;return l<t.state.doc.length&&l==o.to&&l++,J.range(s,l)}}let FE=(t,e)=>t>=e.top&&t<=e.bottom,mb=(t,e,n)=>FE(e,n)&&t>=n.left&&t<=n.right;function FI(t,e,n,r){let i=Wn.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&mb(n,r,s))return-1;let l=i.coordsAt(o,1);return l&&mb(n,r,l)?1:s&&FE(r,s)?-1:1}function Ob(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:FI(t,n,e.clientX,e.clientY)}}const XI=Te.ie&&Te.ie_version<=11;let yb=null,vb=0,Sb=0;function XE(t){if(!XI)return t.detail;let e=yb,n=Sb;return yb=t,Sb=Date.now(),vb=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(vb+1)%3:1}function WI(t,e){let n=Ob(t,e),r=XE(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,l){let a=Ob(t,o),u,c=gb(t,a.pos,a.bias,r);if(n.pos!=a.pos&&!s){let f=gb(t,n.pos,n.bias,r),h=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=h<c.from?J.range(h,d):J.range(d,h)}return s?i.replaceRange(i.main.extend(c.from,c.to)):l&&r==1&&i.ranges.length>1&&(u=UI(i,a.pos))?u:l?i.addRange(c):J.create([c])}}}function UI(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return J.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}an.dragstart=(t,e)=>{let{selection:{main:n}}=t.state,{mouseSelection:r}=t.inputState;r&&(r.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove")};function bb(t,e,n,r){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:o}=t.inputState,s=r&&o&&o.dragging&&jI(t,e)?{from:o.dragging.from,to:o.dragging.to}:null,l={from:i,insert:n},a=t.state.changes(s?[s,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(i,-1),head:a.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"})}an.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let n=e.dataTransfer.files;if(n&&n.length){e.preventDefault();let r=Array(n.length),i=0,o=()=>{++i==n.length&&bb(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let l=new FileReader;l.onerror=o,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[s]=l.result),o()},l.readAsText(n[s])}}else bb(t,e,e.dataTransfer.getData("Text"),!0)};an.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let n=VE?null:e.clipboardData;n?(BE(t,n.getData("text/plain")||n.getData("text/uri-text")),e.preventDefault()):BI(t)};function ZI(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function YI(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let bO=null;an.copy=an.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=YI(t.state);if(!n&&!i)return;bO=i?n:null;let o=VE?null:e.clipboardData;o?(e.preventDefault(),o.clearData(),o.setData("text/plain",n)):ZI(t,n),e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})};const WE=Di.define();function UE(t,e){let n=[];for(let r of t.facet(kE)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:WE.of(!0)}):null}function ZE(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=UE(t.state,e);n?t.dispatch(n):t.update([])}},10)}an.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ZE(t)};an.blur=t=>{t.observer.clearSelectionRange(),ZE(t)};an.compositionstart=an.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};an.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Te.chrome&&Te.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};an.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};an.beforeinput=(t,e)=>{var n;let r;if(Te.chrome&&Te.android&&(r=LE.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((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)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};const wb=["pre-wrap","normal","pre-line","break-spaces"];class zI{constructor(e){this.lineWrapping=e,this.doc=pt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return wb.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let l=wb.indexOf(e)>-1,a=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,a){this.heightSamples={};for(let u=0;u<s.length;u++){let c=s[u];c<0?u++:this.heightSamples[Math.floor(c*10)]=!0}}return a}}class qI{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class wi{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?Yt.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 Uo?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new wi(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Mt=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Mt||(Mt={}));const Yf=.001;class Yn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>Yf&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return Yn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:a,toA:u,fromB:c,toB:f}=i[l],h=o.lineAt(a,Mt.ByPosNoHeight,r.setDoc(n),0,0),d=h.to>=u?h:o.lineAt(u,Mt.ByPosNoHeight,r,0,0);for(f+=d.to-u,u=d.to;l>0&&h.from<=i[l-1].toA;)a=i[l-1].fromA,c=i[l-1].fromB,l--,a<h.from&&(h=o.lineAt(a,Mt.ByPosNoHeight,r,0,0));c+=h.from-a,a=h.from;let p=wv.build(r.setDoc(s),e,c,f);o=o.replace(a,u,p)}return o.updateHeight(r,0)}static empty(){return new dr(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(o>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,o-=l.size}else break;else if(i<o){let l=e[n++];l&&(i+=l.size)}else{let l=e[--r];l&&(o+=l.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new GI(Yn.of(e.slice(0,n)),s,Yn.of(e.slice(r)))}}Yn.prototype.size=1;class YE extends Yn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new wi(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class dr extends YE{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new wi(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof dr||i instanceof Pn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Pn?i=new dr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Yn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(e,i.heights[i.index++]):(r||this.outdated)&&this.setHeight(e,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 Pn extends Yn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,s,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*o);s=a/o,this.length>o+1&&(l=(this.height-a)/(this.length-o-1))}else s=this.height/o;return{firstLine:r,lastLine:i,perLine:s,perChar:l}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:l,perChar:a}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length),c=n.doc.lineAt(u),f=l+c.length*a,h=Math.max(r,e-f/2);return new wi(c.from,c.length,h,f,0)}else{let u=Math.max(0,Math.min(s-o,Math.floor((e-r)/l))),{from:c,length:f}=n.doc.line(o+u);return new wi(c,f,r+l*u,l,0)}}lineAt(e,n,r,i,o){if(n==Mt.ByHeight)return this.blockAt(e,r,i,o);if(n==Mt.ByPosNoHeight){let{from:d,to:p}=r.doc.lineAt(e);return new wi(d,p-d,0,0,0)}let{firstLine:s,perLine:l,perChar:a}=this.heightMetrics(r,o),u=r.doc.lineAt(e),c=l+u.length*a,f=u.number-s,h=i+l*f+a*(u.from-o-f);return new wi(u.from,u.length,Math.max(i,Math.min(h,i+this.height-c)),c,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:l,perLine:a,perChar:u}=this.heightMetrics(r,o);for(let c=e,f=i;c<=n;){let h=r.doc.lineAt(c);if(c==e){let p=h.number-l;f+=a*p+u*(e-o-p)}let d=a+u*h.length;s(new wi(h.from,h.length,f,d,0)),f+=d,c=h.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Pn?r[r.length-1]=new Pn(o.length+i):r.push(null,new Pn(i-1))}if(e>0){let o=r[0];o instanceof Pn?r[0]=new Pn(e+o.length):r.unshift(new Pn(e-1),null)}return Yn.of(r)}decomposeLeft(e,n){n.push(new Pn(e-1),null)}decomposeRight(e,n){n.push(null,new Pn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],l=Math.max(n,i.from),a=-1;for(i.from>n&&s.push(new Pn(i.from-n-1).updateHeight(e,n));l<=o&&i.more;){let c=e.doc.lineAt(l).length;s.length&&s.push(null);let f=i.heights[i.index++];a==-1?a=f:Math.abs(f-a)>=Yf&&(a=-2);let h=new dr(c,f);h.outdated=!1,s.push(h),l+=c+1}l<=o&&s.push(null,new Pn(o-l).updateHeight(e,l));let u=Yn.of(s);return(a<0||Math.abs(u.height-this.height)>=Yf||Math.abs(a-this.heightMetrics(e,n).perLine)>=Yf)&&(e.heightChanged=!0),u}else(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class GI extends Yn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,l=o+this.left.length+this.break,a=n==Mt.ByHeight?e<s:e<l,u=a?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,l);if(this.break||(a?u.to<l:u.from>l))return u;let c=n==Mt.ByPosNoHeight?Mt.ByPosNoHeight:Mt.ByPos;return a?u.join(this.right.lineAt(l,c,r,s,l)):this.left.lineAt(l,c,r,i,o).join(u)}forEachLine(e,n,r,i,o,s){let l=i+this.left.height,a=o+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,n,r,i,o,s),n>=a&&this.right.forEachLine(e,n,r,l,a,s);else{let u=this.lineAt(a,Mt.ByPos,r,i,o);e<u.from&&this.left.forEachLine(e,u.from-1,r,i,o,s),u.to>=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,l,a,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let l of r)o.push(l);if(e>0&&kb(o,s-1),n<this.length){let l=o.length;this.decomposeRight(n,o),kb(o,l)}return Yn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Yn.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:s}=this,l=n+o.length+this.break,a=null;return i&&i.from<=n+o.length&&i.more?a=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=l+s.length&&i.more?a=s=s.updateHeight(e,l,r,i):s.updateHeight(e,l,r),a?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function kb(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Pn&&(r=t[e+1])instanceof Pn&&t.splice(e-1,3,new Pn(n.length+1+r.length))}const HI=5;class wv{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof dr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new dr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new YE(s,i,r)):(s||o||i>=HI)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new dr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Pn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof dr)return e;let n=new dr(0,-1);return this.nodes.push(n),n}addBlock(e){var n;this.enterLine();let r=(n=e.deco)===null||n===void 0?void 0:n.type;r==Yt.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,r!=Yt.WidgetBefore&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof dr)&&!this.isCovered?this.nodes.push(new dr(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof dr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new wv(r,e);return Ot.spans(n,r,i,o,0),o.finish(r)}}function KI(t,e,n){let r=new JI;return Ot.compare(t,e,n,r,0),r.changes}class JI{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&dO(e,n,this.changes,5)}}function eN(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),l=Math.max(0,n.top),a=Math.min(i.innerHeight,n.bottom);for(let u=t.parentNode;u&&u!=r.body;)if(u.nodeType==1){let c=u,f=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let h=c.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),l=Math.max(l,h.top),a=u==t.parentNode?h.bottom:Math.min(a,h.bottom)}u=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function tN(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class ag{constructor(e,n,r){this.from=e,this.to=n,this.size=r}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e){return Ve.replace({widget:new nN(this.size,e)}).range(this.from,this.to)}}class nN extends oo{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Pb{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=!0,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=xb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ut.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(Sv).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new zI(n),this.stateDeco=e.facet($u).filter(r=>typeof r!="function"),this.heightMap=Yn.empty().applyChanges(this.stateDeco,pt.empty,this.heightOracle.setDoc(e.doc),[new Lr(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ve.set(this.lineGaps.map(r=>r.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new sf(o,s))}}this.viewports=e.sort((r,i)=>r.from-i.from),this.scaler=this.heightMap.height<=7e6?xb:new oN(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Va(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet($u).filter(c=>typeof c!="function");let i=e.changedRanges,o=Lr.extendWithRanges(i,KI(r,this.stateDeco,e?e.changes:hn.empty(this.state.doc.length))),s=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<a.from||n.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),u&&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(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(xE)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Ut.RTL:Ut.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),l=n.getBoundingClientRect(),a=s||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,c=0,f=parseInt(r.paddingTop)||0,h=parseInt(r.paddingBottom)||0;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8),this.scrollTop!=e.scrollDOM.scrollTop&&(this.scrollAnchorHeight=-1,this.scrollTop=e.scrollDOM.scrollTop),this.scrolledToBottom=lE(e.scrollDOM);let d=(this.printing?tN:eN)(n,this.paddingTop),p=d.top-this.pixelViewport.top,g=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(y!=this.inView&&(this.inView=y,y&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let O=l.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),a){let v=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(v)&&(s=!0),s||i.lineWrapping&&Math.abs(O-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:P,textHeight:E}=e.docView.measureTextSize();s=b>0&&i.refresh(o,b,P,E,O/P,v),s&&(e.docView.minWidth=0,u|=8)}p>0&&g>0?c=Math.max(p,g):p<0&&g<0&&(c=Math.min(p,g)),i.heightChanged=!1;for(let b of this.viewports){let P=b.from==this.viewport.from?v:e.docView.measureVisibleLineHeights(b);this.heightMap=(s?Yn.empty().applyChanges(this.stateDeco,pt.empty,this.heightOracle,[new Lr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new qI(b.from,P))}i.heightChanged&&(u|=2)}let m=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return m&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||m)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:l}=this,a=new sf(i.lineAt(s-r*1e3,Mt.ByHeight,o,0,0).from,i.lineAt(l+(1-r)*1e3,Mt.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(u<a.from||u>a.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(u,Mt.ByPos,o,0,0),h;n.y=="center"?h=(f.top+f.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u<a.from?h=f.top:h=f.bottom-c,a=new sf(i.lineAt(h-1e3/2,Mt.ByHeight,o,0,0).from,i.lineAt(h+c+1e3/2,Mt.ByHeight,o,0,0).to)}}return a}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new sf(this.heightMap.lineAt(r,Mt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Mt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Mt.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,Mt.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:l}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=l+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<l+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new ag(n.mapPos(i.from),n.mapPos(i.to),i.size));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=Ut.LTR&&!r)return[];let l=[],a=(u,c,f,h)=>{if(c-u<o)return;let d=this.state.selection.main,p=[d.from];d.empty||p.push(d.to);for(let y of p)if(y>u&&y<c){a(u,y-10,f,h),a(y+10,c,f,h);return}let g=iN(e,y=>y.from>=f.from&&y.to<=f.to&&Math.abs(y.from-u)<o&&Math.abs(y.to-c)<o&&!p.some(O=>y.from<O&&y.to>O));if(!g){if(c<f.to&&n&&r&&n.visibleRanges.some(y=>y.from<=c&&y.to>=c)){let y=n.moveToLineBoundary(J.cursor(c),!1,!0).head;y>u&&(c=y)}g=new ag(u,c,this.gapSize(f,u,c,h))}l.push(g)};for(let u of this.viewportLines){if(u.length<s)continue;let c=rN(u.from,u.to,this.stateDeco);if(c.total<s)continue;let f=this.scrollTarget?this.scrollTarget.range.head:null,h,d;if(r){let p=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,y;if(f!=null){let O=af(c,f),m=((this.visibleBottom-this.visibleTop)/2+p)/u.height;g=O-m,y=O+m}else g=(this.visibleTop-u.top-p)/u.height,y=(this.visibleBottom-u.top+p)/u.height;h=lf(c,g),d=lf(c,y)}else{let p=c.total*this.heightOracle.charWidth,g=i*this.heightOracle.charWidth,y,O;if(f!=null){let m=af(c,f),v=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/p;y=m-v,O=m+v}else y=(this.pixelViewport.left-g)/p,O=(this.pixelViewport.right+g)/p;h=lf(c,y),d=lf(c,O)}h>u.from&&a(u.from,h,u,c),d<u.to&&a(d,u.to,u,c)}return l}gapSize(e,n,r,i){let o=af(i,r)-af(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){ag.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ve.set(e.map(n=>n.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];Ot.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Va(this.heightMap.lineAt(e,Mt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Va(this.heightMap.lineAt(this.scaler.fromDOM(e),Mt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Va(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 sf{constructor(e,n){this.from=e,this.to=n}}function rN(t,e,n){let r=[],i=t,o=0;return Ot.spans(n,t,e,{span(){},point(s,l){s>i&&(r.push({from:i,to:s}),o+=s-i),i=l}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function lf({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],l=s-o;if(r<=l)return o+r;r-=l}}function af(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function iN(t,e){for(let n of t)if(e(n))return n}const xb={toDOM(t){return t},fromDOM(t){return t},scale:1};class oN{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:l,to:a})=>{let u=n.lineAt(l,Mt.ByPos,e,0,0).top,c=n.lineAt(a,Mt.ByPos,e,0,0).bottom;return i+=c-u,{from:l,to:a,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let l of this.viewports)l.domTop=s+(l.top-o)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),o=l.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}}function Va(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new wi(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Va(i,e)):t._content)}const uf=xe.define({combine:t=>t.join(" ")}),wO=xe.define({combine:t=>t.indexOf(!0)>-1}),kO=Fo.newName(),zE=Fo.newName(),qE=Fo.newName(),GE={"&light":"."+zE,"&dark":"."+qE};function PO(t,e,n){return new Fo(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const sN=PO("."+kO,{"&":{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},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&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",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&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},"&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-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"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".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"}},GE);class lN{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let l=o||s?[]:cN(e),a=new fE(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=fN(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=o&&o.node==l.focusNode&&o.offset==l.focusOffset||!lO(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),u=s&&s.node==l.anchorNode&&s.offset==l.anchorOffset||!lO(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=J.single(u,a)}}}function HE(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:l}=e.bounds,a=i.from,u=null;(o===8||Te.android&&e.text.length<l-s)&&(a=i.to,u="end");let c=uN(t.state.doc.sliceString(s,l,fl),e.text,a-s,u);c&&(Te.chrome&&o==13&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==fl+fl&&c.toB--,n={from:s+c.from,to:s+c.toA,insert:pt.of(e.text.slice(c.from,c.toB).split(fl))})}else r&&(!t.hasFocus&&t.state.facet(Ld)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(Te.mac||Te.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=J.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:pt.of([" "])}):Te.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
|
73
|
+
`&&t.lineWrapping&&(r&&(r=J.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:pt.of([" "])}),n){if(Te.ios&&t.inputState.flushIOSKey(t)||Te.android&&(n.from==i.from&&n.to==i.to&&n.insert.length==1&&n.insert.lines==2&&kl(t.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&n.insert.length==0||o==8&&n.insert.length<n.to-n.from)&&kl(t.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&n.insert.length==0&&kl(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l,a=()=>l||(l=aN(t,n,r));return t.state.facet(wE).some(u=>u(t,n.from,n.to,s,a))||t.dispatch(a()),!0}else if(r&&!r.main.eq(i)){let s=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),l=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:l}),!0}else return!1}function aN(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=o.from<e.from?i.sliceDoc(o.from,e.from):"",a=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let l=i.changes(e),a=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c=ME(t)||t.state.doc.lineAt(o.head),f=o.to-e.to,h=o.to-o.from;r=i.changeByRange(d=>{if(d.from==o.from&&d.to==o.to)return{changes:l,range:a||d.map(l)};let p=d.to-f,g=p-u.length;if(d.to-d.from!=h||t.state.sliceDoc(g,p)!=u||c&&d.to>=c.from&&d.from<=c.to)return{range:d};let y=i.changes({from:g,to:p,insert:e.insert}),O=d.to-o.to;return{changes:y,range:a?J.range(Math.max(0,a.anchor+O),Math.max(0,a.head+O)):d.map(y)}})}else r={changes:l,selection:a&&i.selection.replaceRange(a)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function uN(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,l=e.length;for(;s>0&&l>0&&t.charCodeAt(s-1)==e.charCodeAt(l-1);)s--,l--;if(r=="end"){let a=Math.max(0,o-Math.min(s,l));n-=s+a-o}if(s<o&&t.length<e.length){let a=n<=o&&n>=s?o-n:0;o-=a,l=o+(l-s),s=o}else if(l<o){let a=n<=o&&n>=l?o-n:0;o-=a,s=o+(s-l),l=o}return{from:o,toA:s,toB:l}}function cN(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new JS(n,r)),(i!=n||o!=r)&&e.push(new JS(i,o))),e}function fN(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?J.single(n+e,r+e):null}const hN={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},ug=Te.ie&&Te.ie_version<=11;class dN{constructor(e){this.view=e,this.active=!1,this.selectionRange=new nI,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.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Te.ie&&Te.ie_version<=11||Te.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),ug&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM),this.resizeContent=new ResizeObserver(()=>this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Ld)?r.root.activeElement!=this.dom:!Uf(r.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Te.ie&&Te.ie_version<=11||Te.android&&Te.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Mh(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Te.safari&&e.root.nodeType==11&&KM(this.dom.ownerDocument)==this.dom&&pN(this.view)||Dh(e.root);if(!n||this.selectionRange.eq(n))return!1;let r=Uf(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&iI(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.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,hN),ug&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),ug&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&kl(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Uf(this.dom,this.selectionRange);return e<0&&!i?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new lN(this.view,e,n,r))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return!1;let r=this.view.state,i=HE(this.view,n);return this.view.state==r&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=Cb(n,e.previousSibling||e.target.previousSibling,-1),i=Cb(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),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),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,r,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect(),(i=this.resizeContent)===null||i===void 0||i.disconnect();for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Cb(t,e,n){for(;e;){let r=Qt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function pN(t){let e=null;function n(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let r=e.startContainer,i=e.startOffset,o=e.endContainer,s=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);return Mh(l.node,l.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}class Se{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.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){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.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(r=>r.forEach(i=>n(i,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||rI(e.parent)||document,this.viewState=new Pb(e.state||ct.create(e)),this.plugins=this.state.facet(La).map(r=>new og(r));for(let r of this.plugins)r.update(this);this.observer=new dN(this),this.inputState=new DI(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new lb(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof gn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let h of e){if(h.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=h.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,l=0,a=null;e.some(h=>h.annotation(WE))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=UE(o,s),a||(l=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(ct.phrases)!=this.state.facet(ct.phrases))return this.setState(o);i=Lh.create(this,o,e),i.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:d}=h.state.selection;f=new Nh(d.empty?d:J.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of h.effects)d.is(ob)&&(f=d.value)}this.viewState.update(i,f),this.bidiCache=jh.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(ja)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(uf)!=i.state.facet(uf)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty)for(let h of this.state.facet(pO))h(i);(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!HE(this,c)&&u.force&&kl(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Pb(e),this.plugins=e.facet(La).map(r=>new og(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView=new lb(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(La),r=e.state.facet(La);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new og(o));else{let l=this.plugins[s];l.mustUpdate=e,i.push(l)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this)}measure(e=!0){if(this.destroyed)return;this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,{scrollTop:i}=r,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;i!=this.viewState.scrollTop&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(lE(r))o=-1,s=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);o=d.from,s=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];a&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(d=>{try{return d.read(this)}catch(p){return vr(this.state,p),Eb}}),f=Lh.create(this,this.state,[]),h=!1;f.flags|=a,n?n.flags|=a:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f));for(let d=0;d<u.length;d++)if(c[d]!=Eb)try{let p=u[d];p.write&&p.write(c[d],this)}catch(p){vr(this.state,p)}if(h&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}else{let p=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(p>1||p<-1){i=r.scrollTop=i+p,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(pO))l(n)}get themeClasses(){return kO+" "+(this.state.facet(wO)?qE:zE)+" "+this.state.facet(uf)}updateAttrs(){let e=Qb(this,CE,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Ld)?"true":"false",class:"cm-content",style:`${Te.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Qb(this,Sv,n);let r=this.observer.ignore(()=>{let i=hO(this.contentDOM,this.contentAttrs,n),o=hO(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(Se.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ja);let e=this.state.facet(Se.cspNonce);Fo.mount(this.root,this.styleModules.concat(sN).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.spec!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return lg(this,e,db(this,e,n,r))}moveByGroup(e,n){return lg(this,e,db(this,e,n,r=>AI(this,e.head,r)))}moveToLineBoundary(e,n,r=!0){return TI(this,e,n,r)}moveVertically(e,n,r){return lg(this,e,RI(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),NE(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[Qo.find(o,e-i.from,-1,n)];return Ov(r,s.dir==Ut.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(PE)||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>gN)return RE(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||AE(o.isolates,r=sb(this,e.from,e.to))))return o.order;r||(r=sb(this,e.from,e.to));let i=yI(e.text,n,r);return this.bidiCache.push(new jh(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Te.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{oE(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(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return ob.of(new Nh(typeof e=="number"?J.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return qt.define(()=>({}),{eventHandlers:e})}static theme(e,n){let r=Fo.newName(),i=[uf.of(r),ja.of(PO(`.${r}`,e))];return n&&n.dark&&i.push(wO.of(!0)),i}static baseTheme(e){return Ho.lowest(ja.of(PO("."+kO,e,GE)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&Qt.get(r)||Qt.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}Se.styleModule=ja;Se.inputHandler=wE;Se.focusChangeEffect=kE;Se.perLineTextDirection=PE;Se.exceptionSink=bE;Se.updateListener=pO;Se.editable=Ld;Se.mouseSelectionStyle=SE;Se.dragMovesSelection=vE;Se.clickAddsSelectionRange=yE;Se.decorations=$u;Se.atomicRanges=bv;Se.bidiIsolatedRanges=EE;Se.scrollMargins=QE;Se.darkTheme=wO;Se.cspNonce=xe.define({combine:t=>t.length?t[0]:""});Se.contentAttributes=Sv;Se.editorAttributes=CE;Se.lineWrapping=Se.contentAttributes.of({class:"cm-lineWrapping"});Se.announce=tt.define();const gN=4096,Eb={};class jh{constructor(e,n,r,i,o,s){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Ut.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new jh(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}}function Qb(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&fO(s,n)}return n}const mN=Te.mac?"mac":Te.windows?"win":Te.linux?"linux":"key";function ON(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,l;for(let a=0;a<n.length-1;++a){const u=n[a];if(/^(cmd|meta|m)$/i.test(u))l=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))o=!0;else if(/^s(hift)?$/i.test(u))s=!0;else if(/^mod$/i.test(u))e=="mac"?l=!0:o=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),l&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function cf(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const yN=Ho.default(Se.domEventHandlers({keydown(t,e){return JE(KE(e.state),t,e,"editor")}})),ic=xe.define({enables:yN}),_b=new WeakMap;function KE(t){let e=t.facet(ic),n=_b.get(e);return n||_b.set(e,n=bN(e.reduce((r,i)=>r.concat(i),[]))),n}function vN(t,e,n){return JE(KE(t.state),e,t,n)}let bo=null;const SN=4e3;function bN(t,e=mN){let n=Object.create(null),r=Object.create(null),i=(s,l)=>{let a=r[s];if(a==null)r[s]=l;else if(a!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,l,a,u,c)=>{var f,h;let d=n[s]||(n[s]=Object.create(null)),p=l.split(/ (?!$)/).map(O=>ON(O,e));for(let O=1;O<p.length;O++){let m=p.slice(0,O).join(" ");i(m,!0),d[m]||(d[m]={preventDefault:!0,stopPropagation:!1,run:[v=>{let b=bo={view:v,prefix:m,scope:s};return setTimeout(()=>{bo==b&&(bo=null)},SN),!0}]})}let g=p.join(" ");i(g,!1);let y=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((h=(f=d._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});a&&y.run.push(a),u&&(y.preventDefault=!0),c&&(y.stopPropagation=!0)};for(let s of t){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of l){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let f in c)c[f].run.push(s.any)}let a=s[e]||s.key;if(a)for(let u of l)o(u,a,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(u,"Shift-"+a,s.shift,s.preventDefault,s.stopPropagation)}return n}function JE(t,e,n,r){let i=HM(e),o=Cn(i,0),s=Ar(o)==i.length&&i!=" ",l="",a=!1,u=!1,c=!1;bo&&bo.view==n&&bo.scope==r&&(l=bo.prefix+" ",jE.indexOf(e.keyCode)<0&&(u=!0,bo=null));let f=new Set,h=y=>{if(y){for(let O of y.run)if(!f.has(O)&&(f.add(O),O(n,e)))return y.stopPropagation&&(c=!0),!0;y.preventDefault&&(y.stopPropagation&&(c=!0),u=!0)}return!1},d=t[r],p,g;return d&&(h(d[l+cf(i,e,!s)])?a=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Te.windows&&e.ctrlKey&&e.altKey)&&(p=Xo[e.keyCode])&&p!=i?(h(d[l+cf(p,e,!0)])||e.shiftKey&&(g=Qu[e.keyCode])!=i&&g!=p&&h(d[l+cf(g,e,!1)]))&&(a=!0):s&&e.shiftKey&&h(d[l+cf(i,e,!0)])&&(a=!0),!a&&h(d._any)&&(a=!0)),u&&(a=!0),a&&c&&e.stopPropagation(),a}class oc{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=eQ(e);return[new oc(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return wN(e,n,r)}}function eQ(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ut.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function $b(t,e,n){let r=J.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(r,!0,!0).from),type:Yt.Text}}function wN(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==Ut.LTR,s=t.contentDOM,l=s.getBoundingClientRect(),a=eQ(t),u=s.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=l.right-(c?parseInt(c.paddingRight):0),d=vO(t,r),p=vO(t,i),g=d.type==Yt.Text?d:null,y=p.type==Yt.Text?p:null;if(g&&(t.lineWrapping||d.widgetLineBreaks)&&(g=$b(t,r,g)),y&&(t.lineWrapping||p.widgetLineBreaks)&&(y=$b(t,i,y)),g&&y&&g.from==y.from)return m(v(n.from,n.to,g));{let P=g?v(n.from,null,g):b(d,!1),E=y?v(null,n.to,y):b(p,!0),T=[];return(g||d).to<(y||p).from-(g&&y?1:0)||d.widgetLineBreaks>1&&P.bottom+t.defaultLineHeight/2<E.top?T.push(O(f,P.bottom,h,E.top)):P.bottom<E.top&&t.elementAtHeight((P.bottom+E.top)/2).type==Yt.Text&&(P.bottom=E.top=(P.bottom+E.top)/2),m(P).concat(T).concat(m(E))}function O(P,E,T,w){return new oc(e,P-a.left,E-a.top-.01,T-P,w-E+.01)}function m({top:P,bottom:E,horizontal:T}){let w=[];for(let k=0;k<T.length;k+=2)w.push(O(T[k],P,T[k+1],E));return w}function v(P,E,T){let w=1e9,k=-1e9,C=[];function Q(V,G,D,N,A){let F=t.coordsAtPos(V,V==T.to?-2:2),Y=t.coordsAtPos(D,D==T.from?2:-2);!F||!Y||(w=Math.min(F.top,Y.top,w),k=Math.max(F.bottom,Y.bottom,k),A==Ut.LTR?C.push(o&&G?f:F.left,o&&N?h:Y.right):C.push(!o&&N?f:Y.left,!o&&G?h:F.right))}let M=P??T.from,L=E??T.to;for(let V of t.visibleRanges)if(V.to>M&&V.from<L)for(let G=Math.max(V.from,M),D=Math.min(V.to,L);;){let N=t.state.doc.lineAt(G);for(let A of t.bidiSpans(N)){let F=A.from+N.from,Y=A.to+N.from;if(F>=D)break;Y>G&&Q(Math.max(F,G),P==null&&F<=M,Math.min(Y,D),E==null&&Y>=L,A.dir)}if(G=N.to+1,G>=D)break}return C.length==0&&Q(M,P==null,L,E==null,t.textDirection),{top:w,bottom:k,horizontal:C}}function b(P,E){let T=l.top+(E?P.top:P.bottom);return{top:T,bottom:T,horizontal:[]}}}function kN(t,e){return t.constructor==e.constructor&&t.eq(e)}class PN{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(zf)!=e.state.facet(zf)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(zf);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!kN(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const zf=xe.define();function tQ(t){return[qt.define(e=>new PN(e,t)),zf.of(t)]}const nQ=!Te.ios,Au=xe.define({combine(t){return Mi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function xN(t={}){return[Au.of(t),CN,EN,QN,xE.of(!0)]}function rQ(t){return t.startState.facet(Au)!=t.state.facet(Au)}const CN=tQ({above:!0,markers(t){let{state:e}=t,n=e.facet(Au),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||nQ:n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=i.empty?i:J.cursor(i.head,i.head>i.anchor?-1:1);for(let a of oc.forRange(t,s,l))r.push(a)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=rQ(t);return n&&Tb(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Tb(e.state,t)},class:"cm-cursorLayer"});function Tb(t,e){e.style.animationDuration=t.facet(Au).cursorBlinkRate+"ms"}const EN=tQ({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:oc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||rQ(t)},class:"cm-selectionLayer"}),iQ={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};nQ&&(iQ[".cm-line"].caretColor="transparent !important");const QN=Ho.highest(Se.theme(iQ)),oQ=tt.define({map(t,e){return t==null?null:e.mapPos(t)}}),Ba=On.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(oQ)?r.value:n,t)}}),_N=qt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Ba);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Ba)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field(Ba),e=t!=null&&this.view.coordsAtPos(t);if(!e)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-n.left+this.view.scrollDOM.scrollLeft,top:e.top-n.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Ba)!=t&&this.view.dispatch({effects:oQ.of(t)})}},{eventHandlers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function $N(){return[Ba,_N]}function Ab(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,l;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;l=e.exec(o.value);)i(s+l.index,l)}function TN(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class AN{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(l,a,u,c)=>i(c,u,u+l[0].length,l,a);else if(typeof r=="function")this.addMatch=(l,a,u,c)=>{let f=r(l,a,u);f&&c(u,u+l[0].length,f)};else if(r)this.addMatch=(l,a,u,c)=>c(u,u+l[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new Bo,r=n.add.bind(n);for(let{from:i,to:o}of TN(e,this.maxLength))Ab(e.state.doc,this.regexp,i,o,(s,l)=>this.addMatch(l,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,l,a)=>{a>e.view.viewport.from&&l<e.view.viewport.to&&(r=Math.min(l,r),i=Math.max(a,i))}),e.viewportChanged||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let s=Math.max(o.from,r),l=Math.min(o.to,i);if(l>s){let a=e.state.doc.lineAt(s),u=a.to<l?e.state.doc.lineAt(l):a,c=Math.max(o.from,a.from),f=Math.min(o.to,u.to);if(this.boundary){for(;s>a.from;s--)if(this.boundary.test(a.text[s-1-a.from])){c=s;break}for(;l<u.to;l++)if(this.boundary.test(u.text[l-u.from])){f=l;break}}let h=[],d,p=(g,y,O)=>h.push(O.range(g,y));if(a==u)for(this.regexp.lastIndex=c-a.from;(d=this.regexp.exec(a.text))&&d.index<f-a.from;)this.addMatch(d,e,d.index+a.from,p);else Ab(e.state.doc,this.regexp,c,f,(g,y)=>this.addMatch(y,e,g,p));n=n.update({filterFrom:c,filterTo:f,filter:(g,y)=>g<c||y>f,add:h})}}return n}}const xO=/x/.unicode!=null?"gu":"g",RN=new RegExp(`[\0-\b
|
|
74
|
+
--\u2028\u2029\uFEFF-]`,xO),DN={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 cg=null;function MN(){var t;if(cg==null&&typeof document<"u"&&document.body){let e=document.body.style;cg=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return cg||!1}const qf=xe.define({combine(t){let e=Mi(t,{render:null,specialChars:RN,addSpecialChars:null});return(e.replaceTabs=!MN())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,xO)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,xO)),e}});function IN(t={}){return[qf.of(t),NN()]}let Rb=null;function NN(){return Rb||(Rb=qt.fromClass(class{constructor(t){this.view=t,this.decorations=Ve.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(qf)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new AN({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Cn(e[0],0);if(o==9){let s=i.lineAt(r),l=n.state.tabSize,a=tc(s.text,l,r-s.from);return Ve.replace({widget:new BN((l-a%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[o]||(this.decorationCache[o]=Ve.replace({widget:new VN(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(qf);t.startState.facet(qf)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const LN="•";function jN(t){return t>=32?LN:t==10?"":String.fromCharCode(9216+t)}class VN extends oo{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=jN(this.code),r=e.state.phrase("Control character")+" "+(DN[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class BN extends oo{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 FN(){return WN}const XN=Ve.line({class:"cm-activeLine"}),WN=qt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(XN.range(i.from)),e=i.from)}return Ve.set(n)}},{decorations:t=>t.decorations}),CO=2e3;function UN(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>CO||n.off>CO||e.col<0||n.col<0){let s=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=r;a<=i;a++){let u=t.doc.line(a);u.length<=l&&o.push(J.range(u.from+s,u.to+l))}}else{let s=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=r;a<=i;a++){let u=t.doc.line(a),c=iO(u.text,s,t.tabSize,!0);if(c<0)o.push(J.cursor(u.to));else{let f=iO(u.text,l,t.tabSize);o.push(J.range(u.from+c,u.from+f))}}}return o}function ZN(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Db(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>CO?-1:i==r.length?ZN(t,e.clientX):tc(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function YN(t,e){let n=Db(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let l=Db(t,i);if(!l)return r;let a=UN(t.state,n,l);return a.length?s?J.create(a.concat(r.ranges)):J.create(a):r}}:null}function zN(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return Se.mouseSelectionStyle.of((n,r)=>e(r)?YN(n,r):null)}const qN={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},GN={style:"cursor: crosshair"};function HN(t={}){let[e,n]=qN[t.key||"Alt"],r=qt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventHandlers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,Se.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?GN:null})]}const ff="-10000px";class sQ{constructor(e,n,r){this.facet=n,this.createTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(i=>i),this.tooltipViews=this.tooltips.map(r)}update(e){var n;let r=e.state.facet(this.facet),i=r.filter(s=>s);if(r===this.input){for(let s of this.tooltipViews)s.update&&s.update(e);return!1}let o=[];for(let s=0;s<i.length;s++){let l=i[s],a=-1;if(l){for(let u=0;u<this.tooltips.length;u++){let c=this.tooltips[u];c&&c.create==l.create&&(a=u)}if(a<0)o[s]=this.createTooltipView(l);else{let u=o[s]=this.tooltipViews[a];u.update&&u.update(e)}}}for(let s of this.tooltipViews)o.indexOf(s)<0&&(s.dom.remove(),(n=s.destroy)===null||n===void 0||n.call(s));return this.input=r,this.tooltips=i,this.tooltipViews=o,!0}}function KN(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const fg=xe.define({combine:t=>{var e,n,r;return{position:Te.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||KN}}}),Mb=new WeakMap,lQ=qt.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(fg);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new sQ(t,kv,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(fg);if(r.position!=this.position){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=ff,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((e,n)=>{let r=this.manager.tooltipViews[n];return r.getCoords?r.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(fg).tooltipSpace(this.view)}}writeMeasure(t){var e;let{editor:n,space:r}=t,i=[];for(let o=0;o<this.manager.tooltips.length;o++){let s=this.manager.tooltips[o],l=this.manager.tooltipViews[o],{dom:a}=l,u=t.pos[o],c=t.size[o];if(!u||u.bottom<=Math.max(n.top,r.top)||u.top>=Math.min(n.bottom,r.bottom)||u.right<Math.max(n.left,r.left)-.1||u.left>Math.min(n.right,r.right)+.1){a.style.top=ff;continue}let f=s.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,h=f?7:0,d=c.right-c.left,p=(e=Mb.get(l))!==null&&e!==void 0?e:c.bottom-c.top,g=l.offset||e5,y=this.view.textDirection==Ut.LTR,O=c.width>r.right-r.left?y?r.left:r.right-c.width:y?Math.min(u.left-(f?14:0)+g.x,r.right-d):Math.max(r.left,u.left-d+(f?14:0)-g.x),m=!!s.above;!s.strictSide&&(m?u.top-(c.bottom-c.top)-g.y<r.top:u.bottom+(c.bottom-c.top)+g.y>r.bottom)&&m==r.bottom-u.bottom>u.top-r.top&&(m=!m);let v=(m?u.top-r.top:r.bottom-u.bottom)-h;if(v<p&&l.resize!==!1){if(v<this.view.defaultLineHeight){a.style.top=ff;continue}Mb.set(l,p),a.style.height=(p=v)+"px"}else a.style.height&&(a.style.height="");let b=m?u.top-p-h-g.y:u.bottom+h+g.y,P=O+d;if(l.overlap!==!0)for(let E of i)E.left<P&&E.right>O&&E.top<b+p&&E.bottom>b&&(b=m?E.top-p-2-h:E.bottom+h+2);this.position=="absolute"?(a.style.top=b-t.parent.top+"px",a.style.left=O-t.parent.left+"px"):(a.style.top=b+"px",a.style.left=O+"px"),f&&(f.style.left=`${u.left+(y?g.x:-g.x)-(O+14-7)}px`),l.overlap!==!0&&i.push({left:O,top:b,right:P,bottom:b+p}),a.classList.toggle("cm-tooltip-above",m),a.classList.toggle("cm-tooltip-below",!m),l.positioned&&l.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=ff}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),JN=Se.baseTheme({".cm-tooltip":{zIndex:100,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:`${7*2}px`,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"}}}),e5={x:0,y:0},kv=xe.define({enables:[lQ,JN]}),Vh=xe.define();class Pv{static create(e){return new Pv(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new sQ(e,Vh,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}}const t5=kv.compute([Vh],t=>{let e=t.facet(Vh).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:Pv.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class n5{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,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)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Eo)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let l=e.coordsAtPos(i);if(!l||n.y<l.top||n.y>l.bottom||n.x<l.left-e.defaultCharacterWidth||n.x>l.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=a&&a.dir==Ut.RTL?-1:1;o=n.x<l.left?-u:u}let s=this.source(e,i,o);if(s!=null&&s.then){let l=this.pending={pos:i};s.then(a=>{this.pending==l&&(this.pending=null,a&&e.dispatch({effects:this.setHover.of(a)}))},a=>vr(e.state,a,"hover tooltip"))}else s&&e.dispatch({effects:this.setHover.of(s)})}mousemove(e){var 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 r=this.active;if(r&&!Ib(this.lastMove.target)||this.pending){let{pos:i}=r||this.pending,o=(n=r==null?void 0:r.end)!==null&&n!==void 0?n:i;(i==o?this.view.posAtCoords(this.lastMove)!=i:!r5(this.view,i,o,e.clientX,e.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!Ib(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Ib(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function r5(t,e,n,r,i,o){let s=document.createRange(),l=t.domAtPos(e),a=t.domAtPos(n);s.setEnd(a.node,a.offset),s.setStart(l.node,l.offset);let u=s.getClientRects();s.detach();for(let c=0;c<u.length;c++){let f=u[c];if(Math.max(f.top-i,i-f.bottom,f.left-r,r-f.right)<=o)return!0}return!1}function i5(t,e={}){let n=tt.define(),r=On.define({create(){return null},update(i,o){if(i&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,i)))return null;if(i&&o.docChanged){let s=o.changes.mapPos(i.pos,-1,dn.TrackDel);if(s==null)return null;let l=Object.assign(Object.create(null),i);l.pos=s,i.end!=null&&(l.end=o.changes.mapPos(i.end)),i=l}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(o5)&&(i=null);return i},provide:i=>Vh.from(i)});return[r,qt.define(i=>new n5(i,t,r,n,e.hoverTime||300)),t5]}function aQ(t,e){let n=t.plugin(lQ);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const o5=tt.define(),Nb=xe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Ru(t,e){let n=t.plugin(uQ),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const uQ=qt.fromClass(class{constructor(t){this.input=t.state.facet(Du),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Nb);this.top=new hf(t,!0,e.topContainer),this.bottom=new hf(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Nb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new hf(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new hf(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Du);if(n!=this.input){let r=n.filter(a=>a),i=[],o=[],s=[],l=[];for(let a of r){let u=this.specs.indexOf(a),c;u<0?(c=a(t.view),l.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?o:s).push(c)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(s);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Se.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class hf{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Lb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Lb(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 Lb(t){let e=t.nextSibling;return t.remove(),e}const Du=xe.define({enables:uQ});class no extends Es{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}no.prototype.elementClass="";no.prototype.toDOM=void 0;no.prototype.mapMode=dn.TrackBefore;no.prototype.startSide=no.prototype.endSide=-1;no.prototype.point=!0;const Gf=xe.define(),s5={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ot.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},ou=xe.define();function l5(t){return[cQ(),ou.of(Object.assign(Object.assign({},s5),t))]}const EO=xe.define({combine:t=>t.some(e=>e)});function cQ(t){let e=[a5];return t&&t.fixed===!1&&e.push(EO.of(!0)),e}const a5=qt.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(ou).map(e=>new Vb(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(EO),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(EO)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Ot.iter(this.view.state.facet(Gf),this.view.viewport.from),r=[],i=this.gutters.map(o=>new u5(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let l of o.type)if(l.type==Yt.Text&&s){QO(n,r,l.from);for(let a of i)a.line(this.view,l,r);s=!1}else if(l.widget)for(let a of i)a.widget(this.view,l)}else if(o.type==Yt.Text){QO(n,r,o.from);for(let s of i)s.line(this.view,o,r)}for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(ou),n=t.state.facet(ou),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ot.eq(t.startState.facet(Gf),t.state.facet(Gf),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new Vb(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Se.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Ut.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}})});function jb(t){return Array.isArray(t)?t:[t]}function QO(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class u5{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ot.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=n.top-this.height;if(this.i==i.elements.length){let s=new fQ(e,n.height,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,n.height,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];QO(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n);r&&this.addElement(e,n,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Vb{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let a=o.getBoundingClientRect();s=(a.top+a.bottom)/2}else s=i.clientY;let l=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=jb(n.markers(e)),n.initialSpacer&&(this.spacer=new fQ(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=jb(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ot.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class fQ{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),c5(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let l=s,a=o<n.length?n[o++]:null,u=!1;if(a){let c=a.elementClass;c&&(r+=" "+c);for(let f=s;f<this.markers.length;f++)if(this.markers[f].compare(a)){l=f,u=!0;break}}else l=this.markers.length;for(;s<l;){let c=this.markers[s++];if(c.toDOM){c.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!a)break;a.toDOM&&(u?i=i.nextSibling:this.dom.insertBefore(a.toDOM(e),i)),u&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function c5(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const f5=xe.define(),hl=xe.define({combine(t){return Mi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(l,a,u)=>o(l,a,u)||s(l,a,u):s}return r}})}});class hg extends no{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function dg(t,e){return t.state.facet(hl).formatNumber(e,t.state)}const h5=ou.compute([hl],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(f5)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new hg(dg(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(hl)!=e.state.facet(hl),initialSpacer(e){return new hg(dg(e,Bb(e.state.doc.lines)))},updateSpacer(e,n){let r=dg(n.view,Bb(n.view.state.doc.lines));return r==e.number?e:new hg(r)},domEventHandlers:t.facet(hl).domEventHandlers}));function d5(t={}){return[hl.of(t),cQ(),h5]}function Bb(t){let e=9;for(;e<t;)e=e*10+9;return e}const p5=new class extends no{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},g5=Gf.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(p5.range(i)))}return Ot.of(e)});function m5(){return g5}const hQ=1024;let O5=0;class Dr{constructor(e,n){this.from=e,this.to=n}}class qe{constructor(e={}){this.id=O5++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=mn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}qe.closedBy=new qe({deserialize:t=>t.split(" ")});qe.openedBy=new qe({deserialize:t=>t.split(" ")});qe.group=new qe({deserialize:t=>t.split(" ")});qe.contextHash=new qe({perNode:!0});qe.lookAhead=new qe({perNode:!0});qe.mounted=new qe({perNode:!0});class y5{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}}const v5=Object.create(null);class mn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):v5,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new mn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(qe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(qe.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}mn.none=new mn("",Object.create(null),0,8);class sc{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new mn(r.name,i,r.id,r.flags):r)}return new sc(n)}}const df=new WeakMap,Fb=new WeakMap;var It;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(It||(It={}));class vt{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,l]of o)this.props[typeof s=="number"?s:s.id]=l}}toString(){let e=this.prop(qe.mounted);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Mu(this.topNode,e)}cursorAt(e,n=0,r=0){let i=df.get(this)||this.topNode,o=new Mu(i);return o.moveTo(e,n),df.set(this,o._tree),o}get topNode(){return new jr(this,0,0,null)}resolve(e,n=0){let r=jl(df.get(this)||this.topNode,e,n,!1);return df.set(this,r),r}resolveInner(e,n=0){let r=jl(Fb.get(this)||this.topNode,e,n,!0);return Fb.set(this,r),r}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e;for(let s=this.cursor((e.mode||0)|It.IncludeAnonymous);;){let l=!1;if(s.from<=o&&s.to>=i&&(s.type.isAnonymous||n(s)!==!1)){if(s.firstChild())continue;l=!0}for(;l&&r&&!s.type.isAnonymous&&r(s),!s.nextSibling();){if(!s.parent())return;l=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Ev(mn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new vt(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new vt(mn.none,n,r,i)))}static build(e){return b5(e)}}vt.empty=new vt(mn.none,[],[],0);class xv{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new xv(this.buffer,this.index)}}class Rs{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return mn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,l=-1;for(let a=e;a!=n&&!(dQ(o,i,s[a+1],s[a+2])&&(l=a,r>0));a=s[a+3]);return l}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let l=e,a=0;l<n;){o[a++]=i[l++],o[a++]=i[l++]-r;let u=o[a++]=i[l++]-r;o[a++]=i[l++]-e,s=Math.max(s,u)}return new Rs(o,s,this.set)}}function dQ(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function pQ(t,e){let n=t.childBefore(e);for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(t=n,n=r.prevSibling):n=r}return t}function jl(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof jr&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:It.IgnoreOverlays;if(r)for(let s=t,l=s.parent;l;s=l,l=s.parent)s instanceof jr&&s.index<0&&((i=l.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=l);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class jr{constructor(e,n,r,i){this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:l,positions:a}=s._tree,u=n>0?l.length:-1;e!=u;e+=n){let c=l[e],f=a[e]+s.from;if(dQ(i,r,f,f+c.length)){if(c instanceof Rs){if(o&It.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,n,r-f,i);if(h>-1)return new Pi(new S5(s,c,e,f),null,h)}else if(o&It.IncludeAnonymous||!c.type.isAnonymous||Cv(c)){let h;if(!(o&It.IgnoreMounts)&&c.props&&(h=c.prop(qe.mounted))&&!h.overlay)return new jr(h.tree,f,e,s);let d=new jr(c,f,e,s);return o&It.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(o&It.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))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)}enter(e,n,r=0){let i;if(!(r&It.IgnoreOverlays)&&(i=this._tree.prop(qe.mounted))&&i.overlay){let o=e-this.from;for(let{from:s,to:l}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?l>=o:l>o))return new jr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}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}cursor(e=0){return new Mu(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,n=0){return jl(this,e,n,!1)}resolveInner(e,n=0){return jl(this,e,n,!0)}enterUnfinishedNodesBefore(e){return pQ(this,e)}getChild(e,n=null,r=null){let i=Bh(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Bh(this,e,n,r)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return Fh(this,e)}}function Bh(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(;!i.type.is(n);)if(!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function Fh(t,e,n=e.length-1){for(let r=t.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class S5{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Pi{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Pi(this.context,this,o)}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)}enter(e,n,r=0){if(r&It.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Pi(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Pi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Pi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}cursor(e=0){return new Mu(this,e)}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new vt(this.type,e,n,this.to-this.from)}resolve(e,n=0){return jl(this,e,n,!1)}resolveInner(e,n=0){return jl(this,e,n,!0)}enterUnfinishedNodesBefore(e){return pQ(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,n=null,r=null){let i=Bh(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Bh(this,e,n,r)}get node(){return this}matchContext(e){return Fh(this,e)}}class Mu{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof jr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof jr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&It.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&It.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&It.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let l=r._tree.children[o];if(this.mode&It.IncludeAnonymous||l instanceof Rs||!l.type.isAnonymous||Cv(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new Pi(this.buffer,n,this.stack[i]);return this.bufferNode=new Pi(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;i&&n&&n(this),i=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return Fh(this.node,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return Fh(this.node,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function Cv(t){return t.children.some(e=>e instanceof Rs||!e.type.isAnonymous||Cv(e))}function b5(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=hQ,reused:o=[],minRepeatType:s=r.types.length}=t,l=Array.isArray(n)?new xv(n,n.length):n,a=r.types,u=0,c=0;function f(b,P,E,T,w){let{id:k,start:C,end:Q,size:M}=l,L=c;for(;M<0;)if(l.next(),M==-1){let A=o[k];E.push(A),T.push(C-b);return}else if(M==-3){u=k;return}else if(M==-4){c=k;return}else throw new RangeError(`Unrecognized record size: ${M}`);let V=a[k],G,D,N=C-b;if(Q-C<=i&&(D=g(l.pos-P,w))){let A=new Uint16Array(D.size-D.skip),F=l.pos-D.size,Y=A.length;for(;l.pos>F;)Y=y(D.start,A,Y);G=new Rs(A,Q-D.start,r),N=D.start-b}else{let A=l.pos-M;l.next();let F=[],Y=[],pe=k>=s?k:-1,ae=0,B=Q;for(;l.pos>A;)pe>=0&&l.id==pe&&l.size>=0?(l.end<=B-i&&(d(F,Y,C,ae,l.end,B,pe,L),ae=F.length,B=l.end),l.next()):f(C,A,F,Y,pe);if(pe>=0&&ae>0&&ae<F.length&&d(F,Y,C,ae,C,B,pe,L),F.reverse(),Y.reverse(),pe>-1&&ae>0){let q=h(V);G=Ev(V,F,Y,0,F.length,0,Q-C,q,q)}else G=p(V,F,Y,Q-C,L-Q)}E.push(G),T.push(N)}function h(b){return(P,E,T)=>{let w=0,k=P.length-1,C,Q;if(k>=0&&(C=P[k])instanceof vt){if(!k&&C.type==b&&C.length==T)return C;(Q=C.prop(qe.lookAhead))&&(w=E[k]+C.length+Q)}return p(b,P,E,T,w)}}function d(b,P,E,T,w,k,C,Q){let M=[],L=[];for(;b.length>T;)M.push(b.pop()),L.push(P.pop()+E-w);b.push(p(r.types[C],M,L,k-w,Q-k)),P.push(w-E)}function p(b,P,E,T,w=0,k){if(u){let C=[qe.contextHash,u];k=k?[C].concat(k):[C]}if(w>25){let C=[qe.lookAhead,w];k=k?[C].concat(k):[C]}return new vt(b,P,E,T,k)}function g(b,P){let E=l.fork(),T=0,w=0,k=0,C=E.end-i,Q={size:0,start:0,skip:0};e:for(let M=E.pos-b;E.pos>M;){let L=E.size;if(E.id==P&&L>=0){Q.size=T,Q.start=w,Q.skip=k,k+=4,T+=4,E.next();continue}let V=E.pos-L;if(L<0||V<M||E.start<C)break;let G=E.id>=s?4:0,D=E.start;for(E.next();E.pos>V;){if(E.size<0)if(E.size==-3)G+=4;else break e;else E.id>=s&&(G+=4);E.next()}w=D,T+=L,k+=G}return(P<0||T==b)&&(Q.size=T,Q.start=w,Q.skip=k),Q.size>4?Q:void 0}function y(b,P,E){let{id:T,start:w,end:k,size:C}=l;if(l.next(),C>=0&&T<s){let Q=E;if(C>4){let M=l.pos-(C-4);for(;l.pos>M;)E=y(b,P,E)}P[--E]=Q,P[--E]=k-b,P[--E]=w-b,P[--E]=T}else C==-3?u=T:C==-4&&(c=T);return E}let O=[],m=[];for(;l.pos>0;)f(t.start||0,t.bufferStart||0,O,m,-1);let v=(e=t.length)!==null&&e!==void 0?e:O.length?m[0]+O[0].length:0;return new vt(a[t.topID],O.reverse(),m.reverse(),v)}const Xb=new WeakMap;function Hf(t,e){if(!t.isAnonymous||e instanceof Rs||e.type!=t)return 1;let n=Xb.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof vt)){n=1;break}n+=Hf(t,r)}Xb.set(e,n)}return n}function Ev(t,e,n,r,i,o,s,l,a){let u=0;for(let p=r;p<i;p++)u+=Hf(t,e[p]);let c=Math.ceil(u*1.5/8),f=[],h=[];function d(p,g,y,O,m){for(let v=y;v<O;){let b=v,P=g[v],E=Hf(t,p[v]);for(v++;v<O;v++){let T=Hf(t,p[v]);if(E+T>=c)break;E+=T}if(v==b+1){if(E>c){let T=p[b];d(T.children,T.positions,0,T.children.length,g[b]+m);continue}f.push(p[b])}else{let T=g[v-1]+p[v-1].length-P;f.push(Ev(t,p,g,b,v,P,T,null,a))}h.push(P+m-o)}}return d(e,n,r,i,0),(l||a)(f,h,s)}class gQ{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Pi?this.setBuffer(e.context.buffer,e.index,n):e instanceof jr&&this.map.set(e.tree,n)}get(e){return e instanceof Pi?this.getBuffer(e.context.buffer,e.index):e instanceof jr?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class zi{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new zi(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let l=0,a=0,u=0;;l++){let c=l<n.length?n[l]:null,f=c?c.fromA:1e9;if(f-a>=r)for(;s&&s.from<f;){let h=s;if(a>=h.from||f<=h.to||u){let d=Math.max(h.from,a)-u,p=Math.min(h.to,f)-u;h=d>=p?null:new zi(d,p,h.tree,h.offset+u,l>0,!!c)}if(h&&i.push(h),s.to>f)break;s=o<e.length?e[o++]:null}if(!c)break;a=c.toA,u=c.toA-c.toB}return i}}class Qv{startParse(e,n,r){return typeof e=="string"&&(e=new w5(e)),r=r?r.length?r.map(i=>new Dr(i.from,i.to)):[new Dr(0,0)]:[new Dr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class w5{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function mQ(t){return(e,n,r,i)=>new P5(e,t,n,r,i)}class Wb{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.ranges=o}}class k5{constructor(e,n,r,i,o,s,l){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=s,this.prev=l,this.depth=0,this.ranges=[]}}const _O=new qe({perNode:!0});class P5{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new vt(r.type,r.children,r.positions,r.length,r.propValues.concat([[_O,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[qe.mounted.id]=new y5(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].ranges[0].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new E5(this.fragments),n=null,r=null,i=new Mu(new jr(this.baseTree,this.ranges[0].from,0,null),It.IncludeAnonymous|It.IgnoreMounts);e:for(let o,s;this.stoppedAt==null||i.from<this.stoppedAt;){let l=!0,a;if(e.hasNode(i)){if(n){let u=n.mounts.find(c=>c.frag.from<=i.from&&c.frag.to>=i.to&&c.mount.overlay);if(u)for(let c of u.mount.overlay){let f=c.from+u.pos,h=c.to+u.pos;f>=i.from&&h<=i.to&&!n.ranges.some(d=>d.from<h&&d.to>f)&&n.ranges.push({from:f,to:h})}}l=!1}else if(r&&(s=x5(r.ranges,i.from,i.to)))l=s!=2;else if(!i.type.isAnonymous&&i.from<i.to&&(o=this.nest(i,this.input))){i.tree||C5(i);let u=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new k5(o.parser,o.overlay,u,this.inner.length,i.from,i.tree,n);else{let c=Yb(this.ranges,o.overlay||[new Dr(i.from,i.to)]);c.length&&this.inner.push(new Wb(o.parser,o.parser.startParse(this.input,zb(u,c),c),o.overlay?o.overlay.map(f=>new Dr(f.from-i.from,f.to-i.from)):null,i.tree,c)),o.overlay?c.length&&(r={ranges:c,depth:0,prev:r}):l=!1}}else n&&(a=n.predicate(i))&&(a===!0&&(a=new Dr(i.from,i.to)),a.from<a.to&&n.ranges.push(a));if(l&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let u=Yb(this.ranges,n.ranges);u.length&&this.inner.splice(n.index,0,new Wb(n.parser,n.parser.startParse(this.input,zb(n.mounts,u),u),n.ranges.map(c=>new Dr(c.from-n.start,c.to-n.start)),n.target,u)),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function x5(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function Ub(t,e,n,r,i,o){if(e<n){let s=t.buffer[e+1];r.push(t.slice(e,n,s)),i.push(s-o)}}function C5(t){let{node:e}=t,n=0;do t.parent(),n++;while(!t.tree);let r=0,i=t.tree,o=0;for(;o=i.positions[r]+t.from,!(o<=e.from&&o+i.children[r].length>=e.to);r++);let s=i.children[r],l=s.buffer;function a(u,c,f,h,d){let p=u;for(;l[p+2]+o<=e.from;)p=l[p+3];let g=[],y=[];Ub(s,u,p,g,y,h);let O=l[p+1],m=l[p+2],v=O+o==e.from&&m+o==e.to&&l[p]==e.type.id;return g.push(v?e.toTree():a(p+4,l[p+3],s.set.types[l[p]],O,m-O)),y.push(O-h),Ub(s,l[p+3],c,g,y,h),new vt(f,g,y,d)}i.children[r]=a(0,l.length,mn.none,0,s.length);for(let u=0;u<=n;u++)t.childAfter(e.from)}class Zb{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(It.IncludeAnonymous|It.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,It.IgnoreOverlays|It.ExcludeBuffers)||n.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 n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof vt)n=n.children[0];else break}return!1}}let E5=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(_O))!==null&&n!==void 0?n:r.to,this.inner=new Zb(r.tree,-r.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 n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(_O))!==null&&e!==void 0?e:n.to,this.inner=new Zb(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(r=o.tree)===null||r===void 0?void 0:r.prop(qe.mounted);if(s&&s.parser==n)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=o.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:o.from-a.offset,mount:s})}}}return i}};function Yb(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,l=t[i].from;for(;o<r.length;o++){let a=r[o];if(a.from>=l)break;a.to<=s||(n||(r=n=e.slice()),a.from<s?(n[o]=new Dr(a.from,s),a.to>l&&n.splice(o+1,0,new Dr(l,a.to))):a.to>l?n[o--]=new Dr(l,a.to):n.splice(o--,1))}}return r}function Q5(t,e,n,r){let i=0,o=0,s=!1,l=!1,a=-1e9,u=[];for(;;){let c=i==t.length?1e9:s?t[i].to:t[i].from,f=o==e.length?1e9:l?e[o].to:e[o].from;if(s!=l){let h=Math.max(a,n),d=Math.min(c,f,r);h<d&&u.push(new Dr(h,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(s?(s=!1,i++):s=!0),f==a&&(l?(l=!1,o++):l=!0)}return u}function zb(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let s=r+(i.overlay?i.overlay[0].from:0),l=s+i.tree.length,a=Math.max(o.from,s),u=Math.min(o.to,l);if(i.overlay){let c=i.overlay.map(h=>new Dr(h.from+r,h.to+r)),f=Q5(e,c,a,u);for(let h=0,d=a;;h++){let p=h==f.length,g=p?u:f[h].from;if(g>d&&n.push(new zi(d,g,i.tree,-s,o.from>=d||o.openStart,o.to<=g||o.openEnd)),p)break;d=f[h].to}}else n.push(new zi(a,u,i.tree,-s,o.from>=s||o.openStart,o.to<=l||o.openEnd))}return n}let _5=0;class Jr{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=_5++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Jr([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new Xh;return n=>n.modified.indexOf(e)>-1?n:Xh.get(n.base||n,n.modified.concat(e).sort((r,i)=>r.id-i.id))}}let $5=0;class Xh{constructor(){this.instances=[],this.id=$5++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(l=>l.base==e&&T5(n,l.modified));if(r)return r;let i=[],o=new Jr(i,e,n);for(let l of n)l.instances.push(o);let s=A5(n);for(let l of e.set)if(!l.modified.length)for(let a of s)i.push(Xh.get(l,a));return o}}function T5(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function A5(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Jl(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,l=i;for(let f=0;;){if(l=="..."&&f>0&&f+3==i.length){s=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!h)throw new RangeError("Invalid path: "+i);if(o.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==i.length)break;let d=i[f++];if(f==i.length&&d=="!"){s=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);l=i.slice(f)}let a=o.length-1,u=o[a];if(!u)throw new RangeError("Invalid path: "+i);let c=new Wh(r,s,a>0?o.slice(0,a):null);e[u]=c.sort(e[u])}}return OQ.add(e)}const OQ=new qe;class Wh{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}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}}Wh.empty=new Wh([],2,null);function yQ(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let l of o)for(let a of l.set){let u=n[a.id];if(u){s=s?s+" "+u:u;break}}return s},scope:r}}function R5(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function D5(t,e,n,r=0,i=t.length){let o=new M5(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class M5{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:l,to:a}=e;if(l>=r||a<=n)return;s.isTop&&(o=this.highlighters.filter(d=>!d.scope||d.scope(s)));let u=i,c=I5(e)||Wh.empty,f=R5(o,c.tags);if(f&&(u&&(u+=" "),u+=f,c.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(e.from,u),c.opaque)return;let h=e.tree&&e.tree.prop(qe.mounted);if(h&&h.overlay){let d=e.node.enter(h.overlay[0].from+l,1),p=this.highlighters.filter(y=>!y.scope||y.scope(h.tree.type)),g=e.firstChild();for(let y=0,O=l;;y++){let m=y<h.overlay.length?h.overlay[y]:null,v=m?m.from+l:a,b=Math.max(n,O),P=Math.min(r,v);if(b<P&&g)for(;e.from<P&&(this.highlightRange(e,b,P,i,o),this.startSpan(Math.min(P,e.to),u),!(e.to>=v||!e.nextSibling())););if(!m||v>r)break;O=m.to+l,O>n&&(this.highlightRange(d.cursor(),Math.max(n,m.from+l),Math.min(r,O),i,p),this.startSpan(O,u))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function I5(t){let e=t.type.prop(OQ);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const de=Jr.define,pf=de(),mo=de(),qb=de(mo),Gb=de(mo),Oo=de(),gf=de(Oo),pg=de(Oo),gi=de(),ns=de(gi),hi=de(),di=de(),$O=de(),Pa=de($O),mf=de(),S={comment:pf,lineComment:de(pf),blockComment:de(pf),docComment:de(pf),name:mo,variableName:de(mo),typeName:qb,tagName:de(qb),propertyName:Gb,attributeName:de(Gb),className:de(mo),labelName:de(mo),namespace:de(mo),macroName:de(mo),literal:Oo,string:gf,docString:de(gf),character:de(gf),attributeValue:de(gf),number:pg,integer:de(pg),float:de(pg),bool:de(Oo),regexp:de(Oo),escape:de(Oo),color:de(Oo),url:de(Oo),keyword:hi,self:de(hi),null:de(hi),atom:de(hi),unit:de(hi),modifier:de(hi),operatorKeyword:de(hi),controlKeyword:de(hi),definitionKeyword:de(hi),moduleKeyword:de(hi),operator:di,derefOperator:de(di),arithmeticOperator:de(di),logicOperator:de(di),bitwiseOperator:de(di),compareOperator:de(di),updateOperator:de(di),definitionOperator:de(di),typeOperator:de(di),controlOperator:de(di),punctuation:$O,separator:de($O),bracket:Pa,angleBracket:de(Pa),squareBracket:de(Pa),paren:de(Pa),brace:de(Pa),content:gi,heading:ns,heading1:de(ns),heading2:de(ns),heading3:de(ns),heading4:de(ns),heading5:de(ns),heading6:de(ns),contentSeparator:de(gi),list:de(gi),quote:de(gi),emphasis:de(gi),strong:de(gi),link:de(gi),monospace:de(gi),strikethrough:de(gi),inserted:de(),deleted:de(),changed:de(),invalid:de(),meta:mf,documentMeta:de(mf),annotation:de(mf),processingInstruction:de(mf),definition:Jr.defineModifier(),constant:Jr.defineModifier(),function:Jr.defineModifier(),standard:Jr.defineModifier(),local:Jr.defineModifier(),special:Jr.defineModifier()};yQ([{tag:S.link,class:"tok-link"},{tag:S.heading,class:"tok-heading"},{tag:S.emphasis,class:"tok-emphasis"},{tag:S.strong,class:"tok-strong"},{tag:S.keyword,class:"tok-keyword"},{tag:S.atom,class:"tok-atom"},{tag:S.bool,class:"tok-bool"},{tag:S.url,class:"tok-url"},{tag:S.labelName,class:"tok-labelName"},{tag:S.inserted,class:"tok-inserted"},{tag:S.deleted,class:"tok-deleted"},{tag:S.literal,class:"tok-literal"},{tag:S.string,class:"tok-string"},{tag:S.number,class:"tok-number"},{tag:[S.regexp,S.escape,S.special(S.string)],class:"tok-string2"},{tag:S.variableName,class:"tok-variableName"},{tag:S.local(S.variableName),class:"tok-variableName tok-local"},{tag:S.definition(S.variableName),class:"tok-variableName tok-definition"},{tag:S.special(S.variableName),class:"tok-variableName2"},{tag:S.definition(S.propertyName),class:"tok-propertyName tok-definition"},{tag:S.typeName,class:"tok-typeName"},{tag:S.namespace,class:"tok-namespace"},{tag:S.className,class:"tok-className"},{tag:S.macroName,class:"tok-macroName"},{tag:S.propertyName,class:"tok-propertyName"},{tag:S.operator,class:"tok-operator"},{tag:S.comment,class:"tok-comment"},{tag:S.meta,class:"tok-meta"},{tag:S.invalid,class:"tok-invalid"},{tag:S.punctuation,class:"tok-punctuation"}]);var gg;const ps=new qe;function _v(t){return xe.define({combine:t?e=>e.concat(t):void 0})}const $v=new qe;class Mr{constructor(e,n,r=[],i=""){this.data=e,this.name=i,ct.prototype.hasOwnProperty("tree")||Object.defineProperty(ct.prototype,"tree",{get(){return _t(this)}}),this.parser=n,this.extension=[Zo.of(this),ct.languageData.of((o,s,l)=>{let a=Hb(o,s,l),u=a.type.prop(ps);if(!u)return[];let c=o.facet(u),f=a.type.prop($v);if(f){let h=a.resolve(s-a.from,l);for(let d of f)if(d.test(h,o)){let p=o.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return Hb(e,n,r).type.prop(ps)==this.data}findRegions(e){let n=e.facet(Zo);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(ps)==this.data){r.push({from:s,to:s+o.length});return}let l=o.prop(qe.mounted);if(l){if(l.tree.prop(ps)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+s,to:a.to+s});else r.push({from:s,to:s+o.length});return}else if(l.overlay){let a=r.length;if(i(l.tree,l.overlay[0].from+s),r.length>a)return}}for(let a=0;a<o.children.length;a++){let u=o.children[a];u instanceof vt&&i(u,o.positions[a]+s)}};return i(_t(e),0),r}get allowsNesting(){return!0}}Mr.setState=tt.define();function Hb(t,e,n){let r=t.facet(Zo),i=_t(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,It.ExcludeBuffers))o.type.isTop&&(i=o);return i}class Vl extends Mr{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=_v(e.languageData);return new Vl(n,e.parser.configure({props:[ps.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Vl(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function _t(t){let e=t.field(Mr.state,!1);return e?e.tree:vt.empty}class N5{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let xa=null;class Iu{constructor(e,n,r=[],i,o,s,l,a){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Iu(e,n,[],vt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new N5(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=vt.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(zi.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(zi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=xa;xa=this;try{return e()}finally{xa=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Kb(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((u,c,f,h)=>a.push({fromA:u,toA:c,fromB:f,toB:h})),r=zi.applyChanges(r,a),i=vt.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),f=e.mapPos(u.to,-1);c<f&&l.push({from:c,to:f})}}}return new Iu(this.parser,n,r,i,o,s,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=Kb(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Qv{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let a=xa;if(a){for(let u of i)a.tempSkipped.push(u);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=s,new vt(mn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return xa}}function Kb(t,e,n){return zi.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Bl{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Bl(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Iu.create(e.facet(Zo).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Bl(r)}}Mr.state=On.define({create:Bl.init,update(t,e){for(let n of e.effects)if(n.is(Mr.setState))return n.value;return e.startState.facet(Zo)!=e.state.facet(Zo)?Bl.init(e.state):t.apply(e)}});let vQ=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(vQ=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const mg=typeof navigator<"u"&&(!((gg=navigator.scheduling)===null||gg===void 0)&&gg.isInputPending)?()=>navigator.scheduling.isInputPending():null,L5=qt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Mr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Mr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=vQ(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Mr.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!mg?Math.max(25,e.timeRemaining()-5):1e9),l=o.context.treeLen<i&&r.doc.length>i+1e3,a=o.context.work(()=>mg&&mg()||Date.now()>s,i+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Mr.setState.of(new Bl(o.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>vr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Zo=xe.define({combine(t){return t.length?t[0]:null},enables:t=>[Mr.state,L5,Se.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Nu{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class Uh{constructor(e,n,r,i,o,s=void 0){this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=o,this.support=s,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:n,support:r}=e;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new Uh(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,n,r)}static matchFilename(e,n){for(let i of e)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,n,r=!0){n=n.toLowerCase();for(let i of e)if(i.alias.some(o=>o==n))return i;if(r)for(let i of e)for(let o of i.alias){let s=n.indexOf(o);if(s>-1&&(o.length>2||!/\w/.test(n[s-1])&&!/\w/.test(n[s+o.length])))return i}return null}}const j5=xe.define(),jd=xe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Zh(t){let e=t.facet(jd);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Lu(t,e){let n="",r=t.tabSize,i=t.facet(jd)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function Tv(t,e){t instanceof ct&&(t=new Vd(t));for(let r of t.state.facet(j5)){let i=r(t,e);if(i!==void 0)return i}let n=_t(t.state);return n?V5(t,n,e):null}class Vd{constructor(e,n={}){this.state=e,this.options=n,this.unit=Zh(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return tc(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const lc=new qe;function V5(t,e,n){return SQ(e.resolveInner(n).enterUnfinishedNodesBefore(n),n,t)}function B5(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function F5(t){let e=t.type.prop(lc);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(qe.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>bQ(s,!0,1,void 0,o&&!B5(s)?i.from:void 0)}return t.parent==null?X5:null}function SQ(t,e,n){for(;t;t=t.parent){let r=F5(t);if(r)return r(Av.create(n,e,t))}return null}function X5(){return 0}class Av extends Vd{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.node=r}static create(e,n,r){return new Av(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let n=this.node.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(W5(n,this.node))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?SQ(e,this.pos,this.base):0}}function W5(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function U5(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==r)return null;if(!a.type.isSkipped)return a.from<s?n:null;l=a.to}}function Z5({closing:t,align:e=!0,units:n=1}){return r=>bQ(r,e,n,t)}function bQ(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,l=r&&o.slice(s,s+r.length)==r||i==t.pos+s,a=e?U5(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*n)}const Y5=t=>t.baseIndent;function Kf({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const z5=200;function q5(){return ct.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+z5)return t;let o=n.sliceString(i.from,r);if(!e.some(u=>u.test(o)))return t;let{state:s}=t,l=-1,a=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==l)continue;l=c.from;let f=Tv(s,c.from);if(f==null)continue;let h=/^\s*/.exec(c.text)[0],d=Lu(s,f);h!=d&&a.push({from:c.from,to:c.from+h.length,insert:d})}return a.length?[t,{changes:a,sequential:!0}]:t})}const wQ=xe.define(),ac=new qe;function kQ(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function G5(t,e,n){let r=_t(t);if(r.length<n)return null;let i=r.resolveInner(n,1),o=null;for(let s=i;s;s=s.parent){if(s.to<=n||s.from>n)continue;if(o&&s.from<e)break;let l=s.type.prop(ac);if(l&&(s.to<r.length-50||r.length==t.doc.length||!H5(s))){let a=l(s,t);a&&a.from<=n&&a.from>=e&&a.to>n&&(o=a)}}return o}function H5(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Yh(t,e,n){for(let r of t.facet(wQ)){let i=r(t,e,n);if(i)return i}return G5(t,e,n)}function PQ(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const Bd=tt.define({map:PQ}),uc=tt.define({map:PQ});function xQ(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const _s=On.define({create(){return Ve.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(Bd)&&!K5(t,n.value.from,n.value.to)?t=t.update({add:[Jb.range(n.value.from,n.value.to)]}):n.is(uc)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{i<r&&o>r&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>Se.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(Jb.range(r,i))}return Ve.set(e,!0)}});function zh(t,e,n){var r;let i=null;return(r=t.field(_s,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function K5(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function CQ(t,e){return t.field(_s,!1)?e:e.concat(tt.appendConfig.of(_Q()))}const J5=t=>{for(let e of xQ(t)){let n=Yh(t.state,e.from,e.to);if(n)return t.dispatch({effects:CQ(t.state,[Bd.of(n),EQ(t,n)])}),!0}return!1},e3=t=>{if(!t.state.field(_s,!1))return!1;let e=[];for(let n of xQ(t)){let r=zh(t.state,n.from,n.to);r&&e.push(uc.of(r),EQ(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function EQ(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return Se.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const t3=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=Yh(e,i.from,i.to);o&&n.push(Bd.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:CQ(t.state,n)}),!!n.length},n3=t=>{let e=t.state.field(_s,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(uc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},r3=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:J5},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e3},{key:"Ctrl-Alt-[",run:t3},{key:"Ctrl-Alt-]",run:n3}],i3={placeholderDOM:null,placeholderText:"…"},QQ=xe.define({combine(t){return Mi(t,i3)}});function _Q(t){let e=[_s,l3];return t&&e.push(QQ.of(t)),e}const Jb=Ve.replace({widget:new class extends oo{toDOM(t){let{state:e}=t,n=e.facet(QQ),r=o=>{let s=t.lineBlockAt(t.posAtDOM(o.target)),l=zh(t.state,s.from,s.to);l&&t.dispatch({effects:uc.of(l)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,r);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",e.phrase("folded code")),i.title=e.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}}}),o3={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Og extends no{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function s3(t={}){let e=Object.assign(Object.assign({},o3),t),n=new Og(e,!0),r=new Og(e,!1),i=qt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Zo)!=s.state.facet(Zo)||s.startState.field(_s,!1)!=s.state.field(_s,!1)||_t(s.startState)!=_t(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let l=new Bo;for(let a of s.viewportLineBlocks){let u=zh(s.state,a.from,a.to)?r:Yh(s.state,a.from,a.to)?n:null;u&&l.add(a.from,a.from,u)}return l.finish()}}),{domEventHandlers:o}=e;return[i,l5({class:"cm-foldGutter",markers(s){var l;return((l=s.plugin(i))===null||l===void 0?void 0:l.markers)||Ot.empty},initialSpacer(){return new Og(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(s,l,a)=>{if(o.click&&o.click(s,l,a))return!0;let u=zh(s.state,l.from,l.to);if(u)return s.dispatch({effects:uc.of(u)}),!0;let c=Yh(s.state,l.from,l.to);return c?(s.dispatch({effects:Bd.of(c)}),!0):!1}})}),_Q()]}const l3=Se.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 ea{constructor(e,n){this.specs=e;let r;function i(l){let a=Fo.newName();return(r||(r=Object.create(null)))["."+a]=l,a}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof Mr?l=>l.prop(ps)==s.data:s?l=>l==s:void 0,this.style=yQ(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:o}).style,this.module=r?new Fo(r):null,this.themeType=n.themeType}static define(e,n){return new ea(e,n||{})}}const TO=xe.define(),$Q=xe.define({combine(t){return t.length?[t[0]]:null}});function yg(t){let e=t.facet(TO);return e.length?e:t.facet($Q)}function Rv(t,e){let n=[u3],r;return t instanceof ea&&(t.module&&n.push(Se.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push($Q.of(t)):r?n.push(TO.computeN([Se.darkTheme],i=>i.facet(Se.darkTheme)==(r=="dark")?[t]:[])):n.push(TO.of(t)),n}class a3{constructor(e){this.markCache=Object.create(null),this.tree=_t(e.state),this.decorations=this.buildDeco(e,yg(e.state))}update(e){let n=_t(e.state),r=yg(e.state),i=r!=yg(e.startState);n.length<e.view.viewport.to&&!i&&n.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r))}buildDeco(e,n){if(!n||!this.tree.length)return Ve.none;let r=new Bo;for(let{from:i,to:o}of e.visibleRanges)D5(this.tree,n,(s,l,a)=>{r.add(s,l,this.markCache[a]||(this.markCache[a]=Ve.mark({class:a})))},i,o);return r.finish()}}const u3=Ho.high(qt.fromClass(a3,{decorations:t=>t.decorations})),c3=ea.define([{tag:S.meta,color:"#404740"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,textDecoration:"underline",fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strong,fontWeight:"bold"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.keyword,color:"#708"},{tag:[S.atom,S.bool,S.url,S.contentSeparator,S.labelName],color:"#219"},{tag:[S.literal,S.inserted],color:"#164"},{tag:[S.string,S.deleted],color:"#a11"},{tag:[S.regexp,S.escape,S.special(S.string)],color:"#e40"},{tag:S.definition(S.variableName),color:"#00f"},{tag:S.local(S.variableName),color:"#30a"},{tag:[S.typeName,S.namespace],color:"#085"},{tag:S.className,color:"#167"},{tag:[S.special(S.variableName),S.macroName],color:"#256"},{tag:S.definition(S.propertyName),color:"#00c"},{tag:S.comment,color:"#940"},{tag:S.invalid,color:"#f00"}]),f3=Se.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),TQ=1e4,AQ="()[]{}",RQ=xe.define({combine(t){return Mi(t,{afterCursor:!0,brackets:AQ,maxScanDistance:TQ,renderMatch:p3})}}),h3=Ve.mark({class:"cm-matchingBracket"}),d3=Ve.mark({class:"cm-nonmatchingBracket"});function p3(t){let e=[],n=t.matched?h3:d3;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const g3=On.define({create(){return Ve.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(RQ);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=xi(e.state,i.head,-1,r)||i.head>0&&xi(e.state,i.head-1,1,r)||r.afterCursor&&(xi(e.state,i.head,1,r)||i.head<e.state.doc.length&&xi(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return Ve.set(n,!0)},provide:t=>Se.decorations.from(t)}),m3=[g3,f3];function O3(t={}){return[RQ.of(t),m3]}const DQ=new qe;function AO(t,e,n){let r=t.prop(e<0?qe.openedBy:qe.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function RO(t){let e=t.type.prop(DQ);return e?e(t.node):t}function xi(t,e,n,r={}){let i=r.maxScanDistance||TQ,o=r.brackets||AQ,s=_t(t),l=s.resolveInner(e,n);for(let a=l;a;a=a.parent){let u=AO(a.type,n,o);if(u&&a.from<a.to){let c=RO(a);if(c&&(n>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return y3(t,e,n,a,c,u,o)}}return v3(t,e,n,s,l.type,i,o)}function y3(t,e,n,r,i,o,s){let l=r.parent,a={from:i.from,to:i.to},u=0,c=l==null?void 0:l.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from<c.to){let f=RO(c);return{start:a,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(AO(c.type,n,s))u++;else if(AO(c.type,-n,s)){if(u==0){let f=RO(c);return{start:a,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:a,matched:!1}}function v3(t,e,n,r,i,o,s){let l=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),a=s.indexOf(l);if(a<0||a%2==0!=n>0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let h=0;!c.next().done&&h<=o;){let d=c.value;n<0&&(h+=d.length);let p=e+h*n;for(let g=n>0?0:d.length-1,y=n>0?d.length:-1;g!=y;g+=n){let O=s.indexOf(d[g]);if(!(O<0||r.resolveInner(p+g,1).type!=i))if(O%2==0==n>0)f++;else{if(f==1)return{start:u,end:{from:p+g,to:p+g+1},matched:O>>1==a>>1};f--}}n>0&&(h+=d.length)}return c.done?{start:u,matched:!1}:null}const S3=Object.create(null),ew=[mn.none],tw=[],b3=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])b3[t]=w3(S3,e);function vg(t,e){tw.indexOf(t)>-1||(tw.push(t),console.warn(e))}function w3(t,e){let n=null;for(let o of e.split(".")){let s=t[o]||S[o];s?typeof s=="function"?n?n=s(n):vg(o,`Modifier ${o} used at start of tag`):n?vg(o,`Tag ${o} used as modifier`):n=s:vg(o,`Unknown highlighting tag ${o}`)}if(!n)return 0;let r=e.replace(/ /g,"_"),i=mn.define({id:ew.length,name:r,props:[Jl({[r]:n})]});return ew.push(i),i.id}const k3="#e5c07b",nw="#e06c75",P3="#56b6c2",x3="#ffffff",Jf="#abb2bf",DO="#7d8799",C3="#61afef",E3="#98c379",rw="#d19a66",Q3="#c678dd",_3="#21252b",iw="#2c313a",ow="#282c34",Sg="#353a42",$3="#3E4451",sw="#528bff",T3=Se.theme({"&":{color:Jf,backgroundColor:ow},".cm-content":{caretColor:sw},".cm-cursor, .cm-dropCursor":{borderLeftColor:sw},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:$3},".cm-panels":{backgroundColor:_3,color:Jf},".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:ow,color:DO,border:"none"},".cm-activeLineGutter":{backgroundColor:iw},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Sg},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Sg,borderBottomColor:Sg},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:iw,color:Jf}}},{dark:!0}),A3=ea.define([{tag:S.keyword,color:Q3},{tag:[S.name,S.deleted,S.character,S.propertyName,S.macroName],color:nw},{tag:[S.function(S.variableName),S.labelName],color:C3},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:rw},{tag:[S.definition(S.name),S.separator],color:Jf},{tag:[S.typeName,S.className,S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:k3},{tag:[S.operator,S.operatorKeyword,S.url,S.escape,S.regexp,S.link,S.special(S.string)],color:P3},{tag:[S.meta,S.comment],color:DO},{tag:S.strong,fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.link,color:DO,textDecoration:"underline"},{tag:S.heading,fontWeight:"bold",color:nw},{tag:[S.atom,S.bool,S.special(S.variableName)],color:rw},{tag:[S.processingInstruction,S.string,S.inserted],color:E3},{tag:S.invalid,color:x3}]),R3=[T3,Rv(A3)];function $e(){return $e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$e.apply(this,arguments)}var ii=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},o={};n.background&&(o.backgroundColor=n.background),n.foreground&&(o.color=n.foreground),(n.background||n.foreground)&&(i["&"]=o),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var s={};n.gutterActiveForeground&&(s.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},s.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=s,n.selection&&(i["&.cm-focused .cm-selectionBackground, &.cm-focused .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var l=Se.theme(i,{dark:e==="dark"}),a=ea.define(r),u=[l,Rv(a)];return u},D3={background:"#272822",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#49483E",selectionMatch:"#49483E",gutterBackground:"#272822",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},M3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},D3,n),styles:[{tag:[S.comment,S.documentMeta],color:"#8292a2"},{tag:[S.number,S.bool,S.null,S.atom],color:"#ae81ff"},{tag:[S.attributeValue,S.className,S.name],color:"#e6db74"},{tag:[S.propertyName,S.attributeName],color:"#a6e22e"},{tag:[S.variableName],color:"#9effff"},{tag:[S.squareBracket],color:"#bababa"},{tag:[S.string,S.special(S.brace)],color:"#e6db74"},{tag:[S.regexp,S.className,S.typeName,S.definition(S.typeName)],color:"#66d9ef"},{tag:[S.definition(S.variableName),S.definition(S.propertyName),S.function(S.variableName)],color:"#fd971f"},{tag:[S.keyword,S.definitionKeyword,S.modifier,S.tagName,S.angleBracket],color:"#f92672"},...r]})},I3=M3(),N3={background:"#0f0f0f",foreground:"#defdef",caret:"#00FF00",selection:"#515151",selectionMatch:"#515151",gutterBackground:"#555",gutterForeground:"#FFFFFF",lineHighlight:"#314151"},L3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},N3,n),styles:[{tag:S.keyword,color:"darkgoldenrod",fontWeight:"bold"},{tag:S.atom,color:"#77F"},{tag:S.comment,color:"#7a7b7c",fontStyle:"italic"},{tag:S.number,color:"violet"},{tag:S.definition(S.variableName),color:"#fffabc"},{tag:S.variableName,color:"#abcdef"},{tag:S.function(S.variableName),color:"#fffabc"},{tag:S.typeName,color:"#FFDD44"},{tag:S.tagName,color:"#def"},{tag:S.string,color:"#2b4"},{tag:S.meta,color:"#C9F"},{tag:S.bracket,color:"#8a8a8a"},{tag:S.attributeName,color:"#DDFF00"},{tag:S.heading,color:"aquamarine",fontWeight:"bold"},{tag:S.link,color:"blueviolet",fontWeight:"bold"},...r]})},j3=L3(),V3={background:"#282a36",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"#282a36",gutterForeground:"#6D8A88",gutterBorder:"transparent",lineHighlight:"rgba(255, 255, 255, 0.1)"},B3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},V3,n),styles:[{tag:S.comment,color:"#6272a4"},{tag:S.string,color:"#f1fa8c"},{tag:S.atom,color:"#bd93f9"},{tag:S.meta,color:"#f8f8f2"},{tag:[S.keyword,S.operator,S.tagName],color:"#ff79c6"},{tag:[S.function(S.propertyName),S.propertyName],color:"#66d9ef"},{tag:[S.definition(S.variableName),S.function(S.variableName),S.className,S.attributeName],color:"#50fa7b"},{tag:S.atom,color:"#bd93f9"},...r]})},F3=B3(),X3={background:"#fff",foreground:"#000",caret:"#FFFFFF",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#f7f7f7",gutterForeground:"#999",lineHighlight:"#e8f2ff",gutterBorder:"transparent"},W3=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},X3,n),styles:[{tag:[S.comment],color:"#3F7F5F"},{tag:[S.documentMeta],color:"#FF1717"},{tag:S.keyword,color:"#7F0055",fontWeight:"bold"},{tag:S.atom,color:"#00f"},{tag:S.number,color:"#164"},{tag:S.propertyName,color:"#164"},{tag:[S.variableName,S.definition(S.variableName)],color:"#0000C0"},{tag:S.function(S.variableName),color:"#0000C0"},{tag:S.string,color:"#2A00FF"},{tag:S.operator,color:"black"},{tag:S.tagName,color:"#170"},{tag:S.attributeName,color:"#00c"},{tag:S.link,color:"#219"},...r]})},U3=W3(),Z3={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},Y3=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},Z3,n),styles:[{tag:[S.standard(S.tagName),S.tagName],color:"#116329"},{tag:[S.comment,S.bracket],color:"#6a737d"},{tag:[S.className,S.propertyName],color:"#6f42c1"},{tag:[S.variableName,S.attributeName,S.number,S.operator],color:"#005cc5"},{tag:[S.keyword,S.typeName,S.typeOperator,S.typeName],color:"#d73a49"},{tag:[S.string,S.meta,S.regexp],color:"#032f62"},{tag:[S.name,S.quote],color:"#22863a"},{tag:[S.heading],color:"#24292e",fontWeight:"bold"},{tag:[S.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[S.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#e36209"},{tag:[S.url,S.escape,S.regexp,S.link],color:"#032f62"},{tag:S.link,textDecoration:"underline"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.invalid,color:"#cb2431"},...r]})};Y3();var z3={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},q3=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},z3,n),styles:[{tag:[S.standard(S.tagName),S.tagName],color:"#7ee787"},{tag:[S.comment,S.bracket],color:"#8b949e"},{tag:[S.className,S.propertyName],color:"#d2a8ff"},{tag:[S.variableName,S.attributeName,S.number,S.operator],color:"#79c0ff"},{tag:[S.keyword,S.typeName,S.typeOperator,S.typeName],color:"#ff7b72"},{tag:[S.string,S.meta,S.regexp],color:"#a5d6ff"},{tag:[S.name,S.quote],color:"#7ee787"},{tag:[S.heading],color:"#d2a8ff",fontWeight:"bold"},{tag:[S.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[S.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#ffab70"},{tag:S.link,textDecoration:"underline"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.invalid,color:"#f97583"},...r]})},G3=q3(),H3={background:"#2e3235",foreground:"#bdbdbd",caret:"#a0a4ae",selection:"#d7d4f0",selectionMatch:"#d7d4f0",gutterBackground:"#2e3235",gutterForeground:"#999",gutterActiveForeground:"#4f5b66",lineHighlight:"#545b61"},MQ=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},H3,n),styles:[{tag:S.keyword,color:"#cf6edf"},{tag:[S.name,S.deleted,S.character,S.macroName],color:"#56c8d8"},{tag:[S.propertyName],color:"#facf4e"},{tag:[S.variableName],color:"#bdbdbd"},{tag:[S.function(S.variableName)],color:"#56c8d8"},{tag:[S.labelName],color:"#cf6edf"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#facf4e"},{tag:[S.definition(S.name),S.separator],color:"#fa5788"},{tag:[S.brace],color:"#cf6edf"},{tag:[S.annotation],color:"#ff5f52"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#ffad42"},{tag:[S.typeName,S.className],color:"#ffad42"},{tag:[S.operator,S.operatorKeyword],color:"#7186f0"},{tag:[S.tagName],color:"#99d066"},{tag:[S.squareBracket],color:"#ff5f52"},{tag:[S.angleBracket],color:"#606f7a"},{tag:[S.attributeName],color:"#bdbdbd"},{tag:[S.regexp],color:"#ff5f52"},{tag:[S.quote],color:"#6abf69"},{tag:[S.string],color:"#99d066"},{tag:S.link,color:"#56c8d8",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[S.url,S.escape,S.special(S.string)],color:"#facf4e"},{tag:[S.meta],color:"#707d8b"},{tag:[S.comment],color:"#707d8b",fontStyle:"italic"},{tag:S.monospace,color:"#bdbdbd"},{tag:S.strong,fontWeight:"bold",color:"#ff5f52"},{tag:S.emphasis,fontStyle:"italic",color:"#99d066"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.heading,fontWeight:"bold",color:"#facf4e"},{tag:S.heading1,fontWeight:"bold",color:"#facf4e"},{tag:[S.heading2,S.heading3,S.heading4],fontWeight:"bold",color:"#facf4e"},{tag:[S.heading5,S.heading6],color:"#facf4e"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#56c8d8"},{tag:[S.processingInstruction,S.inserted],color:"#ff5f52"},{tag:[S.contentSeparator],color:"#56c8d8"},{tag:S.invalid,color:"#606f7a",borderBottom:"1px dotted #ff5f52"},...r]})};MQ();var K3=MQ(),J3={background:"#FAFAFA",foreground:"#90A4AE",caret:"#272727",selection:"#80CBC440",selectionMatch:"#FAFAFA",gutterBackground:"#FAFAFA",gutterForeground:"#90A4AE",gutterBorder:"transparent",lineHighlight:"#CCD7DA50"},eL=t=>{var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},J3,n),styles:[{tag:S.keyword,color:"#39ADB5"},{tag:[S.name,S.deleted,S.character,S.macroName],color:"#90A4AE"},{tag:[S.propertyName],color:"#6182B8"},{tag:[S.processingInstruction,S.string,S.inserted,S.special(S.string)],color:"#91B859"},{tag:[S.function(S.variableName),S.labelName],color:"#6182B8"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#39ADB5"},{tag:[S.definition(S.name),S.separator],color:"#90A4AE"},{tag:[S.className],color:"#E2931D"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#F76D47"},{tag:[S.typeName],color:"#E2931D",fontStyle:"#E2931D"},{tag:[S.operator,S.operatorKeyword],color:"#39ADB5"},{tag:[S.url,S.escape,S.regexp,S.link],color:"#91B859"},{tag:[S.meta,S.comment],color:"#90A4AE"},{tag:S.strong,fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,fontWeight:"bold",color:"#39ADB5"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#90A4AE"},{tag:S.invalid,color:"#E5393570"},{tag:S.strikethrough,textDecoration:"line-through"},...r]})};eL();var tL={background:"#2e3440",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#3b4252",selectionMatch:"#e5e9f0",gutterBackground:"#2e3440",gutterForeground:"#4c566a",gutterActiveForeground:"#d8dee9",lineHighlight:"#4c566a"},nL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},tL,n),styles:[{tag:S.keyword,color:"#5e81ac"},{tag:[S.name,S.deleted,S.character,S.propertyName,S.macroName],color:"#88c0d0"},{tag:[S.variableName],color:"#8fbcbb"},{tag:[S.function(S.variableName)],color:"#8fbcbb"},{tag:[S.labelName],color:"#81a1c1"},{tag:[S.color,S.constant(S.name),S.standard(S.name)],color:"#5e81ac"},{tag:[S.definition(S.name),S.separator],color:"#a3be8c"},{tag:[S.brace],color:"#8fbcbb"},{tag:[S.annotation],color:"#d30102"},{tag:[S.number,S.changed,S.annotation,S.modifier,S.self,S.namespace],color:"#b48ead"},{tag:[S.typeName,S.className],color:"#ebcb8b"},{tag:[S.operator,S.operatorKeyword],color:"#a3be8c"},{tag:[S.tagName],color:"#b48ead"},{tag:[S.squareBracket],color:"#bf616a"},{tag:[S.angleBracket],color:"#d08770"},{tag:[S.attributeName],color:"#ebcb8b"},{tag:[S.regexp],color:"#5e81ac"},{tag:[S.quote],color:"#b48ead"},{tag:[S.string],color:"#a3be8c"},{tag:S.link,color:"#a3be8c",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[S.url,S.escape,S.special(S.string)],color:"#8fbcbb"},{tag:[S.meta],color:"#88c0d0"},{tag:[S.monospace],color:"#d8dee9",fontStyle:"italic"},{tag:[S.comment],color:"#4c566a",fontStyle:"italic"},{tag:S.strong,fontWeight:"bold",color:"#5e81ac"},{tag:S.emphasis,fontStyle:"italic",color:"#5e81ac"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.heading,fontWeight:"bold",color:"#5e81ac"},{tag:S.special(S.heading1),fontWeight:"bold",color:"#5e81ac"},{tag:S.heading1,fontWeight:"bold",color:"#5e81ac"},{tag:[S.heading2,S.heading3,S.heading4],fontWeight:"bold",color:"#5e81ac"},{tag:[S.heading5,S.heading6],color:"#5e81ac"},{tag:[S.atom,S.bool,S.special(S.variableName)],color:"#d08770"},{tag:[S.processingInstruction,S.inserted],color:"#8fbcbb"},{tag:[S.contentSeparator],color:"#ebcb8b"},{tag:S.invalid,color:"#434c5e",borderBottom:"1px dotted #d30102"},...r]})},rL=nL(),iL={background:"#fff",foreground:"#3D3D3D",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#AFAFAF",lineHighlight:"#EDF4FF"};function oL(t){var{theme:e="light",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},iL,n),styles:[{tag:[S.comment,S.quote],color:"#707F8D"},{tag:[S.typeName,S.typeOperator],color:"#aa0d91"},{tag:[S.keyword],color:"#aa0d91",fontWeight:"bold"},{tag:[S.string,S.meta],color:"#D23423"},{tag:[S.name],color:"#032f62"},{tag:[S.typeName],color:"#522BB2"},{tag:[S.variableName],color:"#23575C"},{tag:[S.definition(S.variableName)],color:"#327A9E"},{tag:[S.regexp,S.link],color:"#0e0eff"},...r]})}var sL=oL(),lL={background:"#292A30",foreground:"#CECFD0",caret:"#fff",selection:"#727377",selectionMatch:"#727377",lineHighlight:"#2F3239"},aL=t=>{var{theme:e="dark",settings:n={},styles:r=[]}=t||{};return ii({theme:e,settings:$e({},lL,n),styles:[{tag:[S.comment,S.quote],color:"#7F8C98"},{tag:[S.keyword],color:"#FF7AB2",fontWeight:"bold"},{tag:[S.string,S.meta],color:"#FF8170"},{tag:[S.typeName],color:"#DABAFF"},{tag:[S.definition(S.variableName)],color:"#6BDFFF"},{tag:[S.name],color:"#6BAA9F"},{tag:[S.variableName],color:"#ACF2E4"},{tag:[S.regexp,S.link],color:"#FF8170"},...r]})};aL();const IQ=[{value:j3,label:"abcdef"},{value:F3,label:"dracula"},{value:U3,label:"eclipse"},{value:K3,label:"material"},{value:rL,label:"nord"},{value:R3,label:"oneDark"},{value:I3,label:"okaidia"},{value:G3,label:"github"},{value:sL,label:"xcode"}],Dv=IQ.reduce((t,e)=>(t[e.label]=e,t),{}),NQ="oneDark",uL=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.head),r=Iv(t.state,n.from);return r.line?cL(t):r.block?hL(t):!1};function Mv(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const cL=Mv(gL,0),fL=Mv(LQ,0),hL=Mv((t,e)=>LQ(t,e,pL(e)),0);function Iv(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Ca=50;function dL(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-Ca,r),s=t.sliceDoc(i,i+Ca),l=/\s*$/.exec(o)[0].length,a=/^\s*/.exec(s)[0].length,u=o.length-l;if(o.slice(u-e.length,u)==e&&s.slice(a,a+n.length)==n)return{open:{pos:r-l,margin:l&&1},close:{pos:i+a,margin:a&&1}};let c,f;i-r<=2*Ca?c=f=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+Ca),f=t.sliceDoc(i-Ca,i));let h=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-n.length;return c.slice(h,h+e.length)==e&&f.slice(p,p+n.length)==n?{open:{pos:r+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function pL(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to),o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from,to:i.to})}return e}function LQ(t,e,n=e.selection.ranges){let r=n.map(o=>Iv(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>dL(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,l;s<i.length;s++)if(l=i[s]){let a=r[s],{open:u,close:c}=l;o.push({from:u.pos-a.open.length,to:u.pos+u.margin},{from:c.pos-c.margin,to:c.pos+a.close.length})}return{changes:o}}return null}function gL(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let l=r.length,a=1e9;for(let u=o;u<=s;){let c=e.doc.lineAt(u);if(c.from>i&&(o==s||s>c.from)){i=c.from;let f=Iv(e,c.from).line;if(!f)continue;let h=/^\s*/.exec(c.text)[0].length,d=h==c.length,p=c.text.slice(h,h+f.length)==f?h:-1;h<c.text.length&&h<a&&(a=h),r.push({line:c,comment:p,token:f,indent:h,empty:d,single:!1})}u=c.to+1}if(a<1e9)for(let u=l;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=a);r.length==l+1&&(r[l].single=!0)}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:l,token:a,indent:u,empty:c,single:f}of r)(f||!c)&&o.push({from:l.from+u,insert:a+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:l,token:a}of r)if(l>=0){let u=s.from+l,c=u+a.length;s.text[c-s.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const MO=Di.define(),mL=Di.define(),OL=xe.define(),jQ=xe.define({combine(t){return Mi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}});function yL(t){let e=0;return t.iterChangedRanges((n,r)=>e=r),e}const VQ=On.define({create(){return Ci.empty},update(t,e){let n=e.state.facet(jQ),r=e.annotation(MO);if(r){let a=e.docChanged?J.single(yL(e.changes)):void 0,u=nr.fromTransaction(e,a),c=r.side,f=c==0?t.undone:t.done;return u?f=qh(f,f.length,n.minDepth,u):f=XQ(f,e.startState.selection),new Ci(c==0?r.rest:f,c==0?f:r.rest)}let i=e.annotation(mL);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(gn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=nr.fromTransaction(e),s=e.annotation(gn.time),l=e.annotation(gn.userEvent);return o?t=t.addChanges(o,s,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,l,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Ci(t.done.map(nr.fromJSON),t.undone.map(nr.fromJSON))}});function vL(t={}){return[VQ,jQ.of(t),Se.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?BQ:e.inputType=="historyRedo"?IO:null;return r?(e.preventDefault(),r(n)):!1}})]}function Fd(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(VQ,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const BQ=Fd(0,!1),IO=Fd(1,!1),SL=Fd(0,!0),bL=Fd(1,!0);class nr{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new nr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new nr(e.changes&&hn.fromJSON(e.changes),[],e.mapped&&$i.fromJSON(e.mapped),e.startSelection&&J.fromJSON(e.startSelection),e.selectionsAfter.map(J.fromJSON))}static fromTransaction(e,n){let r=Ir;for(let i of e.startState.facet(OL)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new nr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Ir)}static selection(e){return new nr(void 0,Ir,void 0,void 0,e)}}function qh(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function wL(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,l)=>{for(let a=0;a<n.length;){let u=n[a++],c=n[a++];l>=u&&s<=c&&(r=!0)}}),r}function kL(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function FQ(t,e){return t.length?e.length?t.concat(e):t:e}const Ir=[],PL=200;function XQ(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-PL));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),qh(t,t.length-1,1e9,n.setSelAfter(r)))}else return[nr.selection([e])]}function xL(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function bg(t,e){if(!t.length)return t;let n=t.length,r=Ir;for(;n;){let i=CL(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[nr.selection(r)]:Ir}function CL(t,e,n){let r=FQ(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):Ir,n);if(!t.changes)return nr.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new nr(i,tt.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const EL=/^(input\.type|delete)($|\.)/;class Ci{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Ci(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,l=s[s.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!r||EL.test(r))&&(!l.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,wL(l.changes,e.changes))||r=="input.type.compose")?s=qh(s,s.length-1,i.minDepth,new nr(e.changes.compose(l.changes),FQ(e.effects,l.effects),l.mapped,l.startSelection,Ir)):s=qh(s,s.length,i.minDepth,e),new Ci(s,Ir,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Ir;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&kL(o[o.length-1],e)?this:new Ci(XQ(this.done,e),this.undone,n,r)}addMapping(e){return new Ci(bg(this.done,e),bg(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1];if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:MO.of({side:e,rest:xL(i)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let s=i.length==1?Ir:i.slice(0,i.length-1);return o.mapped&&(s=bg(s,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:MO.of({side:e,rest:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Ci.empty=new Ci(Ir,Ir);const QL=[{key:"Mod-z",run:BQ,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:IO,preventDefault:!0},{linux:"Ctrl-Shift-z",run:IO,preventDefault:!0},{key:"Mod-u",run:SL,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:bL,preventDefault:!0}];function ta(t,e){return J.create(t.ranges.map(e),t.mainIndex)}function Ii(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function oi({state:t,dispatch:e},n){let r=ta(t.selection,n);return r.eq(t.selection)?!1:(e(Ii(t,r)),!0)}function Xd(t,e){return J.cursor(e?t.to:t.from)}function WQ(t,e){return oi(t,n=>n.empty?t.moveByChar(n,e):Xd(n,e))}function Fn(t){return t.textDirectionAt(t.state.selection.main.head)==Ut.LTR}const UQ=t=>WQ(t,!Fn(t)),ZQ=t=>WQ(t,Fn(t));function YQ(t,e){return oi(t,n=>n.empty?t.moveByGroup(n,e):Xd(n,e))}const _L=t=>YQ(t,!Fn(t)),$L=t=>YQ(t,Fn(t));function TL(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Wd(t,e,n){let r=_t(t).resolveInner(e.head),i=n?qe.closedBy:qe.openedBy;for(let a=e.head;;){let u=n?r.childAfter(a):r.childBefore(a);if(!u)break;TL(t,u,i)?r=u:a=n?u.to:u.from}let o=r.type.prop(i),s,l;return o&&(s=n?xi(t,r.from,1):xi(t,r.to,-1))&&s.matched?l=n?s.end.to:s.end.from:l=n?r.to:r.from,J.cursor(l,n?-1:1)}const AL=t=>oi(t,e=>Wd(t.state,e,!Fn(t))),RL=t=>oi(t,e=>Wd(t.state,e,Fn(t)));function zQ(t,e){return oi(t,n=>{if(!n.empty)return Xd(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const qQ=t=>zQ(t,!1),GQ=t=>zQ(t,!0);function HQ(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(Se.scrollMargins)){let s=o(t);s!=null&&s.top&&(n=Math.max(s==null?void 0:s.top,n)),s!=null&&s.bottom&&(r=Math.max(s==null?void 0:s.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function KQ(t,e){let n=HQ(t),{state:r}=t,i=ta(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):Xd(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,u=l.bottom-n.marginBottom;s&&s.top>a&&s.bottom<u&&(o=Se.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-a}))}return t.dispatch(Ii(r,i),{effects:o}),!0}const lw=t=>KQ(t,!1),NO=t=>KQ(t,!0);function Ko(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=J.cursor(r.from+o))}return i}const DL=t=>oi(t,e=>Ko(t,e,!0)),ML=t=>oi(t,e=>Ko(t,e,!1)),IL=t=>oi(t,e=>Ko(t,e,!Fn(t))),NL=t=>oi(t,e=>Ko(t,e,Fn(t))),LL=t=>oi(t,e=>J.cursor(t.lineBlockAt(e.head).from,1)),jL=t=>oi(t,e=>J.cursor(t.lineBlockAt(e.head).to,-1));function VL(t,e,n){let r=!1,i=ta(t.selection,o=>{let s=xi(t,o.head,-1)||xi(t,o.head,1)||o.head>0&&xi(t,o.head-1,1)||o.head<t.doc.length&&xi(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let l=s.start.from==o.head?s.end.to:s.end.from;return n?J.range(o.anchor,l):J.cursor(l)});return r?(e(Ii(t,i)),!0):!1}const BL=({state:t,dispatch:e})=>VL(t,e,!1);function Fr(t,e){let n=ta(t.state.selection,r=>{let i=e(r);return J.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ii(t.state,n)),!0)}function JQ(t,e){return Fr(t,n=>t.moveByChar(n,e))}const e_=t=>JQ(t,!Fn(t)),t_=t=>JQ(t,Fn(t));function n_(t,e){return Fr(t,n=>t.moveByGroup(n,e))}const FL=t=>n_(t,!Fn(t)),XL=t=>n_(t,Fn(t)),WL=t=>Fr(t,e=>Wd(t.state,e,!Fn(t))),UL=t=>Fr(t,e=>Wd(t.state,e,Fn(t)));function r_(t,e){return Fr(t,n=>t.moveVertically(n,e))}const i_=t=>r_(t,!1),o_=t=>r_(t,!0);function s_(t,e){return Fr(t,n=>t.moveVertically(n,e,HQ(t).height))}const aw=t=>s_(t,!1),uw=t=>s_(t,!0),ZL=t=>Fr(t,e=>Ko(t,e,!0)),YL=t=>Fr(t,e=>Ko(t,e,!1)),zL=t=>Fr(t,e=>Ko(t,e,!Fn(t))),qL=t=>Fr(t,e=>Ko(t,e,Fn(t))),GL=t=>Fr(t,e=>J.cursor(t.lineBlockAt(e.head).from)),HL=t=>Fr(t,e=>J.cursor(t.lineBlockAt(e.head).to)),cw=({state:t,dispatch:e})=>(e(Ii(t,{anchor:0})),!0),fw=({state:t,dispatch:e})=>(e(Ii(t,{anchor:t.doc.length})),!0),hw=({state:t,dispatch:e})=>(e(Ii(t,{anchor:t.selection.main.anchor,head:0})),!0),dw=({state:t,dispatch:e})=>(e(Ii(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),KL=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),JL=({state:t,dispatch:e})=>{let n=Zd(t).map(({from:r,to:i})=>J.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:J.create(n),userEvent:"select"})),!0},ej=({state:t,dispatch:e})=>{let n=ta(t.selection,r=>{var i;let o=_t(t).resolveInner(r.head,1);for(;!(o.from<r.from&&o.to>=r.to||o.to>r.to&&o.from<=r.from||!(!((i=o.parent)===null||i===void 0)&&i.parent));)o=o.parent;return J.range(o.to,o.from)});return e(Ii(t,n)),!0},tj=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=J.create([n.main]):n.main.empty||(r=J.create([J.cursor(n.main.head)])),r?(e(Ii(t,r)),!0):!1};function Ud(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:l}=o;if(s==l){let a=e(s);a<s?(n="delete.backward",a=Of(t,a,!1)):a>s&&(n="delete.forward",a=Of(t,a,!0)),s=Math.min(s,a),l=Math.max(l,a)}else s=Of(t,s,!1),l=Of(t,l,!0);return s==l?{range:o}:{changes:{from:s,to:l},range:J.cursor(s)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?Se.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Of(t,e,n){if(t instanceof Se)for(let r of t.state.facet(Se.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const l_=(t,e)=>Ud(t,n=>{let{state:r}=t,i=r.doc.lineAt(n),o,s;if(!e&&n>i.from&&n<i.from+200&&!/[^ \t]/.test(o=i.text.slice(0,n-i.from))){if(o[o.length-1]==" ")return n-1;let l=tc(o,r.tabSize),a=l%Zh(r)||Zh(r);for(let u=0;u<a&&o[o.length-1-u]==" ";u++)n--;s=n}else s=jn(i.text,n-i.from,e,e)+i.from,s==n&&i.number!=(e?r.doc.lines:1)&&(s+=e?1:-1);return s}),LO=t=>l_(t,!1),a_=t=>l_(t,!0),u_=(t,e)=>Ud(t,n=>{let r=n,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let l=null;;){if(r==(e?o.to:o.from)){r==n&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let a=jn(o.text,r-o.from,e)+o.from,u=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=s(u);if(l!=null&&c!=l)break;(u!=" "||r!=n)&&(l=c),r=a}return r}),c_=t=>u_(t,!1),nj=t=>u_(t,!0),f_=t=>Ud(t,e=>{let n=t.lineBlockAt(e).to;return e<n?n:Math.min(t.state.doc.length,e+1)}),rj=t=>Ud(t,e=>{let n=t.lineBlockAt(e).from;return e>n?n:Math.max(0,e-1)}),ij=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:pt.of(["",""])},range:J.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},oj=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:jn(o.text,i-o.from,!1)+o.from,l=i==o.to?i+1:jn(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:l,insert:t.doc.slice(i,l).append(t.doc.slice(s,i))},range:J.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Zd(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function h_(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Zd(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),l=s.length+1;if(n){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let a of o.ranges)i.push(J.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let a of o.ranges)i.push(J.range(a.anchor-l,a.head-l))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:J.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const sj=({state:t,dispatch:e})=>h_(t,e,!1),lj=({state:t,dispatch:e})=>h_(t,e,!0);function d_(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Zd(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const aj=({state:t,dispatch:e})=>d_(t,e,!1),uj=({state:t,dispatch:e})=>d_(t,e,!0),cj=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Zd(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=ta(e.selection,i=>t.moveVertically(i,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function fj(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=_t(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(qe.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from?{from:r.to,to:i.from}:null}const hj=p_(!1),dj=p_(!0);function p_(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,l=e.doc.lineAt(o),a=!t&&o==s&&fj(e,o);t&&(o=s=(s<=l.to?l:e.doc.lineAt(s)).to);let u=new Vd(e,{simulateBreak:o,simulateDoubleBreak:!!a}),c=Tv(u,o);for(c==null&&(c=/^\s*/.exec(e.doc.lineAt(o).text)[0].length);s<l.to&&/\s/.test(l.text[s-l.from]);)s++;a?{from:o,to:s}=a:o>l.from&&o<l.from+100&&!/\S/.test(l.text.slice(0,o))&&(o=l.from);let f=["",Lu(e,c)];return a&&f.push(Lu(e,u.lineIndent(l.from,-1))),{changes:{from:o,to:s,insert:pt.of(f)},range:J.cursor(o+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Nv(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let l=t.doc.lineAt(s);l.number>n&&(r.empty||r.to>l.from)&&(e(l,i,r),n=l.number),s=l.to+1}let o=t.changes(i);return{changes:i,range:J.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const pj=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Vd(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=Nv(t,(o,s,l)=>{let a=Tv(r,o.from);if(a==null)return;/\S/.test(o.text)||(a=0);let u=/^\s*/.exec(o.text)[0],c=Lu(t,a);(u!=c||l.from<o.from+u.length)&&(n[o.from]=a,s.push({from:o.from,to:o.from+u.length,insert:c}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},gj=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Nv(t,(n,r)=>{r.push({from:n.from,insert:t.facet(jd)})}),{userEvent:"input.indent"})),!0),mj=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Nv(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=tc(i,t.tabSize),s=0,l=Lu(t,Math.max(0,o-Zh(t)));for(;s<i.length&&s<l.length&&i.charCodeAt(s)==l.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:l.slice(s)})}),{userEvent:"delete.dedent"})),!0),Oj=[{key:"Ctrl-b",run:UQ,shift:e_,preventDefault:!0},{key:"Ctrl-f",run:ZQ,shift:t_},{key:"Ctrl-p",run:qQ,shift:i_},{key:"Ctrl-n",run:GQ,shift:o_},{key:"Ctrl-a",run:LL,shift:GL},{key:"Ctrl-e",run:jL,shift:HL},{key:"Ctrl-d",run:a_},{key:"Ctrl-h",run:LO},{key:"Ctrl-k",run:f_},{key:"Ctrl-Alt-h",run:c_},{key:"Ctrl-o",run:ij},{key:"Ctrl-t",run:oj},{key:"Ctrl-v",run:NO}],yj=[{key:"ArrowLeft",run:UQ,shift:e_,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:_L,shift:FL,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:IL,shift:zL,preventDefault:!0},{key:"ArrowRight",run:ZQ,shift:t_,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:$L,shift:XL,preventDefault:!0},{mac:"Cmd-ArrowRight",run:NL,shift:qL,preventDefault:!0},{key:"ArrowUp",run:qQ,shift:i_,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cw,shift:hw},{mac:"Ctrl-ArrowUp",run:lw,shift:aw},{key:"ArrowDown",run:GQ,shift:o_,preventDefault:!0},{mac:"Cmd-ArrowDown",run:fw,shift:dw},{mac:"Ctrl-ArrowDown",run:NO,shift:uw},{key:"PageUp",run:lw,shift:aw},{key:"PageDown",run:NO,shift:uw},{key:"Home",run:ML,shift:YL,preventDefault:!0},{key:"Mod-Home",run:cw,shift:hw},{key:"End",run:DL,shift:ZL,preventDefault:!0},{key:"Mod-End",run:fw,shift:dw},{key:"Enter",run:hj},{key:"Mod-a",run:KL},{key:"Backspace",run:LO,shift:LO},{key:"Delete",run:a_},{key:"Mod-Backspace",mac:"Alt-Backspace",run:c_},{key:"Mod-Delete",mac:"Alt-Delete",run:nj},{mac:"Mod-Backspace",run:rj},{mac:"Mod-Delete",run:f_}].concat(Oj.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),vj=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:AL,shift:WL},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:RL,shift:UL},{key:"Alt-ArrowUp",run:sj},{key:"Shift-Alt-ArrowUp",run:aj},{key:"Alt-ArrowDown",run:lj},{key:"Shift-Alt-ArrowDown",run:uj},{key:"Escape",run:tj},{key:"Mod-Enter",run:dj},{key:"Alt-l",mac:"Ctrl-l",run:JL},{key:"Mod-i",run:ej,preventDefault:!0},{key:"Mod-[",run:mj},{key:"Mod-]",run:gj},{key:"Mod-Alt-\\",run:pj},{key:"Shift-Mod-k",run:cj},{key:"Shift-Mod-\\",run:BL},{key:"Mod-/",run:uL},{key:"Alt-A",run:fL}].concat(yj);function Ct(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)g_(t,arguments[e]);return t}function g_(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)g_(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}const pw=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Fl{constructor(e,n,r=0,i=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?l=>o(pw(l)):pw,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Cn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=dv(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Ar(e);let i=this.normalize(n);for(let o=0,s=r;;o++){let l=i.charCodeAt(o),a=this.match(l,s);if(a)return this.value=a,this;if(o==i.length-1)break;s==r&&o<n.length&&n.charCodeAt(o)==l&&s++}}}match(e,n){let r=null;for(let i=0;i<this.matches.length;i+=2){let o=this.matches[i],s=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[i+1],to:n+1}:(this.matches[i]++,s=!0)),s||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:n+1}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferPos)&&(r=null),r}}typeof Symbol<"u"&&(Fl.prototype[Symbol.iterator]=function(){return this});const m_={from:-1,to:-1,match:/.*/.exec("")},Lv="gm"+(/x/.unicode==null?"":"u");class O_{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=m_,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new y_(e,n,r,i,o);this.re=new RegExp(n,Lv+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=Gh(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Gh(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const wg=new WeakMap;class Pl{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=wg.get(e);if(!i||i.from>=r||i.to<=n){let l=new Pl(n,e.sliceString(n,r));return wg.set(e,l),l}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),wg.set(e,new Pl(s,o)),new Pl(n,o.slice(n-s,r-s))}}class y_{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=m_,this.matchPos=Gh(e,i),this.re=new RegExp(n,Lv+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=Pl.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Gh(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Pl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(O_.prototype[Symbol.iterator]=y_.prototype[Symbol.iterator]=function(){return this});function Sj(t){try{return new RegExp(t,Lv),!0}catch{return!1}}function Gh(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function jO(t){let e=Ct("input",{class:"cm-textfield",name:"line"}),n=Ct("form",{class:"cm-gotoLine",onkeydown:i=>{i.keyCode==27?(i.preventDefault(),t.dispatch({effects:Hh.of(!1)}),t.focus()):i.keyCode==13&&(i.preventDefault(),r())},onsubmit:i=>{i.preventDefault(),r()}},Ct("label",t.state.phrase("Go to line"),": ",e)," ",Ct("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function r(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:o}=t,s=o.doc.lineAt(o.selection.main.head),[,l,a,u,c]=i,f=u?+u.slice(1):0,h=a?+a:s.number;if(a&&c){let p=h/100;l&&(p=p*(l=="-"?-1:1)+s.number/o.doc.lines),h=Math.round(o.doc.lines*p)}else a&&l&&(h=h*(l=="-"?-1:1)+s.number);let d=o.doc.line(Math.max(1,Math.min(o.doc.lines,h)));t.dispatch({effects:Hh.of(!1),selection:J.cursor(d.from+Math.max(0,Math.min(f,d.length))),scrollIntoView:!0}),t.focus()}return{dom:n}}const Hh=tt.define(),gw=On.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Hh)&&(t=n.value);return t},provide:t=>Du.from(t,e=>e?jO:null)}),bj=t=>{let e=Ru(t,jO);if(!e){let n=[Hh.of(!0)];t.state.field(gw,!1)==null&&n.push(tt.appendConfig.of([gw,wj])),t.dispatch({effects:n}),e=Ru(t,jO)}return e&&e.dom.querySelector("input").focus(),!0},wj=Se.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),kj={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},v_=xe.define({combine(t){return Mi(t,kj,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Pj(t){let e=[_j,Qj];return t&&e.push(v_.of(t)),e}const xj=Ve.mark({class:"cm-selectionMatch"}),Cj=Ve.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function mw(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Bt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Bt.Word)}function Ej(t,e,n,r){return t(e.sliceDoc(n,n+1))==Bt.Word&&t(e.sliceDoc(r-1,r))==Bt.Word}const Qj=qt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(v_),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Ve.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ve.none;let a=n.wordAt(i.head);if(!a)return Ve.none;s=n.charCategorizer(i.head),o=n.sliceDoc(a.from,a.to)}else{let a=i.to-i.from;if(a<e.minSelectionLength||a>200)return Ve.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(mw(s,n,i.from,i.to)&&Ej(s,n,i.from,i.to)))return Ve.none}else if(o=n.sliceDoc(i.from,i.to).trim(),!o)return Ve.none}let l=[];for(let a of t.visibleRanges){let u=new Fl(n.doc,o,a.from,a.to);for(;!u.next().done;){let{from:c,to:f}=u.value;if((!s||mw(s,n,c,f))&&(i.empty&&c<=i.from&&f>=i.to?l.push(Cj.range(c,f)):(c>=i.to||f<=i.from)&&l.push(xj.range(c,f)),l.length>e.maxMatches))return Ve.none}}return Ve.set(l)}},{decorations:t=>t.decorations}),_j=Se.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),$j=({state:t,dispatch:e})=>{let{selection:n}=t,r=J.create(n.ranges.map(i=>t.wordAt(i.head)||J.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function Tj(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,l=new Fl(t.doc,e,r[r.length-1].to);;)if(l.next(),l.done){if(s)return null;l=new Fl(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(a=>a.from==l.value.from))continue;if(o){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const Aj=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return $j({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=Tj(t,r);return i?(e(t.update({selection:t.selection.addRange(J.range(i.from,i.to),!1),effects:Se.scrollIntoView(i.to)})),!0):!1},jv=xe.define({combine(t){return Mi(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Wj(e)})}});class S_{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||Sj(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
|
|
75
|
+
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Ij(this):new Dj(this)}getCursor(e,n=0,r){let i=e.doc?e:ct.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Gs(this,i,n,r):qs(this,i,n,r)}}class b_{constructor(e){this.spec=e}}function qs(t,e,n,r){return new Fl(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?Rj(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Rj(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(Kh(i,n-o))!=Bt.Word||e(Jh(i,n-o))!=Bt.Word)&&(e(Jh(i,r-o))!=Bt.Word||e(Kh(i,r-o))!=Bt.Word))}class Dj extends b_{constructor(e){super(e)}nextMatch(e,n,r){let i=qs(this.spec,e,r,e.doc.length).nextOverlapping();return i.done&&(i=qs(this.spec,e,0,n).nextOverlapping()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=qs(this.spec,e,o,i),l=null;for(;!s.nextOverlapping().done;)l=s.value;if(l)return l;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=qs(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=qs(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Gs(t,e,n,r){return new O_(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Mj(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Kh(t,e){return t.slice(jn(t,e,!1),e)}function Jh(t,e){return t.slice(e,jn(t,e))}function Mj(t){return(e,n,r)=>!r[0].length||(t(Kh(r.input,r.index))!=Bt.Word||t(Jh(r.input,r.index))!=Bt.Word)&&(t(Jh(r.input,r.index+r[0].length))!=Bt.Word||t(Kh(r.input,r.index+r[0].length))!=Bt.Word)}class Ij extends b_{nextMatch(e,n,r){let i=Gs(this.spec,e,r,e.doc.length).next();return i.done&&(i=Gs(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=Gs(this.spec,e,o,r),l=null;for(;!s.next().done;)l=s.value;if(l&&(o==n||l.from>o+10))return l;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r<e.match.length?e.match[r]:n))}matchAll(e,n){let r=Gs(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Gs(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const ju=tt.define(),Vv=tt.define(),No=On.define({create(t){return new kg(VO(t).create(),null)},update(t,e){for(let n of e.effects)n.is(ju)?t=new kg(n.value.create(),t.panel):n.is(Vv)&&(t=new kg(t.query,n.value?Bv:null));return t},provide:t=>Du.from(t,e=>e.panel)});class kg{constructor(e,n){this.query=e,this.panel=n}}const Nj=Ve.mark({class:"cm-searchMatch"}),Lj=Ve.mark({class:"cm-searchMatch cm-searchMatch-selected"}),jj=qt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(No))}update(t){let e=t.state.field(No);(e!=t.startState.field(No)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ve.none;let{view:n}=this,r=new Bo;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:l,to:a}=o[i];for(;i<s-1&&a>o[i+1].from-2*250;)a=o[++i].to;t.highlight(n.state,l,a,(u,c)=>{let f=n.state.selection.ranges.some(h=>h.from==u&&h.to==c);r.add(u,c,f?Lj:Nj)})}return r.finish()}},{decorations:t=>t.decorations});function cc(t){return e=>{let n=e.state.field(No,!1);return n&&n.query.spec.valid?t(e,n):w_(e)}}const ed=cc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);return r?(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Fv(t,r),userEvent:"select.search"}),!0):!1}),td=cc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);return i?(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Fv(t,i),userEvent:"select.search"}),!0):!1}),Vj=cc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:J.create(n.map(r=>J.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),Bj=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let l=new Fl(t.doc,t.sliceDoc(r,i));!l.next().done;){if(o.length>1e3)return!1;l.value.from==r&&(s=o.length),o.push(J.range(l.value.from,l.value.to))}return e(t.update({selection:J.create(o,s),userEvent:"select.search.matches"})),!0},Ow=cc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=[],l,a,u=[];if(o.from==r&&o.to==i&&(a=n.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:a}),o=e.nextMatch(n,o.from,o.to),u.push(Se.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let c=s.length==0||s[0].from>=o.to?0:o.to-o.from-a.length;l={anchor:o.from-c,head:o.to-c},u.push(Fv(t,o))}return t.dispatch({changes:s,selection:l,scrollIntoView:!!l,effects:u,userEvent:"input.replace"}),!0}),Fj=cc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Se.announce.of(r),userEvent:"input.replace.all"}),!0});function Bv(t){return t.state.facet(jv).createPanel(t)}function VO(t,e){var n,r,i,o;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let a=t.facet(jv);return new S_({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:a.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:a.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:a.literal,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:a.wholeWord})}const w_=t=>{let e=t.state.field(No,!1);if(e&&e.panel){let n=Ru(t,Bv);if(!n)return!1;let r=n.dom.querySelector("[main-field]");if(r&&r!=t.root.activeElement){let i=VO(t.state,e.query.spec);i.valid&&t.dispatch({effects:ju.of(i)}),r.focus(),r.select()}}else t.dispatch({effects:[Vv.of(!0),e?ju.of(VO(t.state,e.query.spec)):tt.appendConfig.of(Zj)]});return!0},k_=t=>{let e=t.state.field(No,!1);if(!e||!e.panel)return!1;let n=Ru(t,Bv);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Vv.of(!1)}),!0},Xj=[{key:"Mod-f",run:w_,scope:"editor search-panel"},{key:"F3",run:ed,shift:td,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ed,shift:td,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:k_,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Bj},{key:"Alt-g",run:bj},{key:"Mod-d",run:Aj,preventDefault:!0}];class Wj{constructor(e){this.view=e;let n=this.query=e.state.field(No).query.spec;this.commit=this.commit.bind(this),this.searchField=Ct("input",{value:n.search,placeholder:cr(e,"Find"),"aria-label":cr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ct("input",{value:n.replace,placeholder:cr(e,"Replace"),"aria-label":cr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ct("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Ct("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Ct("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return Ct("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=Ct("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>ed(e),[cr(e,"next")]),r("prev",()=>td(e),[cr(e,"previous")]),r("select",()=>Vj(e),[cr(e,"all")]),Ct("label",null,[this.caseField,cr(e,"match case")]),Ct("label",null,[this.reField,cr(e,"regexp")]),Ct("label",null,[this.wordField,cr(e,"by word")]),...e.state.readOnly?[]:[Ct("br"),this.replaceField,r("replace",()=>Ow(e),[cr(e,"replace")]),r("replaceAll",()=>Fj(e),[cr(e,"replace all")])],Ct("button",{name:"close",onclick:()=>k_(e),"aria-label":cr(e,"close"),type:"button"},["×"])])}commit(){let e=new S_({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:ju.of(e)}))}keydown(e){vN(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?td:ed)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Ow(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(ju)&&!r.value.eq(this.query)&&this.setQuery(r.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(jv).top}}function cr(t,e){return t.state.phrase(e)}const yf=30,vf=/[\s\.,:;?!]/;function Fv(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-yf),s=Math.min(i,n+yf),l=t.state.sliceDoc(o,s);if(o!=r.from){for(let a=0;a<yf;a++)if(!vf.test(l[a+1])&&vf.test(l[a])){l=l.slice(a);break}}if(s!=i){for(let a=l.length-1;a>l.length-yf;a--)if(!vf.test(l[a-1])&&vf.test(l[a])){l=l.slice(0,a);break}}return Se.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}const Uj=Se.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"}}),Zj=[No,Ho.lowest(jj),Uj];class Xv{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=_t(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(x_(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function yw(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Yj(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=yw(e)+yw(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function P_(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Yj(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function zj(t,e){return n=>{for(let r=_t(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}let vw=class{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}};function Lo(t){return t.selection.main.from}function x_(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const C_=Di.define();function qj(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(l=>l!=i&&n!=r&&t.sliceDoc(l.from+o,l.from+s)!=t.sliceDoc(n,r)?{range:l}:{changes:{from:l.from+o,to:r==i.from?l.to:l.from+s,insert:e},range:J.cursor(l.from+o+e.length)})),{userEvent:"input.complete"})}const Sw=new WeakMap;function Gj(t){if(!Array.isArray(t))return t;let e=Sw.get(t);return e||Sw.set(t,e=P_(t)),e}const Wv=tt.define(),Vu=tt.define();class Hj{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=Cn(e,n),i=Ar(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(Cn(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,!0}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let m=Cn(e,0),v=Ar(m),b=v==e.length?0:-100;if(m!=n[0])if(m==r[0])b+=-200;else return!1;return this.ret(b,[0,v])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=n.length,u=0;if(l<0){for(let m=0,v=Math.min(e.length,200);m<v&&u<a;){let b=Cn(e,m);(b==n[u]||b==r[u])&&(i[u++]=m),m+=Ar(b)}if(u<a)return!1}let c=0,f=0,h=!1,d=0,p=-1,g=-1,y=/[a-z]/.test(e),O=!0;for(let m=0,v=Math.min(e.length,200),b=0;m<v&&f<a;){let P=Cn(e,m);l<0&&(c<a&&P==n[c]&&(o[c++]=m),d<a&&(P==n[d]||P==r[d]?(d==0&&(p=m),g=m+1,d++):d=0));let E,T=P<255?P>=48&&P<=57||P>=97&&P<=122?2:P>=65&&P<=90?1:0:(E=dv(P))!=E.toLowerCase()?1:E!=E.toUpperCase()?2:0;(!m||T==1&&y||b==0&&T!=0)&&(n[f]==P||r[f]==P&&(h=!0)?s[f++]=m:s.length&&(O=!1)),b=T,m+=Ar(P)}return f==a&&s[0]==0&&O?this.result(-100+(h?-200:0),s,e):d==a&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-200+-700-e.length,[p,g]):f==a?this.result(-100+(h?-200:0)+-700+(O?0:-1100),s,e):n.length==2?!1:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let l=s+(this.astral?Ar(Cn(r,s)):1);o&&i[o-1]==s?i[o-1]=l:(i[o++]=s,i[o++]=l)}return this.ret(e-r.length,i)}}const rr=xe.define({combine(t){return Mi(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Kj,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>bw(e(r),n(r)),optionClass:(e,n)=>r=>bw(e(r),n(r)),addToOptions:(e,n)=>e.concat(n)})}});function bw(t,e){return t?e?t+" "+e:t:e}function Kj(t,e,n,r,i){let o=t.textDirection==Ut.RTL,s=o,l=!1,a="top",u,c,f=e.left-i.left,h=i.right-e.right,d=r.right-r.left,p=r.bottom-r.top;if(s&&f<Math.min(d,h)?s=!1:!s&&h<Math.min(d,f)&&(s=!0),d<=(s?f:h))u=Math.max(i.top,Math.min(n.top,i.bottom-p))-e.top,c=Math.min(400,s?f:h);else{l=!0,c=Math.min(400,(o?e.right:i.right-e.left)-30);let g=i.bottom-e.bottom;g>=p||g>e.top?u=n.bottom-e.top:(a="bottom",u=e.bottom-n.top)}return{style:`${a}: ${u}px; max-width: ${c}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":s?"left":"right")}}function Jj(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i){let o=document.createElement("span");o.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let a=0;a<i.length;){let u=i[a++],c=i[a++];u>l&&o.appendChild(document.createTextNode(s.slice(l,u)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(u,c))),f.className="cm-completionMatchedText",l=c}return l<s.length&&o.appendChild(document.createTextNode(s.slice(l))),o},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function ww(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class eV{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,l=e.state.facet(rr);this.optionContent=Jj(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=ww(o.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{for(let u=a.target,c;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(c=/-(\d+)$/.exec(u.id))&&+c[1]<o.length){this.applyCompletion(e,o[+c[1]]),a.preventDefault();return}}),this.dom.addEventListener("focusout",a=>{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(rr).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Vu.of(null)})}),this.list=this.dom.appendChild(this.createListBox(o,i.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var n,r,i;let o=e.state.field(this.stateField),s=e.startState.field(this.stateField);this.updateTooltipClass(e.state),o!=s&&(this.updateSel(),((n=o.open)===null||n===void 0?void 0:n.disabled)!=((r=s.open)===null||r===void 0?void 0:r.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((i=o.open)===null||i===void 0)&&i.disabled)))}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=ww(n.options.length,n.selected,this.view.state.facet(rr).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>vr(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&nV(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(rr).positionInfo(this.view,n,i,r,o)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let s=r.from;s<r.to;s++){let{completion:l,match:a}=e[s],{section:u}=l;if(u){let h=typeof u=="string"?u:u.name;if(h!=o&&(s>r.from||r.from==0))if(o=h,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=h}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let h of this.optionContent){let d=h(l,this.view.state,a);d&&c.appendChild(d)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function tV(t,e){return n=>new eV(n,t,e)}function nV(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.top<n.top?t.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(t.scrollTop+=r.bottom-n.bottom)}function kw(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function rV(t,e){let n=[],r=null,i=a=>{n.push(a);let{section:u}=a.completion;if(u){r||(r=[]);let c=typeof u=="string"?u:u.name;r.some(f=>f.name==c)||r.push(typeof u=="string"?{name:c}:u)}};for(let a of t)if(a.hasResult()){let u=a.result.getMatch;if(a.result.filter===!1)for(let c of a.result.options)i(new vw(c,a.source,u?u(c):[],1e9-n.length));else{let c=new Hj(e.sliceDoc(a.from,a.to));for(let f of a.result.options)if(c.match(f.label)){let h=f.displayLabel?u?u(f,c.matched):[]:c.matched;i(new vw(f,a.source,h,c.score+(f.boost||0)))}}}if(r){let a=Object.create(null),u=0,c=(f,h)=>{var d,p;return((d=f.rank)!==null&&d!==void 0?d:1e9)-((p=h.rank)!==null&&p!==void 0?p:1e9)||(f.name<h.name?-1:1)};for(let f of r.sort(c))u-=1e5,a[f.name]=u;for(let f of n){let{section:h}=f.completion;h&&(f.score+=a[typeof h=="string"?h:h.name])}}let o=[],s=null,l=e.facet(rr).compareCompletions;for(let a of n.sort((u,c)=>c.score-u.score||l(u.completion,c.completion))){let u=a.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?o.push(a):kw(a.completion)>kw(s)&&(o[o.length-1]=a),s=a.completion}return o}class dl{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new dl(this.options,Pw(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let s=rV(e,n);if(!s.length)return i&&e.some(a=>a.state==1)?new dl(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let l=n.facet(rr).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let a=i.options[i.selected].completion;for(let u=0;u<s.length;u++)if(s[u].completion==a){l=u;break}}return new dl(s,Pw(r,l),{pos:e.reduce((a,u)=>u.hasResult()?Math.min(a,u.from):a,1e8),create:tV(pr,__),above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new dl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class nd{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new nd(sV,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(rr),o=(r.override||n.languageDataAt("autocomplete",Lo(n)).map(Gj)).map(l=>(this.active.find(u=>u.source==l)||new er(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,a)=>l==this.active[a])&&(o=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!iV(o,this.active)?s=dl.build(o,n,this.id,s,r):s&&s.disabled&&!o.some(l=>l.state==1)&&(s=null),!s&&o.every(l=>l.state!=1)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new er(l.source,0):l));for(let l of e.effects)l.is(Q_)&&(s=s&&s.setSelected(l.value,this.id));return o==this.active&&s==this.open?this:new nd(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:oV}}function iV(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult;)n++;for(;r<e.length&&!e[r].hasResult;)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const oV={"aria-autocomplete":"list"};function Pw(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const sV=[];function BO(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class er{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=BO(e),i=this;r?i=i.handleUserEvent(e,r,n):e.docChanged?i=i.handleChange(e):e.selection&&i.state!=0&&(i=new er(i.source,0));for(let o of e.effects)if(o.is(Wv))i=new er(i.source,1,o.value?Lo(e.state):-1);else if(o.is(Vu))i=new er(i.source,0);else if(o.is(E_))for(let s of o.value)s.source==i.source&&(i=s);return i}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new er(this.source,1)}handleChange(e){return e.changes.touchesRange(Lo(e.startState))?new er(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new er(this.source,this.state,e.mapPos(this.explicitPos))}}class xl extends er{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}handleUserEvent(e,n,r){var i;let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=Lo(e.state);if((this.explicitPos<0?l<=o:l<this.from)||l>s||n=="delete"&&Lo(e.startState)==this.from)return new er(this.source,n=="input"&&r.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return lV(this.result.validFor,e.state,o,s)?new xl(this.source,a,this.result,o,s):this.result.update&&(u=this.result.update(this.result,o,s,new Xv(e.state,l,a>=0)))?new xl(this.source,a,u,u.from,(i=u.to)!==null&&i!==void 0?i:Lo(e.state)):new er(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new er(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new xl(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function lV(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):x_(t,!0).test(i)}const E_=tt.define({map(t,e){return t.map(n=>n.map(e))}}),Q_=tt.define(),pr=On.define({create(){return nd.start()},update(t,e){return t.update(e)},provide:t=>[kv.from(t,e=>e.tooltip),Se.contentAttributes.from(t,e=>e.attrs)]});function __(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(pr).active.find(i=>i.source==e.source);return r instanceof xl?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},qj(t.state,n,r.from,r.to)),{annotations:C_.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}function Sf(t,e="option"){return n=>{let r=n.state.field(pr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(rr).interactionDelay)return!1;let i=1,o;e=="page"&&(o=aQ(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return l<0?l=e=="page"?0:s-1:l>=s&&(l=e=="page"?s-1:0),n.dispatch({effects:Q_.of(l)}),!0}}const aV=t=>{let e=t.state.field(pr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(rr).interactionDelay?!1:__(t,e.open.options[e.open.selected])},uV=t=>t.state.field(pr,!1)?(t.dispatch({effects:Wv.of(!0)}),!0):!1,cV=t=>{let e=t.state.field(pr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Vu.of(null)}),!0)};class fV{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const xw=50,hV=50,dV=1e3,pV=qt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(pr).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(pr);if(!t.selectionSet&&!t.docChanged&&t.startState.field(pr)==e)return;let n=t.transactions.some(r=>(r.selection||r.docChanged)&&!BO(r));for(let r=0;r<this.running.length;r++){let i=this.running[r];if(n||i.updates.length+t.transactions.length>hV&&Date.now()-i.time>dV){for(let o of i.context.abortListeners)try{o()}catch(s){vr(this.view.state,s)}i.context.abortListeners=null,this.running.splice(r--,1)}else i.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(i=>i.active.source==r.source))?setTimeout(()=>this.startUpdate(),xw):-1,this.composing!=0)for(let r of t.transactions)BO(r)=="input"?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(pr);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Lo(e),r=new Xv(e,n,t.explicitPos==n),i=new fV(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:Vu.of(null)}),vr(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),xw))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(rr);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let s=new xl(i.active.source,i.active.explicitPos,i.done,i.done.from,(t=i.done.to)!==null&&t!==void 0?t:Lo(i.updates.length?i.updates[0].startState:this.view.state));for(let l of i.updates)s=s.update(l,n);if(s.hasResult()){e.push(s);continue}}let o=this.view.state.field(pr).active.find(s=>s.source==i.active.source);if(o&&o.state==1)if(i.done==null){let s=new er(i.active.source,0);for(let l of i.updates)s=s.update(l,n);s.state!=1&&e.push(s)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:E_.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(pr,!1);if(e&&e.tooltip&&this.view.state.facet(rr).closeOnBlur){let n=e.open&&aQ(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:Vu.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Wv.of(!1)}),20),this.composing=0}}}),$_=Se.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"},".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 gV{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class Uv{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,dn.TrackDel),r=e.mapPos(this.to,1,dn.TrackDel);return n==null||r==null?null:new Uv(this.field,n,r)}}class Zv{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),s=/^\s*/.exec(o.text)[0];for(let a of this.lines){if(r.length){let u=s,c=/^\t*/.exec(a)[0].length;for(let f=0;f<c;f++)u+=e.facet(jd);i.push(n+u.length-c),a=u+a.slice(c)}r.push(a),n+=a.length+1}let l=this.fieldPositions.map(a=>new Uv(a.field,i[a.line]+a.from,i[a.line]+a.to));return{text:r,ranges:l}}static parse(e){let n=[],r=[],i=[],o;for(let s of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let l=o[1]?+o[1]:null,a=o[2]||o[3]||"",u=-1;for(let c=0;c<n.length;c++)(l!=null?n[c].seq==l:a&&n[c].name==a)&&(u=c);if(u<0){let c=0;for(;c<n.length&&(l==null||n[c].seq!=null&&n[c].seq<l);)c++;n.splice(c,0,{seq:l,name:a}),u=c;for(let f of i)f.field>=u&&f.field++}i.push(new gV(u,r.length,o.index,o.index+a.length)),s=s.slice(0,o.index)+a+s.slice(o.index+o[0].length)}for(let l;l=/\\([{}])/.exec(s);){s=s.slice(0,l.index)+l[1]+s.slice(l.index+l[0].length);for(let a of i)a.line==r.length&&a.from>l.index&&(a.from--,a.to--)}r.push(s)}return new Zv(r,i)}}let mV=Ve.widget({widget:new class extends oo{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),OV=Ve.mark({class:"cm-snippetField"});class na{constructor(e,n){this.ranges=e,this.active=n,this.deco=Ve.set(e.map(r=>(r.from==r.to?mV:OV).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new na(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const fc=tt.define({map(t,e){return t&&t.map(e)}}),yV=tt.define(),Bu=On.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(fc))return n.value;if(n.is(yV)&&t)return new na(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Se.decorations.from(t,e=>e?e.deco:Ve.none)});function Yv(t,e){return J.create(t.filter(n=>n.field==e).map(n=>J.range(n.from,n.to)))}function vV(t){let e=Zv.parse(t);return(n,r,i,o)=>{let{text:s,ranges:l}=e.instantiate(n.state,i),a={changes:{from:i,to:o,insert:pt.of(s)},scrollIntoView:!0,annotations:r?C_.of(r):void 0};if(l.length&&(a.selection=Yv(l,0)),l.length>1){let u=new na(l,0),c=a.effects=[fc.of(u)];n.state.field(Bu,!1)===void 0&&c.push(tt.appendConfig.of([Bu,PV,xV,$_]))}n.dispatch(n.state.update(a))}}function T_(t){return({state:e,dispatch:n})=>{let r=e.field(Bu,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(s=>s.field==i+t);return n(e.update({selection:Yv(r.ranges,i),effects:fc.of(o?null:new na(r.ranges,i))})),!0}}const SV=({state:t,dispatch:e})=>t.field(Bu,!1)?(e(t.update({effects:fc.of(null)})),!0):!1,bV=T_(1),wV=T_(-1),kV=[{key:"Tab",run:bV,shift:wV},{key:"Escape",run:SV}],Cw=xe.define({combine(t){return t.length?t[0]:kV}}),PV=Ho.highest(ic.compute([Cw],t=>t.facet(Cw)));function Kn(t,e){return Object.assign(Object.assign({},e),{apply:vV(t)})}const xV=Se.domEventHandlers({mousedown(t,e){let n=e.state.field(Bu,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:Yv(n.ranges,i.field),effects:fc.of(n.ranges.some(o=>o.field>i.field)?new na(n.ranges,i.field):null)}),!0)}}),Fu={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},gs=tt.define({map(t,e){let n=e.mapPos(t,-1,dn.TrackAfter);return n??void 0}}),zv=new class extends Es{};zv.startSide=1;zv.endSide=-1;const A_=On.define({create(){return Ot.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,r=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(r,-1)&&(t=Ot.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(gs)&&(t=t.update({add:[zv.range(n.value,n.value+1)]}));return t}});function CV(){return[QV,A_]}const Pg="()[]{}<>";function R_(t){for(let e=0;e<Pg.length;e+=2)if(Pg.charCodeAt(e)==t)return Pg.charAt(e+1);return dv(t<128?t:t+1)}function D_(t,e){return t.languageDataAt("closeBrackets",e)[0]||Fu}const EV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),QV=Se.inputHandler.of((t,e,n,r)=>{if((EV?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Ar(Cn(r,0))==1||e!=i.from||n!=i.to)return!1;let o=TV(t.state,r);return o?(t.dispatch(o),!0):!1}),_V=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=D_(t,t.selection.main.head).brackets||Fu.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let l=AV(t.doc,s.head);for(let a of r)if(a==l&&Yd(t.doc,s.head)==R_(Cn(a,0)))return{changes:{from:s.head-a.length,to:s.head+a.length},range:J.cursor(s.head-a.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},$V=[{key:"Backspace",run:_V}];function TV(t,e){let n=D_(t,t.selection.main.head),r=n.brackets||Fu.brackets;for(let i of r){let o=R_(Cn(i,0));if(e==i)return o==i?MV(t,i,r.indexOf(i+i+i)>-1,n):RV(t,i,o,n.before||Fu.before);if(e==o&&M_(t,t.selection.main.from))return DV(t,i,o)}return null}function M_(t,e){let n=!1;return t.field(A_).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function Yd(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Ar(Cn(n,0)))}function AV(t,e){let n=t.sliceString(e-2,e);return Ar(Cn(n,0))==n.length?n:n.slice(1)}function RV(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:gs.of(s.to+e.length),range:J.range(s.anchor+e.length,s.head+e.length)};let l=Yd(t.doc,s.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:s.head},effects:gs.of(s.head+e.length),range:J.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function DV(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&Yd(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:J.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function MV(t,e,n,r){let i=r.stringPrefixes||Fu.stringPrefixes,o=null,s=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:gs.of(l.to+e.length),range:J.range(l.anchor+e.length,l.head+e.length)};let a=l.head,u=Yd(t.doc,a),c;if(u==e){if(Ew(t,a))return{changes:{insert:e+e,from:a},effects:gs.of(a+e.length),range:J.cursor(a+e.length)};if(M_(t,a)){let h=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+h.length,insert:h},range:J.cursor(a+h.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(c=Qw(t,a-2*e.length,i))>-1&&Ew(t,c))return{changes:{insert:e+e+e+e,from:a},effects:gs.of(a+e.length),range:J.cursor(a+e.length)};if(t.charCategorizer(a)(u)!=Bt.Word&&Qw(t,a,i)>-1&&!IV(t,a,e,i))return{changes:{insert:e+e,from:a},effects:gs.of(a+e.length),range:J.cursor(a+e.length)}}return{range:o=l}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Ew(t,e){let n=_t(t).resolveInner(e+1);return n.parent&&n.from==e}function IV(t,e,n,r){let i=_t(t).resolveInner(e,-1),o=r.reduce((s,l)=>Math.max(s,l.length),0);for(let s=0;s<5;s++){let l=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),a=l.indexOf(n);if(!a||a>-1&&r.indexOf(l.slice(0,a))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+a;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function Qw(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Bt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Bt.Word)return o}return-1}function NV(t={}){return[pr,rr.of(t),pV,LV,$_]}const I_=[{key:"Ctrl-Space",run:uV},{key:"Escape",run:cV},{key:"ArrowDown",run:Sf(!0)},{key:"ArrowUp",run:Sf(!1)},{key:"PageDown",run:Sf(!0,"page")},{key:"PageUp",run:Sf(!1,"page")},{key:"Enter",run:aV}],LV=Ho.highest(ic.computeN([rr],t=>t.facet(rr).defaultKeymap?[I_]:[]));class jV{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class as{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(pl).markerFilter;o&&(i=o(i));let s=Ve.set(i.map(l=>l.from==l.to||l.from==l.to-1&&r.doc.lineAt(l.from).to==l.from?Ve.widget({widget:new qV(l),diagnostic:l}).range(l.from):Ve.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity},diagnostic:l}).range(l.from,l.to)),!0);return new as(s,n,Xl(s))}}function Xl(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new jV(i,o,s.diagnostic),!1}),r}function VV(t,e){return!!(t.effects.some(n=>n.is(qv))||t.changes.touchesRange(e.pos))}function N_(t,e){return t.field(Or,!1)?e:e.concat(tt.appendConfig.of([Or,Se.decorations.compute([Or],n=>{let{selected:r,panel:i}=n.field(Or);return!r||!i||r.from==r.to?Ve.none:Ve.set([FV.range(r.from,r.to)])}),i5(XV,{hideOn:VV}),HV]))}function BV(t,e){return{effects:N_(t,[qv.of(e)])}}const qv=tt.define(),Gv=tt.define(),L_=tt.define(),Or=On.define({create(){return new as(Ve.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),r=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=Xl(n,t.selected.diagnostic,i)||Xl(n,null,i)}t=new as(n,t.panel,r)}for(let n of e.effects)n.is(qv)?t=as.init(n.value,t.panel,e.state):n.is(Gv)?t=new as(t.diagnostics,n.value?zd.open:null,t.selected):n.is(L_)&&(t=new as(t.diagnostics,t.panel,n.value));return t},provide:t=>[Du.from(t,e=>e.panel),Se.decorations.from(t,e=>e.diagnostics)]}),FV=Ve.mark({class:"cm-lintRange cm-lintRange-active"});function XV(t,e,n){let{diagnostics:r}=t.state.field(Or),i=[],o=2e8,s=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(a,u,{spec:c})=>{e>=a&&e<=u&&(a==u||(e>a||n>0)&&(e<u||n<0))&&(i.push(c.diagnostic),o=Math.min(a,o),s=Math.max(u,s))});let l=t.state.facet(pl).tooltipFilter;return l&&(i=l(i)),i.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:WV(t,i)}}}:null}function WV(t,e){return Ct("ul",{class:"cm-tooltip-lint"},e.map(n=>V_(t,n,!1)))}const UV=t=>{let e=t.state.field(Or,!1);(!e||!e.panel)&&t.dispatch({effects:N_(t.state,[Gv.of(!0)])});let n=Ru(t,zd.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},_w=t=>{let e=t.state.field(Or,!1);return!e||!e.panel?!1:(t.dispatch({effects:Gv.of(!1)}),!0)},ZV=t=>{let e=t.state.field(Or,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},YV=[{key:"Mod-Shift-m",run:UV,preventDefault:!0},{key:"F8",run:ZV}],zV=qt.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(pl);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(t<this.lintTime-10)setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:e}=this.view,{sources:n}=e.facet(pl);Promise.all(n.map(r=>Promise.resolve(r(this.view)))).then(r=>{let i=r.reduce((o,s)=>o.concat(s));this.view.state.doc==e.doc&&this.view.dispatch(BV(this.view.state,i))},r=>{vr(this.view.state,r)})}}update(t){let e=t.state.facet(pl);(t.docChanged||e!=t.startState.facet(pl)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),pl=xe.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},Mi(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))},enables:zV});function j_(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function V_(t,e,n){var r;let i=n?j_(e.actions):[];return Ct("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Ct("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let l=!1,a=h=>{if(h.preventDefault(),l)return;l=!0;let d=Xl(t.state.field(Or).diagnostics,e);d&&o.apply(t,d.from,d.to)},{name:u}=o,c=i[s]?u.indexOf(i[s]):-1,f=c<0?u:[u.slice(0,c),Ct("u",u.slice(c,c+1)),u.slice(c+1)];return Ct("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[s]})"`}.`},f)}),e.source&&Ct("div",{class:"cm-diagnosticSource"},e.source))}class qV extends oo{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Ct("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class $w{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=V_(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class zd{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)_w(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=j_(o.actions);for(let l=0;l<s.length;l++)if(s[l].toUpperCase().charCodeAt(0)==i.keyCode){let a=Xl(this.view.state.field(Or).diagnostics,o);a&&o.actions[l].apply(e,a.from,a.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=Ct("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=Ct("div",{class:"cm-panel-lint"},this.list,Ct("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>_w(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Or).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Or),r=0,i=!1,o=null;for(e.between(0,this.view.state.doc.length,(s,l,{spec:a})=>{let u=-1,c;for(let f=r;f<this.items.length;f++)if(this.items[f].diagnostic==a.diagnostic){u=f;break}u<0?(c=new $w(this.view,a.diagnostic),this.items.splice(r,0,c),i=!0):(c=this.items[u],u>r&&(this.items.splice(r,u-r),i=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),o=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),r++});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new $w(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{s.top<l.top?this.list.scrollTop-=l.top-s.top:s.bottom>l.bottom&&(this.list.scrollTop+=s.bottom-l.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Or),r=Xl(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:L_.of(r)})}static open(e){return new zd(e)}}function GV(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function xg(t){return GV(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const HV=Se.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-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:xg("#d11")},".cm-lintRange-warning":{backgroundImage:xg("orange")},".cm-lintRange-info":{backgroundImage:xg("#999")},".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-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}}}),KV=(()=>[d5(),m5(),IN(),vL(),s3(),xN(),$N(),ct.allowMultipleSelections.of(!0),q5(),Rv(c3,{fallback:!0}),O3(),CV(),NV(),zN(),HN(),FN(),Pj(),ic.of([...$V,...vj,...Xj,...QL,...r3,...I_,...YV])])();class rd{constructor(e,n,r,i,o,s,l,a,u,c=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=l,this.bufferBase=a,this.curContext=u,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new rd(e,[],n,r,r,0,[],0,i?new Tw(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=o.dynamicPrecedence(i);if(s&&(this.score+=s),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),a=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-a;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let c=l?this.stack[l-1]:0,f=this.bufferBase+this.buffer.length-c;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,h,f+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,a)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,l=this.buffer.length;if(l==0&&s.parent&&(l=s.bufferBase-s.parent.bufferBase,s=s.parent),l>0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(n==r)return;if(s.buffer[l-2]>=n){s.buffer[l-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let o=e,{parser:s}=this.p;(r>this.pos||n<=s.maxNode)&&(this.pos=r,s.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(n,i),n<=s.maxNode&&this.buffer.push(n,i,r,4)}}apply(e,n,r){e&65536?this.reduce(e):this.shift(e,n,r)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new rd(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new JV(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((l,a)=>a&1&&l==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.score-=200,r.push(s)}return r}forceReduce(){let e=this.p.parser.stateSlot(this.state,5);if(!(e&65536))return!1;let{parser:n}=this.p;if(!n.validAction(this.state,e)){let r=e>>19,i=e&65535,o=this.stack.length-r*3;if(o<0||n.getGoto(this.stack[o],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!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.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.reducePos,this.reducePos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.reducePos,this.reducePos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new Tw(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Tw{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}var Aw;(function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth",t[t.MinBigReduction=2e3]="MinBigReduction"})(Aw||(Aw={}));class JV{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class id{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new id(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new id(this.stack,this.pos,this.index)}}function Fa(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),l=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let a=s-32;if(a>=46&&(a-=46,l=!0),o+=a,l)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class eh{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Rw=new eh;class e4{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Rw,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Rw,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Cl{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;B_(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Cl.prototype.contextual=Cl.prototype.fallback=Cl.prototype.extend=!1;class FO{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?Fa(e):e}token(e,n){let r=e.pos,i;for(;i=e.pos,B_(this.data,e,n,0,this.data,this.precTable),!(e.token.value>-1);){if(this.elseToken==null)return;if(e.next<0)break;e.advance(),e.reset(i+1,e.token)}i>r&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i-r))}}FO.prototype.contextual=Cl.prototype.fallback=Cl.prototype.extend=!1;class Ni{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function B_(t,e,n,r,i,o){let s=0,l=1<<r,{dialect:a}=n.p.parser;e:for(;l&t[s];){let u=t[s+1];for(let d=s+3;d<u;d+=2)if((t[d+1]&l)>0){let p=t[d];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||t4(p,e.token.value,i,o))){e.acceptToken(p);break}}let c=e.next,f=0,h=t[s+2];if(e.next<0&&h>f&&t[u+h*3-3]==65535&&t[u+h*3-3]==65535){s=t[u+h*3-1];continue e}for(;f<h;){let d=f+h>>1,p=u+d+(d<<1),g=t[p],y=t[p+1]||65536;if(c<g)h=d;else if(c>=y)f=d+1;else{s=t[p+2],e.advance();continue e}}break}}function Dw(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function t4(t,e,n,r){let i=Dw(n,r,e);return i<0||Dw(n,r,t)<i}const qr=typeof process<"u"&&process.env&&/\bparse\b/.test({}.LOG);let Cg=null;var Mw;(function(t){t[t.Margin=25]="Margin"})(Mw||(Mw={}));function Iw(t,e,n){let r=t.cursor(It.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}let n4=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Iw(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Iw(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof vt){if(s==e){if(s<this.safeFrom)return null;let l=s+o.length;if(l<=this.safeTo){let a=o.prop(qe.lookAhead);if(!a||l+a<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}};class r4{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new eh)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let u=0;u<o.length;u++){if(!(1<<u&s))continue;let c=o[u],f=this.tokens[u];if(!(r&&!c.fallback)&&((c.contextual||f.start!=e.pos||f.mask!=s||f.context!=l)&&(this.updateCachedToken(f,c,e),f.mask=s,f.context=l),f.lookAhead>f.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let h=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!c.extend&&(r=f,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return a&&e.setLookAhead(a),!r&&e.pos==this.stream.end&&(r=new eh,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new eh,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let l=o.specializers[s](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:l}=s;for(let a=0;a<2;a++)for(let u=s.stateSlot(o,a?2:1);;u+=3){if(l[u]==65535)if(l[u+1]==1)u=Wi(l,u+2);else{i==0&&l[u+1]==2&&(i=this.putAction(Wi(l,u+2),n,r,i));break}l[u]==n&&(i=this.putAction(Wi(l,u+1),n,r,i))}return i}}var Nw;(function(t){t[t.Distance=5]="Distance",t[t.MaxRemainingPerStep=3]="MaxRemainingPerStep",t[t.MinBufferLengthPrune=500]="MinBufferLengthPrune",t[t.ForceReduceLimit=10]="ForceReduceLimit",t[t.CutDepth=15e3]="CutDepth",t[t.CutTo=9e3]="CutTo",t[t.MaxLeftAssociativeReductionCount=300]="MaxLeftAssociativeReductionCount",t[t.MaxStackCount=12]="MaxStackCount"})(Nw||(Nw={}));class i4{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,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 e4(n,i),this.tokens=new r4(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[rd.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new n4(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let l=e[s];for(;;){if(this.tokens.mainToken=null,l.pos>n)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],o=[]),i.push(l);let a=this.tokens.getMainToken(l);o.push(a.value,a.end)}}break}}if(!r.length){let s=i&&s4(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw qr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((l,a)=>a.score-l.score);r.length>s;)r.pop();r.some(l=>l.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let l=r[s];for(let a=s+1;a<r.length;a++){let u=r[a];if(l.sameState(u)||l.buffer.length>500&&u.buffer.length>500)if((l.score-u.score||l.buffer.length-u.buffer.length)>0)r.splice(a--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=qr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?o.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!u||(f.prop(qe.contextHash)||0)==c))return e.useNode(f,h),qr&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof vt)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof vt&&f.positions[0]==0)f=d;else break}}let l=o.stateSlot(e.state,4);if(l>0)return e.reduce(l),qr&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let u=0;u<a.length;){let c=a[u++],f=a[u++],h=a[u++],d=u==a.length||!r,p=d?e:e.split();if(p.apply(c,f,h),qr&&console.log(s+this.stackID(p)+` (via ${c&65536?`reduce of ${o.getName(c&65535)}`:"shift"} for ${o.getName(f)} @ ${i}${p==e?"":", split"})`),d)return!0;p.pos>i?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Lw(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let l=e[s],a=n[s<<1],u=n[(s<<1)+1],c=qr?this.stackID(l)+" -> ":"";if(l.deadEnd&&(o||(o=!0,l.restart(),qr&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let f=l.split(),h=c;for(let d=0;f.forceReduce()&&d<10&&(qr&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));d++)qr&&(h=this.stackID(f)+" -> ");for(let d of l.recoverByInsert(a))qr&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,r);this.stream.end>l.pos?(u==l.pos&&(u++,a=0),l.recoverByDelete(a,u),qr&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Lw(l,r)):(!i||i.score<l.score)&&(i=l)}return i}stackToTree(e){return e.close(),vt.build({buffer:id.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Cg||(Cg=new WeakMap)).get(e);return n||Cg.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function Lw(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class o4{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Eg=t=>t;class F_{constructor(e){this.start=e.start,this.shift=e.shift||Eg,this.reduce=e.reduce||Eg,this.reuse=e.reuse||Eg,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Wl extends Qv{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<e.repeatNodeCount;l++)n.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<n.length;l++)i.push([]);function o(l,a,u){i[l].push([a,a.deserialize(String(u))])}if(e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=qe[a]);for(let u=1;u<l.length;){let c=l[u++];if(c>=0)o(c,a,l[u++]);else{let f=l[u+-c];for(let h=-c;h>0;h--)o(l[u++],a,f);u++}}}this.nodeSet=new sc(n.map((l,a)=>mn.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:i[a],top:r.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=hQ;let s=Fa(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(jw),this.states=Fa(e.states,Uint32Array),this.data=Fa(e.stateData),this.goto=Fa(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Cl(s,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new i4(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],l=s&1,a=i[o++];if(l&&r)return a;for(let u=o+(s>>1);o<u;o++)if(i[o]==e)return a;if(l)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Wi(r,o+2)];else{if(r[o+1]==2)return Wi(r,o+2);break}if(s==n||s==0)return Wi(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){if(n==this.stateSlot(e,4))return!0;for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Wi(this.data,r+2);else return!1;if(n==Wi(this.data,r+1))return!0}}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Wi(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Wl.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(l=>l.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=jw(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],l;(l=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new o4(e,r,i)}static deserialize(e){return new Wl(e)}}function Wi(t,e){return t[e]|t[e+1]<<16}function s4(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function jw(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const Vw=301,Bw=1,l4=2,Fw=302,a4=304,u4=305,c4=3,f4=4,h4=[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],X_=125,d4=59,Xw=47,p4=42,g4=43,m4=45,O4=new F_({start:!1,shift(t,e){return e==c4||e==f4||e==a4?t:e==u4},strict:!1}),y4=new Ni((t,e)=>{let{next:n}=t;(n==X_||n==-1||e.context)&&e.canShift(Fw)&&t.acceptToken(Fw)},{contextual:!0,fallback:!0}),v4=new Ni((t,e)=>{let{next:n}=t,r;h4.indexOf(n)>-1||n==Xw&&((r=t.peek(1))==Xw||r==p4)||n!=X_&&n!=d4&&n!=-1&&!e.context&&e.canShift(Vw)&&t.acceptToken(Vw)},{contextual:!0}),S4=new Ni((t,e)=>{let{next:n}=t;if((n==g4||n==m4)&&(t.advance(),n==t.next)){t.advance();let r=!e.context&&e.canShift(Bw);t.acceptToken(r?Bw:l4)}},{contextual:!0}),b4=Jl({"get set async static":S.modifier,"for while do if else switch try catch finally return throw break continue default case":S.controlKeyword,"in of await yield void typeof delete instanceof":S.operatorKeyword,"let var const function class extends":S.definitionKeyword,"import export from":S.moduleKeyword,"with debugger as new":S.keyword,TemplateString:S.special(S.string),super:S.atom,BooleanLiteral:S.bool,this:S.self,null:S.null,Star:S.modifier,VariableName:S.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":S.function(S.variableName),VariableDefinition:S.definition(S.variableName),Label:S.labelName,PropertyName:S.propertyName,PrivatePropertyName:S.special(S.propertyName),"CallExpression/MemberExpression/PropertyName":S.function(S.propertyName),"FunctionDeclaration/VariableDefinition":S.function(S.definition(S.variableName)),"ClassDeclaration/VariableDefinition":S.definition(S.className),PropertyDefinition:S.definition(S.propertyName),PrivatePropertyDefinition:S.definition(S.special(S.propertyName)),UpdateOp:S.updateOperator,LineComment:S.lineComment,BlockComment:S.blockComment,Number:S.number,String:S.string,Escape:S.escape,ArithOp:S.arithmeticOperator,LogicOp:S.logicOperator,BitOp:S.bitwiseOperator,CompareOp:S.compareOperator,RegExp:S.regexp,Equals:S.definitionOperator,Arrow:S.function(S.punctuation),": Spread":S.punctuation,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace,"InterpolationStart InterpolationEnd":S.special(S.brace),".":S.derefOperator,", ;":S.separator,"@":S.meta,TypeName:S.typeName,TypeDefinition:S.definition(S.typeName),"type enum interface implements namespace module declare":S.definitionKeyword,"abstract global Privacy readonly override":S.modifier,"is keyof unique infer":S.operatorKeyword,JSXAttributeValue:S.attributeValue,JSXText:S.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":S.angleBracket,"JSXIdentifier JSXNameSpacedName":S.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":S.attributeName,"JSXBuiltin/JSXIdentifier":S.standard(S.tagName)}),w4={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:219,private:219,protected:219,readonly:221,instanceof:240,satisfies:243,in:244,const:246,import:278,keyof:333,unique:337,infer:343,is:379,abstract:399,implements:401,type:403,let:406,var:408,interface:415,enum:419,namespace:425,module:427,declare:431,global:435,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},k4={__proto__:null,async:117,get:119,set:121,public:181,private:181,protected:181,static:183,abstract:185,override:187,readonly:193,accessor:195,new:383},P4={__proto__:null,"<":137},x4=Wl.deserialize({version:14,states:"$BhO`QUOOO%QQUOOO'TQWOOP(_OSOOO*mQ(CjO'#CfO*tOpO'#CgO+SO!bO'#CgO+bO07`O'#DZO-sQUO'#DaO.TQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0rQSO'#ETOOQO'#I_'#I_O0zQSO'#GjOOQO'#Eh'#EhO1VQSO'#EgO1[QSO'#EgO3^Q(CjO'#JbO5}Q(CjO'#JcO6kQSO'#FVO6pQ#tO'#FnOOQ(CY'#F_'#F_O6{O&jO'#F_O7ZQ,UO'#FuO8qQSO'#FtOOQ(CY'#Jc'#JcOOQ(CW'#Jb'#JbOOQQ'#J|'#J|O8vQSO'#IOO8{Q(C[O'#IPOOQQ'#JO'#JOOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9TQUO'#DzO%QQUO'#D|O9[QSO'#GjO9aQ,UO'#ClO9oQSO'#EfO9zQSO'#EqO:PQ,UO'#F^O:nQSO'#GjO:sQSO'#GnO;OQSO'#GnO;^QSO'#GqO;^QSO'#Gr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}'Q-OQ#l]R'Z;oT#hZ%ZS#gZ%ZU%y|},[U(V#d#f#iS-u(W(XQ-|(]Q0m+iQ2i-vU2l-z-{-}S6c2m2nR8s6d`#ZW#T#W%v'v(P+f-st#eZ|}#d#f#i%Z(W(X(]+i-v-z-{-}2m2n6dQ1d,[Q1w,pQ5y1oQ8e5zT<z&y+gT#^W%vS#]W%vS'w#T(PS'|#W+fS,u&y+gT-n'v-sT'O!c%wQ$hfR)l$mT)a$h)bR3f.pT*Q$u*SR*Y$xQ0S*{Q2p.TQ5X0|Q6h2tQ8P5[Q8v6gQ9m8OQ:V8uQ:m9oQ:z:XQ;U:nR;]:{lpOXr!X#a%]&d&f&g&i,^,c1g1jQ&^!TR,R&ZV%z|},[R0v+rR,Q&XQ%szR+d%tR+Y%nT&b!U&eT&c!U&eT1i,c1j",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList 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 : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression 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 in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration 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:362,context:O4,nodeProps:[["group",-26,6,14,16,62,198,202,205,206,208,211,214,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,102,103,112,113,130,133,135,136,137,138,140,141,161,162,164,"Expression",-23,24,26,30,34,36,38,165,167,169,170,172,173,174,176,177,178,180,181,182,192,194,196,197,"Type",-3,84,95,101,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",142,"JSXStartTag",154,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",143,"JSXSelfCloseEndTag JSX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%l!P~$RO(S~~",141,325),new FO("j~RQYZXz{^~^O'p~~aP!P!Qd~iO'q~~",25,307)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:13213,ts:13215},dynamicPrecedences:{76:1,78:1,162:1,190:1},specialized:[{term:311,get:t=>w4[t]||-1},{term:327,get:t=>k4[t]||-1},{term:67,get:t=>P4[t]||-1}],tokenPrec:13238}),W_=[Kn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Kn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Kn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Kn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Kn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Kn(`try {
|
|
76
|
+
\${}
|
|
77
|
+
} catch (\${error}) {
|
|
78
|
+
\${}
|
|
79
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),Kn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Kn(`if (\${}) {
|
|
80
|
+
\${}
|
|
81
|
+
} else {
|
|
82
|
+
\${}
|
|
83
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),Kn(`class \${name} {
|
|
84
|
+
constructor(\${params}) {
|
|
85
|
+
\${}
|
|
86
|
+
}
|
|
87
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),Kn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Kn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],C4=W_.concat([Kn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Kn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Kn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Ww=new gQ,U_=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ea(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const E4=["FunctionDeclaration"],Q4={FunctionDeclaration:Ea("function"),ClassDeclaration:Ea("class"),ClassExpression:()=>!0,EnumDeclaration:Ea("constant"),TypeAliasDeclaration:Ea("type"),NamespaceDeclaration:Ea("namespace"),VariableDefinition(t,e){t.matchContext(E4)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function Z_(t,e){let n=Ww.get(e);if(n)return n;let r=[],i=!0;function o(s,l){let a=t.sliceString(s.from,s.to);r.push({label:a,type:l})}return e.cursor(It.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let l=Q4[s.name];if(l&&l(s,o)||U_.has(s.name))return!1}else if(s.to-s.from>8192){for(let l of Z_(t,s.node))r.push(l);return!1}}),Ww.set(e,r),r}const Uw=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Y_=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function _4(t){let e=_t(t.state).resolveInner(t.pos,-1);if(Y_.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Uw.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)U_.has(i.name)&&(r=r.concat(Z_(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Uw}}const Ti=Vl.define({name:"javascript",parser:x4.configure({props:[lc.add({IfStatement:Kf({except:/^\s*({|else\b)/}),TryStatement:Kf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Y5,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:Z5({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Kf({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),ac.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":kQ,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),z_={test:t=>/^JSX/.test(t.name),facet:_v({commentTokens:{block:{open:"{/*",close:"*/}"}}})},q_=Ti.configure({dialect:"ts"},"typescript"),G_=Ti.configure({dialect:"jsx",props:[$v.add(t=>t.isTop?[z_]:void 0)]}),H_=Ti.configure({dialect:"jsx ts",props:[$v.add(t=>t.isTop?[z_]:void 0)]},"typescript");let K_=t=>({label:t,type:"keyword"});const J_="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(K_),$4=J_.concat(["declare","implements","private","protected","public"].map(K_));function Xa(t={}){let e=t.jsx?t.typescript?H_:G_:t.typescript?q_:Ti,n=t.typescript?C4.concat($4):W_.concat(J_);return new Nu(e,[Ti.data.of({autocomplete:zj(Y_,P_(n))}),Ti.data.of({autocomplete:_4}),t.jsx?R4:[]])}function T4(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Zw(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const A4=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),R4=Se.inputHandler.of((t,e,n,r,i)=>{if((A4?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Ti.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:s}=o,l=s.changeByRange(a=>{var u;let{head:c}=a,f=_t(s).resolveInner(c-1,-1),h;if(f.name=="JSXStartTag"&&(f=f.parent),!(s.doc.sliceString(c-1,c)!=r||f.name=="JSXAttributeValue"&&f.to>c)){if(r==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:"</>"}};if(r=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,p=d.parent;if(p&&d.from==c-2&&((h=Zw(s.doc,p.firstChild,c))||((u=p.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let g=`${h}>`;return{range:J.cursor(c+g.length,-1),changes:{from:c,insert:g}}}}else if(r==">"){let d=T4(f);if(d&&!/^\/?>|^<\//.test(s.doc.sliceString(c,c+2))&&(h=Zw(s.doc,d,c)))return{range:a,changes:{from:c,insert:`</${h}>`}}}}return{range:a}});return l.changes.empty?!1:(t.dispatch([o,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});class od{constructor(e,n,r,i,o,s,l){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=o,this.children=s,this.positions=l,this.hashProp=[[qe.contextHash,i]]}static create(e,n,r,i,o){let s=i+(i<<8)+e+(n<<4)|0;return new od(e,n,r,s,o,[],[])}addChild(e,n){e.prop(qe.contextHash)!=this.hash&&(e=new vt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new vt(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(o,s,l)=>new vt(mn.none,o,s,l,this.hashProp)})}}var ce;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.URL=33]="URL",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel"})(ce||(ce={}));class D4{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class M4{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 su(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,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function Yw(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==ce.OrderedList?Jv:Kv)(n,e,!1);return r>0&&(t.type!=ce.BulletList||Hv(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const e$={[ce.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(mt(ce.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Xr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ce.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ce.OrderedList]:Yw,[ce.BulletList]:Yw,[ce.Document](){return!0}};function Xr(t){return t==32||t==9||t==10||t==13}function su(t,e=0){for(;e<t.length&&Xr(t.charCodeAt(e));)e++;return e}function zw(t,e,n){for(;e>n&&Xr(t.charCodeAt(e-1));)e--;return e}function t$(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function n$(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function Hv(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let o=t.text.charCodeAt(i);if(o==t.next)r++;else if(!Xr(o))return-1}return n&&t.next==45&&o$(t)>-1&&t.depth==e.stack.length||r<3?-1:1}function r$(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function Kv(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Xr(t.text.charCodeAt(t.pos+1)))&&(!n||r$(e,ce.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function Jv(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!Xr(t.text.charCodeAt(r+1))||n&&!r$(e,ce.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function i$(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function o$(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&Xr(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const XO=/^[ \t]*$/,s$=/-->/,l$=/\?>/,WO=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,s$],[/^\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,XO],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,XO]];function a$(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,o=WO.length-(n?1:0);i<o;i++)if(WO[i][0].test(r))return i;return-1}function qw(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function rs(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==ce.CodeText?t[r].to=n:t.push(mt(ce.CodeText,e,n))}const bf={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,o=t.lineStart+e.text.length,s=[],l=[];for(rs(s,i,o);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){rs(l,t.lineStart-1,t.lineStart);for(let a of e.markers)l.push(a)}else{if(e.indent<n)break;{if(l.length){for(let u of l)u.type==ce.CodeText?rs(s,u.from,u.to):s.push(u);l=[]}rs(s,t.lineStart-1,t.lineStart);for(let u of e.markers)s.push(u);o=t.lineStart+e.text.length;let a=t.lineStart+e.findColumn(e.baseIndent+4);a<o&&rs(s,a,o)}}return l.length&&(l=l.filter(a=>a.type!=ce.CodeText),l.length&&(e.markers=l.concat(e.markers))),t.addNode(t.buffer.writeElements(s,-i).finish(ce.CodeBlock,o-i),i),!0},FencedCode(t,e){let n=t$(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,o=n-e.pos,s=e.skipSpace(n),l=zw(e.text,e.text.length,s),a=[mt(ce.CodeMark,r,r+o)];s<l&&a.push(mt(ce.CodeInfo,t.lineStart+s,t.lineStart+l));for(let u=!0;t.nextLine()&&e.depth>=t.stack.length;u=!1){let c=e.pos;if(e.indent-e.baseIndent<4)for(;c<e.text.length&&e.text.charCodeAt(c)==i;)c++;if(c-e.pos>=o&&e.skipSpace(c)==e.text.length){for(let f of e.markers)a.push(f);a.push(mt(ce.CodeMark,t.lineStart+e.pos,t.lineStart+c)),t.nextLine();break}else{u||rs(a,t.lineStart-1,t.lineStart);for(let d of e.markers)a.push(d);let f=t.lineStart+e.basePos,h=t.lineStart+e.text.length;f<h&&rs(a,f,h)}}return t.addNode(t.buffer.writeElements(a,-r).finish(ce.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=n$(e);return n<0?!1:(t.startContext(ce.Blockquote,e.pos),t.addNode(ce.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(Hv(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(ce.HorizontalRule,n),!0},BulletList(t,e){let n=Kv(e,t,!1);if(n<0)return!1;t.block.type!=ce.BulletList&&t.startContext(ce.BulletList,e.basePos,e.next);let r=qw(e,e.pos+1);return t.startContext(ce.ListItem,e.basePos,r-e.baseIndent),t.addNode(ce.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=Jv(e,t,!1);if(n<0)return!1;t.block.type!=ce.OrderedList&&t.startContext(ce.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=qw(e,e.pos+n);return t.startContext(ce.ListItem,e.basePos,r-e.baseIndent),t.addNode(ce.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=i$(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,o=zw(e.text,e.text.length,r),s=o;for(;s>r&&e.text.charCodeAt(s-1)==e.next;)s--;(s==o||s==r||!Xr(e.text.charCodeAt(s-1)))&&(s=e.text.length);let l=t.buffer.write(ce.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,s),i+n+1),-i);s<e.text.length&&l.write(ce.HeaderMark,s-r,o-r);let a=l.finish(ce.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(a,i),!0},HTMLBlock(t,e){let n=a$(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=WO[n][1],o=[],s=i!=XO;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){s=!1;break}for(let u of e.markers)o.push(u)}s&&t.nextLine();let l=i==s$?ce.CommentBlock:i==l$?ce.ProcessingInstructionBlock:ce.HTMLBlock,a=t.prevLineEnd();return t.addNode(t.buffer.writeElements(o,-r).finish(l,a-r),r),!0},SetextHeading:void 0};class I4{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
|
|
88
|
+
`+n.scrub(),o=this.advance(i);return o>-1&&o<i.length?this.complete(e,r,o):!1}finish(e,n){return(this.stage==2||this.stage==3)&&su(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,mt(ce.LinkReference,this.start,this.start+r,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(O$(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(mt(ce.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(g$(e,su(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=su(e,this.pos),r=0;if(n>this.pos){let i=m$(e,n,this.start);if(i){let o=Qg(e,i.to-this.start);o>0&&(this.nextStage(i),r=o)}}return r||(r=Qg(e,this.pos)),r>0&&r<e.length?r:-1}else return Qg(e,this.pos)}}}function Qg(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!Xr(n))return-1}return e}class N4{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:o$(n),o=n.next;if(i<0)return!1;let s=mt(ce.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,mt(o==61?ce.SetextHeading1:ce.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),s])),!0}finish(){return!1}}const L4={LinkReference(t,e){return e.content.charCodeAt(0)==91?new I4(e):null},SetextHeading(){return new N4}},j4=[(t,e)=>i$(e)>=0,(t,e)=>t$(e)>=0,(t,e)=>n$(e)>=0,(t,e)=>Kv(e,t,!0)>=0,(t,e)=>Jv(e,t,!0)>=0,(t,e)=>Hv(e,t,!0)>=0,(t,e)=>a$(e,t,!0)>=0],V4={text:"",end:0};class B4{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new M4,this.atEnd=!1,this.dontInject=new Set,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=od.create(ce.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new U4(r,n):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(;e.depth<this.stack.length;)this.finishContext();for(let r of e.markers)this.addNode(r.type,r.from,r.to);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 r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let n=new D4(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,n))break e}for(let r of n.parsers)if(r.nextLine(this,e,n))return null;n.content+=`
|
|
89
|
+
`+e.scrub();for(let r of e.markers)n.marks.push(r)}return this.finishLeaf(n),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 n=this.fragments.takeNodes(this);if(!n)return!1;let r=n,i=this.absoluteLineStart+n;for(let o=1;o<this.ranges.length;o++){let s=this.ranges[o-1].to,l=this.ranges[o].from;s>=this.lineStart&&l<i&&(r-=l-s)}return this.lineStart+=r,this.absoluteLineStart+=n,this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0}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)}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 n=V4;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let o=this.ranges[i].from,s=this.lineChunkAt(o);n.end=o+s.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+s,r=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(n);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],o=this.parser.skipContextMarkup[i.type];if(!o)throw new Error("Unhandled block context "+ce[i.type]);if(!o(i,this,e))break;e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
|
|
90
|
+
`?"":n;else{let i=n.indexOf(`
|
|
91
|
+
`);r=i<0?n:n.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,r=0){this.block=od.create(e,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,r=0){this.startContext(this.parser.getNodeType(e),n,r)}addNode(e,n,r){typeof e=="number"&&(e=new vt(this.parser.nodeSet.types[e],Ul,Ul,(r??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(ZO(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}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?u$(this.ranges,0,e.topNode,this.ranges[0].from,this.dontInject):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let n=ZO(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(ce.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?mt(this.parser.getNodeType(e),n,r,i):new h$(e,n)}get buffer(){return new f$(this.parser.nodeSet)}}function u$(t,e,n,r,i){if(i.has(n.tree))return n.tree;let o=t[e].to,s=[],l=[],a=n.from+r;function u(c,f){for(;f?c>=o:c>o;){let h=t[e+1].from-o;r+=h,c+=h,e++,o=t[e].to}}for(let c=n.firstChild;c;c=c.nextSibling){u(c.from+r,!0);let f=c.from+r,h;c.to+r>o?(h=u$(t,e,c,r,i),u(c.to+r,!1)):h=c.toTree(),s.push(h),l.push(f-a)}return u(n.to+r,!1),new vt(n.type,s,l,n.to+r-a,n.tree?n.tree.propValues:void 0)}class qd extends Qv{constructor(e,n,r,i,o,s,l,a,u){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=o,this.skipContextMarkup=s,this.inlineParsers=l,this.inlineNames=a,this.wrappers=u,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,n,r){let i=new B4(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}configure(e){let n=UO(e);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,o=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),l=this.blockNames.slice(),a=this.inlineParsers.slice(),u=this.inlineNames.slice(),c=this.endLeafBlock.slice(),f=this.wrappers;if(Qa(n.defineNodes)){i=Object.assign({},i);let h=r.types.slice(),d;for(let p of n.defineNodes){let{name:g,block:y,composite:O,style:m}=typeof p=="string"?{name:p}:p;if(h.some(P=>P.name==g))continue;O&&(i[h.length]=(P,E,T)=>O(E,T,P.value));let v=h.length,b=O?["Block","BlockContext"]:y?v>=ce.ATXHeading1&&v<=ce.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(mn.define({id:v,name:g,props:b&&[[qe.group,b]]})),m&&(d||(d={}),Array.isArray(m)||m instanceof Jr?d[g]=m:Object.assign(d,m))}r=new sc(h),d&&(r=r.extend(Jl(d)))}if(Qa(n.props)&&(r=r.extend(...n.props)),Qa(n.remove))for(let h of n.remove){let d=this.blockNames.indexOf(h),p=this.inlineNames.indexOf(h);d>-1&&(o[d]=s[d]=void 0),p>-1&&(a[p]=void 0)}if(Qa(n.parseBlock))for(let h of n.parseBlock){let d=l.indexOf(h.name);if(d>-1)o[d]=h.parse,s[d]=h.leaf;else{let p=h.before?wf(l,h.before):h.after?wf(l,h.after)+1:l.length-1;o.splice(p,0,h.parse),s.splice(p,0,h.leaf),l.splice(p,0,h.name)}h.endLeaf&&c.push(h.endLeaf)}if(Qa(n.parseInline))for(let h of n.parseInline){let d=u.indexOf(h.name);if(d>-1)a[d]=h.parse;else{let p=h.before?wf(u,h.before):h.after?wf(u,h.after)+1:u.length-1;a.splice(p,0,h.parse),u.splice(p,0,h.name)}}return n.wrap&&(f=f.concat(n.wrap)),new qd(r,o,s,l,c,i,a,u,f)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let r=new X4(this,e,n);e:for(let i=n;i<r.end;){let o=r.char(i);for(let s of this.inlineParsers)if(s){let l=s(r,o,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}}function Qa(t){return t!=null&&t.length>0}function UO(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=UO(t[0]);if(t.length==1)return e;let n=UO(t.slice(1));if(!n||!e)return e||n;let r=(s,l)=>(s||Ul).concat(l||Ul),i=e.wrap,o=n.wrap;return{props:r(e.props,n.props),defineNodes:r(e.defineNodes,n.defineNodes),parseBlock:r(e.parseBlock,n.parseBlock),parseInline:r(e.parseInline,n.parseInline),remove:r(e.remove,n.remove),wrap:i?o?(s,l,a,u)=>i(o(s,l,a,u),l,a,u):i:o}}function wf(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let c$=[mn.none];for(let t=1,e;e=ce[t];t++)c$[t]=mn.define({id:t,name:e,props:t>=ce.Escape?[]:[[qe.group,t in e$?["Block","BlockContext"]:["Block","LeafBlock"]]]});const Ul=[];class f${constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,r,i=0){return this.content.push(e,n,r,4+i*4),this}writeElements(e,n=0){for(let r of e)r.writeTo(this,n);return this}finish(e,n){return vt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let Xu=class{constructor(e,n,r,i=Ul){this.type=e,this.from=n,this.to=r,this.children=i}writeTo(e,n){let r=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-r)}toTree(e){return new f$(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class h${constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Ul}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function mt(t,e,n,r){return new Xu(t,e,n,r)}const d$={resolve:"Emphasis",mark:"EmphasisMark"},p$={resolve:"Emphasis",mark:"EmphasisMark"},_a={},Gw={};class ei{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const Hw="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Wu=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Wu=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const _g={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<Hw.length;i++)if(Hw.charCodeAt(i)==r)return t.append(mt(ce.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return r?t.append(mt(ce.Entity,n,n+1+r[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let r=n+1;for(;r<t.end&&t.char(r)==96;)r++;let i=r-n,o=0;for(;r<t.end;r++)if(t.char(r)==96){if(o++,o==i&&t.char(r+1)!=96)return t.append(mt(ce.InlineCode,n,r+1,[mt(ce.CodeMark,n,n+i),mt(ce.CodeMark,r+1-i,r+1)]))}else o=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let r=t.slice(n+1,t.end),i=/^(?:[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(r);if(i)return t.append(mt(ce.URL,n,n+1+i[0].length));let o=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(o)return t.append(mt(ce.Comment,n,n+1+o[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return t.append(mt(ce.ProcessingInstruction,n,n+1+s[0].length));let l=/^(?:![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(r);return l?t.append(mt(ce.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let r=n+1;for(;t.char(r)==e;)r++;let i=t.slice(n-1,n),o=t.slice(r,r+1),s=Wu.test(i),l=Wu.test(o),a=/\s|^$/.test(i),u=/\s|^$/.test(o),c=!u&&(!l||a||s),f=!a&&(!s||u||l),h=c&&(e==42||!f||s),d=f&&(e==42||!c||l);return t.append(new ei(e==95?d$:p$,n,r,(h?1:0)|(d?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(mt(ce.HardBreak,n,n+2));if(e==32){let r=n+1;for(;t.char(r)==32;)r++;if(t.char(r)==10&&r>=n+2)return t.append(mt(ce.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new ei(_a,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new ei(Gw,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let r=t.parts.length-1;r>=0;r--){let i=t.parts[r];if(i instanceof ei&&(i.type==_a||i.type==Gw)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let o=t.takeContent(r),s=t.parts[r]=F4(t,o,i.type==_a?ce.Link:ce.Image,i.from,n+1);if(i.type==_a)for(let l=0;l<r;l++){let a=t.parts[l];a instanceof ei&&a.type==_a&&(a.side=0)}return s.to}}return-1}};function F4(t,e,n,r,i){let{text:o}=t,s=t.char(i),l=i;if(e.unshift(mt(ce.LinkMark,r,r+(n==ce.Image?2:1))),e.push(mt(ce.LinkMark,i-1,i)),s==40){let a=t.skipSpace(i+1),u=g$(o,a-t.offset,t.offset),c;u&&(a=t.skipSpace(u.to),c=m$(o,a-t.offset,t.offset),c&&(a=t.skipSpace(c.to))),t.char(a)==41&&(e.push(mt(ce.LinkMark,i,i+1)),l=a+1,u&&e.push(u),c&&e.push(c),e.push(mt(ce.LinkMark,a,l)))}else if(s==91){let a=O$(o,i-t.offset,t.offset,!1);a&&(e.push(a),l=a.to)}return mt(n,r,l,e)}function g$(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let o=t.charCodeAt(i);if(o==62)return mt(ce.URL,e+n,i+1+n);if(o==60||o==10)return!1}return null}else{let i=0,o=e;for(let s=!1;o<t.length;o++){let l=t.charCodeAt(o);if(Xr(l))break;if(s)s=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(s=!0)}return o>e?mt(ce.URL,e+n,o+n):o==t.length?null:!1}}function m$(t,e,n){let r=t.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let o=e+1,s=!1;o<t.length;o++){let l=t.charCodeAt(o);if(s)s=!1;else{if(l==i)return mt(ce.LinkTitle,e+n,o+1+n);l==92&&(s=!0)}}return null}function O$(t,e,n,r){for(let i=!1,o=e+1,s=Math.min(t.length,o+999);o<s;o++){let l=t.charCodeAt(o);if(i)i=!1;else{if(l==93)return r?!1:mt(ce.LinkLabel,e+n,o+1+n);if(r&&!Xr(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}class X4{constructor(e,n,r){this.parser=e,this.text=n,this.offset=r,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,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,r,i,o){return this.append(new ei(e,n,r,(i?1:0)|(o?2:0)))}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof ei&&i.type.resolve&&i.side&2))continue;let o=i.type==d$||i.type==p$,s=i.to-i.from,l,a=r-1;for(;a>=e;a--){let g=this.parts[a];if(g instanceof ei&&g.side&1&&g.type==i.type&&!(o&&(i.side&1||g.side&2)&&(g.to-g.from+s)%3==0&&((g.to-g.from)%3||s%3))){l=g;break}}if(!l)continue;let u=i.type.resolve,c=[],f=l.from,h=i.to;if(o){let g=Math.min(2,l.to-l.from,s);f=l.to-g,h=i.from+g,u=g==1?"Emphasis":"StrongEmphasis"}l.type.mark&&c.push(this.elt(l.type.mark,f,l.to));for(let g=a+1;g<r;g++)this.parts[g]instanceof Xu&&c.push(this.parts[g]),this.parts[g]=null;i.type.mark&&c.push(this.elt(i.type.mark,i.from,h));let d=this.elt(u,f,h,c);this.parts[a]=o&&l.from!=f?new ei(l.type,l.from,f,l.side):null,(this.parts[r]=o&&i.to!=h?new ei(i.type,h,i.to,i.side):null)?this.parts.splice(r,0,d):this.parts[r]=d}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof Xu&&n.push(i)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof ei&&r.type==e)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}skipSpace(e){return su(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?mt(this.parser.getNodeType(e),n,r,i):new h$(e,n)}}function ZO(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),r=0;for(let i of e){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let o=n[r];o instanceof Xu&&(n[r]=new Xu(o.type,o.from,o.to,ZO(o.children,[i])))}else n.splice(r++,0,i)}return n}const W4=[ce.CodeBlock,ce.ListItem,ce.OrderedList,ce.BulletList];class U4{constructor(e,n){this.fragments=e,this.input=n,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,n){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 o=this.fragment.to;for(;o>0&&this.input.read(o-1,o)!=`
|
|
92
|
+
`;)o--;this.fragmentEnd=o?o-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=n;if(!r.childAfter(i))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(qe.contextHash)==e}takeNodes(e){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,s=o,l=e.block.children.length,a=s,u=l;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}if(e.dontInject.add(n.tree),e.addNode(n.tree,n.from-r),n.type.is("Block")&&(W4.indexOf(n.type.id)<0?(s=n.to-r,l=e.block.children.length):(s=a,l=u,a=n.to-r,u=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return s-o}}const Z4=Jl({"Blockquote/...":S.quote,HorizontalRule:S.contentSeparator,"ATXHeading1/... SetextHeading1/...":S.heading1,"ATXHeading2/... SetextHeading2/...":S.heading2,"ATXHeading3/...":S.heading3,"ATXHeading4/...":S.heading4,"ATXHeading5/...":S.heading5,"ATXHeading6/...":S.heading6,"Comment CommentBlock":S.comment,Escape:S.escape,Entity:S.character,"Emphasis/...":S.emphasis,"StrongEmphasis/...":S.strong,"Link/... Image/...":S.link,"OrderedList/... BulletList/...":S.list,"BlockQuote/...":S.quote,"InlineCode CodeText":S.monospace,URL:S.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":S.processingInstruction,"CodeInfo LinkLabel":S.labelName,LinkTitle:S.string,Paragraph:S.content}),Y4=new qd(new sc(c$).extend(Z4),Object.keys(bf).map(t=>bf[t]),Object.keys(bf).map(t=>L4[t]),Object.keys(bf),j4,e$,Object.keys(_g).map(t=>_g[t]),Object.keys(_g),[]);function z4(t,e,n){let r=[];for(let i=t.firstChild,o=e;;i=i.nextSibling){let s=i?i.from:n;if(s>o&&r.push({from:o,to:s}),!i)break;o=i.to}return r}function q4(t){let{codeParser:e,htmlParser:n}=t;return{wrap:mQ((i,o)=>{let s=i.type.id;if(e&&(s==ce.CodeBlock||s==ce.FencedCode)){let l="";if(s==ce.FencedCode){let u=i.node.getChild(ce.CodeInfo);u&&(l=o.read(u.from,u.to))}let a=e(l);if(a)return{parser:a,overlay:u=>u.type.id==ce.CodeText}}else if(n&&(s==ce.HTMLBlock||s==ce.HTMLTag))return{parser:n,overlay:z4(i.node,i.from,i.to)};return null})}}const G4={resolve:"Strikethrough",mark:"StrikethroughMark"},H4={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":S.strikethrough}},{name:"StrikethroughMark",style:S.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let r=t.slice(n-1,n),i=t.slice(n+2,n+3),o=/\s|^$/.test(r),s=/\s|^$/.test(i),l=Wu.test(r),a=Wu.test(i);return t.addDelimiter(G4,n,n+2,!s&&(!a||o||l),!o&&(!l||s||a))},after:"Emphasis"}]};function lu(t,e,n=0,r,i=0){let o=0,s=!0,l=-1,a=-1,u=!1,c=()=>{r.push(t.elt("TableCell",i+l,i+a,t.parser.parseInline(e.slice(l,a),i+l)))};for(let f=n;f<e.length;f++){let h=e.charCodeAt(f);h==124&&!u?((!s||l>-1)&&o++,s=!1,r&&(l>-1&&c(),r.push(t.elt("TableDelimiter",f+i,f+i+1))),l=a=-1):(u||h!=32&&h!=9)&&(l<0&&(l=f),a=f+1),u=!u&&h==92}return l>-1&&(o++,r&&c()),o}function Kw(t,e){for(let n=e;n<t.length;n++){let r=t.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}const y$=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Jw{constructor(){this.rows=null}nextLine(e,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&y$.test(i=n.text.slice(n.pos))){let o=[];lu(e,r.content,0,o,r.start)==lu(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,o),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];lu(e,n.text,n.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,i))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const K4={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":S.heading}},"TableRow",{name:"TableCell",style:S.content},{name:"TableDelimiter",style:S.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return Kw(e.content,0)?new Jw:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof Jw)||!Kw(e.text,e.basePos))return!1;let r=t.scanLine(t.absoluteLineEnd+1).text;return y$.test(r)&&lu(t,e.text,e.basePos)==lu(t,r,e.basePos)},before:"SetextHeading"}]};class J4{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const eB={defineNodes:[{name:"Task",block:!0,style:S.list},{name:"TaskMarker",style:S.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\]/.test(e.content)&&t.parentType().name=="ListItem"?new J4:null},after:"SetextHeading"}]},tB=[K4,eB,H4];function v$(t,e,n){return(r,i,o)=>{if(i!=t||r.char(o+1)==t)return-1;let s=[r.elt(n,o,o+1)];for(let l=o+1;l<r.end;l++){let a=r.char(l);if(a==t)return r.addElement(r.elt(e,o,l+1,s.concat(r.elt(n,l,l+1))));if(a==92&&s.push(r.elt("Escape",l,l+++2)),Xr(a))break}return-1}}const nB={defineNodes:[{name:"Superscript",style:S.special(S.content)},{name:"SuperscriptMark",style:S.processingInstruction}],parseInline:[{name:"Superscript",parse:v$(94,"Superscript","SuperscriptMark")}]},rB={defineNodes:[{name:"Subscript",style:S.special(S.content)},{name:"SubscriptMark",style:S.processingInstruction}],parseInline:[{name:"Subscript",parse:v$(126,"Subscript","SubscriptMark")}]},iB={defineNodes:[{name:"Emoji",style:S.character}],parseInline:[{name:"Emoji",parse(t,e,n){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+r[0].length))}}]},oB=54,sB=1,lB=55,aB=2,uB=56,cB=3,ek=4,fB=5,sd=6,S$=7,b$=8,w$=9,k$=10,hB=11,dB=12,pB=13,$g=57,gB=14,tk=58,mB=20,OB=22,P$=23,yB=24,YO=26,x$=27,vB=28,SB=31,bB=34,C$=36,wB=37,kB=0,PB=1,xB={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},CB={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},nk={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 EB(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function E$(t){return t==9||t==10||t==13||t==32}let rk=null,ik=null,ok=0;function zO(t,e){let n=t.pos+e;if(ok==n&&ik==t)return rk;let r=t.peek(e);for(;E$(r);)r=t.peek(++e);let i="";for(;EB(r);)i+=String.fromCharCode(r),r=t.peek(++e);return ik=t,ok=n,rk=i?i.toLowerCase():r==QB||r==_B?void 0:null}const Q$=60,ld=62,e0=47,QB=63,_B=33,$B=45;function sk(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let n=0;n<t.length;n++)this.hash+=(this.hash<<4)+t.charCodeAt(n)+(t.charCodeAt(n)<<8)}const TB=[sd,k$,S$,b$,w$],AB=new F_({start:null,shift(t,e,n,r){return TB.indexOf(e)>-1?new sk(zO(r,1)||"",t):t},reduce(t,e){return e==mB&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==sd||i==C$?new sk(zO(r,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),RB=new Ni((t,e)=>{if(t.next!=Q$){t.next<0&&e.context&&t.acceptToken($g);return}t.advance();let n=t.next==e0;n&&t.advance();let r=zO(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?gB:sd);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(hB);if(i&&CB[i])return t.acceptToken($g,-2);if(e.dialectEnabled(kB))return t.acceptToken(dB);for(let o=e.context;o;o=o.parent)if(o.name==r)return;t.acceptToken(pB)}else{if(r=="script")return t.acceptToken(S$);if(r=="style")return t.acceptToken(b$);if(r=="textarea")return t.acceptToken(w$);if(xB.hasOwnProperty(r))return t.acceptToken(k$);i&&nk[i]&&nk[i][r]?t.acceptToken($g,-1):t.acceptToken(sd)}},{contextual:!0}),DB=new Ni(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(tk);break}if(t.next==$B)e++;else if(t.next==ld&&e>=2){n>3&&t.acceptToken(tk,-2);break}else e=0;t.advance()}});function MB(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const IB=new Ni((t,e)=>{if(t.next==e0&&t.peek(1)==ld){let n=e.dialectEnabled(PB)||MB(e.context);t.acceptToken(n?fB:ek,2)}else t.next==ld&&t.acceptToken(ek,1)});function t0(t,e,n){let r=2+t.length;return new Ni(i=>{for(let o=0,s=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(o==0&&i.next==Q$||o==1&&i.next==e0||o>=2&&o<r&&i.next==t.charCodeAt(o-2))o++,s++;else if((o==2||o==r)&&E$(i.next))s++;else if(o==r&&i.next==ld){l>s?i.acceptToken(e,-s):i.acceptToken(n,-(s-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else o=s=0;i.advance()}})}const NB=t0("script",oB,sB),LB=t0("style",lB,aB),jB=t0("textarea",uB,cB),VB=Jl({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),BB=Wl.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G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`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!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 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:67,context:AB,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[VB],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?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!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[NB,LB,jB,IB,RB,DB,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function _$(t,e){let n=Object.create(null);for(let r of t.getChildren(P$)){let i=r.getChild(yB),o=r.getChild(YO)||r.getChild(x$);i&&(n[e.read(i.from,i.to)]=o?o.type.id==YO?e.read(o.from+1,o.to-1):e.read(o.from,o.to):"")}return n}function lk(t,e){let n=t.getChild(OB);return n?e.read(n.from,n.to):" "}function Tg(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=_$(t.node.parent.firstChild,e))))return{parser:i.parser};return null}function $$(t=[],e=[]){let n=[],r=[],i=[],o=[];for(let l of t)(l.tag=="script"?n:l.tag=="style"?r:l.tag=="textarea"?i:o).push(l);let s=e.length?Object.create(null):null;for(let l of e)(s[l.name]||(s[l.name]=[])).push(l);return mQ((l,a)=>{let u=l.type.id;if(u==vB)return Tg(l,a,n);if(u==SB)return Tg(l,a,r);if(u==bB)return Tg(l,a,i);if(u==C$&&o.length){let c=l.node,f=lk(c,a),h;for(let d of o)if(d.tag==f&&(!d.attrs||d.attrs(h||(h=_$(c,a))))){let p=c.parent.lastChild;return{parser:d.parser,overlay:[{from:l.to,to:p.type.id==wB?p.from:c.parent.to}]}}}if(s&&u==P$){let c=l.node,f;if(f=c.firstChild){let h=s[a.read(f.from,f.to)];if(h)for(let d of h){if(d.tagName&&d.tagName!=lk(c.parent,a))continue;let p=c.lastChild;if(p.type.id==YO){let g=p.from+1,y=p.lastChild,O=p.to-(y&&y.isError?0:1);if(O>g)return{parser:d.parser,overlay:[{from:g,to:O}]}}else if(p.type.id==x$)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const FB=94,ak=1,XB=95,WB=96,uk=2,T$=[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],UB=58,ZB=40,A$=95,YB=91,th=45,zB=46,qB=35,GB=37;function ad(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function HB(t){return t>=48&&t<=57}const KB=new Ni((t,e)=>{for(let n=!1,r=0,i=0;;i++){let{next:o}=t;if(ad(o)||o==th||o==A$||n&&HB(o))!n&&(o!=th||i>0)&&(n=!0),r===i&&o==th&&r++,t.advance();else{n&&t.acceptToken(o==ZB?XB:r==2&&e.canShift(uk)?uk:WB);break}}}),JB=new Ni(t=>{if(T$.includes(t.peek(-1))){let{next:e}=t;(ad(e)||e==A$||e==qB||e==zB||e==YB||e==UB||e==th)&&t.acceptToken(FB)}}),eF=new Ni(t=>{if(!T$.includes(t.peek(-1))){let{next:e}=t;if(e==GB&&(t.advance(),t.acceptToken(ak)),ad(e)){do t.advance();while(ad(t.next));t.acceptToken(ak)}}}),tF=Jl({"AtKeyword import charset namespace keyframes media supports":S.definitionKeyword,"from to selector":S.keyword,NamespaceName:S.namespace,KeyframeName:S.labelName,TagName:S.tagName,ClassName:S.className,PseudoClassName:S.constant(S.className),IdName:S.labelName,"FeatureName PropertyName":S.propertyName,AttributeName:S.attributeName,NumberLiteral:S.number,KeywordQuery:S.keyword,UnaryQueryOp:S.operatorKeyword,"CallTag ValueName":S.atom,VariableName:S.variableName,Callee:S.operatorKeyword,Unit:S.unit,"UniversalSelector NestingSelector":S.definitionOperator,MatchOp:S.compareOperator,"ChildOp SiblingOp, LogicOp":S.logicOperator,BinOp:S.arithmeticOperator,Important:S.modifier,Comment:S.blockComment,ParenthesizedContent:S.special(S.name),ColorLiteral:S.color,StringLiteral:S.string,":":S.punctuation,"PseudoOp #":S.derefOperator,"; ,":S.separator,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace}),nF={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},rF={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},iF={__proto__:null,not:128,only:128,from:158,to:160},oF=Wl.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,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y$V$W$_$d$mp!WY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mQ!b]R#a!cQyUR!rnQ!qyR#k!rQ|VR!toQ!OWR!upQuTQ!pmQ#^!_Q#d!fQ#e!gR$f$RSfPtQ!lgQ#g!jR$Y#hZePgt!j#ha!^Z_`!S!Y![#X#YR#V!YR!c]R!e^R#c!eQcOSgPtU!hcg#hR#h!jQ#r!{U$^#r$d$mQ$d#yR$m$_Q$`#rR$n$`QmTS!om$[R$[#oQ$W#fR$j$WQ!kfS#i!k#jR#j!lQ#Z!ZR#}#ZQ$S#bR$g$S_bOPcgt!j#h^TOPcgt!j#hQ!nlQ!vqQ!wrQ!xsQ#o!zR$O#]R#s!{Q!SYQ!`[Q#O!QQ#f!i[#q!{#r#y$_$d$mQ#t!}Q#v#QS$U#f$WQ$Z#mR$i$VR#p!zQhPR!ytQ!_ZQ!g`R#R!SU!ZZ`!SQ!f_Q#W!YQ#[![Q#{#XR#|#Y",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports AtRule Styles",maxTerm:108,nodeProps:[["openedBy",17,"(",48,"{"],["closedBy",18,")",49,"}"]],propSources:[tF],skippedNodes:[0,3],repeatNodeCount:8,tokenData:"Lq~R!^OX$}X^%u^p$}pq%uqr)X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^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[JB,eF,KB,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:t=>nF[t]||-1},{term:56,get:t=>rF[t]||-1},{term:96,get:t=>iF[t]||-1}],tokenPrec:1123});let Ag=null;function Rg(){if(!Ag&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));Ag=e.sort().map(r=>({type:"property",label:r}))}return Ag||[]}const ck=["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(t=>({type:"class",label:t})),fk=["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(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),sF=["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(t=>({type:"type",label:t})),ho=/^(\w[\w-]*|-\w[\w-]*|)$/,lF=/^-(-[\w-]*)?$/;function aF(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const hk=new gQ,uF=["Declaration"];function cF(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function R$(t,e,n){if(e.to-e.from>4096){let r=hk.get(e);if(r)return r;let i=[],o=new Set,s=e.cursor(It.IncludeAnonymous);if(s.firstChild())do for(let l of R$(t,s.node,n))o.has(l.label)||(o.add(l.label),i.push(l));while(s.nextSibling());return hk.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(o=>{var s;if(n(o)&&o.matchContext(uF)&&((s=o.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let l=t.sliceString(o.from,o.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}const fF=t=>e=>{let{state:n,pos:r}=e,i=_t(n).resolveInner(r,-1),o=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(o||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Rg(),validFor:ho};if(i.name=="ValueName")return{from:i.from,options:fk,validFor:ho};if(i.name=="PseudoClassName")return{from:i.from,options:ck,validFor:ho};if(t(i)||(e.explicit||o)&&aF(i,n.doc))return{from:t(i)||o?i.from:r,options:R$(n.doc,cF(i),t),validFor:lF};if(i.name=="TagName"){for(let{parent:a}=i;a;a=a.parent)if(a.name=="Block")return{from:i.from,options:Rg(),validFor:ho};return{from:i.from,options:sF,validFor:ho}}if(!e.explicit)return null;let s=i.resolve(r),l=s.childBefore(r);return l&&l.name==":"&&s.name=="PseudoClassSelector"?{from:r,options:ck,validFor:ho}:l&&l.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:r,options:fk,validFor:ho}:s.name=="Block"||s.name=="Styles"?{from:r,options:Rg(),validFor:ho}:null},hF=fF(t=>t.name=="VariableName"),ud=Vl.define({name:"css",parser:oF.configure({props:[lc.add({Declaration:Kf()}),ac.add({"Block KeyframeList":kQ})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function D$(){return new Nu(ud,ud.data.of({autocomplete:hF}))}const $a=["_blank","_self","_top","_parent"],Dg=["ascii","utf-8","utf-16","latin1","latin1"],Mg=["get","post","put","delete"],Ig=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],fr=["true","false"],Ae={},dF={a:{attrs:{href:null,ping:null,type:null,media:null,target:$a,hreflang:null}},abbr:Ae,address:Ae,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ae,aside:Ae,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ae,base:{attrs:{href:null,target:$a}},bdi:Ae,bdo:Ae,blockquote:{attrs:{cite:null}},body:Ae,br:Ae,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Ig,formmethod:Mg,formnovalidate:["novalidate"],formtarget:$a,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ae,center:Ae,cite:Ae,code:Ae,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:Ae,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ae,div:Ae,dl:Ae,dt:Ae,em:Ae,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ae,figure:Ae,footer:Ae,form:{attrs:{action:null,name:null,"accept-charset":Dg,autocomplete:["on","off"],enctype:Ig,method:Mg,novalidate:["novalidate"],target:$a}},h1:Ae,h2:Ae,h3:Ae,h4:Ae,h5:Ae,h6:Ae,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ae,hgroup:Ae,hr:Ae,html:{attrs:{manifest:null}},i:Ae,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:Ig,formmethod:Mg,formnovalidate:["novalidate"],formtarget:$a,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:Ae,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ae,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:Ae,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Dg,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:Ae,noscript:Ae,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:Ae,param:{attrs:{name:null,value:null}},pre:Ae,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ae,rt:Ae,ruby:Ae,samp:Ae,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Dg}},section:Ae,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ae,source:{attrs:{src:null,type:null,media:null}},span:Ae,strong:Ae,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ae,summary:Ae,sup:Ae,table:Ae,tbody:Ae,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ae,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:Ae,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ae,time:{attrs:{datetime:null}},title:Ae,tr:Ae,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ae,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:Ae},M$={accesskey:null,class:null,contenteditable:fr,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:fr,autocorrect:fr,autocapitalize:fr,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":fr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":fr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":fr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":fr,"aria-hidden":fr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":fr,"aria-multiselectable":fr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":fr,"aria-relevant":null,"aria-required":fr,"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(t=>"on"+t);for(let t of I$)M$[t]=null;class Uu{constructor(e,n){this.tags=Object.assign(Object.assign({},dF),e),this.globalAttrs=Object.assign(Object.assign({},M$),n),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Uu.default=new Uu;function Zl(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function Yl(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function N$(t,e,n){let r=n.tags[Zl(t,Yl(e))];return(r==null?void 0:r.children)||n.allTags}function n0(t,e){let n=[];for(let r=Yl(e);r&&!r.type.isTop;r=Yl(r.parent)){let i=Zl(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const L$=/^[:\-\.\w\u00b7-\uffff]*$/;function dk(t,e,n,r,i){let o=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",s=Yl(n,!0);return{from:r,to:i,options:N$(t.doc,s,e).map(l=>({label:l,type:"type"})).concat(n0(t.doc,n).map((l,a)=>({label:"/"+l,apply:"/"+l+o,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function pk(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:n0(t.doc,e).map((o,s)=>({label:o,apply:o+i,type:"type",boost:99-s})),validFor:L$}}function pF(t,e,n,r){let i=[],o=0;for(let s of N$(t.doc,n,e))i.push({label:"<"+s,type:"type"});for(let s of n0(t.doc,n))i.push({label:"</"+s+">",type:"type",boost:99-o++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function gF(t,e,n,r,i){let o=Yl(n),s=o?e.tags[Zl(t.doc,o)]:null,l=s&&s.attrs?Object.keys(s.attrs):[],a=s&&s.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:a.map(u=>({label:u,type:"property"})),validFor:L$}}function mF(t,e,n,r,i){var o;let s=(o=n.parent)===null||o===void 0?void 0:o.getChild("AttributeName"),l=[],a;if(s){let u=t.sliceDoc(s.from,s.to),c=e.globalAttrs[u];if(!c){let f=Yl(n),h=f?e.tags[Zl(t.doc,f)]:null;c=(h==null?void 0:h.attrs)&&h.attrs[u]}if(c){let f=t.sliceDoc(r,i).toLowerCase(),h='"',d='"';/^['"]/.test(f)?(a=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",d=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):a=/^[^\s<>='"]*$/;for(let p of c)l.push({label:p,apply:h+p+d,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}function j$(t,e){let{state:n,pos:r}=e,i=_t(n).resolveInner(r,-1),o=i.resolve(r);for(let s=r,l;o==i&&(l=i.childBefore(s));){let a=l.lastChild;if(!a||!a.type.isError||a.from<a.to)break;o=i=l,s=a.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?pk(n,i,i.from,r):dk(n,t,i,i.from,r):i.name=="StartTag"?dk(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?pk(n,i,r,r):e.explicit&&(i.name=="OpenTag"||i.name=="SelfClosingTag")||i.name=="AttributeName"?gF(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?mF(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(o.name=="Element"||o.name=="Text"||o.name=="Document")?pF(n,t,i,r):null}function OF(t){return j$(Uu.default,t)}function yF(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Uu(e,n):Uu.default;return i=>j$(r,i)}const vF=Ti.parser.configure({top:"SingleExpression"}),V$=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:q_.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:G_.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:H_.parser},{tag:"script",attrs:t=>t.type=="importmap"||t.type=="speculationrules",parser:vF},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Ti.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:ud.parser}],B$=[{name:"style",parser:ud.parser.configure({top:"Styles"})}].concat(I$.map(t=>({name:t,parser:Ti.parser}))),F$=Vl.define({name:"html",parser:BB.configure({props:[lc.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),ac.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),DQ.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),nh=F$.configure({wrap:$$(V$,B$)});function X$(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=$$((t.nestedLanguages||[]).concat(V$),(t.nestedAttributes||[]).concat(B$)));let r=n?F$.configure({wrap:n,dialect:e}):e?nh.configure({dialect:e}):nh;return new Nu(r,[nh.data.of({autocomplete:yF(t)}),t.autoCloseTags!==!1?SF:[],Xa().support,D$().support])}const gk=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),SF=Se.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!nh.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:s}=o,l=s.changeByRange(a=>{var u,c,f;let h=s.doc.sliceString(a.from-1,a.to)==r,{head:d}=a,p=_t(s).resolveInner(d-1,-1),g;if((p.name=="TagName"||p.name=="StartTag")&&(p=p.parent),h&&r==">"&&p.name=="OpenTag"){if(((c=(u=p.parent)===null||u===void 0?void 0:u.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(g=Zl(s.doc,p.parent,d))&&!gk.has(g)){let y=d+(s.doc.sliceString(d,d+1)===">"?1:0),O=`</${g}>`;return{range:a,changes:{from:d,to:y,insert:O}}}}else if(h&&r=="/"&&p.name=="IncompleteCloseTag"){let y=p.parent;if(p.from==d-2&&((f=y.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(g=Zl(s.doc,y,d))&&!gk.has(g)){let O=d+(s.doc.sliceString(d,d+1)===">"?1:0),m=`${g}>`;return{range:J.cursor(d+m.length,-1),changes:{from:d,to:O,insert:m}}}}return{range:a}});return l.changes.empty?!1:(t.dispatch([o,s.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),W$=_v({commentTokens:{block:{open:"<!--",close:"-->"}}}),U$=new qe,Z$=Y4.configure({props:[ac.add(t=>!t.is("Block")||t.is("Document")||qO(t)!=null?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),U$.add(qO),lc.add({Document:()=>null}),ps.add({Document:W$})]});function qO(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function bF(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=qO(r.type))!=null&&i<=e)break;n=r}return n.to}const wF=wQ.of((t,e,n)=>{for(let r=_t(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(U$);if(i==null)continue;let o=bF(r,i);if(o>n)return{from:n,to:o}}return null});function r0(t){return new Mr(W$,t,[wF],"markdown")}const kF=r0(Z$),PF=Z$.configure([tB,rB,nB,iB]),Y$=r0(PF);function xF(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=Uh.matchLanguageName(t,n,!0),r instanceof Uh)return r.support?r.support.language.parser:Iu.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}let kf=class{constructor(e,n,r,i,o,s,l){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=o,this.type=s,this.item=l}blank(e,n=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(n?this.spaceAfter:"")}}marker(e,n){let r=this.node.name=="OrderedList"?String(+q$(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}};function z$(t,e){let n=[];for(let i=t;i&&i.name!="Document";i=i.parent)(i.name=="ListItem"||i.name=="Blockquote"||i.name=="FencedCode")&&n.push(i);let r=[];for(let i=n.length-1;i>=0;i--){let o=n[i],s,l=e.lineAt(o.from),a=o.from-l.from;if(o.name=="FencedCode")r.push(new kf(o,a,a,"","","",null));else if(o.name=="Blockquote"&&(s=/^[ \t]*>( ?)/.exec(l.text.slice(a))))r.push(new kf(o,a,a+s[0].length,"",s[1],">",null));else if(o.name=="ListItem"&&o.parent.name=="OrderedList"&&(s=/^([ \t]*)\d+([.)])([ \t]*)/.exec(l.text.slice(a)))){let u=s[3],c=s[0].length;u.length>=4&&(u=u.slice(0,u.length-4),c-=4),r.push(new kf(o.parent,a,a+c,s[1],u,s[2],o))}else if(o.name=="ListItem"&&o.parent.name=="BulletList"&&(s=/^([ \t]*)([-+*])([ \t]{1,4}\[[ xX]\])?([ \t]+)/.exec(l.text.slice(a)))){let u=s[4],c=s[0].length;u.length>4&&(u=u.slice(0,u.length-4),c-=4);let f=s[2];s[3]&&(f+=s[3].replace(/[xX]/," ")),r.push(new kf(o.parent,a,a+c,s[1],u,f,o))}}return r}function q$(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function Ng(t,e,n,r=0){for(let i=-1,o=t;;){if(o.name=="ListItem"){let l=q$(o,e),a=+l[2];if(i>=0){if(a!=i+1)return;n.push({from:o.from+l[1].length,to:o.from+l[0].length,insert:String(i+2+r)})}i=a}let s=o.nextSibling;if(!s)break;o=s}}const CF=({state:t,dispatch:e})=>{let n=_t(t),{doc:r}=t,i=null,o=t.changeByRange(s=>{if(!s.empty||!Y$.isActiveAt(t,s.from))return i={range:s};let l=s.from,a=r.lineAt(l),u=z$(n.resolveInner(l,-1),r);for(;u.length&&u[u.length-1].from>l-a.from;)u.pop();if(!u.length)return i={range:s};let c=u[u.length-1];if(c.to-c.spaceAfter.length>l-a.from)return i={range:s};let f=l>=c.to-c.spaceAfter.length&&!/\S/.test(a.text.slice(c.to));if(c.item&&f)if(c.node.firstChild.to>=l||a.from>0&&!/[^\s>]/.test(r.lineAt(a.from-1).text)){let y=u.length>1?u[u.length-2]:null,O,m="";y&&y.item?(O=a.from+y.from,m=y.marker(r,1)):O=a.from+(y?y.to:0);let v=[{from:O,to:l,insert:m}];return c.node.name=="OrderedList"&&Ng(c.item,r,v,-2),y&&y.node.name=="OrderedList"&&Ng(y.item,r,v),{range:J.cursor(O+m.length),changes:v}}else{let y="";for(let O=0,m=u.length-2;O<=m;O++)y+=u[O].blank(O<m?u[O+1].from-y.length:null,O<m);return y+=t.lineBreak,{range:J.cursor(l+y.length),changes:{from:a.from,insert:y}}}if(c.node.name=="Blockquote"&&f&&a.from){let y=r.lineAt(a.from-1),O=/>\s*$/.exec(y.text);if(O&&O.index==c.from){let m=t.changes([{from:y.from+O.index,to:y.to},{from:a.from+c.from,to:a.to}]);return{range:s.map(m),changes:m}}}let h=[];c.node.name=="OrderedList"&&Ng(c.item,r,h);let d=c.item&&c.item.from<a.from,p="";if(!d||/^[\s\d.)\-+*>]*/.exec(a.text)[0].length>=c.to)for(let y=0,O=u.length-1;y<=O;y++)p+=y==O&&!d?u[y].marker(r,1):u[y].blank(y<O?u[y+1].from-p.length:null);let g=l;for(;g>a.from&&/\s/.test(a.text.charAt(g-a.from-1));)g--;return p=t.lineBreak+p,h.push({from:g,to:l,insert:p}),{range:J.cursor(g+p.length),changes:h}});return i?!1:(e(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)};function mk(t){return t.name=="QuoteMark"||t.name=="ListMark"}function EF(t,e){let n=t.resolveInner(e,-1),r=e;mk(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(mk(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const QF=({state:t,dispatch:e})=>{let n=_t(t),r=null,i=t.changeByRange(o=>{let s=o.from,{doc:l}=t;if(o.empty&&Y$.isActiveAt(t,o.from)){let a=l.lineAt(s),u=z$(EF(n,s),l);if(u.length){let c=u[u.length-1],f=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(s-a.from>f&&!/\S/.test(a.text.slice(f,s-a.from)))return{range:J.cursor(a.from+f),changes:{from:a.from+f,to:s}};if(s-a.from==f&&(!c.item||a.from<=c.item.from||!/\S/.test(a.text.slice(0,c.to)))){let h=a.from+c.from;if(c.item&&c.node.from<c.item.from&&/\S/.test(a.text.slice(c.from,c.to)))return{range:o,changes:{from:h,to:a.from+c.to,insert:c.blank(c.to-c.from)}};if(h<s)return{range:J.cursor(h),changes:{from:h,to:s}}}}}return r={range:o}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},_F=[{key:"Enter",run:CF},{key:"Backspace",run:QF}],GO=X$({matchClosingTags:!1});function $F(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=kF,completeHTMLTags:o=!0}=t;if(!(i instanceof qd))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let s=t.extensions?[t.extensions]:[],l=[GO.support],a;n instanceof Nu?(l.push(n.support),a=n.language):n&&(a=n);let u=e||a?xF(e,a):void 0;s.push(q4({codeParser:u,htmlParser:GO.language.parser})),r&&l.push(Ho.high(ic.of(_F)));let c=r0(i.configure(s));return o&&l.push(c.data.of({autocomplete:TF})),new Nu(c,l)}function TF(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=_t(e).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:AF(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Lg=null;function AF(){if(Lg)return Lg;let t=OF(new Xv(ct.create({extensions:GO}),0,!0));return Lg=t?t.options:[]}const Ok=(t,e,n,r,i)=>{let o=[],s=0;return e.iterChanges((l,a,u,c,f)=>{const h=n.sliceString(l,a,`
|
|
93
|
+
`),d=f.sliceString(0,f.length,`
|
|
94
|
+
`);h&&o.push(i.remove(l+s,h)),d&&o.push(i.insert(l+s,d)),s+=d.length,s-=h.length}),o=o.reduce(i.type.compose),r.editOp(t,"text-unicode",o)},yk=t=>{const e=[];for(const n of t){const{es:r}=n;if(r!==void 0){let i=0;for(let o=0;o<r.length;o++){const s=r[o];if(typeof s=="number")i+=s;else if(typeof s=="string")if(r[o+1]&&typeof r[o+1]=="object"&&r[o+1].d!==void 0){let l=typeof r[o+1].d=="number"?r[o+1].d:r[o+1].d.length;e.push({from:i,to:i+l,insert:s}),i+=l,o++}else e.push({from:i,to:i,insert:s});else s&&s.d!==void 0&&(typeof s.d=="number"?(e.push({from:i,to:i+s.d}),i+=s.d):typeof s.d=="string"&&(e.push({from:i,to:i+s.d.length}),i+=s.d.length))}}}return e},RF=(t,e)=>{if(!t||!e)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},DF=({shareDBDoc:t,path:e=[],json1:n,textUnicode:r,debug:i=!1})=>qt.fromClass(class{constructor(o){this.view=o,this.handleOp=s=>{!this.lock&&RF(s,e)&&(this.lock=!0,i&&(console.log("Received op from ShareDB"),console.log(" op: "+JSON.stringify(s)),console.log(" generated changes: "+JSON.stringify(yk(s)))),o.dispatch({changes:yk(s)}),this.lock=!1)},t.on("op",this.handleOp)}update(o){!this.lock&&o.docChanged&&(this.lock=!0,i&&(console.log("Received change from CodeMirror"),console.log(" changes:"+JSON.stringify(o.changes.toJSON())),console.log(" iterChanges:"),o.changes.iterChanges((s,l,a,u,c)=>{console.log(" "+JSON.stringify({fromA:s,toA:l,fromB:a,toB:u,inserted:c.sliceString(0,c.length,`
|
|
95
|
+
`)}))}),console.log(" generated json1 op: "+JSON.stringify(Ok(e,o.changes,o.startState.doc,n,r)))),t.submitOp(Ok(e,o.changes,o.startState.doc,n,r)),this.lock=!1)}destroy(){t.off("op",this.handleOp)}}),MF=({path:t,localPresence:e})=>Se.updateListener.of(n=>{if(n.selectionSet){const r=n.state.selection.ranges[0],{from:i,to:o}=r,s={start:[...t,i],end:[...t,o]};e.submit(s,l=>{if(l)throw l})}}),IF=({path:t,docPresence:e})=>[qt.fromClass(class{constructor(n){this.decorations=Ot.of([]);const r={};e.on("receive",(i,o)=>{o&&LF(t,o)?r[i]=o:delete r[i],this.decorations=Ve.set(Object.keys(r).map(s=>{const l=r[s],{start:a,end:u}=l,c=a[a.length-1];return{from:c,to:c,value:Ve.widget({side:-1,block:!1,widget:new jF(s)})}}),!0),setTimeout(()=>{n.dispatch({annotations:[NF.of(!0)]})},0)})}},{decorations:n=>n.decorations}),VF],NF=Di.define(),LF=(t,e)=>{for(let n=0;n<t.length;n++)if(t[n]!==e.start[n])return!1;return!0};class jF extends oo{constructor(e){super(),this.id=e}eq(e){return e.id===this.id}toDOM(){const e=document.createElement("span");return e.setAttribute("aria-hidden","true"),e.className="cm-json1-presence",e.appendChild(document.createElement("div")),e}ignoreEvent(){return!1}}const VF=Se.baseTheme({".cm-json1-presence":{position:"relative"},".cm-json1-presence > div":{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderLeft:"1px solid yellow"}}),G$=On.define({create:()=>null,update:(t,e)=>{for(const n of e.effects)if(n.is(HO))return n.value;if(!t)return null;if(!e.changes.empty){const n=e.changes.mapPos(t.pos,-1,dn.TrackDel),r=e.changes.mapPos(t.pos+t.text.length,-1,dn.TrackDel);return n===null||r===null||e.newDoc.sliceString(n,r)!==t.text?null:Object.assign(Object.assign({},t),{pos:n})}return t},provide:t=>[Se.decorations.from(t,e=>{if(!e)return Ve.none;const n=e.pos,r=e.pos+e.text.length,i=e.rule.className;return Ve.set(BF({className:i}).range(n,r))}),Se.contentAttributes.from(t,e=>!e||!e.rule.cursor?{style:""}:{style:`cursor: ${e.rule.cursor}`})]}),HO=tt.define(),BF=t=>{var e;return Ve.mark({class:`cm-interact ${(e=t==null?void 0:t.className)!==null&&e!==void 0?e:""}`})},FF=Se.theme({".cm-interact":{background:"rgba(128, 128, 255, 0.2)",borderRadius:"4px"}}),H$=xe.define(),K$=xe.define({combine:t=>t[t.length-1]}),XF=qt.define(t=>({target:null,dragging:!1,mouseX:0,mouseY:0,getMatch(){const e=t.state.facet(H$),n=t.posAtCoords({x:this.mouseX,y:this.mouseY});if(!n)return null;const r=t.state.doc.lineAt(n),i=n-r.from;let o=null;for(const s of e)for(const l of r.text.matchAll(s.regexp)){if(l.index===void 0)continue;const a=l[0];if(!a)continue;const u=l.index,c=l.index+a.length;i<u||i>c||(!o||a.length<o.text.length)&&(o={rule:s,pos:r.from+u,text:a})}return o},updateText(e){return n=>{t.dispatch({effects:HO.of(Object.assign(Object.assign({},e),{text:n})),changes:{from:e.pos,to:e.pos+e.text.length,insert:n}})}},setTarget(e){this.target=e,t.dispatch({effects:HO.of(e)})},isModKeyDown(e){const n=t.state.facet(K$),r=!!window.navigator&&window.navigator.userAgent.includes("Macintosh");switch(n){case"alt":return e.altKey;case"shift":return e.shiftKey;case"ctrl":return e.ctrlKey;case"meta":return e.metaKey;case"mod":return r?e.metaKey:e.ctrlKey}throw new Error(`Invalid mod key: ${n}`)},update(e){const n=e.state.field(G$,!1);n!==void 0&&this.target!==n&&(this.target=n,n===null&&this.endDrag())},startDrag(e){this.dragging||this.target&&(this.dragging=!0,this.target.rule.onDragStart&&this.target.rule.onDragStart(this.target.text,this.updateText(this.target),e))},endDrag(){var e;this.dragging&&(this.dragging=!1,!((e=this.target)===null||e===void 0)&&e.rule.onDragEnd&&this.target.rule.onDragEnd(this.target.text,this.updateText(this.target)))}}),{eventHandlers:{mousedown(t,e){this.isModKeyDown(t)&&this.target&&(t.preventDefault(),this.target.rule.onClick&&this.target.rule.onClick(this.target.text,this.updateText(this.target),t),this.target.rule.onDrag&&this.startDrag(t))},mousemove(t,e){if(this.mouseX=t.clientX,this.mouseY=t.clientY,!this.isModKeyDown(t)){this.target&&this.setTarget(null);return}this.target&&this.dragging?this.target.rule.onDrag&&this.target.rule.onDrag(this.target.text,this.updateText(this.target),t):this.setTarget(this.getMatch())},mouseup(t,e){this.endDrag(),this.target&&!this.isModKeyDown(t)&&this.setTarget(null),this.isModKeyDown(t)&&this.setTarget(this.getMatch())},mouseleave(t,e){this.endDrag(),this.target&&this.setTarget(null)},keydown(t,e){!this.target&&this.isModKeyDown(t)&&this.setTarget(this.getMatch())},keyup(t,e){this.target&&!this.isModKeyDown(t)&&(this.endDrag(),this.setTarget(null))}}}),WF=(t={})=>{var e,n;return[G$,FF,XF,K$.of((e=t.key)!==null&&e!==void 0?e:"alt"),((n=t.rules)!==null&&n!==void 0?n:[]).map(r=>H$.of(r))]},UF=({onInteract:t})=>WF({rules:[{regexp:/-?\b\d+\.?\d*\b/g,cursor:"ew-resize",onDrag:(e,n,r)=>{t&&t();const i=Number(e)+r.movementX;isNaN(i)||n(i.toString())}},{regexp:/true|false/g,cursor:"pointer",onClick:(e,n)=>{switch(t&&t(),e){case"true":return n("false");case"false":return n("true")}}},{regexp:/https?:\/\/[^ "]+/g,cursor:"pointer",onClick:e=>{window.open(e)}}]}),ZF={js:Xa,json:Xa,jsx:Xa,ts:Xa,html:X$,css:D$,md:$F},vk=(t,e)=>{let n=t;for(const r of e){if(!n)return;n=n[r]}return n},YF=({fileId:t,shareDBDoc:e,filesPath:n,localPresence:r,docPresence:i,theme:o,onInteract:s,editorCache:l})=>{if(l.has(t))return l.get(t);const a=e.data,u=[...n,t,"text"],c=[...n,t,"name"],f=vk(a,u),d=vk(a,c).split(".").pop();let p=new Nl;const g=[];g.push(DF({shareDBDoc:e,path:u,json1:hv,textUnicode:jC})),r&&g.push(MF({path:u,localPresence:r})),i&&g.push(IF({path:u,docPresence:i})),g.push(KV),g.push(p.of(Dv[o].value));const y=new Nl,m=(P=>{const E=ZF[P];return E?E():void 0})(d);m?g.push(y.of(m)):(console.warn(`No language extension for file extension: ${d}`),g.push(y.of([]))),g.push(UF({onInteract:s}));const b={editor:new Se({state:ct.create({doc:f,extensions:g})}),themeCompartment:p};return l.set(t,b),b};const zF=({activeFileId:t,shareDBDoc:e,localPresence:n,docPresence:r,theme:i=NQ,filesPath:o=["files"],onInteract:s,editorCache:l})=>{const a=I.useRef(null);return I.useLayoutEffect(()=>{if(!a.current||!e)return;const u=YF({fileId:t,shareDBDoc:e,filesPath:o,localPresence:n,docPresence:r,theme:i,onInteract:s,editorCache:l});return a.current.appendChild(u.editor.dom),()=>{a.current.removeChild(u.editor.dom)}},[e,t]),ne.jsx("div",{className:"vz-code-editor",ref:a})};var Sk=Object.prototype.toString,J$=function(e){var n=Sk.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Sk.call(e.callee)==="[object Function]"),r},jg,bk;function qF(){if(bk)return jg;bk=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=J$,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(h){var d=h.constructor;return d&&d.prototype===h},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var h in window)try{if(!u["$"+h]&&e.call(window,h)&&window[h]!==null&&typeof window[h]=="object")try{a(window[h])}catch{return!0}}catch{return!0}return!1}(),f=function(h){if(typeof window>"u"||!c)return a(h);try{return a(h)}catch{return!1}};t=function(d){var p=d!==null&&typeof d=="object",g=n.call(d)==="[object Function]",y=r(d),O=p&&n.call(d)==="[object String]",m=[];if(!p&&!g&&!y)throw new TypeError("Object.keys called on a non-object");var v=s&&g;if(O&&d.length>0&&!e.call(d,0))for(var b=0;b<d.length;++b)m.push(String(b));if(y&&d.length>0)for(var P=0;P<d.length;++P)m.push(String(P));else for(var E in d)!(v&&E==="prototype")&&e.call(d,E)&&m.push(String(E));if(o)for(var T=f(d),w=0;w<l.length;++w)!(T&&l[w]==="constructor")&&e.call(d,l[w])&&m.push(l[w]);return m}}return jg=t,jg}var GF=Array.prototype.slice,HF=J$,wk=Object.keys,rh=wk?function(e){return wk(e)}:qF(),kk=Object.keys;rh.shim=function(){if(Object.keys){var e=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);e||(Object.keys=function(r){return HF(r)?kk(GF.call(r)):kk(r)})}else Object.keys=rh;return Object.keys||rh};var eT=rh,tT=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},KF=tT,i0=function(){return KF()&&!!Symbol.toStringTag},Pk=typeof Symbol<"u"&&Symbol,JF=tT,eX=function(){return typeof Pk!="function"||typeof Symbol!="function"||typeof Pk("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:JF()},tX="Function.prototype.bind called on incompatible ",Vg=Array.prototype.slice,nX=Object.prototype.toString,rX="[object Function]",iX=function(e){var n=this;if(typeof n!="function"||nX.call(n)!==rX)throw new TypeError(tX+n);for(var r=Vg.call(arguments,1),i,o=function(){if(this instanceof i){var c=n.apply(this,r.concat(Vg.call(arguments)));return Object(c)===c?c:this}else return n.apply(e,r.concat(Vg.call(arguments)))},s=Math.max(0,n.length-r.length),l=[],a=0;a<s;a++)l.push("$"+a);if(i=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var u=function(){};u.prototype=n.prototype,i.prototype=new u,u.prototype=null}return i},oX=iX,o0=Function.prototype.bind||oX,sX=o0,lX=sX.call(Function.call,Object.prototype.hasOwnProperty),ot,zl=SyntaxError,nT=Function,El=TypeError,Bg=function(t){try{return nT('"use strict"; return ('+t+").constructor;")()}catch{}},vs=Object.getOwnPropertyDescriptor;if(vs)try{vs({},"")}catch{vs=null}var Fg=function(){throw new El},aX=vs?function(){try{return arguments.callee,Fg}catch{try{return vs(arguments,"callee").get}catch{return Fg}}}():Fg,Ws=eX(),Oi=Object.getPrototypeOf||function(t){return t.__proto__},Hs={},uX=typeof Uint8Array>"u"?ot:Oi(Uint8Array),Ss={"%AggregateError%":typeof AggregateError>"u"?ot:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ot:ArrayBuffer,"%ArrayIteratorPrototype%":Ws?Oi([][Symbol.iterator]()):ot,"%AsyncFromSyncIteratorPrototype%":ot,"%AsyncFunction%":Hs,"%AsyncGenerator%":Hs,"%AsyncGeneratorFunction%":Hs,"%AsyncIteratorPrototype%":Hs,"%Atomics%":typeof Atomics>"u"?ot:Atomics,"%BigInt%":typeof BigInt>"u"?ot:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ot:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ot:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ot:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ot:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ot:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ot:FinalizationRegistry,"%Function%":nT,"%GeneratorFunction%":Hs,"%Int8Array%":typeof Int8Array>"u"?ot:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ot:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ot:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ws?Oi(Oi([][Symbol.iterator]())):ot,"%JSON%":typeof JSON=="object"?JSON:ot,"%Map%":typeof Map>"u"?ot:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ws?ot:Oi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ot:Promise,"%Proxy%":typeof Proxy>"u"?ot:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ot:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ot:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ws?ot:Oi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ot:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ws?Oi(""[Symbol.iterator]()):ot,"%Symbol%":Ws?Symbol:ot,"%SyntaxError%":zl,"%ThrowTypeError%":aX,"%TypedArray%":uX,"%TypeError%":El,"%Uint8Array%":typeof Uint8Array>"u"?ot:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ot:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ot:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ot:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ot:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ot:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ot:WeakSet};try{null.error}catch(t){var cX=Oi(Oi(t));Ss["%Error.prototype%"]=cX}var fX=function t(e){var n;if(e==="%AsyncFunction%")n=Bg("async function () {}");else if(e==="%GeneratorFunction%")n=Bg("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Bg("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&(n=Oi(i.prototype))}return Ss[e]=n,n},xk={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hc=o0,cd=lX,hX=hc.call(Function.call,Array.prototype.concat),dX=hc.call(Function.apply,Array.prototype.splice),Ck=hc.call(Function.call,String.prototype.replace),fd=hc.call(Function.call,String.prototype.slice),pX=hc.call(Function.call,RegExp.prototype.exec),gX=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mX=/\\(\\)?/g,OX=function(e){var n=fd(e,0,1),r=fd(e,-1);if(n==="%"&&r!=="%")throw new zl("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new zl("invalid intrinsic syntax, expected opening `%`");var i=[];return Ck(e,gX,function(o,s,l,a){i[i.length]=l?Ck(a,mX,"$1"):s||o}),i},yX=function(e,n){var r=e,i;if(cd(xk,r)&&(i=xk[r],r="%"+i[0]+"%"),cd(Ss,r)){var o=Ss[r];if(o===Hs&&(o=fX(r)),typeof o>"u"&&!n)throw new El("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new zl("intrinsic "+e+" does not exist!")},s0=function(e,n){if(typeof e!="string"||e.length===0)throw new El("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new El('"allowMissing" argument must be a boolean');if(pX(/^%?[^%]*%?$/,e)===null)throw new zl("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=OX(e),i=r.length>0?r[0]:"",o=yX("%"+i+"%",n),s=o.name,l=o.value,a=!1,u=o.alias;u&&(i=u[0],dX(r,hX([0,1],u)));for(var c=1,f=!0;c<r.length;c+=1){var h=r[c],d=fd(h,0,1),p=fd(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new zl("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(a=!0),i+="."+h,s="%"+i+"%",cd(Ss,s))l=Ss[s];else if(l!=null){if(!(h in l)){if(!n)throw new El("base intrinsic for "+e+" exists, but the property is not available.");return}if(vs&&c+1>=r.length){var g=vs(l,h);f=!!g,f&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[h]}else f=cd(l,h),l=l[h];f&&!a&&(Ss[s]=l)}}return l},rT={exports:{}};(function(t){var e=o0,n=s0,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||e.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),a=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(f){var h=o(e,i,arguments);if(s&&l){var d=s(h,"length");d.configurable&&l(h,"length",{value:1+a(0,f.length-(arguments.length-1))})}return h};var u=function(){return o(e,r,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(rT);var l0=rT.exports,iT=s0,oT=l0,vX=oT(iT("String.prototype.indexOf")),sT=function(e,n){var r=iT(e,!!n);return typeof r=="function"&&vX(e,".prototype.")>-1?oT(r):r},SX=i0(),bX=sT,KO=bX("Object.prototype.toString"),Gd=function(e){return SX&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:KO(e)==="[object Arguments]"},lT=function(e){return Gd(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&KO(e)!=="[object Array]"&&KO(e.callee)==="[object Function]"},wX=function(){return Gd(arguments)}();Gd.isLegacyArguments=lT;var kX=wX?Gd:lT,PX=s0,JO=PX("%Object.defineProperty%",!0),ey=function(){if(JO)try{return JO({},"a",{value:1}),!0}catch{return!1}return!1};ey.hasArrayLengthDefineBug=function(){if(!ey())return null;try{return JO([],"length",{value:1}).length!==1}catch{return!0}};var xX=ey,CX=eT,EX=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",QX=Object.prototype.toString,_X=Array.prototype.concat,aT=Object.defineProperty,$X=function(t){return typeof t=="function"&&QX.call(t)==="[object Function]"},TX=xX(),uT=aT&&TX,AX=function(t,e,n,r){if(e in t){if(r===!0){if(t[e]===n)return}else if(!$X(r)||!r())return}uT?aT(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n},cT=function(t,e){var n=arguments.length>2?arguments[2]:{},r=CX(e);EX&&(r=_X.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i<r.length;i+=1)AX(t,r[i],e[r[i]],n[r[i]])};cT.supportsDescriptors=!!uT;var dc=cT,Ek=function(t){return t!==t},fT=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Ek(e)&&Ek(n))},RX=fT,hT=function(){return typeof Object.is=="function"?Object.is:RX},DX=hT,MX=dc,IX=function(){var e=DX();return MX(Object,{is:e},{is:function(){return Object.is!==e}}),e},NX=dc,LX=l0,jX=fT,dT=hT,VX=IX,pT=LX(dT(),Object);NX(pT,{getPolyfill:dT,implementation:jX,shim:VX});var BX=pT,ty=sT,gT=i0(),mT,OT,ny,ry;if(gT){mT=ty("Object.prototype.hasOwnProperty"),OT=ty("RegExp.prototype.exec"),ny={};var Xg=function(){throw ny};ry={toString:Xg,valueOf:Xg},typeof Symbol.toPrimitive=="symbol"&&(ry[Symbol.toPrimitive]=Xg)}var FX=ty("Object.prototype.toString"),XX=Object.getOwnPropertyDescriptor,WX="[object RegExp]",UX=gT?function(e){if(!e||typeof e!="object")return!1;var n=XX(e,"lastIndex"),r=n&&mT(n,"value");if(!r)return!1;try{OT(e,ry)}catch(i){return i===ny}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:FX(e)===WX},yT={exports:{}},Zu=function(){return typeof(function(){}).name=="string"},au=Object.getOwnPropertyDescriptor;if(au)try{au([],"length")}catch{au=null}Zu.functionsHaveConfigurableNames=function(){if(!Zu()||!au)return!1;var e=au(function(){},"name");return!!e&&!!e.configurable};var ZX=Function.prototype.bind;Zu.boundFunctionsHaveNames=function(){return Zu()&&typeof ZX=="function"&&(function(){}).bind().name!==""};var YX=Zu;(function(t){var e=YX.functionsHaveConfigurableNames(),n=Object,r=TypeError;t.exports=function(){if(this!=null&&this!==n(this))throw new r("RegExp.prototype.flags getter called on non-object");var o="";return this.hasIndices&&(o+="d"),this.global&&(o+="g"),this.ignoreCase&&(o+="i"),this.multiline&&(o+="m"),this.dotAll&&(o+="s"),this.unicode&&(o+="u"),this.sticky&&(o+="y"),o},e&&Object.defineProperty&&Object.defineProperty(t.exports,"name",{value:"get flags"})})(yT);var vT=yT.exports,zX=vT,qX=dc.supportsDescriptors,GX=Object.getOwnPropertyDescriptor,ST=function(){if(qX&&/a/mig.flags==="gim"){var e=GX(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return e.get}}return zX},HX=dc.supportsDescriptors,KX=ST,JX=Object.getOwnPropertyDescriptor,eW=Object.defineProperty,tW=TypeError,Qk=Object.getPrototypeOf,nW=/a/,rW=function(){if(!HX||!Qk)throw new tW("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=KX(),n=Qk(nW),r=JX(n,"flags");return(!r||r.get!==e)&&eW(n,"flags",{configurable:!0,enumerable:!1,get:e}),e},iW=dc,oW=l0,sW=vT,bT=ST,lW=rW,wT=oW(bT());iW(wT,{getPolyfill:bT,implementation:sW,shim:lW});var aW=wT,uW=Date.prototype.getDay,cW=function(e){try{return uW.call(e),!0}catch{return!1}},fW=Object.prototype.toString,hW="[object Date]",dW=i0(),pW=function(e){return typeof e!="object"||e===null?!1:dW?cW(e):fW.call(e)===hW},_k=eT,$k=kX,Tk=BX,Ak=UX,Rk=aW,Dk=pW,Mk=Date.prototype.getTime;function kT(t,e,n){var r=n||{};return(r.strict?Tk(t,e):t===e)?!0:!t||!e||typeof t!="object"&&typeof e!="object"?r.strict?Tk(t,e):t==e:gW(t,e,r)}function Ik(t){return t==null}function Nk(t){return!(!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number")}function gW(t,e,n){var r,i;if(typeof t!=typeof e||Ik(t)||Ik(e)||t.prototype!==e.prototype||$k(t)!==$k(e))return!1;var o=Ak(t),s=Ak(e);if(o!==s)return!1;if(o||s)return t.source===e.source&&Rk(t)===Rk(e);if(Dk(t)&&Dk(e))return Mk.call(t)===Mk.call(e);var l=Nk(t),a=Nk(e);if(l!==a)return!1;if(l||a){if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}if(typeof t!=typeof e)return!1;try{var u=_k(t),c=_k(e)}catch{return!1}if(u.length!==c.length)return!1;for(u.sort(),c.sort(),r=u.length-1;r>=0;r--)if(u[r]!=c[r])return!1;for(r=u.length-1;r>=0;r--)if(i=u[r],!kT(t[i],e[i],n))return!1;return!0}var mW=kT,iy=mW,oy;function Lk(t,e,n,r,i){var o;return i?o=i.replaceOp(t,n,r):(o={p:t},o[e?"od":"ld"]=n,o[e?"oi":"li"]=r),[o]}function OW(t,e,n,r,i,o){const s=[];var l=oy.patch_make(e,n);return Object.keys(l).forEach(function(a){var u=l[a],c=u.start1;u.diffs.forEach(function([f,h]){switch(f){case r.DIFF_DELETE:if(o){var d=o.remove(c,h);s.push(i.editOp(t,o.type,d))}else s.push({sd:h,p:[...t,c]});break;case r.DIFF_INSERT:if(o){var d=o.insert(c,h);s.push(i.editOp(t,o.type,d))}else s.push({si:h,p:[...t,c]});case r.DIFF_EQUAL:c+=h.length;break;default:throw Error(`Unsupported operation type: ${f}`)}})}),s}var yW=function(t,e){if(e&&e.json1){var n=e.json1.type.compose;return t.reduce(n,null)}for(var r=0,i=t.length-1;r<i;++r){var o=t[r],s=t[r+1];iy(o.p.slice(0,-1),s.p.slice(0,-1))&&o.p[o.p.length-1]+1===s.p[s.p.length-1]&&(!o.li||!s.ld||iy(o.li,s.ld)&&(delete o.li,delete s.ld))}return t=t.filter(function(l){return Object.keys(l).length>1}),t},Wa=function(t,e,n=[],r){var i=r&&r.diffMatchPatch,o=r&&r.json1,s=r&&r.textUnicode,l=typeof n[n.length-1]=="string"||n.length===0;if(iy(t,e)&&Array.isArray(t)===Array.isArray(e))return[];if(typeof e>"u"){var a;return o?a=o.removeOp(n,t):(a={p:n},a[l?"od":"ld"]=t),[a]}if(typeof t>"u"){var a;return o?a=o.insertOp(n,e):(a={p:n},a[l?"oi":"li"]=e),[a]}if(t===null||e===null){var O=[];if(o)O.push(o.removeOp(n,t)),O.push(o.insertOp(n,e));else{var u={p:n};u[l?"od":"ld"]=t;var c={p:n};c[l?"oi":"li"]=e,O=[u,c]}return O}if(i&&typeof t=="string"&&typeof e=="string")return oy||(oy=new i),OW(n,t,e,i,o,s);var f=["string","number","boolean"];if(f.includes(typeof e)||f.includes(typeof t))return Lk(n,l,t,e,o);if(Array.isArray(e)&&Array.isArray(t)){for(var O=[],h=t.length,d=e.length,p=Math.min(h,d),O=[],g=0;g<p;++g){var y=Wa(t[g],e[g],[...n,g],r);y.forEach(function(b){O.push(b)})}if(d>h)for(var g=p;g<d;g++){var y=Wa(void 0,e[g],[...n,g],r);y.forEach(function(E){O.push(E)})}else if(d<h)for(var g=p;g<h;g++){var y=Wa(t[g],void 0,[...n,p],r);y.forEach(function(E){O.push(E)})}return O}else if(Array.isArray(e)||Array.isArray(t))return Lk(n,l,t,e,o);var O=[],m=new Set([...Object.keys(t),...Object.keys(e)]);return m.forEach(function(v){var b=Wa(t[v],e[v],[...n,v],r);O=O.concat(b)}),O},vW=function(t,e,n,r,i){var o={diffMatchPatch:n,json1:r,textUnicode:i};return yW(Wa(t,e,[],o),o)},SW=vW;const bW=Yo(SW);var PT={exports:{}};(function(t){var e=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,i=0;e.Diff=function(o,s){return[o,s]},e.prototype.diff_main=function(o,s,l,a){typeof a>"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var u=a;if(o==null||s==null)throw new Error("Null input. (diff_main)");if(o==s)return o?[new e.Diff(i,o)]:[];typeof l>"u"&&(l=!0);var c=l,f=this.diff_commonPrefix(o,s),h=o.substring(0,f);o=o.substring(f),s=s.substring(f),f=this.diff_commonSuffix(o,s);var d=o.substring(o.length-f);o=o.substring(0,o.length-f),s=s.substring(0,s.length-f);var p=this.diff_compute_(o,s,c,u);return h&&p.unshift(new e.Diff(i,h)),d&&p.push(new e.Diff(i,d)),this.diff_cleanupMerge(p),p},e.prototype.diff_compute_=function(o,s,l,a){var u;if(!o)return[new e.Diff(r,s)];if(!s)return[new e.Diff(n,o)];var c=o.length>s.length?o:s,f=o.length>s.length?s:o,h=c.indexOf(f);if(h!=-1)return u=[new e.Diff(r,c.substring(0,h)),new e.Diff(i,f),new e.Diff(r,c.substring(h+f.length))],o.length>s.length&&(u[0][0]=u[2][0]=n),u;if(f.length==1)return[new e.Diff(n,o),new e.Diff(r,s)];var d=this.diff_halfMatch_(o,s);if(d){var p=d[0],g=d[1],y=d[2],O=d[3],m=d[4],v=this.diff_main(p,y,l,a),b=this.diff_main(g,O,l,a);return v.concat([new e.Diff(i,m)],b)}return l&&o.length>100&&s.length>100?this.diff_lineMode_(o,s,a):this.diff_bisect_(o,s,a)},e.prototype.diff_lineMode_=function(o,s,l){var a=this.diff_linesToChars_(o,s);o=a.chars1,s=a.chars2;var u=a.lineArray,c=this.diff_main(o,s,!1,l);this.diff_charsToLines_(c,u),this.diff_cleanupSemantic(c),c.push(new e.Diff(i,""));for(var f=0,h=0,d=0,p="",g="";f<c.length;){switch(c[f][0]){case r:d++,g+=c[f][1];break;case n:h++,p+=c[f][1];break;case i:if(h>=1&&d>=1){c.splice(f-h-d,h+d),f=f-h-d;for(var y=this.diff_main(p,g,!1,l),O=y.length-1;O>=0;O--)c.splice(f,0,y[O]);f=f+y.length}d=0,h=0,p="",g="";break}f++}return c.pop(),c},e.prototype.diff_bisect_=function(o,s,l){for(var a=o.length,u=s.length,c=Math.ceil((a+u)/2),f=c,h=2*c,d=new Array(h),p=new Array(h),g=0;g<h;g++)d[g]=-1,p[g]=-1;d[f+1]=0,p[f+1]=0;for(var y=a-u,O=y%2!=0,m=0,v=0,b=0,P=0,E=0;E<c&&!(new Date().getTime()>l);E++){for(var T=-E+m;T<=E-v;T+=2){var w=f+T,k;T==-E||T!=E&&d[w-1]<d[w+1]?k=d[w+1]:k=d[w-1]+1;for(var C=k-T;k<a&&C<u&&o.charAt(k)==s.charAt(C);)k++,C++;if(d[w]=k,k>a)v+=2;else if(C>u)m+=2;else if(O){var Q=f+y-T;if(Q>=0&&Q<h&&p[Q]!=-1){var M=a-p[Q];if(k>=M)return this.diff_bisectSplit_(o,s,k,C,l)}}}for(var L=-E+b;L<=E-P;L+=2){var Q=f+L,M;L==-E||L!=E&&p[Q-1]<p[Q+1]?M=p[Q+1]:M=p[Q-1]+1;for(var V=M-L;M<a&&V<u&&o.charAt(a-M-1)==s.charAt(u-V-1);)M++,V++;if(p[Q]=M,M>a)P+=2;else if(V>u)b+=2;else if(!O){var w=f+y-L;if(w>=0&&w<h&&d[w]!=-1){var k=d[w],C=f+k-w;if(M=a-M,k>=M)return this.diff_bisectSplit_(o,s,k,C,l)}}}}return[new e.Diff(n,o),new e.Diff(r,s)]},e.prototype.diff_bisectSplit_=function(o,s,l,a,u){var c=o.substring(0,l),f=s.substring(0,a),h=o.substring(l),d=s.substring(a),p=this.diff_main(c,f,!1,u),g=this.diff_main(h,d,!1,u);return p.concat(g)},e.prototype.diff_linesToChars_=function(o,s){var l=[],a={};l[0]="";function u(d){for(var p="",g=0,y=-1,O=l.length;y<d.length-1;){y=d.indexOf(`
|
|
96
|
+
`,g),y==-1&&(y=d.length-1);var m=d.substring(g,y+1);(a.hasOwnProperty?a.hasOwnProperty(m):a[m]!==void 0)?p+=String.fromCharCode(a[m]):(O==c&&(m=d.substring(g),y=d.length),p+=String.fromCharCode(O),a[m]=O,l[O++]=m),g=y+1}return p}var c=4e4,f=u(o);c=65535;var h=u(s);return{chars1:f,chars2:h,lineArray:l}},e.prototype.diff_charsToLines_=function(o,s){for(var l=0;l<o.length;l++){for(var a=o[l][1],u=[],c=0;c<a.length;c++)u[c]=s[a.charCodeAt(c)];o[l][1]=u.join("")}},e.prototype.diff_commonPrefix=function(o,s){if(!o||!s||o.charAt(0)!=s.charAt(0))return 0;for(var l=0,a=Math.min(o.length,s.length),u=a,c=0;l<u;)o.substring(c,u)==s.substring(c,u)?(l=u,c=l):a=u,u=Math.floor((a-l)/2+l);return u},e.prototype.diff_commonSuffix=function(o,s){if(!o||!s||o.charAt(o.length-1)!=s.charAt(s.length-1))return 0;for(var l=0,a=Math.min(o.length,s.length),u=a,c=0;l<u;)o.substring(o.length-u,o.length-c)==s.substring(s.length-u,s.length-c)?(l=u,c=l):a=u,u=Math.floor((a-l)/2+l);return u},e.prototype.diff_commonOverlap_=function(o,s){var l=o.length,a=s.length;if(l==0||a==0)return 0;l>a?o=o.substring(l-a):l<a&&(s=s.substring(0,l));var u=Math.min(l,a);if(o==s)return u;for(var c=0,f=1;;){var h=o.substring(u-f),d=s.indexOf(h);if(d==-1)return c;f+=d,(d==0||o.substring(u-f)==s.substring(0,f))&&(c=f,f++)}},e.prototype.diff_halfMatch_=function(o,s){if(this.Diff_Timeout<=0)return null;var l=o.length>s.length?o:s,a=o.length>s.length?s:o;if(l.length<4||a.length*2<l.length)return null;var u=this;function c(v,b,P){for(var E=v.substring(P,P+Math.floor(v.length/4)),T=-1,w="",k,C,Q,M;(T=b.indexOf(E,T+1))!=-1;){var L=u.diff_commonPrefix(v.substring(P),b.substring(T)),V=u.diff_commonSuffix(v.substring(0,P),b.substring(0,T));w.length<V+L&&(w=b.substring(T-V,T)+b.substring(T,T+L),k=v.substring(0,P-V),C=v.substring(P+L),Q=b.substring(0,T-V),M=b.substring(T+L))}return w.length*2>=v.length?[k,C,Q,M,w]:null}var f=c(l,a,Math.ceil(l.length/4)),h=c(l,a,Math.ceil(l.length/2)),d;if(!f&&!h)return null;h?f?d=f[4].length>h[4].length?f:h:d=h:d=f;var p,g,y,O;o.length>s.length?(p=d[0],g=d[1],y=d[2],O=d[3]):(y=d[0],O=d[1],p=d[2],g=d[3]);var m=d[4];return[p,g,y,O,m]},e.prototype.diff_cleanupSemantic=function(o){for(var s=!1,l=[],a=0,u=null,c=0,f=0,h=0,d=0,p=0;c<o.length;)o[c][0]==i?(l[a++]=c,f=d,h=p,d=0,p=0,u=o[c][1]):(o[c][0]==r?d+=o[c][1].length:p+=o[c][1].length,u&&u.length<=Math.max(f,h)&&u.length<=Math.max(d,p)&&(o.splice(l[a-1],0,new e.Diff(n,u)),o[l[a-1]+1][0]=r,a--,a--,c=a>0?l[a-1]:-1,f=0,h=0,d=0,p=0,u=null,s=!0)),c++;for(s&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),c=1;c<o.length;){if(o[c-1][0]==n&&o[c][0]==r){var g=o[c-1][1],y=o[c][1],O=this.diff_commonOverlap_(g,y),m=this.diff_commonOverlap_(y,g);O>=m?(O>=g.length/2||O>=y.length/2)&&(o.splice(c,0,new e.Diff(i,y.substring(0,O))),o[c-1][1]=g.substring(0,g.length-O),o[c+1][1]=y.substring(O),c++):(m>=g.length/2||m>=y.length/2)&&(o.splice(c,0,new e.Diff(i,g.substring(0,m))),o[c-1][0]=r,o[c-1][1]=y.substring(0,y.length-m),o[c+1][0]=n,o[c+1][1]=g.substring(m),c++),c++}c++}},e.prototype.diff_cleanupSemanticLossless=function(o){function s(m,v){if(!m||!v)return 6;var b=m.charAt(m.length-1),P=v.charAt(0),E=b.match(e.nonAlphaNumericRegex_),T=P.match(e.nonAlphaNumericRegex_),w=E&&b.match(e.whitespaceRegex_),k=T&&P.match(e.whitespaceRegex_),C=w&&b.match(e.linebreakRegex_),Q=k&&P.match(e.linebreakRegex_),M=C&&m.match(e.blanklineEndRegex_),L=Q&&v.match(e.blanklineStartRegex_);return M||L?5:C||Q?4:E&&!w&&k?3:w||k?2:E||T?1:0}for(var l=1;l<o.length-1;){if(o[l-1][0]==i&&o[l+1][0]==i){var a=o[l-1][1],u=o[l][1],c=o[l+1][1],f=this.diff_commonSuffix(a,u);if(f){var h=u.substring(u.length-f);a=a.substring(0,a.length-f),u=h+u.substring(0,u.length-f),c=h+c}for(var d=a,p=u,g=c,y=s(a,u)+s(u,c);u.charAt(0)===c.charAt(0);){a+=u.charAt(0),u=u.substring(1)+c.charAt(0),c=c.substring(1);var O=s(a,u)+s(u,c);O>=y&&(y=O,d=a,p=u,g=c)}o[l-1][1]!=d&&(d?o[l-1][1]=d:(o.splice(l-1,1),l--),o[l][1]=p,g?o[l+1][1]=g:(o.splice(l+1,1),l--))}l++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(o){for(var s=!1,l=[],a=0,u=null,c=0,f=!1,h=!1,d=!1,p=!1;c<o.length;)o[c][0]==i?(o[c][1].length<this.Diff_EditCost&&(d||p)?(l[a++]=c,f=d,h=p,u=o[c][1]):(a=0,u=null),d=p=!1):(o[c][0]==n?p=!0:d=!0,u&&(f&&h&&d&&p||u.length<this.Diff_EditCost/2&&f+h+d+p==3)&&(o.splice(l[a-1],0,new e.Diff(n,u)),o[l[a-1]+1][0]=r,a--,u=null,f&&h?(d=p=!0,a=0):(a--,c=a>0?l[a-1]:-1,d=p=!1),s=!0)),c++;s&&this.diff_cleanupMerge(o)},e.prototype.diff_cleanupMerge=function(o){o.push(new e.Diff(i,""));for(var s=0,l=0,a=0,u="",c="",f;s<o.length;)switch(o[s][0]){case r:a++,c+=o[s][1],s++;break;case n:l++,u+=o[s][1],s++;break;case i:l+a>1?(l!==0&&a!==0&&(f=this.diff_commonPrefix(c,u),f!==0&&(s-l-a>0&&o[s-l-a-1][0]==i?o[s-l-a-1][1]+=c.substring(0,f):(o.splice(0,0,new e.Diff(i,c.substring(0,f))),s++),c=c.substring(f),u=u.substring(f)),f=this.diff_commonSuffix(c,u),f!==0&&(o[s][1]=c.substring(c.length-f)+o[s][1],c=c.substring(0,c.length-f),u=u.substring(0,u.length-f))),s-=l+a,o.splice(s,l+a),u.length&&(o.splice(s,0,new e.Diff(n,u)),s++),c.length&&(o.splice(s,0,new e.Diff(r,c)),s++),s++):s!==0&&o[s-1][0]==i?(o[s-1][1]+=o[s][1],o.splice(s,1)):s++,a=0,l=0,u="",c="";break}o[o.length-1][1]===""&&o.pop();var h=!1;for(s=1;s<o.length-1;)o[s-1][0]==i&&o[s+1][0]==i&&(o[s][1].substring(o[s][1].length-o[s-1][1].length)==o[s-1][1]?(o[s][1]=o[s-1][1]+o[s][1].substring(0,o[s][1].length-o[s-1][1].length),o[s+1][1]=o[s-1][1]+o[s+1][1],o.splice(s-1,1),h=!0):o[s][1].substring(0,o[s+1][1].length)==o[s+1][1]&&(o[s-1][1]+=o[s+1][1],o[s][1]=o[s][1].substring(o[s+1][1].length)+o[s+1][1],o.splice(s+1,1),h=!0)),s++;h&&this.diff_cleanupMerge(o)},e.prototype.diff_xIndex=function(o,s){var l=0,a=0,u=0,c=0,f;for(f=0;f<o.length&&(o[f][0]!==r&&(l+=o[f][1].length),o[f][0]!==n&&(a+=o[f][1].length),!(l>s));f++)u=l,c=a;return o.length!=f&&o[f][0]===n?c:c+(s-u)},e.prototype.diff_prettyHtml=function(o){for(var s=[],l=/&/g,a=/</g,u=/>/g,c=/\n/g,f=0;f<o.length;f++){var h=o[f][0],d=o[f][1],p=d.replace(l,"&").replace(a,"<").replace(u,">").replace(c,"¶<br>");switch(h){case r:s[f]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:s[f]='<del style="background:#ffe6e6;">'+p+"</del>";break;case i:s[f]="<span>"+p+"</span>";break}}return s.join("")},e.prototype.diff_text1=function(o){for(var s=[],l=0;l<o.length;l++)o[l][0]!==r&&(s[l]=o[l][1]);return s.join("")},e.prototype.diff_text2=function(o){for(var s=[],l=0;l<o.length;l++)o[l][0]!==n&&(s[l]=o[l][1]);return s.join("")},e.prototype.diff_levenshtein=function(o){for(var s=0,l=0,a=0,u=0;u<o.length;u++){var c=o[u][0],f=o[u][1];switch(c){case r:l+=f.length;break;case n:a+=f.length;break;case i:s+=Math.max(l,a),l=0,a=0;break}}return s+=Math.max(l,a),s},e.prototype.diff_toDelta=function(o){for(var s=[],l=0;l<o.length;l++)switch(o[l][0]){case r:s[l]="+"+encodeURI(o[l][1]);break;case n:s[l]="-"+o[l][1].length;break;case i:s[l]="="+o[l][1].length;break}return s.join(" ").replace(/%20/g," ")},e.prototype.diff_fromDelta=function(o,s){for(var l=[],a=0,u=0,c=s.split(/\t/g),f=0;f<c.length;f++){var h=c[f].substring(1);switch(c[f].charAt(0)){case"+":try{l[a++]=new e.Diff(r,decodeURI(h))}catch{throw new Error("Illegal escape in diff_fromDelta: "+h)}break;case"-":case"=":var d=parseInt(h,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+h);var p=o.substring(u,u+=d);c[f].charAt(0)=="="?l[a++]=new e.Diff(i,p):l[a++]=new e.Diff(n,p);break;default:if(c[f])throw new Error("Invalid diff operation in diff_fromDelta: "+c[f])}}if(u!=o.length)throw new Error("Delta length ("+u+") does not equal source text length ("+o.length+").");return l},e.prototype.match_main=function(o,s,l){if(o==null||s==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,o.length)),o==s?0:o.length?o.substring(l,l+s.length)==s?l:this.match_bitap_(o,s,l):-1},e.prototype.match_bitap_=function(o,s,l){if(s.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),u=this;function c(k,C){var Q=k/s.length,M=Math.abs(l-C);return u.Match_Distance?Q+M/u.Match_Distance:M?1:Q}var f=this.Match_Threshold,h=o.indexOf(s,l);h!=-1&&(f=Math.min(c(0,h),f),h=o.lastIndexOf(s,l+s.length),h!=-1&&(f=Math.min(c(0,h),f)));var d=1<<s.length-1;h=-1;for(var p,g,y=s.length+o.length,O,m=0;m<s.length;m++){for(p=0,g=y;p<g;)c(m,l+g)<=f?p=g:y=g,g=Math.floor((y-p)/2+p);y=g;var v=Math.max(1,l-g+1),b=Math.min(l+g,o.length)+s.length,P=Array(b+2);P[b+1]=(1<<m)-1;for(var E=b;E>=v;E--){var T=a[o.charAt(E-1)];if(m===0?P[E]=(P[E+1]<<1|1)&T:P[E]=(P[E+1]<<1|1)&T|((O[E+1]|O[E])<<1|1)|O[E+1],P[E]&d){var w=c(m,E-1);if(w<=f)if(f=w,h=E-1,h>l)v=Math.max(1,2*l-h);else break}}if(c(m+1,l)>f)break;O=P}return h},e.prototype.match_alphabet_=function(o){for(var s={},l=0;l<o.length;l++)s[o.charAt(l)]=0;for(var l=0;l<o.length;l++)s[o.charAt(l)]|=1<<o.length-l-1;return s},e.prototype.patch_addContext_=function(o,s){if(s.length!=0){if(o.start2===null)throw Error("patch not initialized");for(var l=s.substring(o.start2,o.start2+o.length1),a=0;s.indexOf(l)!=s.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)a+=this.Patch_Margin,l=s.substring(o.start2-a,o.start2+o.length1+a);a+=this.Patch_Margin;var u=s.substring(o.start2-a,o.start2);u&&o.diffs.unshift(new e.Diff(i,u));var c=s.substring(o.start2+o.length1,o.start2+o.length1+a);c&&o.diffs.push(new e.Diff(i,c)),o.start1-=u.length,o.start2-=u.length,o.length1+=u.length+c.length,o.length2+=u.length+c.length}},e.prototype.patch_make=function(o,s,l){var a,u;if(typeof o=="string"&&typeof s=="string"&&typeof l>"u")a=o,u=this.diff_main(a,s,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(o&&typeof o=="object"&&typeof s>"u"&&typeof l>"u")u=o,a=this.diff_text1(u);else if(typeof o=="string"&&s&&typeof s=="object"&&typeof l>"u")a=o,u=s;else if(typeof o=="string"&&typeof s=="string"&&l&&typeof l=="object")a=o,u=l;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var c=[],f=new e.patch_obj,h=0,d=0,p=0,g=a,y=a,O=0;O<u.length;O++){var m=u[O][0],v=u[O][1];switch(!h&&m!==i&&(f.start1=d,f.start2=p),m){case r:f.diffs[h++]=u[O],f.length2+=v.length,y=y.substring(0,p)+v+y.substring(p);break;case n:f.length1+=v.length,f.diffs[h++]=u[O],y=y.substring(0,p)+y.substring(p+v.length);break;case i:v.length<=2*this.Patch_Margin&&h&&u.length!=O+1?(f.diffs[h++]=u[O],f.length1+=v.length,f.length2+=v.length):v.length>=2*this.Patch_Margin&&h&&(this.patch_addContext_(f,g),c.push(f),f=new e.patch_obj,h=0,g=y,d=p);break}m!==r&&(d+=v.length),m!==n&&(p+=v.length)}return h&&(this.patch_addContext_(f,g),c.push(f)),c},e.prototype.patch_deepCopy=function(o){for(var s=[],l=0;l<o.length;l++){var a=o[l],u=new e.patch_obj;u.diffs=[];for(var c=0;c<a.diffs.length;c++)u.diffs[c]=new e.Diff(a.diffs[c][0],a.diffs[c][1]);u.start1=a.start1,u.start2=a.start2,u.length1=a.length1,u.length2=a.length2,s[l]=u}return s},e.prototype.patch_apply=function(o,s){if(o.length==0)return[s,[]];o=this.patch_deepCopy(o);var l=this.patch_addPadding(o);s=l+s+l,this.patch_splitMax(o);for(var a=0,u=[],c=0;c<o.length;c++){var f=o[c].start2+a,h=this.diff_text1(o[c].diffs),d,p=-1;if(h.length>this.Match_MaxBits?(d=this.match_main(s,h.substring(0,this.Match_MaxBits),f),d!=-1&&(p=this.match_main(s,h.substring(h.length-this.Match_MaxBits),f+h.length-this.Match_MaxBits),(p==-1||d>=p)&&(d=-1))):d=this.match_main(s,h,f),d==-1)u[c]=!1,a-=o[c].length2-o[c].length1;else{u[c]=!0,a=d-f;var g;if(p==-1?g=s.substring(d,d+h.length):g=s.substring(d,p+this.Match_MaxBits),h==g)s=s.substring(0,d)+this.diff_text2(o[c].diffs)+s.substring(d+h.length);else{var y=this.diff_main(h,g,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(y)/h.length>this.Patch_DeleteThreshold)u[c]=!1;else{this.diff_cleanupSemanticLossless(y);for(var O=0,m,v=0;v<o[c].diffs.length;v++){var b=o[c].diffs[v];b[0]!==i&&(m=this.diff_xIndex(y,O)),b[0]===r?s=s.substring(0,d+m)+b[1]+s.substring(d+m):b[0]===n&&(s=s.substring(0,d+m)+s.substring(d+this.diff_xIndex(y,O+b[1].length))),b[0]!==n&&(O+=b[1].length)}}}}}return s=s.substring(l.length,s.length-l.length),[s,u]},e.prototype.patch_addPadding=function(o){for(var s=this.Patch_Margin,l="",a=1;a<=s;a++)l+=String.fromCharCode(a);for(var a=0;a<o.length;a++)o[a].start1+=s,o[a].start2+=s;var u=o[0],c=u.diffs;if(c.length==0||c[0][0]!=i)c.unshift(new e.Diff(i,l)),u.start1-=s,u.start2-=s,u.length1+=s,u.length2+=s;else if(s>c[0][1].length){var f=s-c[0][1].length;c[0][1]=l.substring(c[0][1].length)+c[0][1],u.start1-=f,u.start2-=f,u.length1+=f,u.length2+=f}if(u=o[o.length-1],c=u.diffs,c.length==0||c[c.length-1][0]!=i)c.push(new e.Diff(i,l)),u.length1+=s,u.length2+=s;else if(s>c[c.length-1][1].length){var f=s-c[c.length-1][1].length;c[c.length-1][1]+=l.substring(0,f),u.length1+=f,u.length2+=f}return l},e.prototype.patch_splitMax=function(o){for(var s=this.Match_MaxBits,l=0;l<o.length;l++)if(!(o[l].length1<=s)){var a=o[l];o.splice(l--,1);for(var u=a.start1,c=a.start2,f="";a.diffs.length!==0;){var h=new e.patch_obj,d=!0;for(h.start1=u-f.length,h.start2=c-f.length,f!==""&&(h.length1=h.length2=f.length,h.diffs.push(new e.Diff(i,f)));a.diffs.length!==0&&h.length1<s-this.Patch_Margin;){var p=a.diffs[0][0],g=a.diffs[0][1];p===r?(h.length2+=g.length,c+=g.length,h.diffs.push(a.diffs.shift()),d=!1):p===n&&h.diffs.length==1&&h.diffs[0][0]==i&&g.length>2*s?(h.length1+=g.length,u+=g.length,d=!1,h.diffs.push(new e.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,s-h.length1-this.Patch_Margin),h.length1+=g.length,u+=g.length,p===i?(h.length2+=g.length,c+=g.length):d=!1,h.diffs.push(new e.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}f=this.diff_text2(h.diffs),f=f.substring(f.length-this.Patch_Margin);var y=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);y!==""&&(h.length1+=y.length,h.length2+=y.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===i?h.diffs[h.diffs.length-1][1]+=y:h.diffs.push(new e.Diff(i,y))),d||o.splice(++l,0,h)}}},e.prototype.patch_toText=function(o){for(var s=[],l=0;l<o.length;l++)s[l]=o[l];return s.join("")},e.prototype.patch_fromText=function(o){var s=[];if(!o)return s;for(var l=o.split(`
|
|
97
|
+
`),a=0,u=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;a<l.length;){var c=l[a].match(u);if(!c)throw new Error("Invalid patch string: "+l[a]);var f=new e.patch_obj;for(s.push(f),f.start1=parseInt(c[1],10),c[2]===""?(f.start1--,f.length1=1):c[2]=="0"?f.length1=0:(f.start1--,f.length1=parseInt(c[2],10)),f.start2=parseInt(c[3],10),c[4]===""?(f.start2--,f.length2=1):c[4]=="0"?f.length2=0:(f.start2--,f.length2=parseInt(c[4],10)),a++;a<l.length;){var h=l[a].charAt(0);try{var d=decodeURI(l[a].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+d)}if(h=="-")f.diffs.push(new e.Diff(n,d));else if(h=="+")f.diffs.push(new e.Diff(r,d));else if(h==" ")f.diffs.push(new e.Diff(i,d));else{if(h=="@")break;if(h!=="")throw new Error('Invalid patch mode "'+h+'" in: '+d)}a++}}return s},e.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},e.patch_obj.prototype.toString=function(){var o,s;this.length1===0?o=this.start1+",0":this.length1==1?o=this.start1+1:o=this.start1+1+","+this.length1,this.length2===0?s=this.start2+",0":this.length2==1?s=this.start2+1:s=this.start2+1+","+this.length2;for(var l=["@@ -"+o+" +"+s+` @@
|
|
98
|
+
`],a,u=0;u<this.diffs.length;u++){switch(this.diffs[u][0]){case r:a="+";break;case n:a="-";break;case i:a=" ";break}l[u+1]=a+encodeURI(this.diffs[u][1])+`
|
|
99
|
+
`}return l.join("").replace(/%20/g," ")},t.exports=e,t.exports.diff_match_patch=e,t.exports.DIFF_DELETE=n,t.exports.DIFF_INSERT=r,t.exports.DIFF_EQUAL=i})(PT);var wW=PT.exports;const kW=Yo(wW),PW=(t,e)=>bW(t,e,kW,hv,jC);var xT={exports:{}};/*!
|
|
100
|
+
Copyright (c) 2018 Jed Watson.
|
|
101
|
+
Licensed under the MIT License (MIT), see
|
|
102
|
+
http://jedwatson.github.io/classnames
|
|
103
|
+
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)e.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(xT);var xW=xT.exports;const Gt=Yo(xW),ra=!!(typeof window<"u"&&window.document&&window.document.createElement);var sy=!1,ly=!1;try{var Wg={get passive(){return sy=!0},get once(){return ly=sy=!0}};ra&&(window.addEventListener("test",Wg,Wg),window.removeEventListener("test",Wg,!0))}catch{}function CT(t,e,n,r){if(r&&typeof r!="boolean"&&!ly){var i=r.once,o=r.capture,s=n;!ly&&i&&(s=n.__once||function l(a){this.removeEventListener(e,l,o),n.call(this,a)},n.__once=s),t.addEventListener(e,s,sy?r:o)}t.addEventListener(e,n,r)}function Hd(t){return t&&t.ownerDocument||document}function ay(t,e,n,r){var i=r&&typeof r!="boolean"?r.capture:r;t.removeEventListener(e,n,i),n.__once&&t.removeEventListener(e,n.__once,i)}var Pf;function jk(t){if((!Pf&&Pf!==0||t)&&ra){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),Pf=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Pf}function CW(){return I.useState(null)}function EW(t){var e=I.useRef(t);return I.useEffect(function(){e.current=t},[t]),e}function ki(t){var e=EW(t);return I.useCallback(function(){return e.current&&e.current.apply(e,arguments)},[e])}var Vk=function(e){return!e||typeof e=="function"?e:function(n){e.current=n}};function QW(t,e){var n=Vk(t),r=Vk(e);return function(i){n&&n(i),r&&r(i)}}function Kd(t,e){return I.useMemo(function(){return QW(t,e)},[t,e])}function _W(t){var e=I.useRef(t);return e.current=t,e}function ET(t){var e=_W(t);I.useEffect(function(){return function(){return e.current()}},[])}function $W(t){var e=Hd(t);return e&&e.defaultView||window}function TW(t,e){return $W(t).getComputedStyle(t,e)}var AW=/([A-Z])/g;function RW(t){return t.replace(AW,"-$1").toLowerCase()}var DW=/^ms-/;function xf(t){return RW(t).replace(DW,"-ms-")}var MW=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function IW(t){return!!(t&&MW.test(t))}function bs(t,e){var n="",r="";if(typeof e=="string")return t.style.getPropertyValue(xf(e))||TW(t).getPropertyValue(xf(e));Object.keys(e).forEach(function(i){var o=e[i];!o&&o!==0?t.style.removeProperty(xf(i)):IW(i)?r+=i+"("+o+") ":n+=xf(i)+": "+o+";"}),r&&(n+="transform: "+r+";"),t.style.cssText+=";"+n}function hd(t,e,n,r){return CT(t,e,n,r),function(){ay(t,e,n,r)}}function NW(t,e,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),t){var i=document.createEvent("HTMLEvents");i.initEvent(e,n,r),t.dispatchEvent(i)}}function LW(t){var e=bs(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function jW(t,e,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||NW(t,"transitionend",!0)},e+n),o=hd(t,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),o()}}function QT(t,e,n,r){n==null&&(n=LW(t)||0);var i=jW(t,n,r),o=hd(t,"transitionend",e);return function(){i(),o()}}function Ug(t){t===void 0&&(t=Hd());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Bk(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}function VW(){var t=I.useRef(!0),e=I.useRef(function(){return t.current});return I.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e.current}function BW(t){var e=I.useRef(null);return I.useEffect(function(){e.current=t}),e.current}const FW="data-rr-ui-";function XW(t){return`${FW}${t}`}function WW(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const Fk=XW("modal-open");class UW{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return WW(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();e.style={overflow:i.style.overflow,[r]:i.style[r]},e.scrollBarWidth&&(n[r]=`${parseInt(bs(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(Fk,""),bs(i,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(Fk),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const a0=UW,_T=I.createContext(ra?window:void 0);_T.Provider;function u0(){return I.useContext(_T)}const Zg=(t,e)=>ra?t==null?(e||Hd()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function ZW(t,e){const n=u0(),[r,i]=I.useState(()=>Zg(t,n==null?void 0:n.document));if(!r){const o=Zg(t);o&&i(o)}return I.useEffect(()=>{e&&r&&e(r)},[e,r]),I.useEffect(()=>{const o=Zg(t);o!==r&&i(o)},[t,r]),r}var YW=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",zW=typeof document<"u";const Xk=zW||YW?I.useLayoutEffect:I.useEffect;function qW({children:t,in:e,onExited:n,mountOnEnter:r,unmountOnExit:i}){const o=I.useRef(null),s=I.useRef(e),l=ki(n);I.useEffect(()=>{e?s.current=!0:l(o.current)},[e,l]);const a=Kd(o,t.ref),u=I.cloneElement(t,{ref:a});return e?u:i||!s.current&&r?null:u}function GW({in:t,onTransition:e}){const n=I.useRef(null),r=I.useRef(!0),i=ki(e);return Xk(()=>{if(!n.current)return;let o=!1;return i({in:t,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[t,i]),Xk(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function HW({children:t,in:e,onExited:n,onEntered:r,transition:i}){const[o,s]=I.useState(!e);e&&o&&s(!1);const l=GW({in:!!e,onTransition:u=>{const c=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(s(!0),n==null||n(u.element)))};Promise.resolve(i(u)).then(c,f=>{throw u.in||s(!0),f})}}),a=Kd(l,t.ref);return o&&!e?null:I.cloneElement(t,{ref:a})}function Wk(t,e,n){return t?ne.jsx(t,Object.assign({},n)):e?ne.jsx(HW,Object.assign({},n,{transition:e})):ne.jsx(qW,Object.assign({},n))}function KW(t){return t.code==="Escape"||t.keyCode===27}const JW=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function eU(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let Yg;function tU(t){return Yg||(Yg=new a0({ownerDocument:t==null?void 0:t.document})),Yg}function nU(t){const e=u0(),n=t||tU(e),r=I.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:I.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:I.useCallback(i=>{r.current.backdrop=i},[])})}const $T=I.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:i,style:o,children:s,backdrop:l=!0,keyboard:a=!0,onBackdropClick:u,onEscapeKeyDown:c,transition:f,runTransition:h,backdropTransition:d,runBackdropTransition:p,autoFocus:g=!0,enforceFocus:y=!0,restoreFocus:O=!0,restoreFocusOptions:m,renderDialog:v,renderBackdrop:b=ie=>ne.jsx("div",Object.assign({},ie)),manager:P,container:E,onShow:T,onHide:w=()=>{},onExit:k,onExited:C,onExiting:Q,onEnter:M,onEntering:L,onEntered:V}=t,G=eU(t,JW);const D=u0(),N=ZW(E),A=nU(P),F=VW(),Y=BW(n),[pe,ae]=I.useState(!n),B=I.useRef(null);I.useImperativeHandle(e,()=>A,[A]),ra&&!Y&&n&&(B.current=Ug(D==null?void 0:D.document)),n&&pe&&ae(!1);const q=ki(()=>{if(A.add(),fe.current=hd(document,"keydown",W),z.current=hd(document,"focus",()=>setTimeout(we),!0),T&&T(),g){var ie,lt;const en=Ug((ie=(lt=A.dialog)==null?void 0:lt.ownerDocument)!=null?ie:D==null?void 0:D.document);A.dialog&&en&&!Bk(A.dialog,en)&&(B.current=en,A.dialog.focus())}}),te=ki(()=>{if(A.remove(),fe.current==null||fe.current(),z.current==null||z.current(),O){var ie;(ie=B.current)==null||ie.focus==null||ie.focus(m),B.current=null}});I.useEffect(()=>{!n||!N||q()},[n,N,q]),I.useEffect(()=>{pe&&te()},[pe,te]),ET(()=>{te()});const we=ki(()=>{if(!y||!F()||!A.isTopModal())return;const ie=Ug(D==null?void 0:D.document);A.dialog&&ie&&!Bk(A.dialog,ie)&&A.dialog.focus()}),X=ki(ie=>{ie.target===ie.currentTarget&&(u==null||u(ie),l===!0&&w())}),W=ki(ie=>{a&&KW(ie)&&A.isTopModal()&&(c==null||c(ie),ie.defaultPrevented||w())}),z=I.useRef(),fe=I.useRef(),be=(...ie)=>{ae(!0),C==null||C(...ie)};if(!N)return null;const Be=Object.assign({role:r,ref:A.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},G,{style:o,className:i,tabIndex:-1});let Me=v?v(Be):ne.jsx("div",Object.assign({},Be,{children:I.cloneElement(s,{role:"document"})}));Me=Wk(f,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:k,onExiting:Q,onExited:be,onEnter:M,onEntering:L,onEntered:V,children:Me});let Ne=null;return l&&(Ne=b({ref:A.setBackdropRef,onClick:X}),Ne=Wk(d,p,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Ne})),ne.jsx(ne.Fragment,{children:cl.createPortal(ne.jsxs(ne.Fragment,{children:[Ne,Me]}),N)})});$T.displayName="Modal";const rU=Object.assign($T,{Manager:a0});function iU(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function oU(t,e){t.classList?t.classList.add(e):iU(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}var sU=Function.prototype.bind.call(Function.prototype.call,[].slice);function Us(t,e){return sU(t.querySelectorAll(e))}function Uk(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function lU(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Uk(t.className,e):t.setAttribute("class",Uk(t.className&&t.className.baseVal||"",e))}const Zs={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class aU extends a0{adjustAndStore(e,n,r){const i=n.style[e];n.dataset[e]=i,bs(n,{[e]:`${parseFloat(bs(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],bs(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(oU(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Us(n,Zs.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,e.scrollBarWidth)),Us(n,Zs.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-e.scrollBarWidth)),Us(n,Zs.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();lU(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Us(n,Zs.FIXED_CONTENT).forEach(o=>this.restore(r,o)),Us(n,Zs.STICKY_CONTENT).forEach(o=>this.restore(i,o)),Us(n,Zs.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let zg;function uU(t){return zg||(zg=new aU(t)),zg}function TT(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function dd(t,e){return dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dd(t,e)}function cU(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,dd(t,e)}var AT={exports:{}},fU="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hU=fU,dU=hU;function RT(){}function DT(){}DT.resetWarningCache=RT;var pU=function(){function t(r,i,o,s,l,a){if(a!==dU){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:DT,resetWarningCache:RT};return n.PropTypes=n,n};AT.exports=pU();var gU=AT.exports;const qi=Yo(gU),Zk={disabled:!1},MT=wo.createContext(null);var mU=function(e){return e.scrollTop},Ua="unmounted",ss="exited",yo="entering",us="entered",uy="exiting",so=function(t){cU(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var s=i,l=s&&!s.isMounting?r.enter:r.appear,a;return o.appearStatus=null,r.in?l?(a=ss,o.appearStatus=yo):a=us:r.unmountOnExit||r.mountOnEnter?a=Ua:a=ss,o.state={status:a},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Ua?{status:ss}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==yo&&s!==us&&(o=yo):(s===yo||s===us)&&(o=uy)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,l;return o=s=l=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,l=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:l}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===yo){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:cl.findDOMNode(this);s&&mU(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ss&&this.setState({status:Ua})},n.performEnter=function(i){var o=this,s=this.props.enter,l=this.context?this.context.isMounting:i,a=this.props.nodeRef?[l]:[cl.findDOMNode(this),l],u=a[0],c=a[1],f=this.getTimeouts(),h=l?f.appear:f.enter;if(!i&&!s||Zk.disabled){this.safeSetState({status:us},function(){o.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:yo},function(){o.props.onEntering(u,c),o.onTransitionEnd(h,function(){o.safeSetState({status:us},function(){o.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:cl.findDOMNode(this);if(!o||Zk.disabled){this.safeSetState({status:ss},function(){i.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:uy},function(){i.props.onExiting(l),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ss},function(){i.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,o.nextCallback=null,i(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:cl.findDOMNode(this),l=i==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=a[0],c=a[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Ua)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=TT(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return wo.createElement(MT.Provider,{value:null},typeof s=="function"?s(i,l):wo.cloneElement(wo.Children.only(s),l))},e}(wo.Component);so.contextType=MT;so.propTypes={};function Ys(){}so.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ys,onEntering:Ys,onEntered:Ys,onExit:Ys,onExiting:Ys,onExited:Ys};so.UNMOUNTED=Ua;so.EXITED=ss;so.ENTERING=yo;so.ENTERED=us;so.EXITING=uy;const OU=so;function Yk(t,e){const n=bs(t,e)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function yU(t,e){const n=Yk(t,"transitionDuration"),r=Yk(t,"transitionDelay"),i=QT(t,o=>{o.target===t&&(i(),e(o))},n+r)}function vU(t){t.offsetHeight}function SU(t){return t&&"setState"in t?cl.findDOMNode(t):t??null}const bU=wo.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,onExited:o,addEndListener:s,children:l,childRef:a,...u},c)=>{const f=I.useRef(null),h=Kd(f,a),d=E=>{h(SU(E))},p=E=>T=>{E&&f.current&&E(f.current,T)},g=I.useCallback(p(t),[t]),y=I.useCallback(p(e),[e]),O=I.useCallback(p(n),[n]),m=I.useCallback(p(r),[r]),v=I.useCallback(p(i),[i]),b=I.useCallback(p(o),[o]),P=I.useCallback(p(s),[s]);return ne.jsx(OU,{ref:c,...u,onEnter:g,onEntered:O,onEntering:y,onExit:m,onExited:b,onExiting:v,addEndListener:P,nodeRef:f,children:typeof l=="function"?(E,T)=>l(E,{...T,ref:d}):wo.cloneElement(l,{ref:d})})}),wU=bU,kU={[yo]:"show",[us]:"show"},IT=I.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:r,...i},o)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},l=I.useCallback((a,u)=>{vU(a),r==null||r(a,u)},[r]);return ne.jsx(wU,{ref:o,addEndListener:yU,...s,onEnter:l,childRef:e.ref,children:(a,u)=>I.cloneElement(e,{...u,className:Gt("fade",t,e.props.className,kU[a],n[a])})})});IT.displayName="Fade";const NT=IT;var PU=/-(.)/g;function xU(t){return t.replace(PU,function(e,n){return n.toUpperCase()})}const CU=["xxl","xl","lg","md","sm","xs"],EU="xs",Jd=I.createContext({prefixes:{},breakpoints:CU,minBreakpoint:EU});function Bn(t,e){const{prefixes:n}=I.useContext(Jd);return t||n[e]||e}function QU(){const{breakpoints:t}=I.useContext(Jd);return t}function _U(){const{minBreakpoint:t}=I.useContext(Jd);return t}function $U(){const{dir:t}=I.useContext(Jd);return t==="rtl"}const TU=t=>t[0].toUpperCase()+xU(t).slice(1);function ep(t,{displayName:e=TU(t),Component:n,defaultProps:r}={}){const i=I.forwardRef(({className:o,bsPrefix:s,as:l=n||"div",...a},u)=>{const c={...r,...a},f=Bn(s,t);return ne.jsx(l,{ref:u,className:Gt(o,f),...c})});return i.displayName=e,i}const AU=ep("modal-body"),RU=I.createContext({onHide(){}}),LT=RU,jT=I.forwardRef(({bsPrefix:t,className:e,contentClassName:n,centered:r,size:i,fullscreen:o,children:s,scrollable:l,...a},u)=>{t=Bn(t,"modal");const c=`${t}-dialog`,f=typeof o=="string"?`${t}-fullscreen-${o}`:`${t}-fullscreen`;return ne.jsx("div",{...a,ref:u,className:Gt(c,e,i&&`${t}-${i}`,r&&`${c}-centered`,l&&`${c}-scrollable`,o&&f),children:ne.jsx("div",{className:Gt(`${t}-content`,n),children:s})})});jT.displayName="ModalDialog";const VT=jT,DU=ep("modal-footer"),MU={"aria-label":qi.string,onClick:qi.func,variant:qi.oneOf(["white"])},c0=I.forwardRef(({className:t,variant:e,"aria-label":n="Close",...r},i)=>ne.jsx("button",{ref:i,type:"button",className:Gt("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...r}));c0.displayName="CloseButton";c0.propTypes=MU;const IU=c0,NU=I.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:r,children:i,...o},s)=>{const l=I.useContext(LT),a=ki(()=>{l==null||l.onHide(),r==null||r()});return ne.jsxs("div",{ref:s,...o,children:[i,n&&ne.jsx(IU,{"aria-label":t,variant:e,onClick:a})]})}),LU=NU,BT=I.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:r=!1,...i},o)=>(t=Bn(t,"modal-header"),ne.jsx(LU,{ref:o,...i,className:Gt(e,t),closeLabel:n,closeButton:r})));BT.displayName="ModalHeader";const jU=BT,VU=t=>I.forwardRef((e,n)=>ne.jsx("div",{...e,ref:n,className:Gt(e.className,t)})),BU=VU("h4"),FU=ep("modal-title",{Component:BU});function XU(t){return ne.jsx(NT,{...t,timeout:null})}function WU(t){return ne.jsx(NT,{...t,timeout:null})}const FT=I.forwardRef(({bsPrefix:t,className:e,style:n,dialogClassName:r,contentClassName:i,children:o,dialogAs:s=VT,"aria-labelledby":l,"aria-describedby":a,"aria-label":u,show:c=!1,animation:f=!0,backdrop:h=!0,keyboard:d=!0,onEscapeKeyDown:p,onShow:g,onHide:y,container:O,autoFocus:m=!0,enforceFocus:v=!0,restoreFocus:b=!0,restoreFocusOptions:P,onEntered:E,onExit:T,onExiting:w,onEnter:k,onEntering:C,onExited:Q,backdropClassName:M,manager:L,...V},G)=>{const[D,N]=I.useState({}),[A,F]=I.useState(!1),Y=I.useRef(!1),pe=I.useRef(!1),ae=I.useRef(null),[B,q]=CW(),te=Kd(G,q),we=ki(y),X=$U();t=Bn(t,"modal");const W=I.useMemo(()=>({onHide:we}),[we]);function z(){return L||uU({isRTL:X})}function fe(K){if(!ra)return;const ue=z().getScrollbarWidth()>0,le=K.scrollHeight>Hd(K).documentElement.clientHeight;N({paddingRight:ue&&!le?jk():void 0,paddingLeft:!ue&&le?jk():void 0})}const be=ki(()=>{B&&fe(B.dialog)});ET(()=>{ay(window,"resize",be),ae.current==null||ae.current()});const Be=()=>{Y.current=!0},Me=K=>{Y.current&&B&&K.target===B.dialog&&(pe.current=!0),Y.current=!1},Ne=()=>{F(!0),ae.current=QT(B.dialog,()=>{F(!1)})},ie=K=>{K.target===K.currentTarget&&Ne()},lt=K=>{if(h==="static"){ie(K);return}if(pe.current||K.target!==K.currentTarget){pe.current=!1;return}y==null||y()},en=K=>{d?p==null||p(K):(K.preventDefault(),h==="static"&&Ne())},Wr=(K,ue)=>{K&&fe(K),k==null||k(K,ue)},xr=K=>{ae.current==null||ae.current(),T==null||T(K)},yn=(K,ue)=>{C==null||C(K,ue),CT(window,"resize",be)},Jo=K=>{K&&(K.style.display=""),Q==null||Q(K),ay(window,"resize",be)},Li=I.useCallback(K=>ne.jsx("div",{...K,className:Gt(`${t}-backdrop`,M,!f&&"show")}),[f,M,t]),_={...n,...D};_.display="block";const H=K=>ne.jsx("div",{role:"dialog",...K,style:_,className:Gt(e,t,A&&`${t}-static`,!f&&"show"),onClick:h?lt:void 0,onMouseUp:Me,"aria-label":u,"aria-labelledby":l,"aria-describedby":a,children:ne.jsx(s,{...V,onMouseDown:Be,className:r,contentClassName:i,children:o})});return ne.jsx(LT.Provider,{value:W,children:ne.jsx(rU,{show:c,ref:te,backdrop:h,container:O,keyboard:!0,autoFocus:m,enforceFocus:v,restoreFocus:b,restoreFocusOptions:P,onEscapeKeyDown:en,onShow:g,onHide:y,onEnter:Wr,onEntering:yn,onEntered:E,onExit:xr,onExiting:w,onExited:Jo,manager:z(),transition:f?XU:void 0,backdropTransition:f?WU:void 0,renderBackdrop:Li,renderDialog:H})})});FT.displayName="Modal";const Ta=Object.assign(FT,{Body:AU,Header:jU,Title:FU,Footer:DU,Dialog:VT,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),UU={type:qi.string,tooltip:qi.bool,as:qi.elementType},f0=I.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:r=!1,...i},o)=>ne.jsx(t,{...i,ref:o,className:Gt(e,`${n}-${r?"tooltip":"feedback"}`)}));f0.displayName="Feedback";f0.propTypes=UU;const XT=f0,ZU=I.createContext({}),ro=ZU,WT=I.forwardRef(({id:t,bsPrefix:e,className:n,type:r="checkbox",isValid:i=!1,isInvalid:o=!1,as:s="input",...l},a)=>{const{controlId:u}=I.useContext(ro);return e=Bn(e,"form-check-input"),ne.jsx(s,{...l,ref:a,type:r,id:t||u,className:Gt(n,e,i&&"is-valid",o&&"is-invalid")})});WT.displayName="FormCheckInput";const UT=WT,ZT=I.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...r},i)=>{const{controlId:o}=I.useContext(ro);return t=Bn(t,"form-check-label"),ne.jsx("label",{...r,ref:i,htmlFor:n||o,className:Gt(e,t)})});ZT.displayName="FormCheckLabel";const cy=ZT;function YU(t,e){return I.Children.toArray(t).some(n=>I.isValidElement(n)&&n.type===e)}const YT=I.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:o=!1,isValid:s=!1,isInvalid:l=!1,feedbackTooltip:a=!1,feedback:u,feedbackType:c,className:f,style:h,title:d="",type:p="checkbox",label:g,children:y,as:O="input",...m},v)=>{e=Bn(e,"form-check"),n=Bn(n,"form-switch");const{controlId:b}=I.useContext(ro),P=I.useMemo(()=>({controlId:t||b}),[b,t]),E=!y&&g!=null&&g!==!1||YU(y,cy),T=ne.jsx(UT,{...m,type:p==="switch"?"checkbox":p,ref:v,isValid:s,isInvalid:l,disabled:o,as:O});return ne.jsx(ro.Provider,{value:P,children:ne.jsx("div",{style:h,className:Gt(f,E&&e,r&&`${e}-inline`,i&&`${e}-reverse`,p==="switch"&&n),children:y||ne.jsxs(ne.Fragment,{children:[T,E&&ne.jsx(cy,{title:d,children:g}),u&&ne.jsx(XT,{type:c,tooltip:a,children:u})]})})})});YT.displayName="FormCheck";const pd=Object.assign(YT,{Input:UT,Label:cy}),zT=I.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:r,id:i,className:o,isValid:s=!1,isInvalid:l=!1,plaintext:a,readOnly:u,as:c="input",...f},h)=>{const{controlId:d}=I.useContext(ro);t=Bn(t,"form-control");let p;return a?p={[`${t}-plaintext`]:!0}:p={[t]:!0,[`${t}-${n}`]:n},ne.jsx(c,{...f,type:e,size:r,ref:h,readOnly:u,id:i||d,className:Gt(o,p,s&&"is-valid",l&&"is-invalid",e==="color"&&`${t}-color`)})});zT.displayName="FormControl";const zU=Object.assign(zT,{Feedback:XT}),qU=ep("form-floating"),qT=I.forwardRef(({controlId:t,as:e="div",...n},r)=>{const i=I.useMemo(()=>({controlId:t}),[t]);return ne.jsx(ro.Provider,{value:i,children:ne.jsx(e,{...n,ref:r})})});qT.displayName="FormGroup";const GT=qT;function GU({as:t,bsPrefix:e,className:n,...r}){e=Bn(e,"col");const i=QU(),o=_U(),s=[],l=[];return i.forEach(a=>{const u=r[a];delete r[a];let c,f,h;typeof u=="object"&&u!=null?{span:c,offset:f,order:h}=u:c=u;const d=a!==o?`-${a}`:"";c&&s.push(c===!0?`${e}${d}`:`${e}${d}-${c}`),h!=null&&l.push(`order${d}-${h}`),f!=null&&l.push(`offset${d}-${f}`)}),[{...r,className:Gt(n,...s,...l)},{as:t,bsPrefix:e,spans:s}]}const HT=I.forwardRef((t,e)=>{const[{className:n,...r},{as:i="div",bsPrefix:o,spans:s}]=GU(t);return ne.jsx(i,{...r,ref:e,className:Gt(n,!s.length&&o)})});HT.displayName="Col";const HU=HT,KT=I.forwardRef(({as:t="label",bsPrefix:e,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:o,...s},l)=>{const{controlId:a}=I.useContext(ro);e=Bn(e,"form-label");let u="col-form-label";typeof n=="string"&&(u=`${u} ${u}-${n}`);const c=Gt(i,e,r&&"visually-hidden",n&&u);return o=o||a,n?ne.jsx(HU,{ref:l,as:"label",className:c,htmlFor:o,...s}):ne.jsx(t,{ref:l,className:c,htmlFor:o,...s})});KT.displayName="FormLabel";const KU=KT,JT=I.forwardRef(({bsPrefix:t,className:e,id:n,...r},i)=>{const{controlId:o}=I.useContext(ro);return t=Bn(t,"form-range"),ne.jsx("input",{...r,type:"range",ref:i,className:Gt(e,t),id:n||o})});JT.displayName="FormRange";const JU=JT,eA=I.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:r,isValid:i=!1,isInvalid:o=!1,id:s,...l},a)=>{const{controlId:u}=I.useContext(ro);return t=Bn(t,"form-select"),ne.jsx("select",{...l,size:n,ref:a,className:Gt(r,t,e&&`${t}-${e}`,i&&"is-valid",o&&"is-invalid"),id:s||u})});eA.displayName="FormSelect";const eZ=eA,tA=I.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:r,...i},o)=>(t=Bn(t,"form-text"),ne.jsx(n,{...i,ref:o,className:Gt(e,t,r&&"text-muted")})));tA.displayName="FormText";const tZ=tA,nA=I.forwardRef((t,e)=>ne.jsx(pd,{...t,ref:e,type:"switch"}));nA.displayName="Switch";const nZ=Object.assign(nA,{Input:pd.Input,Label:pd.Label}),rA=I.forwardRef(({bsPrefix:t,className:e,children:n,controlId:r,label:i,...o},s)=>(t=Bn(t,"form-floating"),ne.jsxs(GT,{ref:s,className:Gt(e,t),controlId:r,...o,children:[n,ne.jsx("label",{htmlFor:r,children:i})]})));rA.displayName="FloatingLabel";const rZ=rA,iZ={_ref:qi.any,validated:qi.bool,as:qi.elementType},h0=I.forwardRef(({className:t,validated:e,as:n="form",...r},i)=>ne.jsx(n,{...r,ref:i,className:Gt(t,e&&"was-validated")}));h0.displayName="Form";h0.propTypes=iZ;const pi=Object.assign(h0,{Group:GT,Control:zU,Floating:qU,Check:pd,Switch:nZ,Label:KU,Text:tZ,Range:JU,Select:eZ,FloatingLabel:rZ}),oZ=["as","disabled"];function sZ(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function lZ(t){return!t||t.trim()==="#"}function iA({tagName:t,disabled:e,href:n,target:r,rel:i,role:o,onClick:s,tabIndex:l=0,type:a}){t||(n!=null||r!=null||i!=null?t="a":t="button");const u={tagName:t};if(t==="button")return[{type:a||"button",disabled:e},u];const c=h=>{if((e||t==="a"&&lZ(n))&&h.preventDefault(),e){h.stopPropagation();return}s==null||s(h)},f=h=>{h.key===" "&&(h.preventDefault(),c(h))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:e?void 0:l,href:n,target:t==="a"?r:void 0,"aria-disabled":e||void 0,rel:t==="a"?i:void 0,onClick:c,onKeyDown:f},u]}const aZ=I.forwardRef((t,e)=>{let{as:n,disabled:r}=t,i=sZ(t,oZ);const[o,{tagName:s}]=iA(Object.assign({tagName:n,disabled:r},i));return ne.jsx(s,Object.assign({},i,o,{ref:e}))});aZ.displayName="Button";const oA=I.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:s,...l},a)=>{const u=Bn(e,"btn"),[c,{tagName:f}]=iA({tagName:t,disabled:o,...l}),h=f;return ne.jsx(h,{...c,...l,ref:a,disabled:o,className:Gt(s,u,i&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&o&&"disabled")})});oA.displayName="Button";const uZ=oA;function $s(t){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(t)}function cZ(t,e){if($s(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if($s(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sA(t){var e=cZ(t,"string");return $s(e)==="symbol"?e:String(e)}function Za(t,e,n){return e=sA(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Fe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zk(Object(n),!0).forEach(function(r){Za(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fZ(t){if(Array.isArray(t))return t}function hZ(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,l=[],a=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);a=!0);}catch(c){u=!0,i=c}finally{try{if(!a&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function fy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function lA(t,e){if(t){if(typeof t=="string")return fy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fy(t,e)}}function dZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
104
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gi(t,e){return fZ(t)||hZ(t,e)||lA(t,e)||dZ()}function lo(t,e){if(t==null)return{};var n=TT(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var pZ=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function gZ(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,i=r===void 0?!1:r,o=t.defaultValue,s=o===void 0?null:o,l=t.inputValue,a=t.menuIsOpen,u=t.onChange,c=t.onInputChange,f=t.onMenuClose,h=t.onMenuOpen,d=t.value,p=lo(t,pZ),g=I.useState(l!==void 0?l:n),y=Gi(g,2),O=y[0],m=y[1],v=I.useState(a!==void 0?a:i),b=Gi(v,2),P=b[0],E=b[1],T=I.useState(d!==void 0?d:s),w=Gi(T,2),k=w[0],C=w[1],Q=I.useCallback(function(A,F){typeof u=="function"&&u(A,F),C(A)},[u]),M=I.useCallback(function(A,F){var Y;typeof c=="function"&&(Y=c(A,F)),m(Y!==void 0?Y:A)},[c]),L=I.useCallback(function(){typeof h=="function"&&h(),E(!0)},[h]),V=I.useCallback(function(){typeof f=="function"&&f(),E(!1)},[f]),G=l!==void 0?l:O,D=a!==void 0?a:P,N=d!==void 0?d:k;return Fe(Fe({},p),{},{inputValue:G,menuIsOpen:D,onChange:Q,onInputChange:M,onMenuClose:V,onMenuOpen:L,value:N})}function mZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,sA(r.key),r)}}function OZ(t,e,n){return e&&qk(t.prototype,e),n&&qk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function yZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dd(t,e)}function gd(t){return gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gd(t)}function vZ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function SZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bZ(t,e){if(e&&($s(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SZ(t)}function wZ(t){var e=vZ();return function(){var r=gd(t),i;if(e){var o=gd(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return bZ(this,i)}}function kZ(t){if(Array.isArray(t))return fy(t)}function PZ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function xZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
105
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aA(t){return kZ(t)||PZ(t)||lA(t)||xZ()}function CZ(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function EZ(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var QZ=function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(EZ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=CZ(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},t}(),In="-ms-",md="-moz-",gt="-webkit-",uA="comm",d0="rule",p0="decl",_Z="@import",cA="@keyframes",$Z=Math.abs,tp=String.fromCharCode,TZ=Object.assign;function AZ(t,e){return xn(t,0)^45?(((e<<2^xn(t,0))<<2^xn(t,1))<<2^xn(t,2))<<2^xn(t,3):0}function fA(t){return t.trim()}function RZ(t,e){return(t=e.exec(t))?t[0]:t}function yt(t,e,n){return t.replace(e,n)}function hy(t,e){return t.indexOf(e)}function xn(t,e){return t.charCodeAt(e)|0}function Yu(t,e,n){return t.slice(e,n)}function yi(t){return t.length}function g0(t){return t.length}function Cf(t,e){return e.push(t),t}function DZ(t,e){return t.map(e).join("")}var np=1,ql=1,hA=0,lr=0,sn=0,ia="";function rp(t,e,n,r,i,o,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:np,column:ql,length:s,return:""}}function Aa(t,e){return TZ(rp("",null,null,"",null,null,0),t,{length:-t.length},e)}function MZ(){return sn}function IZ(){return sn=lr>0?xn(ia,--lr):0,ql--,sn===10&&(ql=1,np--),sn}function Sr(){return sn=lr<hA?xn(ia,lr++):0,ql++,sn===10&&(ql=1,np++),sn}function Ai(){return xn(ia,lr)}function ih(){return lr}function pc(t,e){return Yu(ia,t,e)}function zu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dA(t){return np=ql=1,hA=yi(ia=t),lr=0,[]}function pA(t){return ia="",t}function oh(t){return fA(pc(lr-1,dy(t===91?t+2:t===40?t+1:t)))}function NZ(t){for(;(sn=Ai())&&sn<33;)Sr();return zu(t)>2||zu(sn)>3?"":" "}function LZ(t,e){for(;--e&&Sr()&&!(sn<48||sn>102||sn>57&&sn<65||sn>70&&sn<97););return pc(t,ih()+(e<6&&Ai()==32&&Sr()==32))}function dy(t){for(;Sr();)switch(sn){case t:return lr;case 34:case 39:t!==34&&t!==39&&dy(sn);break;case 40:t===41&&dy(t);break;case 92:Sr();break}return lr}function jZ(t,e){for(;Sr()&&t+sn!==47+10;)if(t+sn===42+42&&Ai()===47)break;return"/*"+pc(e,lr-1)+"*"+tp(t===47?t:Sr())}function VZ(t){for(;!zu(Ai());)Sr();return pc(t,lr)}function BZ(t){return pA(sh("",null,null,null,[""],t=dA(t),0,[0],t))}function sh(t,e,n,r,i,o,s,l,a){for(var u=0,c=0,f=s,h=0,d=0,p=0,g=1,y=1,O=1,m=0,v="",b=i,P=o,E=r,T=v;y;)switch(p=m,m=Sr()){case 40:if(p!=108&&xn(T,f-1)==58){hy(T+=yt(oh(m),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:T+=oh(m);break;case 9:case 10:case 13:case 32:T+=NZ(p);break;case 92:T+=LZ(ih()-1,7);continue;case 47:switch(Ai()){case 42:case 47:Cf(FZ(jZ(Sr(),ih()),e,n),a);break;default:T+="/"}break;case 123*g:l[u++]=yi(T)*O;case 125*g:case 59:case 0:switch(m){case 0:case 125:y=0;case 59+c:d>0&&yi(T)-f&&Cf(d>32?Hk(T+";",r,n,f-1):Hk(yt(T," ","")+";",r,n,f-2),a);break;case 59:T+=";";default:if(Cf(E=Gk(T,e,n,u,c,i,l,v,b=[],P=[],f),o),m===123)if(c===0)sh(T,e,E,E,b,o,f,l,P);else switch(h===99&&xn(T,3)===110?100:h){case 100:case 109:case 115:sh(t,E,E,r&&Cf(Gk(t,E,E,0,0,i,l,v,i,b=[],f),P),i,P,f,l,r?b:P);break;default:sh(T,E,E,E,[""],P,0,l,P)}}u=c=d=0,g=O=1,v=T="",f=s;break;case 58:f=1+yi(T),d=p;default:if(g<1){if(m==123)--g;else if(m==125&&g++==0&&IZ()==125)continue}switch(T+=tp(m),m*g){case 38:O=c>0?1:(T+="\f",-1);break;case 44:l[u++]=(yi(T)-1)*O,O=1;break;case 64:Ai()===45&&(T+=oh(Sr())),h=Ai(),c=f=yi(v=T+=VZ(ih())),m++;break;case 45:p===45&&yi(T)==2&&(g=0)}}return o}function Gk(t,e,n,r,i,o,s,l,a,u,c){for(var f=i-1,h=i===0?o:[""],d=g0(h),p=0,g=0,y=0;p<r;++p)for(var O=0,m=Yu(t,f+1,f=$Z(g=s[p])),v=t;O<d;++O)(v=fA(g>0?h[O]+" "+m:yt(m,/&\f/g,h[O])))&&(a[y++]=v);return rp(t,e,n,i===0?d0:l,a,u,c)}function FZ(t,e,n){return rp(t,e,n,uA,tp(MZ()),Yu(t,2,-2),0)}function Hk(t,e,n,r){return rp(t,e,n,p0,Yu(t,0,r),Yu(t,r+1,-1),r)}function Ql(t,e){for(var n="",r=g0(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function XZ(t,e,n,r){switch(t.type){case _Z:case p0:return t.return=t.return||t.value;case uA:return"";case cA:return t.return=t.value+"{"+Ql(t.children,r)+"}";case d0:t.value=t.props.join(",")}return yi(n=Ql(t.children,r))?t.return=t.value+"{"+n+"}":""}function WZ(t){var e=g0(t);return function(n,r,i,o){for(var s="",l=0;l<e;l++)s+=t[l](n,r,i,o)||"";return s}}function UZ(t){return function(e){e.root||(e=e.return)&&t(e)}}function ZZ(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var YZ=function(e,n,r){for(var i=0,o=0;i=o,o=Ai(),i===38&&o===12&&(n[r]=1),!zu(o);)Sr();return pc(e,lr)},zZ=function(e,n){var r=-1,i=44;do switch(zu(i)){case 0:i===38&&Ai()===12&&(n[r]=1),e[r]+=YZ(lr-1,n,r);break;case 2:e[r]+=oh(i);break;case 4:if(i===44){e[++r]=Ai()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=tp(i)}while(i=Sr());return e},qZ=function(e,n){return pA(zZ(dA(e),n))},Kk=new WeakMap,GZ=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Kk.get(r))&&!i){Kk.set(e,!0);for(var o=[],s=qZ(n,o),l=r.props,a=0,u=0;a<s.length;a++)for(var c=0;c<l.length;c++,u++)e.props[u]=o[a]?s[a].replace(/&\f/g,l[c]):l[c]+" "+s[a]}}},HZ=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function gA(t,e){switch(AZ(t,e)){case 5103:return gt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return gt+t+md+t+In+t+t;case 6828:case 4268:return gt+t+In+t+t;case 6165:return gt+t+In+"flex-"+t+t;case 5187:return gt+t+yt(t,/(\w+).+(:[^]+)/,gt+"box-$1$2"+In+"flex-$1$2")+t;case 5443:return gt+t+In+"flex-item-"+yt(t,/flex-|-self/,"")+t;case 4675:return gt+t+In+"flex-line-pack"+yt(t,/align-content|flex-|-self/,"")+t;case 5548:return gt+t+In+yt(t,"shrink","negative")+t;case 5292:return gt+t+In+yt(t,"basis","preferred-size")+t;case 6060:return gt+"box-"+yt(t,"-grow","")+gt+t+In+yt(t,"grow","positive")+t;case 4554:return gt+yt(t,/([^-])(transform)/g,"$1"+gt+"$2")+t;case 6187:return yt(yt(yt(t,/(zoom-|grab)/,gt+"$1"),/(image-set)/,gt+"$1"),t,"")+t;case 5495:case 3959:return yt(t,/(image-set\([^]*)/,gt+"$1$`$1");case 4968:return yt(yt(t,/(.+:)(flex-)?(.*)/,gt+"box-pack:$3"+In+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gt+t+t;case 4095:case 3583:case 4068:case 2532:return yt(t,/(.+)-inline(.+)/,gt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(yi(t)-1-e>6)switch(xn(t,e+1)){case 109:if(xn(t,e+4)!==45)break;case 102:return yt(t,/(.+:)(.+)-([^]+)/,"$1"+gt+"$2-$3$1"+md+(xn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~hy(t,"stretch")?gA(yt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(xn(t,e+1)!==115)break;case 6444:switch(xn(t,yi(t)-3-(~hy(t,"!important")&&10))){case 107:return yt(t,":",":"+gt)+t;case 101:return yt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gt+(xn(t,14)===45?"inline-":"")+"box$3$1"+gt+"$2$3$1"+In+"$2box$3")+t}break;case 5936:switch(xn(t,e+11)){case 114:return gt+t+In+yt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return gt+t+In+yt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return gt+t+In+yt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return gt+t+In+t+t}return t}var KZ=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case p0:e.return=gA(e.value,e.length);break;case cA:return Ql([Aa(e,{value:yt(e.value,"@","@"+gt)})],i);case d0:if(e.length)return DZ(e.props,function(o){switch(RZ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ql([Aa(e,{props:[yt(o,/:(read-\w+)/,":"+md+"$1")]})],i);case"::placeholder":return Ql([Aa(e,{props:[yt(o,/:(plac\w+)/,":"+gt+"input-$1")]}),Aa(e,{props:[yt(o,/:(plac\w+)/,":"+md+"$1")]}),Aa(e,{props:[yt(o,/:(plac\w+)/,In+"input-$1")]})],i)}return""})}},JZ=[KZ],e8=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var y=g.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||JZ,o={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var y=g.getAttribute("data-emotion").split(" "),O=1;O<y.length;O++)o[y[O]]=!0;l.push(g)});var a,u=[GZ,HZ];{var c,f=[XZ,UZ(function(g){c.insert(g)})],h=WZ(u.concat(i,f)),d=function(y){return Ql(BZ(y),h)};a=function(y,O,m,v){c=m,d(y?y+"{"+O.styles+"}":O.styles),v&&(p.inserted[O.name]=!0)}}var p={key:n,sheet:new QZ({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:a};return p.sheet.hydrate(l),p},mA={exports:{}},bt={};/** @license React v16.13.1
|
|
106
|
+
* react-is.production.min.js
|
|
107
|
+
*
|
|
108
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the MIT license found in the
|
|
111
|
+
* LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/var wn=typeof Symbol=="function"&&Symbol.for,m0=wn?Symbol.for("react.element"):60103,O0=wn?Symbol.for("react.portal"):60106,ip=wn?Symbol.for("react.fragment"):60107,op=wn?Symbol.for("react.strict_mode"):60108,sp=wn?Symbol.for("react.profiler"):60114,lp=wn?Symbol.for("react.provider"):60109,ap=wn?Symbol.for("react.context"):60110,y0=wn?Symbol.for("react.async_mode"):60111,up=wn?Symbol.for("react.concurrent_mode"):60111,cp=wn?Symbol.for("react.forward_ref"):60112,fp=wn?Symbol.for("react.suspense"):60113,t8=wn?Symbol.for("react.suspense_list"):60120,hp=wn?Symbol.for("react.memo"):60115,dp=wn?Symbol.for("react.lazy"):60116,n8=wn?Symbol.for("react.block"):60121,r8=wn?Symbol.for("react.fundamental"):60117,i8=wn?Symbol.for("react.responder"):60118,o8=wn?Symbol.for("react.scope"):60119;function Pr(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case m0:switch(t=t.type,t){case y0:case up:case ip:case sp:case op:case fp:return t;default:switch(t=t&&t.$$typeof,t){case ap:case cp:case dp:case hp:case lp:return t;default:return e}}case O0:return e}}}function OA(t){return Pr(t)===up}bt.AsyncMode=y0;bt.ConcurrentMode=up;bt.ContextConsumer=ap;bt.ContextProvider=lp;bt.Element=m0;bt.ForwardRef=cp;bt.Fragment=ip;bt.Lazy=dp;bt.Memo=hp;bt.Portal=O0;bt.Profiler=sp;bt.StrictMode=op;bt.Suspense=fp;bt.isAsyncMode=function(t){return OA(t)||Pr(t)===y0};bt.isConcurrentMode=OA;bt.isContextConsumer=function(t){return Pr(t)===ap};bt.isContextProvider=function(t){return Pr(t)===lp};bt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===m0};bt.isForwardRef=function(t){return Pr(t)===cp};bt.isFragment=function(t){return Pr(t)===ip};bt.isLazy=function(t){return Pr(t)===dp};bt.isMemo=function(t){return Pr(t)===hp};bt.isPortal=function(t){return Pr(t)===O0};bt.isProfiler=function(t){return Pr(t)===sp};bt.isStrictMode=function(t){return Pr(t)===op};bt.isSuspense=function(t){return Pr(t)===fp};bt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===ip||t===up||t===sp||t===op||t===fp||t===t8||typeof t=="object"&&t!==null&&(t.$$typeof===dp||t.$$typeof===hp||t.$$typeof===lp||t.$$typeof===ap||t.$$typeof===cp||t.$$typeof===r8||t.$$typeof===i8||t.$$typeof===o8||t.$$typeof===n8)};bt.typeOf=Pr;mA.exports=bt;var s8=mA.exports,yA=s8,l8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vA={};vA[yA.ForwardRef]=l8;vA[yA.Memo]=a8;var u8=!0;function c8(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var SA=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||u8===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},f8=function(e,n,r){SA(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function h8(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var d8={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},p8=/[A-Z]|^ms/g,g8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bA=function(e){return e.charCodeAt(1)===45},Jk=function(e){return e!=null&&typeof e!="boolean"},qg=ZZ(function(t){return bA(t)?t:t.replace(p8,"-$&").toLowerCase()}),eP=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(g8,function(r,i,o){return vi={name:i,styles:o,next:vi},i})}return d8[e]!==1&&!bA(e)&&typeof n=="number"&&n!==0?n+"px":n};function qu(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return vi={name:n.name,styles:n.styles,next:vi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)vi={name:r.name,styles:r.styles,next:vi},r=r.next;var i=n.styles+";";return i}return m8(t,e,n)}case"function":{if(t!==void 0){var o=vi,s=n(t);return vi=o,qu(t,e,s)}break}}if(e==null)return n;var l=e[n];return l!==void 0?l:n}function m8(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=qu(t,e,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object")e!=null&&e[s]!==void 0?r+=o+"{"+e[s]+"}":Jk(s)&&(r+=qg(o)+":"+eP(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)Jk(s[l])&&(r+=qg(o)+":"+eP(o,s[l])+";");else{var a=qu(t,e,s);switch(o){case"animation":case"animationName":{r+=qg(o)+":"+a+";";break}default:r+=o+"{"+a+"}"}}}return r}var tP=/label:\s*([^\s;\n{]+)\s*(;|$)/g,vi,wA=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,o="";vi=void 0;var s=e[0];s==null||s.raw===void 0?(i=!1,o+=qu(r,n,s)):o+=s[0];for(var l=1;l<e.length;l++)o+=qu(r,n,e[l]),i&&(o+=s[l]);tP.lastIndex=0;for(var a="",u;(u=tP.exec(o))!==null;)a+="-"+u[1];var c=h8(o)+a;return{name:c,styles:o,next:vi}},O8=function(e){return e()},y8=_1["useInsertionEffect"]?_1["useInsertionEffect"]:!1,v8=y8||O8,v0={}.hasOwnProperty,kA=I.createContext(typeof HTMLElement<"u"?e8({key:"css"}):null);kA.Provider;var S8=function(e){return I.forwardRef(function(n,r){var i=I.useContext(kA);return e(n,i,r)})},b8=I.createContext({}),py="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",w8=function(e,n){var r={};for(var i in n)v0.call(n,i)&&(r[i]=n[i]);return r[py]=e,r},k8=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return SA(n,r,i),v8(function(){return f8(n,r,i)}),null},P8=S8(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var i=t[py],o=[r],s="";typeof t.className=="string"?s=c8(e.registered,o,t.className):t.className!=null&&(s=t.className+" ");var l=wA(o,void 0,I.useContext(b8));s+=e.key+"-"+l.name;var a={};for(var u in t)v0.call(t,u)&&u!=="css"&&u!==py&&(a[u]=t[u]);return a.ref=n,a.className=s,I.createElement(I.Fragment,null,I.createElement(k8,{cache:e,serialized:l,isStringTag:typeof i=="string"}),I.createElement(i,a))}),We=function(e,n){var r=arguments;if(n==null||!v0.call(n,"css"))return I.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=P8,o[1]=w8(e,n);for(var s=2;s<i;s++)o[s]=r[s];return I.createElement.apply(null,o)};function S0(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return wA(e)}var x8=function(){var e=S0.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function C8(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function E8(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}const Q8=["top","right","bottom","left"];Q8.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);function Ei(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function PA(t){return Ei(t).getComputedStyle(t)}function xA(t){return t instanceof Ei(t).Node}function CA(t){return xA(t)?(t.nodeName||"").toLowerCase():""}let Ef;function _8(){if(Ef)return Ef;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(Ef=t.brands.map(e=>e.brand+"/"+e.version).join(" "),Ef):navigator.userAgent}function b0(t){return t instanceof Ei(t).HTMLElement}function _l(t){return t instanceof Ei(t).Element}function nP(t){return typeof ShadowRoot>"u"?!1:t instanceof Ei(t).ShadowRoot||t instanceof ShadowRoot}function EA(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=PA(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function $8(){return/^((?!chrome|android).)*safari/i.test(_8())}function T8(t){return["html","body","#document"].includes(CA(t))}const Od=Math.round;function A8(t){const e=PA(t);let n=parseFloat(e.width),r=parseFloat(e.height);const i=b0(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,l=Od(n)!==o||Od(r)!==s;return l&&(n=o,r=s),{width:n,height:r,fallback:l}}function QA(t){return _l(t)?t:t.contextElement}const _A={x:1,y:1};function Gg(t){const e=QA(t);if(!b0(e))return _A;const n=e.getBoundingClientRect(),{width:r,height:i,fallback:o}=A8(e);let s=(o?Od(n.width):n.width)/r,l=(o?Od(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}function rP(t,e,n,r){var i,o;e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),l=QA(t);let a=_A;e&&(r?_l(r)&&(a=Gg(r)):a=Gg(t));const u=l?Ei(l):window,c=$8()&&n;let f=(s.left+(c&&((i=u.visualViewport)==null?void 0:i.offsetLeft)||0))/a.x,h=(s.top+(c&&((o=u.visualViewport)==null?void 0:o.offsetTop)||0))/a.y,d=s.width/a.x,p=s.height/a.y;if(l){const g=Ei(l),y=r&&_l(r)?Ei(r):r;let O=g.frameElement;for(;O&&r&&y!==g;){const m=Gg(O),v=O.getBoundingClientRect(),b=getComputedStyle(O);v.x+=(O.clientLeft+parseFloat(b.paddingLeft))*m.x,v.y+=(O.clientTop+parseFloat(b.paddingTop))*m.y,f*=m.x,h*=m.y,d*=m.x,p*=m.y,f+=v.x,h+=v.y,O=Ei(O).frameElement}}return E8({width:d,height:p,x:f,y:h})}function R8(t){return((xA(t)?t.ownerDocument:t.document)||window.document).documentElement}function D8(t){if(CA(t)==="html")return t;const e=t.assignedSlot||t.parentNode||nP(t)&&t.host||R8(t);return nP(e)?e.host:e}function $A(t){const e=D8(t);return T8(e)?e.ownerDocument.body:b0(e)&&EA(e)?e:$A(e)}function lh(t,e){var n;e===void 0&&(e=[]);const r=$A(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Ei(r);return i?e.concat(o,o.visualViewport||[],EA(r)?r:[]):e.concat(r,lh(r))}function M8(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:l=!1}=r,a=i&&!l,u=a||o?[..._l(t)?lh(t):t.contextElement?lh(t.contextElement):[],...lh(e)]:[];u.forEach(d=>{a&&d.addEventListener("scroll",n,{passive:!0}),o&&d.addEventListener("resize",n)});let c,f=null;if(s){let d=!0;f=new ResizeObserver(()=>{d||n(),d=!1}),_l(t)&&!l&&f.observe(t),_l(t)||!t.contextElement||l||f.observe(t.contextElement),f.observe(e)}let h=l?rP(t):null;return l&&function d(){const p=rP(t);!h||p.x===h.x&&p.y===h.y&&p.width===h.width&&p.height===h.height||n(),h=p,c=requestAnimationFrame(d)}(),n(),()=>{var d;u.forEach(p=>{a&&p.removeEventListener("scroll",n),o&&p.removeEventListener("resize",n)}),(d=f)==null||d.disconnect(),f=null,l&&cancelAnimationFrame(c)}}var gy=I.useLayoutEffect,I8=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],yd=function(){};function N8(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function L8(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(e&&t)for(var s in e)e.hasOwnProperty(s)&&e[s]&&o.push("".concat(N8(t,s)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var iP=function(e){return Y8(e)?e.filter(Boolean):$s(e)==="object"&&e!==null?[e]:[]},TA=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var n=lo(e,I8);return Fe({},n)},Jt=function(e,n,r){var i=e.cx,o=e.getStyles,s=e.getClassNames,l=e.className;return{css:o(n,e),className:i(r??{},s(n,e),l)}};function pp(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function j8(t){return pp(t)?window.innerHeight:t.clientHeight}function AA(t){return pp(t)?window.pageYOffset:t.scrollTop}function vd(t,e){if(pp(t)){window.scrollTo(0,e);return}t.scrollTop=e}function V8(t){var e=getComputedStyle(t),n=e.position==="absolute",r=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var i=t;i=i.parentElement;)if(e=getComputedStyle(i),!(n&&e.position==="static")&&r.test(e.overflow+e.overflowY+e.overflowX))return i;return document.documentElement}function B8(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e}function Qf(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:yd,i=AA(t),o=e-i,s=10,l=0;function a(){l+=s;var u=B8(l,i,o,n);vd(t,u),l<n?window.requestAnimationFrame(a):r(t)}a()}function oP(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.offsetHeight/3;r.bottom+i>n.bottom?vd(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight)):r.top-i<n.top&&vd(t,Math.max(e.offsetTop-i,0))}function F8(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function sP(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function X8(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var RA=!1,W8={get passive(){return RA=!0}},_f=typeof window<"u"?window:{};_f.addEventListener&&_f.removeEventListener&&(_f.addEventListener("p",yd,W8),_f.removeEventListener("p",yd,!1));var U8=RA;function Z8(t){return t!=null}function Y8(t){return Array.isArray(t)}function $f(t,e,n){return t?e:n}var z8=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(e).filter(function(s){var l=Gi(s,1),a=l[0];return!r.includes(a)});return o.reduce(function(s,l){var a=Gi(l,2),u=a[0],c=a[1];return s[u]=c,s},{})},q8=["children","innerProps"],G8=["children","innerProps"];function H8(t){var e=t.maxHeight,n=t.menuEl,r=t.minHeight,i=t.placement,o=t.shouldScroll,s=t.isFixedPosition,l=t.controlHeight,a=V8(n),u={placement:"bottom",maxHeight:e};if(!n||!n.offsetParent)return u;var c=a.getBoundingClientRect(),f=c.height,h=n.getBoundingClientRect(),d=h.bottom,p=h.height,g=h.top,y=n.offsetParent.getBoundingClientRect(),O=y.top,m=s?window.innerHeight:j8(a),v=AA(a),b=parseInt(getComputedStyle(n).marginBottom,10),P=parseInt(getComputedStyle(n).marginTop,10),E=O-P,T=m-g,w=E+v,k=f-v-g,C=d-m+v+b,Q=v+g-P,M=160;switch(i){case"auto":case"bottom":if(T>=p)return{placement:"bottom",maxHeight:e};if(k>=p&&!s)return o&&Qf(a,C,M),{placement:"bottom",maxHeight:e};if(!s&&k>=r||s&&T>=r){o&&Qf(a,C,M);var L=s?T-b:k-b;return{placement:"bottom",maxHeight:L}}if(i==="auto"||s){var V=e,G=s?E:w;return G>=r&&(V=Math.min(G-b-l,e)),{placement:"top",maxHeight:V}}if(i==="bottom")return o&&vd(a,C),{placement:"bottom",maxHeight:e};break;case"top":if(E>=p)return{placement:"top",maxHeight:e};if(w>=p&&!s)return o&&Qf(a,Q,M),{placement:"top",maxHeight:e};if(!s&&w>=r||s&&E>=r){var D=e;return(!s&&w>=r||s&&E>=r)&&(D=s?E-P:w-P),o&&Qf(a,Q,M),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function K8(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var DA=function(e){return e==="auto"?"bottom":e},J8=function(e,n){var r,i=e.placement,o=e.theme,s=o.borderRadius,l=o.spacing,a=o.colors;return Fe((r={label:"menu"},Za(r,K8(i),"100%"),Za(r,"position","absolute"),Za(r,"width","100%"),Za(r,"zIndex",1),r),n?{}:{backgroundColor:a.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},MA=I.createContext(null),e6=function(e){var n=e.children,r=e.minMenuHeight,i=e.maxMenuHeight,o=e.menuPlacement,s=e.menuPosition,l=e.menuShouldScrollIntoView,a=e.theme,u=I.useContext(MA)||{},c=u.setPortalPlacement,f=I.useRef(null),h=I.useState(i),d=Gi(h,2),p=d[0],g=d[1],y=I.useState(null),O=Gi(y,2),m=O[0],v=O[1],b=a.spacing.controlHeight;return gy(function(){var P=f.current;if(P){var E=s==="fixed",T=l&&!E,w=H8({maxHeight:i,menuEl:P,minHeight:r,placement:o,shouldScroll:T,isFixedPosition:E,controlHeight:b});g(w.maxHeight),v(w.placement),c==null||c(w.placement)}},[i,o,s,l,r,c,b]),n({ref:f,placerProps:Fe(Fe({},e),{},{placement:m||DA(o),maxHeight:p})})},t6=function(e){var n=e.children,r=e.innerRef,i=e.innerProps;return We("div",$e({},Jt(e,"menu",{menu:!0}),{ref:r},i),n)},n6=t6,r6=function(e,n){var r=e.maxHeight,i=e.theme.spacing.baseUnit;return Fe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},i6=function(e){var n=e.children,r=e.innerProps,i=e.innerRef,o=e.isMulti;return We("div",$e({},Jt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},IA=function(e,n){var r=e.theme,i=r.spacing.baseUnit,o=r.colors;return Fe({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},o6=IA,s6=IA,l6=function(e){var n=e.children,r=n===void 0?"No options":n,i=e.innerProps,o=lo(e,q8);return We("div",$e({},Jt(Fe(Fe({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},a6=function(e){var n=e.children,r=n===void 0?"Loading...":n,i=e.innerProps,o=lo(e,G8);return We("div",$e({},Jt(Fe(Fe({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},u6=function(e){var n=e.rect,r=e.offset,i=e.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},c6=function(e){var n=e.appendTo,r=e.children,i=e.controlElement,o=e.innerProps,s=e.menuPlacement,l=e.menuPosition,a=I.useRef(null),u=I.useRef(null),c=I.useState(DA(s)),f=Gi(c,2),h=f[0],d=f[1],p=I.useMemo(function(){return{setPortalPlacement:d}},[]),g=I.useState(null),y=Gi(g,2),O=y[0],m=y[1],v=I.useCallback(function(){if(i){var T=F8(i),w=l==="fixed"?0:window.pageYOffset,k=T[h]+w;(k!==(O==null?void 0:O.offset)||T.left!==(O==null?void 0:O.rect.left)||T.width!==(O==null?void 0:O.rect.width))&&m({offset:k,rect:T})}},[i,l,h,O==null?void 0:O.offset,O==null?void 0:O.rect.left,O==null?void 0:O.rect.width]);gy(function(){v()},[v]);var b=I.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&a.current&&(u.current=M8(i,a.current,v,{elementResize:"ResizeObserver"in window}))},[i,v]);gy(function(){b()},[b]);var P=I.useCallback(function(T){a.current=T,b()},[b]);if(!n&&l!=="fixed"||!O)return null;var E=We("div",$e({ref:P},Jt(Fe(Fe({},e),{},{offset:O.offset,position:l,rect:O.rect}),"menuPortal",{"menu-portal":!0}),o),r);return We(MA.Provider,{value:p},n?fv.createPortal(E,n):E)},f6=function(e){var n=e.isDisabled,r=e.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},h6=function(e){var n=e.children,r=e.innerProps,i=e.isDisabled,o=e.isRtl;return We("div",$e({},Jt(e,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},d6=function(e,n){var r=e.theme.spacing,i=e.isMulti,o=e.hasValue,s=e.selectProps.controlShouldRenderValue;return Fe({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},p6=function(e){var n=e.children,r=e.innerProps,i=e.isMulti,o=e.hasValue;return We("div",$e({},Jt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},g6=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},m6=function(e){var n=e.children,r=e.innerProps;return We("div",$e({},Jt(e,"indicatorsContainer",{indicators:!0}),r),n)},lP,O6=["size"],y6=["innerProps","isRtl","size"],v6={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},NA=function(e){var n=e.size,r=lo(e,O6);return We("svg",$e({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:v6},r))},w0=function(e){return We(NA,$e({size:20},e),We("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},LA=function(e){return We(NA,$e({size:20},e),We("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},jA=function(e,n){var r=e.isFocused,i=e.theme,o=i.spacing.baseUnit,s=i.colors;return Fe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},S6=jA,b6=function(e){var n=e.children,r=e.innerProps;return We("div",$e({},Jt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||We(LA,null))},w6=jA,k6=function(e){var n=e.children,r=e.innerProps;return We("div",$e({},Jt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||We(w0,null))},P6=function(e,n){var r=e.isDisabled,i=e.theme,o=i.spacing.baseUnit,s=i.colors;return Fe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},x6=function(e){var n=e.innerProps;return We("span",$e({},n,Jt(e,"indicatorSeparator",{"indicator-separator":!0})))},C6=x8(lP||(lP=C8([`
|
|
113
|
+
0%, 80%, 100% { opacity: 0; }
|
|
114
|
+
40% { opacity: 1; }
|
|
115
|
+
`]))),E6=function(e,n){var r=e.isFocused,i=e.size,o=e.theme,s=o.colors,l=o.spacing.baseUnit;return Fe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:l*2})},Hg=function(e){var n=e.delay,r=e.offset;return We("span",{css:S0({animation:"".concat(C6," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Q6=function(e){var n=e.innerProps,r=e.isRtl,i=e.size,o=i===void 0?4:i,s=lo(e,y6);return We("div",$e({},Jt(Fe(Fe({},s),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),We(Hg,{delay:0,offset:r}),We(Hg,{delay:160,offset:!0}),We(Hg,{delay:320,offset:!r}))},_6=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.theme,s=o.colors,l=o.borderRadius,a=o.spacing;return Fe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},$6=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.innerRef,s=e.innerProps,l=e.menuIsOpen;return We("div",$e({ref:o},Jt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),s),n)},T6=$6,A6=["data"],R6=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},D6=function(e){var n=e.children,r=e.cx,i=e.getStyles,o=e.getClassNames,s=e.Heading,l=e.headingProps,a=e.innerProps,u=e.label,c=e.theme,f=e.selectProps;return We("div",$e({},Jt(e,"group",{group:!0}),a),We(s,$e({},l,{selectProps:f,theme:c,getStyles:i,getClassNames:o,cx:r}),u),We("div",null,n))},M6=function(e,n){var r=e.theme,i=r.colors,o=r.spacing;return Fe({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},I6=function(e){var n=TA(e);n.data;var r=lo(n,A6);return We("div",$e({},Jt(e,"groupHeading",{"group-heading":!0}),r))},N6=D6,L6=["innerRef","isDisabled","isHidden","inputClassName"],j6=function(e,n){var r=e.isDisabled,i=e.value,o=e.theme,s=o.spacing,l=o.colors;return Fe(Fe({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},V6),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:l.neutral80})},VA={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},V6={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Fe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},VA)},B6=function(e){return Fe({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},VA)},F6=function(e){var n=e.cx,r=e.value,i=TA(e),o=i.innerRef,s=i.isDisabled,l=i.isHidden,a=i.inputClassName,u=lo(i,L6);return We("div",$e({},Jt(e,"input",{"input-container":!0}),{"data-value":r||""}),We("input",$e({className:n({input:!0},a),ref:o,style:B6(l),disabled:s},u)))},X6=F6,W6=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return Fe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},U6=function(e,n){var r=e.theme,i=r.borderRadius,o=r.colors,s=e.cropWithEllipsis;return Fe({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Z6=function(e,n){var r=e.theme,i=r.spacing,o=r.borderRadius,s=r.colors,l=e.isFocused;return Fe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:l?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},BA=function(e){var n=e.children,r=e.innerProps;return We("div",r,n)},Y6=BA,z6=BA;function q6(t){var e=t.children,n=t.innerProps;return We("div",$e({role:"button"},n),e||We(w0,{size:14}))}var G6=function(e){var n=e.children,r=e.components,i=e.data,o=e.innerProps,s=e.isDisabled,l=e.removeProps,a=e.selectProps,u=r.Container,c=r.Label,f=r.Remove;return We(u,{data:i,innerProps:Fe(Fe({},Jt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:a},We(c,{data:i,innerProps:Fe({},Jt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},n),We(f,{data:i,innerProps:Fe(Fe({},Jt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:a}))},H6=G6,K6=function(e,n){var r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.theme,l=s.spacing,a=s.colors;return Fe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?a.primary:i?a.primary25:"transparent",color:r?a.neutral20:o?a.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?a.primary:a.primary50}})},J6=function(e){var n=e.children,r=e.isDisabled,i=e.isFocused,o=e.isSelected,s=e.innerRef,l=e.innerProps;return We("div",$e({},Jt(e,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},l),n)},e7=J6,t7=function(e,n){var r=e.theme,i=r.spacing,o=r.colors;return Fe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},n7=function(e){var n=e.children,r=e.innerProps;return We("div",$e({},Jt(e,"placeholder",{placeholder:!0}),r),n)},r7=n7,i7=function(e,n){var r=e.isDisabled,i=e.theme,o=i.spacing,s=i.colors;return Fe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},o7=function(e){var n=e.children,r=e.isDisabled,i=e.innerProps;return We("div",$e({},Jt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},s7=o7,l7={ClearIndicator:k6,Control:T6,DropdownIndicator:b6,DownChevron:LA,CrossIcon:w0,Group:N6,GroupHeading:I6,IndicatorsContainer:m6,IndicatorSeparator:x6,Input:X6,LoadingIndicator:Q6,Menu:n6,MenuList:i6,MenuPortal:c6,LoadingMessage:a6,NoOptionsMessage:l6,MultiValue:H6,MultiValueContainer:Y6,MultiValueLabel:z6,MultiValueRemove:q6,Option:e7,Placeholder:r7,SelectContainer:h6,SingleValue:s7,ValueContainer:p6},a7=function(e){return Fe(Fe({},l7),e.components)},aP=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function u7(t,e){return!!(t===e||aP(t)&&aP(e))}function c7(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!u7(t[n],e[n]))return!1;return!0}function f7(t,e){e===void 0&&(e=c7);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&e(i,n.lastArgs))return n.lastResult;var s=t.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}var h7={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},d7=function(e){return We("span",$e({css:h7},e))},uP=d7,p7={guidance:function(e){var n=e.isSearchable,r=e.isMulti,i=e.isDisabled,o=e.tabSelectsValue,s=e.context;switch(s){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var n=e.action,r=e.label,i=r===void 0?"":r,o=e.labels,s=e.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(e){var n=e.context,r=e.focused,i=e.options,o=e.label,s=o===void 0?"":o,l=e.selectValue,a=e.isDisabled,u=e.isSelected,c=function(p,g){return p&&p.length?"".concat(p.indexOf(g)+1," of ").concat(p.length):""};if(n==="value"&&l)return"value ".concat(s," focused, ").concat(c(l,r),".");if(n==="menu"){var f=a?" disabled":"",h="".concat(u?"selected":"focused").concat(f);return"option ".concat(s," ").concat(h,", ").concat(c(i,r),".")}return""},onFilter:function(e){var n=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},g7=function(e){var n=e.ariaSelection,r=e.focusedOption,i=e.focusedValue,o=e.focusableOptions,s=e.isFocused,l=e.selectValue,a=e.selectProps,u=e.id,c=a.ariaLiveMessages,f=a.getOptionLabel,h=a.inputValue,d=a.isMulti,p=a.isOptionDisabled,g=a.isSearchable,y=a.menuIsOpen,O=a.options,m=a.screenReaderStatus,v=a.tabSelectsValue,b=a["aria-label"],P=a["aria-live"],E=I.useMemo(function(){return Fe(Fe({},p7),c||{})},[c]),T=I.useMemo(function(){var V="";if(n&&E.onChange){var G=n.option,D=n.options,N=n.removedValue,A=n.removedValues,F=n.value,Y=function(X){return Array.isArray(X)?null:X},pe=N||G||Y(F),ae=pe?f(pe):"",B=D||A||void 0,q=B?B.map(f):[],te=Fe({isDisabled:pe&&p(pe,l),label:ae,labels:q},n);V=E.onChange(te)}return V},[n,E,p,l,f]),w=I.useMemo(function(){var V="",G=r||i,D=!!(r&&l&&l.includes(r));if(G&&E.onFocus){var N={focused:G,label:f(G),isDisabled:p(G,l),isSelected:D,options:o,context:G===r?"menu":"value",selectValue:l};V=E.onFocus(N)}return V},[r,i,f,p,E,o,l]),k=I.useMemo(function(){var V="";if(y&&O.length&&E.onFilter){var G=m({count:o.length});V=E.onFilter({inputValue:h,resultsMessage:G})}return V},[o,h,y,E,O,m]),C=I.useMemo(function(){var V="";if(E.guidance){var G=i?"value":y?"menu":"input";V=E.guidance({"aria-label":b,context:G,isDisabled:r&&p(r,l),isMulti:d,isSearchable:g,tabSelectsValue:v})}return V},[b,r,i,d,p,g,y,E,l,v]),Q="".concat(w," ").concat(k," ").concat(C),M=We(I.Fragment,null,We("span",{id:"aria-selection"},T),We("span",{id:"aria-context"},Q)),L=(n==null?void 0:n.action)==="initial-input-focus";return We(I.Fragment,null,We(uP,{id:u},L&&M),We(uP,{"aria-live":P,"aria-atomic":"false","aria-relevant":"additions text"},s&&!L&&M))},m7=g7,my=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],O7=new RegExp("["+my.map(function(t){return t.letters}).join("")+"]","g"),FA={};for(var Kg=0;Kg<my.length;Kg++)for(var Jg=my[Kg],em=0;em<Jg.letters.length;em++)FA[Jg.letters[em]]=Jg.base;var XA=function(e){return e.replace(O7,function(n){return FA[n]})},y7=f7(XA),cP=function(e){return e.replace(/^\s+|\s+$/g,"")},v7=function(e){return"".concat(e.label," ").concat(e.value)},S7=function(e){return function(n,r){if(n.data.__isNew__)return!0;var i=Fe({ignoreCase:!0,ignoreAccents:!0,stringify:v7,trim:!0,matchFrom:"any"},e),o=i.ignoreCase,s=i.ignoreAccents,l=i.stringify,a=i.trim,u=i.matchFrom,c=a?cP(r):r,f=a?cP(l(n)):l(n);return o&&(c=c.toLowerCase(),f=f.toLowerCase()),s&&(c=y7(c),f=XA(f)),u==="start"?f.substr(0,c.length)===c:f.indexOf(c)>-1}},b7=["innerRef"];function w7(t){var e=t.innerRef,n=lo(t,b7),r=z8(n,"onExited","in","enter","exit","appear");return We("input",$e({ref:e},r,{css:S0({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var k7=function(e){e.preventDefault(),e.stopPropagation()};function P7(t){var e=t.isEnabled,n=t.onBottomArrive,r=t.onBottomLeave,i=t.onTopArrive,o=t.onTopLeave,s=I.useRef(!1),l=I.useRef(!1),a=I.useRef(0),u=I.useRef(null),c=I.useCallback(function(y,O){if(u.current!==null){var m=u.current,v=m.scrollTop,b=m.scrollHeight,P=m.clientHeight,E=u.current,T=O>0,w=b-P-v,k=!1;w>O&&s.current&&(r&&r(y),s.current=!1),T&&l.current&&(o&&o(y),l.current=!1),T&&O>w?(n&&!s.current&&n(y),E.scrollTop=b,k=!0,s.current=!0):!T&&-O>v&&(i&&!l.current&&i(y),E.scrollTop=0,k=!0,l.current=!0),k&&k7(y)}},[n,r,i,o]),f=I.useCallback(function(y){c(y,y.deltaY)},[c]),h=I.useCallback(function(y){a.current=y.changedTouches[0].clientY},[]),d=I.useCallback(function(y){var O=a.current-y.changedTouches[0].clientY;c(y,O)},[c]),p=I.useCallback(function(y){if(y){var O=U8?{passive:!1}:!1;y.addEventListener("wheel",f,O),y.addEventListener("touchstart",h,O),y.addEventListener("touchmove",d,O)}},[d,h,f]),g=I.useCallback(function(y){y&&(y.removeEventListener("wheel",f,!1),y.removeEventListener("touchstart",h,!1),y.removeEventListener("touchmove",d,!1))},[d,h,f]);return I.useEffect(function(){if(e){var y=u.current;return p(y),function(){g(y)}}},[e,p,g]),function(y){u.current=y}}var fP=["boxSizing","height","overflow","paddingRight","position"],hP={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function dP(t){t.preventDefault()}function pP(t){t.stopPropagation()}function gP(){var t=this.scrollTop,e=this.scrollHeight,n=t+this.offsetHeight;t===0?this.scrollTop=1:n===e&&(this.scrollTop=t-1)}function mP(){return"ontouchstart"in window||navigator.maxTouchPoints}var OP=!!(typeof window<"u"&&window.document&&window.document.createElement),Ra=0,zs={capture:!1,passive:!1};function x7(t){var e=t.isEnabled,n=t.accountForScrollbars,r=n===void 0?!0:n,i=I.useRef({}),o=I.useRef(null),s=I.useCallback(function(a){if(OP){var u=document.body,c=u&&u.style;if(r&&fP.forEach(function(p){var g=c&&c[p];i.current[p]=g}),r&&Ra<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,d=window.innerWidth-h+f||0;Object.keys(hP).forEach(function(p){var g=hP[p];c&&(c[p]=g)}),c&&(c.paddingRight="".concat(d,"px"))}u&&mP()&&(u.addEventListener("touchmove",dP,zs),a&&(a.addEventListener("touchstart",gP,zs),a.addEventListener("touchmove",pP,zs))),Ra+=1}},[r]),l=I.useCallback(function(a){if(OP){var u=document.body,c=u&&u.style;Ra=Math.max(Ra-1,0),r&&Ra<1&&fP.forEach(function(f){var h=i.current[f];c&&(c[f]=h)}),u&&mP()&&(u.removeEventListener("touchmove",dP,zs),a&&(a.removeEventListener("touchstart",gP,zs),a.removeEventListener("touchmove",pP,zs)))}},[r]);return I.useEffect(function(){if(e){var a=o.current;return s(a),function(){l(a)}}},[e,s,l]),function(a){o.current=a}}var C7=function(){return document.activeElement&&document.activeElement.blur()},E7={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Q7(t){var e=t.children,n=t.lockEnabled,r=t.captureEnabled,i=r===void 0?!0:r,o=t.onBottomArrive,s=t.onBottomLeave,l=t.onTopArrive,a=t.onTopLeave,u=P7({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:l,onTopLeave:a}),c=x7({isEnabled:n}),f=function(d){u(d),c(d)};return We(I.Fragment,null,n&&We("div",{onClick:C7,css:E7}),e(f))}var _7={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},$7=function(e){var n=e.name,r=e.onFocus;return We("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:_7,value:"",onChange:function(){}})},T7=$7,A7=function(e){return e.label},R7=function(e){return e.label},D7=function(e){return e.value},M7=function(e){return!!e.isDisabled},I7={clearIndicator:w6,container:f6,control:_6,dropdownIndicator:S6,group:R6,groupHeading:M6,indicatorsContainer:g6,indicatorSeparator:P6,input:j6,loadingIndicator:E6,loadingMessage:s6,menu:J8,menuList:r6,menuPortal:u6,multiValue:W6,multiValueLabel:U6,multiValueRemove:Z6,noOptionsMessage:o6,option:K6,placeholder:t7,singleValue:i7,valueContainer:d6},N7={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},L7=4,WA=4,j7=38,V7=WA*2,B7={baseUnit:WA,controlHeight:j7,menuGutter:V7},tm={borderRadius:L7,colors:N7,spacing:B7},F7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:sP(),captureMenuScroll:!sP(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:S7(),formatGroupLabel:A7,getOptionLabel:R7,getOptionValue:D7,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:M7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!X8(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var n=e.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function yP(t,e,n,r){var i=zA(t,e,n),o=qA(t,e,n),s=YA(t,e),l=Sd(t,e);return{type:"option",data:e,isDisabled:i,isSelected:o,label:s,value:l,index:r}}function UA(t,e){return t.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,l){return yP(t,s,e,l)}).filter(function(s){return vP(t,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=yP(t,n,e,r);return vP(t,o)?o:void 0}).filter(Z8)}function ZA(t){return t.reduce(function(e,n){return n.type==="group"?e.push.apply(e,aA(n.options.map(function(r){return r.data}))):e.push(n.data),e},[])}function X7(t,e){return ZA(UA(t,e))}function vP(t,e){var n=t.inputValue,r=n===void 0?"":n,i=e.data,o=e.isSelected,s=e.label,l=e.value;return(!HA(t)||!o)&&GA(t,{label:s,value:l,data:i},r)}function W7(t,e){var n=t.focusedValue,r=t.selectValue,i=r.indexOf(n);if(i>-1){var o=e.indexOf(n);if(o>-1)return n;if(i<e.length)return e[i]}return null}function U7(t,e){var n=t.focusedOption;return n&&e.indexOf(n)>-1?n:e[0]}var YA=function(e,n){return e.getOptionLabel(n)},Sd=function(e,n){return e.getOptionValue(n)};function zA(t,e,n){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,n):!1}function qA(t,e,n){if(n.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,n);var r=Sd(t,e);return n.some(function(i){return Sd(t,i)===r})}function GA(t,e,n){return t.filterOption?t.filterOption(e,n):!0}var HA=function(e){var n=e.hideSelectedOptions,r=e.isMulti;return n===void 0?r:n},Z7=1,KA=function(t){yZ(n,t);var e=wZ(n);function n(r){var i;if(mZ(this,n),i=e.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,a){var u=i.props,c=u.onChange,f=u.name;a.name=f,i.ariaOnChange(l,a),c(l,a)},i.setValue=function(l,a,u){var c=i.props,f=c.closeMenuOnSelect,h=c.isMulti,d=c.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:d}),f&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:a,option:u})},i.selectOption=function(l){var a=i.props,u=a.blurInputOnSelect,c=a.isMulti,f=a.name,h=i.state.selectValue,d=c&&i.isOptionSelected(l,h),p=i.isOptionDisabled(l,h);if(d){var g=i.getOptionValue(l);i.setValue(h.filter(function(y){return i.getOptionValue(y)!==g}),"deselect-option",l)}else if(!p)c?i.setValue([].concat(aA(h),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:f});return}u&&i.blurInput()},i.removeValue=function(l){var a=i.props.isMulti,u=i.state.selectValue,c=i.getOptionValue(l),f=u.filter(function(d){return i.getOptionValue(d)!==c}),h=$f(a,f,f[0]||null);i.onChange(h,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange($f(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,a=i.state.selectValue,u=a[a.length-1],c=a.slice(0,a.length-1),f=$f(l,c,c[0]||null);i.onChange(f,{action:"pop-value",removedValue:u})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];return L8.apply(void 0,[i.props.classNamePrefix].concat(a))},i.getOptionLabel=function(l){return YA(i.props,l)},i.getOptionValue=function(l){return Sd(i.props,l)},i.getStyles=function(l,a){var u=i.props.unstyled,c=I7[l](a,u);c.boxSizing="border-box";var f=i.props.styles[l];return f?f(c,a):c},i.getClassNames=function(l,a){var u,c;return(u=(c=i.props.classNames)[l])===null||u===void 0?void 0:u.call(c,a)},i.getElementId=function(l){return"".concat(i.instancePrefix,"-").concat(l)},i.getComponents=function(){return a7(i.props)},i.buildCategorizedOptions=function(){return UA(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return ZA(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,a){i.setState({ariaSelection:Fe({value:l},a)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var a=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():a&&i.openMenu("first"):(a&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var a=i.props,u=a.isMulti,c=a.menuIsOpen;i.focusInput(),c?(i.setState({inputIsHiddenAfterUpdate:!u}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&pp(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var a=l.touches,u=a&&a.item(0);u&&(i.initialTouchX=u.clientX,i.initialTouchY=u.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var a=l.touches,u=a&&a.item(0);if(u){var c=Math.abs(u.clientX-i.initialTouchX),f=Math.abs(u.clientY-i.initialTouchY),h=5;i.userIsDragging=c>h||f>h}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var a=i.props.inputValue,u=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:a}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var a=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:a}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){i.blockOptionHover||i.state.focusedOption===l||i.setState({focusedOption:l})},i.shouldHideSelectedOptions=function(){return HA(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var a=i.props,u=a.isMulti,c=a.backspaceRemovesValue,f=a.escapeClearsValue,h=a.inputValue,d=a.isClearable,p=a.isDisabled,g=a.menuIsOpen,y=a.onKeyDown,O=a.tabSelectsValue,m=a.openMenuOnFocus,v=i.state,b=v.focusedOption,P=v.focusedValue,E=v.selectValue;if(!p&&!(typeof y=="function"&&(y(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!u||h)return;i.focusValue("previous");break;case"ArrowRight":if(!u||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(P)i.removeValue(P);else{if(!c)return;u?i.popValue():d&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!g||!O||!b||m&&i.isOptionSelected(b,E))return;i.selectOption(b);break;case"Enter":if(l.keyCode===229)break;if(g){if(!b||i.isComposing)return;i.selectOption(b);break}return;case"Escape":g?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):d&&f&&i.clearValue();break;case" ":if(h)return;if(!g){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":g?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":g?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!g)return;i.focusOption("pageup");break;case"PageDown":if(!g)return;i.focusOption("pagedown");break;case"Home":if(!g)return;i.focusOption("first");break;case"End":if(!g)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++Z7),i.state.selectValue=iP(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[s]}return i}return OZ(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&oP(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,l=o.menuIsOpen,a=this.state.isFocused;(a&&!s&&i.isDisabled||a&&l&&!i.menuIsOpen)&&this.focusInput(),a&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!a&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(oP(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,l=s.selectValue,a=s.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(l[0]);f>-1&&(c=f)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,l=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=s.indexOf(l);l||(a=-1);var u=s.length-1,c=-1;if(s.length){switch(i){case"previous":a===0?c=0:a===-1?c=u:c=a-1;break;case"next":a>-1&&a<u&&(c=a+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:s[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var a=0,u=l.indexOf(s);s||(u=-1),i==="up"?a=u>0?u-1:l.length-1:i==="down"?a=(u+1)%l.length:i==="pageup"?(a=u-o,a<0&&(a=0)):i==="pagedown"?(a=u+o,a>l.length-1&&(a=l.length-1)):i==="last"&&(a=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(tm):Fe(Fe({},tm),this.props.theme):tm}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,l=this.getClassNames,a=this.getValue,u=this.selectOption,c=this.setValue,f=this.props,h=f.isMulti,d=f.isRtl,p=f.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:l,getValue:a,hasValue:g,isMulti:h,isRtl:d,options:p,selectOption:u,selectProps:f,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return zA(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return qA(this.props,i,o)}},{key:"filterOption",value:function(i,o){return GA(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,selectValue:l})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,s=i.isSearchable,l=i.inputId,a=i.inputValue,u=i.tabIndex,c=i.form,f=i.menuIsOpen,h=i.required,d=this.getComponents(),p=d.Input,g=this.state,y=g.inputIsHidden,O=g.ariaSelection,m=this.commonProps,v=l||this.getElementId("input"),b=Fe(Fe(Fe({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox"},f&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(O==null?void 0:O.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?I.createElement(p,$e({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:o,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:a},b)):I.createElement(w7,$e({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:yd,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,l=o.MultiValueContainer,a=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,f=o.Placeholder,h=this.commonProps,d=this.props,p=d.controlShouldRenderValue,g=d.isDisabled,y=d.isMulti,O=d.inputValue,m=d.placeholder,v=this.state,b=v.selectValue,P=v.focusedValue,E=v.isFocused;if(!this.hasValue()||!p)return O?null:I.createElement(f,$e({},h,{key:"placeholder",isDisabled:g,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),m);if(y)return b.map(function(w,k){var C=w===P,Q="".concat(i.getOptionLabel(w),"-").concat(i.getOptionValue(w));return I.createElement(s,$e({},h,{components:{Container:l,Label:a,Remove:u},isFocused:C,isDisabled:g,key:Q,index:k,removeProps:{onClick:function(){return i.removeValue(w)},onTouchEnd:function(){return i.removeValue(w)},onMouseDown:function(L){L.preventDefault()}},data:w}),i.formatOptionLabel(w,"value"))});if(O)return null;var T=b[0];return I.createElement(c,$e({},h,{data:T,isDisabled:g}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,l=this.props,a=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||a||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return I.createElement(o,$e({},s,{innerProps:f,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,l=this.props,a=l.isDisabled,u=l.isLoading,c=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return I.createElement(o,$e({},s,{innerProps:f,isDisabled:a,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var l=this.commonProps,a=this.props.isDisabled,u=this.state.isFocused;return I.createElement(s,$e({},l,{isDisabled:a,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,l=this.props.isDisabled,a=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return I.createElement(o,$e({},s,{innerProps:u,isDisabled:l,isFocused:a}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,l=o.GroupHeading,a=o.Menu,u=o.MenuList,c=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,d=o.Option,p=this.commonProps,g=this.state.focusedOption,y=this.props,O=y.captureMenuScroll,m=y.inputValue,v=y.isLoading,b=y.loadingMessage,P=y.minMenuHeight,E=y.maxMenuHeight,T=y.menuIsOpen,w=y.menuPlacement,k=y.menuPosition,C=y.menuPortalTarget,Q=y.menuShouldBlockScroll,M=y.menuShouldScrollIntoView,L=y.noOptionsMessage,V=y.onMenuScrollToTop,G=y.onMenuScrollToBottom;if(!T)return null;var D=function(B,q){var te=B.type,we=B.data,X=B.isDisabled,W=B.isSelected,z=B.label,fe=B.value,be=g===we,Be=X?void 0:function(){return i.onOptionHover(we)},Me=X?void 0:function(){return i.selectOption(we)},Ne="".concat(i.getElementId("option"),"-").concat(q),ie={id:Ne,onClick:Me,onMouseMove:Be,onMouseOver:Be,tabIndex:-1};return I.createElement(d,$e({},p,{innerProps:ie,data:we,isDisabled:X,isSelected:W,key:Ne,label:z,type:te,value:fe,isFocused:be,innerRef:be?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(B.data,"menu"))},N;if(this.hasOptions())N=this.getCategorizedOptions().map(function(ae){if(ae.type==="group"){var B=ae.data,q=ae.options,te=ae.index,we="".concat(i.getElementId("group"),"-").concat(te),X="".concat(we,"-heading");return I.createElement(s,$e({},p,{key:we,data:B,options:q,Heading:l,headingProps:{id:X,data:ae.data},label:i.formatGroupLabel(ae.data)}),ae.options.map(function(W){return D(W,"".concat(te,"-").concat(W.index))}))}else if(ae.type==="option")return D(ae,"".concat(ae.index))});else if(v){var A=b({inputValue:m});if(A===null)return null;N=I.createElement(f,p,A)}else{var F=L({inputValue:m});if(F===null)return null;N=I.createElement(h,p,F)}var Y={minMenuHeight:P,maxMenuHeight:E,menuPlacement:w,menuPosition:k,menuShouldScrollIntoView:M},pe=I.createElement(e6,$e({},p,Y),function(ae){var B=ae.ref,q=ae.placerProps,te=q.placement,we=q.maxHeight;return I.createElement(a,$e({},p,Y,{innerRef:B,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:v,placement:te}),I.createElement(Q7,{captureEnabled:O,onTopArrive:V,onBottomArrive:G,lockEnabled:Q},function(X){return I.createElement(u,$e({},p,{innerRef:function(z){i.getMenuListRef(z),X(z)},isLoading:v,maxHeight:we,focusedOption:g}),N)}))});return C||k==="fixed"?I.createElement(c,$e({},p,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:k}),pe):pe}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,l=o.isDisabled,a=o.isMulti,u=o.name,c=o.required,f=this.state.selectValue;if(c&&!this.hasValue()&&!l)return I.createElement(T7,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(a)if(s){var h=f.map(function(g){return i.getOptionValue(g)}).join(s);return I.createElement("input",{name:u,type:"hidden",value:h})}else{var d=f.length>0?f.map(function(g,y){return I.createElement("input",{key:"i-".concat(y),name:u,type:"hidden",value:i.getOptionValue(g)})}):I.createElement("input",{name:u,type:"hidden",value:""});return I.createElement("div",null,d)}else{var p=f[0]?this.getOptionValue(f[0]):"";return I.createElement("input",{name:u,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,l=o.focusedOption,a=o.focusedValue,u=o.isFocused,c=o.selectValue,f=this.getFocusableOptions();return I.createElement(m7,$e({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:l,focusedValue:a,isFocused:u,selectValue:c,focusableOptions:f}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,l=i.SelectContainer,a=i.ValueContainer,u=this.props,c=u.className,f=u.id,h=u.isDisabled,d=u.menuIsOpen,p=this.state.isFocused,g=this.commonProps=this.getCommonProps();return I.createElement(l,$e({},g,{className:c,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:p}),this.renderLiveRegion(),I.createElement(o,$e({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:p,menuIsOpen:d}),I.createElement(a,$e({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),I.createElement(s,$e({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,l=o.clearFocusValueOnUpdate,a=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,f=o.prevWasFocused,h=i.options,d=i.value,p=i.menuIsOpen,g=i.inputValue,y=i.isMulti,O=iP(d),m={};if(s&&(d!==s.value||h!==s.options||p!==s.menuIsOpen||g!==s.inputValue)){var v=p?X7(i,O):[],b=l?W7(o,O):null,P=U7(o,v);m={selectValue:O,focusedOption:P,focusedValue:b,clearFocusValueOnUpdate:!1}}var E=a!=null&&i!==s?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},T=u,w=c&&f;return c&&!w&&(T={value:$f(y,O,O[0]||null),options:O,action:"initial-input-focus"},w=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(T=null),Fe(Fe(Fe({},m),E),{},{prevProps:i,ariaSelection:T,prevWasFocused:w})}}]),n}(I.Component);KA.defaultProps=F7;var Y7=I.forwardRef(function(t,e){var n=gZ(t);return I.createElement(KA,$e({ref:e},n))}),SP=Y7;const z7=[{value:1,label:"1 second"},{value:5,label:"5 seconds"},{value:10,label:"10 seconds"},{value:30,label:"30 seconds"}],q7=({show:t,onClose:e,setTheme:n,theme:r})=>{const i=I.useCallback(s=>{n(s.label)},[]),o=I.useCallback(s=>{const l=[{value:s.value}];fetch("/saveTime",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})},[]);return t?ne.jsxs(Ta,{className:"vz-settings",show:t,onHide:e,animation:!1,children:[ne.jsx(Ta.Header,{closeButton:!0,children:ne.jsx(Ta.Title,{children:"Settings"})}),ne.jsxs(Ta.Body,{children:[ne.jsxs(pi.Group,{className:"mb-3",controlId:"formFork",children:[ne.jsx(pi.Label,{children:"Username"}),ne.jsx(pi.Control,{type:"text",placeholder:"Enter username"}),ne.jsx(pi.Text,{className:"text-muted",children:"Enter a username to be displayed on your cursor"})]}),ne.jsxs(pi.Group,{className:"mb-3",controlId:"formFork",children:[ne.jsx(pi.Label,{children:"Theme"}),ne.jsx(SP,{options:IQ,onChange:i,value:Dv[r]}),ne.jsx(pi.Text,{className:"text-muted",children:"Select a color theme for the editor"})]}),ne.jsxs(pi.Group,{className:"mb-3",controlId:"formFork",children:[ne.jsx(pi.Label,{children:"Auto-Save Time"}),ne.jsx(SP,{options:z7,onChange:o}),ne.jsx(pi.Text,{className:"text-muted",children:"Select an auto save time"})]})]}),ne.jsx(Ta.Footer,{children:ne.jsx(uZ,{variant:"primary",onClick:e,children:"Done"})})]}):null},G7=t=>{const e={name:"files"};for(const n of Object.keys(t)){const r=t[n],i=r.name.split("/"),o=i.length;let s=e;for(let l=0;l<o-1;l++){let a;const u=i[l];if(s.children)for(let c=0;c<s.children.length;c++){const f=s.children[c];if(f.name===u){a=f;break}}a||(a={name:i[l],path:i.slice(0,l+1).join("/")},(s.children||(s.children=[])).push(a)),s=a}r.text!==null&&(s.children||(s.children=[])).push({name:i[o-1],file:r,fileId:n})}return e},JA=t=>(t.children&&(t.children.sort((e,n)=>{const r=e.file?1:0,i=n.file?1:0;return r-i||e.name.localeCompare(n.name)}),t.children.forEach(JA)),t),e2=({children:t,handleClick:e,handleRenameClick:n,handleDeleteClick:r})=>{const[i,o]=I.useState(!1),s=I.useCallback(()=>{o(!0)},[]),l=I.useCallback(()=>{o(!1)},[]);return ne.jsxs("div",{className:"full-box file-or-directory",onClick:e,onMouseEnter:s,onMouseLeave:l,children:[ne.jsx("div",{className:"name",children:t}),i?ne.jsxs("div",{className:"utils",children:[ne.jsx("i",{className:"bx bxs-edit utilities",style:{color:"#abdafb"},onClick:n}),ne.jsx("i",{className:"bx bx-trash",style:{color:"#eb336c"},onClick:r})]}):null]})},H7=({height:t=10,fill:e="currentcolor"})=>ne.jsx("svg",{height:t,viewBox:"4 4 16 16",children:ne.jsx("path",{fill:e,d:"M8 17l9-5-9-5v10z"})}),K7=({name:t,path:e,children:n,handleRenameFileClick:r,handleDeleteFileClick:i,handleFileClick:o,isDirectoryOpen:s,toggleDirectory:l})=>{const a=I.useCallback(()=>{l(e)},[l]),u=I.useCallback(()=>{console.log("TODO handleDeleteDirectoryClick")},[]),c=I.useCallback(()=>{console.log("TODO handleRenameDirectoryClick")},[]),f=I.useMemo(()=>s(e),[s,e]);return ne.jsxs(ne.Fragment,{children:[ne.jsxs(e2,{name:t,handleClick:a,handleDeleteClick:u,handleRenameClick:c,children:[ne.jsx("div",{className:"arrow-wrapper",style:{transform:`rotate(${f?90:0}deg)`},children:ne.jsx(H7,{})}),t]}),n&&f?ne.jsx("div",{className:"indentation",children:n.map(h=>{const{fileId:d}=h,{path:p}=h;return ne.jsx(t2,{entity:h,handleRenameFileClick:r,handleDeleteFileClick:i,handleFileClick:o,isDirectoryOpen:s,toggleDirectory:l},d||p)})}):null]})},J7=({name:t,fileId:e,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i})=>{const o=I.useCallback(()=>{i(e)},[e,i]),s=I.useCallback(a=>{r(e,a)},[e]),l=I.useCallback(()=>{n(e)},[e]);return ne.jsx(e2,{handleClick:o,handleDeleteClick:s,handleRenameClick:l,children:t})},t2=({entity:t,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r,isDirectoryOpen:i,toggleDirectory:o})=>{const{name:s,file:l,fileId:a}=t,{path:u,children:c}=t;return l?ne.jsx(J7,{fileId:a,name:s,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r}):ne.jsx(K7,{name:s,path:u,children:c,handleRenameFileClick:e,handleDeleteFileClick:n,handleFileClick:r,isDirectoryOpen:i,toggleDirectory:o})};const eY=({createFile:t,files:e,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i,setIsSettingsOpen:o,isDirectoryOpen:s,toggleDirectory:l})=>{const a=I.useMemo(()=>e?JA(G7(e)):null,[e]);return I.useCallback(()=>{o(!0)},[]),ne.jsxs("div",{className:"vz-sidebar",children:[ne.jsxs("div",{className:"files",children:[ne.jsxs("div",{className:"full-box",children:[ne.jsx("div",{children:ne.jsx("a",{className:"link-name",href:"#",children:"Files"})}),ne.jsx("div",{children:ne.jsx("i",{className:"bx bxs-file-plus new-btn",style:{color:"#dbdde1"},onClick:t})})]}),a?a.children.map(u=>{const{fileId:c}=u,{path:f}=u,h=c||f;return ne.jsx(t2,{entity:u,handleRenameFileClick:n,handleDeleteFileClick:r,handleFileClick:i,isDirectoryOpen:s,toggleDirectory:l},h)}):null]}),null]})};const tY=t=>{const e=t.split("/");return e.length===1?e[e.length-1]:e[e.length-2]+"/"+e[e.length-1]},nY=({fileId:t,isActive:e,setActiveFileId:n,closeTab:r,fileName:i})=>{const o=I.useCallback(l=>{l.stopPropagation(),r(t)},[r,t]),s=I.useMemo(()=>tY(i),[i]);return ne.jsxs("div",{className:e?"tab active":"tab",onClick:()=>{n(t)},children:[s,ne.jsx("div",{className:e?"bx bx-x tab-close":"",onClick:o})]})},rY=({files:t,tabList:e,activeFileId:n,setActiveFileId:r,closeTab:i})=>ne.jsx("div",{className:"vz-tab-list",children:t&&e.map(o=>ne.jsx(nY,{fileId:o,isActive:o===n,setActiveFileId:r,closeTab:i,fileName:t[o].name},o))}),iY=()=>{const[t,e]=I.useState(new Set),n=I.useCallback(i=>t.has(i),[t]),r=I.useCallback(i=>{const o=new Set(t);o[n(i)?"delete":"add"](i),e(o)},[t,n]);return{isDirectoryOpen:n,toggleDirectory:r}},oY=(t,e,n,r)=>{const i=I.useCallback(s=>{const l=n.findIndex(a=>a===s);if(l!==-1){const a=[...n.slice(0,l),...n.slice(l+1)];r(a),t===s&&(a.length>0?e(l===0?a[l]:a[l-1]):e(null))}},[n,t]),o=I.useCallback(s=>{e(s),n.includes(s)||r([...n,s])},[n]);return{tabList:n,closeTab:i,openTab:o}};const sY=()=>I.useRef(new Map).current,lY=(t,e)=>{const n=I.useRef(!0);I.useEffect(()=>{if(n.current)n.current=!1;else for(const r of Array.from(t.values())){const{editor:i,themeCompartment:o}=r;i.dispatch({effects:o.reconfigure([Dv[e].value])})}},[e,t])},aY=1200,uY=t=>{const e=t.match(/\.([^.]+)$/);return e?e[1]:""},cY=(t,e,n)=>{const r=new Set,i=I.useRef(!1);I.useEffect(()=>{if(!t)return;const o=u=>{const{fileId:c,error:f,fileTextPrettified:h}=u.data;if(f){console.log(f);return}i.current=!0,e(d=>({...d,files:{...d.files,[c]:{...d.files[c],text:h}}})),i.current=!1};n.addEventListener("message",o);const s=async()=>{const c=t.data.files,f=Array.from(r);r.clear();for(const h of f){const d=c[h],p={fileText:d.text,fileExtension:uY(d.name),fileId:h};n.postMessage(p)}};let l;function a(){clearTimeout(l),l=setTimeout(s,aY)}t.on("op batch",(u,c)=>{if(c){if(i.current)return;if(u&&u.length===4&&u[0]==="files"&&typeof u[1]=="string"&&u[2]==="text"){const f=u[1];r.add(f),a()}}return()=>{n.removeEventListener("message",o),clearTimeout(l)}})},[t])};function fY(){return new Worker("/assets/worker-d5f0575a.js")}const hY=new fY;NC.types.register(hv.type);const{Connection:dY}=NC,pY=window.location.protocol==="https:"?"wss://":"ws://",gY=new WebSocket(pY+window.location.host+"/ws"),bP=new dY(gY);function mY(){const[t,e]=I.useState(null),n=I.useCallback(V=>{const G=t.data,D=PW(G,V(G));D&&t&&t.submitOp(D)},[t]);cY(t,n,hY);const[r,i]=I.useState(null),[o,s]=I.useState(null),[l,a]=I.useState(null);I.useEffect(()=>{const V="documents",G="1",D=bP.get(V,G);return D.subscribe(()=>{e(D),a(D.data),D.on("op",()=>{a(D.data)});const N=bP.getDocPresence(V,G);N.subscribe(function(A){if(A)throw A}),i(N.create(IS())),s(N)}),()=>{}},[]);const[u,c]=I.useState(null),[f,h]=I.useState([]),{closeTab:d,openTab:p}=oY(u,c,f,h),[g,y]=I.useState(NQ),O=sY();lY(O,g);const[m,v]=I.useState(!1),{isDirectoryOpen:b,toggleDirectory:P}=iY(),E=I.useCallback(()=>{const V=prompt("Enter new file name");V&&n(G=>({...G,files:{...G.files,[IS()]:{name:V,text:""}}}))},[n]),T=I.useCallback(V=>{const G=prompt("Enter new name");G&&n(D=>({...D,files:{...D.files,[V]:{...D.files[V],name:G}}}))},[n]),w=I.useCallback(V=>{d(V),n(G=>{const D={...G.files};return delete D[V],{...G,files:D}})},[n,d]),k=I.useCallback((V,G)=>{G.stopPropagation(),w(V)},[w]),C=I.useCallback(()=>{v(!1)},[]),Q=I.useRef(null),M=I.useCallback(()=>{Q.current?clearTimeout(Q.current):n(V=>({...V,isInteracting:!0})),Q.current=setTimeout(()=>{Q.current=null,n(V=>({...V,isInteracting:!1}))},800)},[n]),L=l?l.files:null;return ne.jsxs("div",{className:"app",children:[ne.jsxs("div",{className:"left",children:[ne.jsx(eY,{createFile:E,files:L,handleRenameFileClick:T,handleDeleteFileClick:k,handleFileClick:p,setIsSettingsOpen:v,isDirectoryOpen:b,toggleDirectory:P}),ne.jsx(q7,{show:m,onClose:C,theme:g,setTheme:y})]}),ne.jsxs("div",{className:"right",children:[ne.jsx(rY,{files:L,tabList:f,activeFileId:u,setActiveFileId:c,closeTab:d}),l&&u?ne.jsx(zF,{shareDBDoc:t,localPresence:r,docPresence:o,activeFileId:u,theme:g,onInteract:M,editorCache:O}):null]})]})}MC(document.getElementById("root")).render(ne.jsx(mY,{}));
|