monorepotime 1.1.19 → 1.2.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.
@@ -1,1534 +0,0 @@
1
- (function(){const G=document.createElement("link").relList;if(G&&G.supports&&G.supports("modulepreload"))return;for(const V of document.querySelectorAll('link[rel="modulepreload"]'))D(V);new MutationObserver(V=>{for(const R of V)if(R.type==="childList")for(const x of R.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&D(x)}).observe(document,{childList:!0,subtree:!0});function $(V){const R={};return V.integrity&&(R.integrity=V.integrity),V.referrerPolicy&&(R.referrerPolicy=V.referrerPolicy),V.crossOrigin==="use-credentials"?R.credentials="include":V.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function D(V){if(V.ep)return;V.ep=!0;const R=$(V);fetch(V.href,R)}})();var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hu(W){return W&&W.__esModule&&Object.prototype.hasOwnProperty.call(W,"default")?W.default:W}var Bc={exports:{}},oo={};var Wf;function Bm(){if(Wf)return oo;Wf=1;var W=Symbol.for("react.transitional.element"),G=Symbol.for("react.fragment");function $(D,V,R){var x=null;if(R!==void 0&&(x=""+R),V.key!==void 0&&(x=""+V.key),"key"in V){R={};for(var p in V)p!=="key"&&(R[p]=V[p])}else R=V;return V=R.ref,{$$typeof:W,type:D,key:x,ref:V!==void 0?V:null,props:R}}return oo.Fragment=G,oo.jsx=$,oo.jsxs=$,oo}var Pf;function jm(){return Pf||(Pf=1,Bc.exports=Bm()),Bc.exports}var B=jm(),jc={exports:{}},De={};var Uf;function Im(){if(Uf)return De;Uf=1;var W=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),x=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),i=Symbol.for("react.activity"),r=Symbol.iterator;function o(H){return H===null||typeof H!="object"?null:(H=r&&H[r]||H["@@iterator"],typeof H=="function"?H:null)}var s={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},l=Object.assign,n={};function d(H,Y,K){this.props=H,this.context=Y,this.refs=n,this.updater=K||s}d.prototype.isReactComponent={},d.prototype.setState=function(H,Y){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,Y,"setState")},d.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function f(){}f.prototype=d.prototype;function y(H,Y,K){this.props=H,this.context=Y,this.refs=n,this.updater=K||s}var _=y.prototype=new f;_.constructor=y,l(_,d.prototype),_.isPureReactComponent=!0;var v=Array.isArray;function g(){}var w={H:null,A:null,T:null,S:null},b=Object.prototype.hasOwnProperty;function S(H,Y,K){var q=K.ref;return{$$typeof:W,type:H,key:Y,ref:q!==void 0?q:null,props:K}}function T(H,Y){return S(H.type,Y,H.props)}function j(H){return typeof H=="object"&&H!==null&&H.$$typeof===W}function E(H){var Y={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(K){return Y[K]})}var A=/\/+/g;function M(H,Y){return typeof H=="object"&&H!==null&&H.key!=null?E(""+H.key):Y.toString(36)}function C(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(g,g):(H.status="pending",H.then(function(Y){H.status==="pending"&&(H.status="fulfilled",H.value=Y)},function(Y){H.status==="pending"&&(H.status="rejected",H.reason=Y)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function L(H,Y,K,q,Q){var ee=typeof H;(ee==="undefined"||ee==="boolean")&&(H=null);var U=!1;if(H===null)U=!0;else switch(ee){case"bigint":case"string":case"number":U=!0;break;case"object":switch(H.$$typeof){case W:case G:U=!0;break;case a:return U=H._init,L(U(H._payload),Y,K,q,Q)}}if(U)return Q=Q(H),U=q===""?"."+M(H,0):q,v(Q)?(K="",U!=null&&(K=U.replace(A,"$&/")+"/"),L(Q,Y,K,"",function(ne){return ne})):Q!=null&&(j(Q)&&(Q=T(Q,K+(Q.key==null||H&&H.key===Q.key?"":(""+Q.key).replace(A,"$&/")+"/")+U)),Y.push(Q)),1;U=0;var Z=q===""?".":q+":";if(v(H))for(var te=0;te<H.length;te++)q=H[te],ee=Z+M(q,te),U+=L(q,Y,K,ee,Q);else if(te=o(H),typeof te=="function")for(H=te.call(H),te=0;!(q=H.next()).done;)q=q.value,ee=Z+M(q,te++),U+=L(q,Y,K,ee,Q);else if(ee==="object"){if(typeof H.then=="function")return L(C(H),Y,K,q,Q);throw Y=String(H),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return U}function I(H,Y,K){if(H==null)return H;var q=[],Q=0;return L(H,q,"","",function(ee){return Y.call(K,ee,Q++)}),q}function O(H){if(H._status===-1){var Y=H._result;Y=Y(),Y.then(function(K){(H._status===0||H._status===-1)&&(H._status=1,H._result=K)},function(K){(H._status===0||H._status===-1)&&(H._status=2,H._result=K)}),H._status===-1&&(H._status=0,H._result=Y)}if(H._status===1)return H._result.default;throw H._result}var z=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},F={map:I,forEach:function(H,Y,K){I(H,function(){Y.apply(this,arguments)},K)},count:function(H){var Y=0;return I(H,function(){Y++}),Y},toArray:function(H){return I(H,function(Y){return Y})||[]},only:function(H){if(!j(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return De.Activity=i,De.Children=F,De.Component=d,De.Fragment=$,De.Profiler=V,De.PureComponent=y,De.StrictMode=D,De.Suspense=c,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,De.__COMPILER_RUNTIME={__proto__:null,c:function(H){return w.H.useMemoCache(H)}},De.cache=function(H){return function(){return H.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(H,Y,K){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var q=l({},H.props),Q=H.key;if(Y!=null)for(ee in Y.key!==void 0&&(Q=""+Y.key),Y)!b.call(Y,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&Y.ref===void 0||(q[ee]=Y[ee]);var ee=arguments.length-2;if(ee===1)q.children=K;else if(1<ee){for(var U=Array(ee),Z=0;Z<ee;Z++)U[Z]=arguments[Z+2];q.children=U}return S(H.type,Q,q)},De.createContext=function(H){return H={$$typeof:x,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:R,_context:H},H},De.createElement=function(H,Y,K){var q,Q={},ee=null;if(Y!=null)for(q in Y.key!==void 0&&(ee=""+Y.key),Y)b.call(Y,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(Q[q]=Y[q]);var U=arguments.length-2;if(U===1)Q.children=K;else if(1<U){for(var Z=Array(U),te=0;te<U;te++)Z[te]=arguments[te+2];Q.children=Z}if(H&&H.defaultProps)for(q in U=H.defaultProps,U)Q[q]===void 0&&(Q[q]=U[q]);return S(H,ee,Q)},De.createRef=function(){return{current:null}},De.forwardRef=function(H){return{$$typeof:p,render:H}},De.isValidElement=j,De.lazy=function(H){return{$$typeof:a,_payload:{_status:-1,_result:H},_init:O}},De.memo=function(H,Y){return{$$typeof:h,type:H,compare:Y===void 0?null:Y}},De.startTransition=function(H){var Y=w.T,K={};w.T=K;try{var q=H(),Q=w.S;Q!==null&&Q(K,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(g,z)}catch(ee){z(ee)}finally{Y!==null&&K.types!==null&&(Y.types=K.types),w.T=Y}},De.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},De.use=function(H){return w.H.use(H)},De.useActionState=function(H,Y,K){return w.H.useActionState(H,Y,K)},De.useCallback=function(H,Y){return w.H.useCallback(H,Y)},De.useContext=function(H){return w.H.useContext(H)},De.useDebugValue=function(){},De.useDeferredValue=function(H,Y){return w.H.useDeferredValue(H,Y)},De.useEffect=function(H,Y){return w.H.useEffect(H,Y)},De.useEffectEvent=function(H){return w.H.useEffectEvent(H)},De.useId=function(){return w.H.useId()},De.useImperativeHandle=function(H,Y,K){return w.H.useImperativeHandle(H,Y,K)},De.useInsertionEffect=function(H,Y){return w.H.useInsertionEffect(H,Y)},De.useLayoutEffect=function(H,Y){return w.H.useLayoutEffect(H,Y)},De.useMemo=function(H,Y){return w.H.useMemo(H,Y)},De.useOptimistic=function(H,Y){return w.H.useOptimistic(H,Y)},De.useReducer=function(H,Y,K){return w.H.useReducer(H,Y,K)},De.useRef=function(H){return w.H.useRef(H)},De.useState=function(H){return w.H.useState(H)},De.useSyncExternalStore=function(H,Y,K){return w.H.useSyncExternalStore(H,Y,K)},De.useTransition=function(){return w.H.useTransition()},De.version="19.2.3",De}var Vf;function Qn(){return Vf||(Vf=1,jc.exports=Im()),jc.exports}var _e=Qn();const Hm=hu(_e);var Ic={exports:{}},ao={},Hc={exports:{}},zc={};var Gf;function zm(){return Gf||(Gf=1,(function(W){function G(L,I){var O=L.length;L.push(I);e:for(;0<O;){var z=O-1>>>1,F=L[z];if(0<V(F,I))L[z]=I,L[O]=F,O=z;else break e}}function $(L){return L.length===0?null:L[0]}function D(L){if(L.length===0)return null;var I=L[0],O=L.pop();if(O!==I){L[0]=O;e:for(var z=0,F=L.length,H=F>>>1;z<H;){var Y=2*(z+1)-1,K=L[Y],q=Y+1,Q=L[q];if(0>V(K,O))q<F&&0>V(Q,K)?(L[z]=Q,L[q]=O,z=q):(L[z]=K,L[Y]=O,z=Y);else if(q<F&&0>V(Q,O))L[z]=Q,L[q]=O,z=q;else break e}}return I}function V(L,I){var O=L.sortIndex-I.sortIndex;return O!==0?O:L.id-I.id}if(W.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var R=performance;W.unstable_now=function(){return R.now()}}else{var x=Date,p=x.now();W.unstable_now=function(){return x.now()-p}}var c=[],h=[],a=1,i=null,r=3,o=!1,s=!1,l=!1,n=!1,d=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function _(L){for(var I=$(h);I!==null;){if(I.callback===null)D(h);else if(I.startTime<=L)D(h),I.sortIndex=I.expirationTime,G(c,I);else break;I=$(h)}}function v(L){if(l=!1,_(L),!s)if($(c)!==null)s=!0,g||(g=!0,E());else{var I=$(h);I!==null&&C(v,I.startTime-L)}}var g=!1,w=-1,b=5,S=-1;function T(){return n?!0:!(W.unstable_now()-S<b)}function j(){if(n=!1,g){var L=W.unstable_now();S=L;var I=!0;try{e:{s=!1,l&&(l=!1,f(w),w=-1),o=!0;var O=r;try{t:{for(_(L),i=$(c);i!==null&&!(i.expirationTime>L&&T());){var z=i.callback;if(typeof z=="function"){i.callback=null,r=i.priorityLevel;var F=z(i.expirationTime<=L);if(L=W.unstable_now(),typeof F=="function"){i.callback=F,_(L),I=!0;break t}i===$(c)&&D(c),_(L)}else D(c);i=$(c)}if(i!==null)I=!0;else{var H=$(h);H!==null&&C(v,H.startTime-L),I=!1}}break e}finally{i=null,r=O,o=!1}I=void 0}}finally{I?E():g=!1}}}var E;if(typeof y=="function")E=function(){y(j)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,M=A.port2;A.port1.onmessage=j,E=function(){M.postMessage(null)}}else E=function(){d(j,0)};function C(L,I){w=d(function(){L(W.unstable_now())},I)}W.unstable_IdlePriority=5,W.unstable_ImmediatePriority=1,W.unstable_LowPriority=4,W.unstable_NormalPriority=3,W.unstable_Profiling=null,W.unstable_UserBlockingPriority=2,W.unstable_cancelCallback=function(L){L.callback=null},W.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<L?Math.floor(1e3/L):5},W.unstable_getCurrentPriorityLevel=function(){return r},W.unstable_next=function(L){switch(r){case 1:case 2:case 3:var I=3;break;default:I=r}var O=r;r=I;try{return L()}finally{r=O}},W.unstable_requestPaint=function(){n=!0},W.unstable_runWithPriority=function(L,I){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var O=r;r=L;try{return I()}finally{r=O}},W.unstable_scheduleCallback=function(L,I,O){var z=W.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?z+O:z):O=z,L){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=O+F,L={id:a++,callback:I,priorityLevel:L,startTime:O,expirationTime:F,sortIndex:-1},O>z?(L.sortIndex=O,G(h,L),$(c)===null&&L===$(h)&&(l?(f(w),w=-1):l=!0,C(v,O-z))):(L.sortIndex=F,G(c,L),s||o||(s=!0,g||(g=!0,E()))),L},W.unstable_shouldYield=T,W.unstable_wrapCallback=function(L){var I=r;return function(){var O=r;r=I;try{return L.apply(this,arguments)}finally{r=O}}}})(zc)),zc}var Kf;function Fm(){return Kf||(Kf=1,Hc.exports=zm()),Hc.exports}var Fc={exports:{}},Ht={};var Yf;function Wm(){if(Yf)return Ht;Yf=1;var W=Qn();function G(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)h+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function $(){}var D={d:{f:$,r:function(){throw Error(G(522))},D:$,C:$,L:$,m:$,X:$,S:$,M:$},p:0,findDOMNode:null},V=Symbol.for("react.portal");function R(c,h,a){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:V,key:i==null?null:""+i,children:c,containerInfo:h,implementation:a}}var x=W.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ht.createPortal=function(c,h){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(G(299));return R(c,h,null,a)},Ht.flushSync=function(c){var h=x.T,a=D.p;try{if(x.T=null,D.p=2,c)return c()}finally{x.T=h,D.p=a,D.d.f()}},Ht.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,D.d.C(c,h))},Ht.prefetchDNS=function(c){typeof c=="string"&&D.d.D(c)},Ht.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var a=h.as,i=p(a,h.crossOrigin),r=typeof h.integrity=="string"?h.integrity:void 0,o=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;a==="style"?D.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:i,integrity:r,fetchPriority:o}):a==="script"&&D.d.X(c,{crossOrigin:i,integrity:r,fetchPriority:o,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ht.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var a=p(h.as,h.crossOrigin);D.d.M(c,{crossOrigin:a,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&D.d.M(c)},Ht.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var a=h.as,i=p(a,h.crossOrigin);D.d.L(c,a,{crossOrigin:i,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ht.preloadModule=function(c,h){if(typeof c=="string")if(h){var a=p(h.as,h.crossOrigin);D.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:a,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else D.d.m(c)},Ht.requestFormReset=function(c){D.d.r(c)},Ht.unstable_batchedUpdates=function(c,h){return c(h)},Ht.useFormState=function(c,h,a){return x.H.useFormState(c,h,a)},Ht.useFormStatus=function(){return x.H.useHostTransitionStatus()},Ht.version="19.2.3",Ht}var Xf;function Pm(){if(Xf)return Fc.exports;Xf=1;function W(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(W)}catch(G){console.error(G)}}return W(),Fc.exports=Wm(),Fc.exports}var Qf;function Um(){if(Qf)return ao;Qf=1;var W=Fm(),G=Qn(),$=Pm();function D(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)t+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function V(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function R(e){var t=e,u=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(u=t.return),e=t.return;while(e)}return t.tag===3?u:null}function x(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(R(e)!==e)throw Error(D(188))}function h(e){var t=e.alternate;if(!t){if(t=R(e),t===null)throw Error(D(188));return t!==e?null:e}for(var u=e,m=t;;){var k=u.return;if(k===null)break;var N=k.alternate;if(N===null){if(m=k.return,m!==null){u=m;continue}break}if(k.child===N.child){for(N=k.child;N;){if(N===u)return c(k),e;if(N===m)return c(k),t;N=N.sibling}throw Error(D(188))}if(u.return!==m.return)u=k,m=N;else{for(var P=!1,X=k.child;X;){if(X===u){P=!0,u=k,m=N;break}if(X===m){P=!0,m=k,u=N;break}X=X.sibling}if(!P){for(X=N.child;X;){if(X===u){P=!0,u=N,m=k;break}if(X===m){P=!0,m=N,u=k;break}X=X.sibling}if(!P)throw Error(D(189))}}if(u.alternate!==m)throw Error(D(190))}if(u.tag!==3)throw Error(D(188));return u.stateNode.current===u?e:t}function a(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=a(e),t!==null)return t;e=e.sibling}return null}var i=Object.assign,r=Symbol.for("react.element"),o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),y=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),T=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function E(e){return e===null||typeof e!="object"?null:(e=j&&e[j]||e["@@iterator"],typeof e=="function"?e:null)}var A=Symbol.for("react.client.reference");function M(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case d:return"Profiler";case n:return"StrictMode";case v:return"Suspense";case g:return"SuspenseList";case S:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case s:return"Portal";case y:return e.displayName||"Context";case f:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:M(e.type)||"Memo";case b:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var C=Array.isArray,L=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=$.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O={pending:!1,data:null,method:null,action:null},z=[],F=-1;function H(e){return{current:e}}function Y(e){0>F||(e.current=z[F],z[F]=null,F--)}function K(e,t){F++,z[F]=e.current,e.current=t}var q=H(null),Q=H(null),ee=H(null),U=H(null);function Z(e,t){switch(K(ee,t),K(Q,e),K(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hf(t),e=df(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(q),K(q,e)}function te(){Y(q),Y(Q),Y(ee)}function ne(e){e.memoizedState!==null&&K(U,e);var t=q.current,u=df(t,e.type);t!==u&&(K(Q,e),K(q,u))}function ve(e){Q.current===e&&(Y(q),Y(Q)),U.current===e&&(Y(U),io._currentValue=O)}var ge,xe;function Me(e){if(ge===void 0)try{throw Error()}catch(u){var t=u.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||"",xe=-1<u.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+ge+e+xe}var Re=!1;function it(e,t){if(!e||Re)return"";Re=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(t){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(he){var ue=he}Reflect.construct(e,[],pe)}else{try{pe.call()}catch(he){ue=he}e.call(pe.prototype)}}else{try{throw Error()}catch(he){ue=he}(pe=e())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(he){if(he&&ue&&typeof he.stack=="string")return[he.stack,ue.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var k=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");k&&k.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=m.DetermineComponentFrameRoot(),P=N[0],X=N[1];if(P&&X){var ie=P.split(`
4
- `),le=X.split(`
5
- `);for(k=m=0;m<ie.length&&!ie[m].includes("DetermineComponentFrameRoot");)m++;for(;k<le.length&&!le[k].includes("DetermineComponentFrameRoot");)k++;if(m===ie.length||k===le.length)for(m=ie.length-1,k=le.length-1;1<=m&&0<=k&&ie[m]!==le[k];)k--;for(;1<=m&&0<=k;m--,k--)if(ie[m]!==le[k]){if(m!==1||k!==1)do if(m--,k--,0>k||ie[m]!==le[k]){var de=`
6
- `+ie[m].replace(" at new "," at ");return e.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",e.displayName)),de}while(1<=m&&0<=k);break}}}finally{Re=!1,Error.prepareStackTrace=u}return(u=e?e.displayName||e.name:"")?Me(u):""}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me("Lazy");case 13:return e.child!==t&&t!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return it(e.type,!1);case 11:return it(e.type.render,!1);case 1:return it(e.type,!0);case 31:return Me("Activity");default:return""}}function Tt(e){try{var t="",u=null;do t+=Te(e,u),u=e,e=e.return;while(e);return t}catch(m){return`
7
- Error generating stack: `+m.message+`
8
- `+m.stack}}var Ut=Object.prototype.hasOwnProperty,fi=W.unstable_scheduleCallback,Ei=W.unstable_cancelCallback,Hi=W.unstable_shouldYield,At=W.unstable_requestPaint,lt=W.unstable_now,Bt=W.unstable_getCurrentPriorityLevel,pi=W.unstable_ImmediatePriority,Ft=W.unstable_UserBlockingPriority,bt=W.unstable_NormalPriority,Ai=W.unstable_LowPriority,ot=W.unstable_IdlePriority,ei=W.log,Ge=W.unstable_setDisableYieldValue,ti=null,Mt=null;function Wt(e){if(typeof ei=="function"&&Ge(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(ti,e)}catch{}}var ce=Math.clz32?Math.clz32:He,ye=Math.log,Ee=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(ye(e)/Ee|0)|0}var ii=256,gi=262144,Qi=4194304;function Mi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function zi(e,t,u){var m=e.pendingLanes;if(m===0)return 0;var k=0,N=e.suspendedLanes,P=e.pingedLanes;e=e.warmLanes;var X=m&134217727;return X!==0?(m=X&~N,m!==0?k=Mi(m):(P&=X,P!==0?k=Mi(P):u||(u=X&~e,u!==0&&(k=Mi(u))))):(X=m&~N,X!==0?k=Mi(X):P!==0?k=Mi(P):u||(u=m&~e,u!==0&&(k=Mi(u)))),k===0?0:t!==0&&t!==k&&(t&N)===0&&(N=k&-k,u=t&-t,N>=u||N===32&&(u&4194048)!==0)?t:k}function qi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ps(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Er(){var e=Qi;return Qi<<=1,(Qi&62914560)===0&&(Qi=4194304),e}function Zi(e){for(var t=[],u=0;31>u;u++)t.push(e);return t}function tr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $a(e,t,u,m,k,N){var P=e.pendingLanes;e.pendingLanes=u,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=u,e.entangledLanes&=u,e.errorRecoveryDisabledLanes&=u,e.shellSuspendCounter=0;var X=e.entanglements,ie=e.expirationTimes,le=e.hiddenUpdates;for(u=P&~u;0<u;){var de=31-ce(u),pe=1<<de;X[de]=0,ie[de]=-1;var ue=le[de];if(ue!==null)for(le[de]=null,de=0;de<ue.length;de++){var he=ue[de];he!==null&&(he.lane&=-536870913)}u&=~pe}m!==0&&fo(e,m,0),N!==0&&k===0&&e.tag!==0&&(e.suspendedLanes|=N&~(P&~t))}function fo(e,t,u){e.pendingLanes|=t,e.suspendedLanes&=~t;var m=31-ce(t);e.entangledLanes|=t,e.entanglements[m]=e.entanglements[m]|1073741824|u&261930}function po(e,t){var u=e.entangledLanes|=t;for(e=e.entanglements;u;){var m=31-ce(u),k=1<<m;k&t|e[m]&t&&(e[m]|=t),u&=~k}}function go(e,t){var u=t&-t;return u=(u&42)!==0?1:Ar(u),(u&(e.suspendedLanes|t))!==0?0:u}function Ar(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ir(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fi(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Nf(e.type))}function mo(e,t){var u=I.p;try{return I.p=e,t()}finally{I.p=u}}var Wi=Math.random().toString(36).slice(2),wt="__reactFiber$"+Wi,jt="__reactProps$"+Wi,vn="__reactContainer$"+Wi,ni="__reactEvents$"+Wi,Oa="__reactListeners$"+Wi,Na="__reactHandles$"+Wi,vo="__reactResources$"+Wi,nr="__reactMarker$"+Wi;function gs(e){delete e[wt],delete e[jt],delete e[ni],delete e[Oa],delete e[Na]}function Vt(e){var t=e[wt];if(t)return t;for(var u=e.parentNode;u;){if(t=u[vn]||u[wt]){if(u=t.alternate,t.child!==null||u!==null&&u.child!==null)for(e=_f(e);e!==null;){if(u=e[wt])return u;e=_f(e)}return t}e=u,u=e.parentNode}return null}function yn(e){if(e=e[wt]||e[vn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(D(33))}function _n(e){var t=e[vo];return t||(t=e[vo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[nr]=!0}var yo=new Set,sr={};function Ji(e,t){bn(e,t),bn(e+"Capture",t)}function bn(e,t){for(sr[e]=t,e=0;e<t.length;e++)yo.add(t[e])}var Pi=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),_o={},bo={};function Ba(e){return Ut.call(bo,e)?!0:Ut.call(_o,e)?!1:Pi.test(e)?bo[e]=!0:(_o[e]=!0,!1)}function Mr(e,t,u){if(Ba(t))if(u===null)e.removeAttribute(t);else{switch(typeof u){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var m=t.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+u)}}function kr(e,t,u){if(u===null)e.removeAttribute(t);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+u)}}function ki(e,t,u,m){if(m===null)e.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(u);return}e.setAttributeNS(t,u,""+m)}}function Lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function or(e,t,u){var m=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var k=m.get,N=m.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return k.call(this)},set:function(P){u=""+P,N.call(this,P)}}),Object.defineProperty(e,t,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(P){u=""+P},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tr(e){if(!e._valueTracker){var t=wo(e)?"checked":"value";e._valueTracker=or(e,t,""+e[t])}}function ms(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var u=t.getValue(),m="";return e&&(m=wo(e)?e.checked?"true":"false":e.value),e=m,e!==u?(t.setValue(e),!0):!1}function Lr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ja=/[\n"\\]/g;function Gt(e){return e.replace(ja,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vs(e,t,u,m,k,N,P,X){e.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?e.type=P:e.removeAttribute("type"),t!=null?P==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Lt(t)):e.value!==""+Lt(t)&&(e.value=""+Lt(t)):P!=="submit"&&P!=="reset"||e.removeAttribute("value"),t!=null?_s(e,P,Lt(t)):u!=null?_s(e,P,Lt(u)):m!=null&&e.removeAttribute("value"),k==null&&N!=null&&(e.defaultChecked=!!N),k!=null&&(e.checked=k&&typeof k!="function"&&typeof k!="symbol"),X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?e.name=""+Lt(X):e.removeAttribute("name")}function ys(e,t,u,m,k,N,P,X){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(e.type=N),t!=null||u!=null){if(!(N!=="submit"&&N!=="reset"||t!=null)){Tr(e);return}u=u!=null?""+Lt(u):"",t=t!=null?""+Lt(t):u,X||t===e.value||(e.value=t),e.defaultValue=t}m=m??k,m=typeof m!="function"&&typeof m!="symbol"&&!!m,e.checked=X?e.checked:!!m,e.defaultChecked=!!m,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(e.name=P),Tr(e)}function _s(e,t,u){t==="number"&&Lr(e.ownerDocument)===e||e.defaultValue===""+u||(e.defaultValue=""+u)}function wn(e,t,u,m){if(e=e.options,t){t={};for(var k=0;k<u.length;k++)t["$"+u[k]]=!0;for(u=0;u<e.length;u++)k=t.hasOwnProperty("$"+e[u].value),e[u].selected!==k&&(e[u].selected=k),k&&m&&(e[u].defaultSelected=!0)}else{for(u=""+Lt(u),t=null,k=0;k<e.length;k++){if(e[k].value===u){e[k].selected=!0,m&&(e[k].defaultSelected=!0);return}t!==null||e[k].disabled||(t=e[k])}t!==null&&(t.selected=!0)}}function bs(e,t,u){if(t!=null&&(t=""+Lt(t),t!==e.value&&(e.value=t),u==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=u!=null?""+Lt(u):""}function ar(e,t,u,m){if(t==null){if(m!=null){if(u!=null)throw Error(D(92));if(C(m)){if(1<m.length)throw Error(D(93));m=m[0]}u=m}u==null&&(u=""),t=u}u=Lt(t),e.defaultValue=u,m=e.textContent,m===u&&m!==""&&m!==null&&(e.value=m),Tr(e)}function ri(e,t){if(t){var u=e.firstChild;if(u&&u===e.lastChild&&u.nodeType===3){u.nodeValue=t;return}}e.textContent=t}var Ia=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function So(e,t,u){var m=t.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":m?e.setProperty(t,u):typeof u!="number"||u===0||Ia.has(t)?t==="float"?e.cssFloat=u:e[t]=(""+u).trim():e[t]=u+"px"}function Ti(e,t,u){if(t!=null&&typeof t!="object")throw Error(D(62));if(e=e.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||t!=null&&t.hasOwnProperty(m)||(m.indexOf("--")===0?e.setProperty(m,""):m==="float"?e.cssFloat="":e[m]="");for(var k in t)m=t[k],t.hasOwnProperty(k)&&u[k]!==m&&So(e,k,m)}else for(var N in t)t.hasOwnProperty(N)&&So(e,N,t[N])}function ws(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ha=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),za=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Rr(e){return za.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Li(){}var Ri=null;function Dr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sn=null,Di=null;function xo(e){var t=yn(e);if(t&&(e=t.stateNode)){var u=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(vs(e,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),t=u.name,u.type==="radio"&&t!=null){for(u=e;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Gt(""+t)+'"][type="radio"]'),t=0;t<u.length;t++){var m=u[t];if(m!==e&&m.form===e.form){var k=m[jt]||null;if(!k)throw Error(D(90));vs(m,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name)}}for(t=0;t<u.length;t++)m=u[t],m.form===e.form&&ms(m)}break e;case"textarea":bs(e,u.value,u.defaultValue);break e;case"select":t=u.value,t!=null&&wn(e,!!u.multiple,t,!1)}}}var lr=!1;function Co(e,t,u){if(lr)return e(t,u);lr=!0;try{var m=e(t);return m}finally{if(lr=!1,(Sn!==null||Di!==null)&&(la(),Sn&&(t=Sn,e=Di,Di=Sn=null,xo(t),e)))for(t=0;t<e.length;t++)xo(e[t])}}function xn(e,t){var u=e.stateNode;if(u===null)return null;var m=u[jt]||null;if(m===null)return null;u=m[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(e=e.type,m=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!m;break e;default:e=!1}if(e)return null;if(u&&typeof u!="function")throw Error(D(231,t,typeof u));return u}var mi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$r=!1;if(mi)try{var $i={};Object.defineProperty($i,"passive",{get:function(){$r=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{$r=!1}var Oi=null,Ss=null,Or=null;function Eo(){if(Or)return Or;var e,t=Ss,u=t.length,m,k="value"in Oi?Oi.value:Oi.textContent,N=k.length;for(e=0;e<u&&t[e]===k[e];e++);var P=u-e;for(m=1;m<=P&&t[u-m]===k[N-m];m++);return Or=k.slice(e,1<m?1-m:void 0)}function J(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function se(){return!0}function me(){return!1}function be(e){function t(u,m,k,N,P){this._reactName=u,this._targetInst=k,this.type=m,this.nativeEvent=N,this.target=P,this.currentTarget=null;for(var X in e)e.hasOwnProperty(X)&&(u=e[X],this[X]=u?u(N):N[X]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?se:me,this.isPropagationStopped=me,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=se)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=se)},persist:function(){},isPersistent:se}),t}var We={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Le=be(We),Qe=i({},We,{view:0,detail:0}),gt=be(Qe),ht,et,St,It=i({},Qe,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==St&&(St&&e.type==="mousemove"?(ht=e.screenX-St.screenX,et=e.screenY-St.screenY):et=ht=0,St=e),ht)},movementY:function(e){return"movementY"in e?e.movementY:et}}),xt=be(It),Kt=i({},It,{dataTransfer:0}),Yt=be(Kt),Ui=i({},Qe,{relatedTarget:0}),si=be(Ui),en=i({},We,{animationName:0,elapsedTime:0,pseudoElement:0}),Ao=be(en),Nr=i({},We,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Br=be(Nr),Wp=i({},We,{data:0}),pu=be(Wp),Pp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Up={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"},Vp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vp[e])?!!t[e]:!1}function Fa(){return Gp}var Kp=i({},Qe,{key:function(e){if(e.key){var t=Pp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=J(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Up[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fa,charCode:function(e){return e.type==="keypress"?J(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?J(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yp=be(Kp),Xp=i({},It,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gu=be(Xp),Qp=i({},Qe,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fa}),qp=be(Qp),Zp=i({},We,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jp=be(Zp),eg=i({},It,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),tg=be(eg),ig=i({},We,{newState:0,oldState:0}),ng=be(ig),rg=[9,13,27,32],Wa=mi&&"CompositionEvent"in window,xs=null;mi&&"documentMode"in document&&(xs=document.documentMode);var sg=mi&&"TextEvent"in window&&!xs,mu=mi&&(!Wa||xs&&8<xs&&11>=xs),vu=" ",yu=!1;function _u(e,t){switch(e){case"keyup":return rg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function og(e,t){switch(e){case"compositionend":return bu(t);case"keypress":return t.which!==32?null:(yu=!0,vu);case"textInput":return e=t.data,e===vu&&yu?null:e;default:return null}}function ag(e,t){if(jr)return e==="compositionend"||!Wa&&_u(e,t)?(e=Eo(),Or=Ss=Oi=null,jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return mu&&t.locale!=="ko"?null:t.data;default:return null}}var lg={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 wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lg[e.type]:t==="textarea"}function Su(e,t,u,m){Sn?Di?Di.push(m):Di=[m]:Sn=m,t=ga(t,"onChange"),0<t.length&&(u=new Le("onChange","change",null,u,m),e.push({event:u,listeners:t}))}var Cs=null,Es=null;function cg(e){sf(e,0)}function Mo(e){var t=rr(e);if(ms(t))return e}function xu(e,t){if(e==="change")return t}var Cu=!1;if(mi){var Pa;if(mi){var Ua="oninput"in document;if(!Ua){var Eu=document.createElement("div");Eu.setAttribute("oninput","return;"),Ua=typeof Eu.oninput=="function"}Pa=Ua}else Pa=!1;Cu=Pa&&(!document.documentMode||9<document.documentMode)}function Au(){Cs&&(Cs.detachEvent("onpropertychange",Mu),Es=Cs=null)}function Mu(e){if(e.propertyName==="value"&&Mo(Es)){var t=[];Su(t,Es,e,Dr(e)),Co(cg,t)}}function ug(e,t,u){e==="focusin"?(Au(),Cs=t,Es=u,Cs.attachEvent("onpropertychange",Mu)):e==="focusout"&&Au()}function hg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mo(Es)}function dg(e,t){if(e==="click")return Mo(t)}function fg(e,t){if(e==="input"||e==="change")return Mo(t)}function pg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oi=typeof Object.is=="function"?Object.is:pg;function As(e,t){if(oi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var u=Object.keys(e),m=Object.keys(t);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var k=u[m];if(!Ut.call(t,k)||!oi(e[k],t[k]))return!1}return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tu(e,t){var u=ku(e);e=0;for(var m;u;){if(u.nodeType===3){if(m=e+u.textContent.length,e<=t&&m>=t)return{node:u,offset:t-e};e=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ku(u)}}function Lu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ru(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lr(e.document);t instanceof e.HTMLIFrameElement;){try{var u=typeof t.contentWindow.location.href=="string"}catch{u=!1}if(u)e=t.contentWindow;else break;t=Lr(e.document)}return t}function Va(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var gg=mi&&"documentMode"in document&&11>=document.documentMode,Ir=null,Ga=null,Ms=null,Ka=!1;function Du(e,t,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ka||Ir==null||Ir!==Lr(m)||(m=Ir,"selectionStart"in m&&Va(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ms&&As(Ms,m)||(Ms=m,m=ga(Ga,"onSelect"),0<m.length&&(t=new Le("onSelect","select",null,t,u),e.push({event:t,listeners:m}),t.target=Ir)))}function cr(e,t){var u={};return u[e.toLowerCase()]=t.toLowerCase(),u["Webkit"+e]="webkit"+t,u["Moz"+e]="moz"+t,u}var Hr={animationend:cr("Animation","AnimationEnd"),animationiteration:cr("Animation","AnimationIteration"),animationstart:cr("Animation","AnimationStart"),transitionrun:cr("Transition","TransitionRun"),transitionstart:cr("Transition","TransitionStart"),transitioncancel:cr("Transition","TransitionCancel"),transitionend:cr("Transition","TransitionEnd")},Ya={},$u={};mi&&($u=document.createElement("div").style,"AnimationEvent"in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),"TransitionEvent"in window||delete Hr.transitionend.transition);function ur(e){if(Ya[e])return Ya[e];if(!Hr[e])return e;var t=Hr[e],u;for(u in t)if(t.hasOwnProperty(u)&&u in $u)return Ya[e]=t[u];return e}var Ou=ur("animationend"),Nu=ur("animationiteration"),Bu=ur("animationstart"),mg=ur("transitionrun"),vg=ur("transitionstart"),yg=ur("transitioncancel"),ju=ur("transitionend"),Iu=new Map,Xa="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Xa.push("scrollEnd");function Ni(e,t){Iu.set(e,t),Ji(t,[e])}var ko=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},vi=[],zr=0,Qa=0;function To(){for(var e=zr,t=Qa=zr=0;t<e;){var u=vi[t];vi[t++]=null;var m=vi[t];vi[t++]=null;var k=vi[t];vi[t++]=null;var N=vi[t];if(vi[t++]=null,m!==null&&k!==null){var P=m.pending;P===null?k.next=k:(k.next=P.next,P.next=k),m.pending=k}N!==0&&Hu(u,k,N)}}function Lo(e,t,u,m){vi[zr++]=e,vi[zr++]=t,vi[zr++]=u,vi[zr++]=m,Qa|=m,e.lanes|=m,e=e.alternate,e!==null&&(e.lanes|=m)}function qa(e,t,u,m){return Lo(e,t,u,m),Ro(e)}function hr(e,t){return Lo(e,null,null,t),Ro(e)}function Hu(e,t,u){e.lanes|=u;var m=e.alternate;m!==null&&(m.lanes|=u);for(var k=!1,N=e.return;N!==null;)N.childLanes|=u,m=N.alternate,m!==null&&(m.childLanes|=u),N.tag===22&&(e=N.stateNode,e===null||e._visibility&1||(k=!0)),e=N,N=N.return;return e.tag===3?(N=e.stateNode,k&&t!==null&&(k=31-ce(u),e=N.hiddenUpdates,m=e[k],m===null?e[k]=[t]:m.push(t),t.lane=u|536870912),N):null}function Ro(e){if(50<Xs)throw Xs=0,oc=null,Error(D(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fr={};function _g(e,t,u,m){this.tag=e,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,u,m){return new _g(e,t,u,m)}function Za(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tn(e,t){var u=e.alternate;return u===null?(u=ai(e.tag,t,e.key,e.mode),u.elementType=e.elementType,u.type=e.type,u.stateNode=e.stateNode,u.alternate=e,e.alternate=u):(u.pendingProps=t,u.type=e.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=e.flags&65011712,u.childLanes=e.childLanes,u.lanes=e.lanes,u.child=e.child,u.memoizedProps=e.memoizedProps,u.memoizedState=e.memoizedState,u.updateQueue=e.updateQueue,t=e.dependencies,u.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},u.sibling=e.sibling,u.index=e.index,u.ref=e.ref,u.refCleanup=e.refCleanup,u}function zu(e,t){e.flags&=65011714;var u=e.alternate;return u===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=u.childLanes,e.lanes=u.lanes,e.child=u.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=u.memoizedProps,e.memoizedState=u.memoizedState,e.updateQueue=u.updateQueue,e.type=u.type,t=u.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Do(e,t,u,m,k,N){var P=0;if(m=e,typeof e=="function")Za(e)&&(P=1);else if(typeof e=="string")P=Cm(e,u,q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case S:return e=ai(31,u,t,k),e.elementType=S,e.lanes=N,e;case l:return dr(u.children,k,N,t);case n:P=8,k|=24;break;case d:return e=ai(12,u,t,k|2),e.elementType=d,e.lanes=N,e;case v:return e=ai(13,u,t,k),e.elementType=v,e.lanes=N,e;case g:return e=ai(19,u,t,k),e.elementType=g,e.lanes=N,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y:P=10;break e;case f:P=9;break e;case _:P=11;break e;case w:P=14;break e;case b:P=16,m=null;break e}P=29,u=Error(D(130,e===null?"null":typeof e,"")),m=null}return t=ai(P,u,t,k),t.elementType=e,t.type=m,t.lanes=N,t}function dr(e,t,u,m){return e=ai(7,e,m,t),e.lanes=u,e}function Ja(e,t,u){return e=ai(6,e,null,t),e.lanes=u,e}function Fu(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function el(e,t,u){return t=ai(4,e.children!==null?e.children:[],e.key,t),t.lanes=u,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wu=new WeakMap;function yi(e,t){if(typeof e=="object"&&e!==null){var u=Wu.get(e);return u!==void 0?u:(t={value:e,source:t,stack:Tt(t)},Wu.set(e,t),t)}return{value:e,source:t,stack:Tt(t)}}var Wr=[],Pr=0,$o=null,ks=0,_i=[],bi=0,Cn=null,Vi=1,Gi="";function nn(e,t){Wr[Pr++]=ks,Wr[Pr++]=$o,$o=e,ks=t}function Pu(e,t,u){_i[bi++]=Vi,_i[bi++]=Gi,_i[bi++]=Cn,Cn=e;var m=Vi;e=Gi;var k=32-ce(m)-1;m&=~(1<<k),u+=1;var N=32-ce(t)+k;if(30<N){var P=k-k%5;N=(m&(1<<P)-1).toString(32),m>>=P,k-=P,Vi=1<<32-ce(t)+k|u<<k|m,Gi=N+e}else Vi=1<<N|u<<k|m,Gi=e}function tl(e){e.return!==null&&(nn(e,1),Pu(e,1,0))}function il(e){for(;e===$o;)$o=Wr[--Pr],Wr[Pr]=null,ks=Wr[--Pr],Wr[Pr]=null;for(;e===Cn;)Cn=_i[--bi],_i[bi]=null,Gi=_i[--bi],_i[bi]=null,Vi=_i[--bi],_i[bi]=null}function Uu(e,t){_i[bi++]=Vi,_i[bi++]=Gi,_i[bi++]=Cn,Vi=t.id,Gi=t.overflow,Cn=e}var Rt=null,nt=null,ze=!1,En=null,wi=!1,nl=Error(D(519));function An(e){var t=Error(D(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ts(yi(t,e)),nl}function Vu(e){var t=e.stateNode,u=e.type,m=e.memoizedProps;switch(t[wt]=e,t[jt]=m,u){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(u=0;u<qs.length;u++)Be(qs[u],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),ys(t,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),ar(t,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||t.textContent===""+u||m.suppressHydrationWarning===!0||cf(t.textContent,u)?(m.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),m.onScroll!=null&&Be("scroll",t),m.onScrollEnd!=null&&Be("scrollend",t),m.onClick!=null&&(t.onclick=Li),t=!0):t=!1,t||An(e,!0)}function Gu(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:wi=!1;return;case 27:case 3:wi=!0;return;default:Rt=Rt.return}}function Ur(e){if(e!==Rt)return!1;if(!ze)return Gu(e),ze=!0,!1;var t=e.tag,u;if((u=t!==3&&t!==27)&&((u=t===5)&&(u=e.type,u=!(u!=="form"&&u!=="button")||wc(e.type,e.memoizedProps)),u=!u),u&&nt&&An(e),Gu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));nt=yf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));nt=yf(e)}else t===27?(t=nt,zn(e.type)?(e=Ac,Ac=null,nt=e):nt=t):nt=Rt?xi(e.stateNode.nextSibling):null;return!0}function fr(){nt=Rt=null,ze=!1}function rl(){var e=En;return e!==null&&(Zt===null?Zt=e:Zt.push.apply(Zt,e),En=null),e}function Ts(e){En===null?En=[e]:En.push(e)}var sl=H(null),pr=null,rn=null;function Mn(e,t,u){K(sl,t._currentValue),t._currentValue=u}function sn(e){e._currentValue=sl.current,Y(sl)}function ol(e,t,u){for(;e!==null;){var m=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,m!==null&&(m.childLanes|=t)):m!==null&&(m.childLanes&t)!==t&&(m.childLanes|=t),e===u)break;e=e.return}}function al(e,t,u,m){var k=e.child;for(k!==null&&(k.return=e);k!==null;){var N=k.dependencies;if(N!==null){var P=k.child;N=N.firstContext;e:for(;N!==null;){var X=N;N=k;for(var ie=0;ie<t.length;ie++)if(X.context===t[ie]){N.lanes|=u,X=N.alternate,X!==null&&(X.lanes|=u),ol(N.return,u,e),m||(P=null);break e}N=X.next}}else if(k.tag===18){if(P=k.return,P===null)throw Error(D(341));P.lanes|=u,N=P.alternate,N!==null&&(N.lanes|=u),ol(P,u,e),P=null}else P=k.child;if(P!==null)P.return=k;else for(P=k;P!==null;){if(P===e){P=null;break}if(k=P.sibling,k!==null){k.return=P.return,P=k;break}P=P.return}k=P}}function Vr(e,t,u,m){e=null;for(var k=t,N=!1;k!==null;){if(!N){if((k.flags&524288)!==0)N=!0;else if((k.flags&262144)!==0)break}if(k.tag===10){var P=k.alternate;if(P===null)throw Error(D(387));if(P=P.memoizedProps,P!==null){var X=k.type;oi(k.pendingProps.value,P.value)||(e!==null?e.push(X):e=[X])}}else if(k===U.current){if(P=k.alternate,P===null)throw Error(D(387));P.memoizedState.memoizedState!==k.memoizedState.memoizedState&&(e!==null?e.push(io):e=[io])}k=k.return}e!==null&&al(t,e,u,m),t.flags|=262144}function Oo(e){for(e=e.firstContext;e!==null;){if(!oi(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gr(e){pr=e,rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return Ku(pr,e)}function No(e,t){return pr===null&&gr(e),Ku(e,t)}function Ku(e,t){var u=t._currentValue;if(t={context:t,memoizedValue:u,next:null},rn===null){if(e===null)throw Error(D(308));rn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else rn=rn.next=t;return u}var bg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(u,m){e.push(m)}};this.abort=function(){t.aborted=!0,e.forEach(function(u){return u()})}},wg=W.unstable_scheduleCallback,Sg=W.unstable_NormalPriority,mt={$$typeof:y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ll(){return{controller:new bg,data:new Map,refCount:0}}function Ls(e){e.refCount--,e.refCount===0&&wg(Sg,function(){e.controller.abort()})}var Rs=null,cl=0,Gr=0,Kr=null;function xg(e,t){if(Rs===null){var u=Rs=[];cl=0,Gr=dc(),Kr={status:"pending",value:void 0,then:function(m){u.push(m)}}}return cl++,t.then(Yu,Yu),t}function Yu(){if(--cl===0&&Rs!==null){Kr!==null&&(Kr.status="fulfilled");var e=Rs;Rs=null,Gr=0,Kr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Cg(e,t){var u=[],m={status:"pending",value:null,reason:null,then:function(k){u.push(k)}};return e.then(function(){m.status="fulfilled",m.value=t;for(var k=0;k<u.length;k++)(0,u[k])(t)},function(k){for(m.status="rejected",m.reason=k,k=0;k<u.length;k++)(0,u[k])(void 0)}),m}var Xu=L.S;L.S=function(e,t){Dd=lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&xg(e,t),Xu!==null&&Xu(e,t)};var mr=H(null);function ul(){var e=mr.current;return e!==null?e:tt.pooledCache}function Bo(e,t){t===null?K(mr,mr.current):K(mr,t.pool)}function Qu(){var e=ul();return e===null?null:{parent:mt._currentValue,pool:e}}var Yr=Error(D(460)),hl=Error(D(474)),jo=Error(D(542)),Io={then:function(){}};function qu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zu(e,t,u){switch(u=e[u],u===void 0?e.push(t):u!==t&&(t.then(Li,Li),t=u),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eh(e),e;default:if(typeof t.status=="string")t.then(Li,Li);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(D(482));e=t,e.status="pending",e.then(function(m){if(t.status==="pending"){var k=t;k.status="fulfilled",k.value=m}},function(m){if(t.status==="pending"){var k=t;k.status="rejected",k.reason=m}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eh(e),e}throw yr=t,Yr}}function vr(e){try{var t=e._init;return t(e._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(yr=u,Yr):u}}var yr=null;function Ju(){if(yr===null)throw Error(D(459));var e=yr;return yr=null,e}function eh(e){if(e===Yr||e===jo)throw Error(D(483))}var Xr=null,Ds=0;function Ho(e){var t=Ds;return Ds+=1,Xr===null&&(Xr=[]),Zu(Xr,e,t)}function $s(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zo(e,t){throw t.$$typeof===r?Error(D(525)):(e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function th(e){function t(oe,re){if(e){var ae=oe.deletions;ae===null?(oe.deletions=[re],oe.flags|=16):ae.push(re)}}function u(oe,re){if(!e)return null;for(;re!==null;)t(oe,re),re=re.sibling;return null}function m(oe){for(var re=new Map;oe!==null;)oe.key!==null?re.set(oe.key,oe):re.set(oe.index,oe),oe=oe.sibling;return re}function k(oe,re){return oe=tn(oe,re),oe.index=0,oe.sibling=null,oe}function N(oe,re,ae){return oe.index=ae,e?(ae=oe.alternate,ae!==null?(ae=ae.index,ae<re?(oe.flags|=67108866,re):ae):(oe.flags|=67108866,re)):(oe.flags|=1048576,re)}function P(oe){return e&&oe.alternate===null&&(oe.flags|=67108866),oe}function X(oe,re,ae,fe){return re===null||re.tag!==6?(re=Ja(ae,oe.mode,fe),re.return=oe,re):(re=k(re,ae),re.return=oe,re)}function ie(oe,re,ae,fe){var Ce=ae.type;return Ce===l?de(oe,re,ae.props.children,fe,ae.key):re!==null&&(re.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===b&&vr(Ce)===re.type)?(re=k(re,ae.props),$s(re,ae),re.return=oe,re):(re=Do(ae.type,ae.key,ae.props,null,oe.mode,fe),$s(re,ae),re.return=oe,re)}function le(oe,re,ae,fe){return re===null||re.tag!==4||re.stateNode.containerInfo!==ae.containerInfo||re.stateNode.implementation!==ae.implementation?(re=el(ae,oe.mode,fe),re.return=oe,re):(re=k(re,ae.children||[]),re.return=oe,re)}function de(oe,re,ae,fe,Ce){return re===null||re.tag!==7?(re=dr(ae,oe.mode,fe,Ce),re.return=oe,re):(re=k(re,ae),re.return=oe,re)}function pe(oe,re,ae){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Ja(""+re,oe.mode,ae),re.return=oe,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case o:return ae=Do(re.type,re.key,re.props,null,oe.mode,ae),$s(ae,re),ae.return=oe,ae;case s:return re=el(re,oe.mode,ae),re.return=oe,re;case b:return re=vr(re),pe(oe,re,ae)}if(C(re)||E(re))return re=dr(re,oe.mode,ae,null),re.return=oe,re;if(typeof re.then=="function")return pe(oe,Ho(re),ae);if(re.$$typeof===y)return pe(oe,No(oe,re),ae);zo(oe,re)}return null}function ue(oe,re,ae,fe){var Ce=re!==null?re.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Ce!==null?null:X(oe,re,""+ae,fe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case o:return ae.key===Ce?ie(oe,re,ae,fe):null;case s:return ae.key===Ce?le(oe,re,ae,fe):null;case b:return ae=vr(ae),ue(oe,re,ae,fe)}if(C(ae)||E(ae))return Ce!==null?null:de(oe,re,ae,fe,null);if(typeof ae.then=="function")return ue(oe,re,Ho(ae),fe);if(ae.$$typeof===y)return ue(oe,re,No(oe,ae),fe);zo(oe,ae)}return null}function he(oe,re,ae,fe,Ce){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return oe=oe.get(ae)||null,X(re,oe,""+fe,Ce);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case o:return oe=oe.get(fe.key===null?ae:fe.key)||null,ie(re,oe,fe,Ce);case s:return oe=oe.get(fe.key===null?ae:fe.key)||null,le(re,oe,fe,Ce);case b:return fe=vr(fe),he(oe,re,ae,fe,Ce)}if(C(fe)||E(fe))return oe=oe.get(ae)||null,de(re,oe,fe,Ce,null);if(typeof fe.then=="function")return he(oe,re,ae,Ho(fe),Ce);if(fe.$$typeof===y)return he(oe,re,ae,No(re,fe),Ce);zo(re,fe)}return null}function we(oe,re,ae,fe){for(var Ce=null,Pe=null,Se=re,Oe=re=0,Ie=null;Se!==null&&Oe<ae.length;Oe++){Se.index>Oe?(Ie=Se,Se=null):Ie=Se.sibling;var Ue=ue(oe,Se,ae[Oe],fe);if(Ue===null){Se===null&&(Se=Ie);break}e&&Se&&Ue.alternate===null&&t(oe,Se),re=N(Ue,re,Oe),Pe===null?Ce=Ue:Pe.sibling=Ue,Pe=Ue,Se=Ie}if(Oe===ae.length)return u(oe,Se),ze&&nn(oe,Oe),Ce;if(Se===null){for(;Oe<ae.length;Oe++)Se=pe(oe,ae[Oe],fe),Se!==null&&(re=N(Se,re,Oe),Pe===null?Ce=Se:Pe.sibling=Se,Pe=Se);return ze&&nn(oe,Oe),Ce}for(Se=m(Se);Oe<ae.length;Oe++)Ie=he(Se,oe,Oe,ae[Oe],fe),Ie!==null&&(e&&Ie.alternate!==null&&Se.delete(Ie.key===null?Oe:Ie.key),re=N(Ie,re,Oe),Pe===null?Ce=Ie:Pe.sibling=Ie,Pe=Ie);return e&&Se.forEach(function(Vn){return t(oe,Vn)}),ze&&nn(oe,Oe),Ce}function Ae(oe,re,ae,fe){if(ae==null)throw Error(D(151));for(var Ce=null,Pe=null,Se=re,Oe=re=0,Ie=null,Ue=ae.next();Se!==null&&!Ue.done;Oe++,Ue=ae.next()){Se.index>Oe?(Ie=Se,Se=null):Ie=Se.sibling;var Vn=ue(oe,Se,Ue.value,fe);if(Vn===null){Se===null&&(Se=Ie);break}e&&Se&&Vn.alternate===null&&t(oe,Se),re=N(Vn,re,Oe),Pe===null?Ce=Vn:Pe.sibling=Vn,Pe=Vn,Se=Ie}if(Ue.done)return u(oe,Se),ze&&nn(oe,Oe),Ce;if(Se===null){for(;!Ue.done;Oe++,Ue=ae.next())Ue=pe(oe,Ue.value,fe),Ue!==null&&(re=N(Ue,re,Oe),Pe===null?Ce=Ue:Pe.sibling=Ue,Pe=Ue);return ze&&nn(oe,Oe),Ce}for(Se=m(Se);!Ue.done;Oe++,Ue=ae.next())Ue=he(Se,oe,Oe,Ue.value,fe),Ue!==null&&(e&&Ue.alternate!==null&&Se.delete(Ue.key===null?Oe:Ue.key),re=N(Ue,re,Oe),Pe===null?Ce=Ue:Pe.sibling=Ue,Pe=Ue);return e&&Se.forEach(function(Nm){return t(oe,Nm)}),ze&&nn(oe,Oe),Ce}function Je(oe,re,ae,fe){if(typeof ae=="object"&&ae!==null&&ae.type===l&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case o:e:{for(var Ce=ae.key;re!==null;){if(re.key===Ce){if(Ce=ae.type,Ce===l){if(re.tag===7){u(oe,re.sibling),fe=k(re,ae.props.children),fe.return=oe,oe=fe;break e}}else if(re.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===b&&vr(Ce)===re.type){u(oe,re.sibling),fe=k(re,ae.props),$s(fe,ae),fe.return=oe,oe=fe;break e}u(oe,re);break}else t(oe,re);re=re.sibling}ae.type===l?(fe=dr(ae.props.children,oe.mode,fe,ae.key),fe.return=oe,oe=fe):(fe=Do(ae.type,ae.key,ae.props,null,oe.mode,fe),$s(fe,ae),fe.return=oe,oe=fe)}return P(oe);case s:e:{for(Ce=ae.key;re!==null;){if(re.key===Ce)if(re.tag===4&&re.stateNode.containerInfo===ae.containerInfo&&re.stateNode.implementation===ae.implementation){u(oe,re.sibling),fe=k(re,ae.children||[]),fe.return=oe,oe=fe;break e}else{u(oe,re);break}else t(oe,re);re=re.sibling}fe=el(ae,oe.mode,fe),fe.return=oe,oe=fe}return P(oe);case b:return ae=vr(ae),Je(oe,re,ae,fe)}if(C(ae))return we(oe,re,ae,fe);if(E(ae)){if(Ce=E(ae),typeof Ce!="function")throw Error(D(150));return ae=Ce.call(ae),Ae(oe,re,ae,fe)}if(typeof ae.then=="function")return Je(oe,re,Ho(ae),fe);if(ae.$$typeof===y)return Je(oe,re,No(oe,ae),fe);zo(oe,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,re!==null&&re.tag===6?(u(oe,re.sibling),fe=k(re,ae),fe.return=oe,oe=fe):(u(oe,re),fe=Ja(ae,oe.mode,fe),fe.return=oe,oe=fe),P(oe)):u(oe,re)}return function(oe,re,ae,fe){try{Ds=0;var Ce=Je(oe,re,ae,fe);return Xr=null,Ce}catch(Se){if(Se===Yr||Se===jo)throw Se;var Pe=ai(29,Se,null,oe.mode);return Pe.lanes=fe,Pe.return=oe,Pe}}}var _r=th(!0),ih=th(!1),kn=!1;function dl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Tn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ln(e,t,u){var m=e.updateQueue;if(m===null)return null;if(m=m.shared,(Ve&2)!==0){var k=m.pending;return k===null?t.next=t:(t.next=k.next,k.next=t),m.pending=t,t=Ro(e),Hu(e,null,u),t}return Lo(e,m,t,u),Ro(e)}function Os(e,t,u){if(t=t.updateQueue,t!==null&&(t=t.shared,(u&4194048)!==0)){var m=t.lanes;m&=e.pendingLanes,u|=m,t.lanes=u,po(e,u)}}function pl(e,t){var u=e.updateQueue,m=e.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var k=null,N=null;if(u=u.firstBaseUpdate,u!==null){do{var P={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};N===null?k=N=P:N=N.next=P,u=u.next}while(u!==null);N===null?k=N=t:N=N.next=t}else k=N=t;u={baseState:m.baseState,firstBaseUpdate:k,lastBaseUpdate:N,shared:m.shared,callbacks:m.callbacks},e.updateQueue=u;return}e=u.lastBaseUpdate,e===null?u.firstBaseUpdate=t:e.next=t,u.lastBaseUpdate=t}var gl=!1;function Ns(){if(gl){var e=Kr;if(e!==null)throw e}}function Bs(e,t,u,m){gl=!1;var k=e.updateQueue;kn=!1;var N=k.firstBaseUpdate,P=k.lastBaseUpdate,X=k.shared.pending;if(X!==null){k.shared.pending=null;var ie=X,le=ie.next;ie.next=null,P===null?N=le:P.next=le,P=ie;var de=e.alternate;de!==null&&(de=de.updateQueue,X=de.lastBaseUpdate,X!==P&&(X===null?de.firstBaseUpdate=le:X.next=le,de.lastBaseUpdate=ie))}if(N!==null){var pe=k.baseState;P=0,de=le=ie=null,X=N;do{var ue=X.lane&-536870913,he=ue!==X.lane;if(he?(je&ue)===ue:(m&ue)===ue){ue!==0&&ue===Gr&&(gl=!0),de!==null&&(de=de.next={lane:0,tag:X.tag,payload:X.payload,callback:null,next:null});e:{var we=e,Ae=X;ue=t;var Je=u;switch(Ae.tag){case 1:if(we=Ae.payload,typeof we=="function"){pe=we.call(Je,pe,ue);break e}pe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Ae.payload,ue=typeof we=="function"?we.call(Je,pe,ue):we,ue==null)break e;pe=i({},pe,ue);break e;case 2:kn=!0}}ue=X.callback,ue!==null&&(e.flags|=64,he&&(e.flags|=8192),he=k.callbacks,he===null?k.callbacks=[ue]:he.push(ue))}else he={lane:ue,tag:X.tag,payload:X.payload,callback:X.callback,next:null},de===null?(le=de=he,ie=pe):de=de.next=he,P|=ue;if(X=X.next,X===null){if(X=k.shared.pending,X===null)break;he=X,X=he.next,he.next=null,k.lastBaseUpdate=he,k.shared.pending=null}}while(!0);de===null&&(ie=pe),k.baseState=ie,k.firstBaseUpdate=le,k.lastBaseUpdate=de,N===null&&(k.shared.lanes=0),Nn|=P,e.lanes=P,e.memoizedState=pe}}function nh(e,t){if(typeof e!="function")throw Error(D(191,e));e.call(t)}function rh(e,t){var u=e.callbacks;if(u!==null)for(e.callbacks=null,e=0;e<u.length;e++)nh(u[e],t)}var Qr=H(null),Fo=H(0);function sh(e,t){e=pn,K(Fo,e),K(Qr,t),pn=e|t.baseLanes}function ml(){K(Fo,pn),K(Qr,Qr.current)}function vl(){pn=Fo.current,Y(Qr),Y(Fo)}var li=H(null),Si=null;function Rn(e){var t=e.alternate;K(dt,dt.current&1),K(li,e),Si===null&&(t===null||Qr.current!==null||t.memoizedState!==null)&&(Si=e)}function yl(e){K(dt,dt.current),K(li,e),Si===null&&(Si=e)}function oh(e){e.tag===22?(K(dt,dt.current),K(li,e),Si===null&&(Si=e)):Dn()}function Dn(){K(dt,dt.current),K(li,li.current)}function ci(e){Y(li),Si===e&&(Si=null),Y(dt)}var dt=H(0);function Wo(e){for(var t=e;t!==null;){if(t.tag===13){var u=t.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Cc(u)||Ec(u)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var on=0,$e=null,qe=null,vt=null,Po=!1,qr=!1,br=!1,Uo=0,js=0,Zr=null,Eg=0;function ct(){throw Error(D(321))}function _l(e,t){if(t===null)return!1;for(var u=0;u<t.length&&u<e.length;u++)if(!oi(e[u],t[u]))return!1;return!0}function bl(e,t,u,m,k,N){return on=N,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?Ph:Nl,br=!1,N=u(m,k),br=!1,qr&&(N=lh(t,u,m,k)),ah(e),N}function ah(e){L.H=zs;var t=qe!==null&&qe.next!==null;if(on=0,vt=qe=$e=null,Po=!1,js=0,Zr=null,t)throw Error(D(300));e===null||yt||(e=e.dependencies,e!==null&&Oo(e)&&(yt=!0))}function lh(e,t,u,m){$e=e;var k=0;do{if(qr&&(Zr=null),js=0,qr=!1,25<=k)throw Error(D(301));if(k+=1,vt=qe=null,e.updateQueue!=null){var N=e.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}L.H=Uh,N=t(u,m)}while(qr);return N}function Ag(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Is(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&($e.flags|=1024),t}function wl(){var e=Uo!==0;return Uo=0,e}function Sl(e,t,u){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u}function xl(e){if(Po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Po=!1}on=0,vt=qe=$e=null,qr=!1,js=Uo=0,Zr=null}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?$e.memoizedState=vt=e:vt=vt.next=e,vt}function ft(){if(qe===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=vt===null?$e.memoizedState:vt.next;if(t!==null)vt=t,qe=e;else{if(e===null)throw $e.alternate===null?Error(D(467)):Error(D(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},vt===null?$e.memoizedState=vt=e:vt=vt.next=e}return vt}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Is(e){var t=js;return js+=1,Zr===null&&(Zr=[]),e=Zu(Zr,e,t),t=$e,(vt===null?t.memoizedState:vt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?Ph:Nl),e}function Go(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Is(e);if(e.$$typeof===y)return Dt(e)}throw Error(D(438,String(e)))}function Cl(e){var t=null,u=$e.updateQueue;if(u!==null&&(t=u.memoCache),t==null){var m=$e.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(t={data:m.data.map(function(k){return k.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),u===null&&(u=Vo(),$e.updateQueue=u),u.memoCache=t,u=t.data[t.index],u===void 0)for(u=t.data[t.index]=Array(e),m=0;m<e;m++)u[m]=T;return t.index++,u}function an(e,t){return typeof t=="function"?t(e):t}function Ko(e){var t=ft();return El(t,qe,e)}function El(e,t,u){var m=e.queue;if(m===null)throw Error(D(311));m.lastRenderedReducer=u;var k=e.baseQueue,N=m.pending;if(N!==null){if(k!==null){var P=k.next;k.next=N.next,N.next=P}t.baseQueue=k=N,m.pending=null}if(N=e.baseState,k===null)e.memoizedState=N;else{t=k.next;var X=P=null,ie=null,le=t,de=!1;do{var pe=le.lane&-536870913;if(pe!==le.lane?(je&pe)===pe:(on&pe)===pe){var ue=le.revertLane;if(ue===0)ie!==null&&(ie=ie.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),pe===Gr&&(de=!0);else if((on&ue)===ue){le=le.next,ue===Gr&&(de=!0);continue}else pe={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},ie===null?(X=ie=pe,P=N):ie=ie.next=pe,$e.lanes|=ue,Nn|=ue;pe=le.action,br&&u(N,pe),N=le.hasEagerState?le.eagerState:u(N,pe)}else ue={lane:pe,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},ie===null?(X=ie=ue,P=N):ie=ie.next=ue,$e.lanes|=pe,Nn|=pe;le=le.next}while(le!==null&&le!==t);if(ie===null?P=N:ie.next=X,!oi(N,e.memoizedState)&&(yt=!0,de&&(u=Kr,u!==null)))throw u;e.memoizedState=N,e.baseState=P,e.baseQueue=ie,m.lastRenderedState=N}return k===null&&(m.lanes=0),[e.memoizedState,m.dispatch]}function Al(e){var t=ft(),u=t.queue;if(u===null)throw Error(D(311));u.lastRenderedReducer=e;var m=u.dispatch,k=u.pending,N=t.memoizedState;if(k!==null){u.pending=null;var P=k=k.next;do N=e(N,P.action),P=P.next;while(P!==k);oi(N,t.memoizedState)||(yt=!0),t.memoizedState=N,t.baseQueue===null&&(t.baseState=N),u.lastRenderedState=N}return[N,m]}function ch(e,t,u){var m=$e,k=ft(),N=ze;if(N){if(u===void 0)throw Error(D(407));u=u()}else u=t();var P=!oi((qe||k).memoizedState,u);if(P&&(k.memoizedState=u,yt=!0),k=k.queue,Tl(dh.bind(null,m,k,e),[e]),k.getSnapshot!==t||P||vt!==null&&vt.memoizedState.tag&1){if(m.flags|=2048,Jr(9,{destroy:void 0},hh.bind(null,m,k,u,t),null),tt===null)throw Error(D(349));N||(on&127)!==0||uh(m,t,u)}return u}function uh(e,t,u){e.flags|=16384,e={getSnapshot:t,value:u},t=$e.updateQueue,t===null?(t=Vo(),$e.updateQueue=t,t.stores=[e]):(u=t.stores,u===null?t.stores=[e]:u.push(e))}function hh(e,t,u,m){t.value=u,t.getSnapshot=m,fh(t)&&ph(e)}function dh(e,t,u){return u(function(){fh(t)&&ph(e)})}function fh(e){var t=e.getSnapshot;e=e.value;try{var u=t();return!oi(e,u)}catch{return!0}}function ph(e){var t=hr(e,2);t!==null&&Jt(t,e,2)}function Ml(e){var t=Pt();if(typeof e=="function"){var u=e;if(e=u(),br){Wt(!0);try{u()}finally{Wt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:e},t}function gh(e,t,u,m){return e.baseState=u,El(e,qe,typeof m=="function"?m:an)}function Mg(e,t,u,m,k){if(Qo(e))throw Error(D(485));if(e=t.action,e!==null){var N={payload:k,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){N.listeners.push(P)}};L.T!==null?u(!0):N.isTransition=!1,m(N),u=t.pending,u===null?(N.next=t.pending=N,mh(t,N)):(N.next=u.next,t.pending=u.next=N)}}function mh(e,t){var u=t.action,m=t.payload,k=e.state;if(t.isTransition){var N=L.T,P={};L.T=P;try{var X=u(k,m),ie=L.S;ie!==null&&ie(P,X),vh(e,t,X)}catch(le){kl(e,t,le)}finally{N!==null&&P.types!==null&&(N.types=P.types),L.T=N}}else try{N=u(k,m),vh(e,t,N)}catch(le){kl(e,t,le)}}function vh(e,t,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){yh(e,t,m)},function(m){return kl(e,t,m)}):yh(e,t,u)}function yh(e,t,u){t.status="fulfilled",t.value=u,_h(t),e.state=u,t=e.pending,t!==null&&(u=t.next,u===t?e.pending=null:(u=u.next,t.next=u,mh(e,u)))}function kl(e,t,u){var m=e.pending;if(e.pending=null,m!==null){m=m.next;do t.status="rejected",t.reason=u,_h(t),t=t.next;while(t!==m)}e.action=null}function _h(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bh(e,t){return t}function wh(e,t){if(ze){var u=tt.formState;if(u!==null){e:{var m=$e;if(ze){if(nt){t:{for(var k=nt,N=wi;k.nodeType!==8;){if(!N){k=null;break t}if(k=xi(k.nextSibling),k===null){k=null;break t}}N=k.data,k=N==="F!"||N==="F"?k:null}if(k){nt=xi(k.nextSibling),m=k.data==="F!";break e}}An(m)}m=!1}m&&(t=u[0])}}return u=Pt(),u.memoizedState=u.baseState=t,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bh,lastRenderedState:t},u.queue=m,u=zh.bind(null,$e,m),m.dispatch=u,m=Ml(!1),N=Ol.bind(null,$e,!1,m.queue),m=Pt(),k={state:t,dispatch:null,action:e,pending:null},m.queue=k,u=Mg.bind(null,$e,k,N,u),k.dispatch=u,m.memoizedState=e,[t,u,!1]}function Sh(e){var t=ft();return xh(t,qe,e)}function xh(e,t,u){if(t=El(e,t,bh)[0],e=Ko(an)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var m=Is(t)}catch(P){throw P===Yr?jo:P}else m=t;t=ft();var k=t.queue,N=k.dispatch;return u!==t.memoizedState&&($e.flags|=2048,Jr(9,{destroy:void 0},kg.bind(null,k,u),null)),[m,N,e]}function kg(e,t){e.action=t}function Ch(e){var t=ft(),u=qe;if(u!==null)return xh(t,u,e);ft(),t=t.memoizedState,u=ft();var m=u.queue.dispatch;return u.memoizedState=e,[t,m,!1]}function Jr(e,t,u,m){return e={tag:e,create:u,deps:m,inst:t,next:null},t=$e.updateQueue,t===null&&(t=Vo(),$e.updateQueue=t),u=t.lastEffect,u===null?t.lastEffect=e.next=e:(m=u.next,u.next=e,e.next=m,t.lastEffect=e),e}function Eh(){return ft().memoizedState}function Yo(e,t,u,m){var k=Pt();$e.flags|=e,k.memoizedState=Jr(1|t,{destroy:void 0},u,m===void 0?null:m)}function Xo(e,t,u,m){var k=ft();m=m===void 0?null:m;var N=k.memoizedState.inst;qe!==null&&m!==null&&_l(m,qe.memoizedState.deps)?k.memoizedState=Jr(t,N,u,m):($e.flags|=e,k.memoizedState=Jr(1|t,N,u,m))}function Ah(e,t){Yo(8390656,8,e,t)}function Tl(e,t){Xo(2048,8,e,t)}function Tg(e){$e.flags|=4;var t=$e.updateQueue;if(t===null)t=Vo(),$e.updateQueue=t,t.events=[e];else{var u=t.events;u===null?t.events=[e]:u.push(e)}}function Mh(e){var t=ft().memoizedState;return Tg({ref:t,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(D(440));return t.impl.apply(void 0,arguments)}}function kh(e,t){return Xo(4,2,e,t)}function Th(e,t){return Xo(4,4,e,t)}function Lh(e,t){if(typeof t=="function"){e=e();var u=t(e);return function(){typeof u=="function"?u():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Rh(e,t,u){u=u!=null?u.concat([e]):null,Xo(4,4,Lh.bind(null,t,e),u)}function Ll(){}function Dh(e,t){var u=ft();t=t===void 0?null:t;var m=u.memoizedState;return t!==null&&_l(t,m[1])?m[0]:(u.memoizedState=[e,t],e)}function $h(e,t){var u=ft();t=t===void 0?null:t;var m=u.memoizedState;if(t!==null&&_l(t,m[1]))return m[0];if(m=e(),br){Wt(!0);try{e()}finally{Wt(!1)}}return u.memoizedState=[m,t],m}function Rl(e,t,u){return u===void 0||(on&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=u,e=Od(),$e.lanes|=e,Nn|=e,u)}function Oh(e,t,u,m){return oi(u,t)?u:Qr.current!==null?(e=Rl(e,u,m),oi(e,t)||(yt=!0),e):(on&42)===0||(on&1073741824)!==0&&(je&261930)===0?(yt=!0,e.memoizedState=u):(e=Od(),$e.lanes|=e,Nn|=e,t)}function Nh(e,t,u,m,k){var N=I.p;I.p=N!==0&&8>N?N:8;var P=L.T,X={};L.T=X,Ol(e,!1,t,u);try{var ie=k(),le=L.S;if(le!==null&&le(X,ie),ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var de=Cg(ie,m);Hs(e,t,de,di(e))}else Hs(e,t,m,di(e))}catch(pe){Hs(e,t,{then:function(){},status:"rejected",reason:pe},di())}finally{I.p=N,P!==null&&X.types!==null&&(P.types=X.types),L.T=P}}function Lg(){}function Dl(e,t,u,m){if(e.tag!==5)throw Error(D(476));var k=Bh(e).queue;Nh(e,k,t,O,u===null?Lg:function(){return jh(e),u(m)})}function Bh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:O,baseState:O,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:O},next:null};var u={};return t.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:u},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jh(e){var t=Bh(e);t.next===null&&(t=e.alternate.memoizedState),Hs(e,t.next.queue,{},di())}function $l(){return Dt(io)}function Ih(){return ft().memoizedState}function Hh(){return ft().memoizedState}function Rg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var u=di();e=Tn(u);var m=Ln(t,e,u);m!==null&&(Jt(m,t,u),Os(m,t,u)),t={cache:ll()},e.payload=t;return}t=t.return}}function Dg(e,t,u){var m=di();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Qo(e)?Fh(t,u):(u=qa(e,t,u,m),u!==null&&(Jt(u,e,m),Wh(u,t,m)))}function zh(e,t,u){var m=di();Hs(e,t,u,m)}function Hs(e,t,u,m){var k={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Qo(e))Fh(t,k);else{var N=e.alternate;if(e.lanes===0&&(N===null||N.lanes===0)&&(N=t.lastRenderedReducer,N!==null))try{var P=t.lastRenderedState,X=N(P,u);if(k.hasEagerState=!0,k.eagerState=X,oi(X,P))return Lo(e,t,k,0),tt===null&&To(),!1}catch{}if(u=qa(e,t,k,m),u!==null)return Jt(u,e,m),Wh(u,t,m),!0}return!1}function Ol(e,t,u,m){if(m={lane:2,revertLane:dc(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Qo(e)){if(t)throw Error(D(479))}else t=qa(e,u,m,2),t!==null&&Jt(t,e,2)}function Qo(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Fh(e,t){qr=Po=!0;var u=e.pending;u===null?t.next=t:(t.next=u.next,u.next=t),e.pending=t}function Wh(e,t,u){if((u&4194048)!==0){var m=t.lanes;m&=e.pendingLanes,u|=m,t.lanes=u,po(e,u)}}var zs={readContext:Dt,use:Go,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};zs.useEffectEvent=ct;var Ph={readContext:Dt,use:Go,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Ah,useImperativeHandle:function(e,t,u){u=u!=null?u.concat([e]):null,Yo(4194308,4,Lh.bind(null,t,e),u)},useLayoutEffect:function(e,t){return Yo(4194308,4,e,t)},useInsertionEffect:function(e,t){Yo(4,2,e,t)},useMemo:function(e,t){var u=Pt();t=t===void 0?null:t;var m=e();if(br){Wt(!0);try{e()}finally{Wt(!1)}}return u.memoizedState=[m,t],m},useReducer:function(e,t,u){var m=Pt();if(u!==void 0){var k=u(t);if(br){Wt(!0);try{u(t)}finally{Wt(!1)}}}else k=t;return m.memoizedState=m.baseState=k,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:k},m.queue=e,e=e.dispatch=Dg.bind(null,$e,e),[m.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ml(e);var t=e.queue,u=zh.bind(null,$e,t);return t.dispatch=u,[e.memoizedState,u]},useDebugValue:Ll,useDeferredValue:function(e,t){var u=Pt();return Rl(u,e,t)},useTransition:function(){var e=Ml(!1);return e=Nh.bind(null,$e,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,u){var m=$e,k=Pt();if(ze){if(u===void 0)throw Error(D(407));u=u()}else{if(u=t(),tt===null)throw Error(D(349));(je&127)!==0||uh(m,t,u)}k.memoizedState=u;var N={value:u,getSnapshot:t};return k.queue=N,Ah(dh.bind(null,m,N,e),[e]),m.flags|=2048,Jr(9,{destroy:void 0},hh.bind(null,m,N,u,t),null),u},useId:function(){var e=Pt(),t=tt.identifierPrefix;if(ze){var u=Gi,m=Vi;u=(m&~(1<<32-ce(m)-1)).toString(32)+u,t="_"+t+"R_"+u,u=Uo++,0<u&&(t+="H"+u.toString(32)),t+="_"}else u=Eg++,t="_"+t+"r_"+u.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:$l,useFormState:wh,useActionState:wh,useOptimistic:function(e){var t=Pt();t.memoizedState=t.baseState=e;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=u,t=Ol.bind(null,$e,!0,u),u.dispatch=t,[e,t]},useMemoCache:Cl,useCacheRefresh:function(){return Pt().memoizedState=Rg.bind(null,$e)},useEffectEvent:function(e){var t=Pt(),u={impl:e};return t.memoizedState=u,function(){if((Ve&2)!==0)throw Error(D(440));return u.impl.apply(void 0,arguments)}}},Nl={readContext:Dt,use:Go,useCallback:Dh,useContext:Dt,useEffect:Tl,useImperativeHandle:Rh,useInsertionEffect:kh,useLayoutEffect:Th,useMemo:$h,useReducer:Ko,useRef:Eh,useState:function(){return Ko(an)},useDebugValue:Ll,useDeferredValue:function(e,t){var u=ft();return Oh(u,qe.memoizedState,e,t)},useTransition:function(){var e=Ko(an)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:Is(e),t]},useSyncExternalStore:ch,useId:Ih,useHostTransitionStatus:$l,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var u=ft();return gh(u,qe,e,t)},useMemoCache:Cl,useCacheRefresh:Hh};Nl.useEffectEvent=Mh;var Uh={readContext:Dt,use:Go,useCallback:Dh,useContext:Dt,useEffect:Tl,useImperativeHandle:Rh,useInsertionEffect:kh,useLayoutEffect:Th,useMemo:$h,useReducer:Al,useRef:Eh,useState:function(){return Al(an)},useDebugValue:Ll,useDeferredValue:function(e,t){var u=ft();return qe===null?Rl(u,e,t):Oh(u,qe.memoizedState,e,t)},useTransition:function(){var e=Al(an)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:Is(e),t]},useSyncExternalStore:ch,useId:Ih,useHostTransitionStatus:$l,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var u=ft();return qe!==null?gh(u,qe,e,t):(u.baseState=e,[e,u.queue.dispatch])},useMemoCache:Cl,useCacheRefresh:Hh};Uh.useEffectEvent=Mh;function Bl(e,t,u,m){t=e.memoizedState,u=u(m,t),u=u==null?t:i({},t,u),e.memoizedState=u,e.lanes===0&&(e.updateQueue.baseState=u)}var jl={enqueueSetState:function(e,t,u){e=e._reactInternals;var m=di(),k=Tn(m);k.payload=t,u!=null&&(k.callback=u),t=Ln(e,k,m),t!==null&&(Jt(t,e,m),Os(t,e,m))},enqueueReplaceState:function(e,t,u){e=e._reactInternals;var m=di(),k=Tn(m);k.tag=1,k.payload=t,u!=null&&(k.callback=u),t=Ln(e,k,m),t!==null&&(Jt(t,e,m),Os(t,e,m))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var u=di(),m=Tn(u);m.tag=2,t!=null&&(m.callback=t),t=Ln(e,m,u),t!==null&&(Jt(t,e,u),Os(t,e,u))}};function Vh(e,t,u,m,k,N,P){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(m,N,P):t.prototype&&t.prototype.isPureReactComponent?!As(u,m)||!As(k,N):!0}function Gh(e,t,u,m){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(u,m),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(u,m),t.state!==e&&jl.enqueueReplaceState(t,t.state,null)}function wr(e,t){var u=t;if("ref"in t){u={};for(var m in t)m!=="ref"&&(u[m]=t[m])}if(e=e.defaultProps){u===t&&(u=i({},u));for(var k in e)u[k]===void 0&&(u[k]=e[k])}return u}function Kh(e){ko(e)}function Yh(e){console.error(e)}function Xh(e){ko(e)}function qo(e,t){try{var u=e.onUncaughtError;u(t.value,{componentStack:t.stack})}catch(m){setTimeout(function(){throw m})}}function Qh(e,t,u){try{var m=e.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function Il(e,t,u){return u=Tn(u),u.tag=3,u.payload={element:null},u.callback=function(){qo(e,t)},u}function qh(e){return e=Tn(e),e.tag=3,e}function Zh(e,t,u,m){var k=u.type.getDerivedStateFromError;if(typeof k=="function"){var N=m.value;e.payload=function(){return k(N)},e.callback=function(){Qh(t,u,m)}}var P=u.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(e.callback=function(){Qh(t,u,m),typeof k!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var X=m.stack;this.componentDidCatch(m.value,{componentStack:X!==null?X:""})})}function $g(e,t,u,m,k){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(t=u.alternate,t!==null&&Vr(t,u,k,!0),u=li.current,u!==null){switch(u.tag){case 31:case 13:return Si===null?ca():u.alternate===null&&ut===0&&(ut=3),u.flags&=-257,u.flags|=65536,u.lanes=k,m===Io?u.flags|=16384:(t=u.updateQueue,t===null?u.updateQueue=new Set([m]):t.add(m),cc(e,m,k)),!1;case 22:return u.flags|=65536,m===Io?u.flags|=16384:(t=u.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=t):(u=t.retryQueue,u===null?t.retryQueue=new Set([m]):u.add(m)),cc(e,m,k)),!1}throw Error(D(435,u.tag))}return cc(e,m,k),ca(),!1}if(ze)return t=li.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=k,m!==nl&&(e=Error(D(422),{cause:m}),Ts(yi(e,u)))):(m!==nl&&(t=Error(D(423),{cause:m}),Ts(yi(t,u))),e=e.current.alternate,e.flags|=65536,k&=-k,e.lanes|=k,m=yi(m,u),k=Il(e.stateNode,m,k),pl(e,k),ut!==4&&(ut=2)),!1;var N=Error(D(520),{cause:m});if(N=yi(N,u),Ys===null?Ys=[N]:Ys.push(N),ut!==4&&(ut=2),t===null)return!0;m=yi(m,u),u=t;do{switch(u.tag){case 3:return u.flags|=65536,e=k&-k,u.lanes|=e,e=Il(u.stateNode,m,e),pl(u,e),!1;case 1:if(t=u.type,N=u.stateNode,(u.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Bn===null||!Bn.has(N))))return u.flags|=65536,k&=-k,u.lanes|=k,k=qh(k),Zh(k,e,u,m),pl(u,k),!1}u=u.return}while(u!==null);return!1}var Hl=Error(D(461)),yt=!1;function $t(e,t,u,m){t.child=e===null?ih(t,null,u,m):_r(t,e.child,u,m)}function Jh(e,t,u,m,k){u=u.render;var N=t.ref;if("ref"in m){var P={};for(var X in m)X!=="ref"&&(P[X]=m[X])}else P=m;return gr(t),m=bl(e,t,u,P,N,k),X=wl(),e!==null&&!yt?(Sl(e,t,k),ln(e,t,k)):(ze&&X&&tl(t),t.flags|=1,$t(e,t,m,k),t.child)}function ed(e,t,u,m,k){if(e===null){var N=u.type;return typeof N=="function"&&!Za(N)&&N.defaultProps===void 0&&u.compare===null?(t.tag=15,t.type=N,td(e,t,N,m,k)):(e=Do(u.type,null,m,t,t.mode,k),e.ref=t.ref,e.return=t,t.child=e)}if(N=e.child,!Kl(e,k)){var P=N.memoizedProps;if(u=u.compare,u=u!==null?u:As,u(P,m)&&e.ref===t.ref)return ln(e,t,k)}return t.flags|=1,e=tn(N,m),e.ref=t.ref,e.return=t,t.child=e}function td(e,t,u,m,k){if(e!==null){var N=e.memoizedProps;if(As(N,m)&&e.ref===t.ref)if(yt=!1,t.pendingProps=m=N,Kl(e,k))(e.flags&131072)!==0&&(yt=!0);else return t.lanes=e.lanes,ln(e,t,k)}return zl(e,t,u,m,k)}function id(e,t,u,m){var k=m.children,N=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((t.flags&128)!==0){if(N=N!==null?N.baseLanes|u:u,e!==null){for(m=t.child=e.child,k=0;m!==null;)k=k|m.lanes|m.childLanes,m=m.sibling;m=k&~N}else m=0,t.child=null;return nd(e,t,N,u,m)}if((u&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bo(t,N!==null?N.cachePool:null),N!==null?sh(t,N):ml(),oh(t);else return m=t.lanes=536870912,nd(e,t,N!==null?N.baseLanes|u:u,u,m)}else N!==null?(Bo(t,N.cachePool),sh(t,N),Dn(),t.memoizedState=null):(e!==null&&Bo(t,null),ml(),Dn());return $t(e,t,k,u),t.child}function Fs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nd(e,t,u,m,k){var N=ul();return N=N===null?null:{parent:mt._currentValue,pool:N},t.memoizedState={baseLanes:u,cachePool:N},e!==null&&Bo(t,null),ml(),oh(t),e!==null&&Vr(e,t,m,!0),t.childLanes=k,null}function Zo(e,t){return t=ea({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rd(e,t,u){return _r(t,e.child,null,u),e=Zo(t,t.pendingProps),e.flags|=2,ci(t),t.memoizedState=null,e}function Og(e,t,u){var m=t.pendingProps,k=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(m.mode==="hidden")return e=Zo(t,m),t.lanes=536870912,Fs(null,e);if(yl(t),(e=nt)?(e=vf(e,wi),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cn!==null?{id:Vi,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},u=Fu(e),u.return=t,t.child=u,Rt=t,nt=null)):e=null,e===null)throw An(t);return t.lanes=536870912,null}return Zo(t,m)}var N=e.memoizedState;if(N!==null){var P=N.dehydrated;if(yl(t),k)if(t.flags&256)t.flags&=-257,t=rd(e,t,u);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(D(558));else if(yt||Vr(e,t,u,!1),k=(u&e.childLanes)!==0,yt||k){if(m=tt,m!==null&&(P=go(m,u),P!==0&&P!==N.retryLane))throw N.retryLane=P,hr(e,P),Jt(m,e,P),Hl;ca(),t=rd(e,t,u)}else e=N.treeContext,nt=xi(P.nextSibling),Rt=t,ze=!0,En=null,wi=!1,e!==null&&Uu(t,e),t=Zo(t,m),t.flags|=4096;return t}return e=tn(e.child,{mode:m.mode,children:m.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jo(e,t){var u=t.ref;if(u===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(D(284));(e===null||e.ref!==u)&&(t.flags|=4194816)}}function zl(e,t,u,m,k){return gr(t),u=bl(e,t,u,m,void 0,k),m=wl(),e!==null&&!yt?(Sl(e,t,k),ln(e,t,k)):(ze&&m&&tl(t),t.flags|=1,$t(e,t,u,k),t.child)}function sd(e,t,u,m,k,N){return gr(t),t.updateQueue=null,u=lh(t,m,u,k),ah(e),m=wl(),e!==null&&!yt?(Sl(e,t,N),ln(e,t,N)):(ze&&m&&tl(t),t.flags|=1,$t(e,t,u,N),t.child)}function od(e,t,u,m,k){if(gr(t),t.stateNode===null){var N=Fr,P=u.contextType;typeof P=="object"&&P!==null&&(N=Dt(P)),N=new u(m,N),t.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=jl,t.stateNode=N,N._reactInternals=t,N=t.stateNode,N.props=m,N.state=t.memoizedState,N.refs={},dl(t),P=u.contextType,N.context=typeof P=="object"&&P!==null?Dt(P):Fr,N.state=t.memoizedState,P=u.getDerivedStateFromProps,typeof P=="function"&&(Bl(t,u,P,m),N.state=t.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(P=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),P!==N.state&&jl.enqueueReplaceState(N,N.state,null),Bs(t,m,N,k),Ns(),N.state=t.memoizedState),typeof N.componentDidMount=="function"&&(t.flags|=4194308),m=!0}else if(e===null){N=t.stateNode;var X=t.memoizedProps,ie=wr(u,X);N.props=ie;var le=N.context,de=u.contextType;P=Fr,typeof de=="object"&&de!==null&&(P=Dt(de));var pe=u.getDerivedStateFromProps;de=typeof pe=="function"||typeof N.getSnapshotBeforeUpdate=="function",X=t.pendingProps!==X,de||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(X||le!==P)&&Gh(t,N,m,P),kn=!1;var ue=t.memoizedState;N.state=ue,Bs(t,m,N,k),Ns(),le=t.memoizedState,X||ue!==le||kn?(typeof pe=="function"&&(Bl(t,u,pe,m),le=t.memoizedState),(ie=kn||Vh(t,u,ie,m,ue,le,P))?(de||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(t.flags|=4194308)):(typeof N.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=m,t.memoizedState=le),N.props=m,N.state=le,N.context=P,m=ie):(typeof N.componentDidMount=="function"&&(t.flags|=4194308),m=!1)}else{N=t.stateNode,fl(e,t),P=t.memoizedProps,de=wr(u,P),N.props=de,pe=t.pendingProps,ue=N.context,le=u.contextType,ie=Fr,typeof le=="object"&&le!==null&&(ie=Dt(le)),X=u.getDerivedStateFromProps,(le=typeof X=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(P!==pe||ue!==ie)&&Gh(t,N,m,ie),kn=!1,ue=t.memoizedState,N.state=ue,Bs(t,m,N,k),Ns();var he=t.memoizedState;P!==pe||ue!==he||kn||e!==null&&e.dependencies!==null&&Oo(e.dependencies)?(typeof X=="function"&&(Bl(t,u,X,m),he=t.memoizedState),(de=kn||Vh(t,u,de,m,ue,he,ie)||e!==null&&e.dependencies!==null&&Oo(e.dependencies))?(le||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(m,he,ie),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(m,he,ie)),typeof N.componentDidUpdate=="function"&&(t.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof N.componentDidUpdate!="function"||P===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),t.memoizedProps=m,t.memoizedState=he),N.props=m,N.state=he,N.context=ie,m=de):(typeof N.componentDidUpdate!="function"||P===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),m=!1)}return N=m,Jo(e,t),m=(t.flags&128)!==0,N||m?(N=t.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:N.render(),t.flags|=1,e!==null&&m?(t.child=_r(t,e.child,null,k),t.child=_r(t,null,u,k)):$t(e,t,u,k),t.memoizedState=N.state,e=t.child):e=ln(e,t,k),e}function ad(e,t,u,m){return fr(),t.flags|=256,$t(e,t,u,m),t.child}var Fl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wl(e){return{baseLanes:e,cachePool:Qu()}}function Pl(e,t,u){return e=e!==null?e.childLanes&~u:0,t&&(e|=hi),e}function ld(e,t,u){var m=t.pendingProps,k=!1,N=(t.flags&128)!==0,P;if((P=N)||(P=e!==null&&e.memoizedState===null?!1:(dt.current&2)!==0),P&&(k=!0,t.flags&=-129),P=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(k?Rn(t):Dn(),(e=nt)?(e=vf(e,wi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cn!==null?{id:Vi,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},u=Fu(e),u.return=t,t.child=u,Rt=t,nt=null)):e=null,e===null)throw An(t);return Ec(e)?t.lanes=32:t.lanes=536870912,null}var X=m.children;return m=m.fallback,k?(Dn(),k=t.mode,X=ea({mode:"hidden",children:X},k),m=dr(m,k,u,null),X.return=t,m.return=t,X.sibling=m,t.child=X,m=t.child,m.memoizedState=Wl(u),m.childLanes=Pl(e,P,u),t.memoizedState=Fl,Fs(null,m)):(Rn(t),Ul(t,X))}var ie=e.memoizedState;if(ie!==null&&(X=ie.dehydrated,X!==null)){if(N)t.flags&256?(Rn(t),t.flags&=-257,t=Vl(e,t,u)):t.memoizedState!==null?(Dn(),t.child=e.child,t.flags|=128,t=null):(Dn(),X=m.fallback,k=t.mode,m=ea({mode:"visible",children:m.children},k),X=dr(X,k,u,null),X.flags|=2,m.return=t,X.return=t,m.sibling=X,t.child=m,_r(t,e.child,null,u),m=t.child,m.memoizedState=Wl(u),m.childLanes=Pl(e,P,u),t.memoizedState=Fl,t=Fs(null,m));else if(Rn(t),Ec(X)){if(P=X.nextSibling&&X.nextSibling.dataset,P)var le=P.dgst;P=le,m=Error(D(419)),m.stack="",m.digest=P,Ts({value:m,source:null,stack:null}),t=Vl(e,t,u)}else if(yt||Vr(e,t,u,!1),P=(u&e.childLanes)!==0,yt||P){if(P=tt,P!==null&&(m=go(P,u),m!==0&&m!==ie.retryLane))throw ie.retryLane=m,hr(e,m),Jt(P,e,m),Hl;Cc(X)||ca(),t=Vl(e,t,u)}else Cc(X)?(t.flags|=192,t.child=e.child,t=null):(e=ie.treeContext,nt=xi(X.nextSibling),Rt=t,ze=!0,En=null,wi=!1,e!==null&&Uu(t,e),t=Ul(t,m.children),t.flags|=4096);return t}return k?(Dn(),X=m.fallback,k=t.mode,ie=e.child,le=ie.sibling,m=tn(ie,{mode:"hidden",children:m.children}),m.subtreeFlags=ie.subtreeFlags&65011712,le!==null?X=tn(le,X):(X=dr(X,k,u,null),X.flags|=2),X.return=t,m.return=t,m.sibling=X,t.child=m,Fs(null,m),m=t.child,X=e.child.memoizedState,X===null?X=Wl(u):(k=X.cachePool,k!==null?(ie=mt._currentValue,k=k.parent!==ie?{parent:ie,pool:ie}:k):k=Qu(),X={baseLanes:X.baseLanes|u,cachePool:k}),m.memoizedState=X,m.childLanes=Pl(e,P,u),t.memoizedState=Fl,Fs(e.child,m)):(Rn(t),u=e.child,e=u.sibling,u=tn(u,{mode:"visible",children:m.children}),u.return=t,u.sibling=null,e!==null&&(P=t.deletions,P===null?(t.deletions=[e],t.flags|=16):P.push(e)),t.child=u,t.memoizedState=null,u)}function Ul(e,t){return t=ea({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ea(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Vl(e,t,u){return _r(t,e.child,null,u),e=Ul(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cd(e,t,u){e.lanes|=t;var m=e.alternate;m!==null&&(m.lanes|=t),ol(e.return,t,u)}function Gl(e,t,u,m,k,N){var P=e.memoizedState;P===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:k,treeForkCount:N}:(P.isBackwards=t,P.rendering=null,P.renderingStartTime=0,P.last=m,P.tail=u,P.tailMode=k,P.treeForkCount=N)}function ud(e,t,u){var m=t.pendingProps,k=m.revealOrder,N=m.tail;m=m.children;var P=dt.current,X=(P&2)!==0;if(X?(P=P&1|2,t.flags|=128):P&=1,K(dt,P),$t(e,t,m,u),m=ze?ks:0,!X&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cd(e,u,t);else if(e.tag===19)cd(e,u,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(k){case"forwards":for(u=t.child,k=null;u!==null;)e=u.alternate,e!==null&&Wo(e)===null&&(k=u),u=u.sibling;u=k,u===null?(k=t.child,t.child=null):(k=u.sibling,u.sibling=null),Gl(t,!1,k,u,N,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,k=t.child,t.child=null;k!==null;){if(e=k.alternate,e!==null&&Wo(e)===null){t.child=k;break}e=k.sibling,k.sibling=u,u=k,k=e}Gl(t,!0,u,null,N,m);break;case"together":Gl(t,!1,null,null,void 0,m);break;default:t.memoizedState=null}return t.child}function ln(e,t,u){if(e!==null&&(t.dependencies=e.dependencies),Nn|=t.lanes,(u&t.childLanes)===0)if(e!==null){if(Vr(e,t,u,!1),(u&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,u=tn(e,e.pendingProps),t.child=u,u.return=t;e.sibling!==null;)e=e.sibling,u=u.sibling=tn(e,e.pendingProps),u.return=t;u.sibling=null}return t.child}function Kl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Oo(e)))}function Ng(e,t,u){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),Mn(t,mt,e.memoizedState.cache),fr();break;case 27:case 5:ne(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:Mn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yl(t),null;break;case 13:var m=t.memoizedState;if(m!==null)return m.dehydrated!==null?(Rn(t),t.flags|=128,null):(u&t.child.childLanes)!==0?ld(e,t,u):(Rn(t),e=ln(e,t,u),e!==null?e.sibling:null);Rn(t);break;case 19:var k=(e.flags&128)!==0;if(m=(u&t.childLanes)!==0,m||(Vr(e,t,u,!1),m=(u&t.childLanes)!==0),k){if(m)return ud(e,t,u);t.flags|=128}if(k=t.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),K(dt,dt.current),m)break;return null;case 22:return t.lanes=0,id(e,t,u,t.pendingProps);case 24:Mn(t,mt,e.memoizedState.cache)}return ln(e,t,u)}function hd(e,t,u){if(e!==null)if(e.memoizedProps!==t.pendingProps)yt=!0;else{if(!Kl(e,u)&&(t.flags&128)===0)return yt=!1,Ng(e,t,u);yt=(e.flags&131072)!==0}else yt=!1,ze&&(t.flags&1048576)!==0&&Pu(t,ks,t.index);switch(t.lanes=0,t.tag){case 16:e:{var m=t.pendingProps;if(e=vr(t.elementType),t.type=e,typeof e=="function")Za(e)?(m=wr(e,m),t.tag=1,t=od(null,t,e,m,u)):(t.tag=0,t=zl(null,t,e,m,u));else{if(e!=null){var k=e.$$typeof;if(k===_){t.tag=11,t=Jh(null,t,e,m,u);break e}else if(k===w){t.tag=14,t=ed(null,t,e,m,u);break e}}throw t=M(e)||e,Error(D(306,t,""))}}return t;case 0:return zl(e,t,t.type,t.pendingProps,u);case 1:return m=t.type,k=wr(m,t.pendingProps),od(e,t,m,k,u);case 3:e:{if(Z(t,t.stateNode.containerInfo),e===null)throw Error(D(387));m=t.pendingProps;var N=t.memoizedState;k=N.element,fl(e,t),Bs(t,m,null,u);var P=t.memoizedState;if(m=P.cache,Mn(t,mt,m),m!==N.cache&&al(t,[mt],u,!0),Ns(),m=P.element,N.isDehydrated)if(N={element:m,isDehydrated:!1,cache:P.cache},t.updateQueue.baseState=N,t.memoizedState=N,t.flags&256){t=ad(e,t,m,u);break e}else if(m!==k){k=yi(Error(D(424)),t),Ts(k),t=ad(e,t,m,u);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,nt=xi(e.firstChild),Rt=t,ze=!0,En=null,wi=!0,u=ih(t,null,m,u),t.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(fr(),m===k){t=ln(e,t,u);break e}$t(e,t,m,u)}t=t.child}return t;case 26:return Jo(e,t),e===null?(u=xf(t.type,null,t.pendingProps,null))?t.memoizedState=u:ze||(u=t.type,e=t.pendingProps,m=ma(ee.current).createElement(u),m[wt]=t,m[jt]=e,Ot(m,u,e),pt(m),t.stateNode=m):t.memoizedState=xf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ne(t),e===null&&ze&&(m=t.stateNode=bf(t.type,t.pendingProps,ee.current),Rt=t,wi=!0,k=nt,zn(t.type)?(Ac=k,nt=xi(m.firstChild)):nt=k),$t(e,t,t.pendingProps.children,u),Jo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((k=m=nt)&&(m=hm(m,t.type,t.pendingProps,wi),m!==null?(t.stateNode=m,Rt=t,nt=xi(m.firstChild),wi=!1,k=!0):k=!1),k||An(t)),ne(t),k=t.type,N=t.pendingProps,P=e!==null?e.memoizedProps:null,m=N.children,wc(k,N)?m=null:P!==null&&wc(k,P)&&(t.flags|=32),t.memoizedState!==null&&(k=bl(e,t,Ag,null,null,u),io._currentValue=k),Jo(e,t),$t(e,t,m,u),t.child;case 6:return e===null&&ze&&((e=u=nt)&&(u=dm(u,t.pendingProps,wi),u!==null?(t.stateNode=u,Rt=t,nt=null,e=!0):e=!1),e||An(t)),null;case 13:return ld(e,t,u);case 4:return Z(t,t.stateNode.containerInfo),m=t.pendingProps,e===null?t.child=_r(t,null,m,u):$t(e,t,m,u),t.child;case 11:return Jh(e,t,t.type,t.pendingProps,u);case 7:return $t(e,t,t.pendingProps,u),t.child;case 8:return $t(e,t,t.pendingProps.children,u),t.child;case 12:return $t(e,t,t.pendingProps.children,u),t.child;case 10:return m=t.pendingProps,Mn(t,t.type,m.value),$t(e,t,m.children,u),t.child;case 9:return k=t.type._context,m=t.pendingProps.children,gr(t),k=Dt(k),m=m(k),t.flags|=1,$t(e,t,m,u),t.child;case 14:return ed(e,t,t.type,t.pendingProps,u);case 15:return td(e,t,t.type,t.pendingProps,u);case 19:return ud(e,t,u);case 31:return Og(e,t,u);case 22:return id(e,t,u,t.pendingProps);case 24:return gr(t),m=Dt(mt),e===null?(k=ul(),k===null&&(k=tt,N=ll(),k.pooledCache=N,N.refCount++,N!==null&&(k.pooledCacheLanes|=u),k=N),t.memoizedState={parent:m,cache:k},dl(t),Mn(t,mt,k)):((e.lanes&u)!==0&&(fl(e,t),Bs(t,null,null,u),Ns()),k=e.memoizedState,N=t.memoizedState,k.parent!==m?(k={parent:m,cache:m},t.memoizedState=k,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=k),Mn(t,mt,m)):(m=N.cache,Mn(t,mt,m),m!==k.cache&&al(t,[mt],u,!0))),$t(e,t,t.pendingProps.children,u),t.child;case 29:throw t.pendingProps}throw Error(D(156,t.tag))}function cn(e){e.flags|=4}function Yl(e,t,u,m,k){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(k&335544128)===k)if(e.stateNode.complete)e.flags|=8192;else if(Id())e.flags|=8192;else throw yr=Io,hl}else e.flags&=-16777217}function dd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!kf(t))if(Id())e.flags|=8192;else throw yr=Io,hl}function ta(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Er():536870912,e.lanes|=t,ns|=t)}function Ws(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var u=null;t!==null;)t.alternate!==null&&(u=t),t=t.sibling;u===null?e.tail=null:u.sibling=null;break;case"collapsed":u=e.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:m.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,u=0,m=0;if(t)for(var k=e.child;k!==null;)u|=k.lanes|k.childLanes,m|=k.subtreeFlags&65011712,m|=k.flags&65011712,k.return=e,k=k.sibling;else for(k=e.child;k!==null;)u|=k.lanes|k.childLanes,m|=k.subtreeFlags,m|=k.flags,k.return=e,k=k.sibling;return e.subtreeFlags|=m,e.childLanes=u,t}function Bg(e,t,u){var m=t.pendingProps;switch(il(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return u=t.stateNode,m=null,e!==null&&(m=e.memoizedState.cache),t.memoizedState.cache!==m&&(t.flags|=2048),sn(mt),te(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(e===null||e.child===null)&&(Ur(t)?cn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rl())),rt(t),null;case 26:var k=t.type,N=t.memoizedState;return e===null?(cn(t),N!==null?(rt(t),dd(t,N)):(rt(t),Yl(t,k,null,m,u))):N?N!==e.memoizedState?(cn(t),rt(t),dd(t,N)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==m&&cn(t),rt(t),Yl(t,k,e,m,u)),null;case 27:if(ve(t),u=ee.current,k=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==m&&cn(t);else{if(!m){if(t.stateNode===null)throw Error(D(166));return rt(t),null}e=q.current,Ur(t)?Vu(t):(e=bf(k,m,u),t.stateNode=e,cn(t))}return rt(t),null;case 5:if(ve(t),k=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==m&&cn(t);else{if(!m){if(t.stateNode===null)throw Error(D(166));return rt(t),null}if(N=q.current,Ur(t))Vu(t);else{var P=ma(ee.current);switch(N){case 1:N=P.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:N=P.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":N=P.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":N=P.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":N=P.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof m.is=="string"?P.createElement("select",{is:m.is}):P.createElement("select"),m.multiple?N.multiple=!0:m.size&&(N.size=m.size);break;default:N=typeof m.is=="string"?P.createElement(k,{is:m.is}):P.createElement(k)}}N[wt]=t,N[jt]=m;e:for(P=t.child;P!==null;){if(P.tag===5||P.tag===6)N.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===t)break e;for(;P.sibling===null;){if(P.return===null||P.return===t)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}t.stateNode=N;e:switch(Ot(N,k,m),k){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&cn(t)}}return rt(t),Yl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,u),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==m&&cn(t);else{if(typeof m!="string"&&t.stateNode===null)throw Error(D(166));if(e=ee.current,Ur(t)){if(e=t.stateNode,u=t.memoizedProps,m=null,k=Rt,k!==null)switch(k.tag){case 27:case 5:m=k.memoizedProps}e[wt]=t,e=!!(e.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||cf(e.nodeValue,u)),e||An(t,!0)}else e=ma(e).createTextNode(m),e[wt]=t,t.stateNode=e}return rt(t),null;case 31:if(u=t.memoizedState,e===null||e.memoizedState!==null){if(m=Ur(t),u!==null){if(e===null){if(!m)throw Error(D(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(557));e[wt]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else u=rl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),e=!0;if(!e)return t.flags&256?(ci(t),t):(ci(t),null);if((t.flags&128)!==0)throw Error(D(558))}return rt(t),null;case 13:if(m=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(k=Ur(t),m!==null&&m.dehydrated!==null){if(e===null){if(!k)throw Error(D(318));if(k=t.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(D(317));k[wt]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),k=!1}else k=rl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=k),k=!0;if(!k)return t.flags&256?(ci(t),t):(ci(t),null)}return ci(t),(t.flags&128)!==0?(t.lanes=u,t):(u=m!==null,e=e!==null&&e.memoizedState!==null,u&&(m=t.child,k=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(k=m.alternate.memoizedState.cachePool.pool),N=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(N=m.memoizedState.cachePool.pool),N!==k&&(m.flags|=2048)),u!==e&&u&&(t.child.flags|=8192),ta(t,t.updateQueue),rt(t),null);case 4:return te(),e===null&&mc(t.stateNode.containerInfo),rt(t),null;case 10:return sn(t.type),rt(t),null;case 19:if(Y(dt),m=t.memoizedState,m===null)return rt(t),null;if(k=(t.flags&128)!==0,N=m.rendering,N===null)if(k)Ws(m,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(N=Wo(e),N!==null){for(t.flags|=128,Ws(m,!1),e=N.updateQueue,t.updateQueue=e,ta(t,e),t.subtreeFlags=0,e=u,u=t.child;u!==null;)zu(u,e),u=u.sibling;return K(dt,dt.current&1|2),ze&&nn(t,m.treeForkCount),t.child}e=e.sibling}m.tail!==null&&lt()>oa&&(t.flags|=128,k=!0,Ws(m,!1),t.lanes=4194304)}else{if(!k)if(e=Wo(N),e!==null){if(t.flags|=128,k=!0,e=e.updateQueue,t.updateQueue=e,ta(t,e),Ws(m,!0),m.tail===null&&m.tailMode==="hidden"&&!N.alternate&&!ze)return rt(t),null}else 2*lt()-m.renderingStartTime>oa&&u!==536870912&&(t.flags|=128,k=!0,Ws(m,!1),t.lanes=4194304);m.isBackwards?(N.sibling=t.child,t.child=N):(e=m.last,e!==null?e.sibling=N:t.child=N,m.last=N)}return m.tail!==null?(e=m.tail,m.rendering=e,m.tail=e.sibling,m.renderingStartTime=lt(),e.sibling=null,u=dt.current,K(dt,k?u&1|2:u&1),ze&&nn(t,m.treeForkCount),e):(rt(t),null);case 22:case 23:return ci(t),vl(),m=t.memoizedState!==null,e!==null?e.memoizedState!==null!==m&&(t.flags|=8192):m&&(t.flags|=8192),m?(u&536870912)!==0&&(t.flags&128)===0&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),u=t.updateQueue,u!==null&&ta(t,u.retryQueue),u=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(u=e.memoizedState.cachePool.pool),m=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(m=t.memoizedState.cachePool.pool),m!==u&&(t.flags|=2048),e!==null&&Y(mr),null;case 24:return u=null,e!==null&&(u=e.memoizedState.cache),t.memoizedState.cache!==u&&(t.flags|=2048),sn(mt),rt(t),null;case 25:return null;case 30:return null}throw Error(D(156,t.tag))}function jg(e,t){switch(il(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sn(mt),te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(ci(t),t.alternate===null)throw Error(D(340));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ci(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(dt),null;case 4:return te(),null;case 10:return sn(t.type),null;case 22:case 23:return ci(t),vl(),e!==null&&Y(mr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return sn(mt),null;case 25:return null;default:return null}}function fd(e,t){switch(il(t),t.tag){case 3:sn(mt),te();break;case 26:case 27:case 5:ve(t);break;case 4:te();break;case 31:t.memoizedState!==null&&ci(t);break;case 13:ci(t);break;case 19:Y(dt);break;case 10:sn(t.type);break;case 22:case 23:ci(t),vl(),e!==null&&Y(mr);break;case 24:sn(mt)}}function Ps(e,t){try{var u=t.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var k=m.next;u=k;do{if((u.tag&e)===e){m=void 0;var N=u.create,P=u.inst;m=N(),P.destroy=m}u=u.next}while(u!==k)}}catch(X){Xe(t,t.return,X)}}function $n(e,t,u){try{var m=t.updateQueue,k=m!==null?m.lastEffect:null;if(k!==null){var N=k.next;m=N;do{if((m.tag&e)===e){var P=m.inst,X=P.destroy;if(X!==void 0){P.destroy=void 0,k=t;var ie=u,le=X;try{le()}catch(de){Xe(k,ie,de)}}}m=m.next}while(m!==N)}}catch(de){Xe(t,t.return,de)}}function pd(e){var t=e.updateQueue;if(t!==null){var u=e.stateNode;try{rh(t,u)}catch(m){Xe(e,e.return,m)}}}function gd(e,t,u){u.props=wr(e.type,e.memoizedProps),u.state=e.memoizedState;try{u.componentWillUnmount()}catch(m){Xe(e,t,m)}}function Us(e,t){try{var u=e.ref;if(u!==null){switch(e.tag){case 26:case 27:case 5:var m=e.stateNode;break;case 30:m=e.stateNode;break;default:m=e.stateNode}typeof u=="function"?e.refCleanup=u(m):u.current=m}}catch(k){Xe(e,t,k)}}function Ki(e,t){var u=e.ref,m=e.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(k){Xe(e,t,k)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(k){Xe(e,t,k)}else u.current=null}function md(e){var t=e.type,u=e.memoizedProps,m=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(k){Xe(e,e.return,k)}}function Xl(e,t,u){try{var m=e.stateNode;sm(m,e.type,u,t),m[jt]=t}catch(k){Xe(e,e.return,k)}}function vd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zn(e.type)||e.tag===4}function Ql(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&zn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ql(e,t,u){var m=e.tag;if(m===5||m===6)e=e.stateNode,t?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(e,t):(t=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,t.appendChild(e),u=u._reactRootContainer,u!=null||t.onclick!==null||(t.onclick=Li));else if(m!==4&&(m===27&&zn(e.type)&&(u=e.stateNode,t=null),e=e.child,e!==null))for(ql(e,t,u),e=e.sibling;e!==null;)ql(e,t,u),e=e.sibling}function ia(e,t,u){var m=e.tag;if(m===5||m===6)e=e.stateNode,t?u.insertBefore(e,t):u.appendChild(e);else if(m!==4&&(m===27&&zn(e.type)&&(u=e.stateNode),e=e.child,e!==null))for(ia(e,t,u),e=e.sibling;e!==null;)ia(e,t,u),e=e.sibling}function yd(e){var t=e.stateNode,u=e.memoizedProps;try{for(var m=e.type,k=t.attributes;k.length;)t.removeAttributeNode(k[0]);Ot(t,m,u),t[wt]=e,t[jt]=u}catch(N){Xe(e,e.return,N)}}var un=!1,_t=!1,Zl=!1,_d=typeof WeakSet=="function"?WeakSet:Set,kt=null;function Ig(e,t){if(e=e.containerInfo,_c=xa,e=Ru(e),Va(e)){if("selectionStart"in e)var u={start:e.selectionStart,end:e.selectionEnd};else e:{u=(u=e.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var k=m.anchorOffset,N=m.focusNode;m=m.focusOffset;try{u.nodeType,N.nodeType}catch{u=null;break e}var P=0,X=-1,ie=-1,le=0,de=0,pe=e,ue=null;t:for(;;){for(var he;pe!==u||k!==0&&pe.nodeType!==3||(X=P+k),pe!==N||m!==0&&pe.nodeType!==3||(ie=P+m),pe.nodeType===3&&(P+=pe.nodeValue.length),(he=pe.firstChild)!==null;)ue=pe,pe=he;for(;;){if(pe===e)break t;if(ue===u&&++le===k&&(X=P),ue===N&&++de===m&&(ie=P),(he=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=he}u=X===-1||ie===-1?null:{start:X,end:ie}}else u=null}u=u||{start:0,end:0}}else u=null;for(bc={focusedElem:e,selectionRange:u},xa=!1,kt=t;kt!==null;)if(t=kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,kt=e;else for(;kt!==null;){switch(t=kt,N=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(u=0;u<e.length;u++)k=e[u],k.ref.impl=k.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&N!==null){e=void 0,u=t,k=N.memoizedProps,N=N.memoizedState,m=u.stateNode;try{var we=wr(u.type,k);e=m.getSnapshotBeforeUpdate(we,N),m.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){Xe(u,u.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,u=e.nodeType,u===9)xc(e);else if(u===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":xc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(D(163))}if(e=t.sibling,e!==null){e.return=t.return,kt=e;break}kt=t.return}}function bd(e,t,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:dn(e,u),m&4&&Ps(5,u);break;case 1:if(dn(e,u),m&4)if(e=u.stateNode,t===null)try{e.componentDidMount()}catch(P){Xe(u,u.return,P)}else{var k=wr(u.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(k,t,e.__reactInternalSnapshotBeforeUpdate)}catch(P){Xe(u,u.return,P)}}m&64&&pd(u),m&512&&Us(u,u.return);break;case 3:if(dn(e,u),m&64&&(e=u.updateQueue,e!==null)){if(t=null,u.child!==null)switch(u.child.tag){case 27:case 5:t=u.child.stateNode;break;case 1:t=u.child.stateNode}try{rh(e,t)}catch(P){Xe(u,u.return,P)}}break;case 27:t===null&&m&4&&yd(u);case 26:case 5:dn(e,u),t===null&&m&4&&md(u),m&512&&Us(u,u.return);break;case 12:dn(e,u);break;case 31:dn(e,u),m&4&&xd(e,u);break;case 13:dn(e,u),m&4&&Cd(e,u),m&64&&(e=u.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(u=Kg.bind(null,u),fm(e,u))));break;case 22:if(m=u.memoizedState!==null||un,!m){t=t!==null&&t.memoizedState!==null||_t,k=un;var N=_t;un=m,(_t=t)&&!N?fn(e,u,(u.subtreeFlags&8772)!==0):dn(e,u),un=k,_t=N}break;case 30:break;default:dn(e,u)}}function wd(e){var t=e.alternate;t!==null&&(e.alternate=null,wd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gs(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var at=null,Xt=!1;function hn(e,t,u){for(u=u.child;u!==null;)Sd(e,t,u),u=u.sibling}function Sd(e,t,u){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(ti,u)}catch{}switch(u.tag){case 26:_t||Ki(u,t),hn(e,t,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:_t||Ki(u,t);var m=at,k=Xt;zn(u.type)&&(at=u.stateNode,Xt=!1),hn(e,t,u),Js(u.stateNode),at=m,Xt=k;break;case 5:_t||Ki(u,t);case 6:if(m=at,k=Xt,at=null,hn(e,t,u),at=m,Xt=k,at!==null)if(Xt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(u.stateNode)}catch(N){Xe(u,t,N)}else try{at.removeChild(u.stateNode)}catch(N){Xe(u,t,N)}break;case 18:at!==null&&(Xt?(e=at,gf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,u.stateNode),hs(e)):gf(at,u.stateNode));break;case 4:m=at,k=Xt,at=u.stateNode.containerInfo,Xt=!0,hn(e,t,u),at=m,Xt=k;break;case 0:case 11:case 14:case 15:$n(2,u,t),_t||$n(4,u,t),hn(e,t,u);break;case 1:_t||(Ki(u,t),m=u.stateNode,typeof m.componentWillUnmount=="function"&&gd(u,t,m)),hn(e,t,u);break;case 21:hn(e,t,u);break;case 22:_t=(m=_t)||u.memoizedState!==null,hn(e,t,u),_t=m;break;default:hn(e,t,u)}}function xd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{hs(e)}catch(u){Xe(t,t.return,u)}}}function Cd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{hs(e)}catch(u){Xe(t,t.return,u)}}function Hg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _d),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _d),t;default:throw Error(D(435,e.tag))}}function na(e,t){var u=Hg(e);t.forEach(function(m){if(!u.has(m)){u.add(m);var k=Yg.bind(null,e,m);m.then(k,k)}})}function Qt(e,t){var u=t.deletions;if(u!==null)for(var m=0;m<u.length;m++){var k=u[m],N=e,P=t,X=P;e:for(;X!==null;){switch(X.tag){case 27:if(zn(X.type)){at=X.stateNode,Xt=!1;break e}break;case 5:at=X.stateNode,Xt=!1;break e;case 3:case 4:at=X.stateNode.containerInfo,Xt=!0;break e}X=X.return}if(at===null)throw Error(D(160));Sd(N,P,k),at=null,Xt=!1,N=k.alternate,N!==null&&(N.return=null),k.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ed(t,e),t=t.sibling}var Bi=null;function Ed(e,t){var u=e.alternate,m=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),qt(e),m&4&&($n(3,e,e.return),Ps(3,e),$n(5,e,e.return));break;case 1:Qt(t,e),qt(e),m&512&&(_t||u===null||Ki(u,u.return)),m&64&&un&&(e=e.updateQueue,e!==null&&(m=e.callbacks,m!==null&&(u=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var k=Bi;if(Qt(t,e),qt(e),m&512&&(_t||u===null||Ki(u,u.return)),m&4){var N=u!==null?u.memoizedState:null;if(m=e.memoizedState,u===null)if(m===null)if(e.stateNode===null){e:{m=e.type,u=e.memoizedProps,k=k.ownerDocument||k;t:switch(m){case"title":N=k.getElementsByTagName("title")[0],(!N||N[nr]||N[wt]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=k.createElement(m),k.head.insertBefore(N,k.querySelector("head > title"))),Ot(N,m,u),N[wt]=e,pt(N),m=N;break e;case"link":var P=Af("link","href",k).get(m+(u.href||""));if(P){for(var X=0;X<P.length;X++)if(N=P[X],N.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&N.getAttribute("rel")===(u.rel==null?null:u.rel)&&N.getAttribute("title")===(u.title==null?null:u.title)&&N.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){P.splice(X,1);break t}}N=k.createElement(m),Ot(N,m,u),k.head.appendChild(N);break;case"meta":if(P=Af("meta","content",k).get(m+(u.content||""))){for(X=0;X<P.length;X++)if(N=P[X],N.getAttribute("content")===(u.content==null?null:""+u.content)&&N.getAttribute("name")===(u.name==null?null:u.name)&&N.getAttribute("property")===(u.property==null?null:u.property)&&N.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&N.getAttribute("charset")===(u.charSet==null?null:u.charSet)){P.splice(X,1);break t}}N=k.createElement(m),Ot(N,m,u),k.head.appendChild(N);break;default:throw Error(D(468,m))}N[wt]=e,pt(N),m=N}e.stateNode=m}else Mf(k,e.type,e.stateNode);else e.stateNode=Ef(k,m,e.memoizedProps);else N!==m?(N===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):N.count--,m===null?Mf(k,e.type,e.stateNode):Ef(k,m,e.memoizedProps)):m===null&&e.stateNode!==null&&Xl(e,e.memoizedProps,u.memoizedProps)}break;case 27:Qt(t,e),qt(e),m&512&&(_t||u===null||Ki(u,u.return)),u!==null&&m&4&&Xl(e,e.memoizedProps,u.memoizedProps);break;case 5:if(Qt(t,e),qt(e),m&512&&(_t||u===null||Ki(u,u.return)),e.flags&32){k=e.stateNode;try{ri(k,"")}catch(we){Xe(e,e.return,we)}}m&4&&e.stateNode!=null&&(k=e.memoizedProps,Xl(e,k,u!==null?u.memoizedProps:k)),m&1024&&(Zl=!0);break;case 6:if(Qt(t,e),qt(e),m&4){if(e.stateNode===null)throw Error(D(162));m=e.memoizedProps,u=e.stateNode;try{u.nodeValue=m}catch(we){Xe(e,e.return,we)}}break;case 3:if(_a=null,k=Bi,Bi=va(t.containerInfo),Qt(t,e),Bi=k,qt(e),m&4&&u!==null&&u.memoizedState.isDehydrated)try{hs(t.containerInfo)}catch(we){Xe(e,e.return,we)}Zl&&(Zl=!1,Ad(e));break;case 4:m=Bi,Bi=va(e.stateNode.containerInfo),Qt(t,e),qt(e),Bi=m;break;case 12:Qt(t,e),qt(e);break;case 31:Qt(t,e),qt(e),m&4&&(m=e.updateQueue,m!==null&&(e.updateQueue=null,na(e,m)));break;case 13:Qt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(sa=lt()),m&4&&(m=e.updateQueue,m!==null&&(e.updateQueue=null,na(e,m)));break;case 22:k=e.memoizedState!==null;var ie=u!==null&&u.memoizedState!==null,le=un,de=_t;if(un=le||k,_t=de||ie,Qt(t,e),_t=de,un=le,qt(e),m&8192)e:for(t=e.stateNode,t._visibility=k?t._visibility&-2:t._visibility|1,k&&(u===null||ie||un||_t||Sr(e)),u=null,t=e;;){if(t.tag===5||t.tag===26){if(u===null){ie=u=t;try{if(N=ie.stateNode,k)P=N.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{X=ie.stateNode;var pe=ie.memoizedProps.style,ue=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;X.style.display=ue==null||typeof ue=="boolean"?"":(""+ue).trim()}}catch(we){Xe(ie,ie.return,we)}}}else if(t.tag===6){if(u===null){ie=t;try{ie.stateNode.nodeValue=k?"":ie.memoizedProps}catch(we){Xe(ie,ie.return,we)}}}else if(t.tag===18){if(u===null){ie=t;try{var he=ie.stateNode;k?mf(he,!0):mf(ie.stateNode,!1)}catch(we){Xe(ie,ie.return,we)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;u===t&&(u=null),t=t.return}u===t&&(u=null),t.sibling.return=t.return,t=t.sibling}m&4&&(m=e.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,na(e,u))));break;case 19:Qt(t,e),qt(e),m&4&&(m=e.updateQueue,m!==null&&(e.updateQueue=null,na(e,m)));break;case 30:break;case 21:break;default:Qt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var u,m=e.return;m!==null;){if(vd(m)){u=m;break}m=m.return}if(u==null)throw Error(D(160));switch(u.tag){case 27:var k=u.stateNode,N=Ql(e);ia(e,N,k);break;case 5:var P=u.stateNode;u.flags&32&&(ri(P,""),u.flags&=-33);var X=Ql(e);ia(e,X,P);break;case 3:case 4:var ie=u.stateNode.containerInfo,le=Ql(e);ql(e,le,ie);break;default:throw Error(D(161))}}catch(de){Xe(e,e.return,de)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ad(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ad(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bd(e,t.alternate,t),t=t.sibling}function Sr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$n(4,t,t.return),Sr(t);break;case 1:Ki(t,t.return);var u=t.stateNode;typeof u.componentWillUnmount=="function"&&gd(t,t.return,u),Sr(t);break;case 27:Js(t.stateNode);case 26:case 5:Ki(t,t.return),Sr(t);break;case 22:t.memoizedState===null&&Sr(t);break;case 30:Sr(t);break;default:Sr(t)}e=e.sibling}}function fn(e,t,u){for(u=u&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var m=t.alternate,k=e,N=t,P=N.flags;switch(N.tag){case 0:case 11:case 15:fn(k,N,u),Ps(4,N);break;case 1:if(fn(k,N,u),m=N,k=m.stateNode,typeof k.componentDidMount=="function")try{k.componentDidMount()}catch(le){Xe(m,m.return,le)}if(m=N,k=m.updateQueue,k!==null){var X=m.stateNode;try{var ie=k.shared.hiddenCallbacks;if(ie!==null)for(k.shared.hiddenCallbacks=null,k=0;k<ie.length;k++)nh(ie[k],X)}catch(le){Xe(m,m.return,le)}}u&&P&64&&pd(N),Us(N,N.return);break;case 27:yd(N);case 26:case 5:fn(k,N,u),u&&m===null&&P&4&&md(N),Us(N,N.return);break;case 12:fn(k,N,u);break;case 31:fn(k,N,u),u&&P&4&&xd(k,N);break;case 13:fn(k,N,u),u&&P&4&&Cd(k,N);break;case 22:N.memoizedState===null&&fn(k,N,u),Us(N,N.return);break;case 30:break;default:fn(k,N,u)}t=t.sibling}}function Jl(e,t){var u=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(u=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==u&&(e!=null&&e.refCount++,u!=null&&Ls(u))}function ec(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ls(e))}function ji(e,t,u,m){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Md(e,t,u,m),t=t.sibling}function Md(e,t,u,m){var k=t.flags;switch(t.tag){case 0:case 11:case 15:ji(e,t,u,m),k&2048&&Ps(9,t);break;case 1:ji(e,t,u,m);break;case 3:ji(e,t,u,m),k&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ls(e)));break;case 12:if(k&2048){ji(e,t,u,m),e=t.stateNode;try{var N=t.memoizedProps,P=N.id,X=N.onPostCommit;typeof X=="function"&&X(P,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(ie){Xe(t,t.return,ie)}}else ji(e,t,u,m);break;case 31:ji(e,t,u,m);break;case 13:ji(e,t,u,m);break;case 23:break;case 22:N=t.stateNode,P=t.alternate,t.memoizedState!==null?N._visibility&2?ji(e,t,u,m):Vs(e,t):N._visibility&2?ji(e,t,u,m):(N._visibility|=2,es(e,t,u,m,(t.subtreeFlags&10256)!==0||!1)),k&2048&&Jl(P,t);break;case 24:ji(e,t,u,m),k&2048&&ec(t.alternate,t);break;default:ji(e,t,u,m)}}function es(e,t,u,m,k){for(k=k&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var N=e,P=t,X=u,ie=m,le=P.flags;switch(P.tag){case 0:case 11:case 15:es(N,P,X,ie,k),Ps(8,P);break;case 23:break;case 22:var de=P.stateNode;P.memoizedState!==null?de._visibility&2?es(N,P,X,ie,k):Vs(N,P):(de._visibility|=2,es(N,P,X,ie,k)),k&&le&2048&&Jl(P.alternate,P);break;case 24:es(N,P,X,ie,k),k&&le&2048&&ec(P.alternate,P);break;default:es(N,P,X,ie,k)}t=t.sibling}}function Vs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var u=e,m=t,k=m.flags;switch(m.tag){case 22:Vs(u,m),k&2048&&Jl(m.alternate,m);break;case 24:Vs(u,m),k&2048&&ec(m.alternate,m);break;default:Vs(u,m)}t=t.sibling}}var Gs=8192;function ts(e,t,u){if(e.subtreeFlags&Gs)for(e=e.child;e!==null;)kd(e,t,u),e=e.sibling}function kd(e,t,u){switch(e.tag){case 26:ts(e,t,u),e.flags&Gs&&e.memoizedState!==null&&Em(u,Bi,e.memoizedState,e.memoizedProps);break;case 5:ts(e,t,u);break;case 3:case 4:var m=Bi;Bi=va(e.stateNode.containerInfo),ts(e,t,u),Bi=m;break;case 22:e.memoizedState===null&&(m=e.alternate,m!==null&&m.memoizedState!==null?(m=Gs,Gs=16777216,ts(e,t,u),Gs=m):ts(e,t,u));break;default:ts(e,t,u)}}function Td(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ks(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var u=0;u<t.length;u++){var m=t[u];kt=m,Rd(m,e)}Td(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ld(e),e=e.sibling}function Ld(e){switch(e.tag){case 0:case 11:case 15:Ks(e),e.flags&2048&&$n(9,e,e.return);break;case 3:Ks(e);break;case 12:Ks(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ra(e)):Ks(e);break;default:Ks(e)}}function ra(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var u=0;u<t.length;u++){var m=t[u];kt=m,Rd(m,e)}Td(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$n(8,t,t.return),ra(t);break;case 22:u=t.stateNode,u._visibility&2&&(u._visibility&=-3,ra(t));break;default:ra(t)}e=e.sibling}}function Rd(e,t){for(;kt!==null;){var u=kt;switch(u.tag){case 0:case 11:case 15:$n(8,u,t);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Ls(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,kt=m;else e:for(u=e;kt!==null;){m=kt;var k=m.sibling,N=m.return;if(wd(m),m===u){kt=null;break e}if(k!==null){k.return=N,kt=k;break e}kt=N}}}var zg={getCacheForType:function(e){var t=Dt(mt),u=t.data.get(e);return u===void 0&&(u=e(),t.data.set(e,u)),u},cacheSignal:function(){return Dt(mt).controller.signal}},Fg=typeof WeakMap=="function"?WeakMap:Map,Ve=0,tt=null,Ne=null,je=0,Ye=0,ui=null,On=!1,is=!1,tc=!1,pn=0,ut=0,Nn=0,xr=0,ic=0,hi=0,ns=0,Ys=null,Zt=null,nc=!1,sa=0,Dd=0,oa=1/0,aa=null,Bn=null,Ct=0,jn=null,rs=null,gn=0,rc=0,sc=null,$d=null,Xs=0,oc=null;function di(){return(Ve&2)!==0&&je!==0?je&-je:L.T!==null?dc():Fi()}function Od(){if(hi===0)if((je&536870912)===0||ze){var e=gi;gi<<=1,(gi&3932160)===0&&(gi=262144),hi=e}else hi=536870912;return e=li.current,e!==null&&(e.flags|=32),hi}function Jt(e,t,u){(e===tt&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(ss(e,0),In(e,je,hi,!1)),tr(e,u),((Ve&2)===0||e!==tt)&&(e===tt&&((Ve&2)===0&&(xr|=u),ut===4&&In(e,je,hi,!1)),Yi(e))}function Nd(e,t,u){if((Ve&6)!==0)throw Error(D(327));var m=!u&&(t&127)===0&&(t&e.expiredLanes)===0||qi(e,t),k=m?Ug(e,t):lc(e,t,!0),N=m;do{if(k===0){is&&!m&&In(e,t,0,!1);break}else{if(u=e.current.alternate,N&&!Wg(u)){k=lc(e,t,!1),N=!1;continue}if(k===2){if(N=t,e.errorRecoveryDisabledLanes&N)var P=0;else P=e.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){t=P;e:{var X=e;k=Ys;var ie=X.current.memoizedState.isDehydrated;if(ie&&(ss(X,P).flags|=256),P=lc(X,P,!1),P!==2){if(tc&&!ie){X.errorRecoveryDisabledLanes|=N,xr|=N,k=4;break e}N=Zt,Zt=k,N!==null&&(Zt===null?Zt=N:Zt.push.apply(Zt,N))}k=P}if(N=!1,k!==2)continue}}if(k===1){ss(e,0),In(e,t,0,!0);break}e:{switch(m=e,N=k,N){case 0:case 1:throw Error(D(345));case 4:if((t&4194048)!==t)break;case 6:In(m,t,hi,!On);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(D(329))}if((t&62914560)===t&&(k=sa+300-lt(),10<k)){if(In(m,t,hi,!On),zi(m,0,!0)!==0)break e;gn=t,m.timeoutHandle=ff(Bd.bind(null,m,u,Zt,aa,nc,t,hi,xr,ns,On,N,"Throttled",-0,0),k);break e}Bd(m,u,Zt,aa,nc,t,hi,xr,ns,On,N,null,-0,0)}}break}while(!0);Yi(e)}function Bd(e,t,u,m,k,N,P,X,ie,le,de,pe,ue,he){if(e.timeoutHandle=-1,pe=t.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Li},kd(t,N,pe);var we=(N&62914560)===N?sa-lt():(N&4194048)===N?Dd-lt():0;if(we=Am(pe,we),we!==null){gn=N,e.cancelPendingCommit=we(Ud.bind(null,e,t,N,u,m,k,P,X,ie,de,pe,null,ue,he)),In(e,N,P,!le);return}}Ud(e,t,N,u,m,k,P,X,ie)}function Wg(e){for(var t=e;;){var u=t.tag;if((u===0||u===11||u===15)&&t.flags&16384&&(u=t.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var k=u[m],N=k.getSnapshot;k=k.value;try{if(!oi(N(),k))return!1}catch{return!1}}if(u=t.child,t.subtreeFlags&16384&&u!==null)u.return=t,t=u;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function In(e,t,u,m){t&=~ic,t&=~xr,e.suspendedLanes|=t,e.pingedLanes&=~t,m&&(e.warmLanes|=t),m=e.expirationTimes;for(var k=t;0<k;){var N=31-ce(k),P=1<<N;m[N]=-1,k&=~P}u!==0&&fo(e,u,t)}function la(){return(Ve&6)===0?(Qs(0),!1):!0}function ac(){if(Ne!==null){if(Ye===0)var e=Ne.return;else e=Ne,rn=pr=null,xl(e),Xr=null,Ds=0,e=Ne;for(;e!==null;)fd(e.alternate,e),e=e.return;Ne=null}}function ss(e,t){var u=e.timeoutHandle;u!==-1&&(e.timeoutHandle=-1,lm(u)),u=e.cancelPendingCommit,u!==null&&(e.cancelPendingCommit=null,u()),gn=0,ac(),tt=e,Ne=u=tn(e.current,null),je=t,Ye=0,ui=null,On=!1,is=qi(e,t),tc=!1,ns=hi=ic=xr=Nn=ut=0,Zt=Ys=null,nc=!1,(t&8)!==0&&(t|=t&32);var m=e.entangledLanes;if(m!==0)for(e=e.entanglements,m&=t;0<m;){var k=31-ce(m),N=1<<k;t|=e[k],m&=~N}return pn=t,To(),u}function jd(e,t){$e=null,L.H=zs,t===Yr||t===jo?(t=Ju(),Ye=3):t===hl?(t=Ju(),Ye=4):Ye=t===Hl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ui=t,Ne===null&&(ut=1,qo(e,yi(t,e.current)))}function Id(){var e=li.current;return e===null?!0:(je&4194048)===je?Si===null:(je&62914560)===je||(je&536870912)!==0?e===Si:!1}function Hd(){var e=L.H;return L.H=zs,e===null?zs:e}function zd(){var e=L.A;return L.A=zg,e}function ca(){ut=4,On||(je&4194048)!==je&&li.current!==null||(is=!0),(Nn&134217727)===0&&(xr&134217727)===0||tt===null||In(tt,je,hi,!1)}function lc(e,t,u){var m=Ve;Ve|=2;var k=Hd(),N=zd();(tt!==e||je!==t)&&(aa=null,ss(e,t)),t=!1;var P=ut;e:do try{if(Ye!==0&&Ne!==null){var X=Ne,ie=ui;switch(Ye){case 8:ac(),P=6;break e;case 3:case 2:case 9:case 6:li.current===null&&(t=!0);var le=Ye;if(Ye=0,ui=null,os(e,X,ie,le),u&&is){P=0;break e}break;default:le=Ye,Ye=0,ui=null,os(e,X,ie,le)}}Pg(),P=ut;break}catch(de){jd(e,de)}while(!0);return t&&e.shellSuspendCounter++,rn=pr=null,Ve=m,L.H=k,L.A=N,Ne===null&&(tt=null,je=0,To()),P}function Pg(){for(;Ne!==null;)Fd(Ne)}function Ug(e,t){var u=Ve;Ve|=2;var m=Hd(),k=zd();tt!==e||je!==t?(aa=null,oa=lt()+500,ss(e,t)):is=qi(e,t);e:do try{if(Ye!==0&&Ne!==null){t=Ne;var N=ui;t:switch(Ye){case 1:Ye=0,ui=null,os(e,t,N,1);break;case 2:case 9:if(qu(N)){Ye=0,ui=null,Wd(t);break}t=function(){Ye!==2&&Ye!==9||tt!==e||(Ye=7),Yi(e)},N.then(t,t);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:qu(N)?(Ye=0,ui=null,Wd(t)):(Ye=0,ui=null,os(e,t,N,7));break;case 5:var P=null;switch(Ne.tag){case 26:P=Ne.memoizedState;case 5:case 27:var X=Ne;if(P?kf(P):X.stateNode.complete){Ye=0,ui=null;var ie=X.sibling;if(ie!==null)Ne=ie;else{var le=X.return;le!==null?(Ne=le,ua(le)):Ne=null}break t}}Ye=0,ui=null,os(e,t,N,5);break;case 6:Ye=0,ui=null,os(e,t,N,6);break;case 8:ac(),ut=6;break e;default:throw Error(D(462))}}Vg();break}catch(de){jd(e,de)}while(!0);return rn=pr=null,L.H=m,L.A=k,Ve=u,Ne!==null?0:(tt=null,je=0,To(),ut)}function Vg(){for(;Ne!==null&&!Hi();)Fd(Ne)}function Fd(e){var t=hd(e.alternate,e,pn);e.memoizedProps=e.pendingProps,t===null?ua(e):Ne=t}function Wd(e){var t=e,u=t.alternate;switch(t.tag){case 15:case 0:t=sd(u,t,t.pendingProps,t.type,void 0,je);break;case 11:t=sd(u,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:xl(t);default:fd(u,t),t=Ne=zu(t,pn),t=hd(u,t,pn)}e.memoizedProps=e.pendingProps,t===null?ua(e):Ne=t}function os(e,t,u,m){rn=pr=null,xl(t),Xr=null,Ds=0;var k=t.return;try{if($g(e,k,t,u,je)){ut=1,qo(e,yi(u,e.current)),Ne=null;return}}catch(N){if(k!==null)throw Ne=k,N;ut=1,qo(e,yi(u,e.current)),Ne=null;return}t.flags&32768?(ze||m===1?e=!0:is||(je&536870912)!==0?e=!1:(On=e=!0,(m===2||m===9||m===3||m===6)&&(m=li.current,m!==null&&m.tag===13&&(m.flags|=16384))),Pd(t,e)):ua(t)}function ua(e){var t=e;do{if((t.flags&32768)!==0){Pd(t,On);return}e=t.return;var u=Bg(t.alternate,t,pn);if(u!==null){Ne=u;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);ut===0&&(ut=5)}function Pd(e,t){do{var u=jg(e.alternate,e);if(u!==null){u.flags&=32767,Ne=u;return}if(u=e.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=u}while(e!==null);ut=6,Ne=null}function Ud(e,t,u,m,k,N,P,X,ie){e.cancelPendingCommit=null;do ha();while(Ct!==0);if((Ve&6)!==0)throw Error(D(327));if(t!==null){if(t===e.current)throw Error(D(177));if(N=t.lanes|t.childLanes,N|=Qa,$a(e,u,N,P,X,ie),e===tt&&(Ne=tt=null,je=0),rs=t,jn=e,gn=u,rc=N,sc=k,$d=m,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Xg(bt,function(){return Xd(),null})):(e.callbackNode=null,e.callbackPriority=0),m=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||m){m=L.T,L.T=null,k=I.p,I.p=2,P=Ve,Ve|=4;try{Ig(e,t,u)}finally{Ve=P,I.p=k,L.T=m}}Ct=1,Vd(),Gd(),Kd()}}function Vd(){if(Ct===1){Ct=0;var e=jn,t=rs,u=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||u){u=L.T,L.T=null;var m=I.p;I.p=2;var k=Ve;Ve|=4;try{Ed(t,e);var N=bc,P=Ru(e.containerInfo),X=N.focusedElem,ie=N.selectionRange;if(P!==X&&X&&X.ownerDocument&&Lu(X.ownerDocument.documentElement,X)){if(ie!==null&&Va(X)){var le=ie.start,de=ie.end;if(de===void 0&&(de=le),"selectionStart"in X)X.selectionStart=le,X.selectionEnd=Math.min(de,X.value.length);else{var pe=X.ownerDocument||document,ue=pe&&pe.defaultView||window;if(ue.getSelection){var he=ue.getSelection(),we=X.textContent.length,Ae=Math.min(ie.start,we),Je=ie.end===void 0?Ae:Math.min(ie.end,we);!he.extend&&Ae>Je&&(P=Je,Je=Ae,Ae=P);var oe=Tu(X,Ae),re=Tu(X,Je);if(oe&&re&&(he.rangeCount!==1||he.anchorNode!==oe.node||he.anchorOffset!==oe.offset||he.focusNode!==re.node||he.focusOffset!==re.offset)){var ae=pe.createRange();ae.setStart(oe.node,oe.offset),he.removeAllRanges(),Ae>Je?(he.addRange(ae),he.extend(re.node,re.offset)):(ae.setEnd(re.node,re.offset),he.addRange(ae))}}}}for(pe=[],he=X;he=he.parentNode;)he.nodeType===1&&pe.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof X.focus=="function"&&X.focus(),X=0;X<pe.length;X++){var fe=pe[X];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}xa=!!_c,bc=_c=null}finally{Ve=k,I.p=m,L.T=u}}e.current=t,Ct=2}}function Gd(){if(Ct===2){Ct=0;var e=jn,t=rs,u=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||u){u=L.T,L.T=null;var m=I.p;I.p=2;var k=Ve;Ve|=4;try{bd(e,t.alternate,t)}finally{Ve=k,I.p=m,L.T=u}}Ct=3}}function Kd(){if(Ct===4||Ct===3){Ct=0,At();var e=jn,t=rs,u=gn,m=$d;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ct=5:(Ct=0,rs=jn=null,Yd(e,e.pendingLanes));var k=e.pendingLanes;if(k===0&&(Bn=null),ir(u),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(ti,t,void 0,(t.current.flags&128)===128)}catch{}if(m!==null){t=L.T,k=I.p,I.p=2,L.T=null;try{for(var N=e.onRecoverableError,P=0;P<m.length;P++){var X=m[P];N(X.value,{componentStack:X.stack})}}finally{L.T=t,I.p=k}}(gn&3)!==0&&ha(),Yi(e),k=e.pendingLanes,(u&261930)!==0&&(k&42)!==0?e===oc?Xs++:(Xs=0,oc=e):Xs=0,Qs(0)}}function Yd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ls(t)))}function ha(){return Vd(),Gd(),Kd(),Xd()}function Xd(){if(Ct!==5)return!1;var e=jn,t=rc;rc=0;var u=ir(gn),m=L.T,k=I.p;try{I.p=32>u?32:u,L.T=null,u=sc,sc=null;var N=jn,P=gn;if(Ct=0,rs=jn=null,gn=0,(Ve&6)!==0)throw Error(D(331));var X=Ve;if(Ve|=4,Ld(N.current),Md(N,N.current,P,u),Ve=X,Qs(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(ti,N)}catch{}return!0}finally{I.p=k,L.T=m,Yd(e,t)}}function Qd(e,t,u){t=yi(u,t),t=Il(e.stateNode,t,2),e=Ln(e,t,2),e!==null&&(tr(e,2),Yi(e))}function Xe(e,t,u){if(e.tag===3)Qd(e,e,u);else for(;t!==null;){if(t.tag===3){Qd(t,e,u);break}else if(t.tag===1){var m=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Bn===null||!Bn.has(m))){e=yi(u,e),u=qh(2),m=Ln(t,u,2),m!==null&&(Zh(u,m,t,e),tr(m,2),Yi(m));break}}t=t.return}}function cc(e,t,u){var m=e.pingCache;if(m===null){m=e.pingCache=new Fg;var k=new Set;m.set(t,k)}else k=m.get(t),k===void 0&&(k=new Set,m.set(t,k));k.has(u)||(tc=!0,k.add(u),e=Gg.bind(null,e,t,u),t.then(e,e))}function Gg(e,t,u){var m=e.pingCache;m!==null&&m.delete(t),e.pingedLanes|=e.suspendedLanes&u,e.warmLanes&=~u,tt===e&&(je&u)===u&&(ut===4||ut===3&&(je&62914560)===je&&300>lt()-sa?(Ve&2)===0&&ss(e,0):ic|=u,ns===je&&(ns=0)),Yi(e)}function qd(e,t){t===0&&(t=Er()),e=hr(e,t),e!==null&&(tr(e,t),Yi(e))}function Kg(e){var t=e.memoizedState,u=0;t!==null&&(u=t.retryLane),qd(e,u)}function Yg(e,t){var u=0;switch(e.tag){case 31:case 13:var m=e.stateNode,k=e.memoizedState;k!==null&&(u=k.retryLane);break;case 19:m=e.stateNode;break;case 22:m=e.stateNode._retryCache;break;default:throw Error(D(314))}m!==null&&m.delete(t),qd(e,u)}function Xg(e,t){return fi(e,t)}var da=null,as=null,uc=!1,fa=!1,hc=!1,Hn=0;function Yi(e){e!==as&&e.next===null&&(as===null?da=as=e:as=as.next=e),fa=!0,uc||(uc=!0,qg())}function Qs(e,t){if(!hc&&fa){hc=!0;do for(var u=!1,m=da;m!==null;){if(e!==0){var k=m.pendingLanes;if(k===0)var N=0;else{var P=m.suspendedLanes,X=m.pingedLanes;N=(1<<31-ce(42|e)+1)-1,N&=k&~(P&~X),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(u=!0,tf(m,N))}else N=je,N=zi(m,m===tt?N:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(N&3)===0||qi(m,N)||(u=!0,tf(m,N));m=m.next}while(u);hc=!1}}function Qg(){Zd()}function Zd(){fa=uc=!1;var e=0;Hn!==0&&am()&&(e=Hn);for(var t=lt(),u=null,m=da;m!==null;){var k=m.next,N=Jd(m,t);N===0?(m.next=null,u===null?da=k:u.next=k,k===null&&(as=u)):(u=m,(e!==0||(N&3)!==0)&&(fa=!0)),m=k}Ct!==0&&Ct!==5||Qs(e),Hn!==0&&(Hn=0)}function Jd(e,t){for(var u=e.suspendedLanes,m=e.pingedLanes,k=e.expirationTimes,N=e.pendingLanes&-62914561;0<N;){var P=31-ce(N),X=1<<P,ie=k[P];ie===-1?((X&u)===0||(X&m)!==0)&&(k[P]=ps(X,t)):ie<=t&&(e.expiredLanes|=X),N&=~X}if(t=tt,u=je,u=zi(e,e===t?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),m=e.callbackNode,u===0||e===t&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return m!==null&&m!==null&&Ei(m),e.callbackNode=null,e.callbackPriority=0;if((u&3)===0||qi(e,u)){if(t=u&-u,t===e.callbackPriority)return t;switch(m!==null&&Ei(m),ir(u)){case 2:case 8:u=Ft;break;case 32:u=bt;break;case 268435456:u=ot;break;default:u=bt}return m=ef.bind(null,e),u=fi(u,m),e.callbackPriority=t,e.callbackNode=u,t}return m!==null&&m!==null&&Ei(m),e.callbackPriority=2,e.callbackNode=null,2}function ef(e,t){if(Ct!==0&&Ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var u=e.callbackNode;if(ha()&&e.callbackNode!==u)return null;var m=je;return m=zi(e,e===tt?m:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),m===0?null:(Nd(e,m,t),Jd(e,lt()),e.callbackNode!=null&&e.callbackNode===u?ef.bind(null,e):null)}function tf(e,t){if(ha())return null;Nd(e,t,!0)}function qg(){cm(function(){(Ve&6)!==0?fi(pi,Qg):Zd()})}function dc(){if(Hn===0){var e=Gr;e===0&&(e=ii,ii<<=1,(ii&261888)===0&&(ii=256)),Hn=e}return Hn}function nf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rr(""+e)}function rf(e,t){var u=t.ownerDocument.createElement("input");return u.name=t.name,u.value=t.value,e.id&&u.setAttribute("form",e.id),t.parentNode.insertBefore(u,t),e=new FormData(e),u.parentNode.removeChild(u),e}function Zg(e,t,u,m,k){if(t==="submit"&&u&&u.stateNode===k){var N=nf((k[jt]||null).action),P=m.submitter;P&&(t=(t=P[jt]||null)?nf(t.formAction):P.getAttribute("formAction"),t!==null&&(N=t,P=null));var X=new Le("action","action",null,m,k);e.push({event:X,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Hn!==0){var ie=P?rf(k,P):new FormData(k);Dl(u,{pending:!0,data:ie,method:k.method,action:N},null,ie)}}else typeof N=="function"&&(X.preventDefault(),ie=P?rf(k,P):new FormData(k),Dl(u,{pending:!0,data:ie,method:k.method,action:N},N,ie))},currentTarget:k}]})}}for(var fc=0;fc<Xa.length;fc++){var pc=Xa[fc],Jg=pc.toLowerCase(),em=pc[0].toUpperCase()+pc.slice(1);Ni(Jg,"on"+em)}Ni(Ou,"onAnimationEnd"),Ni(Nu,"onAnimationIteration"),Ni(Bu,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(mg,"onTransitionRun"),Ni(vg,"onTransitionStart"),Ni(yg,"onTransitionCancel"),Ni(ju,"onTransitionEnd"),bn("onMouseEnter",["mouseout","mouseover"]),bn("onMouseLeave",["mouseout","mouseover"]),bn("onPointerEnter",["pointerout","pointerover"]),bn("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qs="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(" "),tm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qs));function sf(e,t){t=(t&4)!==0;for(var u=0;u<e.length;u++){var m=e[u],k=m.event;m=m.listeners;e:{var N=void 0;if(t)for(var P=m.length-1;0<=P;P--){var X=m[P],ie=X.instance,le=X.currentTarget;if(X=X.listener,ie!==N&&k.isPropagationStopped())break e;N=X,k.currentTarget=le;try{N(k)}catch(de){ko(de)}k.currentTarget=null,N=ie}else for(P=0;P<m.length;P++){if(X=m[P],ie=X.instance,le=X.currentTarget,X=X.listener,ie!==N&&k.isPropagationStopped())break e;N=X,k.currentTarget=le;try{N(k)}catch(de){ko(de)}k.currentTarget=null,N=ie}}}}function Be(e,t){var u=t[ni];u===void 0&&(u=t[ni]=new Set);var m=e+"__bubble";u.has(m)||(of(t,e,2,!1),u.add(m))}function gc(e,t,u){var m=0;t&&(m|=4),of(u,e,m,t)}var pa="_reactListening"+Math.random().toString(36).slice(2);function mc(e){if(!e[pa]){e[pa]=!0,yo.forEach(function(u){u!=="selectionchange"&&(tm.has(u)||gc(u,!1,e),gc(u,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pa]||(t[pa]=!0,gc("selectionchange",!1,t))}}function of(e,t,u,m){switch(Nf(t)){case 2:var k=Tm;break;case 8:k=Lm;break;default:k=Rc}u=k.bind(null,t,u,e),k=void 0,!$r||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(k=!0),m?k!==void 0?e.addEventListener(t,u,{capture:!0,passive:k}):e.addEventListener(t,u,!0):k!==void 0?e.addEventListener(t,u,{passive:k}):e.addEventListener(t,u,!1)}function vc(e,t,u,m,k){var N=m;if((t&1)===0&&(t&2)===0&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var X=m.stateNode.containerInfo;if(X===k)break;if(P===4)for(P=m.return;P!==null;){var ie=P.tag;if((ie===3||ie===4)&&P.stateNode.containerInfo===k)return;P=P.return}for(;X!==null;){if(P=Vt(X),P===null)return;if(ie=P.tag,ie===5||ie===6||ie===26||ie===27){m=N=P;continue e}X=X.parentNode}}m=m.return}Co(function(){var le=N,de=Dr(u),pe=[];e:{var ue=Iu.get(e);if(ue!==void 0){var he=Le,we=e;switch(e){case"keypress":if(J(u)===0)break e;case"keydown":case"keyup":he=Yp;break;case"focusin":we="focus",he=si;break;case"focusout":we="blur",he=si;break;case"beforeblur":case"afterblur":he=si;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=xt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=Yt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=qp;break;case Ou:case Nu:case Bu:he=Ao;break;case ju:he=Jp;break;case"scroll":case"scrollend":he=gt;break;case"wheel":he=tg;break;case"copy":case"cut":case"paste":he=Br;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=gu;break;case"toggle":case"beforetoggle":he=ng}var Ae=(t&4)!==0,Je=!Ae&&(e==="scroll"||e==="scrollend"),oe=Ae?ue!==null?ue+"Capture":null:ue;Ae=[];for(var re=le,ae;re!==null;){var fe=re;if(ae=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||ae===null||oe===null||(fe=xn(re,oe),fe!=null&&Ae.push(Zs(re,fe,ae))),Je)break;re=re.return}0<Ae.length&&(ue=new he(ue,we,null,u,de),pe.push({event:ue,listeners:Ae}))}}if((t&7)===0){e:{if(ue=e==="mouseover"||e==="pointerover",he=e==="mouseout"||e==="pointerout",ue&&u!==Ri&&(we=u.relatedTarget||u.fromElement)&&(Vt(we)||we[vn]))break e;if((he||ue)&&(ue=de.window===de?de:(ue=de.ownerDocument)?ue.defaultView||ue.parentWindow:window,he?(we=u.relatedTarget||u.toElement,he=le,we=we?Vt(we):null,we!==null&&(Je=R(we),Ae=we.tag,we!==Je||Ae!==5&&Ae!==27&&Ae!==6)&&(we=null)):(he=null,we=le),he!==we)){if(Ae=xt,fe="onMouseLeave",oe="onMouseEnter",re="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=gu,fe="onPointerLeave",oe="onPointerEnter",re="pointer"),Je=he==null?ue:rr(he),ae=we==null?ue:rr(we),ue=new Ae(fe,re+"leave",he,u,de),ue.target=Je,ue.relatedTarget=ae,fe=null,Vt(de)===le&&(Ae=new Ae(oe,re+"enter",we,u,de),Ae.target=ae,Ae.relatedTarget=Je,fe=Ae),Je=fe,he&&we)t:{for(Ae=im,oe=he,re=we,ae=0,fe=oe;fe;fe=Ae(fe))ae++;fe=0;for(var Ce=re;Ce;Ce=Ae(Ce))fe++;for(;0<ae-fe;)oe=Ae(oe),ae--;for(;0<fe-ae;)re=Ae(re),fe--;for(;ae--;){if(oe===re||re!==null&&oe===re.alternate){Ae=oe;break t}oe=Ae(oe),re=Ae(re)}Ae=null}else Ae=null;he!==null&&af(pe,ue,he,Ae,!1),we!==null&&Je!==null&&af(pe,Je,we,Ae,!0)}}e:{if(ue=le?rr(le):window,he=ue.nodeName&&ue.nodeName.toLowerCase(),he==="select"||he==="input"&&ue.type==="file")var Pe=xu;else if(wu(ue))if(Cu)Pe=fg;else{Pe=hg;var Se=ug}else he=ue.nodeName,!he||he.toLowerCase()!=="input"||ue.type!=="checkbox"&&ue.type!=="radio"?le&&ws(le.elementType)&&(Pe=xu):Pe=dg;if(Pe&&(Pe=Pe(e,le))){Su(pe,Pe,u,de);break e}Se&&Se(e,ue,le),e==="focusout"&&le&&ue.type==="number"&&le.memoizedProps.value!=null&&_s(ue,"number",ue.value)}switch(Se=le?rr(le):window,e){case"focusin":(wu(Se)||Se.contentEditable==="true")&&(Ir=Se,Ga=le,Ms=null);break;case"focusout":Ms=Ga=Ir=null;break;case"mousedown":Ka=!0;break;case"contextmenu":case"mouseup":case"dragend":Ka=!1,Du(pe,u,de);break;case"selectionchange":if(gg)break;case"keydown":case"keyup":Du(pe,u,de)}var Oe;if(Wa)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else jr?_u(e,u)&&(Ie="onCompositionEnd"):e==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(mu&&u.locale!=="ko"&&(jr||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&jr&&(Oe=Eo()):(Oi=de,Ss="value"in Oi?Oi.value:Oi.textContent,jr=!0)),Se=ga(le,Ie),0<Se.length&&(Ie=new pu(Ie,e,null,u,de),pe.push({event:Ie,listeners:Se}),Oe?Ie.data=Oe:(Oe=bu(u),Oe!==null&&(Ie.data=Oe)))),(Oe=sg?og(e,u):ag(e,u))&&(Ie=ga(le,"onBeforeInput"),0<Ie.length&&(Se=new pu("onBeforeInput","beforeinput",null,u,de),pe.push({event:Se,listeners:Ie}),Se.data=Oe)),Zg(pe,e,le,u,de)}sf(pe,t)})}function Zs(e,t,u){return{instance:e,listener:t,currentTarget:u}}function ga(e,t){for(var u=t+"Capture",m=[];e!==null;){var k=e,N=k.stateNode;if(k=k.tag,k!==5&&k!==26&&k!==27||N===null||(k=xn(e,u),k!=null&&m.unshift(Zs(e,k,N)),k=xn(e,t),k!=null&&m.push(Zs(e,k,N))),e.tag===3)return m;e=e.return}return[]}function im(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function af(e,t,u,m,k){for(var N=t._reactName,P=[];u!==null&&u!==m;){var X=u,ie=X.alternate,le=X.stateNode;if(X=X.tag,ie!==null&&ie===m)break;X!==5&&X!==26&&X!==27||le===null||(ie=le,k?(le=xn(u,N),le!=null&&P.unshift(Zs(u,le,ie))):k||(le=xn(u,N),le!=null&&P.push(Zs(u,le,ie)))),u=u.return}P.length!==0&&e.push({event:t,listeners:P})}var nm=/\r\n?/g,rm=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(nm,`
9
- `).replace(rm,"")}function cf(e,t){return t=lf(t),lf(e)===t}function Ze(e,t,u,m,k,N){switch(u){case"children":typeof m=="string"?t==="body"||t==="textarea"&&m===""||ri(e,m):(typeof m=="number"||typeof m=="bigint")&&t!=="body"&&ri(e,""+m);break;case"className":kr(e,"class",m);break;case"tabIndex":kr(e,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":kr(e,u,m);break;case"style":Ti(e,m,N);break;case"data":if(t!=="object"){kr(e,"data",m);break}case"src":case"href":if(m===""&&(t!=="a"||u!=="href")){e.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){e.removeAttribute(u);break}m=Rr(""+m),e.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){e.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof N=="function"&&(u==="formAction"?(t!=="input"&&Ze(e,t,"name",k.name,k,null),Ze(e,t,"formEncType",k.formEncType,k,null),Ze(e,t,"formMethod",k.formMethod,k,null),Ze(e,t,"formTarget",k.formTarget,k,null)):(Ze(e,t,"encType",k.encType,k,null),Ze(e,t,"method",k.method,k,null),Ze(e,t,"target",k.target,k,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){e.removeAttribute(u);break}m=Rr(""+m),e.setAttribute(u,m);break;case"onClick":m!=null&&(e.onclick=Li);break;case"onScroll":m!=null&&Be("scroll",e);break;case"onScrollEnd":m!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(D(61));if(u=m.__html,u!=null){if(k.children!=null)throw Error(D(60));e.innerHTML=u}}break;case"multiple":e.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":e.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){e.removeAttribute("xlink:href");break}u=Rr(""+m),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?e.setAttribute(u,""+m):e.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?e.setAttribute(u,""):e.removeAttribute(u);break;case"capture":case"download":m===!0?e.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?e.setAttribute(u,m):e.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?e.setAttribute(u,m):e.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?e.removeAttribute(u):e.setAttribute(u,m);break;case"popover":Be("beforetoggle",e),Be("toggle",e),Mr(e,"popover",m);break;case"xlinkActuate":ki(e,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ki(e,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ki(e,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ki(e,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ki(e,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ki(e,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ki(e,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ki(e,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ki(e,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Mr(e,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Ha.get(u)||u,Mr(e,u,m))}}function yc(e,t,u,m,k,N){switch(u){case"style":Ti(e,m,N);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(D(61));if(u=m.__html,u!=null){if(k.children!=null)throw Error(D(60));e.innerHTML=u}}break;case"children":typeof m=="string"?ri(e,m):(typeof m=="number"||typeof m=="bigint")&&ri(e,""+m);break;case"onScroll":m!=null&&Be("scroll",e);break;case"onScrollEnd":m!=null&&Be("scrollend",e);break;case"onClick":m!=null&&(e.onclick=Li);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sr.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(k=u.endsWith("Capture"),t=u.slice(2,k?u.length-7:void 0),N=e[jt]||null,N=N!=null?N[u]:null,typeof N=="function"&&e.removeEventListener(t,N,k),typeof m=="function")){typeof N!="function"&&N!==null&&(u in e?e[u]=null:e.hasAttribute(u)&&e.removeAttribute(u)),e.addEventListener(t,m,k);break e}u in e?e[u]=m:m===!0?e.setAttribute(u,""):Mr(e,u,m)}}}function Ot(e,t,u){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var m=!1,k=!1,N;for(N in u)if(u.hasOwnProperty(N)){var P=u[N];if(P!=null)switch(N){case"src":m=!0;break;case"srcSet":k=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(D(137,t));default:Ze(e,t,N,P,u,null)}}k&&Ze(e,t,"srcSet",u.srcSet,u,null),m&&Ze(e,t,"src",u.src,u,null);return;case"input":Be("invalid",e);var X=N=P=k=null,ie=null,le=null;for(m in u)if(u.hasOwnProperty(m)){var de=u[m];if(de!=null)switch(m){case"name":k=de;break;case"type":P=de;break;case"checked":ie=de;break;case"defaultChecked":le=de;break;case"value":N=de;break;case"defaultValue":X=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(D(137,t));break;default:Ze(e,t,m,de,u,null)}}ys(e,N,X,ie,le,P,k,!1);return;case"select":Be("invalid",e),m=P=N=null;for(k in u)if(u.hasOwnProperty(k)&&(X=u[k],X!=null))switch(k){case"value":N=X;break;case"defaultValue":P=X;break;case"multiple":m=X;default:Ze(e,t,k,X,u,null)}t=N,u=P,e.multiple=!!m,t!=null?wn(e,!!m,t,!1):u!=null&&wn(e,!!m,u,!0);return;case"textarea":Be("invalid",e),N=k=m=null;for(P in u)if(u.hasOwnProperty(P)&&(X=u[P],X!=null))switch(P){case"value":m=X;break;case"defaultValue":k=X;break;case"children":N=X;break;case"dangerouslySetInnerHTML":if(X!=null)throw Error(D(91));break;default:Ze(e,t,P,X,u,null)}ar(e,m,k,N);return;case"option":for(ie in u)u.hasOwnProperty(ie)&&(m=u[ie],m!=null)&&(ie==="selected"?e.selected=m&&typeof m!="function"&&typeof m!="symbol":Ze(e,t,ie,m,u,null));return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(m=0;m<qs.length;m++)Be(qs[m],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in u)if(u.hasOwnProperty(le)&&(m=u[le],m!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(D(137,t));default:Ze(e,t,le,m,u,null)}return;default:if(ws(t)){for(de in u)u.hasOwnProperty(de)&&(m=u[de],m!==void 0&&yc(e,t,de,m,u,void 0));return}}for(X in u)u.hasOwnProperty(X)&&(m=u[X],m!=null&&Ze(e,t,X,m,u,null))}function sm(e,t,u,m){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var k=null,N=null,P=null,X=null,ie=null,le=null,de=null;for(he in u){var pe=u[he];if(u.hasOwnProperty(he)&&pe!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":ie=pe;default:m.hasOwnProperty(he)||Ze(e,t,he,null,m,pe)}}for(var ue in m){var he=m[ue];if(pe=u[ue],m.hasOwnProperty(ue)&&(he!=null||pe!=null))switch(ue){case"type":N=he;break;case"name":k=he;break;case"checked":le=he;break;case"defaultChecked":de=he;break;case"value":P=he;break;case"defaultValue":X=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(D(137,t));break;default:he!==pe&&Ze(e,t,ue,he,m,pe)}}vs(e,P,X,ie,le,de,N,k);return;case"select":he=P=X=ue=null;for(N in u)if(ie=u[N],u.hasOwnProperty(N)&&ie!=null)switch(N){case"value":break;case"multiple":he=ie;default:m.hasOwnProperty(N)||Ze(e,t,N,null,m,ie)}for(k in m)if(N=m[k],ie=u[k],m.hasOwnProperty(k)&&(N!=null||ie!=null))switch(k){case"value":ue=N;break;case"defaultValue":X=N;break;case"multiple":P=N;default:N!==ie&&Ze(e,t,k,N,m,ie)}t=X,u=P,m=he,ue!=null?wn(e,!!u,ue,!1):!!m!=!!u&&(t!=null?wn(e,!!u,t,!0):wn(e,!!u,u?[]:"",!1));return;case"textarea":he=ue=null;for(X in u)if(k=u[X],u.hasOwnProperty(X)&&k!=null&&!m.hasOwnProperty(X))switch(X){case"value":break;case"children":break;default:Ze(e,t,X,null,m,k)}for(P in m)if(k=m[P],N=u[P],m.hasOwnProperty(P)&&(k!=null||N!=null))switch(P){case"value":ue=k;break;case"defaultValue":he=k;break;case"children":break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(D(91));break;default:k!==N&&Ze(e,t,P,k,m,N)}bs(e,ue,he);return;case"option":for(var we in u)ue=u[we],u.hasOwnProperty(we)&&ue!=null&&!m.hasOwnProperty(we)&&(we==="selected"?e.selected=!1:Ze(e,t,we,null,m,ue));for(ie in m)ue=m[ie],he=u[ie],m.hasOwnProperty(ie)&&ue!==he&&(ue!=null||he!=null)&&(ie==="selected"?e.selected=ue&&typeof ue!="function"&&typeof ue!="symbol":Ze(e,t,ie,ue,m,he));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in u)ue=u[Ae],u.hasOwnProperty(Ae)&&ue!=null&&!m.hasOwnProperty(Ae)&&Ze(e,t,Ae,null,m,ue);for(le in m)if(ue=m[le],he=u[le],m.hasOwnProperty(le)&&ue!==he&&(ue!=null||he!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(D(137,t));break;default:Ze(e,t,le,ue,m,he)}return;default:if(ws(t)){for(var Je in u)ue=u[Je],u.hasOwnProperty(Je)&&ue!==void 0&&!m.hasOwnProperty(Je)&&yc(e,t,Je,void 0,m,ue);for(de in m)ue=m[de],he=u[de],!m.hasOwnProperty(de)||ue===he||ue===void 0&&he===void 0||yc(e,t,de,ue,m,he);return}}for(var oe in u)ue=u[oe],u.hasOwnProperty(oe)&&ue!=null&&!m.hasOwnProperty(oe)&&Ze(e,t,oe,null,m,ue);for(pe in m)ue=m[pe],he=u[pe],!m.hasOwnProperty(pe)||ue===he||ue==null&&he==null||Ze(e,t,pe,ue,m,he)}function uf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function om(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var k=u[m],N=k.transferSize,P=k.initiatorType,X=k.duration;if(N&&X&&uf(P)){for(P=0,X=k.responseEnd,m+=1;m<u.length;m++){var ie=u[m],le=ie.startTime;if(le>X)break;var de=ie.transferSize,pe=ie.initiatorType;de&&uf(pe)&&(ie=ie.responseEnd,P+=de*(ie<X?1:(X-le)/(ie-le)))}if(--m,t+=8*(N+P)/(k.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,bc=null;function ma(e){return e.nodeType===9?e:e.ownerDocument}function hf(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function df(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function wc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Sc=null;function am(){var e=window.event;return e&&e.type==="popstate"?e===Sc?!1:(Sc=e,!0):(Sc=null,!1)}var ff=typeof setTimeout=="function"?setTimeout:void 0,lm=typeof clearTimeout=="function"?clearTimeout:void 0,pf=typeof Promise=="function"?Promise:void 0,cm=typeof queueMicrotask=="function"?queueMicrotask:typeof pf<"u"?function(e){return pf.resolve(null).then(e).catch(um)}:ff;function um(e){setTimeout(function(){throw e})}function zn(e){return e==="head"}function gf(e,t){var u=t,m=0;do{var k=u.nextSibling;if(e.removeChild(u),k&&k.nodeType===8)if(u=k.data,u==="/$"||u==="/&"){if(m===0){e.removeChild(k),hs(t);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Js(e.ownerDocument.documentElement);else if(u==="head"){u=e.ownerDocument.head,Js(u);for(var N=u.firstChild;N;){var P=N.nextSibling,X=N.nodeName;N[nr]||X==="SCRIPT"||X==="STYLE"||X==="LINK"&&N.rel.toLowerCase()==="stylesheet"||u.removeChild(N),N=P}}else u==="body"&&Js(e.ownerDocument.body);u=k}while(u);hs(t)}function mf(e,t){var u=e;e=0;do{var m=u.nextSibling;if(u.nodeType===1?t?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(t?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(e===0)break;e--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||e++;u=m}while(u)}function xc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var u=t;switch(t=t.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":xc(u),gs(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}e.removeChild(u)}}function hm(e,t,u,m){for(;e.nodeType===1;){var k=u;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!m&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(m){if(!e[nr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(N=e.getAttribute("rel"),N==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(N!==k.rel||e.getAttribute("href")!==(k.href==null||k.href===""?null:k.href)||e.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin)||e.getAttribute("title")!==(k.title==null?null:k.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(N=e.getAttribute("src"),(N!==(k.src==null?null:k.src)||e.getAttribute("type")!==(k.type==null?null:k.type)||e.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin))&&N&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var N=k.name==null?null:""+k.name;if(k.type==="hidden"&&e.getAttribute("name")===N)return e}else return e;if(e=xi(e.nextSibling),e===null)break}return null}function dm(e,t,u){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!u||(e=xi(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=xi(e.nextSibling),e===null))return null;return e}function Cc(e){return e.data==="$?"||e.data==="$~"}function Ec(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function fm(e,t){var u=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||u.readyState!=="loading")t();else{var m=function(){t(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),e._reactRetry=m}}function xi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ac=null;function yf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var u=e.data;if(u==="/$"||u==="/&"){if(t===0)return xi(e.nextSibling);t--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||t++}e=e.nextSibling}return null}function _f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var u=e.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(t===0)return e;t--}else u!=="/$"&&u!=="/&"||t++}e=e.previousSibling}return null}function bf(e,t,u){switch(t=ma(u),e){case"html":if(e=t.documentElement,!e)throw Error(D(452));return e;case"head":if(e=t.head,!e)throw Error(D(453));return e;case"body":if(e=t.body,!e)throw Error(D(454));return e;default:throw Error(D(451))}}function Js(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gs(e)}var Ci=new Map,wf=new Set;function va(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var mn=I.d;I.d={f:pm,r:gm,D:mm,C:vm,L:ym,m:_m,X:wm,S:bm,M:Sm};function pm(){var e=mn.f(),t=la();return e||t}function gm(e){var t=yn(e);t!==null&&t.tag===5&&t.type==="form"?jh(t):mn.r(e)}var ls=typeof document>"u"?null:document;function Sf(e,t,u){var m=ls;if(m&&typeof t=="string"&&t){var k=Gt(t);k='link[rel="'+e+'"][href="'+k+'"]',typeof u=="string"&&(k+='[crossorigin="'+u+'"]'),wf.has(k)||(wf.add(k),e={rel:e,crossOrigin:u,href:t},m.querySelector(k)===null&&(t=m.createElement("link"),Ot(t,"link",e),pt(t),m.head.appendChild(t)))}}function mm(e){mn.D(e),Sf("dns-prefetch",e,null)}function vm(e,t){mn.C(e,t),Sf("preconnect",e,t)}function ym(e,t,u){mn.L(e,t,u);var m=ls;if(m&&e&&t){var k='link[rel="preload"][as="'+Gt(t)+'"]';t==="image"&&u&&u.imageSrcSet?(k+='[imagesrcset="'+Gt(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(k+='[imagesizes="'+Gt(u.imageSizes)+'"]')):k+='[href="'+Gt(e)+'"]';var N=k;switch(t){case"style":N=cs(e);break;case"script":N=us(e)}Ci.has(N)||(e=i({rel:"preload",href:t==="image"&&u&&u.imageSrcSet?void 0:e,as:t},u),Ci.set(N,e),m.querySelector(k)!==null||t==="style"&&m.querySelector(eo(N))||t==="script"&&m.querySelector(to(N))||(t=m.createElement("link"),Ot(t,"link",e),pt(t),m.head.appendChild(t)))}}function _m(e,t){mn.m(e,t);var u=ls;if(u&&e){var m=t&&typeof t.as=="string"?t.as:"script",k='link[rel="modulepreload"][as="'+Gt(m)+'"][href="'+Gt(e)+'"]',N=k;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=us(e)}if(!Ci.has(N)&&(e=i({rel:"modulepreload",href:e},t),Ci.set(N,e),u.querySelector(k)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(to(N)))return}m=u.createElement("link"),Ot(m,"link",e),pt(m),u.head.appendChild(m)}}}function bm(e,t,u){mn.S(e,t,u);var m=ls;if(m&&e){var k=_n(m).hoistableStyles,N=cs(e);t=t||"default";var P=k.get(N);if(!P){var X={loading:0,preload:null};if(P=m.querySelector(eo(N)))X.loading=5;else{e=i({rel:"stylesheet",href:e,"data-precedence":t},u),(u=Ci.get(N))&&Mc(e,u);var ie=P=m.createElement("link");pt(ie),Ot(ie,"link",e),ie._p=new Promise(function(le,de){ie.onload=le,ie.onerror=de}),ie.addEventListener("load",function(){X.loading|=1}),ie.addEventListener("error",function(){X.loading|=2}),X.loading|=4,ya(P,t,m)}P={type:"stylesheet",instance:P,count:1,state:X},k.set(N,P)}}}function wm(e,t){mn.X(e,t);var u=ls;if(u&&e){var m=_n(u).hoistableScripts,k=us(e),N=m.get(k);N||(N=u.querySelector(to(k)),N||(e=i({src:e,async:!0},t),(t=Ci.get(k))&&kc(e,t),N=u.createElement("script"),pt(N),Ot(N,"link",e),u.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},m.set(k,N))}}function Sm(e,t){mn.M(e,t);var u=ls;if(u&&e){var m=_n(u).hoistableScripts,k=us(e),N=m.get(k);N||(N=u.querySelector(to(k)),N||(e=i({src:e,async:!0,type:"module"},t),(t=Ci.get(k))&&kc(e,t),N=u.createElement("script"),pt(N),Ot(N,"link",e),u.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},m.set(k,N))}}function xf(e,t,u,m){var k=(k=ee.current)?va(k):null;if(!k)throw Error(D(446));switch(e){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(t=cs(u.href),u=_n(k).hoistableStyles,m=u.get(t),m||(m={type:"style",instance:null,count:0,state:null},u.set(t,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){e=cs(u.href);var N=_n(k).hoistableStyles,P=N.get(e);if(P||(k=k.ownerDocument||k,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(e,P),(N=k.querySelector(eo(e)))&&!N._p&&(P.instance=N,P.state.loading=5),Ci.has(e)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ci.set(e,u),N||xm(k,e,u,P.state))),t&&m===null)throw Error(D(528,""));return P}if(t&&m!==null)throw Error(D(529,""));return null;case"script":return t=u.async,u=u.src,typeof u=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=us(u),u=_n(k).hoistableScripts,m=u.get(t),m||(m={type:"script",instance:null,count:0,state:null},u.set(t,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(D(444,e))}}function cs(e){return'href="'+Gt(e)+'"'}function eo(e){return'link[rel="stylesheet"]['+e+"]"}function Cf(e){return i({},e,{"data-precedence":e.precedence,precedence:null})}function xm(e,t,u,m){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?m.loading=1:(t=e.createElement("link"),m.preload=t,t.addEventListener("load",function(){return m.loading|=1}),t.addEventListener("error",function(){return m.loading|=2}),Ot(t,"link",u),pt(t),e.head.appendChild(t))}function us(e){return'[src="'+Gt(e)+'"]'}function to(e){return"script[async]"+e}function Ef(e,t,u){if(t.count++,t.instance===null)switch(t.type){case"style":var m=e.querySelector('style[data-href~="'+Gt(u.href)+'"]');if(m)return t.instance=m,pt(m),m;var k=i({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(e.ownerDocument||e).createElement("style"),pt(m),Ot(m,"style",k),ya(m,u.precedence,e),t.instance=m;case"stylesheet":k=cs(u.href);var N=e.querySelector(eo(k));if(N)return t.state.loading|=4,t.instance=N,pt(N),N;m=Cf(u),(k=Ci.get(k))&&Mc(m,k),N=(e.ownerDocument||e).createElement("link"),pt(N);var P=N;return P._p=new Promise(function(X,ie){P.onload=X,P.onerror=ie}),Ot(N,"link",m),t.state.loading|=4,ya(N,u.precedence,e),t.instance=N;case"script":return N=us(u.src),(k=e.querySelector(to(N)))?(t.instance=k,pt(k),k):(m=u,(k=Ci.get(N))&&(m=i({},u),kc(m,k)),e=e.ownerDocument||e,k=e.createElement("script"),pt(k),Ot(k,"link",m),e.head.appendChild(k),t.instance=k);case"void":return null;default:throw Error(D(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(m=t.instance,t.state.loading|=4,ya(m,u.precedence,e));return t.instance}function ya(e,t,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=m.length?m[m.length-1]:null,N=k,P=0;P<m.length;P++){var X=m[P];if(X.dataset.precedence===t)N=X;else if(N!==k)break}N?N.parentNode.insertBefore(e,N.nextSibling):(t=u.nodeType===9?u.head:u,t.insertBefore(e,t.firstChild))}function Mc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function kc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _a=null;function Af(e,t,u){if(_a===null){var m=new Map,k=_a=new Map;k.set(u,m)}else k=_a,m=k.get(u),m||(m=new Map,k.set(u,m));if(m.has(e))return m;for(m.set(e,null),u=u.getElementsByTagName(e),k=0;k<u.length;k++){var N=u[k];if(!(N[nr]||N[wt]||e==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var P=N.getAttribute(t)||"";P=e+P;var X=m.get(P);X?X.push(N):m.set(P,[N])}}return m}function Mf(e,t,u){e=e.ownerDocument||e,e.head.insertBefore(u,t==="title"?e.querySelector("head > title"):null)}function Cm(e,t,u){if(u===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function kf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Em(e,t,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var k=cs(m.href),N=t.querySelector(eo(k));if(N){t=N._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ba.bind(e),t.then(e,e)),u.state.loading|=4,u.instance=N,pt(N);return}N=t.ownerDocument||t,m=Cf(m),(k=Ci.get(k))&&Mc(m,k),N=N.createElement("link"),pt(N);var P=N;P._p=new Promise(function(X,ie){P.onload=X,P.onerror=ie}),Ot(N,"link",m),u.instance=N}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(u,t),(t=u.state.preload)&&(u.state.loading&3)===0&&(e.count++,u=ba.bind(e),t.addEventListener("load",u),t.addEventListener("error",u))}}var Tc=0;function Am(e,t){return e.stylesheets&&e.count===0&&Sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(u){var m=setTimeout(function(){if(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend){var N=e.unsuspend;e.unsuspend=null,N()}},6e4+t);0<e.imgBytes&&Tc===0&&(Tc=62500*om());var k=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend)){var N=e.unsuspend;e.unsuspend=null,N()}},(e.imgBytes>Tc?50:800)+t);return e.unsuspend=u,function(){e.unsuspend=null,clearTimeout(m),clearTimeout(k)}}:null}function ba(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var wa=null;function Sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wa=new Map,t.forEach(Mm,e),wa=null,ba.call(e))}function Mm(e,t){if(!(t.state.loading&4)){var u=wa.get(e);if(u)var m=u.get(null);else{u=new Map,wa.set(e,u);for(var k=e.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<k.length;N++){var P=k[N];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(u.set(P.dataset.precedence,P),m=P)}m&&u.set(null,m)}k=t.instance,P=k.getAttribute("data-precedence"),N=u.get(P)||m,N===m&&u.set(null,k),u.set(P,k),this.count++,m=ba.bind(this),k.addEventListener("load",m),k.addEventListener("error",m),N?N.parentNode.insertBefore(k,N.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(k,e.firstChild)),t.state.loading|=4}}var io={$$typeof:y,Provider:null,Consumer:null,_currentValue:O,_currentValue2:O,_threadCount:0};function km(e,t,u,m,k,N,P,X,ie){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zi(0),this.hiddenUpdates=Zi(null),this.identifierPrefix=m,this.onUncaughtError=k,this.onCaughtError=N,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ie,this.incompleteTransitions=new Map}function Tf(e,t,u,m,k,N,P,X,ie,le,de,pe){return e=new km(e,t,u,P,ie,le,de,pe,X),t=1,N===!0&&(t|=24),N=ai(3,null,null,t),e.current=N,N.stateNode=e,t=ll(),t.refCount++,e.pooledCache=t,t.refCount++,N.memoizedState={element:m,isDehydrated:u,cache:t},dl(N),e}function Lf(e){return e?(e=Fr,e):Fr}function Rf(e,t,u,m,k,N){k=Lf(k),m.context===null?m.context=k:m.pendingContext=k,m=Tn(t),m.payload={element:u},N=N===void 0?null:N,N!==null&&(m.callback=N),u=Ln(e,m,t),u!==null&&(Jt(u,e,t),Os(u,e,t))}function Df(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var u=e.retryLane;e.retryLane=u!==0&&u<t?u:t}}function Lc(e,t){Df(e,t),(e=e.alternate)&&Df(e,t)}function $f(e){if(e.tag===13||e.tag===31){var t=hr(e,67108864);t!==null&&Jt(t,e,67108864),Lc(e,67108864)}}function Of(e){if(e.tag===13||e.tag===31){var t=di();t=Ar(t);var u=hr(e,t);u!==null&&Jt(u,e,t),Lc(e,t)}}var xa=!0;function Tm(e,t,u,m){var k=L.T;L.T=null;var N=I.p;try{I.p=2,Rc(e,t,u,m)}finally{I.p=N,L.T=k}}function Lm(e,t,u,m){var k=L.T;L.T=null;var N=I.p;try{I.p=8,Rc(e,t,u,m)}finally{I.p=N,L.T=k}}function Rc(e,t,u,m){if(xa){var k=Dc(m);if(k===null)vc(e,t,m,Ca,u),Bf(e,m);else if(Dm(k,e,t,u,m))m.stopPropagation();else if(Bf(e,m),t&4&&-1<Rm.indexOf(e)){for(;k!==null;){var N=yn(k);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var P=Mi(N.pendingLanes);if(P!==0){var X=N;for(X.pendingLanes|=2,X.entangledLanes|=2;P;){var ie=1<<31-ce(P);X.entanglements[1]|=ie,P&=~ie}Yi(N),(Ve&6)===0&&(oa=lt()+500,Qs(0))}}break;case 31:case 13:X=hr(N,2),X!==null&&Jt(X,N,2),la(),Lc(N,2)}if(N=Dc(m),N===null&&vc(e,t,m,Ca,u),N===k)break;k=N}k!==null&&m.stopPropagation()}else vc(e,t,m,null,u)}}function Dc(e){return e=Dr(e),$c(e)}var Ca=null;function $c(e){if(Ca=null,e=Vt(e),e!==null){var t=R(e);if(t===null)e=null;else{var u=t.tag;if(u===13){if(e=x(t),e!==null)return e;e=null}else if(u===31){if(e=p(t),e!==null)return e;e=null}else if(u===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ca=e,null}function Nf(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Bt()){case pi:return 2;case Ft:return 8;case bt:case Ai:return 32;case ot:return 268435456;default:return 32}default:return 32}}var Oc=!1,Fn=null,Wn=null,Pn=null,no=new Map,ro=new Map,Un=[],Rm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Bf(e,t){switch(e){case"focusin":case"focusout":Fn=null;break;case"dragenter":case"dragleave":Wn=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":no.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ro.delete(t.pointerId)}}function so(e,t,u,m,k,N){return e===null||e.nativeEvent!==N?(e={blockedOn:t,domEventName:u,eventSystemFlags:m,nativeEvent:N,targetContainers:[k]},t!==null&&(t=yn(t),t!==null&&$f(t)),e):(e.eventSystemFlags|=m,t=e.targetContainers,k!==null&&t.indexOf(k)===-1&&t.push(k),e)}function Dm(e,t,u,m,k){switch(t){case"focusin":return Fn=so(Fn,e,t,u,m,k),!0;case"dragenter":return Wn=so(Wn,e,t,u,m,k),!0;case"mouseover":return Pn=so(Pn,e,t,u,m,k),!0;case"pointerover":var N=k.pointerId;return no.set(N,so(no.get(N)||null,e,t,u,m,k)),!0;case"gotpointercapture":return N=k.pointerId,ro.set(N,so(ro.get(N)||null,e,t,u,m,k)),!0}return!1}function jf(e){var t=Vt(e.target);if(t!==null){var u=R(t);if(u!==null){if(t=u.tag,t===13){if(t=x(u),t!==null){e.blockedOn=t,mo(e.priority,function(){Of(u)});return}}else if(t===31){if(t=p(u),t!==null){e.blockedOn=t,mo(e.priority,function(){Of(u)});return}}else if(t===3&&u.stateNode.current.memoizedState.isDehydrated){e.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ea(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var u=Dc(e.nativeEvent);if(u===null){u=e.nativeEvent;var m=new u.constructor(u.type,u);Ri=m,u.target.dispatchEvent(m),Ri=null}else return t=yn(u),t!==null&&$f(t),e.blockedOn=u,!1;t.shift()}return!0}function If(e,t,u){Ea(e)&&u.delete(t)}function $m(){Oc=!1,Fn!==null&&Ea(Fn)&&(Fn=null),Wn!==null&&Ea(Wn)&&(Wn=null),Pn!==null&&Ea(Pn)&&(Pn=null),no.forEach(If),ro.forEach(If)}function Aa(e,t){e.blockedOn===t&&(e.blockedOn=null,Oc||(Oc=!0,W.unstable_scheduleCallback(W.unstable_NormalPriority,$m)))}var Ma=null;function Hf(e){Ma!==e&&(Ma=e,W.unstable_scheduleCallback(W.unstable_NormalPriority,function(){Ma===e&&(Ma=null);for(var t=0;t<e.length;t+=3){var u=e[t],m=e[t+1],k=e[t+2];if(typeof m!="function"){if($c(m||u)===null)continue;break}var N=yn(u);N!==null&&(e.splice(t,3),t-=3,Dl(N,{pending:!0,data:k,method:u.method,action:m},m,k))}}))}function hs(e){function t(ie){return Aa(ie,e)}Fn!==null&&Aa(Fn,e),Wn!==null&&Aa(Wn,e),Pn!==null&&Aa(Pn,e),no.forEach(t),ro.forEach(t);for(var u=0;u<Un.length;u++){var m=Un[u];m.blockedOn===e&&(m.blockedOn=null)}for(;0<Un.length&&(u=Un[0],u.blockedOn===null);)jf(u),u.blockedOn===null&&Un.shift();if(u=(e.ownerDocument||e).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var k=u[m],N=u[m+1],P=k[jt]||null;if(typeof N=="function")P||Hf(u);else if(P){var X=null;if(N&&N.hasAttribute("formAction")){if(k=N,P=N[jt]||null)X=P.formAction;else if($c(k)!==null)continue}else X=P.action;typeof X=="function"?u[m+1]=X:(u.splice(m,3),m-=3),Hf(u)}}}function zf(){function e(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function(P){return k=P})},focusReset:"manual",scroll:"manual"})}function t(){k!==null&&(k(),k=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,k=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),k!==null&&(k(),k=null)}}}function Nc(e){this._internalRoot=e}ka.prototype.render=Nc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));var u=t.current,m=di();Rf(u,m,e,t,null,null)},ka.prototype.unmount=Nc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rf(e.current,2,null,e,null,null),la(),t[vn]=null}};function ka(e){this._internalRoot=e}ka.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fi();e={blockedOn:null,target:e,priority:t};for(var u=0;u<Un.length&&t!==0&&t<Un[u].priority;u++);Un.splice(u,0,e),u===0&&jf(e)}};var Ff=G.version;if(Ff!=="19.2.3")throw Error(D(527,Ff,"19.2.3"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=h(t),e=e!==null?a(e):null,e=e===null?null:e.stateNode,e};var Om={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ta=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ta.isDisabled&&Ta.supportsFiber)try{ti=Ta.inject(Om),Mt=Ta}catch{}}return ao.createRoot=function(e,t){if(!V(e))throw Error(D(299));var u=!1,m="",k=Kh,N=Yh,P=Xh;return t!=null&&(t.unstable_strictMode===!0&&(u=!0),t.identifierPrefix!==void 0&&(m=t.identifierPrefix),t.onUncaughtError!==void 0&&(k=t.onUncaughtError),t.onCaughtError!==void 0&&(N=t.onCaughtError),t.onRecoverableError!==void 0&&(P=t.onRecoverableError)),t=Tf(e,1,!1,null,null,u,m,null,k,N,P,zf),e[vn]=t.current,mc(e),new Nc(t)},ao.hydrateRoot=function(e,t,u){if(!V(e))throw Error(D(299));var m=!1,k="",N=Kh,P=Yh,X=Xh,ie=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(k=u.identifierPrefix),u.onUncaughtError!==void 0&&(N=u.onUncaughtError),u.onCaughtError!==void 0&&(P=u.onCaughtError),u.onRecoverableError!==void 0&&(X=u.onRecoverableError),u.formState!==void 0&&(ie=u.formState)),t=Tf(e,1,!0,t,u??null,m,k,ie,N,P,X,zf),t.context=Lf(null),u=t.current,m=di(),m=Ar(m),k=Tn(m),k.callback=null,Ln(u,k,m),u=m,t.current.lanes=u,tr(t,u),Yi(t),e[vn]=t.current,mc(e),new ka(t)},ao.version="19.2.3",ao}var qf;function Vm(){if(qf)return Ic.exports;qf=1;function W(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(W)}catch(G){console.error(G)}}return W(),Ic.exports=Um(),Ic.exports}var Gm=Vm();const Op=({className:W="w-10 h-10"})=>B.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",fill:"none",className:W,children:[B.jsxs("defs",{children:[B.jsxs("linearGradient",{id:"logoGradient",x1:"20",y1:"20",x2:"180",y2:"180",gradientUnits:"userSpaceOnUse",children:[B.jsx("stop",{offset:"0%",stopColor:"#60A5FA"}),B.jsx("stop",{offset:"100%",stopColor:"#C084FC"})]}),B.jsxs("filter",{id:"logoGlow",x:"-20%",y:"-20%",width:"140%",height:"140%",children:[B.jsx("feGaussianBlur",{stdDeviation:"5",result:"blur"}),B.jsx("feComposite",{in:"SourceGraphic",in2:"blur",operator:"over"})]})]}),B.jsx("path",{d:"M100 20 L170 60 V140 L100 180 L30 140 V60 Z",fill:"url(#logoGradient)",fillOpacity:"0.15",stroke:"url(#logoGradient)",strokeWidth:"12",strokeLinejoin:"round",filter:"url(#logoGlow)"}),B.jsx("line",{x1:"100",y1:"100",x2:"100",y2:"55",stroke:"white",strokeWidth:"10",strokeLinecap:"round"}),B.jsx("line",{x1:"100",y1:"100",x2:"140",y2:"100",stroke:"white",strokeWidth:"10",strokeLinecap:"round"}),B.jsx("circle",{cx:"100",cy:"100",r:"12",fill:"white"}),B.jsx("path",{d:"M160 100 A 60 60 0 0 1 40 100",stroke:"url(#logoGradient)",strokeWidth:"6",strokeLinecap:"round",strokeDasharray:"10 10",opacity:"0.8"})]}),Km={},Zf=W=>{let G;const $=new Set,D=(a,i)=>{const r=typeof a=="function"?a(G):a;if(!Object.is(r,G)){const o=G;G=i??(typeof r!="object"||r===null)?r:Object.assign({},G,r),$.forEach(s=>s(G,o))}},V=()=>G,c={setState:D,getState:V,getInitialState:()=>h,subscribe:a=>($.add(a),()=>$.delete(a)),destroy:()=>{(Km?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),$.clear()}},h=G=W(D,V,c);return c},Ym=W=>W?Zf(W):Zf;var Wc={exports:{}},Pc={},Uc={exports:{}},Vc={};var Jf;function Xm(){if(Jf)return Vc;Jf=1;var W=Qn();function G(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var $=typeof Object.is=="function"?Object.is:G,D=W.useState,V=W.useEffect,R=W.useLayoutEffect,x=W.useDebugValue;function p(i,r){var o=r(),s=D({inst:{value:o,getSnapshot:r}}),l=s[0].inst,n=s[1];return R(function(){l.value=o,l.getSnapshot=r,c(l)&&n({inst:l})},[i,o,r]),V(function(){return c(l)&&n({inst:l}),i(function(){c(l)&&n({inst:l})})},[i]),x(o),o}function c(i){var r=i.getSnapshot;i=i.value;try{var o=r();return!$(i,o)}catch{return!0}}function h(i,r){return r()}var a=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:p;return Vc.useSyncExternalStore=W.useSyncExternalStore!==void 0?W.useSyncExternalStore:a,Vc}var ep;function Qm(){return ep||(ep=1,Uc.exports=Xm()),Uc.exports}var tp;function qm(){if(tp)return Pc;tp=1;var W=Qn(),G=Qm();function $(h,a){return h===a&&(h!==0||1/h===1/a)||h!==h&&a!==a}var D=typeof Object.is=="function"?Object.is:$,V=G.useSyncExternalStore,R=W.useRef,x=W.useEffect,p=W.useMemo,c=W.useDebugValue;return Pc.useSyncExternalStoreWithSelector=function(h,a,i,r,o){var s=R(null);if(s.current===null){var l={hasValue:!1,value:null};s.current=l}else l=s.current;s=p(function(){function d(g){if(!f){if(f=!0,y=g,g=r(g),o!==void 0&&l.hasValue){var w=l.value;if(o(w,g))return _=w}return _=g}if(w=_,D(y,g))return w;var b=r(g);return o!==void 0&&o(w,b)?(y=g,w):(y=g,_=b)}var f=!1,y,_,v=i===void 0?null:i;return[function(){return d(a())},v===null?void 0:function(){return d(v())}]},[a,i,r,o]);var n=V(h,s[0],s[1]);return x(function(){l.hasValue=!0,l.value=n},[n]),c(n),n},Pc}var ip;function Zm(){return ip||(ip=1,Wc.exports=qm()),Wc.exports}var Jm=Zm();const ev=hu(Jm),Np={},{useDebugValue:tv}=Hm,{useSyncExternalStoreWithSelector:iv}=ev;let np=!1;const nv=W=>W;function rv(W,G=nv,$){(Np?"production":void 0)!=="production"&&$&&!np&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),np=!0);const D=iv(W.subscribe,W.getState,W.getServerState||W.getInitialState,G,$);return tv(D),D}const sv=W=>{(Np?"production":void 0)!=="production"&&typeof W!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const G=typeof W=="function"?Ym(W):W,$=(D,V)=>rv(G,D,V);return Object.assign($,G),$},qn=W=>sv,Zn=W=>{let G=W;G.use={};for(let $ of Object.keys(G.getState()))G.use[$]=()=>G(D=>D[$]);return G},st={scanWorkspace:"scanworkspace",runCmdDev:"runcmddev",stopProcess:"stopprocess",listWorkspacesDir:"listworkspacedirs",newWorkspace:"newworkspace",interactvTerminal:"interactvterminal",stopInteractiveTerminal:"stopinteractiveterminal",stopTerminalWorkspace:"stopTerminalWorkspace",hideShowFileFolder:"hideshowfilefolder",updateWorkspace:"updateworkspace",getRootPath:"getrootpath",scaffoldRepo:"scaffoldrepo",turborepoExist:"turborepoexist",firstRun:"firstrun",notes:"notes",crudTest:"crudtest",gitControl:"gitcontrol",initMonorepoTime:"initmtime",processTree:"processtree",docker:"docker",availabletemplates:"availabletemplates",setWorkspaceTemplate:"setworkspacetemplate"},ov=4793,Ke={apiPort:ov,serverPath:"/",useDemo:!1},av=qn()((W,G)=>({showTerminal:!1,setShowTerminal:$=>W({showTerminal:$}),rootDir:"",showAboutModal:!1,setShowAboutModal:$=>W({showAboutModal:$}),loadRootDir:async()=>{if(!(G().rootDir.length>0))try{const D=await(await fetch(`${Ke.serverPath}${st.getRootPath}`)).json();W({rootDir:D.path})}catch{}},checkIfFirstTime:async()=>{try{return(await(await fetch(`${Ke.serverPath}${st.firstRun}`)).json()).isFirstTime}catch{return!1}},initMonorepoTime:async()=>{try{await fetch(`${Ke.serverPath}${st.initMonorepoTime}`)}catch($){console.error("Error initializing Monorepo Time:",$)}},notes:"",noteNotFound:!0,setNotes:$=>W({notes:$}),loadNotes:async()=>{try{const $=await fetch(`${Ke.serverPath}${st.notes}`);if(!$.ok){W({noteNotFound:!0});return}const D=await $.json();W({notes:D.notes,noteNotFound:!1})}catch{W({noteNotFound:!0})}},saveNotes:async()=>{try{await fetch(`${Ke.serverPath}${st.notes}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({notes:G().notes})})}catch($){console.error("Error saving notes:",$)}},scaffoldRepo:async()=>await(await fetch(`${Ke.serverPath}${st.scaffoldRepo}`)).json(),hideShowFileFolder:async($,D)=>await(await fetch(`${Ke.serverPath}${st.hideShowFileFolder}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hide:$,pathInclude:D})})).json(),getTemplates:async()=>await(await fetch(`${Ke.serverPath}${st.availabletemplates}`)).json()})),Et=Zn(av);function Bp(){const W=Et.use.setShowAboutModal();return B.jsx("header",{className:"h-12 w-full px-6 py-2 sticky top-0",children:B.jsxs("div",{className:"flex items-center justify-between gap-4 h-full",children:[B.jsxs("div",{className:"flex items-center gap-4",children:[B.jsx(Op,{className:"w-8 h-8"}),B.jsx("div",{children:B.jsxs("h1",{className:"font-bold text-lg tracking-wide text-white",children:["Monorepo",B.jsx("span",{className:"pl-2 text-transparent bg-clip-text bg-gradient-to-r from-blue-400 via-purple-400 to-pink-400",children:"Time"})]})})]}),B.jsxs("button",{onClick:()=>W(!0),className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-white/5 border border-white/10 text-xs font-medium text-gray-300 hover:text-white hover:bg-white/10 transition-all group",children:[B.jsx("i",{className:"fas fa-info-circle text-blue-400 group-hover:text-blue-300"}),B.jsx("span",{children:"About"})]})]})})}function lv(W){return B.jsxs("nav",{className:"w-16 h-full flex flex-col items-center py-4",children:[B.jsx("div",{className:"flex flex-col gap-2 w-full px-2",children:W.navs.map(G=>B.jsx(rp,{isSelected:G.isSelected,icon:G.icon,name:G.name,label:G.label,onClick:()=>G.onClick()},G.name))}),B.jsx("div",{className:"h-full flex flex-col justify-end gap-2 mb-16",children:W.extraNavs?.map(G=>B.jsx(rp,{isSelected:G.isSelected,icon:G.icon,name:G.name,label:G.label,onClick:()=>G.onClick()},G.name))})]})}function rp(W){const G=W.isSelected?"bg-gradient-to-br from-blue-600/50 to-indigo-400/50 text-white shadow-[0_0_20px_-5px_rgba(124,58,237,0.5)] ring-1 ring-white/20":"text-gray-400 hover:bg-white/5 hover:text-white";return B.jsxs("button",{className:`nav-item group relative flex items-center justify-center w-12 h-12 rounded-xl transition-all duration-300 outline-none ${G}`,onClick:W.onClick,children:[B.jsx("i",{className:`${W.icon} text-lg transition-transform duration-200 group-hover:scale-110`}),B.jsxs("div",{className:"z-50 absolute bg-black/90 backdrop-blur-md left-14 px-3 py-1.5 text-white text-sm font-medium rounded-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 translate-x-2 group-hover:translate-x-0 shadow-xl border border-white/10 whitespace-nowrap",children:[W.label,B.jsx("div",{className:"absolute left-0 top-1/2 -translate-x-1 -translate-y-1/2 w-2 h-2 bg-black/90 border-l border-b border-white/10 rotate-45"})]})]})}function Gc({children:W,className:G}){return B.jsx("div",{className:`bg-gray-800/40 backdrop-blur-md border border-gray-700/50 rounded-2xl p-6 flex flex-col ${G}`,children:W})}const cv=qn()((W,G)=>({dockerprocessInfo:[],loadDockerProcessInfo:async()=>{try{const D=await(await fetch(`${Ke.serverPath}${st.docker}`)).json();W({dockerprocessInfo:D.containers})}catch($){console.error("Failed to load docker info",$)}},stopDockerContainer:async $=>{try{await fetch(`${Ke.serverPath}${st.docker}/stop`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:$})}),await G().loadDockerProcessInfo()}catch(D){console.error("Failed to stop container",D)}},stopAllDockerContainers:async()=>{try{await fetch(`${Ke.serverPath}${st.docker}/stop-all`,{method:"POST"}),await G().loadDockerProcessInfo()}catch($){console.error("Failed to stop all containers",$)}}})),La=Zn(cv);function uv(){const W=La.use.dockerprocessInfo(),G=La.use.loadDockerProcessInfo(),$=La.use.stopDockerContainer(),D=La.use.stopAllDockerContainers();_e.useEffect(()=>{G();const x=setInterval(()=>{G()},5e3);return()=>clearInterval(x)},[]);const V=W.reduce((x,p)=>x+(p.memoryBytes||0),0),R=Math.round(V/1024/1024);return B.jsxs("div",{className:"h-[420px] overflow-hidden flex flex-col",children:[B.jsxs("div",{className:"flex items-center justify-between mb-4 flex-none",children:[B.jsx("i",{className:"fab fa-docker text-blue-400"}),B.jsxs("div",{className:"flex items-center gap-3",children:[W.length>0&&B.jsxs("button",{id:"docker-stop-all-btn",onClick:()=>D(),className:"text-xs px-2 py-0.5 rounded bg-red-900/30 hover:bg-red-800/50 text-red-400 hover:text-red-200 transition-colors border border-red-800/30",title:"Stop All Containers",children:[B.jsx("i",{className:"fas fa-power-off"})," Stop All"]}),B.jsx("span",{id:"docker-mem-total",className:"text-xs text-blue-400 font-mono"}),B.jsxs("span",{id:"docker-count",className:"text-xs text-gray-400 font-mono",children:["Total RAM: ",R," MB (",W.length," active)"]})]})]}),B.jsxs("div",{className:"overflow-y-auto flex-1 space-y-2 pr-1 custom-scrollbar",id:"docker-list-container",children:[W.length===0&&B.jsx("div",{className:"text-center text-xs text-gray-600 py-2",children:"No active containers"}),W.map((x,p)=>B.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-gray-900/40 border border-gray-700/30 text-xs",children:[B.jsxs("div",{className:"flex flex-col gap-0.5 overflow-hidden",children:[B.jsxs("div",{className:"flex items-center gap-2",children:[B.jsx("i",{className:"fab fa-docker text-blue-500"}),B.jsx("span",{className:"text-gray-200 font-bold truncate",title:x.name,children:x.name})]}),B.jsx("span",{className:"text-gray-500 text-[10px] truncate",title:x.image,children:x.image})]}),B.jsxs("div",{className:"flex items-center gap-3 flex-none ml-2",children:[B.jsxs("div",{className:"flex flex-col items-end gap-0.5",children:[B.jsx("span",{className:"text-[10px] text-gray-400 font-mono",children:x.memoryStr}),B.jsx("span",{className:`text-[10px] font-medium ${x.status.startsWith("Up")?"text-green-400":"text-gray-400"}`,children:x.status})]}),B.jsx("button",{onClick:()=>$(x.id),className:"p-1 rounded hover:bg-red-500/20 text-gray-500 hover:text-red-400 transition-colors",title:"Stop Container",children:B.jsx("i",{className:"fas fa-power-off"})})]})]},p))]})]})}const hv=qn()(W=>({childprocessInfo:[],totalRam:0,peakRam:0,loadChildProcessInfo:async()=>{try{const D=(await(await fetch(`${Ke.serverPath}${st.processTree}`)).json()).processes.map(R=>{let x=R.name;if(x.startsWith("Terminal (")&&x.endsWith(")")){const p=x.match(/Terminal \(\s*(.*?)\s*\)/);p&&p[1]&&(x=p[1])}return{name:x,pid:R.pid,mem:Math.round(R.memory/1024/1024)}}),V=D.reduce((R,x)=>R+x.mem,0);W(R=>{const x=V>R.peakRam?V:R.peakRam;return{childprocessInfo:D,totalRam:V,peakRam:x}})}catch(G){console.error("Failed to load process info",G)}}})),Ra=Zn(hv);function dv(){const W=Ra.use.childprocessInfo(),G=Ra.use.totalRam(),$=Ra.use.peakRam(),D=Ra.use.loadChildProcessInfo();return _e.useEffect(()=>{const V=setInterval(async()=>{await D()},5e3);return()=>clearInterval(V)},[]),B.jsxs("div",{className:"h-[420px]",children:[B.jsx("div",{className:"flex items-center justify-between mb-4",children:B.jsxs("h2",{className:"text-lg font-bold text-white flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-chart-line text-blue-500"}),"Processes Memory Usage"]})}),B.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[B.jsxs("div",{className:"bg-gray-900/50 rounded-lg p-3 border border-gray-700/30",children:[B.jsx("div",{className:"text-gray-400 text-[10px] uppercase",children:"Current RAM"}),B.jsxs("div",{className:"text-xl font-bold text-white font-mono",children:[G," MB"]})]}),B.jsxs("div",{className:"bg-gray-900/50 rounded-lg p-3 border border-gray-700/30",children:[B.jsx("div",{className:"text-gray-400 text-[10px] uppercase",children:"Peak RAM"}),B.jsxs("div",{className:"text-xl font-bold text-pink-400 font-mono",children:[$," MB"]})]})]}),B.jsxs("div",{className:"flex-none h-full overflow-hidden flex flex-col",children:[B.jsxs("div",{className:"text-xs text-gray-400 uppercase mb-2 font-bold tracking-wider flex justify-between",children:["Top Processes",B.jsxs("span",{className:"text-xs text-gray-400 font-mono",children:[W.length," Active"]})]}),B.jsxs("div",{className:"overflow-y-auto flex-1 space-y-1 pr-1 custom-scrollbar",children:[W.length===0&&B.jsx("div",{className:"text-center text-xs text-gray-600 py-2",children:"Loading..."}),W.map((V,R)=>B.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-gray-900/40 hover:bg-gray-800/60 border border-transparent hover:border-gray-700 transition-colors text-xs",children:[B.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[B.jsx("i",{className:"fas fa-boxes w-4 text-center"}),B.jsx("span",{className:"text-gray-300 font-mono truncate",children:V.name})]}),B.jsxs("div",{className:"flex items-center gap-3 flex-none",children:[B.jsx("span",{className:"px-1.5 py-0.5 rounded bg-gray-800 text-[10px] text-gray-500",children:V.pid}),B.jsxs("span",{className:"font-mono text-white w-20 text-right",children:[B.jsx("span",{className:"text-orange-500",children:V.mem})," MB"]})]})]},R+V.name))]})]})]})}function fv({isVisible:W}){const G=Et.use.notes(),$=Et.use.noteNotFound(),D=Et.use.loadNotes(),V=Et.use.setNotes(),R=Et.use.saveNotes();return _e.useEffect(()=>{W&&D()},[W]),_e.useEffect(()=>{const x=setTimeout(()=>{$||R()},2e3);return()=>clearTimeout(x)},[G,$,R]),$?B.jsxs("div",{children:[B.jsx("h3",{className:"font-bold text-gray-200",children:"Notes"}),B.jsx("p",{className:"text-gray-400",children:"monorepotime.json not found"})]}):B.jsxs("div",{className:"h-[420px] overflow-y-auto flex flex-col",children:[B.jsx("div",{className:"flex items-center justify-between",children:B.jsxs("div",{className:"flex items-center gap-3",children:[B.jsx("div",{className:"w-8 h-8 rounded-lg bg-yellow-500/10 flex items-center justify-center",children:B.jsx("i",{className:"fas fa-sticky-note text-yellow-500"})}),B.jsx("h3",{className:"font-bold text-gray-200",children:"Notes"})]})}),B.jsx("textarea",{value:G,onChange:x=>V(x.target.value),placeholder:"Write your project notes, todos, or ideas here...",className:"flex-1 w-full p-4 bg-transparent border-none outline-none resize-none text-gray-300 placeholder-gray-600 font-mono text-sm leading-relaxed",spellCheck:!1})]})}function pv(W){return B.jsx("div",{className:`h-full w-full ${W.isVisible?"block":"hidden"}`,children:B.jsx("div",{className:"relative px-6 py-8 space-y-8 animate-fade-in max-w-[1600px] mx-auto",children:B.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-6",children:[B.jsx("div",{className:"lg:col-span-4 flex flex-col gap-6 h-[400px]",children:B.jsx(Gc,{children:B.jsx(fv,{isVisible:W.isVisible})})}),B.jsx("div",{className:"lg:col-span-4 flex flex-col gap-6",children:B.jsx(Gc,{children:B.jsx(dv,{})})}),B.jsx("div",{className:"lg:col-span-4 flex flex-col gap-6",children:B.jsx(Gc,{children:B.jsx(uv,{})})})]})})})}const gv=qn()(W=>({currentPage:"dashboard",action:{setCurrentPage:G=>W({currentPage:G})}})),sp=Zn(gv),mv="modulepreload",vv=function(W){return"/"+W},op={},jp=function(G,$,D){let V=Promise.resolve();if($&&$.length>0){let h=function(a){return Promise.all(a.map(i=>Promise.resolve(i).then(r=>({status:"fulfilled",value:r}),r=>({status:"rejected",reason:r}))))};var x=h;document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),c=p?.nonce||p?.getAttribute("nonce");V=h($.map(a=>{if(a=vv(a),a in op)return;op[a]=!0;const i=a.endsWith(".css"),r=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${r}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":mv,i||(o.as="script"),o.crossOrigin="",o.href=a,c&&o.setAttribute("nonce",c),document.head.appendChild(o),i)return new Promise((s,l)=>{o.addEventListener("load",s),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${a}`)))})}))}function R(p){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=p,window.dispatchEvent(c),!c.defaultPrevented)throw p}return V.then(p=>{for(const c of p||[])c.status==="rejected"&&R(c.reason);return G().catch(R)})},yv=qn()((W,G)=>({workspace:[],workspaceLoading:!1,activeTerminal:"",activeWorkspaceOptionModal:null,loadingWorkspace:null,loading:!1,showWorkspaceNew:!1,showNewTerminalWindow:null,loadMessage:"",setWorkspaceLoading:$=>{W({workspaceLoading:$})},setShowNewTerminalWindow:$=>{W({showNewTerminalWindow:$})},setActiveWorkspaceOptionModal:$=>{W({activeWorkspaceOptionModal:$})},setActiveTerminal:$=>{W({activeTerminal:$})},setShowWorkspaceNew:$=>{W({showWorkspaceNew:$})},setWorkSpaceRunningAs:($,D)=>{G().workspace.find(R=>R.info.name===$)&&W({workspace:G().workspace.map(R=>R.info.name===$?{...R,isRunningAs:D}:R)})},loadWorkspace:async()=>{if(!G().loading){W({loading:!0});try{const D=await fetch(`${Ke.serverPath}${st.scanWorkspace}`);let V=await D.json();if(!D.ok)throw new Error("Failed to fetch workspace");const R=[],x=G().workspace;V.workspace.forEach(c=>{x.find(h=>h.info.name===c.name)?R.push({isRunningAs:x.find(h=>h.info.name===c.name)?.isRunningAs??null,info:c}):R.push({isRunningAs:null,info:c})});const p=R.sort((c,h)=>c.info.name<h.info.name?-1:c.info.name>h.info.name?1:0);W({workspace:p})}catch(D){console.error("Error fetching workspace:",D)}W({loading:!1})}},stopProcess:async $=>{if(G().loadingWorkspace!=$){W({loadingWorkspace:$});try{if(!(await fetch(`${Ke.serverPath}${st.stopProcess}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:{name:$}})})).ok)throw new Error("Failed to stop process")}catch(V){console.error("Error stopping process:",V)}W({loadingWorkspace:null})}},stopInteractiveTerminal:async($,D)=>{if(G().loadingWorkspace!=$){W({loadingWorkspace:$});try{if(!(await fetch(`${Ke.serverPath}${st.stopInteractiveTerminal}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:{name:$}})})).ok)throw new Error("Failed to stop interactive terminal");D||await new Promise(x=>setTimeout(x,1e3))}catch(R){console.error("Error stopping interactive terminal:",R)}W({loadingWorkspace:null})}},stopWorkspaceTerminal:async($,D)=>{if(G().loadingWorkspace==$)return;W({loadingWorkspace:$});const x=G().workspace.find(p=>p.info.name===$)?.info.path;try{const p=await fetch(`${Ke.serverPath}${st.stopTerminalWorkspace}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:{name:$,path:x}})});if(!p.ok){let c="Failed to stop interactive terminal";try{const h=await p.text();try{const a=JSON.parse(h);c=a.message||a.error||c}catch{h&&(c=h)}}catch{}throw console.error("[Frontend] Backend error:",c),new Error(c)}D||await new Promise(c=>setTimeout(c,1e3))}catch(p){console.error("Error stopping interactive terminal:",p)}W({loadingWorkspace:null})},listWorkspace:async()=>{try{const $=await fetch(`${Ke.serverPath}${st.listWorkspacesDir}`);if(!$.ok)throw new Error("Failed to list workspace");return await $.json()}catch($){return console.error("Error listing workspace:",$),[]}},createNewWorkspace:async $=>{try{return await(await fetch(`${Ke.serverPath}${st.newWorkspace}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json(),!0}catch{return!1}},updateWorkspace:async $=>{try{return await(await fetch(`${Ke.serverPath}${st.updateWorkspace}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json(),!0}catch{return!1}},setWorkspaceTemplate:async($,D)=>{window.isLoadingCancelled=!1;const{io:V}=await jp(async()=>{const{io:R}=await import("./index-Crsm9Fe1.js");return{io:R}},[]);return new Promise((R,x)=>{const p=V(Ke.serverPath,{transports:["websocket"],forceNew:!0,reconnection:!1});W({loadMessage:"Connecting..."}),p.on("connect",()=>{W({loadMessage:`Starting template '${D}'...`}),p.emit("template:start",{workspace:$,templatename:D}),window.isLoadingCancelled&&(p.disconnect(),x(new Error("Loading cancelled")))}),p.on("template:progress",c=>{W({loadMessage:c.message}),console.log("[Template Progress]",c.message),window.isLoadingCancelled&&(p.disconnect(),x(new Error("Loading cancelled")))}),p.on("template:success",c=>{W({loadMessage:c.message}),console.log("[Template Success]",c.message),p.disconnect(),R()}),p.on("template:error",c=>{W({loadMessage:`Error: ${c.error}`}),console.error("[Template Error]",c.error),p.disconnect(),x(new Error(c.error))}),p.on("connect_error",c=>{W({loadMessage:`Connection error: ${c.message}`}),console.error("[Template Connect Error]",c),p.disconnect(),x(c)}),setTimeout(()=>{p.connected&&(p.disconnect(),W({loadMessage:"Template setup timed out"}),x(new Error("Template setup timed out")))},300*1e3)})}})),Fe=Zn(yv);var Kc={exports:{}},ap;function _v(){return ap||(ap=1,(function(W,G){(function($,D){W.exports=D()})(self,(()=>(()=>{var $={4567:function(x,p,c){var h=this&&this.__decorate||function(y,_,v,g){var w,b=arguments.length,S=b<3?_:g===null?g=Object.getOwnPropertyDescriptor(_,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,_,v,g);else for(var T=y.length-1;T>=0;T--)(w=y[T])&&(S=(b<3?w(S):b>3?w(_,v,S):w(_,v))||S);return b>3&&S&&Object.defineProperty(_,v,S),S},a=this&&this.__param||function(y,_){return function(v,g){_(v,g,y)}};Object.defineProperty(p,"__esModule",{value:!0}),p.AccessibilityManager=void 0;const i=c(9042),r=c(6114),o=c(9924),s=c(844),l=c(5596),n=c(4725),d=c(3656);let f=p.AccessibilityManager=class extends s.Disposable{constructor(y,_){super(),this._terminal=y,this._renderService=_,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new o.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((v=>this._handleResize(v.rows)))),this.register(this._terminal.onRender((v=>this._refreshRows(v.start,v.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((v=>this._handleChar(v)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
10
- `)))),this.register(this._terminal.onA11yTab((v=>this._handleTab(v)))),this.register(this._terminal.onKey((v=>this._handleKey(v.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new l.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener((()=>this._refreshRowsDimensions())),this.register((0,d.addDisposableDomListener)(window,"resize",(()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,s.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(y){for(let _=0;_<y;_++)this._handleChar(" ")}_handleChar(y){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==y&&(this._charsToAnnounce+=y):this._charsToAnnounce+=y,y===`
11
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=i.tooMuchOutput)),r.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((()=>{this._accessibilityContainer.appendChild(this._liveRegion)}),0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,r.isMac&&this._liveRegion.remove()}_handleKey(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,_){this._liveRegionDebouncer.refresh(y,_,this._terminal.rows)}_renderRows(y,_){const v=this._terminal.buffer,g=v.lines.length.toString();for(let w=y;w<=_;w++){const b=v.translateBufferLineToString(v.ydisp+w,!0),S=(v.ydisp+w+1).toString(),T=this._rowElements[w];T&&(b.length===0?T.innerText=" ":T.textContent=b,T.setAttribute("aria-posinset",S),T.setAttribute("aria-setsize",g))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,_){const v=y.target,g=this._rowElements[_===0?1:this._rowElements.length-2];if(v.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==g)return;let w,b;if(_===0?(w=v,b=this._rowElements.pop(),this._rowContainer.removeChild(b)):(w=this._rowElements.shift(),b=v,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),b.removeEventListener("focus",this._bottomBoundaryFocusListener),_===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);for(;this._rowElements.length>y;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=document.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let y=0;y<this._terminal.rows;y++)this._refreshRowDimensions(this._rowElements[y])}}_refreshRowDimensions(y){y.style.height=`${this._renderService.dimensions.css.cell.height}px`}};p.AccessibilityManager=f=h([a(1,n.IRenderService)],f)},3614:(x,p)=>{function c(r){return r.replace(/\r?\n/g,"\r")}function h(r,o){return o?"\x1B[200~"+r+"\x1B[201~":r}function a(r,o,s,l){r=h(r=c(r),s.decPrivateModes.bracketedPasteMode&&l.rawOptions.ignoreBracketedPasteMode!==!0),s.triggerDataEvent(r,!0),o.value=""}function i(r,o,s){const l=s.getBoundingClientRect(),n=r.clientX-l.left-10,d=r.clientY-l.top-10;o.style.width="20px",o.style.height="20px",o.style.left=`${n}px`,o.style.top=`${d}px`,o.style.zIndex="1000",o.focus()}Object.defineProperty(p,"__esModule",{value:!0}),p.rightClickHandler=p.moveTextAreaUnderMouseCursor=p.paste=p.handlePasteEvent=p.copyHandler=p.bracketTextForPaste=p.prepareTextForTerminal=void 0,p.prepareTextForTerminal=c,p.bracketTextForPaste=h,p.copyHandler=function(r,o){r.clipboardData&&r.clipboardData.setData("text/plain",o.selectionText),r.preventDefault()},p.handlePasteEvent=function(r,o,s,l){r.stopPropagation(),r.clipboardData&&a(r.clipboardData.getData("text/plain"),o,s,l)},p.paste=a,p.moveTextAreaUnderMouseCursor=i,p.rightClickHandler=function(r,o,s,l,n){i(r,o,s),n&&l.rightClickSelect(r),o.value=l.selectionText,o.select()}},7239:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ColorContrastCache=void 0;const h=c(1505);p.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(a,i,r){this._css.set(a,i,r)}getCss(a,i){return this._css.get(a,i)}setColor(a,i,r){this._color.set(a,i,r)}getColor(a,i){return this._color.get(a,i)}clear(){this._color.clear(),this._css.clear()}}},3656:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.addDisposableDomListener=void 0,p.addDisposableDomListener=function(c,h,a,i){c.addEventListener(h,a,i);let r=!1;return{dispose:()=>{r||(r=!0,c.removeEventListener(h,a,i))}}}},6465:function(x,p,c){var h=this&&this.__decorate||function(n,d,f,y){var _,v=arguments.length,g=v<3?d:y===null?y=Object.getOwnPropertyDescriptor(d,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,d,f,y);else for(var w=n.length-1;w>=0;w--)(_=n[w])&&(g=(v<3?_(g):v>3?_(d,f,g):_(d,f))||g);return v>3&&g&&Object.defineProperty(d,f,g),g},a=this&&this.__param||function(n,d){return function(f,y){d(f,y,n)}};Object.defineProperty(p,"__esModule",{value:!0}),p.Linkifier2=void 0;const i=c(3656),r=c(8460),o=c(844),s=c(2585);let l=p.Linkifier2=class extends o.Disposable{get currentLink(){return this._currentLink}constructor(n){super(),this._bufferService=n,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new r.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new r.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,o.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,o.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(n){return this._linkProviders.push(n),{dispose:()=>{const d=this._linkProviders.indexOf(n);d!==-1&&this._linkProviders.splice(d,1)}}}attachToDom(n,d,f){this._element=n,this._mouseService=d,this._renderService=f,this.register((0,i.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,i.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,i.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,i.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(n){if(this._lastMouseEvent=n,!this._element||!this._mouseService)return;const d=this._positionFromMouseEvent(n,this._element,this._mouseService);if(!d)return;this._isMouseOut=!1;const f=n.composedPath();for(let y=0;y<f.length;y++){const _=f[y];if(_.classList.contains("xterm"))break;if(_.classList.contains("xterm-hover"))return}this._lastBufferCell&&d.x===this._lastBufferCell.x&&d.y===this._lastBufferCell.y||(this._handleHover(d),this._lastBufferCell=d)}_handleHover(n){if(this._activeLine!==n.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(n,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,n)||(this._clearCurrentLink(),this._askForLink(n,!0))}_askForLink(n,d){var f,y;this._activeProviderReplies&&d||((f=this._activeProviderReplies)===null||f===void 0||f.forEach((v=>{v?.forEach((g=>{g.link.dispose&&g.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=n.y);let _=!1;for(const[v,g]of this._linkProviders.entries())d?!((y=this._activeProviderReplies)===null||y===void 0)&&y.get(v)&&(_=this._checkLinkProviderResult(v,n,_)):g.provideLinks(n.y,(w=>{var b,S;if(this._isMouseOut)return;const T=w?.map((j=>({link:j})));(b=this._activeProviderReplies)===null||b===void 0||b.set(v,T),_=this._checkLinkProviderResult(v,n,_),((S=this._activeProviderReplies)===null||S===void 0?void 0:S.size)===this._linkProviders.length&&this._removeIntersectingLinks(n.y,this._activeProviderReplies)}))}_removeIntersectingLinks(n,d){const f=new Set;for(let y=0;y<d.size;y++){const _=d.get(y);if(_)for(let v=0;v<_.length;v++){const g=_[v],w=g.link.range.start.y<n?0:g.link.range.start.x,b=g.link.range.end.y>n?this._bufferService.cols:g.link.range.end.x;for(let S=w;S<=b;S++){if(f.has(S)){_.splice(v--,1);break}f.add(S)}}}}_checkLinkProviderResult(n,d,f){var y;if(!this._activeProviderReplies)return f;const _=this._activeProviderReplies.get(n);let v=!1;for(let g=0;g<n;g++)this._activeProviderReplies.has(g)&&!this._activeProviderReplies.get(g)||(v=!0);if(!v&&_){const g=_.find((w=>this._linkAtPosition(w.link,d)));g&&(f=!0,this._handleNewLink(g))}if(this._activeProviderReplies.size===this._linkProviders.length&&!f)for(let g=0;g<this._activeProviderReplies.size;g++){const w=(y=this._activeProviderReplies.get(g))===null||y===void 0?void 0:y.find((b=>this._linkAtPosition(b.link,d)));if(w){f=!0,this._handleNewLink(w);break}}return f}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(n){if(!this._element||!this._mouseService||!this._currentLink)return;const d=this._positionFromMouseEvent(n,this._element,this._mouseService);d&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,d)&&this._currentLink.link.activate(n,this._currentLink.link.text)}_clearCurrentLink(n,d){this._element&&this._currentLink&&this._lastMouseEvent&&(!n||!d||this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=d)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,o.disposeArray)(this._linkCacheDisposables))}_handleNewLink(n){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const d=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);d&&this._linkAtPosition(n.link,d)&&(this._currentLink=n,this._currentLink.state={decorations:{underline:n.link.decorations===void 0||n.link.decorations.underline,pointerCursor:n.link.decorations===void 0||n.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,n.link,this._lastMouseEvent),n.link.decorations={},Object.defineProperties(n.link.decorations,{pointerCursor:{get:()=>{var f,y;return(y=(f=this._currentLink)===null||f===void 0?void 0:f.state)===null||y===void 0?void 0:y.decorations.pointerCursor},set:f=>{var y,_;!((y=this._currentLink)===null||y===void 0)&&y.state&&this._currentLink.state.decorations.pointerCursor!==f&&(this._currentLink.state.decorations.pointerCursor=f,this._currentLink.state.isHovered&&((_=this._element)===null||_===void 0||_.classList.toggle("xterm-cursor-pointer",f)))}},underline:{get:()=>{var f,y;return(y=(f=this._currentLink)===null||f===void 0?void 0:f.state)===null||y===void 0?void 0:y.decorations.underline},set:f=>{var y,_,v;!((y=this._currentLink)===null||y===void 0)&&y.state&&((v=(_=this._currentLink)===null||_===void 0?void 0:_.state)===null||v===void 0?void 0:v.decorations.underline)!==f&&(this._currentLink.state.decorations.underline=f,this._currentLink.state.isHovered&&this._fireUnderlineEvent(n.link,f))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((f=>{if(!this._currentLink)return;const y=f.start===0?0:f.start+1+this._bufferService.buffer.ydisp,_=this._bufferService.buffer.ydisp+1+f.end;if(this._currentLink.link.range.start.y>=y&&this._currentLink.link.range.end.y<=_&&(this._clearCurrentLink(y,_),this._lastMouseEvent&&this._element)){const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._askForLink(v,!1)}}))))}_linkHover(n,d,f){var y;!((y=this._currentLink)===null||y===void 0)&&y.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!0),this._currentLink.state.decorations.pointerCursor&&n.classList.add("xterm-cursor-pointer")),d.hover&&d.hover(f,d.text)}_fireUnderlineEvent(n,d){const f=n.range,y=this._bufferService.buffer.ydisp,_=this._createLinkUnderlineEvent(f.start.x-1,f.start.y-y-1,f.end.x,f.end.y-y-1,void 0);(d?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(_)}_linkLeave(n,d,f){var y;!((y=this._currentLink)===null||y===void 0)&&y.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!1),this._currentLink.state.decorations.pointerCursor&&n.classList.remove("xterm-cursor-pointer")),d.leave&&d.leave(f,d.text)}_linkAtPosition(n,d){const f=n.range.start.y*this._bufferService.cols+n.range.start.x,y=n.range.end.y*this._bufferService.cols+n.range.end.x,_=d.y*this._bufferService.cols+d.x;return f<=_&&_<=y}_positionFromMouseEvent(n,d,f){const y=f.getCoords(n,d,this._bufferService.cols,this._bufferService.rows);if(y)return{x:y[0],y:y[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(n,d,f,y,_){return{x1:n,y1:d,x2:f,y2:y,cols:this._bufferService.cols,fg:_}}};p.Linkifier2=l=h([a(0,s.IBufferService)],l)},9042:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.tooMuchOutput=p.promptLabel=void 0,p.promptLabel="Terminal input",p.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(x,p,c){var h=this&&this.__decorate||function(l,n,d,f){var y,_=arguments.length,v=_<3?n:f===null?f=Object.getOwnPropertyDescriptor(n,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(l,n,d,f);else for(var g=l.length-1;g>=0;g--)(y=l[g])&&(v=(_<3?y(v):_>3?y(n,d,v):y(n,d))||v);return _>3&&v&&Object.defineProperty(n,d,v),v},a=this&&this.__param||function(l,n){return function(d,f){n(d,f,l)}};Object.defineProperty(p,"__esModule",{value:!0}),p.OscLinkProvider=void 0;const i=c(511),r=c(2585);let o=p.OscLinkProvider=class{constructor(l,n,d){this._bufferService=l,this._optionsService=n,this._oscLinkService=d}provideLinks(l,n){var d;const f=this._bufferService.buffer.lines.get(l-1);if(!f)return void n(void 0);const y=[],_=this._optionsService.rawOptions.linkHandler,v=new i.CellData,g=f.getTrimmedLength();let w=-1,b=-1,S=!1;for(let T=0;T<g;T++)if(b!==-1||f.hasContent(T)){if(f.loadCell(T,v),v.hasExtendedAttrs()&&v.extended.urlId){if(b===-1){b=T,w=v.extended.urlId;continue}S=v.extended.urlId!==w}else b!==-1&&(S=!0);if(S||b!==-1&&T===g-1){const j=(d=this._oscLinkService.getLinkData(w))===null||d===void 0?void 0:d.uri;if(j){const E={start:{x:b+1,y:l},end:{x:T+(S||T!==g-1?0:1),y:l}};let A=!1;if(!_?.allowNonHttpProtocols)try{const M=new URL(j);["http:","https:"].includes(M.protocol)||(A=!0)}catch{A=!0}A||y.push({text:j,range:E,activate:(M,C)=>_?_.activate(M,C,E):s(0,C),hover:(M,C)=>{var L;return(L=_?.hover)===null||L===void 0?void 0:L.call(_,M,C,E)},leave:(M,C)=>{var L;return(L=_?.leave)===null||L===void 0?void 0:L.call(_,M,C,E)}})}S=!1,v.hasExtendedAttrs()&&v.extended.urlId?(b=T,w=v.extended.urlId):(b=-1,w=-1)}}n(y)}};function s(l,n){if(confirm(`Do you want to navigate to ${n}?
12
-
13
- WARNING: This link could potentially be dangerous`)){const d=window.open();if(d){try{d.opener=null}catch{}d.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}}p.OscLinkProvider=o=h([a(0,r.IBufferService),a(1,r.IOptionsService),a(2,r.IOscLinkService)],o)},6193:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.RenderDebouncer=void 0,p.RenderDebouncer=class{constructor(c,h){this._parentWindow=c,this._renderCallback=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,h,a){this._rowCount=a,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},5596:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ScreenDprMonitor=void 0;const h=c(844);class a extends h.Disposable{constructor(r){super(),this._parentWindow=r,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,h.toDisposable)((()=>{this.clearListener()})))}setListener(r){this._listener&&this.clearListener(),this._listener=r,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var r;this._outerListener&&((r=this._resolutionMediaMatchList)===null||r===void 0||r.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}p.ScreenDprMonitor=a},3236:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.Terminal=void 0;const h=c(3614),a=c(3656),i=c(6465),r=c(9042),o=c(3730),s=c(1680),l=c(3107),n=c(5744),d=c(2950),f=c(1296),y=c(428),_=c(4269),v=c(5114),g=c(8934),w=c(3230),b=c(9312),S=c(4725),T=c(6731),j=c(8055),E=c(8969),A=c(8460),M=c(844),C=c(6114),L=c(8437),I=c(2584),O=c(7399),z=c(5941),F=c(9074),H=c(2585),Y=c(5435),K=c(4567),q=typeof window<"u"?window.document:null;class Q extends E.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(U={}){super(U),this.browser=C,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new M.MutableDisposable),this._onCursorMove=this.register(new A.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new A.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new A.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new A.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new A.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new A.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new A.EventEmitter),this._onBlur=this.register(new A.EventEmitter),this._onA11yCharEmitter=this.register(new A.EventEmitter),this._onA11yTabEmitter=this.register(new A.EventEmitter),this._onWillOpen=this.register(new A.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(i.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(o.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(F.DecorationService),this._instantiationService.setService(H.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Z,te)=>this.refresh(Z,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Z=>this._reportWindowsOptions(Z)))),this.register(this._inputHandler.onColor((Z=>this._handleColorEvent(Z)))),this.register((0,A.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,A.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,A.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,A.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Z=>this._afterResize(Z.cols,Z.rows)))),this.register((0,M.toDisposable)((()=>{var Z,te;this._customKeyEventHandler=void 0,(te=(Z=this.element)===null||Z===void 0?void 0:Z.parentNode)===null||te===void 0||te.removeChild(this.element)})))}_handleColorEvent(U){if(this._themeService)for(const Z of U){let te,ne="";switch(Z.index){case 256:te="foreground",ne="10";break;case 257:te="background",ne="11";break;case 258:te="cursor",ne="12";break;default:te="ansi",ne="4;"+Z.index}switch(Z.type){case 0:const ve=j.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[Z.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${ne};${(0,z.toRgbString)(ve)}${I.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((ge=>ge.ansi[Z.index]=j.rgba.toColor(...Z.color)));else{const ge=te;this._themeService.modifyColors((xe=>xe[ge]=j.rgba.toColor(...Z.color)))}break;case 2:this._themeService.restoreColor(Z.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(U){U?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(K.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(U){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.updateCursorStyle(U),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var U;return(U=this.textarea)===null||U===void 0?void 0:U.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const U=this.buffer.ybase+this.buffer.y,Z=this.buffer.lines.get(U);if(!Z)return;const te=Math.min(this.buffer.x,this.cols-1),ne=this._renderService.dimensions.css.cell.height,ve=Z.getWidth(te),ge=this._renderService.dimensions.css.cell.width*ve,xe=this.buffer.y*this._renderService.dimensions.css.cell.height,Me=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Me+"px",this.textarea.style.top=xe+"px",this.textarea.style.width=ge+"px",this.textarea.style.height=ne+"px",this.textarea.style.lineHeight=ne+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,a.addDisposableDomListener)(this.element,"copy",(Z=>{this.hasSelection()&&(0,h.copyHandler)(Z,this._selectionService)})));const U=Z=>(0,h.handlePasteEvent)(Z,this.textarea,this.coreService,this.optionsService);this.register((0,a.addDisposableDomListener)(this.textarea,"paste",U)),this.register((0,a.addDisposableDomListener)(this.element,"paste",U)),C.isFirefox?this.register((0,a.addDisposableDomListener)(this.element,"mousedown",(Z=>{Z.button===2&&(0,h.rightClickHandler)(Z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,a.addDisposableDomListener)(this.element,"contextmenu",(Z=>{(0,h.rightClickHandler)(Z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),C.isLinux&&this.register((0,a.addDisposableDomListener)(this.element,"auxclick",(Z=>{Z.button===1&&(0,h.moveTextAreaUnderMouseCursor)(Z,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,a.addDisposableDomListener)(this.textarea,"keyup",(U=>this._keyUp(U)),!0)),this.register((0,a.addDisposableDomListener)(this.textarea,"keydown",(U=>this._keyDown(U)),!0)),this.register((0,a.addDisposableDomListener)(this.textarea,"keypress",(U=>this._keyPress(U)),!0)),this.register((0,a.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,a.addDisposableDomListener)(this.textarea,"compositionupdate",(U=>this._compositionHelper.compositionupdate(U)))),this.register((0,a.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,a.addDisposableDomListener)(this.textarea,"input",(U=>this._inputEvent(U)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(U){var Z;if(!U)throw new Error("Terminal requires a parent element.");U.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=U.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),U.appendChild(this.element);const te=q.createDocumentFragment();this._viewportElement=q.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),te.appendChild(this._viewportElement),this._viewportScrollArea=q.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=q.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=q.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),te.appendChild(this.screenElement),this.textarea=q.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",r.promptLabel),C.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this._instantiationService.createInstance(v.CoreBrowserService,this.textarea,(Z=this._document.defaultView)!==null&&Z!==void 0?Z:window),this._instantiationService.setService(S.ICoreBrowserService,this._coreBrowserService),this.register((0,a.addDisposableDomListener)(this.textarea,"focus",(ne=>this._handleTextAreaFocus(ne)))),this.register((0,a.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(S.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(T.ThemeService),this._instantiationService.setService(S.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(S.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(S.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ne=>this._onRender.fire(ne)))),this.onResize((ne=>this._renderService.resize(ne.cols,ne.rows))),this._compositionView=q.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(te);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(g.MouseService),this._instantiationService.setService(S.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(s.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(b.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(S.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ne=>this._renderService.handleSelectionChanged(ne.start,ne.end,ne.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ne=>{this.textarea.value=ne,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ne=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,a.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(l.BufferDecorationRenderer,this.screenElement)),this.register((0,a.addDisposableDomListener)(this.element,"mousedown",(ne=>this._selectionService.handleMouseDown(ne)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(K.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ne=>this._handleScreenReaderModeOptionChange(ne)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ne=>{!this._overviewRulerRenderer&&ne&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const U=this,Z=this.element;function te(ge){const xe=U._mouseService.getMouseReportCoords(ge,U.screenElement);if(!xe)return!1;let Me,Re;switch(ge.overrideType||ge.type){case"mousemove":Re=32,ge.buttons===void 0?(Me=3,ge.button!==void 0&&(Me=ge.button<3?ge.button:3)):Me=1&ge.buttons?0:4&ge.buttons?1:2&ge.buttons?2:3;break;case"mouseup":Re=0,Me=ge.button<3?ge.button:3;break;case"mousedown":Re=1,Me=ge.button<3?ge.button:3;break;case"wheel":if(U.viewport.getLinesScrolled(ge)===0)return!1;Re=ge.deltaY<0?0:1,Me=4;break;default:return!1}return!(Re===void 0||Me===void 0||Me>4)&&U.coreMouseService.triggerMouseEvent({col:xe.col,row:xe.row,x:xe.x,y:xe.y,button:Me,action:Re,ctrl:ge.ctrlKey,alt:ge.altKey,shift:ge.shiftKey})}const ne={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:ge=>(te(ge),ge.buttons||(this._document.removeEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.removeEventListener("mousemove",ne.mousedrag)),this.cancel(ge)),wheel:ge=>(te(ge),this.cancel(ge,!0)),mousedrag:ge=>{ge.buttons&&te(ge)},mousemove:ge=>{ge.buttons||te(ge)}};this.register(this.coreMouseService.onProtocolChange((ge=>{ge?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ge)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&ge?ne.mousemove||(Z.addEventListener("mousemove",ve.mousemove),ne.mousemove=ve.mousemove):(Z.removeEventListener("mousemove",ne.mousemove),ne.mousemove=null),16&ge?ne.wheel||(Z.addEventListener("wheel",ve.wheel,{passive:!1}),ne.wheel=ve.wheel):(Z.removeEventListener("wheel",ne.wheel),ne.wheel=null),2&ge?ne.mouseup||(Z.addEventListener("mouseup",ve.mouseup),ne.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",ne.mouseup),Z.removeEventListener("mouseup",ne.mouseup),ne.mouseup=null),4&ge?ne.mousedrag||(ne.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",ne.mousedrag),ne.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,a.addDisposableDomListener)(Z,"mousedown",(ge=>{if(ge.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ge))return te(ge),ne.mouseup&&this._document.addEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.addEventListener("mousemove",ne.mousedrag),this.cancel(ge)}))),this.register((0,a.addDisposableDomListener)(Z,"wheel",(ge=>{if(!ne.wheel){if(!this.buffer.hasScrollback){const xe=this.viewport.getLinesScrolled(ge);if(xe===0)return;const Me=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ge.deltaY<0?"A":"B");let Re="";for(let it=0;it<Math.abs(xe);it++)Re+=Me;return this.coreService.triggerDataEvent(Re,!0),this.cancel(ge,!0)}return this.viewport.handleWheel(ge)?this.cancel(ge):void 0}}),{passive:!1})),this.register((0,a.addDisposableDomListener)(Z,"touchstart",(ge=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ge),this.cancel(ge)}),{passive:!0})),this.register((0,a.addDisposableDomListener)(Z,"touchmove",(ge=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ge)?void 0:this.cancel(ge)}),{passive:!1}))}refresh(U,Z){var te;(te=this._renderService)===null||te===void 0||te.refreshRows(U,Z)}updateCursorStyle(U){var Z;!((Z=this._selectionService)===null||Z===void 0)&&Z.shouldColumnSelect(U)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(U,Z,te=0){var ne;te===1?(super.scrollLines(U,Z,te),this.refresh(0,this.rows-1)):(ne=this.viewport)===null||ne===void 0||ne.scrollLines(U)}paste(U){(0,h.paste)(U,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(U){this._customKeyEventHandler=U}registerLinkProvider(U){return this.linkifier2.registerLinkProvider(U)}registerCharacterJoiner(U){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Z=this._characterJoinerService.register(U);return this.refresh(0,this.rows-1),Z}deregisterCharacterJoiner(U){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(U)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(U){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+U)}registerDecoration(U){return this._decorationService.registerDecoration(U)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(U,Z,te){this._selectionService.setSelection(U,Z,te)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var U;(U=this._selectionService)===null||U===void 0||U.clearSelection()}selectAll(){var U;(U=this._selectionService)===null||U===void 0||U.selectAll()}selectLines(U,Z){var te;(te=this._selectionService)===null||te===void 0||te.selectLines(U,Z)}_keyDown(U){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1)return!1;const Z=this.browser.isMac&&this.options.macOptionIsMeta&&U.altKey;if(!Z&&!this._compositionHelper.keydown(U))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Z||U.key!=="Dead"&&U.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,O.evaluateKeyboardEvent)(U,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(U),te.type===3||te.type===2){const ne=this.rows-1;return this.scrollLines(te.type===2?-ne:ne),this.cancel(U,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,U)||(te.cancel&&this.cancel(U,!0),!te.key||!!(U.key&&!U.ctrlKey&&!U.altKey&&!U.metaKey&&U.key.length===1&&U.key.charCodeAt(0)>=65&&U.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==I.C0.ETX&&te.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:U}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||U.altKey||U.ctrlKey?this.cancel(U,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(U,Z){const te=U.isMac&&!this.options.macOptionIsMeta&&Z.altKey&&!Z.ctrlKey&&!Z.metaKey||U.isWindows&&Z.altKey&&Z.ctrlKey&&!Z.metaKey||U.isWindows&&Z.getModifierState("AltGraph");return Z.type==="keypress"?te:te&&(!Z.keyCode||Z.keyCode>47)}_keyUp(U){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1||((function(Z){return Z.keyCode===16||Z.keyCode===17||Z.keyCode===18})(U)||this.focus(),this.updateCursorStyle(U),this._keyPressHandled=!1)}_keyPress(U){let Z;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1)return!1;if(this.cancel(U),U.charCode)Z=U.charCode;else if(U.which===null||U.which===void 0)Z=U.keyCode;else{if(U.which===0||U.charCode===0)return!1;Z=U.which}return!(!Z||(U.altKey||U.ctrlKey||U.metaKey)&&!this._isThirdLevelShift(this.browser,U)||(Z=String.fromCharCode(Z),this._onKey.fire({key:Z,domEvent:U}),this._showCursor(),this.coreService.triggerDataEvent(Z,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(U){if(U.data&&U.inputType==="insertText"&&(!U.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Z=U.data;return this.coreService.triggerDataEvent(Z,!0),this.cancel(U),!0}return!1}resize(U,Z){U!==this.cols||Z!==this.rows?super.resize(U,Z):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(U,Z){var te,ne;(te=this._charSizeService)===null||te===void 0||te.measure(),(ne=this.viewport)===null||ne===void 0||ne.syncScrollArea(!0)}clear(){var U;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Z=1;Z<this.rows;Z++)this.buffer.lines.push(this.buffer.getBlankLine(L.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(U=this.viewport)===null||U===void 0||U.reset(),this.refresh(0,this.rows-1)}}reset(){var U,Z;this.options.rows=this.rows,this.options.cols=this.cols;const te=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)===null||U===void 0||U.reset(),this._decorationService.reset(),(Z=this.viewport)===null||Z===void 0||Z.reset(),this._customKeyEventHandler=te,this.refresh(0,this.rows-1)}clearTextureAtlas(){var U;(U=this._renderService)===null||U===void 0||U.clearTextureAtlas()}_reportFocus(){var U;!((U=this.element)===null||U===void 0)&&U.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(U){if(this._renderService)switch(U){case Y.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const Z=this._renderService.dimensions.css.canvas.width.toFixed(0),te=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${te};${Z}t`);break;case Y.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ne=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${ve};${ne}t`)}}cancel(U,Z){if(this.options.cancelEvents||Z)return U.preventDefault(),U.stopPropagation(),!1}}p.Terminal=Q},9924:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.TimeBasedDebouncer=void 0,p.TimeBasedDebouncer=class{constructor(c,h=1e3){this._renderCallback=c,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,h,a){this._rowCount=a,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const i=Date.now();if(i-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=i,this._innerRefresh();else if(!this._additionalRefreshRequested){const r=i-this._lastRefreshMs,o=this._debounceThresholdMS-r;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),o)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h)}}},1680:function(x,p,c){var h=this&&this.__decorate||function(d,f,y,_){var v,g=arguments.length,w=g<3?f:_===null?_=Object.getOwnPropertyDescriptor(f,y):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(d,f,y,_);else for(var b=d.length-1;b>=0;b--)(v=d[b])&&(w=(g<3?v(w):g>3?v(f,y,w):v(f,y))||w);return g>3&&w&&Object.defineProperty(f,y,w),w},a=this&&this.__param||function(d,f){return function(y,_){f(y,_,d)}};Object.defineProperty(p,"__esModule",{value:!0}),p.Viewport=void 0;const i=c(3656),r=c(4725),o=c(8460),s=c(844),l=c(2585);let n=p.Viewport=class extends s.Disposable{constructor(d,f,y,_,v,g,w,b){super(),this._viewportElement=d,this._scrollArea=f,this._bufferService=y,this._optionsService=_,this._charSizeService=v,this._renderService=g,this._coreBrowserService=w,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new o.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,i.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((S=>this._activeBuffer=S.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((S=>this._renderDimensions=S))),this._handleThemeChange(b.colors),this.register(b.onChangeColors((S=>this._handleThemeChange(S)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(d){this._viewportElement.style.backgroundColor=d.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(d){if(d)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderService.dimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const f=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==f&&(this._lastRecordedBufferHeight=f,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const d=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==d&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=d),this._refreshAnimationFrame=null}syncScrollArea(d=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(d);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(d)}_handleScroll(d){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const f=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:f,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const d=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(d*(this._smoothScrollState.target-this._smoothScrollState.origin)),d<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(d,f){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(f<0&&this._viewportElement.scrollTop!==0||f>0&&y<this._lastRecordedBufferHeight)||(d.cancelable&&d.preventDefault(),!1)}handleWheel(d){const f=this._getPixelsScrolled(d);return f!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+f:this._smoothScrollState.target+=f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=f,this._bubbleScroll(d,f))}scrollLines(d){if(d!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const f=d*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:d,suppressScrollEvent:!1})}_getPixelsScrolled(d){if(d.deltaY===0||d.shiftKey)return 0;let f=this._applyScrollModifier(d.deltaY,d);return d.deltaMode===WheelEvent.DOM_DELTA_LINE?f*=this._currentRowHeight:d.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._currentRowHeight*this._bufferService.rows),f}getBufferElements(d,f){var y;let _,v="";const g=[],w=f??this._bufferService.buffer.lines.length,b=this._bufferService.buffer.lines;for(let S=d;S<w;S++){const T=b.get(S);if(!T)continue;const j=(y=b.get(S+1))===null||y===void 0?void 0:y.isWrapped;if(v+=T.translateToString(!j),!j||S===b.length-1){const E=document.createElement("div");E.textContent=v,g.push(E),v.length>0&&(_=E),v=""}}return{bufferElements:g,cursorElement:_}}getLinesScrolled(d){if(d.deltaY===0||d.shiftKey)return 0;let f=this._applyScrollModifier(d.deltaY,d);return d.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(f/=this._currentRowHeight+0,this._wheelPartialScroll+=f,f=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):d.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._bufferService.rows),f}_applyScrollModifier(d,f){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&f.altKey||y==="ctrl"&&f.ctrlKey||y==="shift"&&f.shiftKey?d*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:d*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(d){this._lastTouchY=d.touches[0].pageY}handleTouchMove(d){const f=this._lastTouchY-d.touches[0].pageY;return this._lastTouchY=d.touches[0].pageY,f!==0&&(this._viewportElement.scrollTop+=f,this._bubbleScroll(d,f))}};p.Viewport=n=h([a(2,l.IBufferService),a(3,l.IOptionsService),a(4,r.ICharSizeService),a(5,r.IRenderService),a(6,r.ICoreBrowserService),a(7,r.IThemeService)],n)},3107:function(x,p,c){var h=this&&this.__decorate||function(n,d,f,y){var _,v=arguments.length,g=v<3?d:y===null?y=Object.getOwnPropertyDescriptor(d,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,d,f,y);else for(var w=n.length-1;w>=0;w--)(_=n[w])&&(g=(v<3?_(g):v>3?_(d,f,g):_(d,f))||g);return v>3&&g&&Object.defineProperty(d,f,g),g},a=this&&this.__param||function(n,d){return function(f,y){d(f,y,n)}};Object.defineProperty(p,"__esModule",{value:!0}),p.BufferDecorationRenderer=void 0;const i=c(3656),r=c(4725),o=c(844),s=c(2585);let l=p.BufferDecorationRenderer=class extends o.Disposable{constructor(n,d,f,y){super(),this._screenElement=n,this._bufferService=d,this._decorationService=f,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register((0,i.addDisposableDomListener)(window,"resize",(()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((_=>this._removeDecoration(_)))),this.register((0,o.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const n of this._decorationService.decorations)this._renderDecoration(n);this._dimensionsChanged=!1}_renderDecoration(n){this._refreshStyle(n),this._dimensionsChanged&&this._refreshXPosition(n)}_createElement(n){var d,f;const y=document.createElement("div");y.classList.add("xterm-decoration"),y.classList.toggle("xterm-decoration-top-layer",((d=n?.options)===null||d===void 0?void 0:d.layer)==="top"),y.style.width=`${Math.round((n.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,y.style.height=(n.options.height||1)*this._renderService.dimensions.css.cell.height+"px",y.style.top=(n.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",y.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=(f=n.options.x)!==null&&f!==void 0?f:0;return _&&_>this._bufferService.cols&&(y.style.display="none"),this._refreshXPosition(n,y),y}_refreshStyle(n){const d=n.marker.line-this._bufferService.buffers.active.ydisp;if(d<0||d>=this._bufferService.rows)n.element&&(n.element.style.display="none",n.onRenderEmitter.fire(n.element));else{let f=this._decorationElements.get(n);f||(f=this._createElement(n),n.element=f,this._decorationElements.set(n,f),this._container.appendChild(f),n.onDispose((()=>{this._decorationElements.delete(n),f.remove()}))),f.style.top=d*this._renderService.dimensions.css.cell.height+"px",f.style.display=this._altBufferIsActive?"none":"block",n.onRenderEmitter.fire(f)}}_refreshXPosition(n,d=n.element){var f;if(!d)return;const y=(f=n.options.x)!==null&&f!==void 0?f:0;(n.options.anchor||"left")==="right"?d.style.right=y?y*this._renderService.dimensions.css.cell.width+"px":"":d.style.left=y?y*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(n){var d;(d=this._decorationElements.get(n))===null||d===void 0||d.remove(),this._decorationElements.delete(n),n.dispose()}};p.BufferDecorationRenderer=l=h([a(1,s.IBufferService),a(2,s.IDecorationService),a(3,r.IRenderService)],l)},5871:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ColorZoneStore=void 0,p.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const h of this._zones)if(h.color===c.options.overviewRulerOptions.color&&h.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,c.marker.line))return;if(this._lineAdjacentToZone(h,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(h,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,h){return h>=c.startBufferLine&&h<=c.endBufferLine}_lineAdjacentToZone(c,h,a){return h>=c.startBufferLine-this._linePadding[a||"full"]&&h<=c.endBufferLine+this._linePadding[a||"full"]}_addLineToZone(c,h){c.startBufferLine=Math.min(c.startBufferLine,h),c.endBufferLine=Math.max(c.endBufferLine,h)}}},5744:function(x,p,c){var h=this&&this.__decorate||function(_,v,g,w){var b,S=arguments.length,T=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,v,g,w);else for(var j=_.length-1;j>=0;j--)(b=_[j])&&(T=(S<3?b(T):S>3?b(v,g,T):b(v,g))||T);return S>3&&T&&Object.defineProperty(v,g,T),T},a=this&&this.__param||function(_,v){return function(g,w){v(g,w,_)}};Object.defineProperty(p,"__esModule",{value:!0}),p.OverviewRulerRenderer=void 0;const i=c(5871),r=c(3656),o=c(4725),s=c(844),l=c(2585),n={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0},f={full:0,left:0,center:0,right:0};let y=p.OverviewRulerRenderer=class extends s.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,v,g,w,b,S,T){var j;super(),this._viewportElement=_,this._screenElement=v,this._bufferService=g,this._decorationService=w,this._renderService=b,this._optionsService=S,this._coreBrowseService=T,this._colorZoneStore=new i.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(j=this._viewportElement.parentElement)===null||j===void 0||j.insertBefore(this._canvas,this._viewportElement);const E=this._canvas.getContext("2d");if(!E)throw new Error("Ctx cannot be null");this._ctx=E,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,s.toDisposable)((()=>{var A;(A=this._canvas)===null||A===void 0||A.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register((0,r.addDisposableDomListener)(this._coreBrowseService.window,"resize",(()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const _=Math.floor(this._canvas.width/3),v=Math.ceil(this._canvas.width/3);d.full=this._canvas.width,d.left=_,d.center=v,d.right=_,this._refreshDrawHeightConstants(),f.full=0,f.left=0,f.center=d.left,f.right=d.left+d.center}_refreshDrawHeightConstants(){n.full=Math.round(2*this._coreBrowseService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,v=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowseService.dpr);n.left=v,n.center=v,n.right=v}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const v of this._decorationService.decorations)this._colorZoneStore.addDecoration(v);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const v of _)v.position!=="full"&&this._renderColorZone(v);for(const v of _)v.position==="full"&&this._renderColorZone(v);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(f[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-n[_.position||"full"]/2),d[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+n[_.position||"full"]))}_queueRefresh(_,v){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=v||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};p.OverviewRulerRenderer=y=h([a(2,l.IBufferService),a(3,l.IDecorationService),a(4,o.IRenderService),a(5,l.IOptionsService),a(6,o.ICoreBrowserService)],y)},2950:function(x,p,c){var h=this&&this.__decorate||function(l,n,d,f){var y,_=arguments.length,v=_<3?n:f===null?f=Object.getOwnPropertyDescriptor(n,d):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(l,n,d,f);else for(var g=l.length-1;g>=0;g--)(y=l[g])&&(v=(_<3?y(v):_>3?y(n,d,v):y(n,d))||v);return _>3&&v&&Object.defineProperty(n,d,v),v},a=this&&this.__param||function(l,n){return function(d,f){n(d,f,l)}};Object.defineProperty(p,"__esModule",{value:!0}),p.CompositionHelper=void 0;const i=c(4725),r=c(2585),o=c(2584);let s=p.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(l,n,d,f,y,_){this._textarea=l,this._compositionView=n,this._bufferService=d,this._optionsService=f,this._coreService=y,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(l){this._compositionView.textContent=l.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(l){if(this._isComposing||this._isSendingComposition){if(l.keyCode===229||l.keyCode===16||l.keyCode===17||l.keyCode===18)return!1;this._finalizeComposition(!1)}return l.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(l){if(this._compositionView.classList.remove("active"),this._isComposing=!1,l){const n={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let d;this._isSendingComposition=!1,n.start+=this._dataAlreadySent.length,d=this._isComposing?this._textarea.value.substring(n.start,n.end):this._textarea.value.substring(n.start),d.length>0&&this._coreService.triggerDataEvent(d,!0)}}),0)}else{this._isSendingComposition=!1;const n=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(n,!0)}}_handleAnyTextareaChanges(){const l=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const n=this._textarea.value,d=n.replace(l,"");this._dataAlreadySent=d,n.length>l.length?this._coreService.triggerDataEvent(d,!0):n.length<l.length?this._coreService.triggerDataEvent(`${o.C0.DEL}`,!0):n.length===l.length&&n!==l&&this._coreService.triggerDataEvent(n,!0)}}),0)}updateCompositionElements(l){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const n=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),d=this._renderService.dimensions.css.cell.height,f=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,y=n*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=y+"px",this._compositionView.style.top=f+"px",this._compositionView.style.height=d+"px",this._compositionView.style.lineHeight=d+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=y+"px",this._textarea.style.top=f+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}l||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};p.CompositionHelper=s=h([a(2,r.IBufferService),a(3,r.IOptionsService),a(4,r.ICoreService),a(5,i.IRenderService)],s)},9806:(x,p)=>{function c(h,a,i){const r=i.getBoundingClientRect(),o=h.getComputedStyle(i),s=parseInt(o.getPropertyValue("padding-left")),l=parseInt(o.getPropertyValue("padding-top"));return[a.clientX-r.left-s,a.clientY-r.top-l]}Object.defineProperty(p,"__esModule",{value:!0}),p.getCoords=p.getCoordsRelativeToElement=void 0,p.getCoordsRelativeToElement=c,p.getCoords=function(h,a,i,r,o,s,l,n,d){if(!s)return;const f=c(h,a,i);return f?(f[0]=Math.ceil((f[0]+(d?l/2:0))/l),f[1]=Math.ceil(f[1]/n),f[0]=Math.min(Math.max(f[0],1),r+(d?1:0)),f[1]=Math.min(Math.max(f[1],1),o),f):void 0}},9504:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.moveToCellSequence=void 0;const h=c(2584);function a(n,d,f,y){const _=n-i(n,f),v=d-i(d,f),g=Math.abs(_-v)-(function(w,b,S){let T=0;const j=w-i(w,S),E=b-i(b,S);for(let A=0;A<Math.abs(j-E);A++){const M=r(w,b)==="A"?-1:1,C=S.buffer.lines.get(j+M*A);C?.isWrapped&&T++}return T})(n,d,f);return l(g,s(r(n,d),y))}function i(n,d){let f=0,y=d.buffer.lines.get(n),_=y?.isWrapped;for(;_&&n>=0&&n<d.rows;)f++,y=d.buffer.lines.get(--n),_=y?.isWrapped;return f}function r(n,d){return n>d?"A":"B"}function o(n,d,f,y,_,v){let g=n,w=d,b="";for(;g!==f||w!==y;)g+=_?1:-1,_&&g>v.cols-1?(b+=v.buffer.translateBufferLineToString(w,!1,n,g),g=0,n=0,w++):!_&&g<0&&(b+=v.buffer.translateBufferLineToString(w,!1,0,n+1),g=v.cols-1,n=g,w--);return b+v.buffer.translateBufferLineToString(w,!1,n,g)}function s(n,d){const f=d?"O":"[";return h.C0.ESC+f+n}function l(n,d){n=Math.floor(n);let f="";for(let y=0;y<n;y++)f+=d;return f}p.moveToCellSequence=function(n,d,f,y){const _=f.buffer.x,v=f.buffer.y;if(!f.buffer.hasScrollback)return(function(b,S,T,j,E,A){return a(S,j,E,A).length===0?"":l(o(b,S,b,S-i(S,E),!1,E).length,s("D",A))})(_,v,0,d,f,y)+a(v,d,f,y)+(function(b,S,T,j,E,A){let M;M=a(S,j,E,A).length>0?j-i(j,E):S;const C=j,L=(function(I,O,z,F,H,Y){let K;return K=a(z,F,H,Y).length>0?F-i(F,H):O,I<z&&K<=F||I>=z&&K<F?"C":"D"})(b,S,T,j,E,A);return l(o(b,M,T,C,L==="C",E).length,s(L,A))})(_,v,n,d,f,y);let g;if(v===d)return g=_>n?"D":"C",l(Math.abs(_-n),s(g,y));g=v>d?"D":"C";const w=Math.abs(v-d);return l((function(b,S){return S.cols-b})(v>d?n:_,f)+(w-1)*f.cols+1+((v>d?_:n)-1),s(g,y))}},1296:function(x,p,c){var h=this&&this.__decorate||function(E,A,M,C){var L,I=arguments.length,O=I<3?A:C===null?C=Object.getOwnPropertyDescriptor(A,M):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(E,A,M,C);else for(var z=E.length-1;z>=0;z--)(L=E[z])&&(O=(I<3?L(O):I>3?L(A,M,O):L(A,M))||O);return I>3&&O&&Object.defineProperty(A,M,O),O},a=this&&this.__param||function(E,A){return function(M,C){A(M,C,E)}};Object.defineProperty(p,"__esModule",{value:!0}),p.DomRenderer=void 0;const i=c(3787),r=c(2550),o=c(2223),s=c(6171),l=c(4725),n=c(8055),d=c(8460),f=c(844),y=c(2585),_="xterm-dom-renderer-owner-",v="xterm-rows",g="xterm-fg-",w="xterm-bg-",b="xterm-focus",S="xterm-selection";let T=1,j=p.DomRenderer=class extends f.Disposable{constructor(E,A,M,C,L,I,O,z,F,H){super(),this._element=E,this._screenElement=A,this._viewportElement=M,this._linkifier2=C,this._charSizeService=I,this._optionsService=O,this._bufferService=z,this._coreBrowserService=F,this._themeService=H,this._terminalClass=T++,this._rowElements=[],this.onRequestRedraw=this.register(new d.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(v),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add(S),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,s.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Y=>this._injectCss(Y)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(i.DomRendererRowFactory,document),this._element.classList.add(_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Y=>this._handleLinkHover(Y)))),this.register(this._linkifier2.onHideLinkUnderline((Y=>this._handleLinkLeave(Y)))),this.register((0,f.toDisposable)((()=>{this._element.classList.remove(_+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new r.WidthCache(document),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const E=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*E,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*E),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/E),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/E),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const M of this._rowElements)M.style.width=`${this.dimensions.css.canvas.width}px`,M.style.height=`${this.dimensions.css.cell.height}px`,M.style.lineHeight=`${this.dimensions.css.cell.height}px`,M.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const A=`${this._terminalSelector} .${v} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=A,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(E){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let A=`${this._terminalSelector} .${v} { color: ${E.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;A+=`${this._terminalSelector} .${v} .xterm-dim { color: ${n.color.multiplyOpacity(E.foreground,.5).css};}`,A+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`,A+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",A+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${E.cursor.css}; color: ${E.cursorAccent.css}; } 50% { background-color: inherit; color: ${E.cursor.css}; }}`,A+=`${this._terminalSelector} .${v}.${b} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${v}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block { background-color: ${E.cursor.css}; color: ${E.cursorAccent.css};}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${E.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${E.cursor.css} inset;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${E.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,A+=`${this._terminalSelector} .${S} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${S} div { position: absolute; background-color: ${E.selectionBackgroundOpaque.css};}${this._terminalSelector} .${S} div { position: absolute; background-color: ${E.selectionInactiveBackgroundOpaque.css};}`;for(const[M,C]of E.ansi.entries())A+=`${this._terminalSelector} .${g}${M} { color: ${C.css}; }${this._terminalSelector} .${g}${M}.xterm-dim { color: ${n.color.multiplyOpacity(C,.5).css}; }${this._terminalSelector} .${w}${M} { background-color: ${C.css}; }`;A+=`${this._terminalSelector} .${g}${o.INVERTED_DEFAULT_COLOR} { color: ${n.color.opaque(E.background).css}; }${this._terminalSelector} .${g}${o.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${n.color.multiplyOpacity(n.color.opaque(E.background),.5).css}; }${this._terminalSelector} .${w}${o.INVERTED_DEFAULT_COLOR} { background-color: ${E.foreground.css}; }`,this._themeStyleElement.textContent=A}_setDefaultSpacing(){const E=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${E}px`,this._rowFactory.defaultSpacing=E}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(E,A){for(let M=this._rowElements.length;M<=A;M++){const C=document.createElement("div");this._rowContainer.appendChild(C),this._rowElements.push(C)}for(;this._rowElements.length>A;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(E,A){this._refreshRowElements(E,A),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(b)}handleFocus(){this._rowContainer.classList.add(b),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(E,A,M){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(E,A,M),this.renderRows(0,this._bufferService.rows-1),!E||!A)return;const C=E[1]-this._bufferService.buffer.ydisp,L=A[1]-this._bufferService.buffer.ydisp,I=Math.max(C,0),O=Math.min(L,this._bufferService.rows-1);if(I>=this._bufferService.rows||O<0)return;const z=document.createDocumentFragment();if(M){const F=E[0]>A[0];z.appendChild(this._createSelectionElement(I,F?A[0]:E[0],F?E[0]:A[0],O-I+1))}else{const F=C===I?E[0]:0,H=I===L?A[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(I,F,H));const Y=O-I-1;if(z.appendChild(this._createSelectionElement(I+1,0,this._bufferService.cols,Y)),I!==O){const K=L===O?A[0]:this._bufferService.cols;z.appendChild(this._createSelectionElement(O,0,K))}}this._selectionContainer.appendChild(z)}_createSelectionElement(E,A,M,C=1){const L=document.createElement("div");return L.style.height=C*this.dimensions.css.cell.height+"px",L.style.top=E*this.dimensions.css.cell.height+"px",L.style.left=A*this.dimensions.css.cell.width+"px",L.style.width=this.dimensions.css.cell.width*(M-A)+"px",L}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const E of this._rowElements)E.replaceChildren()}renderRows(E,A){const M=this._bufferService.buffer,C=M.ybase+M.y,L=Math.min(M.x,this._bufferService.cols-1),I=this._optionsService.rawOptions.cursorBlink,O=this._optionsService.rawOptions.cursorStyle,z=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=E;F<=A;F++){const H=F+M.ydisp,Y=this._rowElements[F],K=M.lines.get(H);if(!Y||!K)break;Y.replaceChildren(...this._rowFactory.createRow(K,H,H===C,O,z,L,I,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${_}${this._terminalClass}`}_handleLinkHover(E){this._setCellUnderline(E.x1,E.x2,E.y1,E.y2,E.cols,!0)}_handleLinkLeave(E){this._setCellUnderline(E.x1,E.x2,E.y1,E.y2,E.cols,!1)}_setCellUnderline(E,A,M,C,L,I){M<0&&(E=0),C<0&&(A=0);const O=this._bufferService.rows-1;M=Math.max(Math.min(M,O),0),C=Math.max(Math.min(C,O),0),L=Math.min(L,this._bufferService.cols);const z=this._bufferService.buffer,F=z.ybase+z.y,H=Math.min(z.x,L-1),Y=this._optionsService.rawOptions.cursorBlink,K=this._optionsService.rawOptions.cursorStyle,q=this._optionsService.rawOptions.cursorInactiveStyle;for(let Q=M;Q<=C;++Q){const ee=Q+z.ydisp,U=this._rowElements[Q],Z=z.lines.get(ee);if(!U||!Z)break;U.replaceChildren(...this._rowFactory.createRow(Z,ee,ee===F,K,q,H,Y,this.dimensions.css.cell.width,this._widthCache,I?Q===M?E:0:-1,I?(Q===C?A:L)-1:-1))}}};p.DomRenderer=j=h([a(4,y.IInstantiationService),a(5,l.ICharSizeService),a(6,y.IOptionsService),a(7,y.IBufferService),a(8,l.ICoreBrowserService),a(9,l.IThemeService)],j)},3787:function(x,p,c){var h=this&&this.__decorate||function(g,w,b,S){var T,j=arguments.length,E=j<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,w,b,S);else for(var A=g.length-1;A>=0;A--)(T=g[A])&&(E=(j<3?T(E):j>3?T(w,b,E):T(w,b))||E);return j>3&&E&&Object.defineProperty(w,b,E),E},a=this&&this.__param||function(g,w){return function(b,S){w(b,S,g)}};Object.defineProperty(p,"__esModule",{value:!0}),p.DomRendererRowFactory=void 0;const i=c(2223),r=c(643),o=c(511),s=c(2585),l=c(8055),n=c(4725),d=c(4269),f=c(6171),y=c(3734);let _=p.DomRendererRowFactory=class{constructor(g,w,b,S,T,j,E){this._document=g,this._characterJoinerService=w,this._optionsService=b,this._coreBrowserService=S,this._coreService=T,this._decorationService=j,this._themeService=E,this._workCell=new o.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(g,w,b){this._selectionStart=g,this._selectionEnd=w,this._columnSelectMode=b}createRow(g,w,b,S,T,j,E,A,M,C,L){const I=[],O=this._characterJoinerService.getJoinedCharacters(w),z=this._themeService.colors;let F,H=g.getNoBgTrimmedLength();b&&H<j+1&&(H=j+1);let Y=0,K="",q=0,Q=0,ee=0,U=!1,Z=0,te=!1,ne=0;const ve=[],ge=C!==-1&&L!==-1;for(let xe=0;xe<H;xe++){g.loadCell(xe,this._workCell);let Me=this._workCell.getWidth();if(Me===0)continue;let Re=!1,it=xe,Te=this._workCell;if(O.length>0&&xe===O[0][0]){Re=!0;const Ge=O.shift();Te=new d.JoinedCellData(this._workCell,g.translateToString(!0,Ge[0],Ge[1]),Ge[1]-Ge[0]),it=Ge[1]-1,Me=Te.getWidth()}const Tt=this._isCellInSelection(xe,w),Ut=b&&xe===j,fi=ge&&xe>=C&&xe<=L;let Ei=!1;this._decorationService.forEachDecorationAtCell(xe,w,void 0,(Ge=>{Ei=!0}));let Hi=Te.getChars()||r.WHITESPACE_CELL_CHAR;if(Hi===" "&&(Te.isUnderline()||Te.isOverline())&&(Hi=" "),ne=Me*A-M.get(Hi,Te.isBold(),Te.isItalic()),F){if(Y&&(Tt&&te||!Tt&&!te&&Te.bg===q)&&(Tt&&te&&z.selectionForeground||Te.fg===Q)&&Te.extended.ext===ee&&fi===U&&ne===Z&&!Ut&&!Re&&!Ei){K+=Hi,Y++;continue}Y&&(F.textContent=K),F=this._document.createElement("span"),Y=0,K=""}else F=this._document.createElement("span");if(q=Te.bg,Q=Te.fg,ee=Te.extended.ext,U=fi,Z=ne,te=Tt,Re&&j>=xe&&j<=it&&(j=xe),!this._coreService.isCursorHidden&&Ut){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)E&&ve.push("xterm-cursor-blink"),ve.push(S==="bar"?"xterm-cursor-bar":S==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(T)switch(T){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(Te.isBold()&&ve.push("xterm-bold"),Te.isItalic()&&ve.push("xterm-italic"),Te.isDim()&&ve.push("xterm-dim"),K=Te.isInvisible()?r.WHITESPACE_CELL_CHAR:Te.getChars()||r.WHITESPACE_CELL_CHAR,Te.isUnderline()&&(ve.push(`xterm-underline-${Te.extended.underlineStyle}`),K===" "&&(K=" "),!Te.isUnderlineColorDefault()))if(Te.isUnderlineColorRGB())F.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Te.getUnderlineColor()).join(",")})`;else{let Ge=Te.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Te.isBold()&&Ge<8&&(Ge+=8),F.style.textDecorationColor=z.ansi[Ge].css}Te.isOverline()&&(ve.push("xterm-overline"),K===" "&&(K=" ")),Te.isStrikethrough()&&ve.push("xterm-strikethrough"),fi&&(F.style.textDecoration="underline");let At=Te.getFgColor(),lt=Te.getFgColorMode(),Bt=Te.getBgColor(),pi=Te.getBgColorMode();const Ft=!!Te.isInverse();if(Ft){const Ge=At;At=Bt,Bt=Ge;const ti=lt;lt=pi,pi=ti}let bt,Ai,ot,ei=!1;switch(this._decorationService.forEachDecorationAtCell(xe,w,void 0,(Ge=>{Ge.options.layer!=="top"&&ei||(Ge.backgroundColorRGB&&(pi=50331648,Bt=Ge.backgroundColorRGB.rgba>>8&16777215,bt=Ge.backgroundColorRGB),Ge.foregroundColorRGB&&(lt=50331648,At=Ge.foregroundColorRGB.rgba>>8&16777215,Ai=Ge.foregroundColorRGB),ei=Ge.options.layer==="top")})),!ei&&Tt&&(bt=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,Bt=bt.rgba>>8&16777215,pi=50331648,ei=!0,z.selectionForeground&&(lt=50331648,At=z.selectionForeground.rgba>>8&16777215,Ai=z.selectionForeground)),ei&&ve.push("xterm-decoration-top"),pi){case 16777216:case 33554432:ot=z.ansi[Bt],ve.push(`xterm-bg-${Bt}`);break;case 50331648:ot=l.rgba.toColor(Bt>>16,Bt>>8&255,255&Bt),this._addStyle(F,`background-color:#${v((Bt>>>0).toString(16),"0",6)}`);break;default:Ft?(ot=z.foreground,ve.push(`xterm-bg-${i.INVERTED_DEFAULT_COLOR}`)):ot=z.background}switch(bt||Te.isDim()&&(bt=l.color.multiplyOpacity(ot,.5)),lt){case 16777216:case 33554432:Te.isBold()&&At<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(At+=8),this._applyMinimumContrast(F,ot,z.ansi[At],Te,bt,void 0)||ve.push(`xterm-fg-${At}`);break;case 50331648:const Ge=l.rgba.toColor(At>>16&255,At>>8&255,255&At);this._applyMinimumContrast(F,ot,Ge,Te,bt,Ai)||this._addStyle(F,`color:#${v(At.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(F,ot,z.foreground,Te,bt,void 0)||Ft&&ve.push(`xterm-fg-${i.INVERTED_DEFAULT_COLOR}`)}ve.length&&(F.className=ve.join(" "),ve.length=0),Ut||Re||Ei?F.textContent=K:Y++,ne!==this.defaultSpacing&&(F.style.letterSpacing=`${ne}px`),I.push(F),xe=it}return F&&Y&&(F.textContent=K),I}_applyMinimumContrast(g,w,b,S,T,j){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.excludeFromContrastRatioDemands)(S.getCode()))return!1;const E=this._getContrastCache(S);let A;if(T||j||(A=E.getColor(w.rgba,b.rgba)),A===void 0){const M=this._optionsService.rawOptions.minimumContrastRatio/(S.isDim()?2:1);A=l.color.ensureContrastRatio(T||w,j||b,M),E.setColor((T||w).rgba,(j||b).rgba,A??null)}return!!A&&(this._addStyle(g,`color:${A.css}`),!0)}_getContrastCache(g){return g.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(g,w){g.setAttribute("style",`${g.getAttribute("style")||""}${w};`)}_isCellInSelection(g,w){const b=this._selectionStart,S=this._selectionEnd;return!(!b||!S)&&(this._columnSelectMode?b[0]<=S[0]?g>=b[0]&&w>=b[1]&&g<S[0]&&w<=S[1]:g<b[0]&&w>=b[1]&&g>=S[0]&&w<=S[1]:w>b[1]&&w<S[1]||b[1]===S[1]&&w===b[1]&&g>=b[0]&&g<S[0]||b[1]<S[1]&&w===S[1]&&g<S[0]||b[1]<S[1]&&w===b[1]&&g>=b[0])}};function v(g,w,b){for(;g.length<b;)g=w+g;return g}p.DomRendererRowFactory=_=h([a(1,n.ICharacterJoinerService),a(2,s.IOptionsService),a(3,n.ICoreBrowserService),a(4,s.ICoreService),a(5,s.IDecorationService),a(6,n.IThemeService)],_)},2550:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.WidthCache=void 0,p.WidthCache=class{constructor(c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.style.position="absolute",this._container.style.top="-50000px",this._container.style.width="50000px",this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const h=c.createElement("span"),a=c.createElement("span");a.style.fontWeight="bold";const i=c.createElement("span");i.style.fontStyle="italic";const r=c.createElement("span");r.style.fontWeight="bold",r.style.fontStyle="italic",this._measureElements=[h,a,i,r],this._container.appendChild(h),this._container.appendChild(a),this._container.appendChild(i),this._container.appendChild(r),c.body.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,h,a,i){c===this._font&&h===this._fontSize&&a===this._weight&&i===this._weightBold||(this._font=c,this._fontSize=h,this._weight=a,this._weightBold=i,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${a}`,this._measureElements[1].style.fontWeight=`${i}`,this._measureElements[2].style.fontWeight=`${a}`,this._measureElements[3].style.fontWeight=`${i}`,this.clear())}get(c,h,a){let i=0;if(!h&&!a&&c.length===1&&(i=c.charCodeAt(0))<256)return this._flat[i]!==-9999?this._flat[i]:this._flat[i]=this._measure(c,0);let r=c;h&&(r+="B"),a&&(r+="I");let o=this._holey.get(r);if(o===void 0){let s=0;h&&(s|=1),a&&(s|=2),o=this._measure(c,s),this._holey.set(r,o)}return o}_measure(c,h){const a=this._measureElements[h];return a.textContent=c.repeat(32),a.offsetWidth/32}}},2223:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.TEXT_BASELINE=p.DIM_OPACITY=p.INVERTED_DEFAULT_COLOR=void 0;const h=c(6114);p.INVERTED_DEFAULT_COLOR=257,p.DIM_OPACITY=.5,p.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(x,p)=>{function c(h){return 57508<=h&&h<=57558}Object.defineProperty(p,"__esModule",{value:!0}),p.createRenderDimensions=p.excludeFromContrastRatioDemands=p.isRestrictedPowerlineGlyph=p.isPowerlineGlyph=p.throwIfFalsy=void 0,p.throwIfFalsy=function(h){if(!h)throw new Error("value must not be falsy");return h},p.isPowerlineGlyph=c,p.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},p.excludeFromContrastRatioDemands=function(h){return c(h)||(function(a){return 9472<=a&&a<=9631})(h)},p.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},456:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.SelectionModel=void 0,p.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,h=this.selectionEnd;return!(!c||!h)&&(c[1]>h[1]||c[1]===h[1]&&c[0]>h[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(x,p,c){var h=this&&this.__decorate||function(n,d,f,y){var _,v=arguments.length,g=v<3?d:y===null?y=Object.getOwnPropertyDescriptor(d,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,d,f,y);else for(var w=n.length-1;w>=0;w--)(_=n[w])&&(g=(v<3?_(g):v>3?_(d,f,g):_(d,f))||g);return v>3&&g&&Object.defineProperty(d,f,g),g},a=this&&this.__param||function(n,d){return function(f,y){d(f,y,n)}};Object.defineProperty(p,"__esModule",{value:!0}),p.CharSizeService=void 0;const i=c(2585),r=c(8460),o=c(844);let s=p.CharSizeService=class extends o.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(n,d,f){super(),this._optionsService=f,this.width=0,this.height=0,this._onCharSizeChange=this.register(new r.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new l(n,d,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())}};p.CharSizeService=s=h([a(2,i.IOptionsService)],s);class l{constructor(d,f,y){this._document=d,this._parentElement=f,this._optionsService=y,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const d={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return d.width!==0&&d.height!==0&&(this._result.width=d.width/32,this._result.height=Math.ceil(d.height)),this._result}}},4269:function(x,p,c){var h=this&&this.__decorate||function(d,f,y,_){var v,g=arguments.length,w=g<3?f:_===null?_=Object.getOwnPropertyDescriptor(f,y):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(d,f,y,_);else for(var b=d.length-1;b>=0;b--)(v=d[b])&&(w=(g<3?v(w):g>3?v(f,y,w):v(f,y))||w);return g>3&&w&&Object.defineProperty(f,y,w),w},a=this&&this.__param||function(d,f){return function(y,_){f(y,_,d)}};Object.defineProperty(p,"__esModule",{value:!0}),p.CharacterJoinerService=p.JoinedCellData=void 0;const i=c(3734),r=c(643),o=c(511),s=c(2585);class l extends i.AttributeData{constructor(f,y,_){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=y,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(f){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}p.JoinedCellData=l;let n=p.CharacterJoinerService=class Ip{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new o.CellData}register(f){const y={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(y),y.id}deregister(f){for(let y=0;y<this._characterJoiners.length;y++)if(this._characterJoiners[y].id===f)return this._characterJoiners.splice(y,1),!0;return!1}getJoinedCharacters(f){if(this._characterJoiners.length===0)return[];const y=this._bufferService.buffer.lines.get(f);if(!y||y.length===0)return[];const _=[],v=y.translateToString(!0);let g=0,w=0,b=0,S=y.getFg(0),T=y.getBg(0);for(let j=0;j<y.getTrimmedLength();j++)if(y.loadCell(j,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==S||this._workCell.bg!==T){if(j-g>1){const E=this._getJoinedRanges(v,b,w,y,g);for(let A=0;A<E.length;A++)_.push(E[A])}g=j,b=w,S=this._workCell.fg,T=this._workCell.bg}w+=this._workCell.getChars().length||r.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-g>1){const j=this._getJoinedRanges(v,b,w,y,g);for(let E=0;E<j.length;E++)_.push(j[E])}return _}_getJoinedRanges(f,y,_,v,g){const w=f.substring(y,_);let b=[];try{b=this._characterJoiners[0].handler(w)}catch(S){console.error(S)}for(let S=1;S<this._characterJoiners.length;S++)try{const T=this._characterJoiners[S].handler(w);for(let j=0;j<T.length;j++)Ip._mergeRanges(b,T[j])}catch(T){console.error(T)}return this._stringRangesToCellRanges(b,v,g),b}_stringRangesToCellRanges(f,y,_){let v=0,g=!1,w=0,b=f[v];if(b){for(let S=_;S<this._bufferService.cols;S++){const T=y.getWidth(S),j=y.getString(S).length||r.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!g&&b[0]<=w&&(b[0]=S,g=!0),b[1]<=w){if(b[1]=S,b=f[++v],!b)break;b[0]<=w?(b[0]=S,g=!0):g=!1}w+=j}}b&&(b[1]=this._bufferService.cols)}}static _mergeRanges(f,y){let _=!1;for(let v=0;v<f.length;v++){const g=f[v];if(_){if(y[1]<=g[0])return f[v-1][1]=y[1],f;if(y[1]<=g[1])return f[v-1][1]=Math.max(y[1],g[1]),f.splice(v,1),f;f.splice(v,1),v--}else{if(y[1]<=g[0])return f.splice(v,0,y),f;if(y[1]<=g[1])return g[0]=Math.min(y[0],g[0]),f;y[0]<g[1]&&(g[0]=Math.min(y[0],g[0]),_=!0)}}return _?f[f.length-1][1]=y[1]:f.push(y),f}};p.CharacterJoinerService=n=h([a(0,s.IBufferService)],n)},5114:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CoreBrowserService=void 0,p.CoreBrowserService=class{constructor(c,h){this._textarea=c,this.window=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}},8934:function(x,p,c){var h=this&&this.__decorate||function(s,l,n,d){var f,y=arguments.length,_=y<3?l:d===null?d=Object.getOwnPropertyDescriptor(l,n):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(s,l,n,d);else for(var v=s.length-1;v>=0;v--)(f=s[v])&&(_=(y<3?f(_):y>3?f(l,n,_):f(l,n))||_);return y>3&&_&&Object.defineProperty(l,n,_),_},a=this&&this.__param||function(s,l){return function(n,d){l(n,d,s)}};Object.defineProperty(p,"__esModule",{value:!0}),p.MouseService=void 0;const i=c(4725),r=c(9806);let o=p.MouseService=class{constructor(s,l){this._renderService=s,this._charSizeService=l}getCoords(s,l,n,d,f){return(0,r.getCoords)(window,s,l,n,d,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(s,l){const n=(0,r.getCoordsRelativeToElement)(window,s,l);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};p.MouseService=o=h([a(0,i.IRenderService),a(1,i.ICharSizeService)],o)},3230:function(x,p,c){var h=this&&this.__decorate||function(_,v,g,w){var b,S=arguments.length,T=S<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,v,g,w);else for(var j=_.length-1;j>=0;j--)(b=_[j])&&(T=(S<3?b(T):S>3?b(v,g,T):b(v,g))||T);return S>3&&T&&Object.defineProperty(v,g,T),T},a=this&&this.__param||function(_,v){return function(g,w){v(g,w,_)}};Object.defineProperty(p,"__esModule",{value:!0}),p.RenderService=void 0;const i=c(3656),r=c(6193),o=c(5596),s=c(4725),l=c(8460),n=c(844),d=c(7226),f=c(2585);let y=p.RenderService=class extends n.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,v,g,w,b,S,T,j){if(super(),this._rowCount=_,this._charSizeService=w,this._renderer=this.register(new n.MutableDisposable),this._pausedResizeTask=new d.DebouncedIdleTask,this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new l.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new l.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new l.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new l.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new r.RenderDebouncer(T.window,((E,A)=>this._renderRows(E,A))),this.register(this._renderDebouncer),this._screenDprMonitor=new o.ScreenDprMonitor(T.window),this._screenDprMonitor.setListener((()=>this.handleDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(S.onResize((()=>this._fullRefresh()))),this.register(S.buffers.onBufferActivate((()=>{var E;return(E=this._renderer.value)===null||E===void 0?void 0:E.clear()}))),this.register(g.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(b.onDecorationRegistered((()=>this._fullRefresh()))),this.register(b.onDecorationRemoved((()=>this._fullRefresh()))),this.register(g.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(S.cols,S.rows),this._fullRefresh()}))),this.register(g.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(S.buffer.y,S.buffer.y,!0)))),this.register((0,i.addDisposableDomListener)(T.window,"resize",(()=>this.handleDevicePixelRatioChange()))),this.register(j.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in T.window){const E=new T.window.IntersectionObserver((A=>this._handleIntersectionChange(A[A.length-1])),{threshold:0});E.observe(v),this.register({dispose:()=>E.disconnect()})}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(_,v,g=!1){this._isPaused?this._needsFullRefresh=!0:(g||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,v,this._rowCount))}_renderRows(_,v){this._renderer.value&&(_=Math.min(_,this._rowCount-1),v=Math.min(v,this._rowCount-1),this._renderer.value.renderRows(_,v),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:v}),this._onRender.fire({start:_,end:v}),this._isNextRenderRedrawOnly=!0)}resize(_,v){this._rowCount=v,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(_){this._renderer.value=_,this._renderer.value.onRequestRedraw((v=>this.refreshRows(v.start,v.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var _,v;this._renderer.value&&((v=(_=this._renderer.value).clearTextureAtlas)===null||v===void 0||v.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,v){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(_,v))):this._renderer.value.handleResize(_,v),this._fullRefresh())}handleCharSizeChanged(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCharSizeChanged()}handleBlur(){var _;(_=this._renderer.value)===null||_===void 0||_.handleBlur()}handleFocus(){var _;(_=this._renderer.value)===null||_===void 0||_.handleFocus()}handleSelectionChanged(_,v,g){var w;this._selectionState.start=_,this._selectionState.end=v,this._selectionState.columnSelectMode=g,(w=this._renderer.value)===null||w===void 0||w.handleSelectionChanged(_,v,g)}handleCursorMove(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)===null||_===void 0||_.clear()}};p.RenderService=y=h([a(2,f.IOptionsService),a(3,s.ICharSizeService),a(4,f.IDecorationService),a(5,f.IBufferService),a(6,s.ICoreBrowserService),a(7,s.IThemeService)],y)},9312:function(x,p,c){var h=this&&this.__decorate||function(b,S,T,j){var E,A=arguments.length,M=A<3?S:j===null?j=Object.getOwnPropertyDescriptor(S,T):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,S,T,j);else for(var C=b.length-1;C>=0;C--)(E=b[C])&&(M=(A<3?E(M):A>3?E(S,T,M):E(S,T))||M);return A>3&&M&&Object.defineProperty(S,T,M),M},a=this&&this.__param||function(b,S){return function(T,j){S(T,j,b)}};Object.defineProperty(p,"__esModule",{value:!0}),p.SelectionService=void 0;const i=c(9806),r=c(9504),o=c(456),s=c(4725),l=c(8460),n=c(844),d=c(6114),f=c(4841),y=c(511),_=c(2585),v=" ",g=new RegExp(v,"g");let w=p.SelectionService=class extends n.Disposable{constructor(b,S,T,j,E,A,M,C,L){super(),this._element=b,this._screenElement=S,this._linkifier=T,this._bufferService=j,this._coreService=E,this._mouseService=A,this._optionsService=M,this._renderService=C,this._coreBrowserService=L,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new l.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new l.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new l.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new l.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new o.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,n.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const b=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;return!(!b||!S||b[0]===S[0]&&b[1]===S[1])}get selectionText(){const b=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;if(!b||!S)return"";const T=this._bufferService.buffer,j=[];if(this._activeSelectionMode===3){if(b[0]===S[0])return"";const E=b[0]<S[0]?b[0]:S[0],A=b[0]<S[0]?S[0]:b[0];for(let M=b[1];M<=S[1];M++){const C=T.translateBufferLineToString(M,!0,E,A);j.push(C)}}else{const E=b[1]===S[1]?S[0]:void 0;j.push(T.translateBufferLineToString(b[1],!0,b[0],E));for(let A=b[1]+1;A<=S[1]-1;A++){const M=T.lines.get(A),C=T.translateBufferLineToString(A,!0);M?.isWrapped?j[j.length-1]+=C:j.push(C)}if(b[1]!==S[1]){const A=T.lines.get(S[1]),M=T.translateBufferLineToString(S[1],!0,0,S[0]);A&&A.isWrapped?j[j.length-1]+=M:j.push(M)}}return j.map((E=>E.replace(g," "))).join(d.isWindows?`\r
14
- `:`
15
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(b){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),d.isLinux&&b&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(b){const S=this._getMouseBufferCoords(b),T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!!(T&&j&&S)&&this._areCoordsInSelection(S,T,j)}isCellInSelection(b,S){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!T||!j)&&this._areCoordsInSelection([b,S],T,j)}_areCoordsInSelection(b,S,T){return b[1]>S[1]&&b[1]<T[1]||S[1]===T[1]&&b[1]===S[1]&&b[0]>=S[0]&&b[0]<T[0]||S[1]<T[1]&&b[1]===T[1]&&b[0]<T[0]||S[1]<T[1]&&b[1]===S[1]&&b[0]>=S[0]}_selectWordAtCursor(b,S){var T,j;const E=(j=(T=this._linkifier.currentLink)===null||T===void 0?void 0:T.link)===null||j===void 0?void 0:j.range;if(E)return this._model.selectionStart=[E.start.x-1,E.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(E,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const A=this._getMouseBufferCoords(b);return!!A&&(this._selectWordAt(A,S),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(b,S){this._model.clearSelection(),b=Math.max(b,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,b],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()}_handleTrim(b){this._model.handleTrim(b)&&this.refresh()}_getMouseBufferCoords(b){const S=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S}_getMouseEventScrollAmount(b){let S=(0,i.getCoordsRelativeToElement)(this._coreBrowserService.window,b,this._screenElement)[1];const T=this._renderService.dimensions.css.canvas.height;return S>=0&&S<=T?0:(S>T&&(S-=T),S=Math.min(Math.max(S,-50),50),S/=50,S/Math.abs(S)+Math.round(14*S))}shouldForceSelection(b){return d.isMac?b.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:b.shiftKey}handleMouseDown(b){if(this._mouseDownTimeStamp=b.timeStamp,(b.button!==2||!this.hasSelection)&&b.button===0){if(!this._enabled){if(!this.shouldForceSelection(b))return;b.stopPropagation()}b.preventDefault(),this._dragScrollAmount=0,this._enabled&&b.shiftKey?this._handleIncrementalClick(b):b.detail===1?this._handleSingleClick(b):b.detail===2?this._handleDoubleClick(b):b.detail===3&&this._handleTripleClick(b),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(b){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(b))}_handleSingleClick(b){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(b)?3:0,this._model.selectionStart=this._getMouseBufferCoords(b),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(b){this._selectWordAtCursor(b,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(b){const S=this._getMouseBufferCoords(b);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))}shouldColumnSelect(b){return b.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(b){if(b.stopImmediatePropagation(),!this._model.selectionStart)return;const S=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(b),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(b),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const T=this._bufferService.buffer;if(this._model.selectionEnd[1]<T.lines.length){const j=T.lines.get(this._model.selectionEnd[1]);j&&j.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const b=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(b.ydisp+this._bufferService.rows,b.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=b.ydisp),this.refresh()}}_handleMouseUp(b){const S=b.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&b.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const T=this._mouseService.getCoords(b,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(T&&T[0]!==void 0&&T[1]!==void 0){const j=(0,r.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(j,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const b=this._model.finalSelectionStart,S=this._model.finalSelectionEnd,T=!(!b||!S||b[0]===S[0]&&b[1]===S[1]);T?b&&S&&(this._oldSelectionStart&&this._oldSelectionEnd&&b[0]===this._oldSelectionStart[0]&&b[1]===this._oldSelectionStart[1]&&S[0]===this._oldSelectionEnd[0]&&S[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(b,S,T)):this._oldHasSelection&&this._fireOnSelectionChange(b,S,T)}_fireOnSelectionChange(b,S,T){this._oldSelectionStart=b,this._oldSelectionEnd=S,this._oldHasSelection=T,this._onSelectionChange.fire()}_handleBufferActivate(b){this.clearSelection(),this._trimListener.dispose(),this._trimListener=b.activeBuffer.lines.onTrim((S=>this._handleTrim(S)))}_convertViewportColToCharacterIndex(b,S){let T=S;for(let j=0;S>=j;j++){const E=b.loadCell(j,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:E>1&&S!==j&&(T+=E-1)}return T}setSelection(b,S,T){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[b,S],this._model.selectionStartLength=T,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(b){this._isClickInSelection(b)||(this._selectWordAtCursor(b,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(b,S,T=!0,j=!0){if(b[0]>=this._bufferService.cols)return;const E=this._bufferService.buffer,A=E.lines.get(b[1]);if(!A)return;const M=E.translateBufferLineToString(b[1],!1);let C=this._convertViewportColToCharacterIndex(A,b[0]),L=C;const I=b[0]-C;let O=0,z=0,F=0,H=0;if(M.charAt(C)===" "){for(;C>0&&M.charAt(C-1)===" ";)C--;for(;L<M.length&&M.charAt(L+1)===" ";)L++}else{let q=b[0],Q=b[0];A.getWidth(q)===0&&(O++,q--),A.getWidth(Q)===2&&(z++,Q++);const ee=A.getString(Q).length;for(ee>1&&(H+=ee-1,L+=ee-1);q>0&&C>0&&!this._isCharWordSeparator(A.loadCell(q-1,this._workCell));){A.loadCell(q-1,this._workCell);const U=this._workCell.getChars().length;this._workCell.getWidth()===0?(O++,q--):U>1&&(F+=U-1,C-=U-1),C--,q--}for(;Q<A.length&&L+1<M.length&&!this._isCharWordSeparator(A.loadCell(Q+1,this._workCell));){A.loadCell(Q+1,this._workCell);const U=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,Q++):U>1&&(H+=U-1,L+=U-1),L++,Q++}}L++;let Y=C+I-O+F,K=Math.min(this._bufferService.cols,L-C+O+z-F-H);if(S||M.slice(C,L).trim()!==""){if(T&&Y===0&&A.getCodePoint(0)!==32){const q=E.lines.get(b[1]-1);if(q&&A.isWrapped&&q.getCodePoint(this._bufferService.cols-1)!==32){const Q=this._getWordAt([this._bufferService.cols-1,b[1]-1],!1,!0,!1);if(Q){const ee=this._bufferService.cols-Q.start;Y-=ee,K+=ee}}}if(j&&Y+K===this._bufferService.cols&&A.getCodePoint(this._bufferService.cols-1)!==32){const q=E.lines.get(b[1]+1);if(q?.isWrapped&&q.getCodePoint(0)!==32){const Q=this._getWordAt([0,b[1]+1],!1,!1,!0);Q&&(K+=Q.length)}}return{start:Y,length:K}}}_selectWordAt(b,S){const T=this._getWordAt(b,S);if(T){for(;T.start<0;)T.start+=this._bufferService.cols,b[1]--;this._model.selectionStart=[T.start,b[1]],this._model.selectionStartLength=T.length}}_selectToWordAt(b){const S=this._getWordAt(b,!0);if(S){let T=b[1];for(;S.start<0;)S.start+=this._bufferService.cols,T--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,T++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,T]}}_isCharWordSeparator(b){return b.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(b.getChars())>=0}_selectLineAt(b){const S=this._bufferService.buffer.getWrappedRangeForLine(b),T={start:{x:0,y:S.first},end:{x:this._bufferService.cols-1,y:S.last}};this._model.selectionStart=[0,S.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(T,this._bufferService.cols)}};p.SelectionService=w=h([a(3,_.IBufferService),a(4,_.ICoreService),a(5,s.IMouseService),a(6,_.IOptionsService),a(7,s.IRenderService),a(8,s.ICoreBrowserService)],w)},4725:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.IThemeService=p.ICharacterJoinerService=p.ISelectionService=p.IRenderService=p.IMouseService=p.ICoreBrowserService=p.ICharSizeService=void 0;const h=c(8343);p.ICharSizeService=(0,h.createDecorator)("CharSizeService"),p.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),p.IMouseService=(0,h.createDecorator)("MouseService"),p.IRenderService=(0,h.createDecorator)("RenderService"),p.ISelectionService=(0,h.createDecorator)("SelectionService"),p.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),p.IThemeService=(0,h.createDecorator)("ThemeService")},6731:function(x,p,c){var h=this&&this.__decorate||function(w,b,S,T){var j,E=arguments.length,A=E<3?b:T===null?T=Object.getOwnPropertyDescriptor(b,S):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,b,S,T);else for(var M=w.length-1;M>=0;M--)(j=w[M])&&(A=(E<3?j(A):E>3?j(b,S,A):j(b,S))||A);return E>3&&A&&Object.defineProperty(b,S,A),A},a=this&&this.__param||function(w,b){return function(S,T){b(S,T,w)}};Object.defineProperty(p,"__esModule",{value:!0}),p.ThemeService=p.DEFAULT_ANSI_COLORS=void 0;const i=c(7239),r=c(8055),o=c(8460),s=c(844),l=c(2585),n=r.css.toColor("#ffffff"),d=r.css.toColor("#000000"),f=r.css.toColor("#ffffff"),y=r.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};p.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[r.css.toColor("#2e3436"),r.css.toColor("#cc0000"),r.css.toColor("#4e9a06"),r.css.toColor("#c4a000"),r.css.toColor("#3465a4"),r.css.toColor("#75507b"),r.css.toColor("#06989a"),r.css.toColor("#d3d7cf"),r.css.toColor("#555753"),r.css.toColor("#ef2929"),r.css.toColor("#8ae234"),r.css.toColor("#fce94f"),r.css.toColor("#729fcf"),r.css.toColor("#ad7fa8"),r.css.toColor("#34e2e2"),r.css.toColor("#eeeeec")],b=[0,95,135,175,215,255];for(let S=0;S<216;S++){const T=b[S/36%6|0],j=b[S/6%6|0],E=b[S%6];w.push({css:r.channels.toCss(T,j,E),rgba:r.channels.toRgba(T,j,E)})}for(let S=0;S<24;S++){const T=8+10*S;w.push({css:r.channels.toCss(T,T,T),rgba:r.channels.toRgba(T,T,T)})}return w})());let v=p.ThemeService=class extends s.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new i.ColorContrastCache,this._halfContrastCache=new i.ColorContrastCache,this._onChangeColors=this.register(new o.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:n,background:d,cursor:f,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:r.color.blend(d,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:r.color.blend(d,_),ansi:p.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(w={}){const b=this._colors;if(b.foreground=g(w.foreground,n),b.background=g(w.background,d),b.cursor=g(w.cursor,f),b.cursorAccent=g(w.cursorAccent,y),b.selectionBackgroundTransparent=g(w.selectionBackground,_),b.selectionBackgroundOpaque=r.color.blend(b.background,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundTransparent=g(w.selectionInactiveBackground,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundOpaque=r.color.blend(b.background,b.selectionInactiveBackgroundTransparent),b.selectionForeground=w.selectionForeground?g(w.selectionForeground,r.NULL_COLOR):void 0,b.selectionForeground===r.NULL_COLOR&&(b.selectionForeground=void 0),r.color.isOpaque(b.selectionBackgroundTransparent)&&(b.selectionBackgroundTransparent=r.color.opacity(b.selectionBackgroundTransparent,.3)),r.color.isOpaque(b.selectionInactiveBackgroundTransparent)&&(b.selectionInactiveBackgroundTransparent=r.color.opacity(b.selectionInactiveBackgroundTransparent,.3)),b.ansi=p.DEFAULT_ANSI_COLORS.slice(),b.ansi[0]=g(w.black,p.DEFAULT_ANSI_COLORS[0]),b.ansi[1]=g(w.red,p.DEFAULT_ANSI_COLORS[1]),b.ansi[2]=g(w.green,p.DEFAULT_ANSI_COLORS[2]),b.ansi[3]=g(w.yellow,p.DEFAULT_ANSI_COLORS[3]),b.ansi[4]=g(w.blue,p.DEFAULT_ANSI_COLORS[4]),b.ansi[5]=g(w.magenta,p.DEFAULT_ANSI_COLORS[5]),b.ansi[6]=g(w.cyan,p.DEFAULT_ANSI_COLORS[6]),b.ansi[7]=g(w.white,p.DEFAULT_ANSI_COLORS[7]),b.ansi[8]=g(w.brightBlack,p.DEFAULT_ANSI_COLORS[8]),b.ansi[9]=g(w.brightRed,p.DEFAULT_ANSI_COLORS[9]),b.ansi[10]=g(w.brightGreen,p.DEFAULT_ANSI_COLORS[10]),b.ansi[11]=g(w.brightYellow,p.DEFAULT_ANSI_COLORS[11]),b.ansi[12]=g(w.brightBlue,p.DEFAULT_ANSI_COLORS[12]),b.ansi[13]=g(w.brightMagenta,p.DEFAULT_ANSI_COLORS[13]),b.ansi[14]=g(w.brightCyan,p.DEFAULT_ANSI_COLORS[14]),b.ansi[15]=g(w.brightWhite,p.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const S=Math.min(b.ansi.length-16,w.extendedAnsi.length);for(let T=0;T<S;T++)b.ansi[T+16]=g(w.extendedAnsi[T],p.DEFAULT_ANSI_COLORS[T+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[w]=this._restoreColors.ansi[w]}else for(let b=0;b<this._restoreColors.ansi.length;++b)this._colors.ansi[b]=this._restoreColors.ansi[b]}modifyColors(w){w(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function g(w,b){if(w!==void 0)try{return r.css.toColor(w)}catch{}return b}p.ThemeService=v=h([a(0,l.IOptionsService)],v)},6349:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CircularList=void 0;const h=c(8460),a=c(844);class i extends a.Disposable{constructor(o){super(),this._maxLength=o,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(o){if(this._maxLength===o)return;const s=new Array(o);for(let l=0;l<Math.min(o,this.length);l++)s[l]=this._array[this._getCyclicIndex(l)];this._array=s,this._maxLength=o,this._startIndex=0}get length(){return this._length}set length(o){if(o>this._length)for(let s=this._length;s<o;s++)this._array[s]=void 0;this._length=o}get(o){return this._array[this._getCyclicIndex(o)]}set(o,s){this._array[this._getCyclicIndex(o)]=s}push(o){this._array[this._getCyclicIndex(this._length)]=o,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(o,s,...l){if(s){for(let n=o;n<this._length-s;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+s)];this._length-=s,this.onDeleteEmitter.fire({index:o,amount:s})}for(let n=this._length-1;n>=o;n--)this._array[this._getCyclicIndex(n+l.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<l.length;n++)this._array[this._getCyclicIndex(o+n)]=l[n];if(l.length&&this.onInsertEmitter.fire({index:o,amount:l.length}),this._length+l.length>this._maxLength){const n=this._length+l.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=l.length}trimStart(o){o>this._length&&(o=this._length),this._startIndex+=o,this._length-=o,this.onTrimEmitter.fire(o)}shiftElements(o,s,l){if(!(s<=0)){if(o<0||o>=this._length)throw new Error("start argument out of range");if(o+l<0)throw new Error("Cannot shift elements in list beyond index 0");if(l>0){for(let d=s-1;d>=0;d--)this.set(o+d+l,this.get(o+d));const n=o+s+l-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<s;n++)this.set(o+n+l,this.get(o+n))}}_getCyclicIndex(o){return(this._startIndex+o)%this._maxLength}}p.CircularList=i},1439:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.clone=void 0,p.clone=function c(h,a=5){if(typeof h!="object")return h;const i=Array.isArray(h)?[]:{};for(const r in h)i[r]=a<=1?h[r]:h[r]&&c(h[r],a-1);return i}},8055:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.contrastRatio=p.toPaddedHex=p.rgba=p.rgb=p.css=p.color=p.channels=p.NULL_COLOR=void 0;const h=c(6114);let a=0,i=0,r=0,o=0;var s,l,n,d,f;function y(v){const g=v.toString(16);return g.length<2?"0"+g:g}function _(v,g){return v<g?(g+.05)/(v+.05):(v+.05)/(g+.05)}p.NULL_COLOR={css:"#00000000",rgba:0},(function(v){v.toCss=function(g,w,b,S){return S!==void 0?`#${y(g)}${y(w)}${y(b)}${y(S)}`:`#${y(g)}${y(w)}${y(b)}`},v.toRgba=function(g,w,b,S=255){return(g<<24|w<<16|b<<8|S)>>>0}})(s||(p.channels=s={})),(function(v){function g(w,b){return o=Math.round(255*b),[a,i,r]=f.toChannels(w.rgba),{css:s.toCss(a,i,r,o),rgba:s.toRgba(a,i,r,o)}}v.blend=function(w,b){if(o=(255&b.rgba)/255,o===1)return{css:b.css,rgba:b.rgba};const S=b.rgba>>24&255,T=b.rgba>>16&255,j=b.rgba>>8&255,E=w.rgba>>24&255,A=w.rgba>>16&255,M=w.rgba>>8&255;return a=E+Math.round((S-E)*o),i=A+Math.round((T-A)*o),r=M+Math.round((j-M)*o),{css:s.toCss(a,i,r),rgba:s.toRgba(a,i,r)}},v.isOpaque=function(w){return(255&w.rgba)==255},v.ensureContrastRatio=function(w,b,S){const T=f.ensureContrastRatio(w.rgba,b.rgba,S);if(T)return f.toColor(T>>24&255,T>>16&255,T>>8&255)},v.opaque=function(w){const b=(255|w.rgba)>>>0;return[a,i,r]=f.toChannels(b),{css:s.toCss(a,i,r),rgba:b}},v.opacity=g,v.multiplyOpacity=function(w,b){return o=255&w.rgba,g(w,o*b/255)},v.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}})(l||(p.color=l={})),(function(v){let g,w;if(!h.isNode){const b=document.createElement("canvas");b.width=1,b.height=1;const S=b.getContext("2d",{willReadFrequently:!0});S&&(g=S,g.globalCompositeOperation="copy",w=g.createLinearGradient(0,0,1,1))}v.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return a=parseInt(b.slice(1,2).repeat(2),16),i=parseInt(b.slice(2,3).repeat(2),16),r=parseInt(b.slice(3,4).repeat(2),16),f.toColor(a,i,r);case 5:return a=parseInt(b.slice(1,2).repeat(2),16),i=parseInt(b.slice(2,3).repeat(2),16),r=parseInt(b.slice(3,4).repeat(2),16),o=parseInt(b.slice(4,5).repeat(2),16),f.toColor(a,i,r,o);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const S=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(S)return a=parseInt(S[1]),i=parseInt(S[2]),r=parseInt(S[3]),o=Math.round(255*(S[5]===void 0?1:parseFloat(S[5]))),f.toColor(a,i,r,o);if(!g||!w)throw new Error("css.toColor: Unsupported css format");if(g.fillStyle=w,g.fillStyle=b,typeof g.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(g.fillRect(0,0,1,1),[a,i,r,o]=g.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:s.toRgba(a,i,r,o),css:b}}})(n||(p.css=n={})),(function(v){function g(w,b,S){const T=w/255,j=b/255,E=S/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}v.relativeLuminance=function(w){return g(w>>16&255,w>>8&255,255&w)},v.relativeLuminance2=g})(d||(p.rgb=d={})),(function(v){function g(b,S,T){const j=b>>24&255,E=b>>16&255,A=b>>8&255;let M=S>>24&255,C=S>>16&255,L=S>>8&255,I=_(d.relativeLuminance2(M,C,L),d.relativeLuminance2(j,E,A));for(;I<T&&(M>0||C>0||L>0);)M-=Math.max(0,Math.ceil(.1*M)),C-=Math.max(0,Math.ceil(.1*C)),L-=Math.max(0,Math.ceil(.1*L)),I=_(d.relativeLuminance2(M,C,L),d.relativeLuminance2(j,E,A));return(M<<24|C<<16|L<<8|255)>>>0}function w(b,S,T){const j=b>>24&255,E=b>>16&255,A=b>>8&255;let M=S>>24&255,C=S>>16&255,L=S>>8&255,I=_(d.relativeLuminance2(M,C,L),d.relativeLuminance2(j,E,A));for(;I<T&&(M<255||C<255||L<255);)M=Math.min(255,M+Math.ceil(.1*(255-M))),C=Math.min(255,C+Math.ceil(.1*(255-C))),L=Math.min(255,L+Math.ceil(.1*(255-L))),I=_(d.relativeLuminance2(M,C,L),d.relativeLuminance2(j,E,A));return(M<<24|C<<16|L<<8|255)>>>0}v.ensureContrastRatio=function(b,S,T){const j=d.relativeLuminance(b>>8),E=d.relativeLuminance(S>>8);if(_(j,E)<T){if(E<j){const C=g(b,S,T),L=_(j,d.relativeLuminance(C>>8));if(L<T){const I=w(b,S,T);return L>_(j,d.relativeLuminance(I>>8))?C:I}return C}const A=w(b,S,T),M=_(j,d.relativeLuminance(A>>8));if(M<T){const C=g(b,S,T);return M>_(j,d.relativeLuminance(C>>8))?A:C}return A}},v.reduceLuminance=g,v.increaseLuminance=w,v.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]},v.toColor=function(b,S,T,j){return{css:s.toCss(b,S,T,j),rgba:s.toRgba(b,S,T,j)}}})(f||(p.rgba=f={})),p.toPaddedHex=y,p.contrastRatio=_},8969:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CoreTerminal=void 0;const h=c(844),a=c(2585),i=c(4348),r=c(7866),o=c(744),s=c(7302),l=c(6975),n=c(8460),d=c(1753),f=c(1480),y=c(7994),_=c(9282),v=c(5435),g=c(5981),w=c(2660);let b=!1;class S extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new n.EventEmitter),this._onScroll.event((j=>{var E;(E=this._onScrollApi)===null||E===void 0||E.fire(j.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(j){for(const E in j)this.optionsService.options[E]=j[E]}constructor(j){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new n.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new n.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new n.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new n.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new n.EventEmitter),this._instantiationService=new i.InstantiationService,this.optionsService=this.register(new s.OptionsService(j)),this._instantiationService.setService(a.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(o.BufferService)),this._instantiationService.setService(a.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(r.LogService)),this._instantiationService.setService(a.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(l.CoreService)),this._instantiationService.setService(a.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(d.CoreMouseService)),this._instantiationService.setService(a.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(f.UnicodeService)),this._instantiationService.setService(a.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(a.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(a.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new v.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,n.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,n.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,n.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,n.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((E=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((E=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new g.WriteBuffer(((E,A)=>this._inputHandler.parse(E,A)))),this.register((0,n.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(j,E){this._writeBuffer.write(j,E)}writeSync(j,E){this._logService.logLevel<=a.LogLevelEnum.WARN&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!0),this._writeBuffer.writeSync(j,E)}resize(j,E){isNaN(j)||isNaN(E)||(j=Math.max(j,o.MINIMUM_COLS),E=Math.max(E,o.MINIMUM_ROWS),this._bufferService.resize(j,E))}scroll(j,E=!1){this._bufferService.scroll(j,E)}scrollLines(j,E,A){this._bufferService.scrollLines(j,E,A)}scrollPages(j){this.scrollLines(j*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(j){const E=j-this._bufferService.buffer.ydisp;E!==0&&this.scrollLines(E)}registerEscHandler(j,E){return this._inputHandler.registerEscHandler(j,E)}registerDcsHandler(j,E){return this._inputHandler.registerDcsHandler(j,E)}registerCsiHandler(j,E){return this._inputHandler.registerCsiHandler(j,E)}registerOscHandler(j,E){return this._inputHandler.registerOscHandler(j,E)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let j=!1;const E=this.optionsService.rawOptions.windowsPty;E&&E.buildNumber!==void 0&&E.buildNumber!==void 0?j=E.backend==="conpty"&&E.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(j=!0),j?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const j=[];j.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),j.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const E of j)E.dispose()}))}}}p.CoreTerminal=S},8460:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.forwardEvent=p.EventEmitter=void 0,p.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===c)return void this._listeners.splice(h,1)}}})),this._event}fire(c,h){const a=[];for(let i=0;i<this._listeners.length;i++)a.push(this._listeners[i]);for(let i=0;i<a.length;i++)a[i].call(void 0,c,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},p.forwardEvent=function(c,h){return c((a=>h.fire(a)))}},5435:function(x,p,c){var h=this&&this.__decorate||function(I,O,z,F){var H,Y=arguments.length,K=Y<3?O:F===null?F=Object.getOwnPropertyDescriptor(O,z):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(I,O,z,F);else for(var q=I.length-1;q>=0;q--)(H=I[q])&&(K=(Y<3?H(K):Y>3?H(O,z,K):H(O,z))||K);return Y>3&&K&&Object.defineProperty(O,z,K),K},a=this&&this.__param||function(I,O){return function(z,F){O(z,F,I)}};Object.defineProperty(p,"__esModule",{value:!0}),p.InputHandler=p.WindowsOptionsReportType=void 0;const i=c(2584),r=c(7116),o=c(2015),s=c(844),l=c(482),n=c(8437),d=c(8460),f=c(643),y=c(511),_=c(3734),v=c(2585),g=c(6242),w=c(6351),b=c(5941),S={"(":0,")":1,"*":2,"+":3,"-":1,".":2},T=131072;function j(I,O){if(I>24)return O.setWinLines||!1;switch(I){case 1:return!!O.restoreWin;case 2:return!!O.minimizeWin;case 3:return!!O.setWinPosition;case 4:return!!O.setWinSizePixels;case 5:return!!O.raiseWin;case 6:return!!O.lowerWin;case 7:return!!O.refreshWin;case 8:return!!O.setWinSizeChars;case 9:return!!O.maximizeWin;case 10:return!!O.fullscreenWin;case 11:return!!O.getWinState;case 13:return!!O.getWinPosition;case 14:return!!O.getWinSizePixels;case 15:return!!O.getScreenSizePixels;case 16:return!!O.getCellSizePixels;case 18:return!!O.getWinSizeChars;case 19:return!!O.getScreenSizeChars;case 20:return!!O.getIconTitle;case 21:return!!O.getWinTitle;case 22:return!!O.pushTitle;case 23:return!!O.popTitle;case 24:return!!O.setWinLines}return!1}var E;(function(I){I[I.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",I[I.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(E||(p.WindowsOptionsReportType=E={}));let A=0;class M extends s.Disposable{getAttrData(){return this._curAttrData}constructor(O,z,F,H,Y,K,q,Q,ee=new o.EscapeSequenceParser){super(),this._bufferService=O,this._charsetService=z,this._coreService=F,this._logService=H,this._optionsService=Y,this._oscLinkService=K,this._coreMouseService=q,this._unicodeService=Q,this._parser=ee,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new l.StringToUtf32,this._utf8Decoder=new l.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new d.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new d.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new d.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new d.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new d.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new d.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new d.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new d.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new d.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new d.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new d.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new C(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,Z)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:Z.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,Z,te)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:Z,data:te})})),this._parser.setDcsHandlerFallback(((U,Z,te)=>{Z==="HOOK"&&(te=te.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:Z,payload:te})})),this._parser.setPrintHandler(((U,Z,te)=>this.print(U,Z,te))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!1))),this._parser.setExecuteHandler(i.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(i.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(i.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(i.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(i.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(i.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(i.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(i.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(i.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(i.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(i.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(i.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new g.OscHandler((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new g.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new g.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new g.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new g.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new g.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new g.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new g.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new g.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new g.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new g.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new g.OscHandler((U=>this.restoreCursorColor(U)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const U in r.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new w.DcsHandler(((U,Z)=>this.requestStatusString(U,Z))))}_preserveStack(O,z,F,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=O,this._parseStack.cursorStartY=z,this._parseStack.decodedLength=F,this._parseStack.position=H}_logSlowResolvingAsync(O){this._logService.logLevel<=v.LogLevelEnum.WARN&&Promise.race([O,new Promise(((z,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((z=>{if(z!=="#SLOW_TIMEOUT")throw z;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(O,z){let F,H=this._activeBuffer.x,Y=this._activeBuffer.y,K=0;const q=this._parseStack.paused;if(q){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,z))return this._logSlowResolvingAsync(F),F;H=this._parseStack.cursorStartX,Y=this._parseStack.cursorStartY,this._parseStack.paused=!1,O.length>T&&(K=this._parseStack.position+T)}if(this._logService.logLevel<=v.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof O=="string"?` "${O}"`:` "${Array.prototype.map.call(O,(Q=>String.fromCharCode(Q))).join("")}"`),typeof O=="string"?O.split("").map((Q=>Q.charCodeAt(0))):O),this._parseBuffer.length<O.length&&this._parseBuffer.length<T&&(this._parseBuffer=new Uint32Array(Math.min(O.length,T))),q||this._dirtyRowTracker.clearRange(),O.length>T)for(let Q=K;Q<O.length;Q+=T){const ee=Q+T<O.length?Q+T:O.length,U=typeof O=="string"?this._stringDecoder.decode(O.substring(Q,ee),this._parseBuffer):this._utf8Decoder.decode(O.subarray(Q,ee),this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,U))return this._preserveStack(H,Y,U,Q),this._logSlowResolvingAsync(F),F}else if(!q){const Q=typeof O=="string"?this._stringDecoder.decode(O,this._parseBuffer):this._utf8Decoder.decode(O,this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,Q))return this._preserveStack(H,Y,Q,0),this._logSlowResolvingAsync(F),F}this._activeBuffer.x===H&&this._activeBuffer.y===Y||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(O,z,F){let H,Y;const K=this._charsetService.charset,q=this._optionsService.rawOptions.screenReaderMode,Q=this._bufferService.cols,ee=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,Z=this._curAttrData;let te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&F-z>0&&te.getWidth(this._activeBuffer.x-1)===2&&te.setCellFromCodePoint(this._activeBuffer.x-1,0,1,Z.fg,Z.bg,Z.extended);for(let ne=z;ne<F;++ne){if(H=O[ne],Y=this._unicodeService.wcwidth(H),H<127&&K){const ve=K[String.fromCharCode(H)];ve&&(H=ve.charCodeAt(0))}if(q&&this._onA11yChar.fire((0,l.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),Y||!this._activeBuffer.x){if(this._activeBuffer.x+Y-1>=Q){if(ee){for(;this._activeBuffer.x<Q;)te.setCellFromCodePoint(this._activeBuffer.x++,0,1,Z.fg,Z.bg,Z.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=Q-1,Y===2)continue}if(U&&(te.insertCells(this._activeBuffer.x,Y,this._activeBuffer.getNullCell(Z),Z),te.getWidth(Q-1)===2&&te.setCellFromCodePoint(Q-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,Z.fg,Z.bg,Z.extended)),te.setCellFromCodePoint(this._activeBuffer.x++,H,Y,Z.fg,Z.bg,Z.extended),Y>0)for(;--Y;)te.setCellFromCodePoint(this._activeBuffer.x++,0,0,Z.fg,Z.bg,Z.extended)}else te.getWidth(this._activeBuffer.x-1)?te.addCodepointToCell(this._activeBuffer.x-1,H):te.addCodepointToCell(this._activeBuffer.x-2,H)}F-z>0&&(te.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<Q&&F-z>0&&te.getWidth(this._activeBuffer.x)===0&&!te.hasContent(this._activeBuffer.x)&&te.setCellFromCodePoint(this._activeBuffer.x,0,1,Z.fg,Z.bg,Z.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(O,z){return O.final!=="t"||O.prefix||O.intermediates?this._parser.registerCsiHandler(O,z):this._parser.registerCsiHandler(O,(F=>!j(F.params[0],this._optionsService.rawOptions.windowOptions)||z(F)))}registerDcsHandler(O,z){return this._parser.registerDcsHandler(O,new w.DcsHandler(z))}registerEscHandler(O,z){return this._parser.registerEscHandler(O,z)}registerOscHandler(O,z){return this._parser.registerOscHandler(O,new g.OscHandler(z))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var O;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||O===void 0)&&O.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);z.hasWidth(this._activeBuffer.x)&&!z.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const O=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-O),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(O=this._bufferService.cols-1){this._activeBuffer.x=Math.min(O,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(O,z){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=O,this._activeBuffer.y=this._activeBuffer.scrollTop+z):(this._activeBuffer.x=O,this._activeBuffer.y=z),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(O,z){this._restrictCursor(),this._setCursor(this._activeBuffer.x+O,this._activeBuffer.y+z)}cursorUp(O){const z=this._activeBuffer.y-this._activeBuffer.scrollTop;return z>=0?this._moveCursor(0,-Math.min(z,O.params[0]||1)):this._moveCursor(0,-(O.params[0]||1)),!0}cursorDown(O){const z=this._activeBuffer.scrollBottom-this._activeBuffer.y;return z>=0?this._moveCursor(0,Math.min(z,O.params[0]||1)):this._moveCursor(0,O.params[0]||1),!0}cursorForward(O){return this._moveCursor(O.params[0]||1,0),!0}cursorBackward(O){return this._moveCursor(-(O.params[0]||1),0),!0}cursorNextLine(O){return this.cursorDown(O),this._activeBuffer.x=0,!0}cursorPrecedingLine(O){return this.cursorUp(O),this._activeBuffer.x=0,!0}cursorCharAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(O){return this._setCursor(O.length>=2?(O.params[1]||1)-1:0,(O.params[0]||1)-1),!0}charPosAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(O){return this._moveCursor(O.params[0]||1,0),!0}linePosAbsolute(O){return this._setCursor(this._activeBuffer.x,(O.params[0]||1)-1),!0}vPositionRelative(O){return this._moveCursor(0,O.params[0]||1),!0}hVPosition(O){return this.cursorPosition(O),!0}tabClear(O){const z=O.params[0];return z===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:z===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let z=O.params[0]||1;for(;z--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let z=O.params[0]||1;for(;z--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(O){const z=O.params[0];return z===1&&(this._curAttrData.bg|=536870912),z!==2&&z!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(O,z,F,H=!1,Y=!1){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);K.replaceCells(z,F,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),Y),H&&(K.isWrapped=!1)}_resetBufferLine(O,z=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),z),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+O),F.isWrapped=!1)}eraseInDisplay(O,z=!1){let F;switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,z);F<this._bufferService.rows;F++)this._resetBufferLine(F,z);this._dirtyRowTracker.markDirty(F);break;case 1:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F,0,this._activeBuffer.x+1,!0,z),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,z);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,z);this._dirtyRowTracker.markDirty(0);break;case 3:const H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0}eraseInLine(O,z=!1){switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,z);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,z);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,z)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(O){this._restrictCursor();let z=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Y=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;z--;)this._activeBuffer.lines.splice(Y-1,1),this._activeBuffer.lines.splice(F,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(O){this._restrictCursor();let z=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=this._activeBuffer.ybase+this._activeBuffer.y;let H;for(H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-H;z--;)this._activeBuffer.lines.splice(F,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(O){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.insertCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(O){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.deleteCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(O){let z=O.params[0]||1;for(;z--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(O){let z=O.params[0]||1;for(;z--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(n.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=O.params[0]||1;for(let F=this._activeBuffer.scrollTop;F<=this._activeBuffer.scrollBottom;++F){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+F);H.deleteCells(0,z,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=O.params[0]||1;for(let F=this._activeBuffer.scrollTop;F<=this._activeBuffer.scrollBottom;++F){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+F);H.insertCells(0,z,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=O.params[0]||1;for(let F=this._activeBuffer.scrollTop;F<=this._activeBuffer.scrollBottom;++F){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+F);H.insertCells(this._activeBuffer.x,z,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=O.params[0]||1;for(let F=this._activeBuffer.scrollTop;F<=this._activeBuffer.scrollBottom;++F){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+F);H.deleteCells(this._activeBuffer.x,z,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(O){this._restrictCursor();const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return z&&(z.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(O.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(O){if(!this._parser.precedingCodepoint)return!0;const z=O.params[0]||1,F=new Uint32Array(z);for(let H=0;H<z;++H)F[H]=this._parser.precedingCodepoint;return this.print(F,0,F.length),!0}sendDeviceAttributesPrimary(O){return O.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(i.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(i.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(O){return O.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(i.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(i.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(O.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(i.C0.ESC+"[>83;40003;0c")),!0}_is(O){return(this._optionsService.rawOptions.termName+"").indexOf(O)===0}setMode(O){for(let z=0;z<O.length;z++)switch(O.params[z]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(O){for(let z=0;z<O.length;z++)switch(O.params[z]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,r.DEFAULT_CHARSET),this._charsetService.setgCharset(1,r.DEFAULT_CHARSET),this._charsetService.setgCharset(2,r.DEFAULT_CHARSET),this._charsetService.setgCharset(3,r.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(O){for(let z=0;z<O.length;z++)switch(O.params[z]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(O){for(let z=0;z<O.length;z++)switch(O.params[z]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),O.params[z]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(O,z){const F=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:Y}=this._coreMouseService,K=this._coreService,{buffers:q,cols:Q}=this._bufferService,{active:ee,alt:U}=q,Z=this._optionsService.rawOptions,te=xe=>xe?1:2,ne=O.params[0];return ve=ne,ge=z?ne===2?4:ne===4?te(K.modes.insertMode):ne===12?3:ne===20?te(Z.convertEol):0:ne===1?te(F.applicationCursorKeys):ne===3?Z.windowOptions.setWinLines?Q===80?2:Q===132?1:0:0:ne===6?te(F.origin):ne===7?te(F.wraparound):ne===8?3:ne===9?te(H==="X10"):ne===12?te(Z.cursorBlink):ne===25?te(!K.isCursorHidden):ne===45?te(F.reverseWraparound):ne===66?te(F.applicationKeypad):ne===67?4:ne===1e3?te(H==="VT200"):ne===1002?te(H==="DRAG"):ne===1003?te(H==="ANY"):ne===1004?te(F.sendFocus):ne===1005?4:ne===1006?te(Y==="SGR"):ne===1015?4:ne===1016?te(Y==="SGR_PIXELS"):ne===1048?1:ne===47||ne===1047||ne===1049?te(ee===U):ne===2004?te(F.bracketedPasteMode):0,K.triggerDataEvent(`${i.C0.ESC}[${z?"":"?"}${ve};${ge}$y`),!0;var ve,ge}_updateAttrColor(O,z,F,H,Y){return z===2?(O|=50331648,O&=-16777216,O|=_.AttributeData.fromColorRGB([F,H,Y])):z===5&&(O&=-50331904,O|=33554432|255&F),O}_extractColor(O,z,F){const H=[0,0,-1,0,0,0];let Y=0,K=0;do{if(H[K+Y]=O.params[z+K],O.hasSubParams(z+K)){const q=O.getSubParams(z+K);let Q=0;do H[1]===5&&(Y=1),H[K+Q+1+Y]=q[Q];while(++Q<q.length&&Q+K+1+Y<H.length);break}if(H[1]===5&&K+Y>=2||H[1]===2&&K+Y>=5)break;H[1]&&(Y=1)}while(++K+z<O.length&&K+Y<H.length);for(let q=2;q<H.length;++q)H[q]===-1&&(H[q]=0);switch(H[0]){case 38:F.fg=this._updateAttrColor(F.fg,H[1],H[3],H[4],H[5]);break;case 48:F.bg=this._updateAttrColor(F.bg,H[1],H[3],H[4],H[5]);break;case 58:F.extended=F.extended.clone(),F.extended.underlineColor=this._updateAttrColor(F.extended.underlineColor,H[1],H[3],H[4],H[5])}return K}_processUnderline(O,z){z.extended=z.extended.clone(),(!~O||O>5)&&(O=1),z.extended.underlineStyle=O,z.fg|=268435456,O===0&&(z.fg&=-268435457),z.updateExtended()}_processSGR0(O){O.fg=n.DEFAULT_ATTR_DATA.fg,O.bg=n.DEFAULT_ATTR_DATA.bg,O.extended=O.extended.clone(),O.extended.underlineStyle=0,O.extended.underlineColor&=-67108864,O.updateExtended()}charAttributes(O){if(O.length===1&&O.params[0]===0)return this._processSGR0(this._curAttrData),!0;const z=O.length;let F;const H=this._curAttrData;for(let Y=0;Y<z;Y++)F=O.params[Y],F>=30&&F<=37?(H.fg&=-50331904,H.fg|=16777216|F-30):F>=40&&F<=47?(H.bg&=-50331904,H.bg|=16777216|F-40):F>=90&&F<=97?(H.fg&=-50331904,H.fg|=16777224|F-90):F>=100&&F<=107?(H.bg&=-50331904,H.bg|=16777224|F-100):F===0?this._processSGR0(H):F===1?H.fg|=134217728:F===3?H.bg|=67108864:F===4?(H.fg|=268435456,this._processUnderline(O.hasSubParams(Y)?O.getSubParams(Y)[0]:1,H)):F===5?H.fg|=536870912:F===7?H.fg|=67108864:F===8?H.fg|=1073741824:F===9?H.fg|=2147483648:F===2?H.bg|=134217728:F===21?this._processUnderline(2,H):F===22?(H.fg&=-134217729,H.bg&=-134217729):F===23?H.bg&=-67108865:F===24?(H.fg&=-268435457,this._processUnderline(0,H)):F===25?H.fg&=-536870913:F===27?H.fg&=-67108865:F===28?H.fg&=-1073741825:F===29?H.fg&=2147483647:F===39?(H.fg&=-67108864,H.fg|=16777215&n.DEFAULT_ATTR_DATA.fg):F===49?(H.bg&=-67108864,H.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?Y+=this._extractColor(O,Y,H):F===53?H.bg|=1073741824:F===55?H.bg&=-1073741825:F===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):F===100?(H.fg&=-67108864,H.fg|=16777215&n.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus(O){switch(O.params[0]){case 5:this._coreService.triggerDataEvent(`${i.C0.ESC}[0n`);break;case 6:const z=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${i.C0.ESC}[${z};${F}R`)}return!0}deviceStatusPrivate(O){if(O.params[0]===6){const z=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${i.C0.ESC}[?${z};${F}R`)}return!0}softReset(O){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(O){const z=O.params[0]||1;switch(z){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=z%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion(O){const z=O.params[0]||1;let F;return(O.length<2||(F=O.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>z&&(this._activeBuffer.scrollTop=z-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions(O){if(!j(O.params[0],this._optionsService.rawOptions.windowOptions))return!0;const z=O.length>1?O.params[1]:0;switch(O.params[0]){case 14:z!==2&&this._onRequestWindowsOptionsReport.fire(E.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(E.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${i.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:z!==0&&z!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),z!==0&&z!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:z!==0&&z!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),z!==0&&z!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(O){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(O){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(O){return this._windowTitle=O,this._onTitleChange.fire(O),!0}setIconName(O){return this._iconName=O,!0}setOrReportIndexedColor(O){const z=[],F=O.split(";");for(;F.length>1;){const H=F.shift(),Y=F.shift();if(/^\d+$/.exec(H)){const K=parseInt(H);if(L(K))if(Y==="?")z.push({type:0,index:K});else{const q=(0,b.parseColor)(Y);q&&z.push({type:1,index:K,color:q})}}}return z.length&&this._onColor.fire(z),!0}setHyperlink(O){const z=O.split(";");return!(z.length<2)&&(z[1]?this._createHyperlink(z[0],z[1]):!z[0]&&this._finishHyperlink())}_createHyperlink(O,z){this._getCurrentLinkId()&&this._finishHyperlink();const F=O.split(":");let H;const Y=F.findIndex((K=>K.startsWith("id=")));return Y!==-1&&(H=F[Y].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:z}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(O,z){const F=O.split(";");for(let H=0;H<F.length&&!(z>=this._specialColors.length);++H,++z)if(F[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[z]}]);else{const Y=(0,b.parseColor)(F[H]);Y&&this._onColor.fire([{type:1,index:this._specialColors[z],color:Y}])}return!0}setOrReportFgColor(O){return this._setOrReportSpecialColor(O,0)}setOrReportBgColor(O){return this._setOrReportSpecialColor(O,1)}setOrReportCursorColor(O){return this._setOrReportSpecialColor(O,2)}restoreIndexedColor(O){if(!O)return this._onColor.fire([{type:2}]),!0;const z=[],F=O.split(";");for(let H=0;H<F.length;++H)if(/^\d+$/.exec(F[H])){const Y=parseInt(F[H]);L(Y)&&z.push({type:2,index:Y})}return z.length&&this._onColor.fire(z),!0}restoreFgColor(O){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(O){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(O){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,r.DEFAULT_CHARSET),!0}selectCharset(O){return O.length!==2?(this.selectDefaultCharset(),!0):(O[0]==="/"||this._charsetService.setgCharset(S[O[0]],r.CHARSETS[O[1]]||r.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const O=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,O,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(O){return this._charsetService.setgLevel(O),!0}screenAlignmentPattern(){const O=new y.CellData;O.content=4194373,O.fg=this._curAttrData.fg,O.bg=this._curAttrData.bg,this._setCursor(0,0);for(let z=0;z<this._bufferService.rows;++z){const F=this._activeBuffer.ybase+this._activeBuffer.y+z,H=this._activeBuffer.lines.get(F);H&&(H.fill(O),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(O,z){const F=this._bufferService.buffer,H=this._optionsService.rawOptions;return(Y=>(this._coreService.triggerDataEvent(`${i.C0.ESC}${Y}${i.C0.ESC}\\`),!0))(O==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:O==='"p'?'P1$r61;1"p':O==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:O==="m"?"P1$r0m":O===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(O,z){this._dirtyRowTracker.markRangeDirty(O,z)}}p.InputHandler=M;let C=class{constructor(I){this._bufferService=I,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(I){I<this.start?this.start=I:I>this.end&&(this.end=I)}markRangeDirty(I,O){I>O&&(A=I,I=O,O=A),I<this.start&&(this.start=I),O>this.end&&(this.end=O)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function L(I){return 0<=I&&I<256}C=h([a(0,v.IBufferService)],C)},844:(x,p)=>{function c(h){for(const a of h)a.dispose();h.length=0}Object.defineProperty(p,"__esModule",{value:!0}),p.getDisposeArrayDisposable=p.disposeArray=p.toDisposable=p.MutableDisposable=p.Disposable=void 0,p.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const a=this._disposables.indexOf(h);a!==-1&&this._disposables.splice(a,1)}},p.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var a;this._isDisposed||h===this._value||((a=this._value)===null||a===void 0||a.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)===null||h===void 0||h.dispose(),this._value=void 0}},p.toDisposable=function(h){return{dispose:h}},p.disposeArray=c,p.getDisposeArrayDisposable=function(h){return{dispose:()=>c(h)}}},1505:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.FourKeyMap=p.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(a,i,r){this._data[a]||(this._data[a]={}),this._data[a][i]=r}get(a,i){return this._data[a]?this._data[a][i]:void 0}clear(){this._data={}}}p.TwoKeyMap=c,p.FourKeyMap=class{constructor(){this._data=new c}set(h,a,i,r,o){this._data.get(h,a)||this._data.set(h,a,new c),this._data.get(h,a).set(i,r,o)}get(h,a,i,r){var o;return(o=this._data.get(h,a))===null||o===void 0?void 0:o.get(i,r)}clear(){this._data.clear()}}},6114:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.isChromeOS=p.isLinux=p.isWindows=p.isIphone=p.isIpad=p.isMac=p.getSafariVersion=p.isSafari=p.isLegacyEdge=p.isFirefox=p.isNode=void 0,p.isNode=typeof navigator>"u";const c=p.isNode?"node":navigator.userAgent,h=p.isNode?"node":navigator.platform;p.isFirefox=c.includes("Firefox"),p.isLegacyEdge=c.includes("Edge"),p.isSafari=/^((?!chrome|android).)*safari/i.test(c),p.getSafariVersion=function(){if(!p.isSafari)return 0;const a=c.match(/Version\/(\d+)/);return a===null||a.length<2?0:parseInt(a[1])},p.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),p.isIpad=h==="iPad",p.isIphone=h==="iPhone",p.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),p.isLinux=h.indexOf("Linux")>=0,p.isChromeOS=/\bCrOS\b/.test(c)},6106:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.SortedList=void 0;let c=0;p.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(c=this._search(this._getKey(h)),this._array.splice(c,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const a=this._getKey(h);if(a===void 0||(c=this._search(a),c===-1)||this._getKey(this._array[c])!==a)return!1;do if(this._array[c]===h)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===a);return!1}*getKeyIterator(h){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===h)}forEachByKey(h,a){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do a(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let a=0,i=this._array.length-1;for(;i>=a;){let r=a+i>>1;const o=this._getKey(this._array[r]);if(o>h)i=r-1;else{if(!(o<h)){for(;r>0&&this._getKey(this._array[r-1])===h;)r--;return r}a=r+1}}return a}}},7226:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.DebouncedIdleTask=p.IdleTaskQueue=p.PriorityTaskQueue=void 0;const h=c(6114);class a{constructor(){this._tasks=[],this._i=0}enqueue(o){this._tasks.push(o),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(o){this._idleCallback=void 0;let s=0,l=0,n=o.timeRemaining(),d=0;for(;this._i<this._tasks.length;){if(s=Date.now(),this._tasks[this._i]()||this._i++,s=Math.max(1,Date.now()-s),l=Math.max(s,l),d=o.timeRemaining(),1.5*l>d)return n-s<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-s))}ms`),void this._start();n=d}this.clear()}}class i extends a{_requestCallback(o){return setTimeout((()=>o(this._createDeadline(16))))}_cancelCallback(o){clearTimeout(o)}_createDeadline(o){const s=Date.now()+o;return{timeRemaining:()=>Math.max(0,s-Date.now())}}}p.PriorityTaskQueue=i,p.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends a{_requestCallback(r){return requestIdleCallback(r)}_cancelCallback(r){cancelIdleCallback(r)}}:i,p.DebouncedIdleTask=class{constructor(){this._queue=new p.IdleTaskQueue}set(r){this._queue.clear(),this._queue.enqueue(r)}flush(){this._queue.flush()}}},9282:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.updateWindowsModeWrappedState=void 0;const h=c(643);p.updateWindowsModeWrappedState=function(a){const i=a.buffer.lines.get(a.buffer.ybase+a.buffer.y-1),r=i?.get(a.cols-1),o=a.buffer.lines.get(a.buffer.ybase+a.buffer.y);o&&r&&(o.isWrapped=r[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&r[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExtendedAttrs=p.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(i){return[i>>>16&255,i>>>8&255,255&i]}static fromColorRGB(i){return(255&i[0])<<16|(255&i[1])<<8|255&i[2]}clone(){const i=new c;return i.fg=this.fg,i.bg=this.bg,i.extended=this.extended.clone(),i}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}p.AttributeData=c;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(i){this._ext=i}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(i){this._ext&=-469762049,this._ext|=i<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(i){this._ext&=-67108864,this._ext|=67108863&i}get urlId(){return this._urlId}set urlId(i){this._urlId=i}constructor(i=0,r=0){this._ext=0,this._urlId=0,this._ext=i,this._urlId=r}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}p.ExtendedAttrs=h},9092:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.Buffer=p.MAX_BUFFER_SIZE=void 0;const h=c(6349),a=c(7226),i=c(3734),r=c(8437),o=c(4634),s=c(511),l=c(643),n=c(4863),d=c(7116);p.MAX_BUFFER_SIZE=4294967295,p.Buffer=class{constructor(f,y,_){this._hasScrollback=f,this._optionsService=y,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=r.DEFAULT_ATTR_DATA.clone(),this.savedCharset=d.DEFAULT_CHARSET,this.markers=[],this._nullCell=s.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]),this._whitespaceCell=s.CellData.fromCharData([0,l.WHITESPACE_CELL_CHAR,l.WHITESPACE_CELL_WIDTH,l.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new a.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(f){return f?(this._nullCell.fg=f.fg,this._nullCell.bg=f.bg,this._nullCell.extended=f.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new i.ExtendedAttrs),this._nullCell}getWhitespaceCell(f){return f?(this._whitespaceCell.fg=f.fg,this._whitespaceCell.bg=f.bg,this._whitespaceCell.extended=f.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new i.ExtendedAttrs),this._whitespaceCell}getBlankLine(f,y){return new r.BufferLine(this._bufferService.cols,this.getNullCell(f),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const f=this.ybase+this.y-this.ydisp;return f>=0&&f<this._rows}_getCorrectBufferLength(f){if(!this._hasScrollback)return f;const y=f+this._optionsService.rawOptions.scrollback;return y>p.MAX_BUFFER_SIZE?p.MAX_BUFFER_SIZE:y}fillViewportRows(f){if(this.lines.length===0){f===void 0&&(f=r.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(f))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(f,y){const _=this.getNullCell(r.DEFAULT_ATTR_DATA);let v=0;const g=this._getCorrectBufferLength(y);if(g>this.lines.maxLength&&(this.lines.maxLength=g),this.lines.length>0){if(this._cols<f)for(let b=0;b<this.lines.length;b++)v+=+this.lines.get(b).resize(f,_);let w=0;if(this._rows<y)for(let b=this._rows;b<y;b++)this.lines.length<y+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new r.BufferLine(f,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new r.BufferLine(f,_)));else for(let b=this._rows;b>y;b--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(g<this.lines.maxLength){const b=this.lines.length-g;b>0&&(this.lines.trimStart(b),this.ybase=Math.max(this.ybase-b,0),this.ydisp=Math.max(this.ydisp-b,0),this.savedY=Math.max(this.savedY-b,0)),this.lines.maxLength=g}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,y-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(f,y),this._cols>f))for(let w=0;w<this.lines.length;w++)v+=+this.lines.get(w).resize(f,_);this._cols=f,this._rows=y,this._memoryCleanupQueue.clear(),v>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let f=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,f=!1);let y=0;for(;this._memoryCleanupPosition<this.lines.length;)if(y+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),y>100)return!0;return f}get _isReflowEnabled(){const f=this._optionsService.rawOptions.windowsPty;return f&&f.buildNumber?this._hasScrollback&&f.backend==="conpty"&&f.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(f,y){this._cols!==f&&(f>this._cols?this._reflowLarger(f,y):this._reflowSmaller(f,y))}_reflowLarger(f,y){const _=(0,o.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(r.DEFAULT_ATTR_DATA));if(_.length>0){const v=(0,o.reflowLargerCreateNewLayout)(this.lines,_);(0,o.reflowLargerApplyNewLayout)(this.lines,v.layout),this._reflowLargerAdjustViewport(f,y,v.countRemoved)}}_reflowLargerAdjustViewport(f,y,_){const v=this.getNullCell(r.DEFAULT_ATTR_DATA);let g=_;for(;g-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<y&&this.lines.push(new r.BufferLine(f,v))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(f,y){const _=this.getNullCell(r.DEFAULT_ATTR_DATA),v=[];let g=0;for(let w=this.lines.length-1;w>=0;w--){let b=this.lines.get(w);if(!b||!b.isWrapped&&b.getTrimmedLength()<=f)continue;const S=[b];for(;b.isWrapped&&w>0;)b=this.lines.get(--w),S.unshift(b);const T=this.ybase+this.y;if(T>=w&&T<w+S.length)continue;const j=S[S.length-1].getTrimmedLength(),E=(0,o.reflowSmallerGetNewLineLengths)(S,this._cols,f),A=E.length-S.length;let M;M=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+A):Math.max(0,this.lines.length-this.lines.maxLength+A);const C=[];for(let H=0;H<A;H++){const Y=this.getBlankLine(r.DEFAULT_ATTR_DATA,!0);C.push(Y)}C.length>0&&(v.push({start:w+S.length+g,newLines:C}),g+=C.length),S.push(...C);let L=E.length-1,I=E[L];I===0&&(L--,I=E[L]);let O=S.length-A-1,z=j;for(;O>=0;){const H=Math.min(z,I);if(S[L]===void 0)break;if(S[L].copyCellsFrom(S[O],z-H,I-H,H,!0),I-=H,I===0&&(L--,I=E[L]),z-=H,z===0){O--;const Y=Math.max(O,0);z=(0,o.getWrappedLineTrimmedLength)(S,Y,this._cols)}}for(let H=0;H<S.length;H++)E[H]<f&&S[H].setCell(E[H],_);let F=A-M;for(;F-- >0;)this.ybase===0?this.y<y-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+g)-y&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+A,this.ybase+y-1)}if(v.length>0){const w=[],b=[];for(let L=0;L<this.lines.length;L++)b.push(this.lines.get(L));const S=this.lines.length;let T=S-1,j=0,E=v[j];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+g);let A=0;for(let L=Math.min(this.lines.maxLength-1,S+g-1);L>=0;L--)if(E&&E.start>T+A){for(let I=E.newLines.length-1;I>=0;I--)this.lines.set(L--,E.newLines[I]);L++,w.push({index:T+1,amount:E.newLines.length}),A+=E.newLines.length,E=v[++j]}else this.lines.set(L,b[T--]);let M=0;for(let L=w.length-1;L>=0;L--)w[L].index+=M,this.lines.onInsertEmitter.fire(w[L]),M+=w[L].amount;const C=Math.max(0,S+g-this.lines.maxLength);C>0&&this.lines.onTrimEmitter.fire(C)}}translateBufferLineToString(f,y,_=0,v){const g=this.lines.get(f);return g?g.translateToString(y,_,v):""}getWrappedRangeForLine(f){let y=f,_=f;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:y,last:_}}setupTabStops(f){for(f!=null?this.tabs[f]||(f=this.prevStop(f)):(this.tabs={},f=0);f<this._cols;f+=this._optionsService.rawOptions.tabStopWidth)this.tabs[f]=!0}prevStop(f){for(f==null&&(f=this.x);!this.tabs[--f]&&f>0;);return f>=this._cols?this._cols-1:f<0?0:f}nextStop(f){for(f==null&&(f=this.x);!this.tabs[++f]&&f<this._cols;);return f>=this._cols?this._cols-1:f<0?0:f}clearMarkers(f){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].line===f&&(this.markers[y].dispose(),this.markers.splice(y--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].dispose(),this.markers.splice(f--,1);this._isClearing=!1}addMarker(f){const y=new n.Marker(f);return this.markers.push(y),y.register(this.lines.onTrim((_=>{y.line-=_,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((_=>{y.line>=_.index&&(y.line+=_.amount)}))),y.register(this.lines.onDelete((_=>{y.line>=_.index&&y.line<_.index+_.amount&&y.dispose(),y.line>_.index&&(y.line-=_.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)}}},8437:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.BufferLine=p.DEFAULT_ATTR_DATA=void 0;const h=c(3734),a=c(511),i=c(643),r=c(482);p.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let o=0;class s{constructor(n,d,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*n);const y=d||a.CellData.fromCharData([0,i.NULL_CELL_CHAR,i.NULL_CELL_WIDTH,i.NULL_CELL_CODE]);for(let _=0;_<n;++_)this.setCell(_,y);this.length=n}get(n){const d=this._data[3*n+0],f=2097151&d;return[this._data[3*n+1],2097152&d?this._combined[n]:f?(0,r.stringFromCodePoint)(f):"",d>>22,2097152&d?this._combined[n].charCodeAt(this._combined[n].length-1):f]}set(n,d){this._data[3*n+1]=d[i.CHAR_DATA_ATTR_INDEX],d[i.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[n]=d[1],this._data[3*n+0]=2097152|n|d[i.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*n+0]=d[i.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|d[i.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(n){return this._data[3*n+0]>>22}hasWidth(n){return 12582912&this._data[3*n+0]}getFg(n){return this._data[3*n+1]}getBg(n){return this._data[3*n+2]}hasContent(n){return 4194303&this._data[3*n+0]}getCodePoint(n){const d=this._data[3*n+0];return 2097152&d?this._combined[n].charCodeAt(this._combined[n].length-1):2097151&d}isCombined(n){return 2097152&this._data[3*n+0]}getString(n){const d=this._data[3*n+0];return 2097152&d?this._combined[n]:2097151&d?(0,r.stringFromCodePoint)(2097151&d):""}isProtected(n){return 536870912&this._data[3*n+2]}loadCell(n,d){return o=3*n,d.content=this._data[o+0],d.fg=this._data[o+1],d.bg=this._data[o+2],2097152&d.content&&(d.combinedData=this._combined[n]),268435456&d.bg&&(d.extended=this._extendedAttrs[n]),d}setCell(n,d){2097152&d.content&&(this._combined[n]=d.combinedData),268435456&d.bg&&(this._extendedAttrs[n]=d.extended),this._data[3*n+0]=d.content,this._data[3*n+1]=d.fg,this._data[3*n+2]=d.bg}setCellFromCodePoint(n,d,f,y,_,v){268435456&_&&(this._extendedAttrs[n]=v),this._data[3*n+0]=d|f<<22,this._data[3*n+1]=y,this._data[3*n+2]=_}addCodepointToCell(n,d){let f=this._data[3*n+0];2097152&f?this._combined[n]+=(0,r.stringFromCodePoint)(d):(2097151&f?(this._combined[n]=(0,r.stringFromCodePoint)(2097151&f)+(0,r.stringFromCodePoint)(d),f&=-2097152,f|=2097152):f=d|4194304,this._data[3*n+0]=f)}insertCells(n,d,f,y){if((n%=this.length)&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs),d<this.length-n){const _=new a.CellData;for(let v=this.length-n-d-1;v>=0;--v)this.setCell(n+d+v,this.loadCell(n+v,_));for(let v=0;v<d;++v)this.setCell(n+v,f)}else for(let _=n;_<this.length;++_)this.setCell(_,f);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs)}deleteCells(n,d,f,y){if(n%=this.length,d<this.length-n){const _=new a.CellData;for(let v=0;v<this.length-n-d;++v)this.setCell(n+v,this.loadCell(n+d+v,_));for(let v=this.length-d;v<this.length;++v)this.setCell(v,f)}else for(let _=n;_<this.length;++_)this.setCell(_,f);n&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs),this.getWidth(n)!==0||this.hasContent(n)||this.setCellFromCodePoint(n,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs)}replaceCells(n,d,f,y,_=!1){if(_)for(n&&this.getWidth(n-1)===2&&!this.isProtected(n-1)&&this.setCellFromCodePoint(n-1,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs),d<this.length&&this.getWidth(d-1)===2&&!this.isProtected(d)&&this.setCellFromCodePoint(d,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs);n<d&&n<this.length;)this.isProtected(n)||this.setCell(n,f),n++;else for(n&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs),d<this.length&&this.getWidth(d-1)===2&&this.setCellFromCodePoint(d,0,1,y?.fg||0,y?.bg||0,y?.extended||new h.ExtendedAttrs);n<d&&n<this.length;)this.setCell(n++,f)}resize(n,d){if(n===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const f=3*n;if(n>this.length){if(this._data.buffer.byteLength>=4*f)this._data=new Uint32Array(this._data.buffer,0,f);else{const y=new Uint32Array(f);y.set(this._data),this._data=y}for(let y=this.length;y<n;++y)this.setCell(y,d)}else{this._data=this._data.subarray(0,f);const y=Object.keys(this._combined);for(let v=0;v<y.length;v++){const g=parseInt(y[v],10);g>=n&&delete this._combined[g]}const _=Object.keys(this._extendedAttrs);for(let v=0;v<_.length;v++){const g=parseInt(_[v],10);g>=n&&delete this._extendedAttrs[g]}}return this.length=n,4*f*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const n=new Uint32Array(this._data.length);return n.set(this._data),this._data=n,1}return 0}fill(n,d=!1){if(d)for(let f=0;f<this.length;++f)this.isProtected(f)||this.setCell(f,n);else{this._combined={},this._extendedAttrs={};for(let f=0;f<this.length;++f)this.setCell(f,n)}}copyFrom(n){this.length!==n.length?this._data=new Uint32Array(n._data):this._data.set(n._data),this.length=n.length,this._combined={};for(const d in n._combined)this._combined[d]=n._combined[d];this._extendedAttrs={};for(const d in n._extendedAttrs)this._extendedAttrs[d]=n._extendedAttrs[d];this.isWrapped=n.isWrapped}clone(){const n=new s(0);n._data=new Uint32Array(this._data),n.length=this.length;for(const d in this._combined)n._combined[d]=this._combined[d];for(const d in this._extendedAttrs)n._extendedAttrs[d]=this._extendedAttrs[d];return n.isWrapped=this.isWrapped,n}getTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0])return n+(this._data[3*n+0]>>22);return 0}getNoBgTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0]||50331648&this._data[3*n+2])return n+(this._data[3*n+0]>>22);return 0}copyCellsFrom(n,d,f,y,_){const v=n._data;if(_)for(let w=y-1;w>=0;w--){for(let b=0;b<3;b++)this._data[3*(f+w)+b]=v[3*(d+w)+b];268435456&v[3*(d+w)+2]&&(this._extendedAttrs[f+w]=n._extendedAttrs[d+w])}else for(let w=0;w<y;w++){for(let b=0;b<3;b++)this._data[3*(f+w)+b]=v[3*(d+w)+b];268435456&v[3*(d+w)+2]&&(this._extendedAttrs[f+w]=n._extendedAttrs[d+w])}const g=Object.keys(n._combined);for(let w=0;w<g.length;w++){const b=parseInt(g[w],10);b>=d&&(this._combined[b-d+f]=n._combined[b])}}translateToString(n=!1,d=0,f=this.length){n&&(f=Math.min(f,this.getTrimmedLength()));let y="";for(;d<f;){const _=this._data[3*d+0],v=2097151&_;y+=2097152&_?this._combined[d]:v?(0,r.stringFromCodePoint)(v):i.WHITESPACE_CELL_CHAR,d+=_>>22||1}return y}}p.BufferLine=s},4841:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.getRangeLength=void 0,p.getRangeLength=function(c,h){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return h*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(x,p)=>{function c(h,a,i){if(a===h.length-1)return h[a].getTrimmedLength();const r=!h[a].hasContent(i-1)&&h[a].getWidth(i-1)===1,o=h[a+1].getWidth(0)===2;return r&&o?i-1:i}Object.defineProperty(p,"__esModule",{value:!0}),p.getWrappedLineTrimmedLength=p.reflowSmallerGetNewLineLengths=p.reflowLargerApplyNewLayout=p.reflowLargerCreateNewLayout=p.reflowLargerGetLinesToRemove=void 0,p.reflowLargerGetLinesToRemove=function(h,a,i,r,o){const s=[];for(let l=0;l<h.length-1;l++){let n=l,d=h.get(++n);if(!d.isWrapped)continue;const f=[h.get(l)];for(;n<h.length&&d.isWrapped;)f.push(d),d=h.get(++n);if(r>=l&&r<n){l+=f.length-1;continue}let y=0,_=c(f,y,a),v=1,g=0;for(;v<f.length;){const b=c(f,v,a),S=b-g,T=i-_,j=Math.min(S,T);f[y].copyCellsFrom(f[v],g,_,j,!1),_+=j,_===i&&(y++,_=0),g+=j,g===b&&(v++,g=0),_===0&&y!==0&&f[y-1].getWidth(i-1)===2&&(f[y].copyCellsFrom(f[y-1],i-1,_++,1,!1),f[y-1].setCell(i-1,o))}f[y].replaceCells(_,i,o);let w=0;for(let b=f.length-1;b>0&&(b>y||f[b].getTrimmedLength()===0);b--)w++;w>0&&(s.push(l+f.length-w),s.push(w)),l+=f.length-1}return s},p.reflowLargerCreateNewLayout=function(h,a){const i=[];let r=0,o=a[r],s=0;for(let l=0;l<h.length;l++)if(o===l){const n=a[++r];h.onDeleteEmitter.fire({index:l-s,amount:n}),l+=n-1,s+=n,o=a[++r]}else i.push(l);return{layout:i,countRemoved:s}},p.reflowLargerApplyNewLayout=function(h,a){const i=[];for(let r=0;r<a.length;r++)i.push(h.get(a[r]));for(let r=0;r<i.length;r++)h.set(r,i[r]);h.length=a.length},p.reflowSmallerGetNewLineLengths=function(h,a,i){const r=[],o=h.map(((d,f)=>c(h,f,a))).reduce(((d,f)=>d+f));let s=0,l=0,n=0;for(;n<o;){if(o-n<i){r.push(o-n);break}s+=i;const d=c(h,l,a);s>d&&(s-=d,l++);const f=h[l].getWidth(s-1)===2;f&&s--;const y=f?i-1:i;r.push(y),n+=y}return r},p.getWrappedLineTrimmedLength=c},5295:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.BufferSet=void 0;const h=c(8460),a=c(844),i=c(9092);class r extends a.Disposable{constructor(s,l){super(),this._optionsService=s,this._bufferService=l,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new i.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new i.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(s){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(s),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(s,l){this._normal.resize(s,l),this._alt.resize(s,l),this.setupTabStops(s)}setupTabStops(s){this._normal.setupTabStops(s),this._alt.setupTabStops(s)}}p.BufferSet=r},511:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CellData=void 0;const h=c(482),a=c(643),i=c(3734);class r extends i.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new i.ExtendedAttrs,this.combinedData=""}static fromCharData(s){const l=new r;return l.setFromCharData(s),l}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(s){this.fg=s[a.CHAR_DATA_ATTR_INDEX],this.bg=0;let l=!1;if(s[a.CHAR_DATA_CHAR_INDEX].length>2)l=!0;else if(s[a.CHAR_DATA_CHAR_INDEX].length===2){const n=s[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){const d=s[a.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=d&&d<=57343?this.content=1024*(n-55296)+d-56320+65536|s[a.CHAR_DATA_WIDTH_INDEX]<<22:l=!0}else l=!0}else this.content=s[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[a.CHAR_DATA_WIDTH_INDEX]<<22;l&&(this.combinedData=s[a.CHAR_DATA_CHAR_INDEX],this.content=2097152|s[a.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}p.CellData=r},643:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.WHITESPACE_CELL_CODE=p.WHITESPACE_CELL_WIDTH=p.WHITESPACE_CELL_CHAR=p.NULL_CELL_CODE=p.NULL_CELL_WIDTH=p.NULL_CELL_CHAR=p.CHAR_DATA_CODE_INDEX=p.CHAR_DATA_WIDTH_INDEX=p.CHAR_DATA_CHAR_INDEX=p.CHAR_DATA_ATTR_INDEX=p.DEFAULT_EXT=p.DEFAULT_ATTR=p.DEFAULT_COLOR=void 0,p.DEFAULT_COLOR=0,p.DEFAULT_ATTR=256|p.DEFAULT_COLOR<<9,p.DEFAULT_EXT=0,p.CHAR_DATA_ATTR_INDEX=0,p.CHAR_DATA_CHAR_INDEX=1,p.CHAR_DATA_WIDTH_INDEX=2,p.CHAR_DATA_CODE_INDEX=3,p.NULL_CELL_CHAR="",p.NULL_CELL_WIDTH=1,p.NULL_CELL_CODE=0,p.WHITESPACE_CELL_CHAR=" ",p.WHITESPACE_CELL_WIDTH=1,p.WHITESPACE_CELL_CODE=32},4863:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.Marker=void 0;const h=c(8460),a=c(844);class i{get id(){return this._id}constructor(o){this.line=o,this.isDisposed=!1,this._disposables=[],this._id=i._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,a.disposeArray)(this._disposables),this._disposables.length=0)}register(o){return this._disposables.push(o),o}}p.Marker=i,i._nextId=1},7116:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.DEFAULT_CHARSET=p.CHARSETS=void 0,p.CHARSETS={},p.DEFAULT_CHARSET=p.CHARSETS.B,p.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},p.CHARSETS.A={"#":"£"},p.CHARSETS.B=void 0,p.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},p.CHARSETS.C=p.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},p.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},p.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},p.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},p.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},p.CHARSETS.E=p.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},p.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},p.CHARSETS.H=p.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},p.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(x,p)=>{var c,h,a;Object.defineProperty(p,"__esModule",{value:!0}),p.C1_ESCAPED=p.C1=p.C0=void 0,(function(i){i.NUL="\0",i.SOH="",i.STX="",i.ETX="",i.EOT="",i.ENQ="",i.ACK="",i.BEL="\x07",i.BS="\b",i.HT=" ",i.LF=`
16
- `,i.VT="\v",i.FF="\f",i.CR="\r",i.SO="",i.SI="",i.DLE="",i.DC1="",i.DC2="",i.DC3="",i.DC4="",i.NAK="",i.SYN="",i.ETB="",i.CAN="",i.EM="",i.SUB="",i.ESC="\x1B",i.FS="",i.GS="",i.RS="",i.US="",i.SP=" ",i.DEL=""})(c||(p.C0=c={})),(function(i){i.PAD="€",i.HOP="",i.BPH="‚",i.NBH="ƒ",i.IND="„",i.NEL="…",i.SSA="†",i.ESA="‡",i.HTS="ˆ",i.HTJ="‰",i.VTS="Š",i.PLD="‹",i.PLU="Œ",i.RI="",i.SS2="Ž",i.SS3="",i.DCS="",i.PU1="‘",i.PU2="’",i.STS="“",i.CCH="”",i.MW="•",i.SPA="–",i.EPA="—",i.SOS="˜",i.SGCI="™",i.SCI="š",i.CSI="›",i.ST="œ",i.OSC="",i.PM="ž",i.APC="Ÿ"})(h||(p.C1=h={})),(function(i){i.ST=`${c.ESC}\\`})(a||(p.C1_ESCAPED=a={}))},7399:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.evaluateKeyboardEvent=void 0;const h=c(2584),a={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};p.evaluateKeyboardEvent=function(i,r,o,s){const l={type:0,cancel:!1,key:void 0},n=(i.shiftKey?1:0)|(i.altKey?2:0)|(i.ctrlKey?4:0)|(i.metaKey?8:0);switch(i.keyCode){case 0:i.key==="UIKeyInputUpArrow"?l.key=r?h.C0.ESC+"OA":h.C0.ESC+"[A":i.key==="UIKeyInputLeftArrow"?l.key=r?h.C0.ESC+"OD":h.C0.ESC+"[D":i.key==="UIKeyInputRightArrow"?l.key=r?h.C0.ESC+"OC":h.C0.ESC+"[C":i.key==="UIKeyInputDownArrow"&&(l.key=r?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:if(i.altKey){l.key=h.C0.ESC+h.C0.DEL;break}l.key=h.C0.DEL;break;case 9:if(i.shiftKey){l.key=h.C0.ESC+"[Z";break}l.key=h.C0.HT,l.cancel=!0;break;case 13:l.key=i.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,l.cancel=!0;break;case 27:l.key=h.C0.ESC,i.altKey&&(l.key=h.C0.ESC+h.C0.ESC),l.cancel=!0;break;case 37:if(i.metaKey)break;n?(l.key=h.C0.ESC+"[1;"+(n+1)+"D",l.key===h.C0.ESC+"[1;3D"&&(l.key=h.C0.ESC+(o?"b":"[1;5D"))):l.key=r?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(i.metaKey)break;n?(l.key=h.C0.ESC+"[1;"+(n+1)+"C",l.key===h.C0.ESC+"[1;3C"&&(l.key=h.C0.ESC+(o?"f":"[1;5C"))):l.key=r?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(i.metaKey)break;n?(l.key=h.C0.ESC+"[1;"+(n+1)+"A",o||l.key!==h.C0.ESC+"[1;3A"||(l.key=h.C0.ESC+"[1;5A")):l.key=r?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(i.metaKey)break;n?(l.key=h.C0.ESC+"[1;"+(n+1)+"B",o||l.key!==h.C0.ESC+"[1;3B"||(l.key=h.C0.ESC+"[1;5B")):l.key=r?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:i.shiftKey||i.ctrlKey||(l.key=h.C0.ESC+"[2~");break;case 46:l.key=n?h.C0.ESC+"[3;"+(n+1)+"~":h.C0.ESC+"[3~";break;case 36:l.key=n?h.C0.ESC+"[1;"+(n+1)+"H":r?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:l.key=n?h.C0.ESC+"[1;"+(n+1)+"F":r?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:i.shiftKey?l.type=2:i.ctrlKey?l.key=h.C0.ESC+"[5;"+(n+1)+"~":l.key=h.C0.ESC+"[5~";break;case 34:i.shiftKey?l.type=3:i.ctrlKey?l.key=h.C0.ESC+"[6;"+(n+1)+"~":l.key=h.C0.ESC+"[6~";break;case 112:l.key=n?h.C0.ESC+"[1;"+(n+1)+"P":h.C0.ESC+"OP";break;case 113:l.key=n?h.C0.ESC+"[1;"+(n+1)+"Q":h.C0.ESC+"OQ";break;case 114:l.key=n?h.C0.ESC+"[1;"+(n+1)+"R":h.C0.ESC+"OR";break;case 115:l.key=n?h.C0.ESC+"[1;"+(n+1)+"S":h.C0.ESC+"OS";break;case 116:l.key=n?h.C0.ESC+"[15;"+(n+1)+"~":h.C0.ESC+"[15~";break;case 117:l.key=n?h.C0.ESC+"[17;"+(n+1)+"~":h.C0.ESC+"[17~";break;case 118:l.key=n?h.C0.ESC+"[18;"+(n+1)+"~":h.C0.ESC+"[18~";break;case 119:l.key=n?h.C0.ESC+"[19;"+(n+1)+"~":h.C0.ESC+"[19~";break;case 120:l.key=n?h.C0.ESC+"[20;"+(n+1)+"~":h.C0.ESC+"[20~";break;case 121:l.key=n?h.C0.ESC+"[21;"+(n+1)+"~":h.C0.ESC+"[21~";break;case 122:l.key=n?h.C0.ESC+"[23;"+(n+1)+"~":h.C0.ESC+"[23~";break;case 123:l.key=n?h.C0.ESC+"[24;"+(n+1)+"~":h.C0.ESC+"[24~";break;default:if(!i.ctrlKey||i.shiftKey||i.altKey||i.metaKey)if(o&&!s||!i.altKey||i.metaKey)!o||i.altKey||i.ctrlKey||i.shiftKey||!i.metaKey?i.key&&!i.ctrlKey&&!i.altKey&&!i.metaKey&&i.keyCode>=48&&i.key.length===1?l.key=i.key:i.key&&i.ctrlKey&&(i.key==="_"&&(l.key=h.C0.US),i.key==="@"&&(l.key=h.C0.NUL)):i.keyCode===65&&(l.type=1);else{const d=a[i.keyCode],f=d?.[i.shiftKey?1:0];if(f)l.key=h.C0.ESC+f;else if(i.keyCode>=65&&i.keyCode<=90){const y=i.ctrlKey?i.keyCode-64:i.keyCode+32;let _=String.fromCharCode(y);i.shiftKey&&(_=_.toUpperCase()),l.key=h.C0.ESC+_}else if(i.keyCode===32)l.key=h.C0.ESC+(i.ctrlKey?h.C0.NUL:" ");else if(i.key==="Dead"&&i.code.startsWith("Key")){let y=i.code.slice(3,4);i.shiftKey||(y=y.toLowerCase()),l.key=h.C0.ESC+y,l.cancel=!0}}else i.keyCode>=65&&i.keyCode<=90?l.key=String.fromCharCode(i.keyCode-64):i.keyCode===32?l.key=h.C0.NUL:i.keyCode>=51&&i.keyCode<=55?l.key=String.fromCharCode(i.keyCode-51+27):i.keyCode===56?l.key=h.C0.DEL:i.keyCode===219?l.key=h.C0.ESC:i.keyCode===220?l.key=h.C0.FS:i.keyCode===221&&(l.key=h.C0.GS)}return l}},482:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.Utf8ToUtf32=p.StringToUtf32=p.utf32ToString=p.stringFromCodePoint=void 0,p.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},p.utf32ToString=function(c,h=0,a=c.length){let i="";for(let r=h;r<a;++r){let o=c[r];o>65535?(o-=65536,i+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):i+=String.fromCharCode(o)}return i},p.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,h){const a=c.length;if(!a)return 0;let i=0,r=0;if(this._interim){const o=c.charCodeAt(r++);56320<=o&&o<=57343?h[i++]=1024*(this._interim-55296)+o-56320+65536:(h[i++]=this._interim,h[i++]=o),this._interim=0}for(let o=r;o<a;++o){const s=c.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=a)return this._interim=s,i;const l=c.charCodeAt(o);56320<=l&&l<=57343?h[i++]=1024*(s-55296)+l-56320+65536:(h[i++]=s,h[i++]=l)}else s!==65279&&(h[i++]=s)}return i}},p.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const a=c.length;if(!a)return 0;let i,r,o,s,l=0,n=0,d=0;if(this.interim[0]){let _=!1,v=this.interim[0];v&=(224&v)==192?31:(240&v)==224?15:7;let g,w=0;for(;(g=63&this.interim[++w])&&w<4;)v<<=6,v|=g;const b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,S=b-w;for(;d<S;){if(d>=a)return 0;if(g=c[d++],(192&g)!=128){d--,_=!0;break}this.interim[w++]=g,v<<=6,v|=63&g}_||(b===2?v<128?d--:h[l++]=v:b===3?v<2048||v>=55296&&v<=57343||v===65279||(h[l++]=v):v<65536||v>1114111||(h[l++]=v)),this.interim.fill(0)}const f=a-4;let y=d;for(;y<a;){for(;!(!(y<f)||128&(i=c[y])||128&(r=c[y+1])||128&(o=c[y+2])||128&(s=c[y+3]));)h[l++]=i,h[l++]=r,h[l++]=o,h[l++]=s,y+=4;if(i=c[y++],i<128)h[l++]=i;else if((224&i)==192){if(y>=a)return this.interim[0]=i,l;if(r=c[y++],(192&r)!=128){y--;continue}if(n=(31&i)<<6|63&r,n<128){y--;continue}h[l++]=n}else if((240&i)==224){if(y>=a)return this.interim[0]=i,l;if(r=c[y++],(192&r)!=128){y--;continue}if(y>=a)return this.interim[0]=i,this.interim[1]=r,l;if(o=c[y++],(192&o)!=128){y--;continue}if(n=(15&i)<<12|(63&r)<<6|63&o,n<2048||n>=55296&&n<=57343||n===65279)continue;h[l++]=n}else if((248&i)==240){if(y>=a)return this.interim[0]=i,l;if(r=c[y++],(192&r)!=128){y--;continue}if(y>=a)return this.interim[0]=i,this.interim[1]=r,l;if(o=c[y++],(192&o)!=128){y--;continue}if(y>=a)return this.interim[0]=i,this.interim[1]=r,this.interim[2]=o,l;if(s=c[y++],(192&s)!=128){y--;continue}if(n=(7&i)<<18|(63&r)<<12|(63&o)<<6|63&s,n<65536||n>1114111)continue;h[l++]=n}}return l}}},225:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.UnicodeV6=void 0;const c=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let a;p.UnicodeV6=class{constructor(){if(this.version="6",!a){a=new Uint8Array(65536),a.fill(1),a[0]=0,a.fill(0,1,32),a.fill(0,127,160),a.fill(2,4352,4448),a[9001]=2,a[9002]=2,a.fill(2,11904,42192),a[12351]=1,a.fill(2,44032,55204),a.fill(2,63744,64256),a.fill(2,65040,65050),a.fill(2,65072,65136),a.fill(2,65280,65377),a.fill(2,65504,65511);for(let i=0;i<c.length;++i)a.fill(0,c[i][0],c[i][1]+1)}}wcwidth(i){return i<32?0:i<127?1:i<65536?a[i]:(function(r,o){let s,l=0,n=o.length-1;if(r<o[0][0]||r>o[n][1])return!1;for(;n>=l;)if(s=l+n>>1,r>o[s][1])l=s+1;else{if(!(r<o[s][0]))return!0;n=s-1}return!1})(i,h)?0:i>=131072&&i<=196605||i>=196608&&i<=262141?2:1}}},5981:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.WriteBuffer=void 0;const h=c(8460),a=c(844);class i extends a.Disposable{constructor(o){super(),this._action=o,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(o,s){if(s!==void 0&&this._syncCalls>s)return void(this._syncCalls=0);if(this._pendingData+=o.length,this._writeBuffer.push(o),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let l;for(this._isSyncWriting=!0;l=this._writeBuffer.shift();){this._action(l);const n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(o,s){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=o.length,this._writeBuffer.push(o),this._callbacks.push(s),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=o.length,this._writeBuffer.push(o),this._callbacks.push(s)}_innerWrite(o=0,s=!0){const l=o||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const n=this._writeBuffer[this._bufferOffset],d=this._action(n,s);if(d){const y=_=>Date.now()-l>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(l,_);return void d.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(y)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=n.length,Date.now()-l>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}p.WriteBuffer=i},5941:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.toRgbString=p.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,h=/^[\da-f]+$/;function a(i,r){const o=i.toString(16),s=o.length<2?"0"+o:o;switch(r){case 4:return o[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}p.parseColor=function(i){if(!i)return;let r=i.toLowerCase();if(r.indexOf("rgb:")===0){r=r.slice(4);const o=c.exec(r);if(o){const s=o[1]?15:o[4]?255:o[7]?4095:65535;return[Math.round(parseInt(o[1]||o[4]||o[7]||o[10],16)/s*255),Math.round(parseInt(o[2]||o[5]||o[8]||o[11],16)/s*255),Math.round(parseInt(o[3]||o[6]||o[9]||o[12],16)/s*255)]}}else if(r.indexOf("#")===0&&(r=r.slice(1),h.exec(r)&&[3,6,9,12].includes(r.length))){const o=r.length/3,s=[0,0,0];for(let l=0;l<3;++l){const n=parseInt(r.slice(o*l,o*l+o),16);s[l]=o===1?n<<4:o===2?n:o===3?n>>4:n>>8}return s}},p.toRgbString=function(i,r=16){const[o,s,l]=i;return`rgb:${a(o,r)}/${a(s,r)}/${a(l,r)}`}},5770:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.PAYLOAD_LIMIT=void 0,p.PAYLOAD_LIMIT=1e7},6351:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.DcsHandler=p.DcsParser=void 0;const h=c(482),a=c(8742),i=c(5770),r=[];p.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=r,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=r}registerHandler(s,l){this._handlers[s]===void 0&&(this._handlers[s]=[]);const n=this._handlers[s];return n.push(l),{dispose:()=>{const d=n.indexOf(l);d!==-1&&n.splice(d,1)}}}clearHandler(s){this._handlers[s]&&delete this._handlers[s]}setHandlerFallback(s){this._handlerFb=s}reset(){if(this._active.length)for(let s=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;s>=0;--s)this._active[s].unhook(!1);this._stack.paused=!1,this._active=r,this._ident=0}hook(s,l){if(this.reset(),this._ident=s,this._active=this._handlers[s]||r,this._active.length)for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(l);else this._handlerFb(this._ident,"HOOK",l)}put(s,l,n){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(s,l,n);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(s,l,n))}unhook(s,l=!0){if(this._active.length){let n=!1,d=this._active.length-1,f=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,n=l,f=this._stack.fallThrough,this._stack.paused=!1),!f&&n===!1){for(;d>=0&&(n=this._active[d].unhook(s),n!==!0);d--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,n;d--}for(;d>=0;d--)if(n=this._active[d].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,n}else this._handlerFb(this._ident,"UNHOOK",s);this._active=r,this._ident=0}};const o=new a.Params;o.addParam(0),p.DcsHandler=class{constructor(s){this._handler=s,this._data="",this._params=o,this._hitLimit=!1}hook(s){this._params=s.length>1||s.params[0]?s.clone():o,this._data="",this._hitLimit=!1}put(s,l,n){this._hitLimit||(this._data+=(0,h.utf32ToString)(s,l,n),this._data.length>i.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(s){let l=!1;if(this._hitLimit)l=!1;else if(s&&(l=this._handler(this._data,this._params),l instanceof Promise))return l.then((n=>(this._params=o,this._data="",this._hitLimit=!1,n)));return this._params=o,this._data="",this._hitLimit=!1,l}}},2015:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.EscapeSequenceParser=p.VT500_TRANSITION_TABLE=p.TransitionTable=void 0;const h=c(844),a=c(8742),i=c(6242),r=c(6351);class o{constructor(d){this.table=new Uint8Array(d)}setDefault(d,f){this.table.fill(d<<4|f)}add(d,f,y,_){this.table[f<<8|d]=y<<4|_}addMany(d,f,y,_){for(let v=0;v<d.length;v++)this.table[f<<8|d[v]]=y<<4|_}}p.TransitionTable=o;const s=160;p.VT500_TRANSITION_TABLE=(function(){const n=new o(4095),d=Array.apply(null,Array(256)).map(((w,b)=>b)),f=(w,b)=>d.slice(w,b),y=f(32,127),_=f(0,24);_.push(25),_.push.apply(_,f(28,32));const v=f(0,14);let g;for(g in n.setDefault(1,0),n.addMany(y,0,2,0),v)n.addMany([24,26,153,154],g,3,0),n.addMany(f(128,144),g,3,0),n.addMany(f(144,152),g,3,0),n.add(156,g,0,0),n.add(27,g,11,1),n.add(157,g,4,8),n.addMany([152,158,159],g,0,7),n.add(155,g,11,3),n.add(144,g,11,9);return n.addMany(_,0,3,0),n.addMany(_,1,3,1),n.add(127,1,0,1),n.addMany(_,8,0,8),n.addMany(_,3,3,3),n.add(127,3,0,3),n.addMany(_,4,3,4),n.add(127,4,0,4),n.addMany(_,6,3,6),n.addMany(_,5,3,5),n.add(127,5,0,5),n.addMany(_,2,3,2),n.add(127,2,0,2),n.add(93,1,4,8),n.addMany(y,8,5,8),n.add(127,8,5,8),n.addMany([156,27,24,26,7],8,6,0),n.addMany(f(28,32),8,0,8),n.addMany([88,94,95],1,0,7),n.addMany(y,7,0,7),n.addMany(_,7,0,7),n.add(156,7,0,0),n.add(127,7,0,7),n.add(91,1,11,3),n.addMany(f(64,127),3,7,0),n.addMany(f(48,60),3,8,4),n.addMany([60,61,62,63],3,9,4),n.addMany(f(48,60),4,8,4),n.addMany(f(64,127),4,7,0),n.addMany([60,61,62,63],4,0,6),n.addMany(f(32,64),6,0,6),n.add(127,6,0,6),n.addMany(f(64,127),6,0,0),n.addMany(f(32,48),3,9,5),n.addMany(f(32,48),5,9,5),n.addMany(f(48,64),5,0,6),n.addMany(f(64,127),5,7,0),n.addMany(f(32,48),4,9,5),n.addMany(f(32,48),1,9,2),n.addMany(f(32,48),2,9,2),n.addMany(f(48,127),2,10,0),n.addMany(f(48,80),1,10,0),n.addMany(f(81,88),1,10,0),n.addMany([89,90,92],1,10,0),n.addMany(f(96,127),1,10,0),n.add(80,1,11,9),n.addMany(_,9,0,9),n.add(127,9,0,9),n.addMany(f(28,32),9,0,9),n.addMany(f(32,48),9,9,12),n.addMany(f(48,60),9,8,10),n.addMany([60,61,62,63],9,9,10),n.addMany(_,11,0,11),n.addMany(f(32,128),11,0,11),n.addMany(f(28,32),11,0,11),n.addMany(_,10,0,10),n.add(127,10,0,10),n.addMany(f(28,32),10,0,10),n.addMany(f(48,60),10,8,10),n.addMany([60,61,62,63],10,0,11),n.addMany(f(32,48),10,9,12),n.addMany(_,12,0,12),n.add(127,12,0,12),n.addMany(f(28,32),12,0,12),n.addMany(f(32,48),12,9,12),n.addMany(f(48,64),12,0,11),n.addMany(f(64,127),12,12,13),n.addMany(f(64,127),10,12,13),n.addMany(f(64,127),9,12,13),n.addMany(_,13,13,13),n.addMany(y,13,13,13),n.add(127,13,0,13),n.addMany([27,156,24,26],13,14,0),n.add(s,0,2,0),n.add(s,8,5,8),n.add(s,6,0,6),n.add(s,11,0,11),n.add(s,13,13,13),n})();class l extends h.Disposable{constructor(d=p.VT500_TRANSITION_TABLE){super(),this._transitions=d,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new a.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(f,y,_)=>{},this._executeHandlerFb=f=>{},this._csiHandlerFb=(f,y)=>{},this._escHandlerFb=f=>{},this._errorHandlerFb=f=>f,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new i.OscParser),this._dcsParser=this.register(new r.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(d,f=[64,126]){let y=0;if(d.prefix){if(d.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=d.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(d.intermediates){if(d.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let v=0;v<d.intermediates.length;++v){const g=d.intermediates.charCodeAt(v);if(32>g||g>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=g}}if(d.final.length!==1)throw new Error("final must be a single byte");const _=d.final.charCodeAt(0);if(f[0]>_||_>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return y<<=8,y|=_,y}identToString(d){const f=[];for(;d;)f.push(String.fromCharCode(255&d)),d>>=8;return f.reverse().join("")}setPrintHandler(d){this._printHandler=d}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(d,f){const y=this._identifier(d,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const _=this._escHandlers[y];return _.push(f),{dispose:()=>{const v=_.indexOf(f);v!==-1&&_.splice(v,1)}}}clearEscHandler(d){this._escHandlers[this._identifier(d,[48,126])]&&delete this._escHandlers[this._identifier(d,[48,126])]}setEscHandlerFallback(d){this._escHandlerFb=d}setExecuteHandler(d,f){this._executeHandlers[d.charCodeAt(0)]=f}clearExecuteHandler(d){this._executeHandlers[d.charCodeAt(0)]&&delete this._executeHandlers[d.charCodeAt(0)]}setExecuteHandlerFallback(d){this._executeHandlerFb=d}registerCsiHandler(d,f){const y=this._identifier(d);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const _=this._csiHandlers[y];return _.push(f),{dispose:()=>{const v=_.indexOf(f);v!==-1&&_.splice(v,1)}}}clearCsiHandler(d){this._csiHandlers[this._identifier(d)]&&delete this._csiHandlers[this._identifier(d)]}setCsiHandlerFallback(d){this._csiHandlerFb=d}registerDcsHandler(d,f){return this._dcsParser.registerHandler(this._identifier(d),f)}clearDcsHandler(d){this._dcsParser.clearHandler(this._identifier(d))}setDcsHandlerFallback(d){this._dcsParser.setHandlerFallback(d)}registerOscHandler(d,f){return this._oscParser.registerHandler(d,f)}clearOscHandler(d){this._oscParser.clearHandler(d)}setOscHandlerFallback(d){this._oscParser.setHandlerFallback(d)}setErrorHandler(d){this._errorHandler=d}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(d,f,y,_,v){this._parseStack.state=d,this._parseStack.handlers=f,this._parseStack.handlerPos=y,this._parseStack.transition=_,this._parseStack.chunkPos=v}parse(d,f,y){let _,v=0,g=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const b=this._parseStack.handlers;let S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&S>-1){for(;S>=0&&(_=b[S](this._params),_!==!0);S--)if(_ instanceof Promise)return this._parseStack.handlerPos=S,_}this._parseStack.handlers=[];break;case 4:if(y===!1&&S>-1){for(;S>=0&&(_=b[S](),_!==!0);S--)if(_ instanceof Promise)return this._parseStack.handlerPos=S,_}this._parseStack.handlers=[];break;case 6:if(v=d[this._parseStack.chunkPos],_=this._dcsParser.unhook(v!==24&&v!==26,y),_)return _;v===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(v=d[this._parseStack.chunkPos],_=this._oscParser.end(v!==24&&v!==26,y),_)return _;v===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let b=w;b<f;++b){switch(v=d[b],g=this._transitions.table[this.currentState<<8|(v<160?v:s)],g>>4){case 2:for(let A=b+1;;++A){if(A>=f||(v=d[A])<32||v>126&&v<s){this._printHandler(d,b,A),b=A-1;break}if(++A>=f||(v=d[A])<32||v>126&&v<s){this._printHandler(d,b,A),b=A-1;break}if(++A>=f||(v=d[A])<32||v>126&&v<s){this._printHandler(d,b,A),b=A-1;break}if(++A>=f||(v=d[A])<32||v>126&&v<s){this._printHandler(d,b,A),b=A-1;break}}break;case 3:this._executeHandlers[v]?this._executeHandlers[v]():this._executeHandlerFb(v),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:b,code:v,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const S=this._csiHandlers[this._collect<<8|v];let T=S?S.length-1:-1;for(;T>=0&&(_=S[T](this._params),_!==!0);T--)if(_ instanceof Promise)return this._preserveStack(3,S,T,g,b),_;T<0&&this._csiHandlerFb(this._collect<<8|v,this._params),this.precedingCodepoint=0;break;case 8:do switch(v){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(v-48)}while(++b<f&&(v=d[b])>47&&v<60);b--;break;case 9:this._collect<<=8,this._collect|=v;break;case 10:const j=this._escHandlers[this._collect<<8|v];let E=j?j.length-1:-1;for(;E>=0&&(_=j[E](),_!==!0);E--)if(_ instanceof Promise)return this._preserveStack(4,j,E,g,b),_;E<0&&this._escHandlerFb(this._collect<<8|v),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|v,this._params);break;case 13:for(let A=b+1;;++A)if(A>=f||(v=d[A])===24||v===26||v===27||v>127&&v<s){this._dcsParser.put(d,b,A),b=A-1;break}break;case 14:if(_=this._dcsParser.unhook(v!==24&&v!==26),_)return this._preserveStack(6,[],0,g,b),_;v===27&&(g|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let A=b+1;;A++)if(A>=f||(v=d[A])<32||v>127&&v<s){this._oscParser.put(d,b,A),b=A-1;break}break;case 6:if(_=this._oscParser.end(v!==24&&v!==26),_)return this._preserveStack(5,[],0,g,b),_;v===27&&(g|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&g}}}p.EscapeSequenceParser=l},6242:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.OscHandler=p.OscParser=void 0;const h=c(5770),a=c(482),i=[];p.OscParser=class{constructor(){this._state=0,this._active=i,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(r,o){this._handlers[r]===void 0&&(this._handlers[r]=[]);const s=this._handlers[r];return s.push(o),{dispose:()=>{const l=s.indexOf(o);l!==-1&&s.splice(l,1)}}}clearHandler(r){this._handlers[r]&&delete this._handlers[r]}setHandlerFallback(r){this._handlerFb=r}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=i}reset(){if(this._state===2)for(let r=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;r>=0;--r)this._active[r].end(!1);this._stack.paused=!1,this._active=i,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||i,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].start();else this._handlerFb(this._id,"START")}_put(r,o,s){if(this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].put(r,o,s);else this._handlerFb(this._id,"PUT",(0,a.utf32ToString)(r,o,s))}start(){this.reset(),this._state=1}put(r,o,s){if(this._state!==3){if(this._state===1)for(;o<s;){const l=r[o++];if(l===59){this._state=2,this._start();break}if(l<48||57<l)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+l-48}this._state===2&&s-o>0&&this._put(r,o,s)}}end(r,o=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let s=!1,l=this._active.length-1,n=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,s=o,n=this._stack.fallThrough,this._stack.paused=!1),!n&&s===!1){for(;l>=0&&(s=this._active[l].end(r),s!==!0);l--)if(s instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,s;l--}for(;l>=0;l--)if(s=this._active[l].end(!1),s instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,s}else this._handlerFb(this._id,"END",r);this._active=i,this._id=-1,this._state=0}}},p.OscHandler=class{constructor(r){this._handler=r,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(r,o,s){this._hitLimit||(this._data+=(0,a.utf32ToString)(r,o,s),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(r){let o=!1;if(this._hitLimit)o=!1;else if(r&&(o=this._handler(this._data),o instanceof Promise))return o.then((s=>(this._data="",this._hitLimit=!1,s)));return this._data="",this._hitLimit=!1,o}}},8742:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.Params=void 0;const c=2147483647;class h{static fromArray(i){const r=new h;if(!i.length)return r;for(let o=Array.isArray(i[0])?1:0;o<i.length;++o){const s=i[o];if(Array.isArray(s))for(let l=0;l<s.length;++l)r.addSubParam(s[l]);else r.addParam(s)}return r}constructor(i=32,r=32){if(this.maxLength=i,this.maxSubParamsLength=r,r>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(i),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(i),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const i=new h(this.maxLength,this.maxSubParamsLength);return i.params.set(this.params),i.length=this.length,i._subParams.set(this._subParams),i._subParamsLength=this._subParamsLength,i._subParamsIdx.set(this._subParamsIdx),i._rejectDigits=this._rejectDigits,i._rejectSubDigits=this._rejectSubDigits,i._digitIsSub=this._digitIsSub,i}toArray(){const i=[];for(let r=0;r<this.length;++r){i.push(this.params[r]);const o=this._subParamsIdx[r]>>8,s=255&this._subParamsIdx[r];s-o>0&&i.push(Array.prototype.slice.call(this._subParams,o,s))}return i}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(i){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(i<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=i>c?c:i}}addSubParam(i){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(i<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=i>c?c:i,this._subParamsIdx[this.length-1]++}}hasSubParams(i){return(255&this._subParamsIdx[i])-(this._subParamsIdx[i]>>8)>0}getSubParams(i){const r=this._subParamsIdx[i]>>8,o=255&this._subParamsIdx[i];return o-r>0?this._subParams.subarray(r,o):null}getSubParamsAll(){const i={};for(let r=0;r<this.length;++r){const o=this._subParamsIdx[r]>>8,s=255&this._subParamsIdx[r];s-o>0&&(i[r]=this._subParams.slice(o,s))}return i}addDigit(i){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const o=this._digitIsSub?this._subParams:this.params,s=o[r-1];o[r-1]=~s?Math.min(10*s+i,c):i}}p.Params=h},5741:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.AddonManager=void 0,p.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,h){const a={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(a),h.dispose=()=>this._wrappedAddonDispose(a),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let a=0;a<this._addons.length;a++)if(this._addons[a]===c){h=a;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(h,1)}}},8771:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.BufferApiView=void 0;const h=c(3785),a=c(511);p.BufferApiView=class{constructor(i,r){this._buffer=i,this.type=r}init(i){return this._buffer=i,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(i){const r=this._buffer.lines.get(i);if(r)return new h.BufferLineApiView(r)}getNullCell(){return new a.CellData}}},3785:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.BufferLineApiView=void 0;const h=c(511);p.BufferLineApiView=class{constructor(a){this._line=a}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(a,i){if(!(a<0||a>=this._line.length))return i?(this._line.loadCell(a,i),i):this._line.loadCell(a,new h.CellData)}translateToString(a,i,r){return this._line.translateToString(a,i,r)}}},8285:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.BufferNamespaceApi=void 0;const h=c(8771),a=c(8460),i=c(844);class r extends i.Disposable{constructor(s){super(),this._core=s,this._onBufferChange=this.register(new a.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}p.BufferNamespaceApi=r},7975:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ParserApi=void 0,p.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,h){return this._core.registerCsiHandler(c,(a=>h(a.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((a,i)=>h(a,i.toArray())))}addDcsHandler(c,h){return this.registerDcsHandler(c,h)}registerEscHandler(c,h){return this._core.registerEscHandler(c,h)}addEscHandler(c,h){return this.registerEscHandler(c,h)}registerOscHandler(c,h){return this._core.registerOscHandler(c,h)}addOscHandler(c,h){return this.registerOscHandler(c,h)}}},7090:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.UnicodeApi=void 0,p.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(x,p,c){var h=this&&this.__decorate||function(n,d,f,y){var _,v=arguments.length,g=v<3?d:y===null?y=Object.getOwnPropertyDescriptor(d,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,d,f,y);else for(var w=n.length-1;w>=0;w--)(_=n[w])&&(g=(v<3?_(g):v>3?_(d,f,g):_(d,f))||g);return v>3&&g&&Object.defineProperty(d,f,g),g},a=this&&this.__param||function(n,d){return function(f,y){d(f,y,n)}};Object.defineProperty(p,"__esModule",{value:!0}),p.BufferService=p.MINIMUM_ROWS=p.MINIMUM_COLS=void 0;const i=c(8460),r=c(844),o=c(5295),s=c(2585);p.MINIMUM_COLS=2,p.MINIMUM_ROWS=1;let l=p.BufferService=class extends r.Disposable{get buffer(){return this.buffers.active}constructor(n){super(),this.isUserScrolling=!1,this._onResize=this.register(new i.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new i.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(n.rawOptions.cols||0,p.MINIMUM_COLS),this.rows=Math.max(n.rawOptions.rows||0,p.MINIMUM_ROWS),this.buffers=this.register(new o.BufferSet(n,this))}resize(n,d){this.cols=n,this.rows=d,this.buffers.resize(n,d),this._onResize.fire({cols:n,rows:d})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(n,d=!1){const f=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===n.fg&&y.getBg(0)===n.bg||(y=f.getBlankLine(n,d),this._cachedBlankLine=y),y.isWrapped=d;const _=f.ybase+f.scrollTop,v=f.ybase+f.scrollBottom;if(f.scrollTop===0){const g=f.lines.isFull;v===f.lines.length-1?g?f.lines.recycle().copyFrom(y):f.lines.push(y.clone()):f.lines.splice(v+1,0,y.clone()),g?this.isUserScrolling&&(f.ydisp=Math.max(f.ydisp-1,0)):(f.ybase++,this.isUserScrolling||f.ydisp++)}else{const g=v-_+1;f.lines.shiftElements(_+1,g-1,-1),f.lines.set(v,y.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(n,d,f){const y=this.buffer;if(n<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else n+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const _=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+n,y.ybase),0),_!==y.ydisp&&(d||this._onScroll.fire(y.ydisp))}};p.BufferService=l=h([a(0,s.IOptionsService)],l)},7994:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CharsetService=void 0,p.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,h){this._charsets[c]=h,this.glevel===c&&(this.charset=h)}}},1753:function(x,p,c){var h=this&&this.__decorate||function(y,_,v,g){var w,b=arguments.length,S=b<3?_:g===null?g=Object.getOwnPropertyDescriptor(_,v):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,_,v,g);else for(var T=y.length-1;T>=0;T--)(w=y[T])&&(S=(b<3?w(S):b>3?w(_,v,S):w(_,v))||S);return b>3&&S&&Object.defineProperty(_,v,S),S},a=this&&this.__param||function(y,_){return function(v,g){_(v,g,y)}};Object.defineProperty(p,"__esModule",{value:!0}),p.CoreMouseService=void 0;const i=c(2585),r=c(8460),o=c(844),s={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function l(y,_){let v=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(v|=64,v|=y.action):(v|=3&y.button,4&y.button&&(v|=64),8&y.button&&(v|=128),y.action===32?v|=32:y.action!==0||_||(v|=3)),v}const n=String.fromCharCode,d={DEFAULT:y=>{const _=[l(y,!1)+32,y.col+32,y.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${n(_[0])}${n(_[1])}${n(_[2])}`},SGR:y=>{const _=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${l(y,!0)};${y.col};${y.row}${_}`},SGR_PIXELS:y=>{const _=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${l(y,!0)};${y.x};${y.y}${_}`}};let f=p.CoreMouseService=class extends o.Disposable{constructor(y,_){super(),this._bufferService=y,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new r.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const v of Object.keys(s))this.addProtocol(v,s[v]);for(const v of Object.keys(d))this.addEncoding(v,d[v]);this.reset()}addProtocol(y,_){this._protocols[y]=_}addEncoding(y,_){this._encodings[y]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const _=this._encodings[this._activeEncoding](y);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,_,v){if(v){if(y.x!==_.x||y.y!==_.y)return!1}else if(y.col!==_.col||y.row!==_.row)return!1;return y.button===_.button&&y.action===_.action&&y.ctrl===_.ctrl&&y.alt===_.alt&&y.shift===_.shift}};p.CoreMouseService=f=h([a(0,i.IBufferService),a(1,i.ICoreService)],f)},6975:function(x,p,c){var h=this&&this.__decorate||function(f,y,_,v){var g,w=arguments.length,b=w<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(f,y,_,v);else for(var S=f.length-1;S>=0;S--)(g=f[S])&&(b=(w<3?g(b):w>3?g(y,_,b):g(y,_))||b);return w>3&&b&&Object.defineProperty(y,_,b),b},a=this&&this.__param||function(f,y){return function(_,v){y(_,v,f)}};Object.defineProperty(p,"__esModule",{value:!0}),p.CoreService=void 0;const i=c(1439),r=c(8460),o=c(844),s=c(2585),l=Object.freeze({insertMode:!1}),n=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=p.CoreService=class extends o.Disposable{constructor(f,y,_){super(),this._bufferService=f,this._logService=y,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new r.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new r.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,i.clone)(l),this.decPrivateModes=(0,i.clone)(n)}reset(){this.modes=(0,i.clone)(l),this.decPrivateModes=(0,i.clone)(n)}triggerDataEvent(f,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${f}"`,(()=>f.split("").map((v=>v.charCodeAt(0))))),this._onData.fire(f)}triggerBinaryEvent(f){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${f}"`,(()=>f.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(f))}};p.CoreService=d=h([a(0,s.IBufferService),a(1,s.ILogService),a(2,s.IOptionsService)],d)},9074:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.DecorationService=void 0;const h=c(8055),a=c(8460),i=c(844),r=c(6106);let o=0,s=0;class l extends i.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new r.SortedList((f=>f?.marker.line)),this._onDecorationRegistered=this.register(new a.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new a.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,i.toDisposable)((()=>this.reset())))}registerDecoration(f){if(f.marker.isDisposed)return;const y=new n(f);if(y){const _=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),_.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const f of this._decorations.values())f.dispose();this._decorations.clear()}*getDecorationsAtCell(f,y,_){var v,g,w;let b=0,S=0;for(const T of this._decorations.getKeyIterator(y))b=(v=T.options.x)!==null&&v!==void 0?v:0,S=b+((g=T.options.width)!==null&&g!==void 0?g:1),f>=b&&f<S&&(!_||((w=T.options.layer)!==null&&w!==void 0?w:"bottom")===_)&&(yield T)}forEachDecorationAtCell(f,y,_,v){this._decorations.forEachByKey(y,(g=>{var w,b,S;o=(w=g.options.x)!==null&&w!==void 0?w:0,s=o+((b=g.options.width)!==null&&b!==void 0?b:1),f>=o&&f<s&&(!_||((S=g.options.layer)!==null&&S!==void 0?S:"bottom")===_)&&v(g)}))}}p.DecorationService=l;class n extends i.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(f){super(),this.options=f,this.onRenderEmitter=this.register(new a.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new a.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=f.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.InstantiationService=p.ServiceCollection=void 0;const h=c(2585),a=c(8343);class i{constructor(...o){this._entries=new Map;for(const[s,l]of o)this.set(s,l)}set(o,s){const l=this._entries.get(o);return this._entries.set(o,s),l}forEach(o){for(const[s,l]of this._entries.entries())o(s,l)}has(o){return this._entries.has(o)}get(o){return this._entries.get(o)}}p.ServiceCollection=i,p.InstantiationService=class{constructor(){this._services=new i,this._services.set(h.IInstantiationService,this)}setService(r,o){this._services.set(r,o)}getService(r){return this._services.get(r)}createInstance(r,...o){const s=(0,a.getServiceDependencies)(r).sort(((d,f)=>d.index-f.index)),l=[];for(const d of s){const f=this._services.get(d.id);if(!f)throw new Error(`[createInstance] ${r.name} depends on UNKNOWN service ${d.id}.`);l.push(f)}const n=s.length>0?s[0].index:o.length;if(o.length!==n)throw new Error(`[createInstance] First service dependency of ${r.name} at position ${n+1} conflicts with ${o.length} static arguments`);return new r(...o,...l)}}},7866:function(x,p,c){var h=this&&this.__decorate||function(n,d,f,y){var _,v=arguments.length,g=v<3?d:y===null?y=Object.getOwnPropertyDescriptor(d,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,d,f,y);else for(var w=n.length-1;w>=0;w--)(_=n[w])&&(g=(v<3?_(g):v>3?_(d,f,g):_(d,f))||g);return v>3&&g&&Object.defineProperty(d,f,g),g},a=this&&this.__param||function(n,d){return function(f,y){d(f,y,n)}};Object.defineProperty(p,"__esModule",{value:!0}),p.traceCall=p.setTraceLogger=p.LogService=void 0;const i=c(844),r=c(2585),o={trace:r.LogLevelEnum.TRACE,debug:r.LogLevelEnum.DEBUG,info:r.LogLevelEnum.INFO,warn:r.LogLevelEnum.WARN,error:r.LogLevelEnum.ERROR,off:r.LogLevelEnum.OFF};let s,l=p.LogService=class extends i.Disposable{get logLevel(){return this._logLevel}constructor(n){super(),this._optionsService=n,this._logLevel=r.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),s=this}_updateLogLevel(){this._logLevel=o[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(n){for(let d=0;d<n.length;d++)typeof n[d]=="function"&&(n[d]=n[d]())}_log(n,d,f){this._evalLazyOptionalParams(f),n.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+d,...f)}trace(n,...d){var f,y;this._logLevel<=r.LogLevelEnum.TRACE&&this._log((y=(f=this._optionsService.options.logger)===null||f===void 0?void 0:f.trace.bind(this._optionsService.options.logger))!==null&&y!==void 0?y:console.log,n,d)}debug(n,...d){var f,y;this._logLevel<=r.LogLevelEnum.DEBUG&&this._log((y=(f=this._optionsService.options.logger)===null||f===void 0?void 0:f.debug.bind(this._optionsService.options.logger))!==null&&y!==void 0?y:console.log,n,d)}info(n,...d){var f,y;this._logLevel<=r.LogLevelEnum.INFO&&this._log((y=(f=this._optionsService.options.logger)===null||f===void 0?void 0:f.info.bind(this._optionsService.options.logger))!==null&&y!==void 0?y:console.info,n,d)}warn(n,...d){var f,y;this._logLevel<=r.LogLevelEnum.WARN&&this._log((y=(f=this._optionsService.options.logger)===null||f===void 0?void 0:f.warn.bind(this._optionsService.options.logger))!==null&&y!==void 0?y:console.warn,n,d)}error(n,...d){var f,y;this._logLevel<=r.LogLevelEnum.ERROR&&this._log((y=(f=this._optionsService.options.logger)===null||f===void 0?void 0:f.error.bind(this._optionsService.options.logger))!==null&&y!==void 0?y:console.error,n,d)}};p.LogService=l=h([a(0,r.IOptionsService)],l),p.setTraceLogger=function(n){s=n},p.traceCall=function(n,d,f){if(typeof f.value!="function")throw new Error("not supported");const y=f.value;f.value=function(..._){if(s.logLevel!==r.LogLevelEnum.TRACE)return y.apply(this,_);s.trace(`GlyphRenderer#${y.name}(${_.map((g=>JSON.stringify(g))).join(", ")})`);const v=y.apply(this,_);return s.trace(`GlyphRenderer#${y.name} return`,v),v}}},7302:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.OptionsService=p.DEFAULT_OPTIONS=void 0;const h=c(8460),a=c(844),i=c(6114);p.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:i.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const r=["normal","bold","100","200","300","400","500","600","700","800","900"];class o extends a.Disposable{constructor(l){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const n=Object.assign({},p.DEFAULT_OPTIONS);for(const d in l)if(d in n)try{const f=l[d];n[d]=this._sanitizeAndValidateOption(d,f)}catch(f){console.error(f)}this.rawOptions=n,this.options=Object.assign({},n),this._setupOptions()}onSpecificOptionChange(l,n){return this.onOptionChange((d=>{d===l&&n(this.rawOptions[l])}))}onMultipleOptionChange(l,n){return this.onOptionChange((d=>{l.indexOf(d)!==-1&&n()}))}_setupOptions(){const l=d=>{if(!(d in p.DEFAULT_OPTIONS))throw new Error(`No option with key "${d}"`);return this.rawOptions[d]},n=(d,f)=>{if(!(d in p.DEFAULT_OPTIONS))throw new Error(`No option with key "${d}"`);f=this._sanitizeAndValidateOption(d,f),this.rawOptions[d]!==f&&(this.rawOptions[d]=f,this._onOptionChange.fire(d))};for(const d in this.rawOptions){const f={get:l.bind(this,d),set:n.bind(this,d)};Object.defineProperty(this.options,d,f)}}_sanitizeAndValidateOption(l,n){switch(l){case"cursorStyle":if(n||(n=p.DEFAULT_OPTIONS[l]),!(function(d){return d==="block"||d==="underline"||d==="bar"})(n))throw new Error(`"${n}" is not a valid value for ${l}`);break;case"wordSeparator":n||(n=p.DEFAULT_OPTIONS[l]);break;case"fontWeight":case"fontWeightBold":if(typeof n=="number"&&1<=n&&n<=1e3)break;n=r.includes(n)?n:p.DEFAULT_OPTIONS[l];break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(`${l} cannot be less than 1, value: ${n}`);break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error(`${l} cannot be less than 0, value: ${n}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(`${l} cannot be less than or equal to 0, value: ${n}`);break;case"rows":case"cols":if(!n&&n!==0)throw new Error(`${l} must be numeric, value: ${n}`);break;case"windowsPty":n=n??{}}return n}}p.OptionsService=o},2660:function(x,p,c){var h=this&&this.__decorate||function(o,s,l,n){var d,f=arguments.length,y=f<3?s:n===null?n=Object.getOwnPropertyDescriptor(s,l):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,s,l,n);else for(var _=o.length-1;_>=0;_--)(d=o[_])&&(y=(f<3?d(y):f>3?d(s,l,y):d(s,l))||y);return f>3&&y&&Object.defineProperty(s,l,y),y},a=this&&this.__param||function(o,s){return function(l,n){s(l,n,o)}};Object.defineProperty(p,"__esModule",{value:!0}),p.OscLinkService=void 0;const i=c(2585);let r=p.OscLinkService=class{constructor(o){this._bufferService=o,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(o){const s=this._bufferService.buffer;if(o.id===void 0){const _=s.addMarker(s.ybase+s.y),v={data:o,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(v,_))),this._dataByLinkId.set(v.id,v),v.id}const l=o,n=this._getEntryIdKey(l),d=this._entriesWithId.get(n);if(d)return this.addLineToLink(d.id,s.ybase+s.y),d.id;const f=s.addMarker(s.ybase+s.y),y={id:this._nextId++,key:this._getEntryIdKey(l),data:l,lines:[f]};return f.onDispose((()=>this._removeMarkerFromLink(y,f))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(o,s){const l=this._dataByLinkId.get(o);if(l&&l.lines.every((n=>n.line!==s))){const n=this._bufferService.buffer.addMarker(s);l.lines.push(n),n.onDispose((()=>this._removeMarkerFromLink(l,n)))}}getLinkData(o){var s;return(s=this._dataByLinkId.get(o))===null||s===void 0?void 0:s.data}_getEntryIdKey(o){return`${o.id};;${o.uri}`}_removeMarkerFromLink(o,s){const l=o.lines.indexOf(s);l!==-1&&(o.lines.splice(l,1),o.lines.length===0&&(o.data.id!==void 0&&this._entriesWithId.delete(o.key),this._dataByLinkId.delete(o.id)))}};p.OscLinkService=r=h([a(0,i.IBufferService)],r)},8343:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.createDecorator=p.getServiceDependencies=p.serviceRegistry=void 0;const c="di$target",h="di$dependencies";p.serviceRegistry=new Map,p.getServiceDependencies=function(a){return a[h]||[]},p.createDecorator=function(a){if(p.serviceRegistry.has(a))return p.serviceRegistry.get(a);const i=function(r,o,s){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(l,n,d){n[c]===n?n[h].push({id:l,index:d}):(n[h]=[{id:l,index:d}],n[c]=n)})(i,r,s)};return i.toString=()=>a,p.serviceRegistry.set(a,i),i}},2585:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.IDecorationService=p.IUnicodeService=p.IOscLinkService=p.IOptionsService=p.ILogService=p.LogLevelEnum=p.IInstantiationService=p.ICharsetService=p.ICoreService=p.ICoreMouseService=p.IBufferService=void 0;const h=c(8343);var a;p.IBufferService=(0,h.createDecorator)("BufferService"),p.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),p.ICoreService=(0,h.createDecorator)("CoreService"),p.ICharsetService=(0,h.createDecorator)("CharsetService"),p.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(i){i[i.TRACE=0]="TRACE",i[i.DEBUG=1]="DEBUG",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.OFF=5]="OFF"})(a||(p.LogLevelEnum=a={})),p.ILogService=(0,h.createDecorator)("LogService"),p.IOptionsService=(0,h.createDecorator)("OptionsService"),p.IOscLinkService=(0,h.createDecorator)("OscLinkService"),p.IUnicodeService=(0,h.createDecorator)("UnicodeService"),p.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(x,p,c)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.UnicodeService=void 0;const h=c(8460),a=c(225);p.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const i=new a.UnicodeV6;this.register(i),this._active=i.version,this._activeProvider=i}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(i){if(!this._providers[i])throw new Error(`unknown Unicode version "${i}"`);this._active=i,this._activeProvider=this._providers[i],this._onChange.fire(i)}register(i){this._providers[i.version]=i}wcwidth(i){return this._activeProvider.wcwidth(i)}getStringCellWidth(i){let r=0;const o=i.length;for(let s=0;s<o;++s){let l=i.charCodeAt(s);if(55296<=l&&l<=56319){if(++s>=o)return r+this.wcwidth(l);const n=i.charCodeAt(s);56320<=n&&n<=57343?l=1024*(l-55296)+n-56320+65536:r+=this.wcwidth(n)}r+=this.wcwidth(l)}return r}}}},D={};function V(x){var p=D[x];if(p!==void 0)return p.exports;var c=D[x]={exports:{}};return $[x].call(c.exports,c,c.exports,V),c.exports}var R={};return(()=>{var x=R;Object.defineProperty(x,"__esModule",{value:!0}),x.Terminal=void 0;const p=V(9042),c=V(3236),h=V(844),a=V(5741),i=V(8285),r=V(7975),o=V(7090),s=["cols","rows"];class l extends h.Disposable{constructor(d){super(),this._core=this.register(new c.Terminal(d)),this._addonManager=this.register(new a.AddonManager),this._publicOptions=Object.assign({},this._core.options);const f=_=>this._core.options[_],y=(_,v)=>{this._checkReadonlyOptions(_),this._core.options[_]=v};for(const _ in this._core.options){const v={get:f.bind(this,_),set:y.bind(this,_)};Object.defineProperty(this._publicOptions,_,v)}}_checkReadonlyOptions(d){if(s.includes(d))throw new Error(`Option "${d}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new r.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new o.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new i.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const d=this._core.coreService.decPrivateModes;let f="none";switch(this._core.coreMouseService.activeProtocol){case"X10":f="x10";break;case"VT200":f="vt200";break;case"DRAG":f="drag";break;case"ANY":f="any"}return{applicationCursorKeysMode:d.applicationCursorKeys,applicationKeypadMode:d.applicationKeypad,bracketedPasteMode:d.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:f,originMode:d.origin,reverseWraparoundMode:d.reverseWraparound,sendFocusMode:d.sendFocus,wraparoundMode:d.wraparound}}get options(){return this._publicOptions}set options(d){for(const f in d)this._publicOptions[f]=d[f]}blur(){this._core.blur()}focus(){this._core.focus()}resize(d,f){this._verifyIntegers(d,f),this._core.resize(d,f)}open(d){this._core.open(d)}attachCustomKeyEventHandler(d){this._core.attachCustomKeyEventHandler(d)}registerLinkProvider(d){return this._core.registerLinkProvider(d)}registerCharacterJoiner(d){return this._checkProposedApi(),this._core.registerCharacterJoiner(d)}deregisterCharacterJoiner(d){this._checkProposedApi(),this._core.deregisterCharacterJoiner(d)}registerMarker(d=0){return this._verifyIntegers(d),this._core.registerMarker(d)}registerDecoration(d){var f,y,_;return this._checkProposedApi(),this._verifyPositiveIntegers((f=d.x)!==null&&f!==void 0?f:0,(y=d.width)!==null&&y!==void 0?y:0,(_=d.height)!==null&&_!==void 0?_:0),this._core.registerDecoration(d)}hasSelection(){return this._core.hasSelection()}select(d,f,y){this._verifyIntegers(d,f,y),this._core.select(d,f,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(d,f){this._verifyIntegers(d,f),this._core.selectLines(d,f)}dispose(){super.dispose()}scrollLines(d){this._verifyIntegers(d),this._core.scrollLines(d)}scrollPages(d){this._verifyIntegers(d),this._core.scrollPages(d)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(d){this._verifyIntegers(d),this._core.scrollToLine(d)}clear(){this._core.clear()}write(d,f){this._core.write(d,f)}writeln(d,f){this._core.write(d),this._core.write(`\r
17
- `,f)}paste(d){this._core.paste(d)}refresh(d,f){this._verifyIntegers(d,f),this._core.refresh(d,f)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(d){this._addonManager.loadAddon(this,d)}static get strings(){return p}_verifyIntegers(...d){for(const f of d)if(f===1/0||isNaN(f)||f%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...d){for(const f of d)if(f&&(f===1/0||isNaN(f)||f%1!=0||f<0))throw new Error("This API only accepts positive integers")}}x.Terminal=l})(),R})()))})(Kc)),Kc.exports}var bv=_v(),Yc={exports:{}},lp;function wv(){return lp||(lp=1,(function(W,G){(function($,D){W.exports=D()})(self,(()=>(()=>{var $={};return(()=>{var D=$;Object.defineProperty(D,"__esModule",{value:!0}),D.FitAddon=void 0,D.FitAddon=class{activate(V){this._terminal=V}dispose(){}fit(){const V=this.proposeDimensions();if(!V||!this._terminal||isNaN(V.cols)||isNaN(V.rows))return;const R=this._terminal._core;this._terminal.rows===V.rows&&this._terminal.cols===V.cols||(R._renderService.clear(),this._terminal.resize(V.cols,V.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const V=this._terminal._core,R=V._renderService.dimensions;if(R.css.cell.width===0||R.css.cell.height===0)return;const x=this._terminal.options.scrollback===0?0:V.viewport.scrollBarWidth,p=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(p.getPropertyValue("height")),h=Math.max(0,parseInt(p.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),i=c-(parseInt(a.getPropertyValue("padding-top"))+parseInt(a.getPropertyValue("padding-bottom"))),r=h-(parseInt(a.getPropertyValue("padding-right"))+parseInt(a.getPropertyValue("padding-left")))-x;return{cols:Math.max(2,Math.floor(r/R.css.cell.width)),rows:Math.max(1,Math.floor(i/R.css.cell.height))}}}})(),$})()))})(Yc)),Yc.exports}var Sv=wv(),Xc={exports:{}},cp;function xv(){return cp||(cp=1,(function(W,G){(function($,D){W.exports=D()})(self,(()=>(()=>{var $={6:(x,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.LinkComputer=p.WebLinkProvider=void 0,p.WebLinkProvider=class{constructor(h,a,i,r={}){this._terminal=h,this._regex=a,this._handler=i,this._options=r}provideLinks(h,a){const i=c.computeLink(h,this._regex,this._terminal,this._handler);a(this._addCallbacks(i))}_addCallbacks(h){return h.map((a=>(a.leave=this._options.leave,a.hover=(i,r)=>{if(this._options.hover){const{range:o}=a;this._options.hover(i,r,o)}},a)))}};class c{static computeLink(a,i,r,o){const s=new RegExp(i.source,(i.flags||"")+"g"),[l,n]=c._getWindowedLineStrings(a-1,r),d=l.join("");let f;const y=[];for(;f=s.exec(d);){const _=f[0];try{const T=new URL(_),j=decodeURI(T.toString());if(_!==j&&_+"/"!==j)continue}catch{continue}const[v,g]=c._mapStrIdx(r,n,0,f.index),[w,b]=c._mapStrIdx(r,v,g,_.length);if(v===-1||g===-1||w===-1||b===-1)continue;const S={start:{x:g+1,y:v+1},end:{x:b,y:w+1}};y.push({range:S,text:_,activate:o})}return y}static _getWindowedLineStrings(a,i){let r,o=a,s=a,l=0,n="";const d=[];if(r=i.buffer.active.getLine(a)){const f=r.translateToString(!0);if(r.isWrapped&&f[0]!==" "){for(l=0;(r=i.buffer.active.getLine(--o))&&l<2048&&(n=r.translateToString(!0),l+=n.length,d.push(n),r.isWrapped&&n.indexOf(" ")===-1););d.reverse()}for(d.push(f),l=0;(r=i.buffer.active.getLine(++s))&&r.isWrapped&&l<2048&&(n=r.translateToString(!0),l+=n.length,d.push(n),n.indexOf(" ")===-1););}return[d,o]}static _mapStrIdx(a,i,r,o){const s=a.buffer.active,l=s.getNullCell();let n=r;for(;o;){const d=s.getLine(i);if(!d)return[-1,-1];for(let f=n;f<d.length;++f){d.getCell(f,l);const y=l.getChars();if(l.getWidth()&&(o-=y.length||1,f===d.length-1&&y==="")){const _=s.getLine(i+1);_&&_.isWrapped&&(_.getCell(0,l),l.getWidth()===2&&(o+=1))}if(o<0)return[i,f]}i++,n=0}return[i,n]}}p.LinkComputer=c}},D={};function V(x){var p=D[x];if(p!==void 0)return p.exports;var c=D[x]={exports:{}};return $[x](c,c.exports,V),c.exports}var R={};return(()=>{var x=R;Object.defineProperty(x,"__esModule",{value:!0}),x.WebLinksAddon=void 0;const p=V(6),c=/https?:[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(a,i){const r=window.open();if(r){try{r.opener=null}catch{}r.location.href=i}else console.warn("Opening link blocked as opener could not be cleared")}x.WebLinksAddon=class{constructor(a=h,i={}){this._handler=a,this._options=i}activate(a){this._terminal=a;const i=this._options,r=i.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new p.WebLinkProvider(this._terminal,r,this._handler,i))}dispose(){var a;(a=this._linkProvider)===null||a===void 0||a.dispose()}}})(),R})()))})(Xc)),Xc.exports}var Cv=xv();const ho=_e.forwardRef((W,G)=>{const $=_e.useRef(null),D=_e.useRef(null),V=_e.useRef(null),R=_e.useRef(null),x=_e.useRef(null),p=_e.useRef(null),c=()=>{V.current&&(V.current.removeAllListeners(),V.current.disconnect(),V.current=null)},h=async(i,r="bash",o)=>{c();const{io:s}=await jp(async()=>{const{io:d}=await import("./index-Crsm9Fe1.js");return{io:d}},[]),l=W.socketUrl,n=s(l,{transports:["websocket"],forceNew:!0,reconnection:!1});V.current=n,n.on("connect",()=>{$.current?.clear(),r!="bash"&&$.current?.write(`\x1B[34m${i}\x1B[0m: ${r}\r
18
- `),n.emit("terminal:start",{path:i,command:r,workspaceName:o}),$.current?.focus(),setTimeout(()=>{D.current?.fit()},100)}),n.on("terminal:log",d=>{$.current?.write(d)}),n.on("terminal:error",d=>{$.current?.write(`\x1B[31m${d}\x1B[0m`)}),n.on("terminal:exit",d=>{$.current?.write(`\r
19
- \x1B[33mProcess exited with code ${d}\x1B[0m\r
20
- `),d!==0&&(p.current&&p.current(d),W.onCrash&&W.onCrash(d)),x.current&&x.current(),W.onExit&&W.onExit()})};_e.useImperativeHandle(G,()=>({write:i=>{$.current?.write(i)},input:i=>{if(V.current&&V.current.connected){const r=i.endsWith("\r")?i:i+"\r";V.current.emit("terminal:input",r)}else R.current&&R.current(i+"\r")},onData:i=>{R.current=i},onClose:i=>{x.current=i},onCrash:i=>{p.current=i},fit:()=>{D.current?.fit()},clear:()=>{$.current?.clear()},focus:()=>{$.current?.focus()},connect:(i,r="bash",o)=>{h(i,r,o)},disconnect:()=>{c()}})),_e.useEffect(()=>{W.startingText&&$.current&&$.current.write(W.startingText)},[W.startingText]),_e.useEffect(()=>()=>{c()},[]),_e.useEffect(()=>{const i=$.current;if(!i)return;const r=W.isInteractive??!0;i.options.disableStdin=!r,i.options.cursorBlink=r,i.options.cursorStyle=r?"block":"underline",r?i.options.theme={...i.options.theme,cursor:"#ffffff"}:i.options.theme={...i.options.theme,cursor:"transparent"}},[W.isInteractive]);const a=i=>{V.current&&V.current.connected&&V.current.emit("terminal:input",i),R.current&&R.current(i)};return B.jsx("div",{className:`h-full w-full ${W.className||""}`,children:B.jsx(Ev,{ref:D,terminalRef:$,onData:a})})});ho.displayName="InteractiveTerminal";const Ev=_e.forwardRef((W,G)=>{const $=_e.useRef(null),D=_e.useRef(null),V=_e.useRef(null),R=_e.useRef(W.onData);return _e.useImperativeHandle(G,()=>({fit:()=>{try{V.current?.fit()}catch{}}})),_e.useEffect(()=>{R.current=W.onData},[W.onData]),_e.useEffect(()=>{if(!$.current)return;const x=new bv.Terminal({cursorBlink:!0,allowTransparency:!0,fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:15,theme:{background:"#00000000",foreground:"#f3f4f6",cursor:"#ffffff",selectionBackground:"#374151"},convertEol:!0}),p=new Sv.FitAddon,c=new Cv.WebLinksAddon;x.loadAddon(p),x.loadAddon(c);const h=setTimeout(()=>{if($.current){x.open($.current);try{p.fit()}catch(i){console.warn("Fit failed on init:",i)}}},0);D.current=x,V.current=p,W.terminalRef&&(W.terminalRef.current=x),x.onData(i=>{R.current&&R.current(i)});const a=new ResizeObserver(()=>{try{p.fit()}catch{}});return a.observe($.current),()=>{clearTimeout(h),a.disconnect(),x.dispose()}},[]),B.jsx("div",{className:"h-full w-full overflow-hidden bg-transparent p-1",ref:$})});function Av(W){const G=Fe.use.setWorkSpaceRunningAs(),$=_e.useRef(null);return _e.useEffect(()=>()=>{$.current&&$.current.disconnect()},[]),_e.useEffect(()=>{const D=W.workspace.isRunningAs;D==="dev"||D==="start"?$.current&&($.current.connect(W.workspace.info.path,`npm run ${D}`,W.workspace.info.name),$.current.onCrash(()=>{G(W.workspace.info.name,"crashed")})):D=="crashed"?$.current&&$.current.disconnect():$.current&&($.current.disconnect(),$.current.clear())},[W.workspace.isRunningAs]),B.jsx("div",{className:`w-full h-full ${W.visible?"block":"hidden"}`,children:B.jsx(ho,{ref:$,isInteractive:!1,socketUrl:Ke.serverPath})})}function Mv(W){const G=Fe.use.setActiveTerminal(),$=Fe.use.stopWorkspaceTerminal(),D=Fe.use.setWorkSpaceRunningAs(),[V,R]=_e.useState(!1),x=Fe.use.activeTerminal(),p=x===W.workspace.info.name;async function c(){if(!(V||!x))try{R(!0),await $(x),D(x,null),R(!1),G("")}catch(h){console.error(h),R(!1)}}return B.jsxs("div",{onClick:()=>G(W.workspace.info.name),className:`
21
- group relative flex items-center justify-between w-48 w-7 px-3
22
- cursor-pointer transition-all duration-300 select-none
23
- rounded-t-md
24
- ${p?"bg-gray-900/80 text-white":"bg-[#0a0a0a]/80 text-gray-500 hover:bg-[#121212] hover:text-gray-300"}
25
- `,children:[B.jsxs("div",{className:"flex items-center gap-3 overflow-hidden min-w-0",children:[B.jsx("div",{className:`
26
- flex-none w-6 h-6 flex items-center justify-center rounded-md
27
- transition-colors duration-300
28
- ${p?"bg-blue-500/10 text-blue-400":"bg-transparent text-gray-600 group-hover:text-gray-400"}
29
- `,children:B.jsx("i",{className:`${W.workspace.info.fontawesomeIcon??"fas fa-terminal"} text-xs`})}),B.jsx("span",{className:"truncate text-xs font-semibold tracking-wide",children:W.workspace.info.name})]}),B.jsx("button",{onClick:h=>{h.stopPropagation(),c()},disabled:V,className:`
30
- w-6 h-6 flex-none flex items-center justify-center rounded-md
31
- transition-all duration-200
32
- ${p?"opacity-0 group-hover:opacity-100":"hidden"}
33
- ${V?"text-blue-400 cursor-wait":"text-gray-500 hover:bg-red-500/20 hover:text-red-400"}
34
- `,title:"Stop Process",children:B.jsx("i",{className:`fas ${V?"fa-circle-notch animate-spin":"fa-times"} text-xs`})})]})}function kv({whichShow:W}){const G=Fe.use.workspace(),$=Fe.use.activeTerminal(),[D,V]=_e.useState("normal"),R=()=>{V(x=>x==="maximized"?"normal":"maximized")};return B.jsxs("div",{className:`
35
- flex flex-col
36
- ${D==="maximized"?"absolute inset-0 z-50 w-full h-full bg-[#0a0a0a]":"w-full h-full relative"}`,children:[B.jsxs("header",{className:"flex-none w-full pt-1 flex h-9 flex-wrap select-none",children:[B.jsx("button",{onClick:R,className:"w-8 px-2 cursor-pointer select-none rounded-t-md bg-[#0a0a0a]/80 text-gray-500 hover:bg-[#121212] hover:text-gray-300 flex items-center justify-center transition-colors",title:D==="maximized"?"Restore":"Maximize",children:B.jsx("i",{className:`fas ${D==="maximized"?"fa-compress":"fa-expand"}`})}),G.map(x=>{if(x.isRunningAs!=null&&(W==="all"||W==="apps"&&x.info.appType===void 0||W==="tools"&&x.info.appType==="tool"))return B.jsx(Mv,{workspace:x},x.info.name)})]}),B.jsxs("div",{className:"flex-1 overflow-hidden px-4 py-1 border-t border-gray-900/80 relative",children:[(!$||!G.some(x=>x.info.name===$&&(x.isRunningAs==="dev"||x.isRunningAs==="start")))&&B.jsxs("div",{className:"absolute inset-0 flex flex-col gap-4 items-center justify-center opacity-40 select-none pointer-events-none",children:[B.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center shadow-inner",children:B.jsx("i",{className:"fas fa-terminal text-2xl text-gray-600"})}),B.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Select a running workspace to view terminal"})]}),G.map(x=>B.jsx(Av,{workspace:x,visible:W==="all"&&$==x.info.name&&x.isRunningAs!=null||W==="apps"&&$==x.info.name&&x.isRunningAs!=null&&x.info.appType===void 0||W==="tools"&&$==x.info.name&&x.isRunningAs!=null&&x.info.appType==="tool"},x.info.name))]})]})}function Tv({children:W}){return B.jsx("div",{className:"bg-gradient-to-b from-[#050505] to-[#191919]",children:W})}const fs={blueIndigo:"from-blue-500 to-indigo-600",emeraldTeal:"from-emerald-500 to-teal-600",yellowOrange:"from-yellow-500 to-orange-600",pinkRose:"from-pink-500 to-rose-600",gray:"from-gray-500 to-gray-600",red:"from-red-500 to-red-600",skyBlue:"from-blue-400 to-blue-500",cyanBlue:"from-cyan-500 to-blue-600",darkRed:"from-red-600 to-red-700",orangePurple:"from-orange-500 to-purple-600",purplePink:"from-purple-500 to-pink-500",indigoFuchsia:"from-indigo-500 to-fuchsia-500",tealLime:"from-teal-500 to-lime-500",bluePurple:"from-blue-500 to-purple-600"};function Cr(W){return W.isNotRendered||W.render!=null&&W.render==!1?null:B.jsx(Lv,{...W})}function Lv(W){const G=fs.blueIndigo,$=W.color&&fs[W.color]?fs[W.color]:W.color||G;let D=W.disabled?"opacity-70 cursor-not-allowed":"cursor-pointer hover:-translate-y-1 hover:shadow-lg";return D=W.bg?"cursor-pointer hover:-translate-y-1 shadow-lg":D,B.jsxs("button",{disabled:W.disabled,onClick:W.disabled?void 0:()=>W.onClick(),className:`
37
- group relative w-full rounded p-[1px] transition-all duration-300
38
- ${D}
39
- ${W.className||""}
40
- `,children:[!W.disabled&&!W.bg&&B.jsxs(B.Fragment,{children:[B.jsx("div",{className:`absolute inset-0 rounded bg-gradient-to-r ${$} opacity-0 group-hover:opacity-50 blur-lg transition-opacity duration-500`}),B.jsx("div",{className:`absolute inset-0 rounded bg-gradient-to-r ${$} opacity-0 group-hover:opacity-100 transition-opacity duration-300`})]}),W.bg&&B.jsxs(B.Fragment,{children:[B.jsx("div",{className:`absolute inset-0 rounded bg-gradient-to-r ${$} opacity-50 blur-lg`}),B.jsx("div",{className:`absolute inset-0 rounded bg-gradient-to-r ${$} opacity-50`})]}),B.jsxs("div",{className:`
41
- relative h-full w-full rounded bg-[#212121] p-2 flex items-center gap-3 overflow-hidden
42
- transition-colors duration-300
43
- ${W.disabled?"":"group-hover:bg-[#212121]/70"}
44
- `,children:[W.bg&&B.jsx("div",{className:`absolute inset-0 bg-gradient-to-r ${$} opacity-20`}),B.jsx("div",{className:`
45
- relative z-10
46
- w-9 h-9 rounded-lg flex items-center justify-center shrink-0
47
- bg-gradient-to-br ${$} text-white shadow-lg
48
- opacity-90 group-hover:opacity-100 group-hover:scale-110 transition-all duration-300
49
- `,children:B.jsx("i",{className:`fas ${W.icon||"fa-circle"} text-sm`})}),B.jsxs("div",{className:"relative z-10 flex flex-col min-w-0 text-left",children:[B.jsx("span",{className:`
50
- font-bold text-md truncate transition-colors duration-300
51
- ${W.disabled?"text-gray-500":W.bg?"text-white":"text-gray-300 group-hover:text-white"}
52
- `,children:W.name}),B.jsx("span",{className:`
53
- text-[12px] font-mono truncate block w-full transition-opacity duration-300
54
- ${W.disabled?"text-gray-600":W.bg?"text-white/70":"text-gray-500 group-hover:text-gray-400"}
55
- `,style:{lineHeight:1},children:W.description})]})]})]},W.name)}function Rv(W){const G=Fe.use.loadingWorkspace(),$=Fe.use.setWorkSpaceRunningAs(),D=Fe.use.setActiveTerminal(),V=Fe.use.stopWorkspaceTerminal(),[R,x]=_e.useState(!1);return _e.useEffect(()=>{G==W.info.name?x(!0):x(!1)},[G]),B.jsxs("div",{className:"flex-1 flex gap-2",children:[B.jsx(Cr,{onClick:()=>{},name:"Loading",description:"...",color:"blueIndigo",icon:"fas fa-spinner animate-spin",disabled:!0,render:R}),B.jsx(Cr,{onClick:async()=>{await V(W.info.name),$(W.info.name,null)},name:"App is Running",description:"Click to stop",color:"yellowOrange",icon:"fas fa-check-circle",disabled:!1,render:!R&&W.isRunningAs=="start",bg:W.isRunningAs=="start"}),B.jsx(Cr,{onClick:async()=>{await V(W.info.name),$(W.info.name,null)},name:"Development Server",description:"Click to stop",color:"red",icon:"fas fa-check-circle",disabled:!1,render:!R&&W.isRunningAs=="dev",bg:W.isRunningAs=="dev"}),B.jsx(Cr,{onClick:()=>{x(!0),$(W.info.name,"start"),D(W.info.name),setTimeout(()=>x(!1),1e3)},name:"Start",description:"npm run start",color:"emeraldTeal",icon:"fas fa-play",disabled:!1,render:!!(!R&&W.isRunningAs!="dev"&&W.isRunningAs!="start"&&W.isRunningAs!="crashed"&&W.info.startCommand)}),B.jsx(Cr,{onClick:()=>{x(!0),$(W.info.name,"dev"),D(W.info.name),setTimeout(()=>x(!1),1e3)},name:"Dev",description:"npm run dev",color:"blueIndigo",icon:"fas fa-code",disabled:!1,render:!!(!R&&W.isRunningAs!="dev"&&W.isRunningAs!="start"&&W.isRunningAs!="crashed"&&W.info.devCommand)}),B.jsx(Cr,{onClick:async()=>{V(W.info.name,!0),$(W.info.name,null)},name:"Crashed",description:"Crashed",color:"red",icon:"fas fa-code",disabled:!1,render:!R&&W.isRunningAs=="crashed",bg:!0})]})}function Dv(W){const G=Fe.use.setActiveWorkspaceOptionModal(),$=Fe.use.setShowNewTerminalWindow();return B.jsxs(Tv,{children:[B.jsxs("header",{className:"p-3 flex items-start gap-4 bg-gradient-to-b from-white/5 to-transparent",children:[B.jsx("div",{className:"w-10 h-10 rounded flex items-center justify-center border border-white/10",children:B.jsx("i",{className:`text-xl ${W.info.fontawesomeIcon??"text-gray-400 fa fa-cube"}`})}),B.jsxs("div",{className:"flex flex-col h-12 overflow-hidden flex-1",children:[B.jsx("h3",{className:"text-base font-bold text-gray-200 group-hover:text-white leading-tight mb-1 transition-colors",children:W.info.name}),B.jsx("p",{className:"text-gray-500 group-hover:text-gray-400 text-xs truncate transition-colors",children:W.info.description})]}),B.jsxs("div",{className:"flex gap-2",children:[B.jsx("button",{onClick:()=>$(W.info),className:"w-8 h-8 rounded-lg bg-gray-800/50 hover:bg-blue-600 hover:text-white text-gray-500 flex items-center justify-center transition-colors",children:B.jsx("i",{className:"fas fa-terminal text-xs"})}),B.jsx("button",{onClick:()=>G(W.info),className:"group/btn flex-none w-8 h-8 rounded-lg border border-white/10 hover:border-white/30 text-gray-500 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center p-0",title:"Options",children:B.jsx("i",{className:"fas fa-cog group-hover/btn:rotate-90 transition-transform duration-300 text-xs"})})]})]}),B.jsx("div",{className:"mt-auto p-3 bg-black/20 border-t border-white/5 flex gap-2 relative",children:B.jsx(Rv,{...W})})]})}function Nt(W){return B.jsxs("div",{className:"flex flex-col gap-2 w-full m-0 p-0 group/input",children:[B.jsx("label",{className:"text-xs font-bold tracking-wider text-gray-400 group-focus-within/input:text-blue-400 transition-colors uppercase",children:W.label}),B.jsx("div",{className:"relative group rounded-lg transition-all duration-300",children:B.jsx("div",{className:`relative p-[1px] rounded-lg bg-gradient-to-r
56
- from-gray-700/40 to-gray-800/40
57
- group-focus-within:from-blue-500/40
58
- group-focus-within:to-purple-600/40
59
- transition-colors duration-300
60
- ${W.disabled?"bg-transparent cursor-not-allowed":""}
61
- `,children:B.jsxs("div",{className:"relative bg-gray/[0.1] rounded flex items-center overflow-hidden",children:[B.jsx("div",{className:"pl-3 flex items-center pointer-events-none",children:B.jsx("i",{className:`${W.icon} text-gray-500 group-focus-within:text-blue-400 transition-colors text-sm`})}),B.jsx("input",{type:"text",className:"pl-3 pr-4 py-2.5 text-sm w-full text-white placeholder-gray-600 focus:outline-none",placeholder:W.placeholder,value:W.value,onChange:G=>{W.onChange(G)},disabled:W.disabled})]})})})]})}function Jn({close:W,title:G,description:$,icon:D}){return B.jsxs("header",{className:"px-5 py-2 flex justify-between items-center bg-white/[0.05]",children:[B.jsxs("div",{className:"text-md font-bold text-white flex items-center gap-4",children:[B.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center bg-blue-500/20",children:B.jsx("i",{className:D||"fas fa-cube text-white text-lg"})}),B.jsxs("div",{className:"flex flex-col",children:[B.jsx("span",{className:"text-lg font-bold bg-clip-text text-white",children:G}),B.jsx("span",{className:"text-gray-500 font-medium text-xs",children:$})]})]}),B.jsx("button",{onClick:W,className:"w-8 h-8 rounded-lg hover:bg-white/10 text-gray-400 hover:text-white transition-all flex items-center justify-center",children:B.jsx("i",{className:"fas fa-times text-sm"})})]})}function er(W){const{children:G,width:$}=W,D=$||"650px";return B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/40 backdrop-blur-sm","aria-hidden":"true"}),B.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4 pointer-events-none",children:B.jsxs("div",{onClick:V=>V.stopPropagation(),className:`
62
- pointer-events-auto
63
- relative flex flex-col
64
- w-[95%] md:w-[${D}]
65
- rounded-2xl overflow-hidden
66
- shadow-2xl shadow-blue-900/20
67
- animate-fade-in-up
68
- `,style:{width:D},children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500/40 via-purple-500/40 to-pink-500/40 pointer-events-none"}),B.jsx("div",{className:"absolute inset-[2px] bg-[#0A0A0A] rounded-[15px] pointer-events-none"}),B.jsx("div",{className:"relative flex flex-col h-full bg-transparent z-10",children:G})]})})]})}function $v(){const W=Fe.use.activeWorkspaceOptionModal(),G=Fe.use.setActiveWorkspaceOptionModal(),$=Fe.use.updateWorkspace(),D=Fe.use.loadWorkspace(),[V,R]=_e.useState(null),[x,p]=_e.useState(""),[c,h]=_e.useState("");_e.useEffect(()=>{W&&(R(W),p(W.name))},[W]);function a(){G(null),p(".")}async function i(){if(!V)return;if(V.name.length<1){h("Package name cannot be empty");return}if(!await $(V)){h("Failed to update workspace");return}await D(),a()}return W?B.jsxs(er,{children:[B.jsx(Jn,{close:a,title:x,description:V?.path??""}),B.jsxs("div",{className:"p-4 flex-1 overflow-y-auto text-md",children:[c&&B.jsx("p",{className:"text-red-500 mb-2",children:c}),B.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[B.jsx(Nt,{label:"Icon",icon:"fas fa-icons",placeholder:"(optional) fontawesome icon",value:V?.fontawesomeIcon||"",onChange:r=>{V&&R({...V,fontawesomeIcon:r.target.value.toLowerCase()})}}),B.jsx(Nt,{label:"Description",icon:"fas fa-info",placeholder:"(optional) description",value:V?.description||"",onChange:r=>{V&&R({...V,description:r.target.value})}})]}),B.jsx(Nt,{label:"Description",icon:"fas fa-info",placeholder:"(optional) Description",value:V?.description||"",onChange:r=>{V&&R({...V,description:r.target.value})}},"description"),B.jsx("h4",{className:"my-4 w-full font-semibold text-gray-500 uppercase tracking-wider flex items-center",children:B.jsxs("p",{className:"flex-1 text-sm",children:[B.jsx("i",{className:"fas fa-terminal mr-2"}),B.jsx("span",{children:"Scripts & Commands"})]})}),B.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{pkg:"devCommand",label:"Dev Command",icon:"fas fa-code",placeholder:"ex: nodemon index.js"},{pkg:"startCommand",label:"Start Command",icon:"fas fa-code",placeholder:"ex: node index.js"},{pkg:"stopCommand",label:"Stop Command",icon:"fas fa-code",placeholder:"ex: npx -y kill-port 3000"},{pkg:"buildCommand",label:"Build Command",icon:"fas fa-code",placeholder:"ex: tsc"},{pkg:"cleanCommand",label:"Clean Command",icon:"fas fa-code",placeholder:"ex: rm -rf dist"},{pkg:"lintCommand",label:"Lint Command",icon:"fas fa-code",placeholder:"ex: lint ."},{pkg:"testCommand",label:"Test Command",icon:"fas fa-code",placeholder:"ex: jest"}].map(r=>B.jsx(Nt,{label:r.label,icon:r.icon,placeholder:r.placeholder,value:V?.[r.pkg]||"",onChange:o=>{V&&R({...V,[r.pkg]:o.target.value})}},r.pkg))})]}),B.jsxs("footer",{className:"p-2 px-6 flex justify-end gap-4",children:[B.jsxs("button",{onClick:a,className:"group relative px-6 py-2 rounded-lg font-medium text-sm text-gray-400 hover:text-white transition-colors overflow-hidden",children:[B.jsx("span",{className:"relative z-10",children:"Cancel"}),B.jsx("div",{className:"absolute inset-0 bg-white/5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),B.jsxs("button",{onClick:i,className:"group relative px-6 py-2 rounded-lg font-bold text-sm text-white transition-all hover:shadow-[0_0_20px_-5px_rgba(59,130,246,0.5)]",children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg"}),B.jsx("div",{className:"absolute inset-0 bg-white/20 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg"}),B.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-save"}),"Save"]})]})]})]}):null}function Ov({label:W,icon:G,value:$,onChange:D,options:V,placeholder:R="Select an option"}){return B.jsxs("div",{className:"flex flex-col gap-2 w-full m-0 p-0 group/input",children:[B.jsx("label",{className:"text-xs font-bold tracking-wider text-gray-400 group-focus-within/input:text-blue-400 transition-colors uppercase",children:W}),B.jsxs("div",{className:"relative group rounded-lg transition-all duration-300",children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg opacity-0 group-focus-within:opacity-100 blur transition-opacity duration-300 -z-10"}),B.jsx("div",{className:"relative p-[1px] rounded-lg bg-gradient-to-r from-gray-700 to-gray-800 group-focus-within:from-blue-500 group-focus-within:to-purple-600 transition-colors duration-300",children:B.jsxs("div",{className:"relative bg-[#0A0A0A] rounded-[7px] flex items-center overflow-hidden",children:[B.jsx("div",{className:"pl-3 flex items-center pointer-events-none",children:B.jsx("i",{className:`${G} text-gray-500 group-focus-within:text-blue-400 transition-colors text-sm`})}),B.jsxs("select",{value:$,onChange:D,className:"appearance-none pl-3 pr-10 py-2.5 text-sm w-full bg-transparent text-gray-200 placeholder-gray-600 focus:outline-none cursor-pointer",children:[B.jsx("option",{value:"",disabled:!0,className:"bg-gray-900 text-gray-500",children:R}),V.map((x,p)=>{const c=typeof x=="string"?x:x.label,h=typeof x=="string"?x:x.value||x.path||"";return B.jsx("option",{value:h,className:"bg-[#0A0A0A] text-gray-300",children:c},p)})]}),B.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:B.jsx("i",{className:"fas fa-chevron-down text-gray-500 group-focus-within:text-blue-400 text-xs transition-colors"})})]})})]})]})}function Nv(W){const G=Et.use.getTemplates(),[$,D]=_e.useState({project:[],database:[],services:[],tool:[],demo:[]}),[V,R]=_e.useState("Project");return _e.useEffect(()=>{if(!W.show)return;(async()=>{const p=await G(),c={project:p.project||[],database:p.database||[],services:p.services||[],tool:p.tool||[],demo:p.demo||[]};D(c)})()},[W.show]),W.show?B.jsxs(er,{width:"700px",children:[B.jsx(Jn,{close:()=>W.onClose(),title:"Select Template",description:"Choose a template to initialize your workspace"}),B.jsxs("div",{className:"flex-1 flex flex-row gap-2 overflow-hidden p-2",children:[B.jsxs("div",{className:"w-48",children:[B.jsx(lo,{name:"Project",icon:"fas fa-code",activeTab:V,setActiveTab:R}),B.jsxs("h2",{className:"text-sm font-bold text-white mt-4 ml-2 mb-1",children:["Local Testing",B.jsx("span",{className:"text-red-500 text-xs ml-1",children:"*DOCKER"})]}),B.jsx(lo,{name:"Database",icon:"fas fa-database",activeTab:V,setActiveTab:R}),B.jsx(lo,{name:"Services",icon:"fas fa-server",activeTab:V,setActiveTab:R}),B.jsx(lo,{name:"Tool",icon:"fas fa-tools",activeTab:V,setActiveTab:R}),B.jsx("h2",{className:"text-sm font-bold text-gray-600 my-2 ml-2",children:"Sample Projects"}),B.jsx(lo,{name:"Demo",icon:"fas fa-cube",activeTab:V,setActiveTab:R})]}),B.jsx("div",{className:"flex-1 w-full h-[500px] overflow-y-auto",children:B.jsxs("div",{className:"flex flex-col gap-2",children:[B.jsx(co,{show:V==="Project",project:$.project,onClick:x=>{W.onSelect(x)}}),B.jsx(co,{show:V==="Database",project:$.database,onClick:x=>{W.onSelect(x)}}),B.jsx(co,{show:V==="Services",project:$.services,onClick:x=>{W.onSelect(x)}}),B.jsx(co,{show:V==="Tool",project:$.tool,onClick:x=>{W.onSelect(x)}}),B.jsx(co,{show:V==="Demo",project:$.demo,onClick:x=>{W.onSelect(x)}})]})})]})]}):null}function lo({name:W,icon:G,activeTab:$,setActiveTab:D}){return B.jsxs("button",{onClick:()=>D(W),className:`flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium transition-all duration-200 w-full text-left
69
- ${$===W?"bg-blue-600/10 text-blue-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[B.jsx("i",{className:`${G} w-5 text-center ${$===W?"text-blue-400":"text-gray-500 group-hover:text-gray-400"}`}),W]})}const Bv=W=>{const G=W.toLowerCase();return G.includes("react")?"fab fa-react text-blue-400":G.includes("next.js")?"fab fa-js text-white":G.includes("express")?"fab fa-node text-green-500":G.includes("php")?"fab fa-php text-indigo-400":G.includes("laravel")?"fab fa-laravel text-red-500":G.includes(".net")?"fab fa-windows text-blue-600":G.includes("python")?"fab fa-python text-yellow-500":G.includes("mysql")?"fas fa-database text-blue-500":G.includes("postgres")?"fas fa-database text-blue-300":G.includes("supabase")?"fas fa-bolt text-green-400":G.includes("redis")?"fas fa-server text-red-400":G.includes("mongo")?"fas fa-leaf text-green-500":G.includes("n8n")?"fas fa-project-diagram text-red-500":G.includes("aws")?"fab fa-aws text-orange-400":G.includes("mailpit")?"fas fa-envelope text-blue-500":G.includes("cloudbeaver")?"fas fa-database text-orange-500":G.includes("pgweb")?"fas fa-database text-blue-500":G.includes("mongo-express")?"fas fa-leaf text-green-500":G.includes("redis-commander")?"fas fa-server text-red-400":G.includes("chat to monochat")?"fas fa-comments text-green-500":G.includes("localstack")?"fab fa-aws text-orange-500":G.includes("stripe")?"fab fa-stripe text-orange-500":G.includes("yaade")?"fas fa-vial text-purple-500":G.includes("mattermost")?"fas fa-comments text-green-500":G.includes("nextcloud")?"fas fa-cloud text-blue-500":G.includes("mautic")?"fas fa-bullhorn text-purple-500":"fas fa-cube text-gray-400"};function co({project:W,onClick:G,show:$}){return $?B.jsx(B.Fragment,{children:W.map(D=>B.jsx("button",{onClick:()=>G(D.name),className:"flex items-center p-2 hover:bg-gray-800 text-left w-full",children:B.jsxs("div",{className:"flex-1 min-w-0",children:[B.jsxs("div",{className:"flex items-center gap-2",children:[B.jsx("i",{className:`${Bv(D.name)} text-xl`}),B.jsx("span",{className:"font-bold text-gray-200 group-hover:text-white text-base truncate",children:D.name})]}),B.jsx("div",{className:"text-xs text-gray-500 group-hover:text-gray-400 mt-1 leading-relaxed",children:D.description}),D.notes&&B.jsxs("div",{className:"flex items-start gap-1.5 text-[11px] text-amber-400/90 w-fit",children:[B.jsx("i",{className:"fas fa-info-circle mt-0.5"}),B.jsx("span",{className:"font-medium opacity-90",children:D.notes})]})]})}))}):null}const up={name:"",path:"",fontawesomeIcon:"",description:"",devCommand:""};function jv(){const[W,G]=_e.useState(up),[$,D]=_e.useState([]),[V,R]=_e.useState(""),x=Fe.use.showWorkspaceNew(),p=Fe.use.workspace(),c=Fe.use.createNewWorkspace(),h=Fe.use.setShowWorkspaceNew(),a=Fe.use.setShowNewTerminalWindow(),i=Fe.use.loadWorkspace(),r=Fe.use.listWorkspace(),o=Fe.use.setWorkspaceTemplate(),s=Fe.use.setWorkspaceLoading(),[l,n]=_e.useState(""),[d,f]=_e.useState(!1);_e.useEffect(()=>{x?(G(up),(async()=>{const g=await r();D(g)})()):n("")},[x]);function y(){R(""),h(!1)}async function _(){if(W.name===""||W.path===""){R("Package name and path is required");return}if(p.find(w=>w.info.name===W.name)){R("Package name already exist");return}const g={name:W.name,path:W.path+"/"+W.name,devCommand:W.devCommand,fontawesomeIcon:W.fontawesomeIcon||void 0,description:W.description||void 0};try{s(!0),y(),await c(g)&&(l?await o(g,l):(s(!1),a(g)))}catch{if(window.isLoadingCancelled)return;R("Failed to create workspace")}i(),s(!1)}return x?B.jsxs(er,{children:[B.jsx(Jn,{close:y,title:"New Workspace App",description:"Create a new application inside the workspace"}),B.jsxs("div",{className:"p-3 flex-1 overflow-y-auto text-md",children:[V&&B.jsx("p",{className:"text-red-500",children:V}),B.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[B.jsx(Nt,{label:"Name (small letters)",icon:"fa fa-cube",placeholder:"Package and Folder Name",value:W?.name||"",onChange:v=>{if(!W)return;const g=v.target.value.replace(/ /g,"-");G({...W,name:g.toLowerCase()})}}),B.jsx(Ov,{label:"Path",icon:"fas fa-folder",placeholder:"Select a workspace path",value:W?.path||"",onChange:v=>{W&&G({...W,path:v.target.value})},options:$})]}),l===""&&B.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[B.jsx(Nt,{label:"Icon",icon:"fas fa-icons",placeholder:"(optional) fontawesome icon",value:W?.fontawesomeIcon||"",onChange:v=>{W&&G({...W,fontawesomeIcon:v.target.value.toLowerCase()})}}),B.jsx(Nt,{label:"Description",icon:"fas fa-info",placeholder:"(optional) description",value:W?.description||"",onChange:v=>{W&&G({...W,description:v.target.value})}})]}),B.jsxs("div",{className:"flex flex-row w-[50%] gap-2 mb-2 mt-4",children:[B.jsx(Nt,{label:"Template (Optional)",icon:"fas fa-cube",placeholder:"Template name",value:l,onChange:v=>{n(v.target.value)},disabled:!0}),B.jsxs("button",{onClick:()=>f(!0),className:"group relative h-10 mt-6 px-6 py-2 rounded-lg font-bold text-sm text-white transition-all hover:shadow-[0_0_20px_-5px_rgba(59,130,246,0.5)]",children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg"}),B.jsx("div",{className:"absolute inset-0 bg-white/20 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg"}),B.jsx("span",{className:"relative z-10 flex items-center gap-2",children:"Select"})]})]})]}),B.jsxs("footer",{className:"p-2 px-6 pb-4 flex justify-end gap-4",children:[B.jsxs("button",{onClick:y,className:"group relative px-6 py-2 rounded-lg font-medium text-sm text-gray-400 hover:text-white transition-colors overflow-hidden",children:[B.jsx("span",{className:"relative z-10",children:"Cancel"}),B.jsx("div",{className:"absolute inset-0 bg-white/5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),B.jsxs("button",{onClick:_,className:"group relative px-6 py-2 rounded-lg font-bold text-sm text-white transition-all hover:shadow-[0_0_20px_-5px_rgba(59,130,246,0.5)]",children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg"}),B.jsx("div",{className:"absolute inset-0 bg-white/20 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg"}),B.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-plus"}),"Create New App"]})]})]}),B.jsx(Nv,{show:d,onClose:()=>f(!1),onSelect:v=>{n(v),f(!1)}})]}):null}function Iv(){const W=Fe.use.showNewTerminalWindow(),G=Fe.use.setShowNewTerminalWindow(),$=_e.useRef(null),D=()=>{$.current&&$.current.disconnect(),G(null)};return _e.useEffect(()=>{if(W&&$.current){const V=setTimeout(()=>{$.current?.connect(W.path,"bash",W.name),$.current?.focus()},50);return()=>clearTimeout(V)}},[W]),W?B.jsxs(er,{width:"700px",children:[B.jsx(Jn,{close:D,title:W.name||"",description:W.description||"",icon:"fas fa-terminal text-blue-500 text-xl"}),B.jsx("div",{className:"flex-1 overflow-hidden p-2",children:B.jsx(ho,{ref:$,isInteractive:!0,className:"h-full",socketUrl:Ke.serverPath})})]}):null}const hp={default:"from-blue-600/50 to-purple-600/50",blueIndigo:"from-blue-500 to-indigo-600",emeraldTeal:"from-emerald-500 to-teal-600",yellowOrange:"from-yellow-500 to-orange-600",pinkRose:"from-pink-500 to-rose-600",gray:"from-gray-500 to-gray-600",red:"from-red-500 to-red-600",skyBlue:"from-blue-400 to-blue-500",cyanBlue:"from-cyan-500 to-blue-600",darkRed:"from-red-600 to-red-700",orangePurple:"from-orange-500 to-purple-600",purplePink:"from-purple-500 to-pink-500",indigoFuchsia:"from-indigo-500 to-fuchsia-500",tealLime:"from-teal-500 to-lime-500",bluePurple:"from-blue-500 to-purple-600"};function Qc(W){const G=W.spanTo??"toLeft",$=hp[W.color]??W.color??hp.default,D={toLeft:{btnFlex:"flex-row justify-end",contentFlex:"flex-row",textAnim:"w-0 group-hover:w-auto ml-0 group-hover:ml-3"},toRight:{btnFlex:"flex-row justify-start",contentFlex:"flex-row",textAnim:"w-0 group-hover:w-auto ml-0 group-hover:ml-3"},toTop:{btnFlex:"flex-col justify-end",contentFlex:"flex-col",textAnim:"h-0 group-hover:h-auto mt-0 group-hover:mt-3"},toBottom:{btnFlex:"flex-col justify-start",contentFlex:"flex-col",textAnim:"h-0 group-hover:h-auto mt-0 group-hover:mt-3"}},V=D[G]||D.toLeft;return B.jsx("button",{onClick:W.onClick,className:`group fixed z-50 flex items-center ${V.btnFlex}`,style:{top:W.top,right:W.right,bottom:W.bottom,left:W.left},children:B.jsx("div",{className:`relative flex items-center ${V.contentFlex} p-[1px] rounded-xl bg-gradient-to-r ${$} transition-transform duration-300 group-hover:scale-105`,children:B.jsxs("div",{className:`relative flex items-center ${V.contentFlex} bg-[#0A0A0A] rounded-xl px-4 py-3 transition-colors duration-300 group-hover:bg-[#0A0A0A]/80`,children:[B.jsx("i",{className:W.icon+" w-6 h-6 text-xl bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-400"}),B.jsx("span",{className:`font-bold overflow-hidden transition-all duration-300 whitespace-nowrap text-white ${V.textAnim}`,children:W.text})]})})})}function Hv(){const W=Et.use.hideShowFileFolder(),G=Fe.use.workspace(),$=Fe.use.setShowWorkspaceNew(),D=Et.use.setShowTerminal(),[V,R]=_e.useState(!0);async function x(){try{let p=[];G.filter(i=>i.isRunningAs!=null).length>0&&(p=G.filter(i=>i.isRunningAs==null).map(i=>i.info.path)),(await W(V,p)).isHidden?R(!1):R(!0)}catch(p){console.error("Error toggling files visibility:",p)}}return B.jsxs(B.Fragment,{children:[B.jsx(Qc,{onClick:()=>D(!0),bottom:184,right:32,icon:"fa-solid fa-terminal",text:"Root Terminal"}),B.jsx(Qc,{onClick:()=>x(),bottom:104,right:32,icon:V?"fa-solid fa-eye-slash":"fa-solid fa-eye",text:V?"Hide Files":"Show Files"}),B.jsx(Qc,{onClick:()=>$(!0),bottom:24,right:32,icon:"fa-solid fa-plus",text:"Add Workspace App"})]})}const zv=qn()((W,G)=>({loading:!1,history:[],branch:"",commitMessage:"",selectedCommit:null,commitLoading:!1,setLoading:$=>W({loading:$}),setCommitMessage:$=>W({commitMessage:$}),setSelectedCommit:$=>W({selectedCommit:$}),fetchData:async()=>{W({loading:!0});try{const[$,D]=await Promise.all([fetch(`${Ke.serverPath}${st.gitControl}/history`),fetch(`${Ke.serverPath}${st.gitControl}/branch`)]),V=await $.json(),R=await D.json();W({history:V.history||[],branch:R.branch||""})}catch($){console.error("Failed to fetch git data",$)}finally{W({loading:!1})}},handleCommit:async $=>{$&&$.preventDefault();const{commitMessage:D}=G();if(D.trim()){W({commitLoading:!0});try{await fetch(`${Ke.serverPath}${st.gitControl}/push`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:D})}),W({commitMessage:""}),W({loading:!0}),await G().fetchData()}catch(V){console.error("Failed to commit and push",V),alert("Failed to commit and push")}finally{W({commitLoading:!1}),W({loading:!1})}}},handleRevert:async()=>{const{selectedCommit:$}=G();if($){W({loading:!0});try{await fetch(`${Ke.serverPath}${st.gitControl}/revert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hash:$.hash})}),W({selectedCommit:null}),await G().fetchData()}catch(D){console.error("Failed to revert",D),alert("Failed to revert")}finally{W({loading:!1})}}}})),zt=Zn(zv);function Fv(){const W=zt.use.loading(),G=zt.use.history(),$=zt.use.setSelectedCommit();return B.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 custom-scrollbar",children:W?B.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 gap-2",children:[B.jsx("i",{className:"fas fa-circle-notch fa-spin"}),B.jsx("span",{className:"text-xs",children:"Loading history..."})]}):G.map(D=>B.jsxs("button",{onClick:()=>$(D),className:`
70
- w-full text-left group flex flex-col gap-1 p-2
71
- rounded border border-white/5 opacity-70
72
- hover:opacity-100 bg-gradient-to-r hover:from-blue-500/50 hover:to-indigo-600/50
73
- transition-all duration-200
74
- `,children:[B.jsxs("div",{className:"flex items-start justify-between gap-4",children:[B.jsx("span",{className:"text-sm text-white font-medium ",children:D.message}),B.jsx("span",{className:"text-[12px] font-mono text-white px-1.5 py-0.5 border border-white/5",children:D.hash})]}),B.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-gray-500",children:[B.jsx("i",{className:"far fa-clock"}),B.jsx("span",{children:D.date})]})]},D.hash))})}function Wv(){const W=zt.use.loading(),G=zt.use.fetchData();return B.jsxs("header",{className:"flex items-center justify-between py-1 px-4 ",children:[B.jsxs("div",{className:"flex items-center gap-3",children:[B.jsx("div",{className:"w-6 h-6 rounded-lg bg-gradient-to-br from-orange-500 to-red-600 flex items-center justify-center shadow-lg shadow-orange-500/20",children:B.jsx("i",{className:"fab fa-git-alt text-white text-sm"})}),B.jsx("h2",{className:"font-bold tracking-tight opacity-80",children:"Git Workflow Helper"})]}),B.jsx("button",{onClick:G,className:`w-6 h-6 rounded-full flex items-center justify-center text-gray-400 hover:text-white hover:bg-white/10 transition-all ${W?"animate-spin":""}`,title:"Refresh",children:B.jsx("i",{className:"fas fa-sync-alt text-xs"})})]})}function Pv(){const W=zt.use.branch(),G=zt.use.commitMessage(),$=zt.use.loading(),D=zt.use.commitLoading(),V=zt.use.handleCommit(),R=zt.use.setCommitMessage();return B.jsxs("div",{className:"",children:[B.jsx("div",{className:"flex items-center gap-2 my-1 px-1",children:B.jsxs("span",{className:"text-xs font-mono text-purple-300 bg-purple-500/10 px-2 py-0.5 rounded border border-purple-500/20",children:["Commiting to branch:",B.jsx("span",{className:"mx-1 text-blue-500",children:W||"..."})]})}),B.jsxs("form",{onSubmit:V,className:"flex gap-2",children:[B.jsx("input",{type:"text",value:G,onChange:x=>R(x.target.value),disabled:D,placeholder:"Commit message & push",className:"flex-1 border border-white/10 rounded px-2 py-1 text-sm text-white placeholder-gray-600 focus:outline-none focus:border-blue-500/50 focus:ring-1 focus:ring-blue-500/50 transition-all"}),D?B.jsx("button",{type:"button",disabled:!0,className:"px-4 py-2 hover:bg-white/10 rounded opacity-60 hover:opacity-100 transition-all",children:B.jsx("i",{className:"fas fa-spinner animate-spin text-xl text-blue-500"})}):B.jsx("button",{type:"submit",disabled:$||D||!G.trim(),className:"px-4 py-2 hover:bg-white/10 rounded opacity-60 hover:opacity-100 transition-all",children:B.jsx("i",{className:"fas fa-paper-plane text-xl text-blue-500 "})})]})]})}function Uv(){const W=zt.use.selectedCommit(),G=zt.use.setSelectedCommit(),$=zt.use.handleRevert();return B.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-fadeIn",children:B.jsx("div",{className:"w-full max-w-md bg-[#111] border border-white/10 rounded-xl shadow-2xl overflow-hidden scale-100 animate-scaleIn",children:B.jsxs("div",{className:"p-6",children:[B.jsx("div",{className:"w-12 h-12 rounded-full bg-red-500/10 flex items-center justify-center mx-auto mb-4 border border-red-500/20",children:B.jsx("i",{className:"fas fa-exclamation-triangle text-red-500 text-xl"})}),B.jsx("h3",{className:"text-xl font-bold text-white text-center mb-2",children:"Revert Changes?"}),B.jsxs("p",{className:"text-gray-400 text-center text-sm leading-relaxed mb-6",children:["Are you sure you want to revert to commit ",B.jsx("span",{className:"font-mono text-white bg-white/10 px-1 py-0.5 rounded",children:W?.hash}),"?",B.jsx("br",{}),B.jsx("span",{className:"text-red-400 text-xs mt-2 block",children:"Warning: This will discard all current uncommitted changes."})]}),B.jsx("div",{className:"bg-white/5 rounded-lg p-3 mb-6 border border-white/5",children:B.jsxs("p",{className:"text-gray-300 text-xs font-mono line-clamp-2",children:['"',W?.message,'"']})}),B.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[B.jsx("button",{onClick:()=>G(null),className:"px-4 py-2 rounded-lg bg-white/5 text-gray-300 text-sm font-medium hover:bg-white/10 hover:text-white transition-colors",children:"Cancel"}),B.jsx("button",{onClick:$,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-500 shadow-lg shadow-red-500/20 transition-all",children:"Confirm Revert"})]})]})})})}function Vv(){const W=zt.use.fetchData(),G=zt.use.selectedCommit();return _e.useEffect(()=>{W()},[]),B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"w-full h-full",children:B.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[B.jsx(Wv,{}),B.jsx(Fv,{}),B.jsx(Pv,{})]})}),G&&B.jsx(Uv,{}),B.jsx("style",{children:`
75
- @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
76
- @keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
77
- .animate-fadeIn { animation: fadeIn 0.2s ease-out forwards; }
78
- .animate-scaleIn { animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
79
- .custom-scrollbar::-webkit-scrollbar { width: 4px; }
80
- .custom-scrollbar::-webkit-scrollbar-track { bg: transparent; }
81
- .custom-scrollbar::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
82
- .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #444; }
83
- `})]})}function Gv(){const W=Fe.use.workspaceLoading(),G=Fe.use.loadMessage();return W?B.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-50 bg-black/50",children:B.jsxs("div",{className:"flex flex-col items-center",children:[B.jsx("i",{className:"fas fa-spinner animate-spin text-4xl text-blue-500"}),B.jsx("p",{className:"text-white text-lg font-bold",children:G}),B.jsx("button",{className:"mt-2 text-white text-md w-24 font-bold bg-red-500 p-2 rounded hover:bg-red-600",onClick:()=>{window.isLoadingCancelled=!0},children:"Cancel"})]})}):null}function Kv({whichShow:W,setWhichShow:G}){return B.jsxs("div",{className:"absolute top-2 left-2 z-10 bg-gradient-to-b from-[#050505] to-[#101010] px-2 rounded-lg",children:[B.jsx("button",{onClick:()=>G("all"),className:`${W==="all"?"bg-blue-800/80":""} px-4 py-1 text-[10px] font-bold uppercase rounded-lg transition-all text-white/50`,children:"Show All Apps"}),B.jsx("button",{onClick:()=>G("apps"),className:`${W==="apps"?"bg-blue-800/80":""} px-4 py-1 text-[10px] font-bold uppercase rounded-lg transition-all text-white/50`,children:"Apps Only"}),B.jsx("button",{onClick:()=>G("tools"),className:`${W==="tools"?"bg-blue-800/80":""} px-4 py-1 text-[10px] font-bold uppercase rounded-lg transition-all text-white/50`,children:"Tools Only"})]})}function Yv(W){const[G,$]=_e.useState("all"),D=Fe.use.workspace(),V=Fe.use.loadWorkspace(),[R,x]=_e.useState(null);return _e.useEffect(()=>{W.isVisible&&V()},[W.isVisible]),_e.useEffect(()=>{x(G==="all"?D:G==="apps"?D.filter(p=>p.info.appType==null):D.filter(p=>p.info.appType==="tool"))},[G,D]),B.jsxs(B.Fragment,{children:[W.isVisible&&B.jsx(Kv,{whichShow:G,setWhichShow:$}),B.jsxs("div",{className:`relative flex flex-col w-full h-[calc(100vh-54px)] ${W.isVisible?"":"hidden"}`,children:[B.jsxs("div",{className:"grid grid-rows-5 h-full min-h-0 gap-2",children:[B.jsxs("div",{className:"row-span-3 min-h-0 grid grid-cols-4 gap-2 overflow-hidden p-2",children:[B.jsx("div",{className:"pt-9 col-span-3 h-full overflow-y-auto grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-2 p-2 relative",children:R?.map(p=>B.jsx("div",{children:B.jsx(Dv,{...p})},p.info.name))}),B.jsx("div",{className:"col-span-1 h-full overflow-hidden",children:B.jsx(Vv,{})})]}),B.jsx("div",{className:"row-span-2",children:B.jsx(kv,{whichShow:G})})]}),B.jsx(Hv,{}),B.jsx($v,{}),B.jsx(jv,{}),B.jsx(Iv,{}),B.jsx(Gv,{})]})]})}const Xv=qn()(W=>({modal:null,title:"",message:"",banner:null,data:null,callback:()=>{},showModal:(G,$,D,V,R,x)=>{W({modal:G,title:$,message:D,banner:V,callback:R,data:x})},hideModal:()=>{W({modal:null,title:"",message:"",banner:null,callback:()=>{},data:null})}})),Xn=Zn(Xv);function Qv(){const W=Xn.use.modal(),G=Xn.use.title(),$=Xn.use.message(),D=Xn.use.callback(),V=Xn.use.hideModal(),R=Xn.use.banner(),x=Xn.use.data();let p="fa fa-info-circle text-blue-500",c="bg-blue-600 hover:bg-blue-500 shadow-blue-500/20";return R==="warning"?(p="fa fa-exclamation-triangle text-yellow-500",c="bg-yellow-600 hover:bg-yellow-500 shadow-yellow-500/20"):R==="error"?(p="fa fa-times-circle text-red-500",c="bg-red-600 hover:bg-red-500 shadow-red-500/20"):R==="success"&&(p="fa fa-check-circle text-green-500",c="bg-green-600 hover:bg-green-500 shadow-green-500/20"),B.jsx("div",{children:W&&B.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[200] flex items-center justify-center p-4",children:B.jsxs("div",{className:"relative w-[500px] min-h-[200px] max-h-[500px] flex flex-col rounded-xl overflow-hidden shadow-2xl shadow-blue-900/20",children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500/20 via-purple-500/20 to-pink-500/20 pointer-events-none"}),B.jsx("div",{className:"absolute inset-[1px] bg-[#0A0A0A] rounded-[10px] pointer-events-none"}),B.jsxs("div",{className:"relative z-10 p-6 flex flex-col h-full",children:[B.jsxs("div",{className:"flex-1 ",children:[B.jsxs("div",{className:"mb-2 flex gap-4",children:[B.jsx("i",{className:`${p} text-3xl`}),B.jsx("h2",{className:"text-xl font-bold mb-2 text-white",children:G})]}),B.jsx("p",{className:"text-gray-300",children:$})]}),W==="alert"&&B.jsx("button",{onClick:()=>{D&&D(void 0),V()},autoFocus:!0,className:`w-[80%] mx-auto py-2 rounded-xl text-white shadow-lg font-bold ${c}`,children:"OK"}),W==="selection"&&B.jsxs("div",{className:"flex flex-col gap-2 h-full overflow-y-auto pr-1",children:[x?.map((h,a)=>B.jsxs("button",{onClick:()=>{D&&D(h),V()},className:"flex items-center gap-3 w-full p-2 bg-gray-700/50 hover:bg-gray-700 rounded-lg transition-colors text-left group",children:[B.jsx("div",{className:"w-8 h-8 rounded bg-gray-600 flex items-center justify-center text-gray-400 group-hover:text-white transition-colors",children:B.jsx("i",{className:`fas ${h.info.fontawesomeIcon||"fa-box"}`})}),B.jsxs("div",{className:"flex-1 min-w-0",children:[B.jsx("div",{className:"text-white font-medium truncate",children:h.info.name}),B.jsx("div",{className:"text-gray-400 text-xs truncate",children:h.info.path})]}),B.jsx("i",{className:"fas fa-chevron-right text-gray-500 group-hover:text-white"})]},a)),B.jsx("button",{onClick:()=>V(),className:"mt-4 w-full py-2 rounded-xl text-white bg-gray-600 hover:bg-gray-500 font-bold",children:"Cancel"})]}),W==="confirm"&&B.jsxs("div",{className:"flex gap-4 justify-end",children:[B.jsx("button",{onClick:()=>{D&&D(!1),V()},className:"px-4 py-2 rounded-xl text-white bg-gray-600 hover:bg-gray-500 font-bold",children:"Cancel"}),B.jsx("button",{onClick:()=>{D&&D(!0),V()},className:`px-4 py-2 rounded-xl text-white shadow-lg font-bold ${c}`,children:"OK"})]})]})]})})})}function qv(){const W=Et.use.showTerminal(),G=Et.use.rootDir(),$=Et.use.setShowTerminal(),D=_e.useRef(null),V=()=>{D.current&&D.current.disconnect(),$(!1)};return _e.useEffect(()=>{if(W&&G&&D.current){const R=setTimeout(()=>{D.current?.connect(G),D.current?.focus()},50);return()=>clearTimeout(R)}},[W,G]),W?B.jsxs(er,{width:"700px",children:[B.jsx(Jn,{close:V,title:"Root Terminal",description:"Execute commands in the project root",icon:"fas fa-terminal text-blue-500 text-xl"}),B.jsx("div",{className:"flex-1 overflow-hidden p-2",children:B.jsx(ho,{ref:D,isInteractive:!0,className:"h-full",socketUrl:Ke.serverPath})})]}):null}function Zv({onComplete:W}){const G=Et.use.scaffoldRepo(),[$,D]=_e.useState("intro"),[V,R]=_e.useState(""),x=async()=>{D("scaffolding"),R("Scaffolding directories and files...");try{const p=await G();p.success?(R("Scaffolding complete! Installing dependencies..."),setTimeout(()=>{D("success")},1e3)):(R(`Error: ${p.error}`),setTimeout(()=>W&&W(),3e3))}catch(p){console.error(p),R("Failed to connect to backend."),setTimeout(()=>W&&W(),3e3)}};return B.jsx("div",{className:"fixed inset-0 z-[99999] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 overflow-y-auto",children:B.jsxs("div",{className:"bg-[#111111] border border-gray-800 rounded-2xl shadow-2xl w-full max-w-3xl flex flex-col relative animate-fade-in-up my-auto",children:[B.jsx("div",{className:"h-1 w-full bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 shrink-0"}),B.jsxs("div",{className:"p-6 md:p-12 flex-1",children:[$==="intro"&&B.jsxs("div",{className:"space-y-8 text-center",children:[B.jsxs("div",{className:"space-y-4",children:[B.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-blue-500/10 to-purple-500/10 border border-blue-500/20 mb-4",children:B.jsx("i",{className:"fas fa-cubes text-3xl text-blue-400"})}),B.jsxs("h1",{className:"text-3xl md:text-5xl font-bold tracking-tight text-white leading-tight",children:["Welcome to ",B.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-400 block sm:inline",children:"Monorepo TIME"})]}),B.jsx("p",{className:"text-base md:text-lg text-gray-400 max-w-lg mx-auto leading-relaxed",children:"Your modern dashboard for managing monorepos with speed, elegance, and precision."})]}),B.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 text-left",children:[{icon:"fa-project-diagram",title:"Unified View",desc:"Manage apps & packages in one place."},{icon:"fa-terminal",title:"Web Terminal",desc:"Run commands without leaving the UI."},{icon:"fa-bolt",title:"Turborepo",desc:"Accelerate workflows with Turbo."}].map((p,c)=>B.jsxs("div",{className:"p-4 rounded-xl bg-white/5 border border-white/5 hover:border-white/10 transition-colors",children:[B.jsx("div",{className:"w-10 h-10 rounded-lg bg-gray-800 flex items-center justify-center mb-3",children:B.jsx("i",{className:`fas ${p.icon} text-blue-400`})}),B.jsx("h3",{className:"font-semibold text-gray-200",children:p.title}),B.jsx("p",{className:"text-sm text-gray-500 mt-1",children:p.desc})]},c))}),B.jsx("div",{className:"pt-4",children:B.jsxs("button",{onClick:()=>D("prompt"),className:"w-full sm:w-auto px-8 py-3 rounded-lg bg-blue-600 hover:bg-blue-500 text-white font-medium transition-colors shadow-lg shadow-blue-600/20",children:["Get Started ",B.jsx("i",{className:"fas fa-arrow-right ml-2 text-sm"})]})})]}),$==="prompt"&&B.jsxs("div",{className:"space-y-6 md:space-y-8",children:[B.jsxs("div",{className:"text-center space-y-4",children:[B.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 md:w-16 md:h-16 rounded-full bg-blue-500/10 text-blue-400 mb-2",children:B.jsx("i",{className:"fas fa-tools text-xl md:text-2xl"})}),B.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-white",children:"Recommended Setup"}),B.jsx("p",{className:"text-sm md:text-base text-gray-400 max-w-md mx-auto",children:"We noticed this might be a new project. Let's get you set up with a best-practice folder structure."})]}),B.jsxs("div",{className:"bg-yellow-500/10 border border-yellow-500/20 rounded-xl p-4 flex flex-col sm:flex-row items-start gap-4",children:[B.jsx("div",{className:"p-2 bg-yellow-500/10 rounded-lg shrink-0",children:B.jsx("i",{className:"fas fa-exclamation-triangle text-yellow-500 text-lg"})}),B.jsxs("div",{children:[B.jsx("h4",{className:"text-yellow-500 font-semibold text-sm uppercase tracking-wider mb-1",children:"Requirement"}),B.jsxs("p",{className:"text-yellow-200/80 text-sm leading-relaxed",children:["This tool requires ",B.jsx("strong",{className:"text-white",children:"Turborepo"})," to function correctly. We will generate a ",B.jsx("code",{className:"bg-black/30 px-1.5 py-0.5 rounded text-white font-mono text-xs",children:"turbo.json"})," configuration and organize your workspace for you."]})]})]}),B.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-4 font-mono text-sm text-gray-400 overflow-x-auto",children:[B.jsx("p",{className:"mb-2 text-xs text-gray-500 uppercase tracking-widest font-semibold",children:"Planned Structure"}),B.jsxs("div",{className:"space-y-2 pl-2 border-l border-gray-800 min-w-[280px]",children:[B.jsxs("div",{className:"flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-folder text-blue-500"})," /root"]}),B.jsxs("div",{className:"flex items-center gap-2 pl-4",children:[B.jsx("i",{className:"fas fa-folder text-yellow-500"})," apps/"]}),B.jsxs("div",{className:"flex items-center gap-2 pl-4",children:[B.jsx("i",{className:"fas fa-folder text-green-500"})," packages/"]}),B.jsxs("div",{className:"flex items-center gap-2 pl-8 text-gray-500",children:[B.jsx("i",{className:"fas fa-folder text-green-500/50"})," types/"]}),B.jsxs("div",{className:"flex items-center gap-2 pl-4 truncate",children:[B.jsx("i",{className:"fas fa-file-code text-purple-400 shrink-0"}),"turbo.json",B.jsx("span",{className:"text-[10px] text-blue-400 border border-blue-400/30 px-1 rounded ml-auto",children:"NEW"})]})]})]}),B.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center pt-2",children:[B.jsx("button",{onClick:x,className:"w-full sm:w-auto px-6 py-2.5 rounded-lg bg-blue-600 hover:bg-blue-500 text-white font-medium transition-colors shadow-lg shadow-blue-600/20",children:"Scaffold & Install"}),B.jsx("button",{onClick:W,className:"w-full sm:w-auto px-6 py-2.5 rounded-lg bg-white/5 hover:bg-white/10 text-gray-300 font-medium transition-colors border border-white/5",children:"Skip setup"})]})]}),$==="scaffolding"&&B.jsxs("div",{className:"flex flex-col items-center justify-center py-12 space-y-6 text-center",children:[B.jsxs("div",{className:"relative",children:[B.jsx("div",{className:"w-16 h-16 border-4 border-gray-700 rounded-full"}),B.jsx("div",{className:"absolute top-0 left-0 w-16 h-16 border-4 border-t-blue-500 border-r-transparent border-b-transparent border-l-transparent rounded-full animate-spin"})]}),B.jsxs("div",{children:[B.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"Setting things up"}),B.jsx("p",{className:"text-gray-400 animate-pulse",children:V})]})]}),$==="success"&&B.jsxs("div",{className:"flex flex-col items-center justify-center py-8 space-y-6 text-center",children:[B.jsx("div",{className:"w-20 h-20 bg-green-500/10 rounded-full flex items-center justify-center border border-green-500/20",children:B.jsx("i",{className:"fas fa-check text-4xl text-green-500"})}),B.jsxs("div",{className:"space-y-2",children:[B.jsx("h3",{className:"text-2xl font-bold text-white",children:"Ready to go!"}),B.jsx("p",{className:"text-gray-400 max-w-sm mx-auto",children:"Your workspace has been successfully initialized. You can now start building."})]}),B.jsx("button",{onClick:W,className:"px-8 py-3 rounded-lg bg-green-600 hover:bg-green-500 text-white font-medium transition-colors shadow-lg shadow-green-600/20 w-full sm:w-auto",children:"Enter Dashboard"})]})]})]})})}function Jv(){return B.jsxs("div",{className:"w-screen h-screen overflow-hidden",children:[B.jsx(Bp,{}),B.jsx("div",{className:"flex flex-1 overflow-hidden ",children:B.jsx("main",{className:"flex-1 relative overflow-hidden bg-gray-900",children:B.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[B.jsx("div",{className:"absolute top-0 left-1/4 w-[500px] h-[500px] bg-blue-500/5 rounded-full blur-3xl"}),B.jsx("div",{className:"absolute bottom-0 right-1/4 w-[500px] h-[500px] bg-purple-500/5 rounded-full blur-3xl"})]})})})]})}function e0(W){return W.isNotRendered||W.render!=null&&W.render==!1?null:B.jsx(t0,{...W})}function t0(W){const G=fs.blueIndigo,$=W.color&&fs[W.color]?fs[W.color]:W.color||G;return B.jsxs("button",{disabled:W.disabled,onClick:W.disabled?void 0:()=>W.onClick(),className:`
84
- group relative w-full rounded p-[1px] transition-all duration-300
85
- ${W.disabled?"opacity-70 cursor-not-allowed":"cursor-pointer hover:-translate-y-1 hover:shadow-lg"}
86
- `,children:[!W.disabled&&B.jsxs(B.Fragment,{children:[B.jsx("div",{className:`absolute inset-0 rounded bg-gradient-to-r ${$} opacity-0 group-hover:opacity-50 blur-lg transition-opacity duration-500`}),B.jsx("div",{className:`absolute inset-0 rounded bg-gradient-to-r ${$} opacity-0 group-hover:opacity-100 transition-opacity duration-300`})]}),B.jsxs("div",{className:`
87
- relative h-full w-full rounded bg-[#0A0A0A]/80 p-2 flex items-center gap-3 overflow-hidden
88
- transition-colors duration-300
89
- ${!W.disabled&&!W.bg?"group-hover:bg-[#212121]/70":""}
90
- `,children:[W.bg&&B.jsx("div",{className:`absolute inset-0 bg-gradient-to-r ${$} opacity-20`}),B.jsx("div",{className:`
91
- relative z-10
92
- w-9 h-9 rounded-lg flex items-center justify-center shrink-0
93
- bg-gradient-to-br ${$} text-white shadow-lg
94
- opacity-90 group-hover:opacity-100 group-hover:scale-110 transition-all duration-300
95
- `,children:B.jsx("i",{className:`fas ${W.icon||"fa-circle"} text-sm`})}),B.jsxs("div",{className:"relative z-10 flex flex-col min-w-0 text-left",children:[B.jsx("span",{className:`
96
- font-bold text-md truncate transition-colors duration-300
97
- ${W.disabled?"text-gray-500":W.bg?"text-white":"text-gray-300 group-hover:text-white"}
98
- `,children:W.name}),B.jsx("span",{className:`
99
- text-[12px] font-mono truncate block w-full transition-opacity duration-300
100
- ${W.disabled?"text-gray-600":W.bg?"text-white/70":"text-gray-500 group-hover:text-gray-400"}
101
- `,style:{lineHeight:1},children:W.description})]})]})]},W.name)}function i0({onClose:W}){return B.jsxs(er,{width:"900px",children:[B.jsx(Jn,{title:"CI/CD Tutorial with Vercel",description:"Mastering Continuous Integration & Deployment",icon:"fas fa-infinity",close:W}),B.jsxs("div",{className:"flex flex-col h-[70vh] overflow-hidden text-sm",children:[B.jsxs("div",{className:"flex-1 overflow-y-auto p-8 space-y-12 text-gray-300 custom-scrollbar",children:[B.jsxs("section",{id:"intro",className:"space-y-4",children:[B.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[B.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center shadow-lg shadow-blue-500/20",children:B.jsx("i",{className:"fas fa-infinity text-2xl text-white"})}),B.jsxs("div",{children:[B.jsx("h2",{className:"text-2xl font-bold text-white",children:"What is CI/CD?"}),B.jsx("p",{className:"text-blue-400 text-sm",children:"Continuous Integration & Continuous Delivery"})]})]}),B.jsx("div",{className:"bg-white/5 p-6 rounded-xl border border-white/10",children:B.jsxs("p",{className:"leading-relaxed",children:[B.jsx("strong",{className:"text-white",children:"CI (Continuous Integration)"})," is the practice of automating the integration of code changes from multiple contributors into a single software project.",B.jsx("br",{}),B.jsx("br",{}),B.jsx("strong",{className:"text-white",children:"CD (Continuous Delivery/Deployment)"})," ensures that your code is always in a deployable state and automatically releases it to production when ready."]})})]}),B.jsxs("section",{id:"why",className:"space-y-6",children:[B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-lightbulb text-yellow-500"}),"Why use CI/CD?"]}),B.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[{title:"Speed",desc:"Ship code faster with automated testing and building.",icon:"fa-rocket",color:"text-green-400"},{title:"Reliability",desc:"Catch bugs early before they reach production.",icon:"fa-shield-alt",color:"text-blue-400"},{title:"Efficiency",desc:"Stop wasting time on manual deployments.",icon:"fa-clock",color:"text-orange-400"},{title:"Consistency",desc:"Ensure every environment matches production.",icon:"fa-sync",color:"text-purple-400"}].map(G=>B.jsxs("div",{className:"p-4 rounded-xl bg-white/5 border border-white/10 hover:border-white/20 transition-colors",children:[B.jsx("i",{className:`fas ${G.icon} ${G.color} text-xl mb-3`}),B.jsx("h3",{className:"text-white font-bold mb-1",children:G.title}),B.jsx("p",{className:"text-sm text-gray-400",children:G.desc})]},G.title))})]}),B.jsxs("section",{id:"turbo-vercel",className:"space-y-6",children:[B.jsx("div",{className:"flex items-center justify-between border-b border-white/10 pb-4",children:B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-layer-group text-pink-500"}),"Turborepo + Vercel"]})}),B.jsxs("div",{className:"flex items-center gap-8 justify-center py-8",children:[B.jsxs("div",{className:"text-center",children:[B.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-[#1e1e1e] flex items-center justify-center border border-white/20 mb-3",children:B.jsx("i",{className:"fas fa-cube text-3xl text-transparent bg-clip-text bg-gradient-to-r from-red-500 to-orange-500"})}),B.jsx("span",{className:"font-bold text-white",children:"Turborepo"})]}),B.jsxs("div",{className:"flex flex-col items-center gap-1",children:[B.jsx("span",{className:"text-xs text-green-400 font-bold",children:"CACHE HIT!"}),B.jsx("div",{className:"h-[2px] w-24 bg-gradient-to-r from-red-500 to-white"}),B.jsx("i",{className:"fas fa-arrow-right text-white"})]}),B.jsxs("div",{className:"text-center",children:[B.jsx("div",{className:"w-16 h-16 mx-auto rounded-full bg-black flex items-center justify-center border border-white/20 mb-3",children:B.jsx("i",{className:"fas fa-triangle text-3xl text-white"})}),B.jsx("span",{className:"font-bold text-white",children:"Vercel"})]})]}),B.jsxs("p",{className:"bg-blue-500/10 border-l-4 border-blue-500 p-4 rounded text-sm",children:["Combining ",B.jsx("strong",{children:"Turborepo's"})," intelligent caching with ",B.jsx("strong",{children:"Vercel's"})," global edge network gives you the fastest build times and deployments possible. Vercel automatically understands your Turborepo structure."]})]}),B.jsxs("section",{id:"guide",className:"space-y-8",children:[B.jsxs("h2",{className:"text-xl font-bold text-white flex items-center gap-3",children:[B.jsx("i",{className:"fas fa-tasks text-green-500"}),"Step-by-Step Setup"]}),B.jsx("div",{className:"space-y-6",children:[{step:1,title:"Login with Vercel",desc:"Ensure you have a Vercel account and are logged in via the CLI or Dashboard to authorize deployments.",icon:"fa-sign-in-alt"},{step:2,title:"Connect to GitHub",desc:"Link your Monorepo to a GitHub repository. Vercel uses this to trigger automatic deployments on push.",icon:"fa-code-branch"},{step:3,title:"Add Projects in Vercel",desc:"In the Vercel Dashboard, import your repository. Vercel detects Turborepo and asks which workspace (app) you want to deploy. Add each app (e.g., 'web', 'docs') as a separate Vercel project linked to the same repo.",icon:"fa-plus-circle"},{step:4,title:"Deployment",desc:"Push to 'main' to deploy. Vercel will build only what has changed.",icon:"fa-cloud-upload-alt"}].map(G=>B.jsxs("div",{className:"flex gap-4",children:[B.jsx("div",{className:"flex-none w-8 h-8 rounded-full bg-white/10 flex items-center justify-center font-bold text-white border border-white/20",children:G.step}),B.jsxs("div",{className:"space-y-2",children:[B.jsxs("h3",{className:"text-white font-bold flex items-center gap-2",children:[G.title,B.jsx("i",{className:`fas ${G.icon} text-gray-500 text-sm`})]}),B.jsx("p",{className:"text-sm text-gray-400",children:G.desc})]})]},G.step))}),B.jsxs("div",{className:"mt-8 p-5 bg-gradient-to-r from-purple-900/30 to-blue-900/30 rounded-xl border border-purple-500/30",children:[B.jsxs("h3",{className:"text-lg font-bold text-white mb-2 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-magic text-purple-400"}),'Pro Tip: The "Turbo Build" Button']}),B.jsxs("p",{className:"text-sm text-gray-300",children:["When you use the ",B.jsx("span",{className:"px-2 py-0.5 rounded bg-white/10 text-white font-mono text-xs",children:"turbo build"})," command or button in this dashboard, it can be configured to upload your ",B.jsx("strong",{children:"pre-compiled dist/build artifacts"})," directly to Vercel's cache."]}),B.jsxs("div",{className:"mt-3 flex items-start gap-3 text-xs text-purple-200 bg-purple-500/10 p-3 rounded-lg",children:[B.jsx("i",{className:"fas fa-info-circle mt-0.5"}),B.jsxs("span",{children:["This means Vercel ",B.jsx("strong",{children:"doesn't have to rebuild"})," everything from scratch. It pulls the artifacts you just built locally (or in CI), saving massive amounts of build minutes and time!"]})]})]})]})]}),B.jsxs("div",{className:"p-4 border-t border-white/10 bg-black/40 flex justify-between items-center text-xs text-gray-500",children:[B.jsx("span",{children:"Learn more at:"}),B.jsxs("div",{className:"flex gap-4",children:[B.jsxs("a",{href:"https://vercel.com/docs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-white transition-colors",children:[B.jsx("i",{className:"fas fa-triangle text-white"})," Vercel Docs"]}),B.jsxs("a",{href:"https://turbo.build/repo/docs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-white transition-colors",children:[B.jsx("i",{className:"fas fa-cube text-red-500"})," Turborepo Docs"]})]})]})]})]})}const n0=[{label:"Install",cmd:"npm install",icon:"fa-download",color:"blueIndigo"},{label:"Build",cmd:"turbo build",icon:"fa-hammer",color:"emeraldTeal"},{label:"Lint",cmd:"turbo lint",icon:"fa-check-double",color:"yellowOrange"},{label:"Test",cmd:"turbo test",icon:"fa-vial",color:"pinkRose"},{label:"Clean",cmd:"turbo clean",icon:"fa-broom",color:"gray"},{label:"Summary",cmd:"turbo run build --dry-run",icon:"fa-list-alt"},{label:"Prune",cmd:"turbo prune",icon:"fa-scissors",color:"red"},{label:"Docker",cmd:"turbo prune --docker",icon:"fa-docker",color:"skyBlue"},{label:"Remote",cmd:"npx turbo link",icon:"fa-cloud",color:"cyanBlue"},{label:"Cache",cmd:"rm -rf node_modules/.cache/turbo .turbo",icon:"fa-trash-alt",color:"darkRed"}];function r0(W){const G=_e.useRef(null),$=Et.use.rootDir(),[D,V]=_e.useState(!1),[R,x]=_e.useState(!1);_e.useEffect(()=>()=>{G.current&&G.current.disconnect()},[]);const p=Xn.use.showModal(),c=Fe.use.workspace();function h(r){G.current&&(G.current.clear(),G.current.disconnect(),G.current.onClose(()=>{V(!1)}),G.current.onCrash(()=>{V(!1)}),V(!0),G.current.connect($,r),G.current.fit())}function a(r){if(r==="turbo prune"||r==="turbo prune --docker"){p("selection","Select Workspace","Choose a workspace to prune / dockerize",null,o=>{if(o){const s=r.includes("--docker"),l=`turbo prune ${o.info.name}${s?" --docker":""}`;h(l)}},c);return}h(r)}function i(){G.current&&(G.current.disconnect(),V(!1))}return B.jsxs("div",{className:`h-[92%] w-full p-4 gap-4 ${W.isVisible?"flex":"hidden"}`,children:[B.jsxs("div",{className:"w-[500px] flex-none h-full flex flex-col align-center",children:[B.jsxs("button",{onClick:()=>x(!0),className:"mb-6 text-sm w-full text-blue-200 flex items-center justify-center gap-2 transition-all group",children:[B.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-500/20 flex items-center justify-center group-hover:scale-110 transition-transform",children:B.jsx("i",{className:"fas fa-book-reader text-blue-400 text-sm"})}),"CI/CD Tutorial with Vercel"]}),B.jsx("div",{className:"grid grid-cols-2 gap-3",children:n0.map(r=>B.jsx(e0,{onClick:()=>a(r.cmd),name:r.label,description:r.cmd,color:r.color,icon:r.icon,disabled:D},r.label))})]}),B.jsx("div",{className:"relative flex-1 h-full min-h-0 min-w-0 flex flex-col p-[1px] rounded overflow-hidden shadow-[0_0_100px_-20px_rgba(168,85,247,0.3)]",children:B.jsxs("div",{className:"relative flex-1 h-full flex flex-col rounded-xl overflow-hidden",children:[B.jsxs("header",{className:"px-4 py-2 border-b border-white/10 flex justify-between items-center bg-black/20 flex-none backdrop-blur-sm",children:[B.jsxs("div",{className:"text-md font-bold text-white flex items-center gap-4",children:[B.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-red-500 to-orange-600 flex items-center justify-center shadow-lg shadow-orange-500/20",children:B.jsx("i",{className:"fas fa-rocket text-white text-sm"})}),B.jsxs("div",{className:"flex flex-col",children:[B.jsx("span",{className:"text-xl bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-400 font-bold",children:"Non Interactive Terminal"}),B.jsxs("span",{className:"text-gray-400 font-normal text-sm truncate w-full text-xs",children:["Execute",B.jsx("a",{href:"https://turborepo.org/",target:"_blank",rel:"noopener noreferrer",className:"p-1 text-blue-500 hover:underline",children:"Turborepo.js"}),"commands"]})]})]}),B.jsxs("button",{onClick:i,className:`text-gray-400 transition-colors flex items-center gap-2 ${D?"text-red-500":"text-gray-400"}`,children:[B.jsx("li",{className:"fas fa-stop text-lg"}),"STOP"]})]}),B.jsx("div",{className:"w-full flex-1 min-h-0 p-1",children:B.jsx(ho,{ref:G,isInteractive:!0,className:"h-full w-full",socketUrl:Ke.serverPath,onExit:()=>{V(!1)},onCrash:()=>{V(!1)}})})]})}),R&&B.jsx(i0,{onClose:()=>x(!1)})]})}const s0=qn()((W,G)=>({noData:!0,crudData:[],currentCategoryIndex:-1,currentCrudIndex:-1,useDevURL:!0,devURL:"",prodURL:"",params:"",method:"GET",requestStartTime:0,isFetching:!1,executionTime:0,header:`{
102
- "Content-Type": "application/json",
103
- "Accept": "application/json",
104
- "Authorization": "Bearer token",
105
- "x-refresh-token": "refresh-token",
106
- "X-CSRF-Token": "csrf-token-placeholder",
107
- "Cache-Control": "no-cache"
108
- }
109
- `,body:`{
110
- "key": "value"
111
- }
112
- `,output:`{
113
- "key": "value"
114
- }
115
- `,expectedOutput:`Contains what to expect from the response
116
- example:
117
- {
118
- "key": "value"
119
- }
120
- `,setHeader:$=>W({header:$}),setBody:$=>W({body:$}),setOutput:$=>W({output:$}),setExpectedOutput:$=>W({expectedOutput:$}),setUseDevURL:$=>W({useDevURL:$}),setParams:$=>W({params:$}),setMethod:$=>W({method:$}),setCurrentCategoryIndex:$=>W({currentCategoryIndex:$}),setCurrentCrudIndex:$=>W({currentCrudIndex:$}),setCrudData:async $=>{try{await fetch(`${Ke.serverPath}${st.crudTest}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({crudtest:$})})}catch(D){console.log(D)}W({crudData:$})},loadCrudData:async()=>{try{const $=await fetch(`${Ke.serverPath}${st.crudTest}`);if(!$.ok){W({noData:!0});return}const D=await $.json();W({crudData:D.crudtest,noData:!1})}catch{W({noData:!0})}},sendRequest:async()=>{const{useDevURL:$,params:D,method:V,crudData:R,currentCategoryIndex:x,currentCrudIndex:p}=G(),c=D?D.startsWith("?")?D:`?${D}`:"",h=encodeURI(c),i=`${$?R[x].devurl:R[x].produrl}${R[x].items[p].route}${h}`,r=Date.now();if(W({isFetching:!0,requestStartTime:r,executionTime:0}),V==="STREAM"){try{W({output:""});const o=await fetch(i,{method:"GET",headers:JSON.parse(G().header)});if(!o.body){W({isFetching:!1,executionTime:Date.now()-r});return}const s=o.body.getReader(),l=new TextDecoder("utf-8");for(;;){const{done:n,value:d}=await s.read();if(n)break;const f=l.decode(d,{stream:!0});W(y=>({output:y.output+f}))}W({isFetching:!1,executionTime:Date.now()-r})}catch(o){let s="";try{s=o.toString()}catch(l){s="Error: "+l}W({output:s,isFetching:!1,executionTime:Date.now()-r})}return}try{const o={method:V,headers:JSON.parse(G().header)};V!=="GET"&&(o.body=G().body);const l=await(await fetch(i,o)).text();W({output:l,isFetching:!1,executionTime:Date.now()-r})}catch(o){let s="";try{s=o.toString()}catch(l){s="Error: "+l}W({output:s,isFetching:!1,executionTime:Date.now()-r})}}})),ke=Zn(s0);var Gn={},Kn={},qc={exports:{}},dp;function Da(){return dp||(dp=1,(function(W,G){(function(){var $="ace",D=(function(){return this})();!D&&typeof window<"u"&&(D=window);var V=function(a,i,r){if(typeof a!="string"){V.original?V.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=i),V.modules[a]||(V.payloads[a]=r,V.modules[a]=null)};V.modules={},V.payloads={};var R=function(a,i,r){if(typeof i=="string"){var o=c(a,i);if(o!=null)return r&&r(),o}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var s=[],l=0,n=i.length;l<n;++l){var d=c(a,i[l]);if(d==null&&x.original)return;s.push(d)}return r&&r.apply(null,s)||!0}},x=function(a,i){var r=R("",a,i);return r==null&&x.original?x.original.apply(this,arguments):r},p=function(a,i){if(i.indexOf("!")!==-1){var r=i.split("!");return p(a,r[0])+"!"+p(a,r[1])}if(i.charAt(0)=="."){var o=a.split("/").slice(0,-1).join("/");for(i=o+"/"+i;i.indexOf(".")!==-1&&s!=i;){var s=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},c=function(a,i){i=p(a,i);var r=V.modules[i];if(!r){if(r=V.payloads[i],typeof r=="function"){var o={},s={id:i,uri:"",exports:o,packaged:!0},l=function(d,f){return R(i,d,f)},n=r(l,o,s);o=n||s.exports,V.modules[i]=o,delete V.payloads[i]}r=V.modules[i]=o||r}return r};function h(a){var i=D;D[a]||(D[a]={}),i=D[a],(!i.define||!i.define.packaged)&&(V.original=i.define,i.define=V,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(x.original=i.require,i.require=x,i.require.packaged=!0)}h($)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function($,D,V){function R(x,p,c){Object.defineProperty(x,p,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||R(String.prototype,"startsWith",function(x,p){return p=p||0,this.lastIndexOf(x,p)===p}),String.prototype.endsWith||R(String.prototype,"endsWith",function(x,p){var c=this;(p===void 0||p>c.length)&&(p=c.length),p-=x.length;var h=c.indexOf(x,p);return h!==-1&&h===p}),String.prototype.repeat||R(String.prototype,"repeat",function(x){for(var p="",c=this;x>0;)x&1&&(p+=c),(x>>=1)&&(c+=c);return p}),String.prototype.includes||R(String.prototype,"includes",function(x,p){return this.indexOf(x,p)!=-1}),Object.assign||(Object.assign=function(x){if(x==null)throw new TypeError("Cannot convert undefined or null to object");for(var p=Object(x),c=1;c<arguments.length;c++){var h=arguments[c];h!=null&&Object.keys(h).forEach(function(a){p[a]=h[a]})}return p}),Object.values||(Object.values=function(x){return Object.keys(x).map(function(p){return x[p]})}),Array.prototype.find||R(Array.prototype,"find",function(x){for(var p=this.length,c=arguments[1],h=0;h<p;h++){var a=this[h];if(x.call(c,a,h,this))return a}}),Array.prototype.findIndex||R(Array.prototype,"findIndex",function(x){for(var p=this.length,c=arguments[1],h=0;h<p;h++){var a=this[h];if(x.call(c,a,h,this))return h}}),Array.prototype.includes||R(Array.prototype,"includes",function(x,p){return this.indexOf(x,p)!=-1}),Array.prototype.fill||R(Array.prototype,"fill",function(x){for(var p=this,c=p.length>>>0,h=arguments[1],a=h>>0,i=a<0?Math.max(c+a,0):Math.min(a,c),r=arguments[2],o=r===void 0?c:r>>0,s=o<0?Math.max(c+o,0):Math.min(o,c);i<s;)p[i]=x,i++;return p}),Array.of||R(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function($,D,V){$("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function($,D,V){D.deepCopy=function R(x){if(typeof x!="object"||!x)return x;var p;if(Array.isArray(x)){p=[];for(var c=0;c<x.length;c++)p[c]=R(x[c]);return p}if(Object.prototype.toString.call(x)!=="[object Object]")return x;p={};for(var c in x)p[c]=R(x[c]);return p}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function($,D,V){D.last=function(p){return p[p.length-1]},D.stringReverse=function(p){return p.split("").reverse().join("")},D.stringRepeat=function(p,c){for(var h="";c>0;)c&1&&(h+=p),(c>>=1)&&(p+=p);return h};var R=/^\s\s*/,x=/\s\s*$/;D.stringTrimLeft=function(p){return p.replace(R,"")},D.stringTrimRight=function(p){return p.replace(x,"")},D.copyObject=function(p){var c={};for(var h in p)c[h]=p[h];return c},D.copyArray=function(p){for(var c=[],h=0,a=p.length;h<a;h++)p[h]&&typeof p[h]=="object"?c[h]=this.copyObject(p[h]):c[h]=p[h];return c},D.deepCopy=$("./deep_copy").deepCopy,D.arrayToMap=function(p){for(var c={},h=0;h<p.length;h++)c[p[h]]=1;return c},D.createMap=function(p){var c=Object.create(null);for(var h in p)c[h]=p[h];return c},D.arrayRemove=function(p,c){for(var h=0;h<=p.length;h++)c===p[h]&&p.splice(h,1)},D.escapeRegExp=function(p){return p.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},D.escapeHTML=function(p){return(""+p).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},D.getMatchOffsets=function(p,c){var h=[];return p.replace(c,function(a){h.push({offset:arguments[arguments.length-2],length:a.length})}),h},D.deferredCall=function(p){var c=null,h=function(){c=null,p()},a=function(i){return a.cancel(),c=setTimeout(h,i||0),a};return a.schedule=a,a.call=function(){return this.cancel(),p(),a},a.cancel=function(){return clearTimeout(c),c=null,a},a.isPending=function(){return c},a},D.delayedCall=function(p,c){var h=null,a=function(){h=null,p()},i=function(r){h==null&&(h=setTimeout(a,r||c))};return i.delay=function(r){h&&clearTimeout(h),h=setTimeout(a,r||c)},i.schedule=i,i.call=function(){this.cancel(),p()},i.cancel=function(){h&&clearTimeout(h),h=null},i.isPending=function(){return h},i},D.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},D.skipEmptyMatch=function(p,c,h){return h&&p.codePointAt(c)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function($,D,V){D.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},D.getOS=function(){return D.isMac?D.OS.MAC:D.isLinux?D.OS.LINUX:D.OS.WINDOWS};var R=typeof navigator=="object"?navigator:{},x=(/mac|win|linux/i.exec(R.platform)||["other"])[0].toLowerCase(),p=R.userAgent||"",c=R.appName||"";D.isWin=x=="win",D.isMac=x=="mac",D.isLinux=x=="linux",D.isIE=c=="Microsoft Internet Explorer"||c.indexOf("MSAppHost")>=0?parseFloat((p.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((p.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),D.isOldIE=D.isIE&&D.isIE<9,D.isGecko=D.isMozilla=p.match(/ Gecko\/\d+/),D.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",D.isWebKit=parseFloat(p.split("WebKit/")[1])||void 0,D.isChrome=parseFloat(p.split(" Chrome/")[1])||void 0,D.isSafari=parseFloat(p.split(" Safari/")[1])&&!D.isChrome||void 0,D.isEdge=parseFloat(p.split(" Edge/")[1])||void 0,D.isAIR=p.indexOf("AdobeAIR")>=0,D.isAndroid=p.indexOf("Android")>=0,D.isChromeOS=p.indexOf(" CrOS ")>=0,D.isIOS=/iPad|iPhone|iPod/.test(p)&&!window.MSStream,D.isIOS&&(D.isMac=!0),D.isMobile=D.isIOS||D.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function($,D,V){var R=$("./useragent"),x="http://www.w3.org/1999/xhtml";D.buildDom=function r(o,s,l){if(typeof o=="string"&&o){var n=document.createTextNode(o);return s&&s.appendChild(n),n}if(!Array.isArray(o))return o&&o.appendChild&&s&&s.appendChild(o),o;if(typeof o[0]!="string"||!o[0]){for(var d=[],f=0;f<o.length;f++){var y=r(o[f],s,l);y&&d.push(y)}return d}var _=document.createElement(o[0]),v=o[1],g=1;v&&typeof v=="object"&&!Array.isArray(v)&&(g=2);for(var f=g;f<o.length;f++)r(o[f],_,l);return g==2&&Object.keys(v).forEach(function(w){var b=v[w];w==="class"?_.className=Array.isArray(b)?b.join(" "):b:typeof b=="function"||w=="value"||w[0]=="$"?_[w]=b:w==="ref"?l&&(l[b]=_):w==="style"?typeof b=="string"&&(_.style.cssText=b):b!=null&&_.setAttribute(w,b)}),s&&s.appendChild(_),_},D.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},D.createElement=function(r,o){return document.createElementNS?document.createElementNS(o||x,r):document.createElement(r)},D.removeChildren=function(r){r.innerHTML=""},D.createTextNode=function(r,o){var s=o?o.ownerDocument:document;return s.createTextNode(r)},D.createFragment=function(r){var o=r?r.ownerDocument:document;return o.createDocumentFragment()},D.hasCssClass=function(r,o){var s=(r.className+"").split(/\s+/g);return s.indexOf(o)!==-1},D.addCssClass=function(r,o){D.hasCssClass(r,o)||(r.className+=" "+o)},D.removeCssClass=function(r,o){for(var s=r.className.split(/\s+/g);;){var l=s.indexOf(o);if(l==-1)break;s.splice(l,1)}r.className=s.join(" ")},D.toggleCssClass=function(r,o){for(var s=r.className.split(/\s+/g),l=!0;;){var n=s.indexOf(o);if(n==-1)break;l=!1,s.splice(n,1)}return l&&s.push(o),r.className=s.join(" "),l},D.setCssClass=function(r,o,s){s?D.addCssClass(r,o):D.removeCssClass(r,o)},D.hasCssString=function(r,o){var s=0,l;if(o=o||document,l=o.querySelectorAll("style")){for(;s<l.length;)if(l[s++].id===r)return!0}},D.removeElementById=function(r,o){o=o||document,o.getElementById(r)&&o.getElementById(r).remove()};var p,c=[];D.useStrictCSP=function(r){p=r,r==!1?h():c||(c=[])};function h(){var r=c;c=null,r&&r.forEach(function(o){a(o[0],o[1])})}function a(r,o,s){if(!(typeof document>"u")){if(c){if(s)h();else if(s===!1)return c.push([r,o])}if(!p){var l=s;!s||!s.getRootNode?l=document:(l=s.getRootNode(),(!l||l==s)&&(l=document));var n=l.ownerDocument||l;if(o&&D.hasCssString(o,l))return null;o&&(r+=`
121
- /*# sourceURL=ace/css/`+o+" */");var d=D.createElement("style");d.appendChild(n.createTextNode(r)),o&&(d.id=o),l==n&&(l=D.getDocumentHead(n)),l.insertBefore(d,l.firstChild)}}}if(D.importCssString=a,D.importCssStylsheet=function(r,o){D.buildDom(["link",{rel:"stylesheet",href:r}],D.getDocumentHead(o))},D.$fixPositionBug=function(r){var o=r.getBoundingClientRect();if(r.style.left){var s=parseFloat(r.style.left),l=+o.left;Math.abs(s-l)>1&&(r.style.left=2*s-l+"px")}if(r.style.right){var s=parseFloat(r.style.right),l=window.innerWidth-o.right;Math.abs(s-l)>1&&(r.style.right=2*s-l+"px")}if(r.style.top){var s=parseFloat(r.style.top),l=+o.top;Math.abs(s-l)>1&&(r.style.top=2*s-l+"px")}if(r.style.bottom){var s=parseFloat(r.style.bottom),l=window.innerHeight-o.bottom;Math.abs(s-l)>1&&(r.style.bottom=2*s-l+"px")}},D.scrollbarWidth=function(r){var o=D.createElement("ace_inner");o.style.width="100%",o.style.minWidth="0px",o.style.height="200px",o.style.display="block";var s=D.createElement("ace_outer"),l=s.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",s.appendChild(o);var n=r&&r.documentElement||document&&document.documentElement;if(!n)return 0;n.appendChild(s);var d=o.offsetWidth;l.overflow="scroll";var f=o.offsetWidth;return d===f&&(f=s.clientWidth),n.removeChild(s),d-f},D.computedStyle=function(r,o){return window.getComputedStyle(r,"")||{}},D.setStyle=function(r,o,s){r[o]!==s&&(r[o]=s)},D.HAS_CSS_ANIMATION=!1,D.HAS_CSS_TRANSFORMS=!1,D.HI_DPI=R.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,R.isChromeOS&&(D.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");D.HI_DPI&&i.style.transform!==void 0&&(D.HAS_CSS_TRANSFORMS=!0),!R.isEdge&&typeof i.style.animationName<"u"&&(D.HAS_CSS_ANIMATION=!0),i=null}D.HAS_CSS_TRANSFORMS?D.translate=function(r,o,s){r.style.transform="translate("+Math.round(o)+"px, "+Math.round(s)+"px)"}:D.translate=function(r,o,s){r.style.top=Math.round(s)+"px",r.style.left=Math.round(o)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function($,D,V){var R=$("./dom");D.get=function(x,p){var c=new XMLHttpRequest;c.open("GET",x,!0),c.onreadystatechange=function(){c.readyState===4&&p(c.responseText)},c.send(null)},D.loadScript=function(x,p){var c=R.getDocumentHead(),h=document.createElement("script");h.src=x,c.appendChild(h),h.onload=h.onreadystatechange=function(a,i){(i||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,i||p())}},D.qualifyURL=function(x){var p=document.createElement("a");return p.href=x,p.href}}),ace.define("ace/lib/oop",["require","exports","module"],function($,D,V){D.inherits=function(R,x){R.super_=x,R.prototype=Object.create(x.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}})},D.mixin=function(R,x){for(var p in x)R[p]=x[p];return R},D.implement=function(R,x){D.mixin(R,x)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function($,D,V){var R={},x=function(){this.propagationStopped=!0},p=function(){this.defaultPrevented=!0};R._emit=R._dispatchEvent=function(c,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[c]||[],i=this._defaultHandlers[c];if(!(!a.length&&!i)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=c),h.stopPropagation||(h.stopPropagation=x),h.preventDefault||(h.preventDefault=p),a=a.slice();for(var r=0;r<a.length&&(a[r](h,this),!h.propagationStopped);r++);if(i&&!h.defaultPrevented)return i(h,this)}},R._signal=function(c,h){var a=(this._eventRegistry||{})[c];if(a){a=a.slice();for(var i=0;i<a.length;i++)a[i](h,this)}},R.once=function(c,h){var a=this;if(this.on(c,function i(){a.off(c,i),h.apply(null,arguments)}),!h)return new Promise(function(i){h=i})},R.setDefaultHandler=function(c,h){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[c]){var i=a[c],r=a._disabled_[c];r||(a._disabled_[c]=r=[]),r.push(i);var o=r.indexOf(h);o!=-1&&r.splice(o,1)}a[c]=h},R.removeDefaultHandler=function(c,h){var a=this._defaultHandlers;if(a){var i=a._disabled_[c];if(a[c]==h)i&&this.setDefaultHandler(c,i.pop());else if(i){var r=i.indexOf(h);r!=-1&&i.splice(r,1)}}},R.on=R.addEventListener=function(c,h,a){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[c];return i||(i=this._eventRegistry[c]=[]),i.indexOf(h)==-1&&i[a?"unshift":"push"](h),h},R.off=R.removeListener=R.removeEventListener=function(c,h){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[c];if(a){var i=a.indexOf(h);i!==-1&&a.splice(i,1)}},R.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},D.EventEmitter=R}),ace.define("ace/lib/report_error",["require","exports","module"],function($,D,V){D.reportError=function(x,p){var c=new Error(x);c.data=p,typeof console=="object"&&console.error&&console.error(c),setTimeout(function(){throw c})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function($,D,V){var R={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};D.defaultEnglishMessages=R}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function($,D,V){"no use strict";var R=$("./oop"),x=$("./event_emitter").EventEmitter,p=$("./report_error").reportError,c=$("./default_english_messages").defaultEnglishMessages,h={setOptions:function(s){Object.keys(s).forEach(function(l){this.setOption(l,s[l])},this)},getOptions:function(s){var l={};if(s)Array.isArray(s)||(s=Object.keys(s));else{var n=this.$options;s=Object.keys(n).filter(function(d){return!n[d].hidden})}return s.forEach(function(d){l[d]=this.getOption(d)},this),l},setOption:function(s,l){if(this["$"+s]!==l){var n=this.$options[s];if(!n)return a('misspelled option "'+s+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(s,l);n.handlesSet||(this["$"+s]=l),n&&n.set&&n.set.call(this,l)}},getOption:function(s){var l=this.$options[s];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(s):l&&l.get?l.get.call(this):this["$"+s]:a('misspelled option "'+s+'"')}};function a(s){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var i,r,o=(function(){function s(){this.$defaultOptions={},i=c,r="dollarSigns"}return s.prototype.defineOptions=function(l,n,d){return l.$options||(this.$defaultOptions[n]=l.$options={}),Object.keys(d).forEach(function(f){var y=d[f];typeof y=="string"&&(y={forwardTo:y}),y.name||(y.name=f),l.$options[y.name]=y,"initialValue"in y&&(l["$"+y.name]=y.initialValue)}),R.implement(l,h),this},s.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(n){var d=l.$options[n];"value"in d&&l.setOption(n,d.value)})},s.prototype.setDefaultValue=function(l,n,d){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][n])break;if(!this.$defaultOptions[l][n])return!1}var f=this.$defaultOptions[l]||(this.$defaultOptions[l]={});f[n]&&(f.forwardTo?this.setDefaultValue(f.forwardTo,n,d):f[n].value=d)},s.prototype.setDefaultValues=function(l,n){Object.keys(n).forEach(function(d){this.setDefaultValue(l,d,n[d])},this)},s.prototype.setMessages=function(l,n){i=l,n&&n.placeholders&&(r=n.placeholders)},s.prototype.nls=function(l,n,d){i[l]||(a("No message found for the key '"+l+"' in messages with id "+i.$id+", trying to find a translation for the default string '"+n+"'."),i[n]||a("No message found for the default string '"+n+"' in the provided messages. Falling back to the default English message."));var f=i[l]||i[n]||n;return d&&(r==="dollarSigns"&&(f=f.replace(/\$(\$|[\d]+)/g,function(y,_){return _=="$"?"$":d[_]})),r==="curlyBrackets"&&(f=f.replace(/\{([^\}]+)\}/g,function(y,_){return d[_]}))),f},s})();o.prototype.warn=a,o.prototype.reportError=p,R.implement(o.prototype,x),D.AppConfig=o}),ace.define("ace/theme/textmate-css",["require","exports","module"],function($,D,V){V.exports=`.ace-tm .ace_gutter {
122
- background: #f0f0f0;
123
- color: #333;
124
- }
125
-
126
- .ace-tm .ace_print-margin {
127
- width: 1px;
128
- background: #e8e8e8;
129
- }
130
-
131
- .ace-tm .ace_fold {
132
- background-color: #6B72E6;
133
- }
134
-
135
- .ace-tm {
136
- background-color: #FFFFFF;
137
- color: black;
138
- }
139
-
140
- .ace-tm .ace_cursor {
141
- color: black;
142
- }
143
-
144
- .ace-tm .ace_invisible {
145
- color: rgb(191, 191, 191);
146
- }
147
-
148
- .ace-tm .ace_storage,
149
- .ace-tm .ace_keyword {
150
- color: blue;
151
- }
152
-
153
- .ace-tm .ace_constant {
154
- color: rgb(197, 6, 11);
155
- }
156
-
157
- .ace-tm .ace_constant.ace_buildin {
158
- color: rgb(88, 72, 246);
159
- }
160
-
161
- .ace-tm .ace_constant.ace_language {
162
- color: rgb(88, 92, 246);
163
- }
164
-
165
- .ace-tm .ace_constant.ace_library {
166
- color: rgb(6, 150, 14);
167
- }
168
-
169
- .ace-tm .ace_invalid {
170
- background-color: rgba(255, 0, 0, 0.1);
171
- color: red;
172
- }
173
-
174
- .ace-tm .ace_support.ace_function {
175
- color: rgb(60, 76, 114);
176
- }
177
-
178
- .ace-tm .ace_support.ace_constant {
179
- color: rgb(6, 150, 14);
180
- }
181
-
182
- .ace-tm .ace_support.ace_type,
183
- .ace-tm .ace_support.ace_class {
184
- color: rgb(109, 121, 222);
185
- }
186
-
187
- .ace-tm .ace_keyword.ace_operator {
188
- color: rgb(104, 118, 135);
189
- }
190
-
191
- .ace-tm .ace_string {
192
- color: rgb(3, 106, 7);
193
- }
194
-
195
- .ace-tm .ace_comment {
196
- color: rgb(76, 136, 107);
197
- }
198
-
199
- .ace-tm .ace_comment.ace_doc {
200
- color: rgb(0, 102, 255);
201
- }
202
-
203
- .ace-tm .ace_comment.ace_doc.ace_tag {
204
- color: rgb(128, 159, 191);
205
- }
206
-
207
- .ace-tm .ace_constant.ace_numeric {
208
- color: rgb(0, 0, 205);
209
- }
210
-
211
- .ace-tm .ace_variable {
212
- color: rgb(49, 132, 149);
213
- }
214
-
215
- .ace-tm .ace_xml-pe {
216
- color: rgb(104, 104, 91);
217
- }
218
-
219
- .ace-tm .ace_entity.ace_name.ace_function {
220
- color: #0000A2;
221
- }
222
-
223
-
224
- .ace-tm .ace_heading {
225
- color: rgb(12, 7, 255);
226
- }
227
-
228
- .ace-tm .ace_list {
229
- color:rgb(185, 6, 144);
230
- }
231
-
232
- .ace-tm .ace_meta.ace_tag {
233
- color:rgb(0, 22, 142);
234
- }
235
-
236
- .ace-tm .ace_string.ace_regex {
237
- color: rgb(255, 0, 0)
238
- }
239
-
240
- .ace-tm .ace_marker-layer .ace_selection {
241
- background: rgb(181, 213, 255);
242
- }
243
- .ace-tm.ace_multiselect .ace_selection.ace_start {
244
- box-shadow: 0 0 3px 0px white;
245
- }
246
- .ace-tm .ace_marker-layer .ace_step {
247
- background: rgb(252, 255, 0);
248
- }
249
-
250
- .ace-tm .ace_marker-layer .ace_stack {
251
- background: rgb(164, 229, 101);
252
- }
253
-
254
- .ace-tm .ace_marker-layer .ace_bracket {
255
- margin: -1px 0 0 -1px;
256
- border: 1px solid rgb(192, 192, 192);
257
- }
258
-
259
- .ace-tm .ace_marker-layer .ace_active-line {
260
- background: rgba(0, 0, 0, 0.07);
261
- }
262
-
263
- .ace-tm .ace_gutter-active-line {
264
- background-color : #dcdcdc;
265
- }
266
-
267
- .ace-tm .ace_marker-layer .ace_selected-word {
268
- background: rgb(250, 250, 255);
269
- border: 1px solid rgb(200, 200, 250);
270
- }
271
-
272
- .ace-tm .ace_indent-guide {
273
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
274
- }
275
-
276
- .ace-tm .ace_indent-guide-active {
277
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
278
- }
279
- `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function($,D,V){D.isDark=!1,D.cssClass="ace-tm",D.cssText=$("./textmate-css"),D.$id="ace/theme/textmate";var R=$("../lib/dom");R.importCssString(D.cssText,D.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function($,D,V){"no use strict";var R=$("./lib/lang"),x=$("./lib/net"),p=$("./lib/dom"),c=$("./lib/app_config").AppConfig;V.exports=D=new c;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};D.get=function(o){if(!h.hasOwnProperty(o))throw new Error("Unknown config key: "+o);return h[o]},D.set=function(o,s){if(h.hasOwnProperty(o))h[o]=s;else if(this.setDefaultValue("",o,s)==!1)throw new Error("Unknown config key: "+o);o=="useStrictCSP"&&p.useStrictCSP(s)},D.all=function(){return R.copyObject(h)},D.$modes={},D.moduleUrl=function(o,s){if(h.$moduleUrls[o])return h.$moduleUrls[o];var l=o.split("/");s=s||l[l.length-2]||"";var n=s=="snippets"?"/":"-",d=l[l.length-1];if(s=="worker"&&n=="-"){var f=new RegExp("^"+s+"[\\-_]|[\\-_]"+s+"$","g");d=d.replace(f,"")}(!d||d==s)&&l.length>1&&(d=l[l.length-2]);var y=h[s+"Path"];return y==null?y=h.basePath:n=="/"&&(s=n=""),y&&y.slice(-1)!="/"&&(y+="/"),y+s+n+d+this.get("suffix")},D.setModuleUrl=function(o,s){return h.$moduleUrls[o]=s};var a=function(o,s){if(o==="ace/theme/textmate"||o==="./theme/textmate")return s(null,$("./theme/textmate"));if(i)return i(o,s);console.error("loader is not configured")},i;D.setLoader=function(o){i=o},D.dynamicModules=Object.create(null),D.$loading={},D.$loaded={},D.loadModule=function(o,s){var l;if(Array.isArray(o))var n=o[0],d=o[1];else if(typeof o=="string")var d=o;var f=function(y){if(y&&!D.$loading[d])return s&&s(y);if(D.$loading[d]||(D.$loading[d]=[]),D.$loading[d].push(s),!(D.$loading[d].length>1)){var _=function(){a(d,function(v,g){g&&(D.$loaded[d]=g),D._emit("load.module",{name:d,module:g});var w=D.$loading[d];D.$loading[d]=null,w.forEach(function(b){b&&b(g)})})};if(!D.get("packaged"))return _();x.loadScript(D.moduleUrl(d,n),_),r()}};if(D.dynamicModules[d])D.dynamicModules[d]().then(function(y){y.default?f(y.default):f(y)});else{try{l=this.$require(d)}catch{}f(l||D.$loaded[d])}},D.$require=function(o){if(typeof V.require=="function"){var s="require";return V[s](o)}},D.setModuleLoader=function(o,s){D.dynamicModules[o]=s};var r=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})};D.version="1.43.5"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function($,D,V){$("./lib/fixoldbrowsers");var R=$("./config");R.setLoader(function(h,a){$([h],function(i){a(null,i)})});var x=(function(){return this||typeof window<"u"&&window})();V.exports=function(h){R.init=p,R.$require=$,h.require=$},p(!0);function p(h){if(!(!x||!x.document)){R.set("packaged",h||$.packaged||V.packaged||x.define&&(void 0).packaged);var a={},i="",r=document.currentScript||document._currentScript,o=r&&r.ownerDocument||document;r&&r.src&&(i=r.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=o.getElementsByTagName("script"),l=0;l<s.length;l++){var n=s[l],d=n.src||n.getAttribute("src");if(d){for(var f=n.attributes,y=0,_=f.length;y<_;y++){var v=f[y];v.name.indexOf("data-ace-")===0&&(a[c(v.name.replace(/^data-ace-/,""))]=v.value)}var g=d.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);g&&(i=g[1])}}i&&(a.base=a.base||i,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var w in a)typeof a[w]<"u"&&R.set(w,a[w])}}function c(h){return h.replace(/-(.)/g,function(a,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function($,D,V){var R=(function(){function x(p,c,h,a){this.start={row:p,column:c},this.end={row:h,column:a}}return x.prototype.isEqual=function(p){return this.start.row===p.start.row&&this.end.row===p.end.row&&this.start.column===p.start.column&&this.end.column===p.end.column},x.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},x.prototype.contains=function(p,c){return this.compare(p,c)==0},x.prototype.compareRange=function(p){var c,h=p.end,a=p.start;return c=this.compare(h.row,h.column),c==1?(c=this.compare(a.row,a.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(a.row,a.column),c==-1?-1:c==1?42:0)},x.prototype.comparePoint=function(p){return this.compare(p.row,p.column)},x.prototype.containsRange=function(p){return this.comparePoint(p.start)==0&&this.comparePoint(p.end)==0},x.prototype.intersects=function(p){var c=this.compareRange(p);return c==-1||c==0||c==1},x.prototype.isEnd=function(p,c){return this.end.row==p&&this.end.column==c},x.prototype.isStart=function(p,c){return this.start.row==p&&this.start.column==c},x.prototype.setStart=function(p,c){typeof p=="object"?(this.start.column=p.column,this.start.row=p.row):(this.start.row=p,this.start.column=c)},x.prototype.setEnd=function(p,c){typeof p=="object"?(this.end.column=p.column,this.end.row=p.row):(this.end.row=p,this.end.column=c)},x.prototype.inside=function(p,c){return this.compare(p,c)==0?!(this.isEnd(p,c)||this.isStart(p,c)):!1},x.prototype.insideStart=function(p,c){return this.compare(p,c)==0?!this.isEnd(p,c):!1},x.prototype.insideEnd=function(p,c){return this.compare(p,c)==0?!this.isStart(p,c):!1},x.prototype.compare=function(p,c){return!this.isMultiLine()&&p===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:p<this.start.row?-1:p>this.end.row?1:this.start.row===p?c>=this.start.column?0:-1:this.end.row===p?c<=this.end.column?0:1:0},x.prototype.compareStart=function(p,c){return this.start.row==p&&this.start.column==c?-1:this.compare(p,c)},x.prototype.compareEnd=function(p,c){return this.end.row==p&&this.end.column==c?1:this.compare(p,c)},x.prototype.compareInside=function(p,c){return this.end.row==p&&this.end.column==c?1:this.start.row==p&&this.start.column==c?-1:this.compare(p,c)},x.prototype.clipRows=function(p,c){if(this.end.row>c)var h={row:c+1,column:0};else if(this.end.row<p)var h={row:p,column:0};if(this.start.row>c)var a={row:c+1,column:0};else if(this.start.row<p)var a={row:p,column:0};return x.fromPoints(a||this.start,h||this.end)},x.prototype.extend=function(p,c){var h=this.compare(p,c);if(h==0)return this;if(h==-1)var a={row:p,column:c};else var i={row:p,column:c};return x.fromPoints(a||this.start,i||this.end)},x.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},x.prototype.isMultiLine=function(){return this.start.row!==this.end.row},x.prototype.clone=function(){return x.fromPoints(this.start,this.end)},x.prototype.collapseRows=function(){return this.end.column==0?new x(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new x(this.start.row,0,this.end.row,0)},x.prototype.toScreenRange=function(p){var c=p.documentToScreenPosition(this.start),h=p.documentToScreenPosition(this.end);return new x(c.row,c.column,h.row,h.column)},x.prototype.moveBy=function(p,c){this.start.row+=p,this.start.column+=c,this.end.row+=p,this.end.column+=c},x})();R.fromPoints=function(x,p){return new R(x.row,x.column,p.row,p.column)},R.comparePoints=function(x,p){return x.row-p.row||x.column-p.column},D.Range=R}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function($,D,V){for(var R=$("./oop"),x={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},p={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},c=0;c<10;c++)p["Digit"+c]=48+c,p["Numpad"+c]=96+c,x.PRINTABLE_KEYS[48+c]=""+c,x.FUNCTION_KEYS[96+c]="Numpad"+c;for(var c=65;c<91;c++){var h=String.fromCharCode(c+32);p["Key"+h.toUpperCase()]=c,x.PRINTABLE_KEYS[c]=h}for(var c=1;c<13;c++)p["F"+c]=111+c,x.FUNCTION_KEYS[111+c]="F"+c;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var i in a)p[i]=p[i+"Left"]=p[i+"Right"]=a[i];D.$codeToKeyCode=p,x.PRINTABLE_KEYS[173]="-";for(var r in x.FUNCTION_KEYS){var o=x.FUNCTION_KEYS[r].toLowerCase();x[o]=parseInt(r,10)}for(var r in x.PRINTABLE_KEYS){var o=x.PRINTABLE_KEYS[r].toLowerCase();x[o]=parseInt(r,10)}R.mixin(x,x.MODIFIER_KEYS),R.mixin(x,x.PRINTABLE_KEYS),R.mixin(x,x.FUNCTION_KEYS),x.enter=x.return,x.escape=x.esc,x.del=x.delete,(function(){for(var s=["cmd","ctrl","alt","shift"],l=Math.pow(2,s.length);l--;)x.KEY_MODS[l]=s.filter(function(n){return l&x.KEY_MODS[n]}).join("-")+"-"})(),x.KEY_MODS[0]="",x.KEY_MODS[-1]="input-",R.mixin(D,x),D.default=D,D.keyCodeToString=function(s){var l=x[s];return typeof l!="string"&&(l=String.fromCharCode(s)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function($,D,V){var R=$("./keys"),x=$("./useragent"),p=null,c=0,h;function a(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function i(){return h==null&&a(),h}function r(y,_,v){this.elem=y,this.type=_,this.callback=v}r.prototype.destroy=function(){s(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var o=D.addListener=function(y,_,v,g){y.addEventListener(_,v,i()),g&&g.$toDestroy.push(new r(y,_,v))},s=D.removeListener=function(y,_,v){y.removeEventListener(_,v,i())};D.stopEvent=function(y){return D.stopPropagation(y),D.preventDefault(y),!1},D.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},D.preventDefault=function(y){y.preventDefault&&y.preventDefault()},D.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||x.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},D.capture=function(y,_,v){var g=y&&y.ownerDocument||document;function w(b){_&&_(b),v&&v(b),s(g,"mousemove",_),s(g,"mouseup",w),s(g,"dragstart",w)}return o(g,"mousemove",_),o(g,"mouseup",w),o(g,"dragstart",w),w},D.addMouseWheelListener=function(y,_,v){o(y,"wheel",function(g){var w=.15,b=g.deltaX||0,S=g.deltaY||0;switch(g.deltaMode){case g.DOM_DELTA_PIXEL:g.wheelX=b*w,g.wheelY=S*w;break;case g.DOM_DELTA_LINE:var T=15;g.wheelX=b*T,g.wheelY=S*T;break;case g.DOM_DELTA_PAGE:var j=150;g.wheelX=b*j,g.wheelY=S*j;break}_(g)},v)},D.addMultiMouseDownListener=function(y,_,v,g,w){var b=0,S,T,j,E={2:"dblclick",3:"tripleclick",4:"quadclick"};function A(M){if(D.getButton(M)!==0?b=0:M.detail>1?(b++,b>4&&(b=1)):b=1,x.isIE){var C=Math.abs(M.clientX-S)>5||Math.abs(M.clientY-T)>5;(!j||C)&&(b=1),j&&clearTimeout(j),j=setTimeout(function(){j=null},_[b-1]||600),b==1&&(S=M.clientX,T=M.clientY)}if(M._clicks=b,v[g]("mousedown",M),b>4)b=0;else if(b>1)return v[g](E[b],M)}Array.isArray(y)||(y=[y]),y.forEach(function(M){o(M,"mousedown",A,w)})};function l(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)}D.getModifierString=function(y){return R.KEY_MODS[l(y)]};function n(y,_,v){var g=l(_);if(!v&&_.code&&(v=R.$codeToKeyCode[_.code]||v),!x.isMac&&p){if(_.getModifierState&&(_.getModifierState("OS")||_.getModifierState("Win"))&&(g|=8),p.altGr)if((3&g)!=3)p.altGr=0;else return;if(v===18||v===17){var w=_.location;if(v===17&&w===1)p[v]==1&&(c=_.timeStamp);else if(v===18&&g===3&&w===2){var b=_.timeStamp-c;b<50&&(p.altGr=!0)}}}if(v in R.MODIFIER_KEYS&&(v=-1),!(!g&&v===13&&_.location===3&&(y(_,g,-v),_.defaultPrevented))){if(x.isChromeOS&&g&8){if(y(_,g,v),_.defaultPrevented)return;g&=-9}return!g&&!(v in R.FUNCTION_KEYS)&&!(v in R.PRINTABLE_KEYS)?!1:y(_,g,v)}}D.addCommandKeyListener=function(y,_,v){var g=null;o(y,"keydown",function(w){p[w.keyCode]=(p[w.keyCode]||0)+1;var b=n(_,w,w.keyCode);return g=w.defaultPrevented,b},v),o(y,"keypress",function(w){g&&(w.ctrlKey||w.altKey||w.shiftKey||w.metaKey)&&(D.stopEvent(w),g=null)},v),o(y,"keyup",function(w){p[w.keyCode]=null},v),p||(d(),o(window,"focus",d))};function d(){p=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!x.isOldIE){var f=1;D.nextTick=function(y,_){_=_||window;var v="zero-timeout-message-"+f++,g=function(w){w.data==v&&(D.stopPropagation(w),s(_,"message",g),y())};o(_,"message",g),_.postMessage(v,"*")}}D.$idleBlocked=!1,D.onIdle=function(y,_){return setTimeout(function v(){D.$idleBlocked?setTimeout(v,100):y()},_)},D.$idleBlockId=null,D.blockIdle=function(y){D.$idleBlockId&&clearTimeout(D.$idleBlockId),D.$idleBlocked=!0,D.$idleBlockId=setTimeout(function(){D.$idleBlocked=!1},y||100)},D.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),D.nextFrame?D.nextFrame=D.nextFrame.bind(window):D.nextFrame=function(y){setTimeout(y,17)}}),ace.define("ace/clipboard",["require","exports","module"],function($,D,V){var R;V.exports={lineMode:!1,pasteCancelled:function(){return R&&R>Date.now()-50?!0:R=!1},cancel:function(){R=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function($,D,V){var R=$("../lib/event"),x=$("../config").nls,p=$("../lib/useragent"),c=$("../lib/dom"),h=$("../lib/lang"),a=$("../clipboard"),i=p.isChrome<18,r=p.isIE,o=p.isChrome>63,s=400,l=$("../lib/keys"),n=l.KEY_MODS,d=p.isIOS,f=d?/\s/:/\n/,y=p.isMobile,_=(function(){function v(g,w){var b=this;this.host=w,this.text=c.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",g.insertBefore(this.text,g.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",y||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),R.addListener(this.text,"blur",function(S){b.ignoreFocusEvents||(w.onBlur(S),b.$isFocused=!1)},w),R.addListener(this.text,"focus",function(S){if(!b.ignoreFocusEvents){if(b.$isFocused=!0,p.isEdge)try{if(!document.hasFocus())return}catch{}w.onFocus(S),p.isEdge?setTimeout(b.resetSelection.bind(b)):b.resetSelection()}},w),this.$focusScroll=!1,w.on("beforeEndOperation",function(){var S=w.curOp,T=S&&S.command&&S.command.name;if(T!="insertstring"){var j=T&&(S.docChanged||S.selectionChanged);b.inComposition&&j&&(b.lastValue=b.text.value="",b.onCompositionEnd()),b.resetSelection()}}),w.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=d?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&w.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,R.addCommandKeyListener(this.text,function(S,T,j){if(!b.inComposition)return w.onCommandKey(S,T,j)},w),R.addListener(this.text,"select",this.onSelect.bind(this),w),R.addListener(this.text,"input",this.onInput.bind(this),w),R.addListener(this.text,"cut",this.onCut.bind(this),w),R.addListener(this.text,"copy",this.onCopy.bind(this),w),R.addListener(this.text,"paste",this.onPaste.bind(this),w),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&R.addListener(g,"keydown",function(S){if(!(p.isMac&&!S.metaKey||!S.ctrlKey))switch(S.keyCode){case 67:b.onCopy(S);break;case 86:b.onPaste(S);break;case 88:b.onCut(S);break}},w),this.syncComposition=h.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),R.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),w),R.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),w),R.addListener(this.text,"keyup",this.onKeyup.bind(this),w),R.addListener(this.text,"keydown",this.syncComposition.bind(this),w),R.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),w),this.closeTimeout,R.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),w),R.addListener(this.text,"mousedown",function(S){S.preventDefault(),b.onContextMenuClose()},w),R.addListener(w.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),w),R.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),w),d&&this.addIosSelectionHandler(g,w,this.text)}return v.prototype.addIosSelectionHandler=function(g,w,b){var S=this,T=null,j=!1;b.addEventListener("keydown",function(A){T&&clearTimeout(T),j=!0},!0),b.addEventListener("keyup",function(A){T=setTimeout(function(){j=!1},100)},!0);var E=function(A){if(document.activeElement===b&&!(j||S.inComposition||w.$mouseHandler.isMousePressed)&&!S.copied){var M=b.selectionStart,C=b.selectionEnd,L=null,I=0;if(M==0?L=l.up:M==1?L=l.home:C>S.lastSelectionEnd&&S.lastValue[C]==`
280
- `?L=l.end:M<S.lastSelectionStart&&S.lastValue[M-1]==" "?(L=l.left,I=n.option):M<S.lastSelectionStart||M==S.lastSelectionStart&&S.lastSelectionEnd!=S.lastSelectionStart&&M==C?L=l.left:C>S.lastSelectionEnd&&S.lastValue.slice(0,C).split(`
281
- `).length>2?L=l.down:C>S.lastSelectionEnd&&S.lastValue[C-1]==" "?(L=l.right,I=n.option):(C>S.lastSelectionEnd||C==S.lastSelectionEnd&&S.lastSelectionEnd!=S.lastSelectionStart&&M==C)&&(L=l.right),M!==C&&(I|=n.shift),L){var O=w.onCommandKey({},I,L);if(!O&&w.commands){L=l.keyCodeToString(L);var z=w.commands.findKeyCommand(I,L);z&&w.execCommand(z)}S.lastSelectionStart=M,S.lastSelectionEnd=C,S.resetSelection("")}}};document.addEventListener("selectionchange",E),w.on("destroy",function(){document.removeEventListener("selectionchange",E)})},v.prototype.onContextMenuClose=function(){var g=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){g.tempStyle&&(g.text.style.cssText=g.tempStyle,g.tempStyle=""),g.host.renderer.$isMousePressed=!1,g.host.renderer.$keepTextAreaAtCursor&&g.host.renderer.$moveTextAreaToCursor()},0)},v.prototype.$onContextMenu=function(g){this.host.textInput.onContextMenu(g),this.onContextMenuClose()},v.prototype.onKeyup=function(g){g.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},v.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},v.prototype.onCompositionStart=function(g){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){g.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var w=this.host.getSelectionRange();w.end.row=w.start.row,w.end.column=w.start.column,this.inComposition.markerRange=w,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},v.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var g=this.text.value;this.sendText(g),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},v.prototype.onCompositionEnd=function(g){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),g&&this.onInput())},v.prototype.onCut=function(g){this.doCopy(g,!0)},v.prototype.onCopy=function(g){this.doCopy(g,!1)},v.prototype.onPaste=function(g){var w=this.handleClipboardData(g);a.pasteCancelled()||(typeof w=="string"?(w&&this.host.onPaste(w,g),p.isIE&&setTimeout(this.resetSelection),R.preventDefault(g)):(this.text.value="",this.pasted=!0))},v.prototype.doCopy=function(g,w){var b=this,S=this.host.getCopyText();if(!S)return R.preventDefault(g);this.handleClipboardData(g,S)?(d&&(this.resetSelection(S),this.copied=S,setTimeout(function(){b.copied=!1},10)),w?this.host.onCut():this.host.onCopy(),R.preventDefault(g)):(this.copied=!0,this.text.value=S,this.text.select(),setTimeout(function(){b.copied=!1,b.resetSelection(),w?b.host.onCut():b.host.onCopy()}))},v.prototype.handleClipboardData=function(g,w,b){var S=g.clipboardData||window.clipboardData;if(!(!S||i)){var T=r||b?"Text":"text/plain";try{return w?S.setData(T,w)!==!1:S.getData(T)}catch(j){if(!b)return this.handleClipboardData(j,w,!0)}}},v.prototype.onInput=function(g){if(this.inComposition)return this.onCompositionUpdate();if(g&&g.inputType){if(g.inputType=="historyUndo")return this.host.execCommand("undo");if(g.inputType=="historyRedo")return this.host.execCommand("redo")}var w=this.text.value,b=this.sendText(w,!0);(w.length>s+100||f.test(b)||y&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},v.prototype.sendText=function(g,w){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),g&&this.host.onPaste(g),this.pasted=!1,"";for(var b=this.text.selectionStart,S=this.text.selectionEnd,T=this.lastSelectionStart,j=this.lastValue.length-this.lastSelectionEnd,E=g,A=g.length-b,M=g.length-S,C=0;T>0&&this.lastValue[C]==g[C];)C++,T--;for(E=E.slice(C),C=1;j>0&&this.lastValue.length-C>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-C]==g[g.length-C];)C++,j--;A-=C-1,M-=C-1;var L=E.length-C+1;if(L<0&&(T=-L,L=0),E=E.slice(0,L),!w&&!E&&!A&&!T&&!j&&!M)return"";this.sendingText=!0;var I=!1;return p.isAndroid&&E==". "&&(E=" ",I=!0),E&&!T&&!j&&!A&&!M||this.commandMode?this.host.onTextInput(E):this.host.onTextInput(E,{extendLeft:T,extendRight:j,restoreStart:A,restoreEnd:M}),this.sendingText=!1,this.lastValue=g,this.lastSelectionStart=b,this.lastSelectionEnd=S,this.lastRestoreEnd=M,I?`
282
- `:E},v.prototype.onSelect=function(g){var w=this;if(!this.inComposition){var b=function(S){return S.selectionStart===0&&S.selectionEnd>=w.lastValue.length&&S.value===w.lastValue&&w.lastValue&&S.selectionEnd!==w.lastSelectionEnd};this.copied?this.copied=!1:b(this.text)?(this.host.selectAll(),this.resetSelection()):y&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},v.prototype.$resetSelectionIOS=function(g){if(!(!this.$isFocused||this.copied&&!g||this.sendingText)){g||(g="");var w=`
283
- ab`+g+`cde fg
284
- `;w!=this.text.value&&(this.text.value=this.lastValue=w);var b=4,S=4+(g.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=b||this.lastSelectionEnd!=S)&&this.text.setSelectionRange(b,S),this.lastSelectionStart=b,this.lastSelectionEnd=S}},v.prototype.$resetSelection=function(){var g=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var w=0,b=0,S="",T=function(z,F){for(var H=F,Y=1;Y<=z-g.rowStart&&Y<2*g.numberOfExtraLines+1;Y++)H+=g.host.session.getLine(z-Y).length+1;return H};if(this.host.session){var j=this.host.selection,E=j.getRange(),A=j.cursor.row;A===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):A===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(A<this.rowStart-1||A>this.rowEnd+1)&&(this.rowStart=A>this.numberOfExtraLines?A-this.numberOfExtraLines:0,this.rowEnd=A>this.numberOfExtraLines?A+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var M=[],C=this.rowStart;C<=this.rowEnd;C++)M.push(this.host.session.getLine(C));if(S=M.join(`
285
- `),w=T(E.start.row,E.start.column),b=T(E.end.row,E.end.column),E.start.row<this.rowStart){var L=this.host.session.getLine(this.rowStart-1);w=E.start.row<this.rowStart-1?0:w,b+=L.length+1,S=L+`
286
- `+S}else if(E.end.row>this.rowEnd){var I=this.host.session.getLine(this.rowEnd+1);b=E.end.row>this.rowEnd+1?I.length:E.end.column,b+=S.length+1,S=S+`
287
- `+I}else y&&A>0&&(S=`
288
- `+S,b+=1,w+=1);S.length>s&&(w<s&&b<s?S=S.slice(0,s):(S=`
289
- `,w==b?w=b=0:(w=0,b=1)));var O=S+`
290
-
291
- `;O!=this.lastValue&&(this.text.value=this.lastValue=O,this.lastSelectionStart=this.lastSelectionEnd=O.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=b||this.lastSelectionStart!=w||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(w,b),this.lastSelectionStart=w,this.lastSelectionEnd=b}catch{}this.inComposition=!1}},v.prototype.setHost=function(g){this.host=g},v.prototype.setNumberOfExtraLines=function(g){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,g<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=g},v.prototype.setAriaLabel=function(){var g="";if(this.host.$textInputAriaLabel&&(g+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var w=this.host.session.selection.cursor.row;g+=x("text-input.aria-label","Cursor at row $0",[w+1])}this.text.setAttribute("aria-label",g)},v.prototype.setAriaOptions=function(g){g.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",g.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",g.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),g.role&&this.text.setAttribute("role",g.role),g.setLabel&&(this.text.setAttribute("aria-roledescription",x("text-input.aria-roledescription","editor")),this.setAriaLabel())},v.prototype.focus=function(){var g=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||o||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var w=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var b=this.text.getBoundingClientRect().top!=0}catch{return}var S=[];if(b)for(var T=this.text.parentElement;T&&T.nodeType==1;)S.push(T),T.setAttribute("ace_nocontext","true"),!T.parentElement&&T.getRootNode?T=T.getRootNode().host:T=T.parentElement;this.text.focus({preventScroll:!0}),b&&S.forEach(function(j){j.removeAttribute("ace_nocontext")}),setTimeout(function(){g.text.style.position="",g.text.style.top=="0px"&&(g.text.style.top=w)},0)},v.prototype.blur=function(){this.text.blur()},v.prototype.isFocused=function(){return this.$isFocused},v.prototype.setInputHandler=function(g){this.inputHandler=g},v.prototype.getInputHandler=function(){return this.inputHandler},v.prototype.getElement=function(){return this.text},v.prototype.setCommandMode=function(g){this.commandMode=g,this.text.readOnly=!1},v.prototype.setReadOnly=function(g){this.commandMode||(this.text.readOnly=g)},v.prototype.setCopyWithEmptySelection=function(g){},v.prototype.onContextMenu=function(g){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:g}),this.moveToMouse(g,!0)},v.prototype.moveToMouse=function(g,w){var b=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(w?"z-index:100000;":"")+(p.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var S=this.host.container.getBoundingClientRect(),T=c.computedStyle(this.host.container),j=S.top+(parseInt(T.borderTopWidth)||0),E=S.left+(parseInt(T.borderLeftWidth)||0),A=S.bottom-j-this.text.clientHeight-2,M=function(C){c.translate(b.text,C.clientX-E-2,Math.min(C.clientY-j-2,A))};M(g),g.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),p.isWin&&R.capture(this.host.container,M,this.onContextMenuClose.bind(this)))},v.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},v})();D.TextInput=_,D.$setUserAgentForTests=function(v,g){y=v,d=g}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function($,D,V){var R=$("../lib/useragent"),x=0,p=550,c=(function(){function i(r){r.$clickSelection=null;var o=r.editor;o.setDefaultHandler("mousedown",this.onMouseDown.bind(r)),o.setDefaultHandler("dblclick",this.onDoubleClick.bind(r)),o.setDefaultHandler("tripleclick",this.onTripleClick.bind(r)),o.setDefaultHandler("quadclick",this.onQuadClick.bind(r)),o.setDefaultHandler("mousewheel",this.onMouseWheel.bind(r));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(l){r[l]=this[l]},this),r.selectByLines=this.extendSelectionBy.bind(r,"getLineRange"),r.selectByWords=this.extendSelectionBy.bind(r,"getWordRange")}return i.prototype.onMouseDown=function(r){var o=r.inSelection(),s=r.getDocumentPosition();this.mousedownEvent=r;var l=this.editor,n=r.getButton();if(n!==0){var d=l.getSelectionRange(),f=d.isEmpty();(f||n==1)&&l.selection.moveToPosition(s),n==2&&(l.textInput.onContextMenu(r.domEvent),R.isMozilla||r.preventDefault());return}if(this.mousedownEvent.time=Date.now(),o&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(r);return}return this.captureMouse(r),this.startSelect(s,r.domEvent._clicks>1),r.preventDefault()},i.prototype.startSelect=function(r,o){r=r||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(r):o||s.selection.moveToPosition(r),o||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var r,o=this.editor,s=o.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s);if(l==-1)r=this.$clickSelection.end;else if(l==1)r=this.$clickSelection.start;else{var n=a(this.$clickSelection,s,o.session);s=n.cursor,r=n.anchor}o.selection.setSelectionAnchor(r.row,r.column)}o.selection.selectToPosition(s),o.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(r){var o,s=this.editor,l=s.renderer.screenToTextCoordinates(this.x,this.y),n=s.selection[r](l.row,l.column);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(n.start),f=this.$clickSelection.comparePoint(n.end);if(d==-1&&f<=0)o=this.$clickSelection.end,(n.end.row!=l.row||n.end.column!=l.column)&&(l=n.start);else if(f==1&&d>=0)o=this.$clickSelection.start,(n.start.row!=l.row||n.start.column!=l.column)&&(l=n.end);else if(d==-1&&f==1)l=n.end,o=n.start;else{var y=a(this.$clickSelection,l,s.session);l=y.cursor,o=y.anchor}s.selection.setSelectionAnchor(o.row,o.column)}s.selection.selectToPosition(l),s.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var r=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),o=Date.now();(r>x||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(r){var o=r.getDocumentPosition(),s=this.editor,l=s.session,n=l.getBracketRange(o);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=s.selection.getWordRange(o.row,o.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},i.prototype.onTripleClick=function(r){var o=r.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var l=s.getSelectionRange();l.isMultiLine()&&l.contains(o.row,o.column)?(this.$clickSelection=s.selection.getLineRange(l.start.row),this.$clickSelection.end=s.selection.getLineRange(l.end.row).end):this.$clickSelection=s.selection.getLineRange(o.row),this.select()},i.prototype.onQuadClick=function(r){var o=this.editor;o.selectAll(),this.$clickSelection=o.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(r){if(!r.getAccelKey()){r.getShiftKey()&&r.wheelY&&!r.wheelX&&(r.wheelX=r.wheelY,r.wheelY=0);var o=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,l=r.domEvent.timeStamp,n=l-s.t,d=n?r.wheelX/n:s.vx,f=n?r.wheelY/n:s.vy;n<p&&(d=(d+s.vx)/2,f=(f+s.vy)/2);var y=Math.abs(d/f),_=!1;if(y>=1&&o.renderer.isScrollableBy(r.wheelX*r.speed,0)&&(_=!0),y<=1&&o.renderer.isScrollableBy(0,r.wheelY*r.speed)&&(_=!0),_)s.allowed=l;else if(l-s.allowed<p){var v=Math.abs(d)<=1.5*Math.abs(s.vx)&&Math.abs(f)<=1.5*Math.abs(s.vy);v?(_=!0,s.allowed=l):s.allowed=0}if(s.t=l,s.vx=d,s.vy=f,_)return o.renderer.scrollBy(r.wheelX*r.speed,r.wheelY*r.speed),r.stop()}},i})();c.prototype.selectEnd=c.prototype.selectByLinesEnd,c.prototype.selectAllEnd=c.prototype.selectByLinesEnd,c.prototype.selectByWordsEnd=c.prototype.selectByLinesEnd,D.DefaultHandlers=c;function h(i,r,o,s){return Math.sqrt(Math.pow(o-i,2)+Math.pow(s-r,2))}function a(i,r,o){if(i.start.row==i.end.row)var s=2*r.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var s=3*r.column-2*o.getLine(i.start.row).length;else var s=2*r.row-i.start.row-i.end.row;return s<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function($,D,V){var R=$("../lib/event"),x=$("../lib/useragent"),p=(function(){function c(h,a){this.speed,this.wheelX,this.wheelY,this.domEvent=h,this.editor=a,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){R.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){R.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var h=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(h,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-i},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,a=h.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=a.contains(i.row,i.column)}return this.$inSelection},c.prototype.getButton=function(){return R.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return x.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c})();D.MouseEvent=p}),ace.define("ace/lib/scroll",["require","exports","module"],function($,D,V){D.preventParentScroll=function(x){x.stopPropagation();var p=x.currentTarget,c=p.scrollHeight>p.clientHeight;c||x.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function($,D,V){var R=this&&this.__extends||(function(){var l=function(n,d){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,y){f.__proto__=y}||function(f,y){for(var _ in y)Object.prototype.hasOwnProperty.call(y,_)&&(f[_]=y[_])},l(n,d)};return function(n,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");l(n,d);function f(){this.constructor=n}n.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),x=this&&this.__values||function(l){var n=typeof Symbol=="function"&&Symbol.iterator,d=n&&l[n],f=0;if(d)return d.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&f>=l.length&&(l=void 0),{value:l&&l[f++],done:!l}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},p=$("./lib/dom");$("./lib/event");var c=$("./range").Range,h=$("./lib/scroll").preventParentScroll,a="ace_tooltip",i=(function(){function l(n){this.isOpen=!1,this.$element=null,this.$parentNode=n}return l.prototype.$init=function(){return this.$element=p.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(n){this.getElement().textContent=n},l.prototype.setHtml=function(n){this.getElement().innerHTML=n},l.prototype.setPosition=function(n,d){this.getElement().style.left=n+"px",this.getElement().style.top=d+"px"},l.prototype.setClassName=function(n){p.addCssClass(this.getElement(),n)},l.prototype.setTheme=function(n){this.theme&&(this.theme.isDark&&p.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&p.removeCssClass(this.getElement(),this.theme.cssClass)),n.isDark&&p.addCssClass(this.getElement(),"ace_dark"),n.cssClass&&p.addCssClass(this.getElement(),n.cssClass),this.theme={isDark:n.isDark,cssClass:n.cssClass}},l.prototype.show=function(n,d,f){n!=null&&this.setText(n),d!=null&&f!=null&&this.setPosition(d,f),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(n){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l})(),r=(function(){function l(){this.popups=[]}return l.prototype.addPopup=function(n){this.popups.push(n),this.updatePopups()},l.prototype.removePopup=function(n){var d=this.popups.indexOf(n);d!==-1&&(this.popups.splice(d,1),this.updatePopups())},l.prototype.updatePopups=function(){var n,d,f,y;this.popups.sort(function(E,A){return A.priority-E.priority});var _=[];try{for(var v=x(this.popups),g=v.next();!g.done;g=v.next()){var w=g.value,b=!0;try{for(var S=(f=void 0,x(_)),T=S.next();!T.done;T=S.next()){var j=T.value;if(this.doPopupsOverlap(j,w)){b=!1;break}}}catch(E){f={error:E}}finally{try{T&&!T.done&&(y=S.return)&&y.call(S)}finally{if(f)throw f.error}}b?_.push(w):w.hide()}}catch(E){n={error:E}}finally{try{g&&!g.done&&(d=v.return)&&d.call(v)}finally{if(n)throw n.error}}},l.prototype.doPopupsOverlap=function(n,d){var f=n.getElement().getBoundingClientRect(),y=d.getElement().getBoundingClientRect();return f.left<y.right&&f.right>y.left&&f.top<y.bottom&&f.bottom>y.top},l})(),o=new r;D.popupManager=o,D.Tooltip=i;var s=(function(l){R(n,l);function n(d){d===void 0&&(d=document.body);var f=l.call(this,d)||this;f.timeout=void 0,f.lastT=0,f.idleTime=350,f.lastEvent=void 0,f.onMouseOut=f.onMouseOut.bind(f),f.onMouseMove=f.onMouseMove.bind(f),f.waitForHover=f.waitForHover.bind(f),f.hide=f.hide.bind(f);var y=f.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",f.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",(function(){y.contains(document.activeElement)||this.hide()}).bind(f)),y.addEventListener("wheel",h),f}return n.prototype.addToEditor=function(d){d.on("mousemove",this.onMouseMove),d.on("mousedown",this.hide);var f=d.renderer.getMouseEventTarget();f&&typeof f.removeEventListener=="function"&&f.addEventListener("mouseout",this.onMouseOut,!0)},n.prototype.removeFromEditor=function(d){d.off("mousemove",this.onMouseMove),d.off("mousedown",this.hide);var f=d.renderer.getMouseEventTarget();f&&typeof f.removeEventListener=="function"&&f.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},n.prototype.onMouseMove=function(d,f){this.lastEvent=d,this.lastT=Date.now();var y=f.$mouseHandler.isMousePressed;if(this.isOpen){var _=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(_.row,_.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(this.lastEvent=d,this.timeout=setTimeout(this.waitForHover,this.idleTime))},n.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var d=Date.now()-this.lastT;if(this.idleTime-d>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-d);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},n.prototype.isOutsideOfText=function(d){var f=d.editor,y=d.getDocumentPosition(),_=f.session.getLine(y.row);if(y.column==_.length){var v=f.renderer.pixelToScreenCoordinates(d.clientX,d.clientY),g=f.session.documentToScreenPosition(y.row,y.column);if(g.column!=v.column||g.row!=v.row)return!0}return!1},n.prototype.setDataProvider=function(d){this.$gatherData=d},n.prototype.showForRange=function(d,f,y,_){if(!(_&&_!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var v=d.renderer;this.isOpen||(o.addPopup(this),this.$registerCloseEvents(),this.setTheme(v.theme)),this.isOpen=!0,this.range=c.fromPoints(f.start,f.end);var g=v.textToScreenCoordinates(f.start.row,f.start.column),w=v.scroller.getBoundingClientRect();g.pageX<w.left&&(g.pageX=w.left);var b=this.getElement();b.innerHTML="",b.appendChild(y),b.style.maxHeight="",b.style.display="block",this.$setPosition(d,g,!0,f),p.$fixPositionBug(b)}},n.prototype.$setPosition=function(d,f,y,_){var v=10;y&&this.addMarker(_,d.session);var g=d.renderer,w=this.getElement(),b=w.offsetHeight,S=w.offsetWidth,T=f.pageY,j=f.pageX,E=window.innerHeight-T-g.lineHeight,A=this.$shouldPlaceAbove(b,T,E-v);w.style.maxHeight=(A?T:E)-v+"px",w.style.top=A?"":T+g.lineHeight+"px",w.style.bottom=A?window.innerHeight-T+"px":"",w.style.left=Math.min(j,window.innerWidth-S-v)+"px"},n.prototype.$shouldPlaceAbove=function(d,f,y){return!(f-d<0&&f<y)},n.prototype.addMarker=function(d,f){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=f,this.marker=f&&f.addMarker(d,"ace_highlight-marker","text")},n.prototype.hide=function(d){d&&this.$fromKeyboard&&d.type=="keydown"&&d.code=="Escape"||!d&&document.activeElement==this.getElement()||d&&d.target&&(d.type!="keydown"||d.ctrlKey||d.metaKey)&&this.$element.contains(d.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,o.removePopup(this)))},n.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},n.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},n.prototype.onMouseOut=function(d){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!d.relatedTarget||this.getElement().contains(d.relatedTarget)||d&&d.currentTarget.contains(d.relatedTarget)||d.relatedTarget.classList.contains("ace_content")||this.hide())},n})(i);D.HoverTooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function($,D,V){var R=this&&this.__extends||(function(){var s=function(l,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var y in f)Object.prototype.hasOwnProperty.call(f,y)&&(d[y]=f[y])},s(l,n)};return function(l,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");s(l,n);function d(){this.constructor=l}l.prototype=n===null?Object.create(n):(d.prototype=n.prototype,new d)}})(),x=this&&this.__values||function(s){var l=typeof Symbol=="function"&&Symbol.iterator,n=l&&s[l],d=0;if(n)return n.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},p=$("../lib/dom"),c=$("./mouse_event").MouseEvent,h=$("../tooltip").HoverTooltip,a=$("../config").nls,i=$("../range").Range;function r(s){var l=s.editor,n=l.renderer.$gutterLayer;s.$tooltip=new o(l),s.$tooltip.addToEditor(l),s.$tooltip.setDataProvider(function(d,f){var y=d.getDocumentPosition().row;s.$tooltip.showTooltip(y)}),s.editor.setDefaultHandler("guttermousedown",function(d){if(!(!l.isFocused()||d.getButton()!=0)){var f=n.getRegion(d);if(f!="foldWidgets"){var y=d.getDocumentPosition().row,_=l.session.selection;if(d.getShiftKey())_.selectTo(y,0);else{if(d.domEvent.detail==2)return l.selectAll(),d.preventDefault();s.$clickSelection=l.selection.getLineRange(y)}return s.setState("selectByLines"),s.captureMouse(d),d.preventDefault()}}})}D.GutterHandler=r;var o=(function(s){R(l,s);function l(n){var d=s.call(this,n.container)||this;d.id="gt"+ ++l.$uid,d.editor=n,d.visibleTooltipRow;var f=d.getElement();return f.setAttribute("role","tooltip"),f.setAttribute("id",d.id),f.style.pointerEvents="auto",d.idleTime=50,d.onDomMouseMove=d.onDomMouseMove.bind(d),d.onDomMouseOut=d.onDomMouseOut.bind(d),d.setClassName("ace_gutter-tooltip"),d}return l.prototype.onDomMouseMove=function(n){var d=new c(n,this.editor);this.onMouseMove(d,this.editor)},l.prototype.onDomMouseOut=function(n){var d=new c(n,this.editor);this.onMouseOut(d)},l.prototype.addToEditor=function(n){var d=n.renderer.$gutter;d.addEventListener("mousemove",this.onDomMouseMove),d.addEventListener("mouseout",this.onDomMouseOut),s.prototype.addToEditor.call(this,n)},l.prototype.removeFromEditor=function(n){var d=n.renderer.$gutter;d.removeEventListener("mousemove",this.onDomMouseMove),d.removeEventListener("mouseout",this.onDomMouseOut),s.prototype.removeFromEditor.call(this,n)},l.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),s.prototype.destroy.call(this)},Object.defineProperty(l,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),l.prototype.showTooltip=function(n){var d,f=this.editor.renderer.$gutterLayer,y=f.$annotations[n],_;y?_={displayText:Array.from(y.displayText),type:Array.from(y.type)}:_={displayText:[],type:[]};var v=f.session.getFoldLine(n);if(v&&f.$showFoldedAnnotations){for(var g={error:[],security:[],warning:[],info:[],hint:[]},w={error:1,security:2,warning:3,info:4,hint:5},b,S=n+1;S<=v.end.row;S++)if(f.$annotations[S])for(var T=0;T<f.$annotations[S].text.length;T++){var j=f.$annotations[S].type[T];g[j].push(f.$annotations[S].text[T]),(!b||w[j]<w[b])&&(b=j)}if(["error","security","warning"].includes(b)){var E="".concat(l.annotationsToSummaryString(g)," in folded code.");_.displayText.push(E),_.type.push(b+"_fold")}}if(_.displayText.length===0)return this.hide();for(var A={error:[],security:[],warning:[],info:[],hint:[]},M=f.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",S=0;S<_.displayText.length;S++){var C=p.createElement("span"),L=p.createElement("span");(d=L.classList).add.apply(d,["ace_".concat(_.type[S]),M]),L.setAttribute("aria-label","".concat(l.annotationLabels[_.type[S].replace("_fold","")].singular)),L.setAttribute("role","img"),L.appendChild(p.createTextNode(" ")),C.appendChild(L),C.appendChild(p.createTextNode(_.displayText[S])),C.appendChild(p.createElement("br")),A[_.type[S].replace("_fold","")].push(C)}var I=p.createElement("span");A.error.forEach(function(F){return I.appendChild(F)}),A.security.forEach(function(F){return I.appendChild(F)}),A.warning.forEach(function(F){return I.appendChild(F)}),A.info.forEach(function(F){return I.appendChild(F)}),A.hint.forEach(function(F){return I.appendChild(F)}),I.setAttribute("aria-live","polite");var O=this.$findLinkedAnnotationNode(n);O&&O.setAttribute("aria-describedby",this.id);var z=i.fromPoints({row:n,column:0},{row:n,column:0});this.showForRange(this.editor,z,I),this.visibleTooltipRow=n,this.editor._signal("showGutterTooltip",this)},l.prototype.$setPosition=function(n,d,f,y){var _=this.$findCellByRow(y.start.row);if(_){var v=_&&_.element,g=v&&v.querySelector(".ace_gutter_annotation");if(g){var w=g.getBoundingClientRect();if(w){var b={pageX:w.right,pageY:w.top};return s.prototype.$setPosition.call(this,n,b,!1,y)}}}},l.prototype.$shouldPlaceAbove=function(n,d,f){return f<n},l.prototype.$findLinkedAnnotationNode=function(n){var d=this.$findCellByRow(n);if(d){var f=d.element;if(f.childNodes.length>2)return f.childNodes[2]}},l.prototype.$findCellByRow=function(n){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(d){return d.row===n})},l.prototype.hide=function(n){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var d=this.$findLinkedAnnotationNode(this.visibleTooltipRow);d&&d.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),s.prototype.hide.call(this,n)}},l.annotationsToSummaryString=function(n){var d,f,y=[],_=["error","security","warning","info","hint"];try{for(var v=x(_),g=v.next();!g.done;g=v.next()){var w=g.value;if(n[w].length){var b=n[w].length===1?l.annotationLabels[w].singular:l.annotationLabels[w].plural;y.push("".concat(n[w].length," ").concat(b))}}}catch(S){d={error:S}}finally{try{g&&!g.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}return y.join(", ")},l.prototype.isOutsideOfText=function(n){var d=n.editor,f=d.renderer.$gutter.getBoundingClientRect();return!(n.clientX>=f.left&&n.clientX<=f.right&&n.clientY>=f.top&&n.clientY<=f.bottom)},l})(h);o.$uid=0,D.GutterTooltip=o}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function($,D,V){var R=$("../lib/dom"),x=$("../lib/event"),p=$("../lib/useragent"),c=200,h=200,a=5;function i(o){var s=o.editor,l=R.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var n=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];n.forEach(function(K){o[K]=this[K]},this),s.on("mousedown",this.onMouseDown.bind(o));var d=s.container,f,y,_,v,g,w,b=0,S,T,j,E,A;this.onDragStart=function(K){if(this.cancelDrag||!d.draggable){var q=this;return setTimeout(function(){q.startSelect(),q.captureMouse(K)},0),K.preventDefault()}g=s.getSelectionRange();var Q=K.dataTransfer;Q.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(l),Q.setDragImage&&Q.setDragImage(l,0,0),setTimeout(function(){s.container.removeChild(l)}),Q.clearData(),Q.setData("Text",s.session.getTextRange()),T=!0,this.setState("drag")},this.onDragEnd=function(K){if(d.draggable=!1,T=!1,this.setState(null),!s.getReadOnly()){var q=K.dataTransfer.dropEffect;!S&&q=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(K){if(!(s.getReadOnly()||!H(K.dataTransfer)))return y=K.clientX,_=K.clientY,f||I(),b++,K.dataTransfer.dropEffect=S=Y(K),x.preventDefault(K)},this.onDragOver=function(K){if(!(s.getReadOnly()||!H(K.dataTransfer)))return y=K.clientX,_=K.clientY,f||(I(),b++),z!==null&&(z=null),K.dataTransfer.dropEffect=S=Y(K),x.preventDefault(K)},this.onDragLeave=function(K){if(b--,b<=0&&f)return O(),S=null,x.preventDefault(K)},this.onDrop=function(K){if(w){var q=K.dataTransfer;if(T)switch(S){case"move":g.contains(w.row,w.column)?g={start:w,end:w}:g=s.moveText(g,w);break;case"copy":g=s.moveText(g,w,!0);break}else{var Q=q.getData("Text");g={start:w,end:s.session.insert(w,Q)},s.focus(),S=null}return O(),x.preventDefault(K)}},x.addListener(d,"dragstart",this.onDragStart.bind(o),s),x.addListener(d,"dragend",this.onDragEnd.bind(o),s),x.addListener(d,"dragenter",this.onDragEnter.bind(o),s),x.addListener(d,"dragover",this.onDragOver.bind(o),s),x.addListener(d,"dragleave",this.onDragLeave.bind(o),s),x.addListener(d,"drop",this.onDrop.bind(o),s);function M(K,q){var Q=Date.now(),ee=!q||K.row!=q.row,U=!q||K.column!=q.column;if(!E||ee||U)s.moveCursorToPosition(K),E=Q,A={x:y,y:_};else{var Z=r(A.x,A.y,y,_);Z>a?E=null:Q-E>=h&&(s.renderer.scrollCursorIntoView(),E=null)}}function C(K,q){var Q=Date.now(),ee=s.renderer.layerConfig.lineHeight,U=s.renderer.layerConfig.characterWidth,Z=s.renderer.scroller.getBoundingClientRect(),te={x:{left:y-Z.left,right:Z.right-y},y:{top:_-Z.top,bottom:Z.bottom-_}},ne=Math.min(te.x.left,te.x.right),ve=Math.min(te.y.top,te.y.bottom),ge={row:K.row,column:K.column};ne/U<=2&&(ge.column+=te.x.left<te.x.right?-3:2),ve/ee<=1&&(ge.row+=te.y.top<te.y.bottom?-1:1);var xe=K.row!=ge.row,Me=K.column!=ge.column,Re=!q||K.row!=q.row;xe||Me&&!Re?j?Q-j>=c&&s.renderer.scrollCursorIntoView(ge):j=Q:j=null}function L(){var K=w;w=s.renderer.screenToTextCoordinates(y,_),M(w,K),C(w,K)}function I(){g=s.selection.toOrientedRange(),f=s.session.addMarker(g,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),L(),v=setInterval(L,20),b=0,x.addListener(document,"mousemove",F)}function O(){clearInterval(v),s.session.removeMarker(f),f=null,s.selection.fromOrientedRange(g),s.isFocused()&&!T&&s.$resetCursorStyle(),g=null,w=null,b=0,j=null,E=null,x.removeListener(document,"mousemove",F)}var z=null;function F(){z==null&&(z=setTimeout(function(){z!=null&&f&&O()},20))}function H(K){var q=K.types;return!q||Array.prototype.some.call(q,function(Q){return Q=="text/plain"||Q=="Text"})}function Y(K){var q=["copy","copymove","all","uninitialized"],Q=["move","copymove","linkmove","all","uninitialized"],ee=p.isMac?K.altKey:K.ctrlKey,U="uninitialized";try{U=K.dataTransfer.effectAllowed.toLowerCase()}catch{}var Z="none";return ee&&q.indexOf(U)>=0?Z="copy":Q.indexOf(U)>=0?Z="move":q.indexOf(U)>=0&&(Z="copy"),Z}}(function(){this.dragWait=function(){var o=Date.now()-this.mousedownEvent.time;o>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var o=this.editor.container;o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(o){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var o=this.editor,s=o.container;s.draggable=!0,o.renderer.$cursorLayer.setBlinking(!1),o.setStyle("ace_dragging");var l=p.isWin?"default":"move";o.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(o){var s=this.editor.container;if(p.isIE&&this.state=="dragReady"){var l=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&s.dragDrop()}if(this.state==="dragWait"){var l=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(o){if(this.$dragEnabled){this.mousedownEvent=o;var s=this.editor,l=o.inSelection(),n=o.getButton(),d=o.domEvent.detail||1;if(d===1&&n===0&&l){if(o.editor.inMultiSelectMode&&(o.getAccelKey()||o.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=o.domEvent.target||o.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),s.getDragDelay()){if(p.isWebKit){this.cancelDrag=!0;var y=s.container;y.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(o,this.onMouseDrag.bind(this)),o.defaultPrevented=!0}}}}).call(i.prototype);function r(o,s,l,n){return Math.sqrt(Math.pow(l-o,2)+Math.pow(n-s,2))}D.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function($,D,V){var R=$("./mouse_event").MouseEvent,x=$("../lib/event"),p=$("../lib/dom");D.addTouchListeners=function(c,h){var a="scroll",i,r,o,s,l,n,d=0,f,y=0,_=0,v=0,g,w;function b(){var M=window.navigator&&window.navigator.clipboard,C=!1,L=function(){var z=h.getCopyText(),F=h.session.getUndoManager().hasUndo();w.replaceChild(p.buildDom(C?["span",!z&&I("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],z&&I("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],z&&I("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],M&&I("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],F&&I("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],I("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],I("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),w.firstChild)},I=function(z){return h.commands.canExecute(z,h)},O=function(z){var F=z.target.getAttribute("action");if(F=="more"||!C)return C=!C,L();F=="paste"?M.readText().then(function(H){h.execCommand(F,H)}):F&&((F=="cut"||F=="copy")&&(M?M.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(F)),w.firstChild.style.display="none",C=!1,F!="openCommandPalette"&&h.focus()};w=p.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(z){a="menu",z.stopPropagation(),z.preventDefault(),h.textInput.focus()},ontouchend:function(z){z.stopPropagation(),z.preventDefault(),O(z)},onclick:O},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function S(){if(!h.getOption("enableMobileMenu")){w&&T();return}w||b();var M=h.selection.cursor,C=h.renderer.textToScreenCoordinates(M.row,M.column),L=h.renderer.textToScreenCoordinates(0,0).pageX,I=h.renderer.scrollLeft,O=h.container.getBoundingClientRect();w.style.top=C.pageY-O.top-3+"px",C.pageX-O.left<O.width-70?(w.style.left="",w.style.right="10px"):(w.style.right="",w.style.left=L+I-O.left+"px"),w.style.display="",w.firstChild.style.display="none",h.on("input",T)}function T(M){w&&(w.style.display="none"),h.off("input",T)}function j(){l=null,clearTimeout(l);var M=h.selection.getRange(),C=M.contains(f.row,f.column);(M.isEmpty()||!C)&&(h.selection.moveToPosition(f),h.selection.selectWord()),a="wait",S()}function E(){l=null,clearTimeout(l),h.selection.moveToPosition(f);var M=y>=2?h.selection.getLineRange(f.row):h.session.getBracketRange(f);M&&!M.isEmpty()?h.selection.setRange(M):h.selection.selectWord(),a="wait"}x.addListener(c,"contextmenu",function(M){if(g){var C=h.textInput.getElement();C.focus()}},h),x.addListener(c,"touchstart",function(M){var C=M.touches;if(l||C.length>1){clearTimeout(l),l=null,o=-1,a="zoom";return}g=h.$mouseHandler.isMousePressed=!0;var L=h.renderer.layerConfig.lineHeight,I=h.renderer.layerConfig.lineHeight,O=M.timeStamp;s=O;var z=C[0],F=z.clientX,H=z.clientY;Math.abs(i-F)+Math.abs(r-H)>L&&(o=-1),i=M.clientX=F,r=M.clientY=H,_=v=0;var Y=new R(M,h);if(f=Y.getDocumentPosition(),O-o<500&&C.length==1&&!d)y++,M.preventDefault(),M.button=0,E();else{y=0;var K=h.selection.cursor,q=h.selection.isEmpty()?K:h.selection.anchor,Q=h.renderer.$cursorLayer.getPixelPosition(K,!0),ee=h.renderer.$cursorLayer.getPixelPosition(q,!0),U=h.renderer.scroller.getBoundingClientRect(),Z=h.renderer.layerConfig.offset,te=h.renderer.scrollLeft,ne=function(xe,Me){return xe=xe/I,Me=Me/L-.75,xe*xe+Me*Me};if(M.clientX<U.left){a="zoom";return}var ve=ne(M.clientX-U.left-Q.left+te,M.clientY-U.top-Q.top+Z),ge=ne(M.clientX-U.left-ee.left+te,M.clientY-U.top-ee.top+Z);ve<3.5&&ge<3.5&&(a=ve>ge?"cursor":"anchor"),ge<3.5?a="anchor":ve<3.5?a="cursor":a="scroll",l=setTimeout(j,450)}o=O},h),x.addListener(c,"touchend",function(M){g=h.$mouseHandler.isMousePressed=!1,n&&clearInterval(n),a=="zoom"?(a="",d=0):l?(h.selection.moveToPosition(f),d=0,S()):a=="scroll"?(A(),T()):S(),clearTimeout(l),l=null},h),x.addListener(c,"touchmove",function(M){l&&(clearTimeout(l),l=null);var C=M.touches;if(!(C.length>1||a=="zoom")){var L=C[0],I=i-L.clientX,O=r-L.clientY;if(a=="wait")if(I*I+O*O>4)a="cursor";else return M.preventDefault();i=L.clientX,r=L.clientY,M.clientX=L.clientX,M.clientY=L.clientY;var z=M.timeStamp,F=z-s;if(s=z,a=="scroll"){var H=new R(M,h);H.speed=1,H.wheelX=I,H.wheelY=O,10*Math.abs(I)<Math.abs(O)&&(I=0),10*Math.abs(O)<Math.abs(I)&&(O=0),F!=0&&(_=I/F,v=O/F),h._emit("mousewheel",H),H.propagationStopped||(_=v=0)}else{var Y=new R(M,h),K=Y.getDocumentPosition();a=="cursor"?h.selection.moveCursorToPosition(K):a=="anchor"&&h.selection.setSelectionAnchor(K.row,K.column),h.renderer.scrollCursorIntoView(K),M.preventDefault()}}},h);function A(){d+=60,n=setInterval(function(){d--<=0&&(clearInterval(n),n=null),Math.abs(_)<.01&&(_=0),Math.abs(v)<.01&&(v=0),d<20&&(_=.9*_),d<20&&(v=.9*v);var M=h.session.getScrollTop();h.renderer.scrollBy(10*_,10*v),M==h.session.getScrollTop()&&(d=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function($,D,V){var R=$("../lib/event"),x=$("../lib/useragent"),p=$("./default_handlers").DefaultHandlers,c=$("./default_gutter_handler").GutterHandler,h=$("./mouse_event").MouseEvent,a=$("./dragdrop_handler").DragdropHandler,i=$("./touch_handler").addTouchListeners,r=$("../config"),o=(function(){function s(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var n=this;this.editor=l,new p(this),new c(this),new a(this);var d=function(_){var v=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());v&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},f=l.renderer.getMouseEventTarget();R.addListener(f,"click",this.onMouseEvent.bind(this,"click"),l),R.addListener(f,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),R.addMultiMouseDownListener([f,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),R.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),i(l.container,l);var y=l.renderer.$gutter;R.addListener(y,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),R.addListener(y,"click",this.onMouseEvent.bind(this,"gutterclick"),l),R.addListener(y,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),R.addListener(y,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),R.addListener(f,"mousedown",d,l),R.addListener(y,"mousedown",d,l),x.isIE&&l.renderer.scrollBarV&&(R.addListener(l.renderer.scrollBarV.element,"mousedown",d,l),R.addListener(l.renderer.scrollBarH.element,"mousedown",d,l)),l.on("mousemove",function(_){if(!(n.state||n.$dragDelay||!n.$dragEnabled)){var v=l.renderer.screenToTextCoordinates(_.x,_.y),g=l.session.selection.getRange(),w=l.renderer;!g.isEmpty()&&g.insideStart(v.row,v.column)?w.setCursorStyle("default"):w.setCursorStyle("")}},l)}return s.prototype.onMouseEvent=function(l,n){this.editor.session&&this.editor._emit(l,new h(n,this.editor))},s.prototype.onMouseMove=function(l,n){var d=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!d||!d.length||this.editor._emit(l,new h(n,this.editor))},s.prototype.onMouseWheel=function(l,n){var d=new h(n,this.editor);d.speed=this.$scrollSpeed*2,d.wheelX=n.wheelX,d.wheelY=n.wheelY,this.editor._emit(l,d)},s.prototype.setState=function(l){this.state=l},s.prototype.captureMouse=function(l,n){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var d=this.editor,f=this.editor.renderer;f.$isMousePressed=!0;var y=this,_=!0,v=function(T){if(T){if(x.isWebKit&&!T.which&&y.releaseMouse)return y.releaseMouse();y.x=T.clientX,y.y=T.clientY,n&&n(T),y.mouseEvent=new h(T,y.editor),y.$mouseMoved=!0}},g=function(T){d.off("beforeEndOperation",S),_=!1,d.session&&w(),y[y.state+"End"]&&y[y.state+"End"](T),y.state="",y.isMousePressed=f.$isMousePressed=!1,f.$keepTextAreaAtCursor&&f.$moveTextAreaToCursor(),y.$onCaptureMouseMove=y.releaseMouse=null,T&&y.onMouseEvent("mouseup",T),d.endOperation()},w=function(){y[y.state]&&y[y.state](),y.$mouseMoved=!1},b=function(){_&&(w(),R.nextFrame(b))};if(x.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){g(l)});var S=function(T){y.releaseMouse&&d.curOp.command.name&&d.curOp.selectionChanged&&(y[y.state+"End"]&&y[y.state+"End"](),y.state="",y.releaseMouse())};d.on("beforeEndOperation",S),d.startOperation({command:{name:"mouse"}}),y.$onCaptureMouseMove=v,y.releaseMouse=R.capture(this.editor.container,v,g),b()},s.prototype.cancelContextMenu=function(){var l=(function(n){n&&n.domEvent&&n.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),n&&n.domEvent&&R.stopEvent(n.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},s.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},s})();o.prototype.releaseMouse=null,r.defineOptions(o.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:x.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),D.MouseHandler=o}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function($,D,V){var R=$("../lib/dom"),x=(function(){function p(c){c.on("click",function(h){var a=h.getDocumentPosition(),i=c.session,r=i.getFoldAt(a.row,a.column,1);r&&(h.getAccelKey()?i.removeFold(r):i.expandFold(r),h.stop());var o=h.domEvent&&h.domEvent.target;o&&R.hasCssClass(o,"ace_inline_button")&&R.hasCssClass(o,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(h){var a=c.renderer.$gutterLayer.getRegion(h);if(a=="foldWidgets"){var i=h.getDocumentPosition().row,r=c.session;r.foldWidgets&&r.foldWidgets[i]&&c.session.onFoldWidgetClick(i,h),c.isFocused()||c.focus(),h.stop()}}),c.on("gutterdblclick",function(h){var a=c.renderer.$gutterLayer.getRegion(h);if(a=="foldWidgets"){var i=h.getDocumentPosition().row,r=c.session,o=r.getParentFoldRangeData(i,!0),s=o.range||o.firstRange;if(s){i=s.start.row;var l=r.getFoldAt(i,r.getLine(i).length,1);l?r.removeFold(l):(r.addFold("...",s),c.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}h.stop()}})}return p})();D.FoldHandler=x}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function($,D,V){var R=$("../lib/keys"),x=$("../lib/event"),p=(function(){function c(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return c.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},c.prototype.setKeyboardHandler=function(h){var a=this.$handlers;if(a[a.length-1]!=h){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(h,1)}},c.prototype.addKeyboardHandler=function(h,a){if(h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var i=this.$handlers.indexOf(h);i!=-1&&this.$handlers.splice(i,1),a==null?this.$handlers.push(h):this.$handlers.splice(a,0,h),i==-1&&h.attach&&h.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(h){var a=this.$handlers.indexOf(h);return a==-1?!1:(this.$handlers.splice(a,1),h.detach&&h.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var h=this.$data,a=h.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(a,h)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(h,a,i,r){for(var o,s=!1,l=this.$editor.commands,n=this.$handlers.length;n--&&(o=this.$handlers[n].handleKeyboard(this.$data,h,a,i,r),!(!(!o||!o.command)&&(o.command=="null"?s=!0:s=l.exec(o.command,this.$editor,o.args,r),s&&r&&h!=-1&&o.passEvent!=!0&&o.command.passEvent!=!0&&x.stopEvent(r),s))););return!s&&h==-1&&(o={command:"insertstring"},s=l.exec("insertstring",this.$editor,a)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},c.prototype.onCommandKey=function(h,a,i){var r=R.keyCodeToString(i);return this.$callKeyboardHandlers(a,r,i,h)},c.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},c})();D.KeyBinding=p}),ace.define("ace/lib/bidiutil",["require","exports","module"],function($,D,V){var R=0,x=0,p=!1,c=!1,h=!1,a=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],i=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],r=0,o=1,s=0,l=1,n=2,d=3,f=4,y=5,_=6,v=7,g=8,w=9,b=10,S=11,T=12,j=13,E=14,A=15,M=16,C=17,L=18,I=[L,L,L,L,L,L,L,L,L,_,y,_,g,y,L,L,L,L,L,L,L,L,L,L,L,L,L,L,y,y,y,_,g,f,f,S,S,S,f,f,f,f,f,b,w,b,w,w,n,n,n,n,n,n,n,n,n,n,w,f,f,f,f,f,f,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,f,f,f,f,f,f,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,f,f,f,f,L,L,L,L,L,L,y,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,w,f,S,S,S,S,f,f,f,f,s,f,f,L,f,f,S,S,n,n,f,s,f,f,f,n,s,f,f,f,f,f],O=[g,g,g,g,g,g,g,g,g,g,g,L,L,L,s,l,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,g,y,j,E,A,M,C,w,S,S,S,S,S,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,w,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,g];function z(K,q,Q,ee){var U=R?i:a,Z=null,te=null,ne=null,ve=0,ge=null,xe=null,Me=-1,Re=null,it=null,Te=[];if(!ee)for(Re=0,ee=[];Re<Q;Re++)ee[Re]=Y(K[Re]);for(x=R,p=!1,c=!1,h=!1,it=0;it<Q;it++){if(Z=ve,Te[it]=te=H(K,ee,Te,it),ve=U[Z][te],ge=ve&240,ve&=15,q[it]=ne=U[ve][5],ge>0)if(ge==16){for(Re=Me;Re<it;Re++)q[Re]=1;Me=-1}else Me=-1;if(xe=U[ve][6],xe)Me==-1&&(Me=it);else if(Me>-1){for(Re=Me;Re<it;Re++)q[Re]=ne;Me=-1}ee[it]==y&&(q[it]=0),x|=ne}if(h){for(Re=0;Re<Q;Re++)if(ee[Re]==_){q[Re]=R;for(var Tt=Re-1;Tt>=0&&ee[Tt]==g;Tt--)q[Tt]=R}}}function F(K,q,Q){if(!(x<K)){if(K==1&&R==o&&!c){Q.reverse();return}for(var ee=Q.length,U=0,Z,te,ne,ve;U<ee;){if(q[U]>=K){for(Z=U+1;Z<ee&&q[Z]>=K;)Z++;for(te=U,ne=Z-1;te<ne;te++,ne--)ve=Q[te],Q[te]=Q[ne],Q[ne]=ve;U=Z}U++}}}function H(K,q,Q,ee){var U=q[ee],Z,te,ne,ve;switch(U){case s:case l:p=!1;case f:case d:return U;case n:return p?d:n;case v:return p=!0,l;case g:return f;case w:return ee<1||ee+1>=q.length||(Z=Q[ee-1])!=n&&Z!=d||(te=q[ee+1])!=n&&te!=d?f:(p&&(te=d),te==Z?te:f);case b:return Z=ee>0?Q[ee-1]:y,Z==n&&ee+1<q.length&&q[ee+1]==n?n:f;case S:if(ee>0&&Q[ee-1]==n)return n;if(p)return f;for(ve=ee+1,ne=q.length;ve<ne&&q[ve]==S;)ve++;return ve<ne&&q[ve]==n?n:f;case T:for(ne=q.length,ve=ee+1;ve<ne&&q[ve]==T;)ve++;if(ve<ne){var ge=K[ee],xe=ge>=1425&&ge<=2303||ge==64286;if(Z=q[ve],xe&&(Z==l||Z==v))return l}return ee<1||(Z=q[ee-1])==y?f:Q[ee-1];case y:return p=!1,c=!0,R;case _:return h=!0,f;case j:case E:case M:case C:case A:p=!1;case L:return f}}function Y(K){var q=K.charCodeAt(0),Q=q>>8;return Q==0?q>191?s:I[q]:Q==5?/[\u0591-\u05f4]/.test(K)?l:s:Q==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(K)?T:/[\u0660-\u0669\u066b-\u066c]/.test(K)?d:q==1642?S:/[\u06f0-\u06f9]/.test(K)?n:v:Q==32&&q<=8287?O[q&255]:Q==254&&q>=65136?v:f}D.L=s,D.R=l,D.EN=n,D.ON_R=3,D.AN=4,D.R_H=5,D.B=6,D.RLE=7,D.DOT="·",D.doBidiReorder=function(K,q,Q){if(K.length<2)return{};var ee=K.split(""),U=new Array(ee.length),Z=new Array(ee.length),te=[];R=Q?o:r,z(ee,te,ee.length,q);for(var ne=0;ne<U.length;U[ne]=ne,ne++);F(2,te,U),F(1,te,U);for(var ne=0;ne<U.length-1;ne++)q[ne]===d?te[ne]=D.AN:te[ne]===l&&(q[ne]>v&&q[ne]<j||q[ne]===f||q[ne]===L)?te[ne]=D.ON_R:ne>0&&ee[ne-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ee[ne])&&(te[ne-1]=te[ne]=D.R_H,ne++);ee[ee.length-1]===D.DOT&&(te[ee.length-1]=D.B),ee[0]==="‫"&&(te[0]=D.RLE);for(var ne=0;ne<U.length;ne++)Z[ne]=te[U[ne]];return{logicalFromVisual:U,bidiLevels:Z}},D.hasBidiCharacters=function(K,q){for(var Q=!1,ee=0;ee<K.length;ee++)q[ee]=Y(K.charAt(ee)),!Q&&(q[ee]==l||q[ee]==v||q[ee]==d)&&(Q=!0);return Q},D.getVisualFromLogicalIdx=function(K,q){for(var Q=0;Q<q.logicalFromVisual.length;Q++)if(q.logicalFromVisual[Q]==K)return Q;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function($,D,V){var R=$("./lib/bidiutil"),x=$("./lib/lang"),p=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,c=(function(){function h(a){this.session=a,this.bidiMap={},this.currentRow=null,this.bidiUtil=R,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=p.test(a.getValue())}return h.prototype.isBidiRow=function(a,i,r){return this.seenBidi?(a!==this.currentRow&&(this.currentRow=a,this.updateRowLine(i,r),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(a){this.seenBidi?this.currentRow=null:a.action=="insert"&&p.test(a.lines.join(`
292
- `))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var a=0,i=this.session.$screenRowCache;if(i.length){var r=this.session.$getRowCacheIndex(i,this.currentRow);r>=0&&(a=this.session.$docRowCache[r])}return a},h.prototype.getSplitIndex=function(){var a=0,i=this.session.$screenRowCache;if(i.length)for(var r,o=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-a>0&&(r=this.session.$getRowCacheIndex(i,this.currentRow-a-1),r===o);)o=r,a++;else a=this.currentRow;return a},h.prototype.updateRowLine=function(a,i){a===void 0&&(a=this.getDocumentRow());var r=a===this.session.getLength()-1,o=r?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[a];s&&(i===void 0&&(i=this.getSplitIndex()),i>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[R.L],this.line=i<s.length?this.line.substring(s[i-1],s[i]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[i]),i==s.length&&(this.line+=this.showInvisibles?o:R.DOT))}else this.line+=this.showInvisibles?o:R.DOT;var l=this.session,n=0,d;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(f,y){return f===" "||l.isFullWidth(f.charCodeAt(0))?(d=f===" "?l.getScreenTabSize(y+n):2,n+=d-1,x.stringRepeat(R.DOT,d)):f}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==R.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},h.prototype.updateBidiMap=function(){var a=[];R.hasBidiCharacters(this.line,a)||this.isRtlDir?this.bidiMap=R.doBidiReorder(this.line,a,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(a){if(this.characterWidth!==a.$characterSize.width){this.fontMetrics=a;var i=this.characterWidth=a.$characterSize.width,r=a.$measureCharWidth("ה");this.charWidths[R.L]=this.charWidths[R.EN]=this.charWidths[R.ON_R]=i,this.charWidths[R.R]=this.charWidths[R.AN]=r,this.charWidths[R.R_H]=r*.45,this.charWidths[R.B]=this.charWidths[R.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(a){this.showInvisibles=a,this.currentRow=null},h.prototype.setEolChar=function(a){this.EOL=a},h.prototype.setContentWidth=function(a){this.contentWidth=a},h.prototype.isRtlLine=function(a){return this.$isRtl?!0:a!=null?this.session.getLine(a).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(a,i){for(var r=a.getCursorPosition(),o=a.selection.getSelectionAnchor().row;o<=r.row;o++)!i&&a.session.getLine(o).charAt(0)===a.session.$bidiHandler.RLE?a.session.doc.removeInLine(o,0,1):i&&a.session.getLine(o).charAt(0)!==a.session.$bidiHandler.RLE&&a.session.doc.insert({column:0,row:o},a.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(a){a-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,r=a>i?this.session.getOverwrite()?a:a-1:i,o=R.getVisualFromLogicalIdx(r,this.bidiMap),s=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&a<=i&&s[o]%2!==0&&o++;for(var n=0;n<o;n++)l+=this.charWidths[s[n]];return!this.session.getOverwrite()&&a>i&&s[o]%2===0&&(l+=this.charWidths[s[o]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},h.prototype.getSelections=function(a,i){var r=this.bidiMap,o=r.bidiLevels,s,l=[],n=0,d=Math.min(a,i)-this.wrapIndent,f=Math.max(a,i)-this.wrapIndent,y=!1,_=!1,v=0;this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var g,w=0;w<o.length;w++)g=r.logicalFromVisual[w],s=o[w],y=g>=d&&g<f,y&&!_?v=n:!y&&_&&l.push({left:v,width:n-v}),n+=this.charWidths[s],_=y;if(y&&w===o.length&&l.push({left:v,width:n-v}),this.isRtlDir)for(var b=0;b<l.length;b++)l[b].left+=this.rtlLineOffset;return l},h.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var i=0,r=Math.max(r,0),o=0,s=0,l=this.bidiMap.bidiLevels,n=this.charWidths[l[s]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);r>o+n/2;){if(o+=n,s===l.length-1){n=0;break}n=this.charWidths[l[++s]]}return s>0&&l[s-1]%2!==0&&l[s]%2===0?(r<o&&s--,i=this.bidiMap.logicalFromVisual[s]):s>0&&l[s-1]%2===0&&l[s]%2!==0?i=1+(r>o?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===l.length-1&&n===0&&l[s-1]%2===0||!this.isRtlDir&&s===0&&l[s]%2!==0?i=1+this.bidiMap.logicalFromVisual[s]:(s>0&&l[s-1]%2!==0&&n!==0&&s--,i=this.bidiMap.logicalFromVisual[s]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},h})();D.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function($,D,V){var R=$("./lib/oop"),x=$("./lib/lang"),p=$("./lib/event_emitter").EventEmitter,c=$("./range").Range,h=(function(){function a(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(o){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),!r.$isEmpty&&!r.$silent&&r._emit("changeSelection"),!r.$keepDesiredColumnOnChange&&o.old.column!=o.value.column&&(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,!r.$isEmpty&&!r.$silent&&r._emit("changeSelection")})}return a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(i,r){this.$isEmpty=!1,this.anchor.setPosition(i,r)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var i=this.anchor,r=this.lead;return i.row>r.row||i.row==r.row&&i.column>r.column},a.prototype.getRange=function(){var i=this.anchor,r=this.lead;return this.$isEmpty?c.fromPoints(r,r):this.isBackwards()?c.fromPoints(r,i):c.fromPoints(i,r)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(i,r){var o=r?i.end:i.start,s=r?i.start:i.end;this.$setSelection(o.row,o.column,s.row,s.column)},a.prototype.$setSelection=function(i,r,o,s){if(!this.$silent){var l=this.$isEmpty,n=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,r),this.cursor.setPosition(o,s),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||n)&&this._emit("changeSelection")}},a.prototype.$moveSelection=function(i){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),i.call(this)},a.prototype.selectTo=function(i,r){this.$moveSelection(function(){this.moveCursorTo(i,r)})},a.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},a.prototype.moveTo=function(i,r){this.clearSelection(),this.moveCursorTo(i,r)},a.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(i,r){if(typeof r>"u"){var o=i||this.lead;i=o.row,r=o.column}return this.session.getWordRange(i,r)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var i=this.getCursor(),r=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(r)},a.prototype.getLineRange=function(i,r){var o=typeof i=="number"?i:this.lead.row,s,l=this.session.getFoldLine(o);return l?(o=l.start.row,s=l.end.row):s=o,r===!0?new c(o,0,s,this.session.getLine(s).length):new c(o,0,s+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(i,r,o){var s=i.column,l=i.column+r;return o<0&&(s=i.column-r,l=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(s,l).split(" ").length-1==r},a.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),r;if(r=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(r.start.row,r.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var o=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,o,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-o):this.moveCursorBy(0,-1)}},a.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),r;if(r=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(r.end.row,r.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var o=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,o,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,o):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var i=this.lead.row,r=this.lead.column,o=this.session.documentToScreenRow(i,r),s=this.session.screenToDocumentPosition(o,0),l=this.session.getDisplayLine(i,null,s.row,s.column),n=l.match(/^\s*/);n[0].length!=r&&!this.session.$useEmacsStyleLineStart&&(s.column+=n[0].length),this.moveCursorToPosition(s)},a.prototype.moveCursorLineEnd=function(){var i=this.lead,r=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==r.column){var o=this.session.getLine(r.row);if(r.column==o.length){var s=o.search(/\s+$/);s>0&&(r.column=s)}}this.moveCursorTo(r.row,r.column)},a.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,r=this.doc.getLine(i).length;this.moveCursorTo(i,r)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,r=this.lead.column,o=this.doc.getLine(i),s=o.substring(r);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(i,r,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(s)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=o.substring(r)),r>=o.length){this.moveCursorTo(i,o.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(s)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,r)},a.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,r=this.lead.column,o;if(o=this.session.getFoldAt(i,r,-1)){this.moveCursorTo(o.start.row,o.start.column);return}var s=this.session.getFoldStringAt(i,r,-1);s==null&&(s=this.doc.getLine(i).substring(0,r));var l=x.stringReverse(s);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(r-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),r<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(r-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,r)},a.prototype.$shortWordEndIndex=function(i){var r=0,o,s=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(i))r=this.session.tokenRe.lastIndex;else{for(;(o=i[r])&&s.test(o);)r++;if(r<1){for(l.lastIndex=0;(o=i[r])&&!l.test(o);)if(l.lastIndex=0,r++,s.test(o))if(r>2){r--;break}else{for(;(o=i[r])&&s.test(o);)r++;if(r>2)break}}}return l.lastIndex=0,r},a.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,r=this.lead.column,o=this.doc.getLine(i),s=o.substring(r),l=this.session.getFoldAt(i,r,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(r==o.length){var n=this.doc.getLength();do i++,s=this.doc.getLine(i);while(i<n&&/^\s*$/.test(s));/^\s+/.test(s)||(s=""),r=0}var d=this.$shortWordEndIndex(s);this.moveCursorTo(i,r+d)},a.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,r=this.lead.column,o;if(o=this.session.getFoldAt(i,r,-1))return this.moveCursorTo(o.start.row,o.start.column);var s=this.session.getLine(i).substring(0,r);if(r===0){do i--,s=this.doc.getLine(i);while(i>0&&/^\s*$/.test(s));r=s.length,/\s+$/.test(s)||(s="")}var l=x.stringReverse(s),n=this.$shortWordEndIndex(l);return this.moveCursorTo(i,r-n)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(i,r){var o=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(r===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(o.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(o.column),o.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=o.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?o.column=this.$desiredColumn:this.$desiredColumn=o.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];i<0?i-=l.rowsAbove||0:i>0&&(i+=l.rowCount-(l.rowsAbove||0))}var n=this.session.screenToDocumentPosition(o.row+i,o.column,s);i!==0&&r===0&&n.row===this.lead.row&&(n.column,this.lead.column),this.moveCursorTo(n.row,n.column+r,r===0)},a.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},a.prototype.moveCursorTo=function(i,r,o){var s=this.session.getFoldAt(i,r,1);s&&(i=s.start.row,r=s.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(l.charAt(r))&&l.charAt(r-1)&&(this.lead.row==i&&this.lead.column==r+1?r=r-1:r=r+1),this.lead.setPosition(i,r),this.$keepDesiredColumnOnChange=!1,o||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(i,r,o){var s=this.session.screenToDocumentPosition(i,r);this.moveCursorTo(s.row,s.column,o)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},a.prototype.toOrientedRange=function(i){var r=this.getRange();return i?(i.start.column=r.start.column,i.start.row=r.start.row,i.end.column=r.end.column,i.end.row=r.end.row):i=r,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},a.prototype.getRangeOfMovements=function(i){var r=this.getCursor();try{i(this);var o=this.getCursor();return c.fromPoints(r,o)}catch{return c.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},a.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(r){var o=r.clone();return o.isBackwards=r.cursor==r.start,o});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},a.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var r=i.length;r--;){var o=c.fromPoints(i[r].start,i[r].end);i[r].isBackwards&&(o.cursor=o.start),this.addRange(o,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},a.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(i[r]))return!1;return!0},a})();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,R.implement(h.prototype,p),D.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function($,D,V){var R=$("./lib/report_error").reportError,x=2e3,p=(function(){function c(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var a in this.states){for(var i=this.states[a],r=[],o=0,s=this.matchMappings[a]={defaultToken:"text"},l="g",n=[],d=0;d<i.length;d++){var f=i[d];if(f.defaultToken&&(s.defaultToken=f.defaultToken),f.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),f.unicode&&l.indexOf("u")===-1&&(l+="u"),f.regex!=null){f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var y=f.regex,_=new RegExp("(?:("+y+")|(.))").exec("a").length-2;Array.isArray(f.token)?f.token.length==1||_==1?f.token=f.token[0]:_-1!=f.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:f,groupCount:_-1}),f.token=f.token[0]):(f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens):typeof f.token=="function"&&!f.onMatch&&(_>1?f.onMatch=this.$applyToken:f.onMatch=f.token),_>1&&(/\\\d/.test(f.regex)?y=f.regex.replace(/\\([0-9]+)/g,function(v,g){return"\\"+(parseInt(g,10)+o+1)}):(_=1,y=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&n.push(f)),s[o]=d,o+=_,r.push(y),f.onMatch||(f.onMatch=null)}}r.length||(s[0]=0,r.push("$")),n.forEach(function(v){v.splitRegex=this.createSplitterRegexp(v.regex,l)},this),this.regExps[a]=new RegExp("("+r.join(")|(")+")|($)",l)}}return c.prototype.$setMaxTokenCount=function(h){x=h|0},c.prototype.$applyToken=function(h){var a=this.splitRegex.exec(h).slice(1),i=this.token.apply(this,a);if(typeof i=="string")return[{type:i,value:h}];for(var r=[],o=0,s=i.length;o<s;o++)a[o]&&(r[r.length]={type:i[o],value:a[o]});return r},c.prototype.$arrayTokens=function(h){if(!h)return[];var a=this.splitRegex.exec(h);if(!a)return"text";for(var i=[],r=this.tokenArray,o=0,s=r.length;o<s;o++)a[o+1]&&(i[i.length]={type:r[o],value:a[o+1]});return i},c.prototype.removeCapturingGroups=function(h){var a=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,r){return r?"(?:":i});return a},c.prototype.createSplitterRegexp=function(h,a){if(h.indexOf("(?=")!=-1){var i=0,r=!1,o={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(s,l,n,d,f,y){return r?r=f!="]":f?r=!0:d?(i==o.stack&&(o.end=y+1,o.stack=-1),i--):n&&(i++,n.length!=1&&(o.stack=i,o.start=y)),s}),o.end!=null&&/^\)*$/.test(h.substr(o.end))&&(h=h.substring(0,o.start)+h.substr(o.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(a||"").replace("g",""))},c.prototype.getLineTokens=function(h,a){if(a&&typeof a!="string"){var i=a.slice(0);a=i[0],a==="#tmp"&&(i.shift(),a=i.shift())}else var i=[];var r=a||"start",o=this.states[r];o||(r="start",o=this.states[r]);var s=this.matchMappings[r],l=this.regExps[r];l.lastIndex=0;for(var n,d=[],f=0,y=0,_={type:null,value:""};n=l.exec(h);){var v=s.defaultToken,g=null,w=n[0],b=l.lastIndex;if(b-w.length>f){var S=h.substring(f,b-w.length);_.type==v?_.value+=S:(_.type&&d.push(_),_={type:v,value:S})}for(var T=0;T<n.length-2;T++)if(n[T+1]!==void 0){g=o[s[T]],g.onMatch?v=g.onMatch(w,r,i,h):v=g.token,g.next&&(typeof g.next=="string"?r=g.next:r=g.next(r,i),o=this.states[r],o||(this.reportError("state doesn't exist",r),r="start",o=this.states[r]),s=this.matchMappings[r],f=b,l=this.regExps[r],l.lastIndex=b),g.consumeLineEnd&&(f=b);break}if(w){if(typeof v=="string")(!g||g.merge!==!1)&&_.type===v?_.value+=w:(_.type&&d.push(_),_={type:v,value:w});else if(v){_.type&&d.push(_),_={type:null,value:""};for(var T=0;T<v.length;T++)d.push(v[T])}}if(f==h.length)break;if(f=b,y++>x){for(y>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:h});f<h.length;)_.type&&d.push(_),_={value:h.substring(f,f+=500),type:"overflow"};r="start",i=[];break}}return _.type&&d.push(_),i.length>1&&i[0]!==r&&i.unshift("#tmp",r),{tokens:d,state:i.length?i:r}},c})();p.prototype.reportError=R,D.Tokenizer=p}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function($,D,V){var R=$("../lib/deep_copy").deepCopy,x;x=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(h,a){if(!a){for(var i in h)this.$rules[i]=h[i];return}for(var i in h){for(var r=h[i],o=0;o<r.length;o++){var s=r[o];(s.next||s.onMatch)&&(typeof s.next=="string"&&s.next.indexOf(a)!==0&&(s.next=a+s.next),s.nextState&&s.nextState.indexOf(a)!==0&&(s.nextState=a+s.nextState))}this.$rules[a+i]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(h,a,i,r,o){var s=typeof h=="function"?new h().getRules():h;if(r)for(var l=0;l<r.length;l++)r[l]=a+r[l];else{r=[];for(var n in s)r.push(a+n)}if(this.addRules(s,a),i)for(var d=Array.prototype[o?"push":"unshift"],l=0;l<r.length;l++)d.apply(this.$rules[r[l]],R(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var p=function(h,a){return(h!="start"||a.length)&&a.unshift(this.nextState,h),this.nextState},c=function(h,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var h=0,a=this.$rules;function i(r){var o=a[r];o.processed=!0;for(var s=0;s<o.length;s++){var l=o[s],n=null;Array.isArray(l)&&(n=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var d=l.next||l.push;if(d&&Array.isArray(d)){var f=l.stateName;f||(f=l.token,typeof f!="string"&&(f=f[0]||""),a[f]&&(f+=h++)),a[f]=d,l.next=f,i(f)}else d=="pop"&&(l.next=c);if(l.push&&(l.nextState=l.next||l.push,l.next=p,delete l.push),l.rules)for(var y in l.rules)a[y]?a[y].push&&a[y].push.apply(a[y],l.rules[y]):a[y]=l.rules[y];var _=typeof l=="string"?l:l.include;if(_&&(_==="$self"&&(_="start"),Array.isArray(_)?n=_.map(function(g){return a[g]}):n=a[_]),n){var v=[s,1].concat(n);l.noEscape&&(v=v.filter(function(g){return!g.next})),o.splice.apply(o,v),s--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(a).forEach(i,this)},this.createKeywordMapper=function(h,a,i,r){var o=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(s){for(var l=h[s],n=l.split(r||"|"),d=n.length;d--;){var f=n[d];this.$keywordList.push(f),i&&(f=f.toLowerCase()),o[f]=s}},this),h=null,i?function(s){return o[s.toLowerCase()]||a}:function(s){return o[s]||a}},this.getKeywords=function(){return this.$keywords}}).call(x.prototype),D.TextHighlightRules=x}),ace.define("ace/mode/behaviour",["require","exports","module"],function($,D,V){var R;R=function(){this.$behaviours={}},(function(){this.add=function(x,p,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[x]:this.$behaviours[x]={}}this.$behaviours[x][p]=c},this.addBehaviours=function(x){for(var p in x)for(var c in x[p])this.add(p,c,x[p][c])},this.remove=function(x){this.$behaviours&&this.$behaviours[x]&&delete this.$behaviours[x]},this.inherit=function(x,p){if(typeof x=="function")var c=new x().getBehaviours(p);else var c=x.getBehaviours(p);this.addBehaviours(c)},this.getBehaviours=function(x){if(x){for(var p={},c=0;c<x.length;c++)this.$behaviours[x[c]]&&(p[x[c]]=this.$behaviours[x[c]]);return p}else return this.$behaviours}}).call(R.prototype),D.Behaviour=R}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function($,D,V){var R=$("./range").Range,x=(function(){function p(c,h,a){this.$session=c,this.$row=h,this.$rowTokens=c.getTokens(h);var i=c.getTokenAt(h,a);this.$tokenIndex=i?i.index:-1}return p.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},p.prototype.stepForward=function(){this.$tokenIndex+=1;for(var c;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},p.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},p.prototype.getCurrentTokenRow=function(){return this.$row},p.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,h=this.$tokenIndex,a=c[h].start;if(a!==void 0)return a;for(a=0;h>0;)h-=1,a+=c[h].value.length;return a},p.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},p.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new R(this.$row,h,this.$row,h+c.value.length)},p})();D.TokenIterator=x}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function($,D,V){var R=$("../../lib/oop"),x=$("../behaviour").Behaviour,p=$("../../token_iterator").TokenIterator,c=$("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,r={},o={'"':'"',"'":"'"},s=function(d){var f=-1;if(d.multiSelect&&(f=d.selection.index,r.rangeCount!=d.multiSelect.rangeCount&&(r={rangeCount:d.multiSelect.rangeCount})),r[f])return i=r[f];i=r[f]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(d,f,y,_){var v=d.end.row-d.start.row;return{text:y+f+_,selection:[0,d.start.column+1,v,d.end.column+(v?0:1)]}},n;n=function(d){d=d||{},this.add("braces","insertion",function(f,y,_,v,g){var w=_.getCursorPosition(),b=v.doc.getLine(w.row);if(g=="{"){s(_);var S=_.getSelectionRange(),T=v.doc.getTextRange(S),j=v.getTokenAt(w.row,w.column);if(T!==""&&T!=="{"&&_.getWrapBehavioursEnabled())return l(S,T,"{","}");if(j&&/(?:string)\.quasi|\.xml/.test(j.type)){var E=[/tag\-(?:open|name)/,/attribute\-name/];return E.some(function(z){return z.test(j.type)})||/(string)\.quasi/.test(j.type)&&j.value[w.column-j.start-1]!=="$"?void 0:(n.recordAutoInsert(_,v,"}"),{text:"{}",selection:[1,1]})}else if(n.isSaneInsertion(_,v))return/[\]\}\)]/.test(b[w.column])||_.inMultiSelectMode||d.braces?(n.recordAutoInsert(_,v,"}"),{text:"{}",selection:[1,1]}):(n.recordMaybeInsert(_,v,"{"),{text:"{",selection:[1,1]})}else if(g=="}"){s(_);var A=b.substring(w.column,w.column+1);if(A=="}"){var M=v.$findOpeningBracket("}",{column:w.column+1,row:w.row});if(M!==null&&n.isAutoInsertedClosing(w,b,g))return n.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(g==`
293
- `||g==`\r
294
- `){s(_);var C="";n.isMaybeInsertedClosing(w,b)&&(C=c.stringRepeat("}",i.maybeInsertedBrackets),n.clearMaybeInsertedClosing());var A=b.substring(w.column,w.column+1);if(A==="}"){var L=v.findMatchingBracket({row:w.row,column:w.column+1},"}");if(!L)return null;var I=this.$getIndent(v.getLine(L.row))}else if(C)var I=this.$getIndent(b);else{n.clearMaybeInsertedClosing();return}var O=I+v.getTabString();return{text:`
295
- `+O+`
296
- `+I+C,selection:[1,O.length,1,O.length]}}else n.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(f,y,_,v,g){var w=v.doc.getTextRange(g);if(!g.isMultiLine()&&w=="{"){s(_);var b=v.doc.getLine(g.start.row),S=b.substring(g.end.column,g.end.column+1);if(S=="}")return g.end.column++,g;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(f,y,_,v,g){if(g=="("){s(_);var w=_.getSelectionRange(),b=v.doc.getTextRange(w);if(b!==""&&_.getWrapBehavioursEnabled())return l(w,b,"(",")");if(n.isSaneInsertion(_,v))return n.recordAutoInsert(_,v,")"),{text:"()",selection:[1,1]}}else if(g==")"){s(_);var S=_.getCursorPosition(),T=v.doc.getLine(S.row),j=T.substring(S.column,S.column+1);if(j==")"){var E=v.$findOpeningBracket(")",{column:S.column+1,row:S.row});if(E!==null&&n.isAutoInsertedClosing(S,T,g))return n.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(f,y,_,v,g){var w=v.doc.getTextRange(g);if(!g.isMultiLine()&&w=="("){s(_);var b=v.doc.getLine(g.start.row),S=b.substring(g.start.column+1,g.start.column+2);if(S==")")return g.end.column++,g}}),this.add("brackets","insertion",function(f,y,_,v,g){if(g=="["){s(_);var w=_.getSelectionRange(),b=v.doc.getTextRange(w);if(b!==""&&_.getWrapBehavioursEnabled())return l(w,b,"[","]");if(n.isSaneInsertion(_,v))return n.recordAutoInsert(_,v,"]"),{text:"[]",selection:[1,1]}}else if(g=="]"){s(_);var S=_.getCursorPosition(),T=v.doc.getLine(S.row),j=T.substring(S.column,S.column+1);if(j=="]"){var E=v.$findOpeningBracket("]",{column:S.column+1,row:S.row});if(E!==null&&n.isAutoInsertedClosing(S,T,g))return n.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(f,y,_,v,g){var w=v.doc.getTextRange(g);if(!g.isMultiLine()&&w=="["){s(_);var b=v.doc.getLine(g.start.row),S=b.substring(g.start.column+1,g.start.column+2);if(S=="]")return g.end.column++,g}}),this.add("string_dquotes","insertion",function(f,y,_,v,g){var w=v.$mode.$quotes||o;if(g.length==1&&w[g]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(g)!=-1)return;s(_);var b=g,S=_.getSelectionRange(),T=v.doc.getTextRange(S);if(T!==""&&(T.length!=1||!w[T])&&_.getWrapBehavioursEnabled())return l(S,T,b,b);if(!T){var j=_.getCursorPosition(),E=v.doc.getLine(j.row),A=E.substring(j.column-1,j.column),M=E.substring(j.column,j.column+1),C=v.getTokenAt(j.row,j.column),L=v.getTokenAt(j.row,j.column+1);if(A=="\\"&&C&&/escape/.test(C.type))return null;var I=C&&/string|escape/.test(C.type),O=!L||/string|escape/.test(L.type),z;if(M==b)z=I!==O,z&&/string\.end/.test(L.type)&&(z=!1);else{if(I&&!O||I&&O)return null;var F=v.$mode.tokenRe;F.lastIndex=0;var H=F.test(A);F.lastIndex=0;var Y=F.test(M),K=v.$mode.$pairQuotesAfter,q=K&&K[b]&&K[b].test(A);if(!q&&H||Y||M&&!/[\s;,.})\]\\]/.test(M))return null;var Q=E[j.column-2];if(A==b&&(Q==b||F.test(Q)))return null;z=!0}return{text:z?b+b:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(f,y,_,v,g){var w=v.$mode.$quotes||o,b=v.doc.getTextRange(g);if(!g.isMultiLine()&&w.hasOwnProperty(b)){s(_);var S=v.doc.getLine(g.start.row),T=S.substring(g.start.column+1,g.start.column+2);if(T==b)return g.end.column++,g}}),d.closeDocComment!==!1&&this.add("doc comment end","insertion",function(f,y,_,v,g){if(f==="doc-start"&&(g===`
297
- `||g===`\r
298
- `)&&_.selection.isEmpty()){var w=_.getCursorPosition();if(w.column===0)return;for(var b=v.doc.getLine(w.row),S=v.doc.getLine(w.row+1),T=v.getTokens(w.row),j=0,E=0;E<T.length;E++){j+=T[E].value.length;var A=T[E];if(j>=w.column){if(j===w.column){if(!/\.doc/.test(A.type))return;if(/\*\//.test(A.value)){var M=T[E+1];if(!M||!/\.doc/.test(M.type))return}}var C=w.column-(j-A.value.length),L=A.value.indexOf("*/"),I=A.value.indexOf("/**",L>-1?L+2:0);if(I!==-1&&C>I&&C<I+3||L!==-1&&I!==-1&&C>=L&&C<=I||!/\.doc/.test(A.type))return;break}}var O=this.$getIndent(b);if(/\s*\*/.test(S))return/^\s*\*/.test(b)?{text:g+O+"* ",selection:[1,2+O.length,1,2+O.length]}:{text:g+O+" * ",selection:[1,3+O.length,1,3+O.length]};if(/\/\*\*/.test(b.substring(0,w.column)))return{text:g+O+" * "+g+" "+O+"*/",selection:[1,4+O.length,1,4+O.length]}}})},n.isSaneInsertion=function(d,f){var y=d.getCursorPosition(),_=new p(f,y.row,y.column);if(!this.$matchTokenType(_.getCurrentToken()||"text",h)){if(/[)}\]]/.test(d.session.getLine(y.row)[y.column]))return!0;var v=new p(f,y.row,y.column+1);if(!this.$matchTokenType(v.getCurrentToken()||"text",h))return!1}return _.stepForward(),_.getCurrentTokenRow()!==y.row||this.$matchTokenType(_.getCurrentToken()||"text",a)},n.$matchTokenType=function(d,f){return f.indexOf(d.type||d)>-1},n.recordAutoInsert=function(d,f,y){var _=d.getCursorPosition(),v=f.doc.getLine(_.row);this.isAutoInsertedClosing(_,v,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=_.row,i.autoInsertedLineEnd=y+v.substr(_.column),i.autoInsertedBrackets++},n.recordMaybeInsert=function(d,f,y){var _=d.getCursorPosition(),v=f.doc.getLine(_.row);this.isMaybeInsertedClosing(_,v)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=_.row,i.maybeInsertedLineStart=v.substr(0,_.column)+y,i.maybeInsertedLineEnd=v.substr(_.column),i.maybeInsertedBrackets++},n.isAutoInsertedClosing=function(d,f,y){return i.autoInsertedBrackets>0&&d.row===i.autoInsertedRow&&y===i.autoInsertedLineEnd[0]&&f.substr(d.column)===i.autoInsertedLineEnd},n.isMaybeInsertedClosing=function(d,f){return i.maybeInsertedBrackets>0&&d.row===i.maybeInsertedRow&&f.substr(d.column)===i.maybeInsertedLineEnd&&f.substr(0,d.column)==i.maybeInsertedLineStart},n.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},n.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},R.inherits(n,x),D.CstyleBehaviour=n}),ace.define("ace/unicode",["require","exports","module"],function($,D,V){for(var R=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],x=0,p=[],c=0;c<R.length;c+=2)p.push(x+=R[c]),R[c+1]&&p.push(45,x+=R[c+1]);D.wordChars=String.fromCharCode.apply(null,p)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function($,D,V){var R=$("../config"),x=$("../tokenizer").Tokenizer,p=$("./text_highlight_rules").TextHighlightRules,c=$("./behaviour/cstyle").CstyleBehaviour,h=$("../unicode"),a=$("../lib/lang"),i=$("../token_iterator").TokenIterator,r=$("../range").Range,o;o=function(){this.HighlightRules=p},(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new x(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(s,l,n,d){var f=l.doc,y=!0,_=!0,v=1/0,g=l.getTabSize(),w=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var T=this.lineCommentStart.map(a.escapeRegExp).join("|"),b=this.lineCommentStart[0];else var T=a.escapeRegExp(this.lineCommentStart),b=this.lineCommentStart;T=new RegExp("^(\\s*)(?:"+T+") ?"),w=l.getUseSoftTabs();var A=function(Y,K){var q=Y.match(T);if(q){var Q=q[1].length,ee=q[0].length;!L(Y,Q,ee)&&q[0][ee-1]==" "&&ee--,f.removeInLine(K,Q,ee)}},C=b+" ",E=function(Y,K){(!y||/\S/.test(Y))&&(L(Y,v,v)?f.insertInLine({row:K,column:v},C):f.insertInLine({row:K,column:v},b))},M=function(Y,K){return T.test(Y)},L=function(Y,K,q){for(var Q=0;K--&&Y.charAt(K)==" ";)Q++;if(Q%g!=0)return!1;for(var Q=0;Y.charAt(q++)==" ";)Q++;return g>2?Q%g!=g-1:Q%g==0}}else{if(!this.blockComment)return!1;var b=this.blockComment.start,S=this.blockComment.end,T=new RegExp("^(\\s*)(?:"+a.escapeRegExp(b)+")"),j=new RegExp("(?:"+a.escapeRegExp(S)+")\\s*$"),E=function(z,F){M(z,F)||(!y||/\S/.test(z))&&(f.insertInLine({row:F,column:z.length},S),f.insertInLine({row:F,column:v},b))},A=function(z,F){var H;(H=z.match(j))&&f.removeInLine(F,z.length-H[0].length,z.length),(H=z.match(T))&&f.removeInLine(F,H[1].length,H[0].length)},M=function(z,F){if(T.test(z))return!0;for(var H=l.getTokens(F),Y=0;Y<H.length;Y++)if(H[Y].type==="comment")return!0}}function I(z){for(var F=n;F<=d;F++)z(f.getLine(F),F)}var O=1/0;I(function(z,F){var H=z.search(/\S/);H!==-1?(H<v&&(v=H),_&&!M(z,F)&&(_=!1)):O>z.length&&(O=z.length)}),v==1/0&&(v=O,y=!1,_=!1),w&&v%g!=0&&(v=Math.floor(v/g)*g),I(_?A:E)},this.toggleBlockComment=function(s,l,n,d){var f=this.blockComment;if(f){!f.start&&f[0]&&(f=f[0]);var y=new i(l,d.row,d.column),_=y.getCurrentToken();l.selection;var v=l.selection.toOrientedRange(),g,w;if(_&&/comment/.test(_.type)){for(var b,S;_&&/comment/.test(_.type);){var T=_.value.indexOf(f.start);if(T!=-1){var j=y.getCurrentTokenRow(),E=y.getCurrentTokenColumn()+T;b=new r(j,E,j,E+f.start.length);break}_=y.stepBackward()}for(var y=new i(l,d.row,d.column),_=y.getCurrentToken();_&&/comment/.test(_.type);){var T=_.value.indexOf(f.end);if(T!=-1){var j=y.getCurrentTokenRow(),E=y.getCurrentTokenColumn()+T;S=new r(j,E,j,E+f.end.length);break}_=y.stepForward()}S&&l.remove(S),b&&(l.remove(b),g=b.start.row,w=-f.start.length)}else w=f.start.length,g=n.start.row,l.insert(n.end,f.end),l.insert(n.start,f.start);v.start.row==g&&(v.start.column+=w),v.end.row==g&&(v.end.column+=w),l.selection.fromOrientedRange(v)}},this.getNextLineIndent=function(s,l,n){return this.$getIndent(l)},this.checkOutdent=function(s,l,n){return!1},this.autoOutdent=function(s,l,n){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var l in s)if(s[l]){var n=s[l],d=n.prototype.$id,f=R.$modes[d];f||(R.$modes[d]=f=new n),R.$modes[l]||(R.$modes[l]=f),this.$embeds.push(l),this.$modes[l]=f}for(var y=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],_=function(g){(function(w){var b=y[g],S=w[b];w[y[g]]=function(){return this.$delegator(b,arguments,S)}})(v)},v=this,l=0;l<y.length;l++)_(l)},this.$delegator=function(s,l,n){var d=l[0]||"start";if(typeof d!="string"){if(Array.isArray(d[2])){var f=d[2][d[2].length-1],y=this.$modes[f];if(y)return y[s].apply(y,[d[1]].concat([].slice.call(l,1)))}d=d[0]||"start"}for(var _=0;_<this.$embeds.length;_++)if(this.$modes[this.$embeds[_]]){var v=d.split(this.$embeds[_]);if(!v[0]&&v[1]){l[0]=v[1];var y=this.$modes[this.$embeds[_]];return y[s].apply(y,l)}}var g=n.apply(this,l);return n?g:void 0},this.transformAction=function(s,l,n,d,f){if(this.$behaviour){var y=this.$behaviour.getBehaviours();for(var _ in y)if(y[_][l]){var v=y[_][l].apply(this,arguments);if(v)return v}}},this.getKeywords=function(s){if(!this.completionKeywords){var l=this.$tokenizer.rules,n=[];for(var d in l)for(var f=l[d],y=0,_=f.length;y<_;y++)if(typeof f[y].token=="string")/keyword|support|storage/.test(f[y].token)&&n.push(f[y].regex);else if(typeof f[y].token=="object"){for(var v=0,g=f[y].token.length;v<g;v++)if(/keyword|support|storage/.test(f[y].token[v])){var d=f[y].regex.match(/\(.+?\)/g)[v];n.push(d.substr(1,d.length-2))}}this.completionKeywords=n}return s?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(s,l,n,d){var f=this.$keywordList||this.$createKeywordList();return f.map(function(y){return{name:y,value:y,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(o.prototype),D.Mode=o}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function($,D,V){var R=$("./lib/dom"),x=(function(){function p(c){this.session=c,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return p.prototype.getRowLength=function(c){var h;return this.lineWidgets?h=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[c]?1+h:this.$wrapData[c].length+1+h},p.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(c+=h.rowCount)}),c},p.prototype.$onChangeEditor=function(c){this.attach(c.editor)},p.prototype.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),this.editor=c,c&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},p.prototype.detach=function(c){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},p.prototype.updateOnFold=function(c,h){var a=h.lineWidgets;if(!(!a||!c.action)){for(var i=c.data,r=i.start.row,o=i.end.row,s=c.action=="add",l=r+1;l<o;l++)a[l]&&(a[l].hidden=s);a[o]&&(s?a[r]?a[o].hidden=s:a[r]=a[o]:(a[r]==a[o]&&(a[r]=void 0),a[o].hidden=s))}},p.prototype.updateOnChange=function(c){var h=this.session.lineWidgets;if(h){var a=c.start.row,i=c.end.row-a;if(i!==0)if(c.action=="remove"){var r=h.splice(a+1,i);!h[a]&&r[r.length-1]&&(h[a]=r.pop()),r.forEach(function(s){s&&this.removeLineWidget(s)},this),this.$updateRows()}else{var o=new Array(i);h[a]&&h[a].column!=null&&c.start.column>h[a].column&&a++,o.unshift(a,0),h.splice.apply(h,o),this.$updateRows()}}},p.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var h=!0;c.forEach(function(a,i){if(a)for(h=!1,a.row=i;a.$oldWidget;)a.$oldWidget.row=i,a=a.$oldWidget}),h&&(this.session.lineWidgets=null)}},p.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[c.row];return h&&(c.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},p.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var h=this.editor.renderer;c.html&&!c.el&&(c.el=R.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=R.createElement("div"),c.el.textContent=c.text),c.el&&(R.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&R.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",h.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex="3"),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/h.layerConfig.lineHeight);var a=this.session.getFoldAt(c.row,0);if(c.$fold=a,a){var i=this.session.lineWidgets;c.row==a.end.row&&!i[a.start.row]?i[a.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(c),c},p.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[c.row];if(h==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;h;){if(h.$oldWidget==c){h.$oldWidget=c.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},p.prototype.getWidgetsAtRow=function(c){for(var h=this.session.lineWidgets,a=h&&h[c],i=[];a;)i.push(a),a=a.$oldWidget;return i},p.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},p.prototype.measureWidgets=function(c,h){var a=this.session._changedWidgets,i=h.layerConfig;if(!(!a||!a.length)){for(var r=1/0,o=0;o<a.length;o++){var s=a[o];if(!(!s||!s.el)&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,h.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var l=s.h/i.lineHeight;s.coverLine&&(l-=this.session.getRowLineCount(s.row),l<0&&(l=0)),s.rowCount!=l&&(s.rowCount=l,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},p.prototype.renderWidgets=function(c,h){var a=h.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,a.firstRow),o=Math.max(this.lastRow,a.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,h.$cursorLayer.config=a;for(var s=r;s<=o;s++){var l=i[s];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,h.container.appendChild(l.el));var n=h.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;l.coverLine||(n+=a.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=n-a.offset+"px";var d=l.coverGutter?0:h.gutterWidth;l.fixedWidth||(d-=h.scrollLeft),l.el.style.left=d+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=a.width+2*a.padding+"px"),l.fixedWidth?l.el.style.right=h.scrollBar.getWidth()+"px":l.el.style.right=""}}}},p})();D.LineWidgets=x}),ace.define("ace/apply_delta",["require","exports","module"],function($,D,V){D.applyDelta=function(R,x,p){var c=x.start.row,h=x.start.column,a=R[c]||"";switch(x.action){case"insert":var i=x.lines;if(i.length===1)R[c]=a.substring(0,h)+x.lines[0]+a.substring(h);else{var r=[c,1].concat(x.lines);R.splice.apply(R,r),R[c]=a.substring(0,h)+R[c],R[c+x.lines.length-1]+=a.substring(h)}break;case"remove":var o=x.end.column,s=x.end.row;c===s?R[c]=a.substring(0,h)+a.substring(o):R.splice(c,s-c+1,a.substring(0,h)+R[s].substring(o));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function($,D,V){var R=$("./lib/oop"),x=$("./lib/event_emitter").EventEmitter,p=(function(){function a(i,r,o){this.$onChange=this.onChange.bind(this),this.attach(i),typeof r!="number"?this.setPosition(r.row,r.column):this.setPosition(r,o)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var r=h(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},a.prototype.setPosition=function(i,r,o){var s;if(o?s={row:i,column:r}:s=this.$clipPositionToDocument(i,r),!(this.row==s.row&&this.column==s.column)){var l={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:l,value:s})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(i,r){var o={};return i>=this.document.getLength()?(o.row=Math.max(0,this.document.getLength()-1),o.column=this.document.getLine(o.row).length):i<0?(o.row=0,o.column=0):(o.row=i,o.column=Math.min(this.document.getLine(o.row).length,Math.max(0,r))),r<0&&(o.column=0),o},a})();p.prototype.$insertRight=!1,R.implement(p.prototype,x);function c(a,i,r){var o=r?a.column<=i.column:a.column<i.column;return a.row<i.row||a.row==i.row&&o}function h(a,i,r){var o=a.action=="insert",s=(o?1:-1)*(a.end.row-a.start.row),l=(o?1:-1)*(a.end.column-a.start.column),n=a.start,d=o?n:a.end;return c(i,n,r)?{row:i.row,column:i.column}:c(d,i,!r)?{row:i.row+s,column:i.column+(i.row==d.row?l:0)}:{row:n.row,column:n.column}}D.Anchor=p}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function($,D,V){var R=$("./lib/oop"),x=$("./apply_delta").applyDelta,p=$("./lib/event_emitter").EventEmitter,c=$("./range").Range,h=$("./anchor").Anchor,a=(function(){function i(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return i.prototype.setValue=function(r){var o=this.getLength()-1;this.remove(new c(0,0,o,this.getLine(o).length)),this.insert({row:0,column:0},r||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(r,o){return new h(this,r,o)},i.prototype.$detectNewLine=function(r){var o=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=o?o[1]:`
299
- `,this._signal("changeNewLineMode")},i.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
300
- `;case"unix":return`
301
- `;default:return this.$autoNewLine||`
302
- `}},i.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(r){return r==`\r
303
- `||r=="\r"||r==`
304
- `},i.prototype.getLine=function(r){return this.$lines[r]||""},i.prototype.getLines=function(r,o){return this.$lines.slice(r,o+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(r){var o;if(r.start.row===r.end.row)o=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{o=this.getLines(r.start.row,r.end.row),o[0]=(o[0]||"").substring(r.start.column);var s=o.length-1;r.end.row-r.start.row==s&&(o[s]=o[s].substring(0,r.end.column))}return o},i.prototype.insertLines=function(r,o){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,o)},i.prototype.removeLines=function(r,o){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,o)},i.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},i.prototype.insert=function(r,o){return this.getLength()<=1&&this.$detectNewLine(o),this.insertMergedLines(r,this.$split(o))},i.prototype.insertInLine=function(r,o){var s=this.clippedPos(r.row,r.column),l=this.pos(r.row,r.column+o.length);return this.applyDelta({start:s,end:l,action:"insert",lines:[o]},!0),this.clonePos(l)},i.prototype.clippedPos=function(r,o){var s=this.getLength();r===void 0?r=s:r<0?r=0:r>=s&&(r=s-1,o=void 0);var l=this.getLine(r);return o==null&&(o=l.length),o=Math.min(Math.max(o,0),l.length),{row:r,column:o}},i.prototype.clonePos=function(r){return{row:r.row,column:r.column}},i.prototype.pos=function(r,o){return{row:r,column:o}},i.prototype.$clipPosition=function(r){var o=this.getLength();return r.row>=o?(r.row=Math.max(0,o-1),r.column=this.getLine(o-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},i.prototype.insertFullLines=function(r,o){r=Math.min(Math.max(r,0),this.getLength());var s=0;r<this.getLength()?(o=o.concat([""]),s=0):(o=[""].concat(o),r--,s=this.$lines[r].length),this.insertMergedLines({row:r,column:s},o)},i.prototype.insertMergedLines=function(r,o){var s=this.clippedPos(r.row,r.column),l={row:s.row+o.length-1,column:(o.length==1?s.column:0)+o[o.length-1].length};return this.applyDelta({start:s,end:l,action:"insert",lines:o}),this.clonePos(l)},i.prototype.remove=function(r){var o=this.clippedPos(r.start.row,r.start.column),s=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:o,end:s,action:"remove",lines:this.getLinesForRange({start:o,end:s})}),this.clonePos(o)},i.prototype.removeInLine=function(r,o,s){var l=this.clippedPos(r,o),n=this.clippedPos(r,s);return this.applyDelta({start:l,end:n,action:"remove",lines:this.getLinesForRange({start:l,end:n})},!0),this.clonePos(l)},i.prototype.removeFullLines=function(r,o){r=Math.min(Math.max(0,r),this.getLength()-1),o=Math.min(Math.max(0,o),this.getLength()-1);var s=o==this.getLength()-1&&r>0,l=o<this.getLength()-1,n=s?r-1:r,d=s?this.getLine(n).length:0,f=l?o+1:o,y=l?0:this.getLine(f).length,_=new c(n,d,f,y),v=this.$lines.slice(r,o+1);return this.applyDelta({start:_.start,end:_.end,action:"remove",lines:this.getLinesForRange(_)}),v},i.prototype.removeNewLine=function(r){r<this.getLength()-1&&r>=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(r,o){if(r instanceof c||(r=c.fromPoints(r.start,r.end)),o.length===0&&r.isEmpty())return r.start;if(o==this.getTextRange(r))return r.end;this.remove(r);var s;return o?s=this.insert(r.start,o):s=r.start,s},i.prototype.applyDeltas=function(r){for(var o=0;o<r.length;o++)this.applyDelta(r[o])},i.prototype.revertDeltas=function(r){for(var o=r.length-1;o>=0;o--)this.revertDelta(r[o])},i.prototype.applyDelta=function(r,o){var s=r.action=="insert";(s?r.lines.length<=1&&!r.lines[0]:!c.comparePoints(r.start,r.end))||(s&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(x(this.$lines,r,o),this._signal("change",r)))},i.prototype.$safeApplyDelta=function(r){var o=this.$lines.length;(r.action=="remove"&&r.start.row<o&&r.end.row<o||r.action=="insert"&&r.start.row<=o)&&this.applyDelta(r)},i.prototype.$splitAndapplyLargeDelta=function(r,o){for(var s=r.lines,l=s.length-o+1,n=r.start.row,d=r.start.column,f=0,y=0;f<l;f=y){y+=o-1;var _=s.slice(f,y);_.push(""),this.applyDelta({start:this.pos(n+f,d),end:this.pos(n+y,d=0),action:r.action,lines:_},!0)}r.lines=s.slice(f),r.start.row=n+f,r.start.column=d,this.applyDelta(r,!0)},i.prototype.revertDelta=function(r){this.$safeApplyDelta({start:this.clonePos(r.start),end:this.clonePos(r.end),action:r.action=="insert"?"remove":"insert",lines:r.lines.slice()})},i.prototype.indexToPosition=function(r,o){for(var s=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,n=o||0,d=s.length;n<d;n++)if(r-=s[n].length+l,r<0)return{row:n,column:r+s[n].length+l};return{row:d-1,column:r+s[d-1].length+l}},i.prototype.positionToIndex=function(r,o){for(var s=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,n=0,d=Math.min(r.row,s.length),f=o||0;f<d;++f)n+=s[f].length+l;return n+r.column},i.prototype.$split=function(r){return r.split(/\r\n|\r|\n/)},i})();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",R.implement(a.prototype,p),D.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function($,D,V){var R=$("./lib/oop"),x=$("./lib/event_emitter").EventEmitter,p=(function(){function c(h,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var i=this;this.$worker=function(){if(i.running){for(var r=new Date,o=i.currentLine,s=-1,l=i.doc,n=o;i.lines[o];)o++;var d=l.getLength(),f=0;for(i.running=!1;o<d;){i.$tokenizeRow(o),s=o;do o++;while(i.lines[o]);if(f++,f%5===0&&new Date-r>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=o,s==-1&&(s=o),n<=s&&i.fireUpdateEvent(n,s)}}}return c.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(h,a){var i={first:h,last:a};this._signal("update",{data:i})},c.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(h){var a=h.start.row,i=h.end.row-a;if(i===0)this.lines[a]=null;else if(h.action=="remove")this.lines.splice(a,i+1,null),this.states.splice(a,i+1,null);else{var r=Array(i+1);r.unshift(a,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},c.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},c.prototype.$tokenizeRow=function(h){var a=this.doc.getLine(h),i=this.states[h-1],r=this.tokenizer.getLineTokens(a,i,h);return this.states[h]+""!=r.state+""?(this.states[h]=r.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=r.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c})();R.implement(p.prototype,x),D.BackgroundTokenizer=p}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function($,D,V){var R=$("./lib/lang"),x=$("./range").Range,p=(function(){function c(h,a,i){i===void 0&&(i="text"),this.setRegexp(h),this.clazz=a,this.type=i,this.docLen=0}return c.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},c.prototype.update=function(h,a,i,r){if(this.regExp){for(var o=r.firstRow,s=r.lastRow,l={},n=i.$editor&&i.$editor.$search,d=n&&n.$isMultilineSearch(i.$editor.getLastSearchOptions()),f=o;f<=s;f++){var y=this.cache[f];if(y==null||i.getValue().length!=this.docLen){if(d){y=[];var _=n.$multiLineForward(i,this.regExp,f,s);if(_){var v=_.endRow<=s?_.endRow-1:s;v>f&&(f=v),y.push(new x(_.startRow,_.startCol,_.endRow,_.endCol))}y.length>this.MAX_RANGES&&(y=y.slice(0,this.MAX_RANGES))}else y=R.getMatchOffsets(i.getLine(f),this.regExp),y.length>this.MAX_RANGES&&(y=y.slice(0,this.MAX_RANGES)),y=y.map(function(S){return new x(f,S.offset,f,S.offset+S.length)});this.cache[f]=y.length?y:""}if(y.length!==0)for(var g=y.length;g--;){var w=y[g].toScreenRange(i),b=w.toString();l[b]||(l[b]=!0,a.drawSingleLineMarker(h,w,this.clazz,r))}}this.docLen=i.getValue().length}},c})();p.prototype.MAX_RANGES=500,D.SearchHighlight=p}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function($,D,V){var R=(function(){function v(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return v.prototype.addSession=function(g){this.$session=g},v.prototype.add=function(g,w,b){if(!this.$fromUndo&&g!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),w===!1||!this.lastDeltas){this.lastDeltas=[];var S=this.$undoStack.length;S>this.$undoDepth-1&&this.$undoStack.splice(0,S-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),g.id=this.$rev=++this.$maxRev}(g.action=="remove"||g.action=="insert")&&(this.$lastDelta=g),this.lastDeltas.push(g)}},v.prototype.addSelection=function(g,w){this.selections.push({value:g,rev:w||this.$rev})},v.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},v.prototype.markIgnored=function(g,w){w==null&&(w=this.$rev+1);for(var b=this.$undoStack,S=b.length;S--;){var T=b[S][0];if(T.id<=g)break;T.id<w&&(T.ignore=!0)}this.lastDeltas=null},v.prototype.getSelection=function(g,w){for(var b=this.selections,S=b.length;S--;){var T=b[S];if(T.rev<g)return w&&(T=b[S+1]),T}},v.prototype.getRevision=function(){return this.$rev},v.prototype.getDeltas=function(g,w){w==null&&(w=this.$rev+1);for(var b=this.$undoStack,S=null,T=0,j=b.length;j--;){var E=b[j][0];if(E.id<w&&!S&&(S=j+1),E.id<=g){T=j+1;break}}return b.slice(T,S)},v.prototype.getChangedRanges=function(g,w){w==null&&(w=this.$rev+1)},v.prototype.getChangedLines=function(g,w){w==null&&(w=this.$rev+1)},v.prototype.undo=function(g,w){this.lastDeltas=null;var b=this.$undoStack;if(x(b,b.length)){g||(g=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var S=b.pop(),T=null;return S&&(T=g.undoChanges(S,w),this.$redoStack.push(S),this.$syncRev()),this.$fromUndo=!1,T}},v.prototype.redo=function(g,w){if(this.lastDeltas=null,g||(g=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var b=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);_(this.$redoStack,b),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(j){j[0].id=++this.$maxRev},this)}var S=this.$redoStack.pop(),T=null;return S&&(T=g.redoChanges(S,w),this.$undoStack.push(S),this.$syncRev()),this.$fromUndo=!1,T},v.prototype.$syncRev=function(){var g=this.$undoStack,w=g[g.length-1],b=w&&w[0].id||0;this.$redoStackBaseRev=b,this.$rev=b},v.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},v.prototype.canUndo=function(){return this.$undoStack.length>0},v.prototype.canRedo=function(){return this.$redoStack.length>0},v.prototype.bookmark=function(g){g==null&&(g=this.$rev),this.mark=g},v.prototype.isAtBookmark=function(){return this.$rev===this.mark},v.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},v.prototype.fromJSON=function(g){this.reset(),this.$undoStack=g.$undoStack,this.$redoStack=g.$redoStack},v.prototype.$prettyPrint=function(g){return g?i(g):i(this.$undoStack)+`
305
- ---
306
- `+i(this.$redoStack)},v})();R.prototype.hasUndo=R.prototype.canUndo,R.prototype.hasRedo=R.prototype.canRedo,R.prototype.isClean=R.prototype.isAtBookmark,R.prototype.markClean=R.prototype.bookmark;function x(v,g){for(var w=g;w--;){var b=v[w];if(b&&!b[0].ignore){for(;w<g-1;){var S=s(v[w],v[w+1]);v[w]=S[0],v[w+1]=S[1],w++}return!0}}}var p=$("./range").Range,c=p.comparePoints;p.comparePoints;function h(v){return{row:v.row,column:v.column}}function a(v){return{start:h(v.start),end:h(v.end),action:v.action,lines:v.lines.slice()}}function i(v){if(v=v||this,Array.isArray(v))return v.map(i).join(`
307
- `);var g="";return v.action?(g=v.action=="insert"?"+":"-",g+="["+v.lines+"]"):v.value&&(Array.isArray(v.value)?g=v.value.map(r).join(`
308
- `):g=r(v.value)),v.start&&(g+=r(v)),(v.id||v.rev)&&(g+=" ("+(v.id||v.rev)+")"),g}function r(v){return v.start.row+":"+v.start.column+"=>"+v.end.row+":"+v.end.column}function o(v,g){var w=v.action=="insert",b=g.action=="insert";if(w&&b)if(c(g.start,v.end)>=0)n(g,v,-1);else if(c(g.start,v.start)<=0)n(v,g,1);else return null;else if(w&&!b)if(c(g.start,v.end)>=0)n(g,v,-1);else if(c(g.end,v.start)<=0)n(v,g,-1);else return null;else if(!w&&b)if(c(g.start,v.start)>=0)n(g,v,1);else if(c(g.start,v.start)<=0)n(v,g,1);else return null;else if(!w&&!b)if(c(g.start,v.start)>=0)n(g,v,1);else if(c(g.end,v.start)<=0)n(v,g,-1);else return null;return[g,v]}function s(v,g){for(var w=v.length;w--;)for(var b=0;b<g.length;b++)if(!o(v[w],g[b])){for(;w<v.length;){for(;b--;)o(g[b],v[w]);b=g.length,w++}return[v,g]}return v.selectionBefore=g.selectionBefore=v.selectionAfter=g.selectionAfter=null,[g,v]}function l(v,g){var w=v.action=="insert",b=g.action=="insert";if(w&&b)c(v.start,g.start)<0?n(g,v,1):n(v,g,1);else if(w&&!b)c(v.start,g.end)>=0?n(v,g,-1):(c(v.start,g.start)<=0||n(v,p.fromPoints(g.start,v.start),-1),n(g,v,1));else if(!w&&b)c(g.start,v.end)>=0?n(g,v,-1):(c(g.start,v.start)<=0||n(g,p.fromPoints(v.start,g.start),-1),n(v,g,1));else if(!w&&!b)if(c(g.start,v.end)>=0)n(g,v,-1);else if(c(g.end,v.start)<=0)n(v,g,-1);else{var S,T;return c(v.start,g.start)<0&&(S=v,v=f(v,g.start)),c(v.end,g.end)>0&&(T=f(v,g.end)),d(g.end,v.start,v.end,-1),T&&!S&&(v.lines=T.lines,v.start=T.start,v.end=T.end,T=v),[g,S,T].filter(Boolean)}return[g,v]}function n(v,g,w){d(v.start,g.start,g.end,w),d(v.end,g.start,g.end,w)}function d(v,g,w,b){v.row==(b==1?g:w).row&&(v.column+=b*(w.column-g.column)),v.row+=b*(w.row-g.row)}function f(v,g){var w=v.lines,b=v.end;v.end=h(g);var S=v.end.row-v.start.row,T=w.splice(S,w.length),j=S?g.column:g.column-v.start.column;w.push(T[0].substring(0,j)),T[0]=T[0].substr(j);var E={start:h(g),end:b,lines:T,action:v.action};return E}function y(v,g){g=a(g);for(var w=v.length;w--;){for(var b=v[w],S=0;S<b.length;S++){var T=b[S],j=l(T,g);g=j[0],j.length!=2&&(j[2]?(b.splice(S+1,1,j[1],j[2]),S++):j[1]||(b.splice(S,1),S--))}b.length||v.splice(w,1)}return v}function _(v,g){for(var w=0;w<g.length;w++)for(var b=g[w],S=0;S<b.length;S++)y(v,b[S])}D.UndoManager=R}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function($,D,V){var R=$("../range").Range,x=(function(){function p(c,h){this.foldData=c,Array.isArray(h)?this.folds=h:h=this.folds=[h];var a=h[h.length-1];this.range=new R(h[0].start.row,h[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return p.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(h){h.start.row+=c,h.end.row+=c})},p.prototype.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(h,a){return-h.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},p.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},p.prototype.walk=function(c,h,a){var i=0,r=this.folds,o,s,l,n=!0;h==null&&(h=this.end.row,a=this.end.column);for(var d=0;d<r.length;d++){if(o=r[d],s=o.range.compareStart(h,a),s==-1){c(null,h,a,i,n);return}if(l=c(null,o.start.row,o.start.column,i,n),l=!l&&c(o.placeholder,o.start.row,o.start.column,i),l||s===0)return;n=!o.sameRow,i=o.end.column}c(null,h,a,i,n)},p.prototype.getNextFoldTo=function(c,h){for(var a,i,r=0;r<this.folds.length;r++){if(a=this.folds[r],i=a.range.compareEnd(c,h),i==-1)return{fold:a,kind:"after"};if(i===0)return{fold:a,kind:"inside"}}return null},p.prototype.addRemoveChars=function(c,h,a){var i=this.getNextFoldTo(c,h),r,o;if(i){if(r=i.fold,i.kind=="inside"&&r.start.column!=h&&r.start.row!=c)window.console&&window.console.log(c,h,r);else if(r.start.row==c){o=this.folds;var s=o.indexOf(r);for(s===0&&(this.start.column+=a),s;s<o.length;s++){if(r=o[s],r.start.column+=a,!r.sameRow)return;r.end.column+=a}this.end.column+=a}}},p.prototype.split=function(c,h){var a=this.getNextFoldTo(c,h);if(!a||a.kind=="inside")return null;var i=a.fold,r=this.folds,o=this.foldData,s=r.indexOf(i),l=r[s-1];this.end.row=l.end.row,this.end.column=l.end.column,r=r.splice(s,r.length-s);var n=new p(o,r);return o.splice(o.indexOf(this)+1,0,n),n},p.prototype.merge=function(c){for(var h=c.folds,a=0;a<h.length;a++)this.addFold(h[a]);var i=this.foldData;i.splice(i.indexOf(c),1)},p.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(h){c.push(" "+h.toString())}),c.push("]"),c.join(`
309
- `)},p.prototype.idxToPosition=function(c){for(var h=0,a=0;a<this.folds.length;a++){var i=this.folds[a];if(c-=i.start.column-h,c<0)return{row:i.start.row,column:i.start.column+c};if(c-=i.placeholder.length,c<0)return i.start;h=i.end.column}return{row:this.end.row,column:this.end.column+c}},p})();D.FoldLine=x}),ace.define("ace/range_list",["require","exports","module","ace/range"],function($,D,V){var R=$("./range").Range,x=R.comparePoints,p=(function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(h,a,i){for(var r=this.ranges,o=i||0;o<r.length;o++){var s=r[o],l=x(h,s.end);if(!(l>0)){var n=x(h,s.start);return l===0?a&&n!==0?-o-2:o:n>0||n===0&&!a?o:-o-1}}return-o-1},c.prototype.add=function(h){var a=!h.isEmpty(),i=this.pointIndex(h.start,a);i<0&&(i=-i-1);var r=this.pointIndex(h.end,a,i);return r<0?r=-r-1:r++,this.ranges.splice(i,r-i,h)},c.prototype.addList=function(h){for(var a=[],i=h.length;i--;)a.push.apply(a,this.add(h[i]));return a},c.prototype.substractPoint=function(h){var a=this.pointIndex(h);if(a>=0)return this.ranges.splice(a,1)},c.prototype.merge=function(){var h=[],a=this.ranges;a=a.sort(function(l,n){return x(l.start,n.start)});for(var i=a[0],r,o=1;o<a.length;o++){r=i,i=a[o];var s=x(r.end,i.start);s<0||s==0&&!r.isEmpty()&&!i.isEmpty()||(x(r.end,i.end)<0&&(r.end.row=i.end.row,r.end.column=i.end.column),a.splice(o,1),h.push(i),i=r,o--)}return this.ranges=a,h},c.prototype.contains=function(h,a){return this.pointIndex({row:h,column:a})>=0},c.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},c.prototype.rangeAtPoint=function(h){var a=this.pointIndex(h);if(a>=0)return this.ranges[a]},c.prototype.clipRows=function(h,a){var i=this.ranges;if(i[0].start.row>a||i[i.length-1].start.row<h)return[];var r=this.pointIndex({row:h,column:0});r<0&&(r=-r-1);var o=this.pointIndex({row:a,column:0},r);o<0&&(o=-o-1);for(var s=[],l=r;l<o;l++)s.push(i[l]);return s},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(h){this.session&&this.detach(),this.session=h,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},c.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},c.prototype.$onChange=function(h){for(var a=h.start,i=h.end,r=a.row,o=i.row,s=this.ranges,l=0,n=s.length;l<n;l++){var d=s[l];if(d.end.row>=r)break}if(h.action=="insert")for(var f=o-r,y=-a.column+i.column;l<n;l++){var d=s[l];if(d.start.row>r)break;if(d.start.row==r&&d.start.column>=a.column&&(d.start.column==a.column&&this.$bias<=0||(d.start.column+=y,d.start.row+=f)),d.end.row==r&&d.end.column>=a.column){if(d.end.column==a.column&&this.$bias<0)continue;d.end.column==a.column&&y>0&&l<n-1&&d.end.column>d.start.column&&d.end.column==s[l+1].start.column&&(d.end.column-=y),d.end.column+=y,d.end.row+=f}}else for(var f=r-o,y=a.column-i.column;l<n;l++){var d=s[l];if(d.start.row>o)break;d.end.row<o&&(r<d.end.row||r==d.end.row&&a.column<d.end.column)?(d.end.row=r,d.end.column=a.column):d.end.row==o?d.end.column<=i.column?(f||d.end.column>a.column)&&(d.end.column=a.column,d.end.row=a.row):(d.end.column+=y,d.end.row+=f):d.end.row>o&&(d.end.row+=f),d.start.row<o&&(r<d.start.row||r==d.start.row&&a.column<d.start.column)?(d.start.row=r,d.start.column=a.column):d.start.row==o?d.start.column<=i.column?(f||d.start.column>a.column)&&(d.start.column=a.column,d.start.row=a.row):(d.start.column+=y,d.start.row+=f):d.start.row>o&&(d.start.row+=f)}if(f!=0&&l<n)for(;l<n;l++){var d=s[l];d.start.row+=f,d.end.row+=f}},c})();p.prototype.comparePoints=x,D.RangeList=p}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function($,D,V){var R=this&&this.__extends||(function(){var r=function(o,s){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var d in n)Object.prototype.hasOwnProperty.call(n,d)&&(l[d]=n[d])},r(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");r(o,s);function l(){this.constructor=o}o.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),x=$("../range_list").RangeList,p=(function(r){R(o,r);function o(s,l){var n=r.call(this)||this;return n.foldLine=null,n.placeholder=l,n.range=s,n.start=s.start,n.end=s.end,n.sameRow=s.start.row==s.end.row,n.subFolds=n.ranges=[],n}return o.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},o.prototype.setFoldLine=function(s){this.foldLine=s,this.subFolds.forEach(function(l){l.setFoldLine(s)})},o.prototype.clone=function(){var s=this.range.clone(),l=new o(s,this.placeholder);return this.subFolds.forEach(function(n){l.subFolds.push(n.clone())}),l.collapseChildren=this.collapseChildren,l},o.prototype.addSubFold=function(s){if(!this.range.isEqual(s)){h(s,this.start);for(var y=s.start.row,_=s.start.column,l=0,n=-1;l<this.subFolds.length&&(n=this.subFolds[l].range.compare(y,_),n==1);l++);var d=this.subFolds[l],f=0;if(n==0){if(d.range.containsRange(s))return d.addSubFold(s);f=1}for(var y=s.range.end.row,_=s.range.end.column,v=l,n=-1;v<this.subFolds.length&&(n=this.subFolds[v].range.compare(y,_),n==1);v++);n==0&&v++;for(var g=this.subFolds.splice(l,v-l,s),w=n==0?g.length-1:g.length,b=f;b<w;b++)s.addSubFold(g[b]);return s.setFoldLine(this.foldLine),s}},o.prototype.restoreRange=function(s){return i(s,this.start)},o})(x);function c(r,o){r.row-=o.row,r.row==0&&(r.column-=o.column)}function h(r,o){c(r.start,o),c(r.end,o)}function a(r,o){r.row==0&&(r.column+=o.column),r.row+=o.row}function i(r,o){a(r.start,o),a(r.end,o)}D.Fold=p}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function($,D,V){var R=$("../range").Range,x=$("./fold_line").FoldLine,p=$("./fold").Fold,c=$("../token_iterator").TokenIterator,h=$("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(i,r,o){var s=this.getFoldLine(i);if(!s)return null;for(var l=s.folds,n=0;n<l.length;n++){var d=l[n].range;if(d.contains(i,r)){if(o==1&&d.isEnd(i,r)&&!d.isEmpty())continue;if(o==-1&&d.isStart(i,r)&&!d.isEmpty())continue;return l[n]}}},this.getFoldsInRange=function(i){var r=i.start,o=i.end,s=this.$foldData,l=[];r.column+=1,o.column-=1;for(var n=0;n<s.length;n++){var d=s[n].range.compareRange(i);if(d!=2){if(d==-2)break;for(var f=s[n].folds,y=0;y<f.length;y++){var _=f[y];if(d=_.range.compareRange(i),d==-2)break;if(d==2)continue;if(d==42)break;l.push(_)}}}return r.column-=1,o.column+=1,l},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var r=[];i.forEach(function(o){r=r.concat(this.getFoldsInRange(o))},this)}else var r=this.getFoldsInRange(i);return r},this.getAllFolds=function(){for(var i=[],r=this.$foldData,o=0;o<r.length;o++)for(var s=0;s<r[o].folds.length;s++)i.push(r[o].folds[s]);return i},this.getFoldStringAt=function(i,r,o,s){if(s=s||this.getFoldLine(i),!s)return null;for(var l={end:{column:0}},n,d,f=0;f<s.folds.length;f++){d=s.folds[f];var y=d.range.compareEnd(i,r);if(y==-1){n=this.getLine(d.start.row).substring(l.end.column,d.start.column);break}else if(y===0)return null;l=d}return n||(n=this.getLine(d.start.row).substring(l.end.column)),o==-1?n.substring(0,r-l.end.column):o==1?n.substring(r-l.end.column):n},this.getFoldLine=function(i,r){var o=this.$foldData,s=0;for(r&&(s=o.indexOf(r)),s==-1&&(s=0),s;s<o.length;s++){var l=o[s];if(l.start.row<=i&&l.end.row>=i)return l;if(l.end.row>i)return null}return null},this.getNextFoldLine=function(i,r){var o=this.$foldData,s=0;for(r&&(s=o.indexOf(r)),s==-1&&(s=0),s;s<o.length;s++){var l=o[s];if(l.end.row>=i)return l}return null},this.getFoldedRowCount=function(i,r){for(var o=this.$foldData,s=r-i+1,l=0;l<o.length;l++){var n=o[l],d=n.end.row,f=n.start.row;if(d>=r){f<r&&(f>=i?s-=r-f:s=0);break}else d>=i&&(f>=i?s-=d-f:s-=d-i+1)}return s},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(r,o){return r.start.row-o.start.row}),i},this.addFold=function(i,r){var o=this.$foldData,s=!1,l;i instanceof p?l=i:(l=new p(r,i),l.collapseChildren=r.collapseChildren),this.$clipRangeToDocument(l.range);var n=l.start.row,d=l.start.column,f=l.end.row,y=l.end.column,_=this.getFoldAt(n,d,1),v=this.getFoldAt(f,y,-1);if(_&&v==_)return _.addSubFold(l);_&&!_.range.isStart(n,d)&&this.removeFold(_),v&&!v.range.isEnd(f,y)&&this.removeFold(v);var g=this.getFoldsInRange(l.range);g.length>0&&(this.removeFolds(g),l.collapseChildren||g.forEach(function(T){l.addSubFold(T)}));for(var w=0;w<o.length;w++){var b=o[w];if(f==b.start.row){b.addFold(l),s=!0;break}else if(n==b.end.row){if(b.addFold(l),s=!0,!l.sameRow){var S=o[w+1];if(S&&S.start.row==f){b.merge(S);break}}break}else if(f<=b.start.row)break}return s||(b=this.$addFoldLine(new x(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(b.start.row,b.start.row):this.$updateRowLengthCache(b.start.row,b.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(i){i.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(i){var r=i.foldLine,o=r.start.row,s=r.end.row,l=this.$foldData,n=r.folds;if(n.length==1)l.splice(l.indexOf(r),1);else if(r.range.isEnd(i.end.row,i.end.column))n.pop(),r.end.row=n[n.length-1].end.row,r.end.column=n[n.length-1].end.column;else if(r.range.isStart(i.start.row,i.start.column))n.shift(),r.start.row=n[0].start.row,r.start.column=n[0].start.column;else if(i.sameRow)n.splice(n.indexOf(i),1);else{var d=r.split(i.start.row,i.start.column);n=d.folds,n.shift(),d.start.row=n[0].start.row,d.start.column=n[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var r=[],o=0;o<i.length;o++)r.push(i[o]);r.forEach(function(s){this.removeFold(s)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(r){i.restoreRange(r),this.addFold(r)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(i,r){var o,s;if(i==null)o=new R(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof i=="number")o=new R(i,0,i,this.getLine(i).length);else if("row"in i)o=R.fromPoints(i,i);else{if(Array.isArray(i))return s=[],i.forEach(function(n){s=s.concat(this.unfold(n))},this),s;o=i}s=this.getFoldsInRangeList(o);for(var l=s;s.length==1&&R.comparePoints(s[0].start,o.start)<0&&R.comparePoints(s[0].end,o.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(o);if(r!=!1?this.removeFolds(s):this.expandFolds(s),l.length)return l},this.isRowFolded=function(i,r){return!!this.getFoldLine(i,r)},this.getRowFoldEnd=function(i,r){var o=this.getFoldLine(i,r);return o?o.end.row:i},this.getRowFoldStart=function(i,r){var o=this.getFoldLine(i,r);return o?o.start.row:i},this.getFoldDisplayLine=function(i,r,o,s,l){s==null&&(s=i.start.row),l==null&&(l=0),r==null&&(r=i.end.row),o==null&&(o=this.getLine(r).length);var n=this.doc,d="";return i.walk(function(f,y,_,v){if(!(y<s)){if(y==s){if(_<l)return;v=Math.max(l,v)}f!=null?d+=f:d+=n.getLine(y).substring(v,_)}},r,o),d},this.getDisplayLine=function(i,r,o,s){var l=this.getFoldLine(i);if(l)return this.getFoldDisplayLine(l,i,r,o,s);var n;return n=this.doc.getLine(i),n.substring(s||0,r||n.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(r){var o=r.folds.map(function(s){return s.clone()});return new x(i,o)}),i},this.toggleFold=function(i){var r=this.selection,o=r.getRange(),s,l;if(o.isEmpty()){var n=o.start;if(s=this.getFoldAt(n.row,n.column),s){this.expandFold(s);return}else if(i){var d=this.getFoldLine(n.row);d&&this.expandFolds(d.folds);return}else(l=this.findMatchingBracket(n))?o.comparePoint(l)==1?o.end=l:(o.start=l,o.start.column++,o.end.column--):(l=this.findMatchingBracket({row:n.row,column:n.column+1}))?(o.comparePoint(l)==1?o.end=l:o.start=l,o.start.column++):o=this.getCommentFoldRange(n.row,n.column)||o}else{var f=this.getFoldsInRange(o);if(i&&f.length){this.expandFolds(f);return}else f.length==1&&(s=f[0])}if(s||(s=this.getFoldAt(o.start.row,o.start.column)),s&&s.range.toString()==o.toString()){this.expandFold(s);return}var y="...";if(!o.isMultiLine()){if(y=this.getTextRange(o),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,o)},this.getCommentFoldRange=function(i,r,o){var s=new c(this,i,r),l=s.getCurrentToken(),n=l&&l.type;if(l&&/^comment|string/.test(n)){n=n.match(/comment|string/)[0],n=="comment"&&(n+="|doc-start|\\.doc");var d=new RegExp(n),f=new R;if(o!=1){do l=s.stepBackward();while(l&&d.test(l.type));l=s.stepForward()}f.start.row=s.getCurrentTokenRow(),f.start.column=s.getCurrentTokenColumn()+l.value.length,s=new c(this,i,r);var y=this.getState(s.$row);if(o!=-1){var _=-1;do if(l=s.stepForward(),_==-1){var v=this.getState(s.$row);y.toString()!==v.toString()&&(_=s.$row)}else if(s.$row>_)break;while(l&&d.test(l.type));l=s.stepBackward()}else l=s.getCurrentToken();return f.end.row=s.getCurrentTokenRow(),f.end.column=s.getCurrentTokenColumn(),f.start.row==f.end.row&&f.start.column>f.end.column?void 0:f}},this.foldAll=function(i,r,o,s){o==null&&(o=1e5);var l=this.foldWidgets;if(l){r=r||this.getLength(),i=i||0;for(var n=i;n<r;n++)if(l[n]==null&&(l[n]=this.getFoldWidget(n)),l[n]=="start"&&!(s&&!s(n))){var d=this.getFoldWidgetRange(n);d&&d.isMultiLine()&&d.end.row<=r&&d.start.row>=i&&(n=d.end.row,d.collapseChildren=o,this.addFold("...",d))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(r){for(var o=i.getTokens(r),s=0;s<o.length;s++){var l=o[s];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var r=this.$foldMode;this.$setFolding(null),this.$setFolding(r)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(i,r){var o=this.foldWidgets;if(!o||r&&o[i])return{};for(var s=i-1,l;s>=0;){var n=o[s];if(n==null&&(n=o[s]=this.getFoldWidget(s)),n=="start"){var d=this.getFoldWidgetRange(s);if(l||(l=d),d&&d.end.row>=i)break}s--}return{range:s!==-1&&d,firstRange:l}},this.onFoldWidgetClick=function(i,r){r instanceof h&&(r=r.domEvent);var o={children:r.shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey},s=this.$toggleFoldWidget(i,o);if(!s){var l=r.target||r.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,r){if(this.getFoldWidget){var o=this.getFoldWidget(i),s=this.getLine(i),l=o==="end"?-1:1,n=this.getFoldAt(i,l===-1?0:s.length,l);if(n)return r.children||r.all?this.removeFold(n):this.expandFold(n),n;var d=this.getFoldWidgetRange(i,!0);if(d&&!d.isMultiLine()&&(n=this.getFoldAt(d.start.row,d.start.column,1),n&&d.isEqual(n.range)))return this.removeFold(n),n;if(r.siblings){var f=this.getParentFoldRangeData(i);if(f.range)var y=f.range.start.row+1,_=f.range.end.row;this.foldAll(y,_,r.all?1e4:0)}else r.children?(_=d?d.end.row:this.getLength(),this.foldAll(i+1,_,r.all?1e4:0)):d&&(r.all&&(d.collapseChildren=1e4),this.addFold("...",d));return d}},this.toggleFoldWidget=function(i){var r=this.selection.getCursor().row;r=this.getRowFoldStart(r);var o=this.$toggleFoldWidget(r,{});if(!o){var s=this.getParentFoldRangeData(r,!0);if(o=s.range||s.firstRange,o){r=o.start.row;var l=this.getFoldAt(r,this.getLine(r).length,1);l?this.removeFold(l):this.addFold("...",o)}}},this.updateFoldWidgets=function(i){var r=i.start.row,o=i.end.row-r;if(o===0)this.foldWidgets[r]=null;else if(i.action=="remove")this.foldWidgets.splice(r,o+1,null);else{var s=Array(o+1);s.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(i){var r=i.data;r.first!=r.last&&this.foldWidgets.length>r.first&&this.foldWidgets.splice(r.first,this.foldWidgets.length)}}D.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function($,D,V){var R=$("../token_iterator").TokenIterator,x=$("../range").Range;function p(){this.findMatchingBracket=function(c,h){if(c.column==0)return null;var a=h||this.getLine(c.row).charAt(c.column-1);if(a=="")return null;var i=a.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],c):this.$findOpeningBracket(i[2],c):null},this.getBracketRange=function(c){var h=this.getLine(c.row),a=!0,i,r=h.charAt(c.column-1),o=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(o||(r=h.charAt(c.column),c={row:c.row,column:c.column+1},o=r&&r.match(/([\(\[\{])|([\)\]\}])/),a=!1),!o)return null;if(o[1]){var s=this.$findClosingBracket(o[1],c);if(!s)return null;i=x.fromPoints(c,s),a||(i.end.column++,i.start.column--),i.cursor=i.end}else{var s=this.$findOpeningBracket(o[2],c);if(!s)return null;i=x.fromPoints(s,c),a||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(c,h){var a=this.getLine(c.row),i=/([\(\[\{])|([\)\]\}])/,r=!h&&a.charAt(c.column-1),o=r&&r.match(i);if(o||(r=(h===void 0||h)&&a.charAt(c.column),c={row:c.row,column:c.column+1},o=r&&r.match(i)),!o)return null;var s=new x(c.row,c.column-1,c.row,c.column),l=o[1]?this.$findClosingBracket(o[1],c):this.$findOpeningBracket(o[2],c);if(!l)return[s];var n=new x(l.row,l.column,l.row,l.column+1);return[s,n]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,h,a){var i=this.$brackets[c],r=1,o=new R(this,h.row,h.column),s=o.getCurrentToken();if(s||(s=o.stepForward()),!!s){a||(a=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=h.column-o.getCurrentTokenColumn()-2,n=s.value;;){for(;l>=0;){var d=n.charAt(l);if(d==i){if(r-=1,r==0)return{row:o.getCurrentTokenRow(),column:l+o.getCurrentTokenColumn()}}else d==c&&(r+=1);l-=1}do s=o.stepBackward();while(s&&!a.test(s.type));if(s==null)break;n=s.value,l=n.length-1}return null}},this.$findClosingBracket=function(c,h,a){var i=this.$brackets[c],r=1,o=new R(this,h.row,h.column),s=o.getCurrentToken();if(s||(s=o.stepForward()),!!s){a||(a=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=h.column-o.getCurrentTokenColumn();;){for(var n=s.value,d=n.length;l<d;){var f=n.charAt(l);if(f==i){if(r-=1,r==0)return{row:o.getCurrentTokenRow(),column:l+o.getCurrentTokenColumn()}}else f==c&&(r+=1);l+=1}do s=o.stepForward();while(s&&!a.test(s.type));if(s==null)break;l=0}return null}},this.getMatchingTags=function(c){var h=new R(this,c.row,c.column),a=this.$findTagName(h);if(a){var i=h.stepBackward();return i.value==="<"?this.$findClosingTag(h,a):this.$findOpeningTag(h,a)}},this.$findTagName=function(c){var h=c.getCurrentToken(),a=!1,i=!1;if(h&&h.type.indexOf("tag-name")===-1)do i?h=c.stepBackward():h=c.stepForward(),h&&(h.value==="/>"?i=!0:h.type.indexOf("tag-name")!==-1&&(a=!0));while(h&&!a);return h},this.$findClosingTag=function(c,h){var a,i=h.value,r=h.value,o=0,s=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);h=c.stepForward();var l=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length),n=!1;do{if(a=h,a.type.indexOf("tag-close")!==-1&&!n){var d=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);n=!0}if(h=c.stepForward(),h){if(h.value===">"&&!n){var d=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);n=!0}if(h.type.indexOf("tag-name")!==-1){if(i=h.value,r===i){if(a.value==="<")o++;else if(a.value==="</"&&(o--,o<0)){c.stepBackward();var f=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2);h=c.stepForward();var y=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),h&&h.value===">")var _=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if(r===i&&h.value==="/>"&&(o--,o<0))var f=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),y=f,_=y,d=new x(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(h&&o>=0);if(s&&d&&f&&_&&l&&y)return{openTag:new x(s.start.row,s.start.column,d.end.row,d.end.column),closeTag:new x(f.start.row,f.start.column,_.end.row,_.end.column),openTagName:l,closeTagName:y}},this.$findOpeningTag=function(c,h){var a=c.getCurrentToken(),i=h.value,r=0,o=c.getCurrentTokenRow(),s=c.getCurrentTokenColumn(),l=s+2,n=new x(o,s,o,l);c.stepForward();var d=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),!(!h||h.value!==">")){var f=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(h=a,o=c.getCurrentTokenRow(),s=c.getCurrentTokenColumn(),l=s+h.value.length,a=c.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(i===h.value)if(a.value==="<"){if(r++,r>0){var y=new x(o,s,o,l),_=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do h=c.stepForward();while(h&&h.value!==">");var v=new x(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else a.value==="</"&&r--}else if(h.value==="/>"){for(var g=0,w=a;w;){if(w.type.indexOf("tag-name")!==-1&&w.value===i){r--;break}else if(w.value==="<")break;w=c.stepBackward(),g++}for(var b=0;b<g;b++)c.stepForward()}}while(a&&r<=0);if(_&&v&&n&&f&&y&&d)return{openTag:new x(_.start.row,_.start.column,v.end.row,v.end.column),closeTag:new x(n.start.row,n.start.column,f.end.row,f.end.column),openTagName:y,closeTagName:d}}}}D.BracketMatch=p}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function($,D,V){var R=$("./lib/oop"),x=$("./lib/lang"),p=$("./bidihandler").BidiHandler,c=$("./config"),h=$("./lib/event_emitter").EventEmitter,a=$("./selection").Selection,i=$("./mode/text").Mode,r=$("./range").Range,o=$("./line_widgets").LineWidgets,s=$("./document").Document,l=$("./background_tokenizer").BackgroundTokenizer,n=$("./search_highlight").SearchHighlight,d=$("./undomanager").UndoManager,f=(function(){function E(A,M){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++E.$uid,this.$foldData.toString=function(){return this.join(`
310
- `)},this.$gutterCustomWidgets={},this.bgTokenizer=new l(new i().getTokenizer(),this);var C=this;this.bgTokenizer.on("update",function(L){C._signal("tokenizerUpdate",L)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof A!="object"||!A.getLine)&&(A=new s(A)),this.setDocument(A),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new p(this),c.resetOptions(this),this.setMode(M),c._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return E.prototype.$initOperationListeners=function(){var A=this;this.curOp=null,this.on("change",function(){A.curOp||(A.startOperation(),A.curOp.selectionBefore=A.$lastSel),A.curOp.docChanged=!0},!0),this.on("changeSelection",function(){A.curOp||(A.startOperation(),A.curOp.selectionBefore=A.$lastSel),A.curOp.selectionChanged=!0},!0),this.$operationResetTimer=x.delayedCall(this.endOperation.bind(this,!0))},E.prototype.startOperation=function(A){if(this.curOp){if(!A||this.curOp.command)return;this.prevOp=this.curOp}A||(A={}),this.$operationResetTimer.schedule(),this.curOp={command:A.command||{},args:A.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",A)},E.prototype.endOperation=function(A){if(this.curOp){if(A&&A.returnValue===!1){this.curOp=null,this._signal("endOperation",A);return}if(A==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var M=this.selection.toJSON();this.curOp.selectionAfter=M,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(M),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",A)}},E.prototype.setDocument=function(A){this.doc&&this.doc.off("change",this.$onChange),this.doc=A,A.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},E.prototype.getDocument=function(){return this.doc},Object.defineProperty(E.prototype,"widgetManager",{get:function(){var A=new o(this);return this.widgetManager=A,this.$editor&&A.attach(this.$editor),A},set:function(A){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:A})},enumerable:!1,configurable:!0}),E.prototype.$resetRowCache=function(A){if(!A){this.$docRowCache=[],this.$screenRowCache=[];return}var M=this.$docRowCache.length,C=this.$getRowCacheIndex(this.$docRowCache,A)+1;M>C&&(this.$docRowCache.splice(C,M),this.$screenRowCache.splice(C,M))},E.prototype.$getRowCacheIndex=function(A,M){for(var C=0,L=A.length-1;C<=L;){var I=C+L>>1,O=A[I];if(M>O)C=I+1;else if(M<O)L=I-1;else return I}return C-1},E.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},E.prototype.onChangeFold=function(A){var M=A.data;this.$resetRowCache(M.start.row)},E.prototype.onChange=function(A){this.$modified=!0,this.$bidiHandler.onChange(A),this.$resetRowCache(A.start.row);var M=this.$updateInternalDataOnChange(A);!this.$fromUndo&&this.$undoManager&&(M&&M.length&&(this.$undoManager.add({action:"removeFolds",folds:M},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(A,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(A),this._signal("change",A)},E.prototype.onSelectionChange=function(){this._signal("changeSelection")},E.prototype.setValue=function(A){this.doc.setValue(A),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},E.fromJSON=function(A){typeof A=="string"&&(A=JSON.parse(A));var M=new d;M.$undoStack=A.history.undo,M.$redoStack=A.history.redo,M.mark=A.history.mark,M.$rev=A.history.rev;var C=new E(A.value);return A.folds.forEach(function(L){C.addFold("...",r.fromPoints(L.start,L.end))}),C.setAnnotations(A.annotations),C.setBreakpoints(A.breakpoints),C.setMode(A.mode),C.setScrollLeft(A.scrollLeft),C.setScrollTop(A.scrollTop),C.setUndoManager(M),C.selection.fromJSON(A.selection),C},E.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(A){return A.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},E.prototype.toString=function(){return this.doc.getValue()},E.prototype.getSelection=function(){return this.selection},E.prototype.getState=function(A){return this.bgTokenizer.getState(A)},E.prototype.getTokens=function(A){return this.bgTokenizer.getTokens(A)},E.prototype.getTokenAt=function(A,M){var C=this.bgTokenizer.getTokens(A),L,I=0;if(M==null){var O=C.length-1;I=this.getLine(A).length}else for(var O=0;O<C.length&&(I+=C[O].value.length,!(I>=M));O++);return L=C[O],L?(L.index=O,L.start=I-L.value.length,L):null},E.prototype.setUndoManager=function(A){if(this.$undoManager=A,this.$informUndoManager&&this.$informUndoManager.cancel(),A){var M=this;A.addSession(this),this.$syncInformUndoManager=function(){M.$informUndoManager.cancel(),M.mergeUndoDeltas=!1},this.$informUndoManager=x.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},E.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},E.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},E.prototype.getTabString=function(){return this.getUseSoftTabs()?x.stringRepeat(" ",this.getTabSize()):" "},E.prototype.setUseSoftTabs=function(A){this.setOption("useSoftTabs",A)},E.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},E.prototype.setTabSize=function(A){this.setOption("tabSize",A)},E.prototype.getTabSize=function(){return this.$tabSize},E.prototype.isTabStop=function(A){return this.$useSoftTabs&&A.column%this.$tabSize===0},E.prototype.setNavigateWithinSoftTabs=function(A){this.setOption("navigateWithinSoftTabs",A)},E.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},E.prototype.setOverwrite=function(A){this.setOption("overwrite",A)},E.prototype.getOverwrite=function(){return this.$overwrite},E.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},E.prototype.addGutterDecoration=function(A,M){this.$decorations[A]||(this.$decorations[A]=""),this.$decorations[A]+=" "+M,this._signal("changeBreakpoint",{})},E.prototype.removeGutterCustomWidget=function(A){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(A)},E.prototype.addGutterCustomWidget=function(A,M){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(A,M)},E.prototype.removeGutterDecoration=function(A,M){this.$decorations[A]=(this.$decorations[A]||"").replace(" "+M,""),this._signal("changeBreakpoint",{})},E.prototype.getBreakpoints=function(){return this.$breakpoints},E.prototype.setBreakpoints=function(A){this.$breakpoints=[];for(var M=0;M<A.length;M++)this.$breakpoints[A[M]]="ace_breakpoint";this._signal("changeBreakpoint",{})},E.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},E.prototype.setBreakpoint=function(A,M){M===void 0&&(M="ace_breakpoint"),M?this.$breakpoints[A]=M:delete this.$breakpoints[A],this._signal("changeBreakpoint",{})},E.prototype.clearBreakpoint=function(A){delete this.$breakpoints[A],this._signal("changeBreakpoint",{})},E.prototype.addMarker=function(A,M,C,L){var I=this.$markerId++,O={range:A,type:C||"line",renderer:typeof C=="function"?C:null,clazz:M,inFront:!!L,id:I};return L?(this.$frontMarkers[I]=O,this._signal("changeFrontMarker")):(this.$backMarkers[I]=O,this._signal("changeBackMarker")),I},E.prototype.addDynamicMarker=function(A,M){if(A.update){var C=this.$markerId++;return A.id=C,A.inFront=!!M,M?(this.$frontMarkers[C]=A,this._signal("changeFrontMarker")):(this.$backMarkers[C]=A,this._signal("changeBackMarker")),A}},E.prototype.removeMarker=function(A){var M=this.$frontMarkers[A]||this.$backMarkers[A];if(M){var C=M.inFront?this.$frontMarkers:this.$backMarkers;delete C[A],this._signal(M.inFront?"changeFrontMarker":"changeBackMarker")}},E.prototype.getMarkers=function(A){return A?this.$frontMarkers:this.$backMarkers},E.prototype.highlight=function(A){if(!this.$searchHighlight){var M=new n(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(M)}this.$searchHighlight.setRegexp(A)},E.prototype.highlightLines=function(A,M,C,L){typeof M!="number"&&(C=M,M=A),C||(C="ace_step");var I=new r(A,0,M,1/0);return I.id=this.addMarker(I,C,"fullLine",L),I},E.prototype.setAnnotations=function(A){this.$annotations=A,this._signal("changeAnnotation",{})},E.prototype.getAnnotations=function(){return this.$annotations||[]},E.prototype.clearAnnotations=function(){this.setAnnotations([])},E.prototype.$detectNewLine=function(A){var M=A.match(/^.*?(\r?\n)/m);M?this.$autoNewLine=M[1]:this.$autoNewLine=`
311
- `},E.prototype.getWordRange=function(A,M){var C=this.getLine(A),L=!1;if(M>0&&(L=!!C.charAt(M-1).match(this.tokenRe)),L||(L=!!C.charAt(M).match(this.tokenRe)),L)var I=this.tokenRe;else if(/^\s+$/.test(C.slice(M-1,M+1)))var I=/\s/;else var I=this.nonTokenRe;var O=M;if(O>0){do O--;while(O>=0&&C.charAt(O).match(I));O++}for(var z=M;z<C.length&&C.charAt(z).match(I);)z++;return new r(A,O,A,z)},E.prototype.getAWordRange=function(A,M){for(var C=this.getWordRange(A,M),L=this.getLine(C.end.row);L.charAt(C.end.column).match(/[ \t]/);)C.end.column+=1;return C},E.prototype.setNewLineMode=function(A){this.doc.setNewLineMode(A)},E.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},E.prototype.setUseWorker=function(A){this.setOption("useWorker",A)},E.prototype.getUseWorker=function(){return this.$useWorker},E.prototype.onReloadTokenizer=function(A){var M=A.data;this.bgTokenizer.start(M.first),this._signal("tokenizerUpdate",A)},E.prototype.setMode=function(A,M){if(A&&typeof A=="object"){if(A.getTokenizer)return this.$onChangeMode(A);var C=A,L=C.path}else L=A||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[L]&&!C){this.$onChangeMode(this.$modes[L]),M&&M();return}this.$modeId=L,c.loadModule(["mode",L],(function(I){if(!this.destroyed){if(this.$modeId!==L)return M&&M();this.$modes[L]&&!C?this.$onChangeMode(this.$modes[L]):I&&I.Mode&&(I=new I.Mode(C),C||(this.$modes[L]=I,I.$id=L),this.$onChangeMode(I)),M&&M()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},E.prototype.$onChangeMode=function(A,M){if(M||(this.$modeId=A.$id),this.$mode!==A){var C=this.$mode;this.$mode=A,this.$stopWorker(),this.$useWorker&&this.$startWorker();var L=A.getTokenizer();if(L.on!==void 0){var I=this.onReloadTokenizer.bind(this);L.on("update",I)}this.bgTokenizer.setTokenizer(L),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=A.tokenRe,this.nonTokenRe=A.nonTokenRe,M||(A.attachToSession&&A.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(A.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:C,mode:A}))}},E.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},E.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(A){c.warn("Could not load worker",A),this.$worker=null}},E.prototype.getMode=function(){return this.$mode},E.prototype.setScrollTop=function(A){this.$scrollTop===A||isNaN(A)||(this.$scrollTop=A,this._signal("changeScrollTop",A))},E.prototype.getScrollTop=function(){return this.$scrollTop},E.prototype.setScrollLeft=function(A){this.$scrollLeft===A||isNaN(A)||(this.$scrollLeft=A,this._signal("changeScrollLeft",A))},E.prototype.getScrollLeft=function(){return this.$scrollLeft},E.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},E.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var A=0;return this.lineWidgets.forEach(function(M){M&&M.screenWidth>A&&(A=M.screenWidth)}),this.lineWidgetWidth=A},E.prototype.$computeWidth=function(A){if(this.$modified||A){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var M=this.doc.getAllLines(),C=this.$rowLengthCache,L=0,I=0,O=this.$foldData[I],z=O?O.start.row:1/0,F=M.length,H=0;H<F;H++){if(H>z){if(H=O.end.row+1,H>=F)break;O=this.$foldData[I++],z=O?O.start.row:1/0}C[H]==null&&(C[H]=this.$getStringScreenWidth(M[H])[0]),C[H]>L&&(L=C[H])}this.screenWidth=L}},E.prototype.getLine=function(A){return this.doc.getLine(A)},E.prototype.getLines=function(A,M){return this.doc.getLines(A,M)},E.prototype.getLength=function(){return this.doc.getLength()},E.prototype.getTextRange=function(A){return this.doc.getTextRange(A||this.selection.getRange())},E.prototype.insert=function(A,M){return this.doc.insert(A,M)},E.prototype.remove=function(A){return this.doc.remove(A)},E.prototype.removeFullLines=function(A,M){return this.doc.removeFullLines(A,M)},E.prototype.undoChanges=function(A,M){if(A.length){this.$fromUndo=!0;for(var C=A.length-1;C!=-1;C--){var L=A[C];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!M&&this.$undoSelect&&(A.selectionBefore?this.selection.fromJSON(A.selectionBefore):this.selection.setRange(this.$getUndoSelection(A,!0))),this.$fromUndo=!1}},E.prototype.redoChanges=function(A,M){if(A.length){this.$fromUndo=!0;for(var C=0;C<A.length;C++){var L=A[C];(L.action=="insert"||L.action=="remove")&&this.doc.$safeApplyDelta(L)}!M&&this.$undoSelect&&(A.selectionAfter?this.selection.fromJSON(A.selectionAfter):this.selection.setRange(this.$getUndoSelection(A,!1))),this.$fromUndo=!1}},E.prototype.setUndoSelect=function(A){this.$undoSelect=A},E.prototype.$getUndoSelection=function(A,M){function C(F){return M?F.action!=="insert":F.action==="insert"}for(var L,I,O=0;O<A.length;O++){var z=A[O];if(z.start){if(!L){C(z)?L=r.fromPoints(z.start,z.end):L=r.fromPoints(z.start,z.start);continue}C(z)?(I=z.start,L.compare(I.row,I.column)==-1&&L.setStart(I),I=z.end,L.compare(I.row,I.column)==1&&L.setEnd(I)):(I=z.start,L.compare(I.row,I.column)==-1&&(L=r.fromPoints(z.start,z.start)))}}return L},E.prototype.replace=function(A,M){return this.doc.replace(A,M)},E.prototype.moveText=function(A,M,C){var L=this.getTextRange(A),I=this.getFoldsInRange(A),O=r.fromPoints(M,M);if(!C){this.remove(A);var z=A.start.row-A.end.row,F=z?-A.end.column:A.start.column-A.end.column;F&&(O.start.row==A.end.row&&O.start.column>A.end.column&&(O.start.column+=F),O.end.row==A.end.row&&O.end.column>A.end.column&&(O.end.column+=F)),z&&O.start.row>=A.end.row&&(O.start.row+=z,O.end.row+=z)}if(O.end=this.insert(O.start,L),I.length){var H=A.start,Y=O.start,z=Y.row-H.row,F=Y.column-H.column;this.addFolds(I.map(function(Q){return Q=Q.clone(),Q.start.row==H.row&&(Q.start.column+=F),Q.end.row==H.row&&(Q.end.column+=F),Q.start.row+=z,Q.end.row+=z,Q}))}return O},E.prototype.indentRows=function(A,M,C){C=C.replace(/\t/g,this.getTabString());for(var L=A;L<=M;L++)this.doc.insertInLine({row:L,column:0},C)},E.prototype.outdentRows=function(A){for(var M=A.collapseRows(),C=new r(0,0,0,0),L=this.getTabSize(),I=M.start.row;I<=M.end.row;++I){var O=this.getLine(I);C.start.row=I,C.end.row=I;for(var z=0;z<L&&O.charAt(z)==" ";++z);z<L&&O.charAt(z)==" "?(C.start.column=z,C.end.column=z+1):(C.start.column=0,C.end.column=z),this.remove(C)}},E.prototype.$moveLines=function(A,M,C){if(A=this.getRowFoldStart(A),M=this.getRowFoldEnd(M),C<0){var L=this.getRowFoldStart(A+C);if(L<0)return 0;var I=L-A}else if(C>0){var L=this.getRowFoldEnd(M+C);if(L>this.doc.getLength()-1)return 0;var I=L-M}else{A=this.$clipRowToDocument(A),M=this.$clipRowToDocument(M);var I=M-A+1}var O=new r(A,0,M,Number.MAX_VALUE),z=this.getFoldsInRange(O).map(function(H){return H=H.clone(),H.start.row+=I,H.end.row+=I,H}),F=C==0?this.doc.getLines(A,M):this.doc.removeFullLines(A,M);return this.doc.insertFullLines(A+I,F),z.length&&this.addFolds(z),I},E.prototype.moveLinesUp=function(A,M){return this.$moveLines(A,M,-1)},E.prototype.moveLinesDown=function(A,M){return this.$moveLines(A,M,1)},E.prototype.duplicateLines=function(A,M){return this.$moveLines(A,M,0)},E.prototype.$clipRowToDocument=function(A){return Math.max(0,Math.min(A,this.doc.getLength()-1))},E.prototype.$clipColumnToRow=function(A,M){return M<0?0:Math.min(this.doc.getLine(A).length,M)},E.prototype.$clipPositionToDocument=function(A,M){if(M=Math.max(0,M),A<0)A=0,M=0;else{var C=this.doc.getLength();A>=C?(A=C-1,M=this.doc.getLine(C-1).length):M=Math.min(this.doc.getLine(A).length,M)}return{row:A,column:M}},E.prototype.$clipRangeToDocument=function(A){A.start.row<0?(A.start.row=0,A.start.column=0):A.start.column=this.$clipColumnToRow(A.start.row,A.start.column);var M=this.doc.getLength()-1;return A.end.row>M?(A.end.row=M,A.end.column=this.doc.getLine(M).length):A.end.column=this.$clipColumnToRow(A.end.row,A.end.column),A},E.prototype.setUseWrapMode=function(A){if(A!=this.$useWrapMode){if(this.$useWrapMode=A,this.$modified=!0,this.$resetRowCache(0),A){var M=this.getLength();this.$wrapData=Array(M),this.$updateWrapData(0,M-1)}this._signal("changeWrapMode")}},E.prototype.getUseWrapMode=function(){return this.$useWrapMode},E.prototype.setWrapLimitRange=function(A,M){(this.$wrapLimitRange.min!==A||this.$wrapLimitRange.max!==M)&&(this.$wrapLimitRange={min:A,max:M},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},E.prototype.adjustWrapLimit=function(A,M){var C=this.$wrapLimitRange;C.max<0&&(C={min:M,max:M});var L=this.$constrainWrapLimit(A,C.min,C.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},E.prototype.$constrainWrapLimit=function(A,M,C){return M&&(A=Math.max(M,A)),C&&(A=Math.min(C,A)),A},E.prototype.getWrapLimit=function(){return this.$wrapLimit},E.prototype.setWrapLimit=function(A){this.setWrapLimitRange(A,A)},E.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},E.prototype.$updateInternalDataOnChange=function(A){var M=this.$useWrapMode,C=A.action,L=A.start,I=A.end,O=L.row,z=I.row,F=z-O,H=null;if(this.$updating=!0,F!=0)if(C==="remove"){this[M?"$wrapData":"$rowLengthCache"].splice(O,F);var Y=this.$foldData;H=this.getFoldsInRange(A),this.removeFolds(H);var K=this.getFoldLine(I.row),q=0;if(K){K.addRemoveChars(I.row,I.column,L.column-I.column),K.shiftRow(-F);var Q=this.getFoldLine(O);Q&&Q!==K&&(Q.merge(K),K=Q),q=Y.indexOf(K)+1}for(q;q<Y.length;q++){var K=Y[q];K.start.row>=I.row&&K.shiftRow(-F)}z=O}else{var ee=Array(F);ee.unshift(O,0);var U=M?this.$wrapData:this.$rowLengthCache;U.splice.apply(U,ee);var Y=this.$foldData,K=this.getFoldLine(O),q=0;if(K){var Z=K.range.compareInside(L.row,L.column);Z==0?(K=K.split(L.row,L.column),K&&(K.shiftRow(F),K.addRemoveChars(z,0,I.column-L.column))):Z==-1&&(K.addRemoveChars(O,0,I.column-L.column),K.shiftRow(F)),q=Y.indexOf(K)+1}for(q;q<Y.length;q++){var K=Y[q];K.start.row>=O&&K.shiftRow(F)}}else{F=Math.abs(A.start.column-A.end.column),C==="remove"&&(H=this.getFoldsInRange(A),this.removeFolds(H),F=-F);var K=this.getFoldLine(O);K&&K.addRemoveChars(O,L.column,F)}return M&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,M?this.$updateWrapData(O,z):this.$updateRowLengthCache(O,z),H},E.prototype.$updateRowLengthCache=function(A,M){this.$rowLengthCache[A]=null,this.$rowLengthCache[M]=null},E.prototype.$updateWrapData=function(A,M){var C=this.doc.getAllLines(),L=this.getTabSize(),I=this.$wrapData,O=this.$wrapLimit,z,F,H=A;for(M=Math.min(M,C.length-1);H<=M;)F=this.getFoldLine(H,F),F?(z=[],F.walk((function(Y,K,q,Q){var ee;if(Y!=null){ee=this.$getDisplayTokens(Y,z.length),ee[0]=v;for(var U=1;U<ee.length;U++)ee[U]=g}else ee=this.$getDisplayTokens(C[K].substring(Q,q),z.length);z=z.concat(ee)}).bind(this),F.end.row,C[F.end.row].length+1),I[F.start.row]=this.$computeWrapSplits(z,O,L),H=F.end.row+1):(z=this.$getDisplayTokens(C[H]),I[H]=this.$computeWrapSplits(z,O,L),H++)},E.prototype.$computeWrapSplits=function(A,M,C){if(A.length==0)return[];var L=[],I=A.length,O=0,z=0,F=this.$wrapAsCode,H=this.$indentedSoftWrap,Y=M<=Math.max(2*C,8)||H===!1?0:Math.floor(M/2);function K(){var Z=0;if(Y===0)return Z;if(H)for(var te=0;te<A.length;te++){var ne=A[te];if(ne==b)Z+=1;else if(ne==S)Z+=C;else{if(ne==T)continue;break}}return F&&H!==!1&&(Z+=C),Math.min(Z,Y)}function q(Z){for(var te=Z-O,ne=O;ne<Z;ne++){var ve=A[ne];(ve===12||ve===2)&&(te-=1)}L.length||(Q=K(),L.indent=Q),z+=te,L.push(z),O=Z}for(var Q=0;I-O>M-Q;){var ee=O+M-Q;if(A[ee-1]>=b&&A[ee]>=b){q(ee);continue}if(A[ee]==v||A[ee]==g){for(ee;ee!=O-1&&A[ee]!=v;ee--);if(ee>O){q(ee);continue}for(ee=O+M,ee;ee<A.length&&A[ee]==g;ee++);if(ee==A.length)break;q(ee);continue}for(var U=Math.max(ee-(M-(M>>2)),O-1);ee>U&&A[ee]<v;)ee--;if(F){for(;ee>U&&A[ee]<v;)ee--;for(;ee>U&&A[ee]==w;)ee--}else for(;ee>U&&A[ee]<b;)ee--;if(ee>U){q(++ee);continue}ee=O+M,A[ee]==_&&ee--,q(ee-Q)}return L},E.prototype.$getDisplayTokens=function(A,M){var C=[],L;M=M||0;for(var I=0;I<A.length;I++){var O=A.charCodeAt(I);if(O==9){L=this.getScreenTabSize(C.length+M),C.push(S);for(var z=1;z<L;z++)C.push(T)}else O==32?C.push(b):O>39&&O<48||O>57&&O<64?C.push(w):O>=4352&&j(O)?C.push(y,_):C.push(y)}return C},E.prototype.$getStringScreenWidth=function(A,M,C){if(M==0)return[0,0];M==null&&(M=1/0),C=C||0;var L,I;for(I=0;I<A.length&&(L=A.charCodeAt(I),L==9?C+=this.getScreenTabSize(C):L>=4352&&j(L)?C+=2:C+=1,!(C>M));I++);return[C,I]},E.prototype.getRowLength=function(A){var M=1;return this.lineWidgets&&(M+=this.lineWidgets[A]&&this.lineWidgets[A].rowCount||0),!this.$useWrapMode||!this.$wrapData[A]?M:this.$wrapData[A].length+M},E.prototype.getRowLineCount=function(A){return!this.$useWrapMode||!this.$wrapData[A]?1:this.$wrapData[A].length+1},E.prototype.getRowWrapIndent=function(A){if(this.$useWrapMode){var M=this.screenToDocumentPosition(A,Number.MAX_VALUE),C=this.$wrapData[M.row];return C.length&&C[0]<M.column?C.indent:0}else return 0},E.prototype.getScreenLastRowColumn=function(A){var M=this.screenToDocumentPosition(A,Number.MAX_VALUE);return this.documentToScreenColumn(M.row,M.column)},E.prototype.getDocumentLastRowColumn=function(A,M){var C=this.documentToScreenRow(A,M);return this.getScreenLastRowColumn(C)},E.prototype.getDocumentLastRowColumnPosition=function(A,M){var C=this.documentToScreenRow(A,M);return this.screenToDocumentPosition(C,Number.MAX_VALUE/10)},E.prototype.getRowSplitData=function(A){if(this.$useWrapMode)return this.$wrapData[A]},E.prototype.getScreenTabSize=function(A){return this.$tabSize-(A%this.$tabSize|0)},E.prototype.screenToDocumentRow=function(A,M){return this.screenToDocumentPosition(A,M).row},E.prototype.screenToDocumentColumn=function(A,M){return this.screenToDocumentPosition(A,M).column},E.prototype.screenToDocumentPosition=function(A,M,C){if(A<0)return{row:0,column:0};var L,I=0,O=0,z,F=0,H=0,Y=this.$screenRowCache,K=this.$getRowCacheIndex(Y,A),q=Y.length;if(q&&K>=0)var F=Y[K],I=this.$docRowCache[K],Q=A>Y[q-1];else var Q=!q;for(var ee=this.getLength()-1,U=this.getNextFoldLine(I),Z=U?U.start.row:1/0;F<=A&&(H=this.getRowLength(I),!(F+H>A||I>=ee));)F+=H,I++,I>Z&&(I=U.end.row+1,U=this.getNextFoldLine(I,U),Z=U?U.start.row:1/0),Q&&(this.$docRowCache.push(I),this.$screenRowCache.push(F));if(U&&U.start.row<=I)L=this.getFoldDisplayLine(U),I=U.start.row;else{if(F+H<=A||I>ee)return{row:ee,column:this.getLine(ee).length};L=this.getLine(I),U=null}var te=0,ne=Math.floor(A-F);if(this.$useWrapMode){var ve=this.$wrapData[I];ve&&(z=ve[ne],ne>0&&ve.length&&(te=ve.indent,O=ve[ne-1]||ve[ve.length-1],L=L.substring(O)))}return C!==void 0&&this.$bidiHandler.isBidiRow(F+ne,I,ne)&&(M=this.$bidiHandler.offsetToCol(C)),O+=this.$getStringScreenWidth(L,M-te)[1],this.$useWrapMode&&O>=z&&(O=z-1),U?U.idxToPosition(O):{row:I,column:O}},E.prototype.documentToScreenPosition=function(A,M){if(typeof M>"u")var C=this.$clipPositionToDocument(A.row,A.column);else C=this.$clipPositionToDocument(A,M);A=C.row,M=C.column;var L=0,I=null,O=null;O=this.getFoldAt(A,M,1),O&&(A=O.start.row,M=O.start.column);var z,F=0,H=this.$docRowCache,Y=this.$getRowCacheIndex(H,A),K=H.length;if(K&&Y>=0)var F=H[Y],L=this.$screenRowCache[Y],q=A>H[K-1];else var q=!K;for(var Q=this.getNextFoldLine(F),ee=Q?Q.start.row:1/0;F<A;){if(F>=ee){if(z=Q.end.row+1,z>A)break;Q=this.getNextFoldLine(z,Q),ee=Q?Q.start.row:1/0}else z=F+1;L+=this.getRowLength(F),F=z,q&&(this.$docRowCache.push(F),this.$screenRowCache.push(L))}var U="";Q&&F>=ee?(U=this.getFoldDisplayLine(Q,A,M),I=Q.start.row):(U=this.getLine(A).substring(0,M),I=A);var Z=0;if(this.$useWrapMode){var te=this.$wrapData[I];if(te){for(var ne=0;U.length>=te[ne];)L++,ne++;U=U.substring(te[ne-1]||0,U.length),Z=ne>0?te.indent:0}}return this.lineWidgets&&this.lineWidgets[F]&&this.lineWidgets[F].rowsAbove&&(L+=this.lineWidgets[F].rowsAbove),{row:L,column:Z+this.$getStringScreenWidth(U)[0]}},E.prototype.documentToScreenColumn=function(A,M){return this.documentToScreenPosition(A,M).column},E.prototype.documentToScreenRow=function(A,M){return this.documentToScreenPosition(A,M).row},E.prototype.getScreenLength=function(){var A=0,M=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,O=0,L=0,M=this.$foldData[L++],z=M?M.start.row:1/0;O<I;){var F=this.$wrapData[O];A+=F?F.length+1:1,O++,O>z&&(O=M.end.row+1,M=this.$foldData[L++],z=M?M.start.row:1/0)}else{A=this.getLength();for(var C=this.$foldData,L=0;L<C.length;L++)M=C[L],A-=M.end.row-M.start.row}return this.lineWidgets&&(A+=this.$getWidgetScreenLength()),A},E.prototype.$setFontMetrics=function(A){this.$enableVarChar&&(this.$getStringScreenWidth=function(M,C,L){if(C===0)return[0,0];C||(C=1/0),L=L||0;var I,O;for(O=0;O<M.length&&(I=M.charAt(O),I===" "?L+=this.getScreenTabSize(L):L+=A.getCharacterWidth(I),!(L>C));O++);return[L,O]})},E.prototype.getPrecedingCharacter=function(){var A=this.selection.getCursor();if(A.column===0)return A.row===0?"":this.doc.getNewLineCharacter();var M=this.getLine(A.row);return M[A.column-1]},E.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},E})();f.$uid=0,f.prototype.$modes=c.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=j,R.implement(f.prototype,h);var y=1,_=2,v=3,g=4,w=9,b=10,S=11,T=12;function j(E){return E<4352?!1:E>=4352&&E<=4447||E>=4515&&E<=4519||E>=4602&&E<=4607||E>=9001&&E<=9002||E>=11904&&E<=11929||E>=11931&&E<=12019||E>=12032&&E<=12245||E>=12272&&E<=12283||E>=12288&&E<=12350||E>=12353&&E<=12438||E>=12441&&E<=12543||E>=12549&&E<=12589||E>=12593&&E<=12686||E>=12688&&E<=12730||E>=12736&&E<=12771||E>=12784&&E<=12830||E>=12832&&E<=12871||E>=12880&&E<=13054||E>=13056&&E<=19903||E>=19968&&E<=42124||E>=42128&&E<=42182||E>=43360&&E<=43388||E>=44032&&E<=55203||E>=55216&&E<=55238||E>=55243&&E<=55291||E>=63744&&E<=64255||E>=65040&&E<=65049||E>=65072&&E<=65106||E>=65108&&E<=65126||E>=65128&&E<=65131||E>=65281&&E<=65376||E>=65504&&E<=65510}$("./edit_session/folding").Folding.call(f.prototype),$("./edit_session/bracket_match").BracketMatch.call(f.prototype),c.defineOptions(f.prototype,"session",{wrap:{set:function(E){if(!E||E=="off"?E=!1:E=="free"?E=!0:E=="printMargin"?E=-1:typeof E=="string"&&(E=parseInt(E,10)||!1),this.$wrap!=E)if(this.$wrap=E,!E)this.setUseWrapMode(!1);else{var A=typeof E=="number"?E:null;this.setWrapLimitRange(A,A),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(E){E=E=="auto"?this.$mode.type!="text":E!="text",E!=this.$wrapAsCode&&(this.$wrapAsCode=E,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(E){this.$useWorker=E,this.$stopWorker(),E&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(E){E=parseInt(E),E>0&&this.$tabSize!==E&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=E,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(E){this.setFoldStyle(E)},handlesSet:!0},overwrite:{set:function(E){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(E){this.doc.setNewLineMode(E)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(E){this.setMode(E)},get:function(){return this.$modeId},handlesSet:!0}}),D.EditSession=f}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function($,D,V){var R=$("./lib/lang"),x=$("./lib/oop"),p=$("./range").Range,c=(function(){function r(){this.$options={}}return r.prototype.set=function(o){return x.mixin(this.$options,o),this},r.prototype.getOptions=function(){return R.copyObject(this.$options)},r.prototype.setOptions=function(o){this.$options=o},r.prototype.find=function(o){var s=this.$options,l=this.$matchIterator(o,s);if(!l)return!1;var n=null;return l.forEach(function(d,f,y,_){return n=new p(d,f,y,_),f==_&&s.start&&s.start.start&&s.skipCurrent!=!1&&n.isEqual(s.start)?(n=null,!1):!0}),n},r.prototype.findAll=function(o){var s=this.$options;if(!s.needle)return[];this.$assembleRegExp(s);var l=s.range,n=l?o.getLines(l.start.row,l.end.row):o.doc.getAllLines(),d=[],f=s.re;if(s.$isMultiLine){var y=f.length,_=n.length-y,v;e:for(var g=f.offset||0;g<=_;g++){for(var w=0;w<y;w++)if(n[g+w].search(f[w])==-1)continue e;var b=n[g],S=n[g+y-1],T=b.length-b.match(f[0])[0].length,j=S.match(f[y-1])[0].length;v&&v.end.row===g&&v.end.column>T||(d.push(v=new p(g,T,g+y-1,j)),y>2&&(g=g+y-2))}}else for(var E,A=0;A<n.length;A++)if(this.$isMultilineSearch(s)){var M=n.length-1;if(E=this.$multiLineForward(o,f,A,M),E){var C=E.endRow<=M?E.endRow-1:M;C>A&&(A=C),d.push(new p(E.startRow,E.startCol,E.endRow,E.endCol))}}else{E=R.getMatchOffsets(n[A],f);for(var w=0;w<E.length;w++){var L=E[w];d.push(new p(A,L.offset,A,L.offset+L.length))}}if(l){for(var I=l.start.column,O=l.end.column,A=0,w=d.length-1;A<w&&d[A].start.column<I&&d[A].start.row==0;)A++;for(var z=l.end.row-l.start.row;A<w&&d[w].end.column>O&&d[w].end.row==z;)w--;for(d=d.slice(A,w+1),A=0,w=d.length;A<w;A++)d[A].start.row+=l.start.row,d[A].end.row+=l.start.row}return d},r.prototype.parseReplaceString=function(o){for(var s={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",n=0,d=o.length;n<d;n++){var f=o.charCodeAt(n);if(f===s.Backslash){if(n++,n>=d){l+="\\";break}var y=o.charCodeAt(n);switch(y){case s.Backslash:l+="\\";break;case s.n:l+=`
312
- `;break;case s.t:l+=" ";break}continue}if(f===s.DollarSign){if(n++,n>=d){l+="$";break}var _=o.charCodeAt(n);if(_===s.DollarSign){l+="$$";continue}if(_===s.Digit0||_===s.Ampersand){l+="$&";continue}if(s.Digit1<=_&&_<=s.Digit9){l+="$"+o[n];continue}}l+=o[n]}return l||o},r.prototype.replace=function(o,s){var l=this.$options,n=this.$assembleRegExp(l);if(l.$isMultiLine)return s;if(n){var d=this.$isMultilineSearch(l);d&&(o=o.replace(/\r\n|\r|\n/g,`
313
- `));var f=n.exec(o);if(!f||!d&&f[0].length!=o.length)return null;if(s=l.regExp?this.parseReplaceString(s):s.replace(/\$/g,"$$$$"),s=o.replace(n,s),l.preserveCase){s=s.split("");for(var y=Math.min(o.length,o.length);y--;){var _=o[y];_&&_.toLowerCase()!=_?s[y]=s[y].toUpperCase():s[y]=s[y].toLowerCase()}s=s.join("")}return s}},r.prototype.$assembleRegExp=function(o,s){if(o.needle instanceof RegExp)return o.re=o.needle;var l=o.needle;if(!o.needle)return o.re=!1;o.regExp||(l=R.escapeRegExp(l));var n=o.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),o.$supportsUnicodeFlag=!0,n+="u"}catch{o.$supportsUnicodeFlag=!1}if(o.wholeWord&&(l=h(l,o)),o.$isMultiLine=!s&&/[\n\r]/.test(l),o.$isMultiLine)return o.re=this.$assembleMultilineRegExp(l,n);try{var d=new RegExp(l,n)}catch{d=!1}return o.re=d},r.prototype.$assembleMultilineRegExp=function(o,s){for(var l=o.replace(/\r\n|\r|\n/g,`$
314
- ^`).split(`
315
- `),n=[],d=0;d<l.length;d++)try{n.push(new RegExp(l[d],s))}catch{return!1}return n},r.prototype.$isMultilineSearch=function(o){return o.re&&/\\r\\n|\\r|\\n/.test(o.re.source)&&o.regExp&&!o.$isMultiLine},r.prototype.$multiLineForward=function(o,s,l,n){for(var d,f=i(o,l),y=l;y<=n;){for(var _=0;_<f&&!(y>n);_++){var v=o.getLine(y++);d=d==null?v:d+`
316
- `+v}var g=s.exec(d);if(s.lastIndex=0,g){var w=d.slice(0,g.index).split(`
317
- `),b=g[0].split(`
318
- `),S=l+w.length-1,T=w[w.length-1].length,j=S+b.length-1,E=b.length==1?T+b[0].length:b[b.length-1].length;return{startRow:S,startCol:T,endRow:j,endCol:E}}}return null},r.prototype.$multiLineBackward=function(o,s,l,n,d){for(var f,y=i(o,n),_=o.getLine(n).length-l,v=n;v>=d;){for(var g=0;g<y&&v>=d;g++){var w=o.getLine(v--);f=f==null?w:w+`
319
- `+f}var b=a(f,s,_);if(b){var S=f.slice(0,b.index).split(`
320
- `),T=b[0].split(`
321
- `),j=v+S.length,E=S[S.length-1].length,A=j+T.length-1,M=T.length==1?E+T[0].length:T[T.length-1].length;return{startRow:j,startCol:E,endRow:A,endCol:M}}}return null},r.prototype.$matchIterator=function(o,s){var l=this.$assembleRegExp(s);if(!l)return!1;var n=this.$isMultilineSearch(s),d=this.$multiLineForward,f=this.$multiLineBackward,y=s.backwards==!0,_=s.skipCurrent!=!1,v=l.unicode,g=s.range,w=s.start;w||(w=g?g[y?"end":"start"]:o.selection.getRange()),w.start&&(w=w[_!=y?"end":"start"]);var b=g?g.start.row:0,S=g?g.end.row:o.getLength()-1;if(y)var T=function(A){var M=w.row;if(!E(M,w.column,A)){for(M--;M>=b;M--)if(E(M,Number.MAX_VALUE,A))return;if(s.wrap!=!1){for(M=S,b=w.row;M>=b;M--)if(E(M,Number.MAX_VALUE,A))return}}};else var T=function(M){var C=w.row;if(!E(C,w.column,M)){for(C=C+1;C<=S;C++)if(E(C,0,M))return;if(s.wrap!=!1){for(C=b,S=w.row;C<=S;C++)if(E(C,0,M))return}}};if(s.$isMultiLine)var j=l.length,E=function(A,M,C){var L=y?A-j+1:A;if(!(L<0||L+j>o.getLength())){var I=o.getLine(L),O=I.search(l[0]);if(!(!y&&O<M||O===-1)){for(var z=1;z<j;z++)if(I=o.getLine(L+z),I.search(l[z])==-1)return;var F=I.match(l[j-1])[0].length;if(!(y&&F>M)&&C(L,O,L+j-1,F))return!0}}};else if(y)var E=function(M,C,L){if(n){var I=f(o,l,C,M,b);if(!I)return!1;if(L(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else{var O=o.getLine(M),z=[],F,H=0;for(l.lastIndex=0;F=l.exec(O);){var Y=F[0].length;if(H=F.index,!Y){if(H>=O.length)break;l.lastIndex=H+=R.skipEmptyMatch(O,H,v)}if(F.index+Y>C)break;z.push(F.index,Y)}for(var K=z.length-1;K>=0;K-=2){var q=z[K-1],Y=z[K];if(L(M,q,M,q+Y))return!0}}};else var E=function(M,C,L){if(l.lastIndex=C,n){var I=d(o,l,M,S);if(I){var O=I.endRow<=S?I.endRow-1:S;O>M&&(M=O)}if(!I)return!1;if(L(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else for(var z=o.getLine(M),F,H;H=l.exec(z);){var Y=H[0].length;if(F=H.index,L(M,F,M,F+Y))return!0;if(!Y&&(l.lastIndex=F+=R.skipEmptyMatch(z,F,v),F>=z.length))return!1}};return{forEach:T}},r})();function h(r,o){var s=R.supportsLookbehind();function l(y,_){_===void 0&&(_=!0);var v=s&&o.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return v.test(y)||o.regExp?s&&o.$supportsUnicodeFlag?_?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var n=Array.from(r),d=n[0],f=n[n.length-1];return l(d)+r+l(f,!1)}function a(r,o,s){for(var l=null,n=0;n<=r.length;){o.lastIndex=n;var d=o.exec(r);if(!d)break;var f=d.index+d[0].length;if(f>r.length-s)break;(!l||f>l.index+l[0].length)&&(l=d),n=d.index+1}return l}function i(r,o){var s=5e3,l={row:o,column:0},n=r.doc.positionToIndex(l),d=n+s,f=r.doc.indexToPosition(d),y=f.row;return y+1}D.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function($,D,V){var R=this&&this.__extends||(function(){var r=function(o,s){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var d in n)Object.prototype.hasOwnProperty.call(n,d)&&(l[d]=n[d])},r(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");r(o,s);function l(){this.constructor=o}o.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),x=$("../lib/keys"),p=$("../lib/useragent"),c=x.KEY_MODS,h=(function(){function r(o,s){this.$init(o,s,!1)}return r.prototype.$init=function(o,s,l){this.platform=s||(p.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(o),this.$singleCommand=l},r.prototype.addCommand=function(o){this.commands[o.name]&&this.removeCommand(o),this.commands[o.name]=o,o.bindKey&&this._buildKeyHash(o)},r.prototype.removeCommand=function(o,s){var l=o&&(typeof o=="string"?o:o.name);o=this.commands[l],s||delete this.commands[l];var n=this.commandKeyBinding;for(var d in n){var f=n[d];if(f==o)delete n[d];else if(Array.isArray(f)){var y=f.indexOf(o);y!=-1&&(f.splice(y,1),f.length==1&&(n[d]=f[0]))}}},r.prototype.bindKey=function(o,s,l){if(typeof o=="object"&&o&&(l==null&&(l=o.position),o=o[this.platform]),!!o){if(typeof s=="function")return this.addCommand({exec:s,bindKey:o,name:s.name||o});o.split("|").forEach(function(n){var d="";if(n.indexOf(" ")!=-1){var f=n.split(/\s+/);n=f.pop(),f.forEach(function(v){var g=this.parseKeys(v),w=c[g.hashId]+g.key;d+=(d?" ":"")+w,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var y=this.parseKeys(n),_=c[y.hashId]+y.key;this._addCommandToBinding(d+_,s,l)},this)}},r.prototype._addCommandToBinding=function(o,s,l){var n=this.commandKeyBinding,d;if(!s)delete n[o];else if(!n[o]||this.$singleCommand)n[o]=s;else{Array.isArray(n[o])?(d=n[o].indexOf(s))!=-1&&n[o].splice(d,1):n[o]=[n[o]],typeof l!="number"&&(l=a(s));var f=n[o];for(d=0;d<f.length;d++){var y=f[d],_=a(y);if(_>l)break}f.splice(d,0,s)}},r.prototype.addCommands=function(o){o&&Object.keys(o).forEach(function(s){var l=o[s];if(l){if(typeof l=="string")return this.bindKey(l,s);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=s),this.addCommand(l))}},this)},r.prototype.removeCommands=function(o){Object.keys(o).forEach(function(s){this.removeCommand(o[s])},this)},r.prototype.bindKeys=function(o){Object.keys(o).forEach(function(s){this.bindKey(s,o[s])},this)},r.prototype._buildKeyHash=function(o){this.bindKey(o.bindKey,o)},r.prototype.parseKeys=function(o){var s=o.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(_){return _}),l=s.pop(),n=x[l];if(x.FUNCTION_KEYS[n])l=x.FUNCTION_KEYS[n].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var d=0,f=s.length;f--;){var y=x.KEY_MODS[s[f]];if(y==null)return typeof console<"u"&&console.error("invalid modifier "+s[f]+" in "+o),!1;d|=y}return{key:l,hashId:d}},r.prototype.findKeyCommand=function(o,s){var l=c[o]+s;return this.commandKeyBinding[l]},r.prototype.handleKeyboard=function(o,s,l,n){if(!(n<0)){var d=c[s]+l,f=this.commandKeyBinding[d];return o.$keyChain&&(o.$keyChain+=" "+d,f=this.commandKeyBinding[o.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys")?(o.$keyChain=o.$keyChain||d,{command:"null"}):(o.$keyChain&&((!s||s==4)&&l.length==1?o.$keyChain=o.$keyChain.slice(0,-d.length-1):(s==-1||n>0)&&(o.$keyChain="")),{command:f})}},r.prototype.getStatusText=function(o,s){return s.$keyChain||""},r})();function a(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}var i=(function(r){R(o,r);function o(s,l){var n=r.call(this,s,l)||this;return n.$singleCommand=!0,n}return o})(h);i.call=function(r,o,s){h.prototype.$init.call(r,o,s,!0)},h.call=function(r,o,s){h.prototype.$init.call(r,o,s,!1)},D.HashHandler=i,D.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function($,D,V){var R=this&&this.__extends||(function(){var a=function(i,r){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(o[l]=s[l])},a(i,r)};return function(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");a(i,r);function o(){this.constructor=i}i.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),x=$("../lib/oop"),p=$("../keyboard/hash_handler").MultiHashHandler,c=$("../lib/event_emitter").EventEmitter,h=(function(a){R(i,a);function i(r,o){var s=a.call(this,o,r)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),s}return i.prototype.exec=function(r,o,s){if(Array.isArray(r)){for(var l=r.length;l--;)if(this.exec(r[l],o,s))return!0;return!1}typeof r=="string"&&(r=this.commands[r]);var n={editor:o,command:r,args:s};return this.canExecute(r,o)?(n.returnValue=this._emit("exec",n),this._signal("afterExec",n),n.returnValue!==!1):(this._signal("commandUnavailable",n),!1)},i.prototype.canExecute=function(r,o){return typeof r=="string"&&(r=this.commands[r]),!(!r||o&&o.$readOnly&&!r.readOnly||this.$checkCommandState!=!1&&r.isAvailable&&!r.isAvailable(o))},i.prototype.toggleRecording=function(r){if(!this.$inReplay)return r&&r._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(o){this.macro.push([o.command,o.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(r){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(r);try{this.$inReplay=!0,this.macro.forEach(function(o){typeof o=="string"?this.exec(o,r):this.exec(o[0],r,o[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(r){return r.map(function(o){return typeof o[0]!="string"&&(o[0]=o[0].name),o[1]||(o=o[0]),o})},i})(p);x.implement(h.prototype,c),D.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function($,D,V){var R=$("../lib/lang"),x=$("../config"),p=$("../range").Range;function c(a,i){return{win:a,mac:i}}D.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(a){x.loadModule("ace/ext/settings_menu",function(i){i.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(a){x.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(a){x.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(a,i){typeof i=="number"&&!isNaN(i)&&a.gotoLine(i),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(a){x.loadModule("ace/ext/searchbox",function(i){i.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(a,i){a.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(a,i){a.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(a,i){a.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(a,i){a.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var i=a.$copyWithEmptySelection&&a.selection.isEmpty(),r=i?a.selection.getLineRange():a.selection.getRange();a._emit("cut",r),r.isEmpty()||a.session.remove(r),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,i){a.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(a){x.loadModule("ace/ext/searchbox",function(i){i.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(a){var i=a.selection.getRange();i.start.column=0,a.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(a){var i=a.selection.getRange();i.end.column=Number.MAX_VALUE,a.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,i){a.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,i){a.insert(R.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var i=a.selection.getRange();i.start.column=i.end.column=0,i.end.row++,a.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(a){for(var i=a.selection.isBackwards(),r=i?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),o=i?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),s=a.session.doc.getLine(r.row).length,l=a.session.doc.getTextRange(a.selection.getRange()),n=l.replace(/\n\s*/," ").length,d=a.session.doc.getLine(r.row),f=r.row+1;f<=o.row+1;f++){var y=R.stringTrimLeft(R.stringTrimRight(a.session.doc.getLine(f)));y.length!==0&&(y=" "+y),d+=y}o.row+1<a.session.doc.getLength()-1&&(d+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new p(r.row,0,o.row+2,0),d),n>0?(a.selection.moveCursorTo(r.row,r.column),a.selection.selectTo(r.row,r.column+n)):(s=a.session.doc.getLine(r.row).length>s?s+1:s,a.selection.moveCursorTo(r.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(a){var i=a.session.doc.getLength()-1,r=a.session.doc.getLine(i).length,o=a.selection.rangeList.ranges,s=[];o.length<1&&(o=[a.selection.getRange()]);for(var l=0;l<o.length;l++)l==o.length-1&&(o[l].end.row===i&&o[l].end.column===r||s.push(new p(o[l].end.row,o[l].end.column,i,r))),l===0?o[l].start.row===0&&o[l].start.column===0||s.push(new p(0,0,o[l].start.row,o[l].start.column)):s.push(new p(o[l-1].end.row,o[l-1].end.column,o[l].start.row,o[l].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var l=0;l<s.length;l++)a.selection.addRange(s[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
322
- `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var i=a.getCursorPosition();a.selection.moveTo(i.row-1,Number.MAX_VALUE),a.insert(`
323
- `),i.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(a){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),a.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)D.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function($,D,V){var R=$("../lib/keys"),x=(function(){function c(h){this.editor=h,this.gutterLayer=h.renderer.$gutterLayer,this.element=h.renderer.$gutter,this.lines=h.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return c.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},c.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},c.prototype.$onGutterKeyDown=function(h){if(this.annotationTooltip.isOpen){h.preventDefault(),h.keyCode===R.escape&&this.annotationTooltip.hide();return}if(h.target===this.element){if(h.keyCode!=R.enter)return;h.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),r=this.$findNearestFoldLaneWidget(i),o=this.$findNearestAnnotation(i);if(!(r===null&&o===null)){var s=this.$findClosestNumber(r,o,i);if(s===r)if(this.activeLane="fold",this.activeRowIndex=r,this.$isCustomWidgetVisible(r)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(h),setTimeout((function(){this.editor._signal("gutterkeydown",new p(h,this))}).bind(this),10)},c.prototype.$handleGutterKeyboardInteraction=function(h){if(h.keyCode===R.tab){h.preventDefault();return}if(h.keyCode===R.escape){h.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(h.keyCode===R.up){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(h.keyCode===R.down){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(h.keyCode===R.left){h.preventDefault(),this.$switchLane("annotation");return}if(h.keyCode===R.right){h.preventDefault(),this.$switchLane("fold");return}if(h.keyCode===R.enter||h.keyCode===R.space){switch(h.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),i=this.editor.session.$gutterCustomWidgets[a];if(i)i.callbacks&&i.callbacks.onClick&&i.callbacks.onClick(h,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),h),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},c.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},c.prototype.$isFoldWidgetVisible=function(h){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),i=this.$getFoldWidget(h).style.display!=="none";return a&&i},c.prototype.$isCustomWidgetVisible=function(h){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),i=!!this.$getCustomWidget(h);return a&&i},c.prototype.$isAnnotationVisible=function(h){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),i=this.$getAnnotation(h).style.display!=="none";return a&&i},c.prototype.$getFoldWidget=function(h){var a=this.lines.get(h),i=a.element;return i.childNodes[1]},c.prototype.$getCustomWidget=function(h){var a=this.lines.get(h),i=a.element;return i.childNodes[3]},c.prototype.$getAnnotation=function(h){var a=this.lines.get(h),i=a.element;return i.childNodes[2]},c.prototype.$findNearestFoldLaneWidget=function(h){if(this.$isCustomWidgetVisible(h)||this.$isFoldWidgetVisible(h))return h;for(var a=0;h-a>0||h+a<this.lines.getLength()-1;){if(a++,h-a>=0&&this.$isCustomWidgetVisible(h-a))return h-a;if(h+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(h+a))return h+a;if(h-a>=0&&this.$isFoldWidgetVisible(h-a))return h-a;if(h+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(h+a))return h+a}return null},c.prototype.$findNearestAnnotation=function(h){if(this.$isAnnotationVisible(h))return h;for(var a=0;h-a>0||h+a<this.lines.getLength()-1;){if(a++,h-a>=0&&this.$isAnnotationVisible(h-a))return h-a;if(h+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(h+a))return h+a}return null},c.prototype.$focusFoldWidget=function(h){if(h!=null){var a=this.$getFoldWidget(h);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},c.prototype.$focusCustomWidget=function(h){if(h!=null){var a=this.$getCustomWidget(h);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},c.prototype.$focusAnnotation=function(h){if(h!=null){var a=this.$getAnnotation(h);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},c.prototype.$blurFoldWidget=function(h){var a=this.$getFoldWidget(h);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},c.prototype.$blurCustomWidget=function(h){var a=this.$getCustomWidget(h);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},c.prototype.$blurAnnotation=function(h){var a=this.$getAnnotation(h);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isFoldWidgetVisible(h)||this.$isCustomWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=h,this.$isFoldWidgetVisible(h)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isFoldWidgetVisible(h)||this.$isCustomWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=h,this.$isFoldWidgetVisible(h)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},c.prototype.$moveAnnotationUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$findClosestNumber=function(h,a,i){return h===null?a:a===null||Math.abs(i-h)<=Math.abs(i-a)?h:a},c.prototype.$switchLane=function(h){switch(h){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var i=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(i===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$isCustomWidgetVisible(i)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},c.prototype.$rowIndexToRow=function(h){var a=this.lines.get(h);return a?a.row:null},c.prototype.$rowToRowIndex=function(h){for(var a=0;a<this.lines.getLength();a++){var i=this.lines.get(a);if(i.row==h)return a}return null},c})();D.GutterKeyboardHandler=x;var p=(function(){function c(h,a){this.gutterKeyboardHandler=a,this.domEvent=h}return c.prototype.getKey=function(){return R.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},c})();D.GutterKeyboardEvent=p}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function($,D,V){var R=this&&this.__values||function(M){var C=typeof Symbol=="function"&&Symbol.iterator,L=C&&M[C],I=0;if(L)return L.call(M);if(M&&typeof M.length=="number")return{next:function(){return M&&I>=M.length&&(M=void 0),{value:M&&M[I++],done:!M}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},x=$("./lib/oop"),p=$("./lib/dom"),c=$("./lib/lang"),h=$("./lib/useragent"),a=$("./keyboard/textinput").TextInput,i=$("./mouse/mouse_handler").MouseHandler,r=$("./mouse/fold_handler").FoldHandler,o=$("./keyboard/keybinding").KeyBinding,s=$("./edit_session").EditSession,l=$("./search").Search,n=$("./range").Range,d=$("./lib/event_emitter").EventEmitter,f=$("./commands/command_manager").CommandManager,y=$("./commands/default_commands").commands,_=$("./config"),v=$("./token_iterator").TokenIterator,g=$("./keyboard/gutter_handler").GutterKeyboardHandler,w=$("./config").nls,b=$("./clipboard"),S=$("./lib/keys"),T=$("./lib/event"),j=$("./tooltip").HoverTooltip,E=(function(){function M(C,L,I){this.id="editor"+ ++M.$uid,this.session,this.$toDestroy=[];var O=C.getContainerElement();this.container=O,this.renderer=C,this.commands=new f(h.isMac?"mac":"win",y),typeof document=="object"&&(this.textInput=new a(C.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new r(this)),this.keyBinding=new o(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(z,F){F._$emitInputEvent.schedule(31)}),this.setSession(L||I&&I.session||new s("")),_.resetOptions(this),I&&this.setOptions(I),_._signal("editor",this)}return M.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},M.prototype.startOperation=function(C){this.session.startOperation(C)},M.prototype.endOperation=function(C){this.session.endOperation(C)},M.prototype.onStartOperation=function(C){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,C||(this.previousCommand=null)},M.prototype.onEndOperation=function(C){if(this.curOp&&this.session){if(C&&C.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var L=this.curOp.command,I=L&&L.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var O=this.selection.getRange(),z=this.renderer.layerConfig;(O.start.row>=z.lastRow||O.end.row<=z.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},M.prototype.$historyTracker=function(C){if(this.$mergeUndoDeltas){var L=this.prevOp,I=this.$mergeableCommands,O=L.command&&C.command.name==L.command.name;if(C.command.name=="insertstring"){var z=C.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),O=O&&this.mergeNextCommand&&(!/\s/.test(z)||/\s/.test(L.args)),this.mergeNextCommand=!0}else O=O&&I.indexOf(C.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(O=!1),O?this.session.mergeUndoDeltas=!0:I.indexOf(C.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},M.prototype.setKeyboardHandler=function(C,L){if(C&&typeof C=="string"&&C!="ace"){this.$keybindingId=C;var I=this;_.loadModule(["keybinding",C],function(O){I.$keybindingId==C&&I.keyBinding.setKeyboardHandler(O&&O.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(C),L&&L()},M.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},M.prototype.setSession=function(C){if(this.session!=C){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=C,C?(this.$onDocumentChange=this.onDocumentChange.bind(this),C.on("change",this.$onDocumentChange),this.renderer.setSession(C),this.$onChangeMode=this.onChangeMode.bind(this),C.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),C.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),C.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),C.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),C.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),C.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=C.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(C)),this._signal("changeSession",{session:C,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),L&&(L.$editor=null),C&&C._signal("changeEditor",{editor:this}),C&&(C.$editor=this),C&&!C.destroyed&&C.bgTokenizer.scheduleStart()}},M.prototype.getSession=function(){return this.session},M.prototype.setValue=function(C,L){return this.session.doc.setValue(C),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),C},M.prototype.getValue=function(){return this.session.getValue()},M.prototype.getSelection=function(){return this.selection},M.prototype.resize=function(C){this.renderer.onResize(C)},M.prototype.setTheme=function(C,L){this.renderer.setTheme(C,L)},M.prototype.getTheme=function(){return this.renderer.getTheme()},M.prototype.setStyle=function(C,L){this.renderer.setStyle(C,L)},M.prototype.unsetStyle=function(C){this.renderer.unsetStyle(C)},M.prototype.getFontSize=function(){return this.getOption("fontSize")||p.computedStyle(this.container).fontSize},M.prototype.setFontSize=function(C){this.setOption("fontSize",C)},M.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var C=this;this.$highlightPending=!0,setTimeout(function(){C.$highlightPending=!1;var L=C.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(Q){L.removeMarker(Q)}),L.$bracketHighlight=null);var I=C.getCursorPosition(),O=C.getKeyboardHandler(),z=O&&O.$getDirectionForHighlight&&O.$getDirectionForHighlight(C),F=L.getMatchingBracketRanges(I,z);if(!F){var H=new v(L,I.row,I.column),Y=H.getCurrentToken();if(Y&&/\b(?:tag-open|tag-name)/.test(Y.type)){var K=L.getMatchingTags(I);K&&(F=[K.openTagName.isEmpty()?K.openTag:K.openTagName,K.closeTagName.isEmpty()?K.closeTag:K.closeTagName])}}if(!F&&L.$mode.getMatching&&(F=L.$mode.getMatching(C.session)),!F){C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide();return}var q="ace_bracket";Array.isArray(F)?F.length==1&&(q="ace_error_bracket"):F=[F],F.length==2&&(n.comparePoints(F[0].end,F[1].start)==0?F=[n.fromPoints(F[0].start,F[1].end)]:n.comparePoints(F[0].start,F[1].end)==0&&(F=[n.fromPoints(F[1].start,F[0].end)])),L.$bracketHighlight={ranges:F,markerIds:F.map(function(Q){return L.addMarker(Q,q,"text")})},C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide()}},50)}},M.prototype.focus=function(){this.textInput.focus()},M.prototype.isFocused=function(){return this.textInput.isFocused()},M.prototype.blur=function(){this.textInput.blur()},M.prototype.onFocus=function(C){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",C))},M.prototype.onBlur=function(C){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",C))},M.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},M.prototype.onDocumentChange=function(C){var L=this.session.$useWrapMode,I=C.start.row==C.end.row?C.end.row:1/0;this.renderer.updateLines(C.start.row,I,L),this._signal("change",C),this.$cursorChange()},M.prototype.onTokenizerUpdate=function(C){var L=C.data;this.renderer.updateLines(L.first,L.last)},M.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},M.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},M.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},M.prototype.$updateHighlightActiveLine=function(){var C=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),C.$highlightLineMarker&&!L)C.removeMarker(C.$highlightLineMarker.id),C.$highlightLineMarker=null;else if(!C.$highlightLineMarker&&L){var I=new n(L.row,L.column,L.row,1/0);I.id=C.addMarker(I,"ace_active-line","screenLine"),C.$highlightLineMarker=I}else L&&(C.$highlightLineMarker.start.row=L.row,C.$highlightLineMarker.end.row=L.row,C.$highlightLineMarker.start.column=L.column,C._signal("changeBackMarker"))},M.prototype.onSelectionChange=function(C){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),O=this.getSelectionStyle();L.$selectionMarker=L.addMarker(I,"ace_selection",O)}var z=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(z),this._signal("changeSelection")},M.prototype.$getSelectionHighLightRegexp=function(){var C=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var I=L.start.column,O=L.end.column,z=C.getLine(L.start.row),F=z.substring(I,O);if(!(F.length>5e3||!/[\w\d]/.test(F))){var H=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:F}),Y=z.substring(I-1,O+1);if(H.test(Y))return H}}},M.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},M.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},M.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},M.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},M.prototype.onChangeMode=function(C){this.renderer.updateText(),this._emit("changeMode",C)},M.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},M.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},M.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},M.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},M.prototype.getCopyText=function(){var C=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),I=!1;if(!C&&this.$copyWithEmptySelection){I=!0;for(var O=this.selection.getAllRanges(),z=0;z<O.length;z++){var F=O[z];z&&O[z-1].start.row==F.start.row||(C+=this.session.getLine(F.start.row)+L)}}var H={text:C};return this._signal("copy",H),b.lineMode=I?H.text:!1,H.text},M.prototype.onCopy=function(){this.commands.exec("copy",this)},M.prototype.onCut=function(){this.commands.exec("cut",this)},M.prototype.onPaste=function(C,L){var I={text:C,event:L};this.commands.exec("paste",this,I)},M.prototype.$handlePaste=function(C){typeof C=="string"&&(C={text:C}),this._signal("paste",C);var L=C.text,I=L===b.lineMode,O=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)I?O.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(I)this.selection.rangeList.ranges.forEach(function(q){O.insert({row:q.start.row,column:0},L)});else{var z=L.split(/\r\n|\r|\n/),F=this.selection.rangeList.ranges,H=z.length==2&&(!z[0]||!z[1]);if(z.length!=F.length||H)return this.commands.exec("insertstring",this,L);for(var Y=F.length;Y--;){var K=F[Y];K.isEmpty()||O.remove(K),O.insert(K.start,z[Y])}}},M.prototype.execCommand=function(C,L){return this.commands.exec(C,this,L)},M.prototype.insert=function(C,L){var I=this.session,O=I.getMode(),z=this.getCursorPosition();if(this.getBehavioursEnabled()&&!L){var F=O.transformAction(I.getState(z.row),"insertion",this,I,C);F&&(C!==F.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),C=F.text)}if(C==" "&&(C=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&C.indexOf(`
324
- `)==-1){var H=n.fromPoints(z,z);H.end.column+=C.length,this.session.remove(H)}}else{var H=this.getSelectionRange();z=this.session.remove(H),this.clearSelection()}if(C==`
325
- `||C==`\r
326
- `){var Q=I.getLine(z.row);if(z.column>Q.search(/\S|$/)){var Y=Q.substr(z.column).search(/\S|$/);I.doc.removeInLine(z.row,z.column,z.column+Y)}}this.clearSelection();var K=z.column,q=I.getState(z.row),Q=I.getLine(z.row),ee=O.checkOutdent(q,Q,C);if(I.insert(z,C),F&&F.selection&&(F.selection.length==2?this.selection.setSelectionRange(new n(z.row,K+F.selection[0],z.row,K+F.selection[1])):this.selection.setSelectionRange(new n(z.row+F.selection[0],F.selection[1],z.row+F.selection[2],F.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(C)){var U=O.getNextLineIndent(q,Q.slice(0,z.column),I.getTabString());I.insert({row:z.row+1,column:0},U)}ee&&O.autoOutdent(q,I,z.row)}},M.prototype.autoIndent=function(){for(var C=this.session,L=C.getMode(),I=this.selection.isEmpty()?[new n(0,0,C.doc.getLength()-1,0)]:this.selection.getAllRanges(),O="",z="",F="",H=C.getTabString(),Y=0;Y<I.length;Y++)for(var K=I[Y].start.row,q=I[Y].end.row,Q=K;Q<=q;Q++){Q>0&&(O=C.getState(Q-1),z=C.getLine(Q-1),F=L.getNextLineIndent(O,z,H));var ee=C.getLine(Q),U=L.$getIndent(ee);if(F!==U){if(U.length>0){var Z=new n(Q,0,Q,U.length);C.remove(Z)}F.length>0&&C.insert({row:Q,column:0},F)}L.autoOutdent(O,C,Q)}},M.prototype.onTextInput=function(C,L){if(!L)return this.keyBinding.onTextInput(C);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,C,L);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},M.prototype.applyComposition=function(C,L){if(L.extendLeft||L.extendRight){var I=this.selection.getRange();I.start.column-=L.extendLeft,I.end.column+=L.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!C&&!I.isEmpty()&&this.remove()}if((C||!this.selection.isEmpty())&&this.insert(C,!0),L.restoreStart||L.restoreEnd){var I=this.selection.getRange();I.start.column-=L.restoreStart,I.end.column-=L.restoreEnd,this.selection.setRange(I)}},M.prototype.onCommandKey=function(C,L,I){return this.keyBinding.onCommandKey(C,L,I)},M.prototype.setOverwrite=function(C){this.session.setOverwrite(C)},M.prototype.getOverwrite=function(){return this.session.getOverwrite()},M.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},M.prototype.setScrollSpeed=function(C){this.setOption("scrollSpeed",C)},M.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},M.prototype.setDragDelay=function(C){this.setOption("dragDelay",C)},M.prototype.getDragDelay=function(){return this.getOption("dragDelay")},M.prototype.setSelectionStyle=function(C){this.setOption("selectionStyle",C)},M.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},M.prototype.setHighlightActiveLine=function(C){this.setOption("highlightActiveLine",C)},M.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},M.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.setHighlightSelectedWord=function(C){this.setOption("highlightSelectedWord",C)},M.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},M.prototype.setAnimatedScroll=function(C){this.renderer.setAnimatedScroll(C)},M.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},M.prototype.setShowInvisibles=function(C){this.renderer.setShowInvisibles(C)},M.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},M.prototype.setDisplayIndentGuides=function(C){this.renderer.setDisplayIndentGuides(C)},M.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},M.prototype.setHighlightIndentGuides=function(C){this.renderer.setHighlightIndentGuides(C)},M.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},M.prototype.setShowPrintMargin=function(C){this.renderer.setShowPrintMargin(C)},M.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},M.prototype.setPrintMarginColumn=function(C){this.renderer.setPrintMarginColumn(C)},M.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},M.prototype.setReadOnly=function(C){this.setOption("readOnly",C)},M.prototype.getReadOnly=function(){return this.getOption("readOnly")},M.prototype.setBehavioursEnabled=function(C){this.setOption("behavioursEnabled",C)},M.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},M.prototype.setWrapBehavioursEnabled=function(C){this.setOption("wrapBehavioursEnabled",C)},M.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},M.prototype.setShowFoldWidgets=function(C){this.setOption("showFoldWidgets",C)},M.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},M.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.remove=function(C){this.selection.isEmpty()&&(C=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,O=I.getState(L.start.row),z=I.getMode().transformAction(O,"deletion",this,I,L);if(L.end.column===0){var F=I.getTextRange(L);if(F[F.length-1]==`
327
- `){var H=I.getLine(L.end.row);/^\s+$/.test(H)&&(L.end.column=H.length)}}z&&(L=z)}this.session.remove(L),this.clearSelection()},M.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var C=this.getSelectionRange();C.start.column==C.end.column&&C.start.row==C.end.row&&(C.end.column=0,C.end.row++),this.session.remove(C),this.clearSelection()},M.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var C=this.getCursorPosition();this.insert(`
328
- `),this.moveCursorToPosition(C)},M.prototype.setGhostText=function(C,L){this.renderer.setGhostText(C,L)},M.prototype.removeGhostText=function(){this.renderer.removeGhostText()},M.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var C=this.getCursorPosition(),L=C.column;if(L!==0){var I=this.session.getLine(C.row),O,z;L<I.length?(O=I.charAt(L)+I.charAt(L-1),z=new n(C.row,L-1,C.row,L+1)):(O=I.charAt(L-1)+I.charAt(L-2),z=new n(C.row,L-2,C.row,L)),this.session.replace(z,O),this.session.selection.moveToPosition(z.end)}}},M.prototype.toLowerCase=function(){var C=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),I=this.session.getTextRange(L);this.session.replace(L,I.toLowerCase()),this.selection.setSelectionRange(C)},M.prototype.toUpperCase=function(){var C=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),I=this.session.getTextRange(L);this.session.replace(L,I.toUpperCase()),this.selection.setSelectionRange(C)},M.prototype.indent=function(){var C=this.session,L=this.getSelectionRange();if(L.start.row<L.end.row){var I=this.$getSelectedRows();C.indentRows(I.first,I.last," ");return}else if(L.start.column<L.end.column){var O=C.getTextRange(L);if(!/^\s+$/.test(O)){var I=this.$getSelectedRows();C.indentRows(I.first,I.last," ");return}}var z=C.getLine(L.start.row),F=L.start,H=C.getTabSize(),Y=C.documentToScreenColumn(F.row,F.column);if(this.session.getUseSoftTabs())var K=H-Y%H,q=c.stringRepeat(" ",K);else{for(var K=Y%H;z[L.start.column-1]==" "&&K;)L.start.column--,K--;this.selection.setSelectionRange(L),q=" "}return this.insert(q)},M.prototype.blockIndent=function(){var C=this.$getSelectedRows();this.session.indentRows(C.first,C.last," ")},M.prototype.blockOutdent=function(){var C=this.session.getSelection();this.session.outdentRows(C.getRange())},M.prototype.sortLines=function(){for(var C=this.$getSelectedRows(),L=this.session,I=[],O=C.first;O<=C.last;O++)I.push(L.getLine(O));I.sort(function(H,Y){return H.toLowerCase()<Y.toLowerCase()?-1:H.toLowerCase()>Y.toLowerCase()?1:0});for(var z=new n(0,0,0,0),O=C.first;O<=C.last;O++){var F=L.getLine(O);z.start.row=O,z.end.row=O,z.end.column=F.length,L.replace(z,I[O-C.first])}},M.prototype.toggleCommentLines=function(){var C=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(C,this.session,L.first,L.last)},M.prototype.toggleBlockComment=function(){var C=this.getCursorPosition(),L=this.session.getState(C.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,I,C)},M.prototype.getNumberAt=function(C,L){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var O=this.session.getLine(C);I.lastIndex<L;){var z=I.exec(O);if(z.index<=L&&z.index+z[0].length>=L){var F={value:z[0],start:z.index,end:z.index+z[0].length};return F}}return null},M.prototype.modifyNumber=function(C){var L=this.selection.getCursor().row,I=this.selection.getCursor().column,O=new n(L,I-1,L,I),z=this.session.getTextRange(O);if(!isNaN(parseFloat(z))&&isFinite(z)){var F=this.getNumberAt(L,I);if(F){var H=F.value.indexOf(".")>=0?F.start+F.value.indexOf(".")+1:F.end,Y=F.start+F.value.length-H,K=parseFloat(F.value);K*=Math.pow(10,Y),H!==F.end&&I<H?C*=Math.pow(10,F.end-I-1):C*=Math.pow(10,F.end-I),K+=C,K/=Math.pow(10,Y);var q=K.toFixed(Y),Q=new n(L,F.start,L,F.end);this.session.replace(Q,q),this.moveCursorTo(L,Math.max(F.start+1,I+q.length-F.value.length))}}else this.toggleWord()},M.prototype.toggleWord=function(){var C=this.selection.getCursor().row,L=this.selection.getCursor().column;this.selection.selectWord();var I=this.getSelectedText(),O=this.selection.getWordRange().start.column,z=I.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),F=L-O-1;F<0&&(F=0);var H=0,Y=0,K=this;I.match(/[A-Za-z0-9_]+/)&&z.forEach(function(ge,xe){Y=H+ge.length,F>=H&&F<=Y&&(I=ge,K.selection.clearSelection(),K.moveCursorTo(C,H+O),K.selection.selectTo(C,Y+O)),H=Y});for(var q=this.$toggleWordPairs,Q,ee=0;ee<q.length;ee++)for(var U=q[ee],Z=0;Z<=1;Z++){var te=+!Z,ne=I.match(new RegExp("^\\s?_?("+c.escapeRegExp(U[Z])+")\\s?$","i"));if(ne){var ve=I.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(ne[1])+")($|\\s)","g"));ve&&(Q=I.replace(new RegExp(c.escapeRegExp(U[Z]),"i"),function(ge){var xe=U[te];return ge.toUpperCase()==ge?xe=xe.toUpperCase():ge.charAt(0).toUpperCase()==ge.charAt(0)&&(xe=xe.substr(0,0)+U[te].charAt(0).toUpperCase()+xe.substr(1)),xe}),this.insert(Q),Q="")}}},M.prototype.findLinkAt=function(C,L){var I,O,z=this.session.getLine(C),F=z.split(/((?:https?|ftp):\/\/[\S]+)/),H=L;H<0&&(H=0);var Y=0,K=0,q;try{for(var Q=R(F),ee=Q.next();!ee.done;ee=Q.next()){var U=ee.value;if(K=Y+U.length,H>=Y&&H<=K&&U.match(/((?:https?|ftp):\/\/[\S]+)/)){q=U.replace(/[\s:.,'";}\]]+$/,"");break}Y=K}}catch(Z){I={error:Z}}finally{try{ee&&!ee.done&&(O=Q.return)&&O.call(Q)}finally{if(I)throw I.error}}return q},M.prototype.openLink=function(){var C=this.selection.getCursor(),L=this.findLinkAt(C.row,C.column);return L&&window.open(L,"_blank"),L!=null},M.prototype.removeLines=function(){var C=this.$getSelectedRows();this.session.removeFullLines(C.first,C.last),this.clearSelection()},M.prototype.duplicateSelection=function(){var C=this.selection,L=this.session,I=C.getRange(),O=C.isBackwards();if(I.isEmpty()){var z=I.start.row;L.duplicateLines(z,z)}else{var F=O?I.start:I.end,H=L.insert(F,L.getTextRange(I));I.start=F,I.end=H,C.setSelectionRange(I,O)}},M.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},M.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},M.prototype.moveText=function(C,L,I){return this.session.moveText(C,L,I)},M.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},M.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},M.prototype.$moveLines=function(C,L){var I,O,z=this.selection;if(!z.inMultiSelectMode||this.inVirtualSelectionMode){var F=z.toOrientedRange();I=this.$getSelectedRows(F),O=this.session.$moveLines(I.first,I.last,L?0:C),L&&C==-1&&(O=0),F.moveBy(O,0),z.fromOrientedRange(F)}else{var H=z.rangeList.ranges;z.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Y=0,K=0,q=H.length,Q=0;Q<q;Q++){var ee=Q;H[Q].moveBy(Y,0),I=this.$getSelectedRows(H[Q]);for(var U=I.first,Z=I.last;++Q<q;){K&&H[Q].moveBy(K,0);var te=this.$getSelectedRows(H[Q]);if(L&&te.first!=Z)break;if(!L&&te.first>Z+1)break;Z=te.last}for(Q--,Y=this.session.$moveLines(U,Z,L?0:C),L&&C==-1&&(ee=Q+1);ee<=Q;)H[ee].moveBy(Y,0),ee++;L||(Y=0),K+=Y}z.fromOrientedRange(z.ranges[0]),z.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},M.prototype.$getSelectedRows=function(C){return C=(C||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(C.start.row),last:this.session.getRowFoldEnd(C.end.row)}},M.prototype.onCompositionStart=function(C){this.renderer.showComposition(C)},M.prototype.onCompositionUpdate=function(C){this.renderer.setCompositionText(C)},M.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},M.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},M.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},M.prototype.isRowVisible=function(C){return C>=this.getFirstVisibleRow()&&C<=this.getLastVisibleRow()},M.prototype.isRowFullyVisible=function(C){return C>=this.renderer.getFirstFullyVisibleRow()&&C<=this.renderer.getLastFullyVisibleRow()},M.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},M.prototype.$moveByPage=function(C,L){var I=this.renderer,O=this.renderer.layerConfig,z=C*Math.floor(O.height/O.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(z,0)}):L===!1&&(this.selection.moveCursorBy(z,0),this.selection.clearSelection());var F=I.scrollTop;I.scrollBy(0,z*O.lineHeight),L!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling(F)},M.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},M.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},M.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},M.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},M.prototype.scrollPageDown=function(){this.$moveByPage(1)},M.prototype.scrollPageUp=function(){this.$moveByPage(-1)},M.prototype.scrollToRow=function(C){this.renderer.scrollToRow(C)},M.prototype.scrollToLine=function(C,L,I,O){this.renderer.scrollToLine(C,L,I,O)},M.prototype.centerSelection=function(){var C=this.getSelectionRange(),L={row:Math.floor(C.start.row+(C.end.row-C.start.row)/2),column:Math.floor(C.start.column+(C.end.column-C.start.column)/2)};this.renderer.alignCursor(L,.5)},M.prototype.getCursorPosition=function(){return this.selection.getCursor()},M.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},M.prototype.getSelectionRange=function(){return this.selection.getRange()},M.prototype.selectAll=function(){this.selection.selectAll()},M.prototype.clearSelection=function(){this.selection.clearSelection()},M.prototype.moveCursorTo=function(C,L){this.selection.moveCursorTo(C,L)},M.prototype.moveCursorToPosition=function(C){this.selection.moveCursorToPosition(C)},M.prototype.jumpToMatching=function(C,L){var I=this.getCursorPosition(),O=new v(this.session,I.row,I.column),z=O.getCurrentToken(),F=0;z&&z.type.indexOf("tag-name")!==-1&&(z=O.stepBackward());var H=z||O.stepForward();if(H){var Y,K=!1,q={},Q=I.column-H.start,ee,U={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(H.value.match(/[{}()\[\]]/g)){for(;Q<H.value.length&&!K;Q++)if(U[H.value[Q]])switch(ee=U[H.value[Q]]+"."+H.type.replace("rparen","lparen"),isNaN(q[ee])&&(q[ee]=0),H.value[Q]){case"(":case"[":case"{":q[ee]++;break;case")":case"]":case"}":q[ee]--,q[ee]===-1&&(Y="bracket",K=!0);break}}else H.type.indexOf("tag-name")!==-1&&(isNaN(q[H.value])&&(q[H.value]=0),z.value==="<"&&F>1?q[H.value]++:z.value==="</"&&q[H.value]--,q[H.value]===-1&&(Y="tag",K=!0));K||(z=H,F++,H=O.stepForward(),Q=0)}while(H&&!K);if(Y){var Z,te;if(Y==="bracket")Z=this.session.getBracketRange(I),Z||(Z=new n(O.getCurrentTokenRow(),O.getCurrentTokenColumn()+Q-1,O.getCurrentTokenRow(),O.getCurrentTokenColumn()+Q-1),te=Z.start,(L||te.row===I.row&&Math.abs(te.column-I.column)<2)&&(Z=this.session.getBracketRange(te)));else if(Y==="tag"){if(!H||H.type.indexOf("tag-name")===-1)return;if(Z=new n(O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2,O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2),Z.compare(I.row,I.column)===0){var ne=this.session.getMatchingTags(I);ne&&(ne.openTag.contains(I.row,I.column)?(Z=ne.closeTag,te=Z.start):(Z=ne.openTag,ne.closeTag.start.row===I.row&&ne.closeTag.start.column===I.column?te=Z.end:te=Z.start))}te=te||Z.start}te=Z&&Z.cursor||te,te&&(C?Z&&L?this.selection.setRange(Z):Z&&Z.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(te.row,te.column):this.selection.moveTo(te.row,te.column))}}},M.prototype.gotoLine=function(C,L,I){this.selection.clearSelection(),this.session.unfold({row:C-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(C-1,L||0),this.isRowFullyVisible(C-1)||this.scrollToLine(C-1,!0,I)},M.prototype.navigateTo=function(C,L){this.selection.moveTo(C,L)},M.prototype.navigateUp=function(C){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(-C||-1,0)},M.prototype.navigateDown=function(C){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(C||1,0)},M.prototype.navigateLeft=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},M.prototype.navigateRight=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}this.clearSelection()},M.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},M.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},M.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},M.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},M.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},M.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},M.prototype.replace=function(C,L){L&&this.$search.set(L);var I=this.$search.find(this.session),O=0;return I&&(this.$tryReplace(I,C)&&(O=1),this.selection.setSelectionRange(I),this.renderer.scrollSelectionIntoView(I.start,I.end)),O},M.prototype.replaceAll=function(C,L){L&&this.$search.set(L);var I=this.$search.findAll(this.session),O=0;if(!I.length)return O;var z=this.getSelectionRange();this.selection.moveTo(0,0);for(var F=I.length-1;F>=0;--F)this.$tryReplace(I[F],C)&&O++;return this.selection.setSelectionRange(z),O},M.prototype.$tryReplace=function(C,L){var I=this.session.getTextRange(C);return L=this.$search.replace(I,L),L!==null?(C.end=this.session.replace(C,L),C):null},M.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},M.prototype.find=function(C,L,I){L||(L={}),typeof C=="string"||C instanceof RegExp?L.needle=C:typeof C=="object"&&x.mixin(L,C);var O=this.selection.getRange();L.needle==null&&(C=this.session.getTextRange(O)||this.$search.$options.needle,C||(O=this.session.getWordRange(O.start.row,O.start.column),C=this.session.getTextRange(O)),this.$search.set({needle:C})),this.$search.set(L),L.start||this.$search.set({start:O});var z=this.$search.find(this.session);if(L.preventScroll)return z;if(z)return this.revealRange(z,I),z;L.backwards?O.start=O.end:O.end=O.start,this.selection.setRange(O)},M.prototype.findNext=function(C,L){this.find({skipCurrent:!0,backwards:!1},C,L)},M.prototype.findPrevious=function(C,L){this.find(C,{skipCurrent:!0,backwards:!0},L)},M.prototype.revealRange=function(C,L){this.session.unfold(C),this.selection.setSelectionRange(C);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(C.start,C.end,.5),L!==!1&&this.renderer.animateScrolling(I)},M.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},M.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},M.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(C){C.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},M.prototype.setAutoScrollEditorIntoView=function(C){if(C){var L,I=this,O=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var z=this.$scrollAnchor;z.style.cssText="position:absolute",this.container.insertBefore(z,this.container.firstChild);var F=this.on("changeSelection",function(){O=!0}),H=this.renderer.on("beforeRender",function(){O&&(L=I.renderer.container.getBoundingClientRect())}),Y=this.renderer.on("afterRender",function(){if(O&&L&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var K=I.renderer,q=K.$cursorLayer.$pixelPos,Q=K.layerConfig,ee=q.top-Q.offset;q.top>=0&&ee+L.top<0?O=!0:q.top<Q.height&&q.top+L.top+Q.lineHeight>window.innerHeight?O=!1:O=null,O!=null&&(z.style.top=ee+"px",z.style.left=q.left+"px",z.style.height=Q.lineHeight+"px",z.scrollIntoView(O)),O=L=null}});this.setAutoScrollEditorIntoView=function(K){K||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",F),this.renderer.off("afterRender",Y),this.renderer.off("beforeRender",H))}}},M.prototype.$resetCursorStyle=function(){var C=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(C)),L.isBlinking=!this.$readOnly&&C!="wide",p.setCssClass(L.element,"ace_slim-cursors",/slim/.test(C)))},M.prototype.prompt=function(C,L,I){var O=this;_.loadModule("ace/ext/prompt",function(z){z.prompt(O,C,L,I)})},M})();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=["backspace","del","insertstring"],E.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],x.implement(E.prototype,d),_.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(M){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:M})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(M){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(M){var C=this;if(this.textInput.setReadOnly(M),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(I){var O=!1;if(I&&I.type=="keydown"){if(I&&I.key&&!I.ctrlKey&&!I.metaKey&&(I.key==" "&&I.preventDefault(),O=I.key.length==1),!O)return}else I&&I.type!=="exec"&&(O=!0);if(O){C.hoverTooltip||(C.hoverTooltip=new j);var z=p.createElement("div");z.textContent=w("editor.tooltip.disable-editing","Editing is disabled"),C.hoverTooltip.isOpen||C.hoverTooltip.showForRange(C,C.getSelectionRange(),z)}else C.hoverTooltip&&C.hoverTooltip.isOpen&&C.hoverTooltip.hide()});var L=this.textInput.getElement();M?(T.addListener(L,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(T.removeListener(L,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(M){this.textInput.setCopyWithEmptySelection(M)},initialValue:!1},cursorStyle:{set:function(M){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(M){this.setAutoScrollEditorIntoView(M)}},keyboardHandler:{set:function(M){this.setKeyboardHandler(M)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(M){this.session.setValue(M)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(M){this.setSession(M)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(M){this.renderer.$gutterLayer.setShowLineNumbers(M),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),M&&this.$relativeLineNumbers?A.attach(this):A.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(M){this.$showLineNumbers&&M?A.attach(this):A.detach(this)}},placeholder:{set:function(M){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var C=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(C&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),p.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!C&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),p.addCssClass(this.container,"ace_hasPlaceholder");var L=p.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!C&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(M){var C={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(O){O.blur(),O.renderer.scroller.focus()},readOnly:!0},L=function(O){if(O.target==this.renderer.scroller&&O.keyCode===S.enter){O.preventDefault();var z=this.getCursorPosition().row;this.isRowVisible(z)||this.scrollToLine(z,!0,!0),this.focus()}},I;M?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",w("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",w("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(C),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",w("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",w("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new g(this)),I.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(C),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(M){this.$textInputAriaLabel=M},initialValue:""},enableMobileMenu:{set:function(M){this.$enableMobileMenu=M},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var A={getText:function(M,C){return(Math.abs(M.selection.lead.row-C)||C+1+(C<9?"·":""))+""},getWidth:function(M,C,L){return Math.max(C.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(M,C){C.renderer.$loop.schedule(C.renderer.CHANGE_GUTTER)},attach:function(M){M.renderer.$gutterLayer.$renderer=this,M.on("changeSelection",this.update),this.update(null,M)},detach:function(M){M.renderer.$gutterLayer.$renderer==this&&(M.renderer.$gutterLayer.$renderer=null),M.off("changeSelection",this.update),this.update(null,M)}};D.Editor=E}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function($,D,V){var R=$("../lib/dom"),x=(function(){function p(c,h){this.element=c,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return p.prototype.moveContainer=function(c){R.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},p.prototype.pageChanged=function(c,h){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},p.prototype.computeLineTop=function(c,h,a){var i=h.firstRowScreen*h.lineHeight,r=Math.floor(i/this.canvasHeight),o=a.documentToScreenRow(c,0)*h.lineHeight;return o-r*this.canvasHeight},p.prototype.computeLineHeight=function(c,h,a){return h.lineHeight*a.getRowLineCount(c)},p.prototype.getLength=function(){return this.cells.length},p.prototype.get=function(c){return this.cells[c]},p.prototype.shift=function(){this.$cacheCell(this.cells.shift())},p.prototype.pop=function(){this.$cacheCell(this.cells.pop())},p.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var h=R.createFragment(this.element),a=0;a<c.length;a++)h.appendChild(c[a].element);this.element.appendChild(h)}else this.cells.push(c),this.element.appendChild(c.element)},p.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var h=R.createFragment(this.element),a=0;a<c.length;a++)h.appendChild(c[a].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},p.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},p.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},p.prototype.createCell=function(c,h,a,i){var r=this.cellCache.pop();if(!r){var o=R.createElement("div");i&&i(o),this.element.appendChild(o),r={element:o,text:"",row:c}}return r.row=c,r},p})();D.Lines=x}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function($,D,V){var R=$("../lib/dom"),x=$("../lib/oop"),p=$("../lib/lang"),c=$("../lib/event_emitter").EventEmitter,h=$("./lines").Lines,a=$("../config").nls,i=(function(){function o(s){this.$showCursorMarker=null,this.element=R.createElement("div"),this.element.className="ace_layer ace_gutter-layer",s.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return o.prototype.setSession=function(s){this.session&&this.session.off("change",this.$updateAnnotations),this.session=s,s&&s.on("change",this.$updateAnnotations)},o.prototype.addGutterDecoration=function(s,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(s,l)},o.prototype.removeGutterDecoration=function(s,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(s,l)},o.prototype.setAnnotations=function(s){this.$annotations=[];for(var l=0;l<s.length;l++){var n=s[l],d=n.row,f=this.$annotations[d];f||(f=this.$annotations[d]={text:[],type:[],displayText:[]});var y=n.text,_=n.text,v=n.type;y=y?p.escapeHTML(y):n.html||"",_=_||n.html||"",f.text.indexOf(y)===-1&&(f.text.push(y),f.type.push(v),f.displayText.push(_));var g=n.className;g?f.className=g:v==="error"?f.className=" ace_error":v==="security"&&!/\bace_error\b/.test(f.className)?f.className=" ace_security":v==="warning"&&!/\bace_(error|security)\b/.test(f.className)?f.className=" ace_warning":v==="info"&&!f.className?f.className=" ace_info":v==="hint"&&!f.className&&(f.className=" ace_hint")}},o.prototype.$updateAnnotations=function(s){if(this.$annotations.length){var l=s.start.row,n=s.end.row-l;if(n!==0)if(s.action=="remove")this.$annotations.splice(l,n+1,null);else{var d=new Array(n+1);d.unshift(l,1),this.$annotations.splice.apply(this.$annotations,d)}}},o.prototype.update=function(s){this.config=s;var l=this.session,n=s.firstRow,d=Math.min(s.lastRow+s.gutterOffset,l.getLength()-1);this.oldLastRow=d,this.config=s,this.$lines.moveContainer(s),this.$updateCursorRow();for(var f=l.getNextFoldLine(n),y=f?f.start.row:1/0,_=null,v=-1,g=n;;){if(g>y&&(g=f.end.row+1,f=l.getNextFoldLine(g,f),y=f?f.start.row:1/0),g>d){for(;this.$lines.getLength()>v+1;)this.$lines.pop();break}_=this.$lines.get(++v),_?_.row=g:(_=this.$lines.createCell(g,s,this.session,r),this.$lines.push(_)),this.$renderCell(_,s,f,g),g++}this._signal("afterRender"),this.$updateGutterWidth(s),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},o.prototype.$updateGutterWidth=function(s){var l=this.session,n=l.gutterRenderer||this.$renderer,d=l.$firstLineNumber,f=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(f=l.getLength()+d-1);var y=n?n.getWidth(l,f,s):f.toString().length*s.characterWidth,_=this.$padding||this.$computePadding();y+=_.left+_.right,y!==this.gutterWidth&&!isNaN(y)&&(this.gutterWidth=y,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",y))},o.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},o.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<l.length;n++){var d=l[n];if(d.row>=this.$cursorRow){if(d.row>this.$cursorRow){var f=this.session.getFoldLine(this.$cursorRow);if(n>0&&f&&f.start.row==l[n-1].row)d=l[n-1];else break}d.element.className="ace_gutter-active-line "+d.element.className,this.$cursorCell=d;break}}}}},o.prototype.$updateCursorMarker=function(){if(this.session){var s=this.session;this.$highlightElement||(this.$highlightElement=R.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var l=s.selection.cursor,n=this.config,d=this.$lines,f=n.firstRowScreen*n.lineHeight,y=Math.floor(f/d.canvasHeight),_=s.documentToScreenRow(l)*n.lineHeight,v=_-y*d.canvasHeight;R.setStyle(this.$highlightElement.style,"height",n.lineHeight+"px"),R.setStyle(this.$highlightElement.style,"top",v+"px")}},o.prototype.scrollLines=function(s){var l=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(l,s))return this.update(s);this.$lines.moveContainer(s);var n=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),d=this.oldLastRow;if(this.oldLastRow=n,!l||d<s.firstRow)return this.update(s);if(n<l.firstRow)return this.update(s);if(l.firstRow<s.firstRow)for(var f=this.session.getFoldedRowCount(l.firstRow,s.firstRow-1);f>0;f--)this.$lines.shift();if(d>n)for(var f=this.session.getFoldedRowCount(n+1,d);f>0;f--)this.$lines.pop();s.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(s,s.firstRow,l.firstRow-1)),n>d&&this.$lines.push(this.$renderLines(s,d+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},o.prototype.$renderLines=function(s,l,n){for(var d=[],f=l,y=this.session.getNextFoldLine(f),_=y?y.start.row:1/0;f>_&&(f=y.end.row+1,y=this.session.getNextFoldLine(f,y),_=y?y.start.row:1/0),!(f>n);){var v=this.$lines.createCell(f,s,this.session,r);this.$renderCell(v,s,y,f),d.push(v),f++}return d},o.prototype.$renderCell=function(s,l,n,d){var f=s.element,y=this.session,_=f.childNodes[0],v=f.childNodes[1],g=f.childNodes[2],w=f.childNodes[3],b=g.firstChild,S=y.$firstLineNumber,T=y.$breakpoints,j=y.$decorations,E=y.gutterRenderer||this.$renderer,A=this.$showFoldWidgets&&y.foldWidgets,M=n?n.start.row:Number.MAX_VALUE,C=l.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",O=(E?E.getText(y,d):d+S).toString();if(this.$highlightGutterLine&&(d==this.$cursorRow||n&&d<this.$cursorRow&&d>=M&&this.$cursorRow<=n.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),T[d]&&(L+=T[d]),j[d]&&(L+=j[d]),this.$annotations[d]&&d!==M&&(L+=this.$annotations[d].className),A){var z=A[d];z==null&&(z=A[d]=y.getFoldWidget(d))}if(z){var F="ace_fold-widget ace_"+z,H=z=="start"&&d==M&&d<n.end.row;if(H){F+=" ace_closed";for(var Y="",K=!1,q=d+1;q<=n.end.row;q++)if(this.$annotations[q]){if(this.$annotations[q].className===" ace_error"){K=!0,Y=" ace_error_fold";break}this.$annotations[q].className===" ace_security"?(K=!0,Y=" ace_security_fold"):this.$annotations[q].className===" ace_warning"&&Y!==" ace_security_fold"&&(K=!0,Y=" ace_warning_fold")}L+=Y}else F+=" ace_open";v.className!=F&&(v.className=F),R.setStyle(v.style,"height",C),R.setStyle(v.style,"display","inline-block"),v.setAttribute("role","button"),v.setAttribute("tabindex","-1");var Q=y.getFoldWidgetRange(d);Q?v.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[Q.start.row+1,Q.end.row+1])):n?v.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):v.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[d+1])),H?(v.setAttribute("aria-expanded","false"),v.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(v.setAttribute("aria-expanded","true"),v.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else v&&(R.setStyle(v.style,"display","none"),v.setAttribute("tabindex","0"),v.removeAttribute("role"),v.removeAttribute("aria-label"));var ee=this.session.$gutterCustomWidgets[d];if(ee?this.$addCustomWidget(d,ee,s):w&&this.$removeCustomWidget(d,s),K&&this.$showFoldedAnnotations){g.className="ace_gutter_annotation",b.className=I,b.className+=Y,R.setStyle(b.style,"height",C),R.setStyle(g.style,"display","block"),R.setStyle(g.style,"height",C);var U;switch(Y){case" ace_error_fold":U=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[O]);break;case" ace_security_fold":U=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[O]);break;case" ace_warning_fold":U=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[O]);break}g.setAttribute("aria-label",U),g.setAttribute("tabindex","-1"),g.setAttribute("role","button")}else if(this.$annotations[d]){g.className="ace_gutter_annotation",b.className=I,this.$useSvgGutterIcons?b.className+=this.$annotations[d].className:f.classList.add(this.$annotations[d].className.replace(" ","")),R.setStyle(b.style,"height",C),R.setStyle(g.style,"display","block"),R.setStyle(g.style,"height",C);var U;switch(this.$annotations[d].className){case" ace_error":U=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[O]);break;case" ace_security":U=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[O]);break;case" ace_warning":U=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[O]);break;case" ace_info":U=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[O]);break;case" ace_hint":U=a("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[O]);break}g.setAttribute("aria-label",U),g.setAttribute("tabindex","-1"),g.setAttribute("role","button")}else R.setStyle(g.style,"display","none"),g.removeAttribute("aria-label"),g.removeAttribute("role"),g.setAttribute("tabindex","0");return O!==_.data&&(_.data=O),f.className!=L&&(f.className=L),R.setStyle(s.element.style,"height",this.$lines.computeLineHeight(d,l,y)+"px"),R.setStyle(s.element.style,"top",this.$lines.computeLineTop(d,l,y)+"px"),s.text=O,g.style.display==="none"&&v.style.display==="none"&&!ee?s.element.setAttribute("aria-hidden",!0):s.element.setAttribute("aria-hidden",!1),s},o.prototype.setHighlightGutterLine=function(s){this.$highlightGutterLine=s,!s&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},o.prototype.setShowLineNumbers=function(s){this.$renderer=!s&&{getWidth:function(){return 0},getText:function(){return""}}},o.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},o.prototype.setShowFoldWidgets=function(s){s?R.addCssClass(this.element,"ace_folding-enabled"):R.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=s,this.$padding=null},o.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},o.prototype.$hideFoldWidget=function(s,l){var n=l||this.$getGutterCell(s);if(n&&n.element){var d=n.element.childNodes[1];d&&R.setStyle(d.style,"display","none")}},o.prototype.$showFoldWidget=function(s,l){var n=l||this.$getGutterCell(s);if(n&&n.element){var d=n.element.childNodes[1];d&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&R.setStyle(d.style,"display","inline-block")}},o.prototype.$getGutterCell=function(s){var l=this.$lines.cells,n=0,d=l.length-1;if(!(s<l[0].row||s>l[d].row)){for(;n<=d;){var f=Math.floor((n+d)/2),y=l[f];if(y.row>s)d=f-1;else if(y.row<s)n=f+1;else return y}return y}},o.prototype.$addCustomWidget=function(s,l,n){var d=l.className,f=l.label,y=l.title,_=l.callbacks;this.session.$gutterCustomWidgets[s]={className:d,label:f,title:y,callbacks:_},this.$hideFoldWidget(s,n);var v=n||this.$getGutterCell(s);if(v&&v.element){var g=v.element.querySelector(".ace_custom-widget");g&&g.remove(),g=R.createElement("span"),g.className="ace_custom-widget ".concat(d),g.setAttribute("tabindex","-1"),g.setAttribute("role","button"),g.setAttribute("aria-label",f),g.setAttribute("title",y),R.setStyle(g.style,"display","inline-block"),R.setStyle(g.style,"height","inherit"),_&&_.onClick&&g.addEventListener("click",function(w){_.onClick(w,s),w.stopPropagation()}),v.element.appendChild(g)}},o.prototype.$removeCustomWidget=function(s,l){delete this.session.$gutterCustomWidgets[s],this.$showFoldWidget(s,l);var n=l||this.$getGutterCell(s);if(n&&n.element){var d=n.element.querySelector(".ace_custom-widget");d&&n.element.removeChild(d)}},o.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var s=R.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(s.borderLeftWidth)||0)+(parseInt(s.paddingLeft)||0)+1,this.$padding.right=(parseInt(s.borderRightWidth)||0)+(parseInt(s.paddingRight)||0),this.$padding},o.prototype.getRegion=function(s){var l=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(s.x<l.left+n.left)return"markers";if(this.$showFoldWidgets&&s.x>n.right-l.right)return"foldWidgets"},o})();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer=void 0,i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,x.implement(i.prototype,c);function r(o){var s=document.createTextNode("");o.appendChild(s);var l=R.createElement("span");o.appendChild(l);var n=R.createElement("span");o.appendChild(n);var d=R.createElement("span");return n.appendChild(d),o}D.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function($,D,V){var R=$("../range").Range,x=$("../lib/dom"),p=(function(){function h(a){this.element=x.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return h.prototype.setPadding=function(a){this.$padding=a},h.prototype.setSession=function(a){this.session=a},h.prototype.setMarkers=function(a){this.markers=a},h.prototype.elt=function(a,i){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=i,r.className=a},h.prototype.update=function(a){if(a){this.config=a,this.i=0;var i;for(var r in this.markers){var o=this.markers[r];if(!o.range){o.update(i,this,this.session,a);continue}var s=o.range.clipRows(a.firstRow,a.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),o.renderer){var l=this.$getTop(s.start.row,a),n=this.$padding+s.start.column*a.characterWidth;o.renderer(i,s,n,l,a)}else o.type=="fullLine"?this.drawFullLineMarker(i,s,o.clazz,a):o.type=="screenLine"?this.drawScreenLineMarker(i,s,o.clazz,a):s.isMultiLine()?o.type=="text"?this.drawTextMarker(i,s,o.clazz,a):this.drawMultiLineMarker(i,s,o.clazz,a):this.drawSingleLineMarker(i,s,o.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(a,i){return(a-i.firstRowScreen)*i.lineHeight},h.prototype.drawTextMarker=function(a,i,r,o,s){for(var l=this.session,n=i.start.row,d=i.end.row,f=n,y=0,_=0,v=l.getScreenLastRowColumn(f),g=new R(f,i.start.column,f,_);f<=d;f++)g.start.row=g.end.row=f,g.start.column=f==n?i.start.column:l.getRowWrapIndent(f),g.end.column=v,y=_,_=v,v=f+1<d?l.getScreenLastRowColumn(f+1):f==d?0:i.end.column,this.drawSingleLineMarker(a,g,r+(f==n?" ace_start":"")+" ace_br"+c(f==n||f==n+1&&i.start.column,y<_,_>v,f==d),o,f==d?0:1,s)},h.prototype.drawMultiLineMarker=function(a,i,r,o,s){var l=this.$padding,n=o.lineHeight,d=this.$getTop(i.start.row,o),f=l+i.start.column*o.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var y=i.clone();y.end.row=y.start.row,y.end.column=this.session.getLine(y.start.row).length,this.drawBidiSingleLineMarker(a,y,r+" ace_br1 ace_start",o,null,s)}else this.elt(r+" ace_br1 ace_start","height:"+n+"px;right:"+l+"px;top:"+d+"px;left:"+f+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var y=i.clone();y.start.row=y.end.row,y.start.column=0,this.drawBidiSingleLineMarker(a,y,r+" ace_br12",o,null,s)}else{d=this.$getTop(i.end.row,o);var _=i.end.column*o.characterWidth;this.elt(r+" ace_br12","height:"+n+"px;width:"+_+"px;top:"+d+"px;left:"+l+"px;"+(s||""))}if(n=(i.end.row-i.start.row-1)*o.lineHeight,!(n<=0)){d=this.$getTop(i.start.row+1,o);var v=(i.start.column?1:0)|(i.end.column?0:8);this.elt(r+(v?" ace_br"+v:""),"height:"+n+"px;right:"+l+"px;top:"+d+"px;left:"+l+"px;"+(s||""))}},h.prototype.drawSingleLineMarker=function(a,i,r,o,s,l){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(a,i,r,o,s,l);var n=o.lineHeight,d=(i.end.column+(s||0)-i.start.column)*o.characterWidth,f=this.$getTop(i.start.row,o),y=this.$padding+i.start.column*o.characterWidth;this.elt(r,"height:"+n+"px;width:"+d+"px;top:"+f+"px;left:"+y+"px;"+(l||""))},h.prototype.drawBidiSingleLineMarker=function(a,i,r,o,s,l){var n=o.lineHeight,d=this.$getTop(i.start.row,o),f=this.$padding,y=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);y.forEach(function(_){this.elt(r,"height:"+n+"px;width:"+(_.width+(s||0))+"px;top:"+d+"px;left:"+(f+_.left)+"px;"+(l||""))},this)},h.prototype.drawFullLineMarker=function(a,i,r,o,s){var l=this.$getTop(i.start.row,o),n=o.lineHeight;i.start.row!=i.end.row&&(n+=this.$getTop(i.end.row,o)-l),this.elt(r,"height:"+n+"px;top:"+l+"px;left:0;right:0;"+(s||""))},h.prototype.drawScreenLineMarker=function(a,i,r,o,s){var l=this.$getTop(i.start.row,o),n=o.lineHeight;this.elt(r,"height:"+n+"px;top:"+l+"px;left:0;right:0;"+(s||""))},h})();p.prototype.$padding=0;function c(h,a,i,r){return(h?1:0)|(a?2:0)|(i?4:0)|(r?8:0)}D.Marker=p}),ace.define("ace/layer/text_util",["require","exports","module"],function($,D,V){var R=new Set(["text","rparen","lparen"]);D.isTextToken=function(x){return R.has(x)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function($,D,V){var R=$("../lib/oop"),x=$("../lib/dom"),p=$("../lib/lang"),c=$("./lines").Lines,h=$("../lib/event_emitter").EventEmitter,a=$("../config").nls,i=$("./text_util").isTextToken,r=(function(){function o(s){this.dom=x,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return o.prototype.$updateEolChar=function(){var s=this.session.doc,l=s.getNewLineCharacter()==`
329
- `&&s.getNewLineMode()!="windows",n=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},o.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"px"},o.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},o.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},o.prototype.$setFontMetrics=function(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},o.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},o.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},o.prototype.setSession=function(s){this.session=s,s&&this.$computeTabString()},o.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},o.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},o.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},o.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var l=this.$tabStrings=[0],n=1;n<s+1;n++)if(this.showTabs){var d=this.dom.createElement("span");d.className="ace_invisible ace_invisible_tab",d.textContent=p.stringRepeat(this.TAB_CHAR,n),l.push(d)}else l.push(this.dom.createTextNode(p.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var f="ace_indent-guide",y=this.showSpaces?" ace_invisible ace_invisible_space":"",_=this.showSpaces?p.stringRepeat(this.SPACE_CHAR,this.tabSize):p.stringRepeat(" ",this.tabSize),v=this.showTabs?" ace_invisible ace_invisible_tab":"",g=this.showTabs?p.stringRepeat(this.TAB_CHAR,this.tabSize):_,d=this.dom.createElement("span");d.className=f+y,d.textContent=_,this.$tabStrings[" "]=d;var d=this.dom.createElement("span");d.className=f+v,d.textContent=g,this.$tabStrings[" "]=d}},o.prototype.updateLines=function(s,l,n){if(this.config.lastRow!=s.lastRow||this.config.firstRow!=s.firstRow)return this.update(s);this.config=s;for(var d=Math.max(l,s.firstRow),f=Math.min(n,s.lastRow),y=this.element.childNodes,_=0,g=s.firstRow;g<d;g++){var w=this.session.getFoldLine(g);if(w)if(w.containsRow(d)){d=w.start.row;break}else g=w.end.row;_++}for(var v=!1,g=d,w=this.session.getNextFoldLine(g),b=w?w.start.row:1/0;g>b&&(g=w.end.row+1,w=this.session.getNextFoldLine(g,w),b=w?w.start.row:1/0),!(g>f);){var S=y[_++];if(S){this.dom.removeChildren(S),this.$renderLine(S,g,g==b?w:!1),v&&(S.style.top=this.$lines.computeLineTop(g,s,this.session)+"px");var T=s.lineHeight*this.session.getRowLength(g)+"px";S.style.height!=T&&(v=!0,S.style.height=T)}g++}if(v)for(;_<this.$lines.cells.length;){var j=this.$lines.cells[_++];j.element.style.top=this.$lines.computeLineTop(j.row,s,this.session)+"px"}},o.prototype.scrollLines=function(s){var l=this.config;if(this.config=s,this.$lines.pageChanged(l,s))return this.update(s);this.$lines.moveContainer(s);var n=s.lastRow,d=l?l.lastRow:-1;if(!l||d<s.firstRow)return this.update(s);if(n<l.firstRow)return this.update(s);if(!l||l.lastRow<s.firstRow)return this.update(s);if(s.lastRow<l.firstRow)return this.update(s);if(l.firstRow<s.firstRow)for(var f=this.session.getFoldedRowCount(l.firstRow,s.firstRow-1);f>0;f--)this.$lines.shift();if(l.lastRow>s.lastRow)for(var f=this.session.getFoldedRowCount(s.lastRow+1,l.lastRow);f>0;f--)this.$lines.pop();s.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(s,s.firstRow,l.firstRow-1)),s.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(s,l.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},o.prototype.$renderLinesFragment=function(s,l,n){for(var d=[],f=l,y=this.session.getNextFoldLine(f),_=y?y.start.row:1/0;f>_&&(f=y.end.row+1,y=this.session.getNextFoldLine(f,y),_=y?y.start.row:1/0),!(f>n);){var v=this.$lines.createCell(f,s,this.session),g=v.element;this.dom.removeChildren(g),x.setStyle(g.style,"height",this.$lines.computeLineHeight(f,s,this.session)+"px"),x.setStyle(g.style,"top",this.$lines.computeLineTop(f,s,this.session)+"px"),this.$renderLine(g,f,f==_?y:!1),this.$useLineGroups()?g.className="ace_line_group":g.className="ace_line",d.push(v),f++}return d},o.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var l=s.firstRow,n=s.lastRow,d=this.$lines;d.getLength();)d.pop();d.push(this.$renderLinesFragment(s,l,n))},o.prototype.$renderToken=function(s,l,n,d){for(var f=this,y=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,_=this.dom.createFragment(this.element),v,g=0;v=y.exec(d);){var w=v[1],b=v[2],S=v[3],T=v[4],j=v[5];if(!(!f.showSpaces&&b)){var E=g!=v.index?d.slice(g,v.index):"";if(g=v.index+v[0].length,E&&_.appendChild(this.dom.createTextNode(E,this.element)),w){var A=f.session.getScreenTabSize(l+v.index),M=f.$tabStrings[A].cloneNode(!0);M.charCount=1,_.appendChild(M),l+=A-1}else if(b)if(f.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=p.stringRepeat(f.SPACE_CHAR,b.length),_.appendChild(C)}else _.appendChild(this.dom.createTextNode(b,this.element));else if(S){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=p.stringRepeat(f.SPACE_CHAR,S.length),_.appendChild(C)}else if(T){l+=1;var C=this.dom.createElement("span");C.style.width=f.config.characterWidth*2+"px",C.className=f.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=f.showSpaces?f.SPACE_CHAR:T,_.appendChild(C)}else if(j){l+=1;var C=this.dom.createElement("span");C.style.width=f.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=j,_.appendChild(C)}}}if(_.appendChild(this.dom.createTextNode(g?d.slice(g):d,this.element)),i(n.type))s.appendChild(_);else{var L="ace_"+n.type.replace(/\./g," ace_"),C=this.dom.createElement("span");n.type=="fold"&&(C.style.width=n.value.length*this.config.characterWidth+"px",C.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),C.className=L,C.appendChild(_),s.appendChild(C)}return l+d.length},o.prototype.renderIndentGuide=function(s,l,n){var d=l.search(this.$indentGuideRe);if(d<=0||d>=n)return l;if(l[0]==" "){d-=d%this.tabSize;for(var f=d/this.tabSize,y=0;y<f;y++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(d)}else if(l[0]==" "){for(var y=0;y<d;y++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(d)}return this.$highlightIndentGuide(),l},o.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var s=this.session.doc.$lines;if(s){var l=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,d=Math.floor(n/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:d,start:l.row};var f=this.session.$bracketHighlight;if(f){for(var y=this.session.$bracketHighlight.ranges,_=0;_<y.length;_++)if(l.row!==y[_].start.row){this.$highlightIndentGuideMarker.end=y[_].start.row+1,l.row>y[_].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[l.row]!==""&&l.column===s[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var _=l.row+1;_<s.length;_++){var v=s[_],g=/^\s*/.exec(v)[0].length;if(v!==""&&(this.$highlightIndentGuideMarker.end=_,g<=n))break}}this.$renderHighlightIndentGuide()}}},o.prototype.$clearActiveIndentGuide=function(){for(var s=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<s.length;l++)s[l].classList.remove("ace_indent-guide-active")},o.prototype.$setIndentGuideActive=function(s,l){var n=this.session.doc.getLine(s.row);if(n!==""){var d=s.element;if(s.element.classList&&s.element.classList.contains("ace_line_group"))if(s.element.childNodes.length>0)d=s.element.childNodes[0];else return;var f=d.childNodes;if(f){var y=f[l-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active")}}},o.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var s=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var n=0;n<s.length;n++){var d=s[n];if(this.$highlightIndentGuideMarker.end&&d.row>=this.$highlightIndentGuideMarker.start+1){if(d.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,l)}}else for(var n=s.length-1;n>=0;n--){var d=s[n];if(this.$highlightIndentGuideMarker.end&&d.row<this.$highlightIndentGuideMarker.start){if(d.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,l)}}}},o.prototype.$createLineElement=function(s){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},o.prototype.$renderWrappedLine=function(s,l,n){var d=0,f=0,y=n[0],_=0,v=this.$createLineElement();s.appendChild(v);for(var g=0;g<l.length;g++){var w=l[g],b=w.value;if(g==0&&this.displayIndentGuides){if(d=b.length,b=this.renderIndentGuide(v,b,y),!b)continue;d-=b.length}if(d+b.length<y)_=this.$renderToken(v,_,w,b),d+=b.length;else{for(;d+b.length>=y;){_=this.$renderToken(v,_,w,b.substring(0,y-d)),b=b.substring(y-d),d=y,v=this.$createLineElement(),s.appendChild(v);var S=this.dom.createTextNode(p.stringRepeat(" ",n.indent),this.element);S.charCount=0,v.appendChild(S),f++,_=0,y=n[f]||Number.MAX_VALUE}b.length!=0&&(d+=b.length,_=this.$renderToken(v,_,w,b))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(v,_,null,"",!0)},o.prototype.$renderSimpleLine=function(s,l){for(var n=0,d=0;d<l.length;d++){var f=l[d],y=f.value;if(!(d==0&&this.displayIndentGuides&&(y=this.renderIndentGuide(s,y),!y))){if(n+y.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,n,f,y);n=this.$renderToken(s,n,f,y)}}},o.prototype.$renderOverflowMessage=function(s,l,n,d,f){n&&this.$renderToken(s,l,n,d.slice(0,this.MAX_LINE_LENGTH-l));var y=this.dom.createElement("span");y.className="ace_inline_button ace_keyword ace_toggle_wrap",y.textContent=f?"<hide>":"<click to see more...>",s.appendChild(y)},o.prototype.$renderLine=function(s,l,n){if(!n&&n!=!1&&(n=this.session.getFoldLine(l)),n)var d=this.$getFoldLineTokens(l,n);else var d=this.session.getTokens(l);var f=s;if(d.length){var y=this.session.getRowSplitData(l);if(y&&y.length){this.$renderWrappedLine(s,d,y);var f=s.lastChild}else{var f=s;this.$useLineGroups()&&(f=this.$createLineElement(),s.appendChild(f)),this.$renderSimpleLine(f,d)}}else this.$useLineGroups()&&(f=this.$createLineElement(),s.appendChild(f));if(this.showEOL&&f){n&&(l=n.end.row);var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_eol",_.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,f.appendChild(_)}},o.prototype.$getFoldLineTokens=function(s,l){var n=this.session,d=[];function f(_,v,g){for(var w=0,b=0;b+_[w].value.length<v;)if(b+=_[w].value.length,w++,w==_.length)return;if(b!=v){var S=_[w].value.substring(v-b);S.length>g-v&&(S=S.substring(0,g-v)),d.push({type:_[w].type,value:S}),b=v+S.length,w+=1}for(;b<g&&w<_.length;){var S=_[w].value;S.length+b>g?d.push({type:_[w].type,value:S.substring(0,g-b)}):d.push(_[w]),b+=S.length,w+=1}}var y=n.getTokens(s);return l.walk(function(_,v,g,w,b){_!=null?d.push({type:"fold",value:_}):(b&&(y=n.getTokens(v)),y.length&&f(y,w,g))},l.end.row,this.session.getLine(l.end.row).length),d},o.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},o})();r.prototype.EOF_CHAR="¶",r.prototype.EOL_CHAR_LF="¬",r.prototype.EOL_CHAR_CRLF="¤",r.prototype.EOL_CHAR=r.prototype.EOL_CHAR_LF,r.prototype.TAB_CHAR="—",r.prototype.SPACE_CHAR="·",r.prototype.$padding=0,r.prototype.MAX_LINE_LENGTH=1e4,r.prototype.showInvisibles=!1,r.prototype.showSpaces=!1,r.prototype.showTabs=!1,r.prototype.showEOL=!1,r.prototype.displayIndentGuides=!0,r.prototype.$highlightIndentGuides=!0,r.prototype.$tabStrings=[],r.prototype.destroy={},r.prototype.onChangeTabSize=r.prototype.$computeTabString,R.implement(r.prototype,h),D.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function($,D,V){var R=$("../lib/dom"),x=(function(){function p(c){this.element=R.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),R.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return p.prototype.$updateOpacity=function(c){for(var h=this.cursors,a=h.length;a--;)R.setStyle(h[a].style,"opacity",c?"":"0")},p.prototype.$startCssAnimation=function(){for(var c=this.cursors,h=c.length;h--;)c[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&R.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},p.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,R.removeCssClass(this.element,"ace_animate-blinking")},p.prototype.setPadding=function(c){this.$padding=c},p.prototype.setSession=function(c){this.session=c},p.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},p.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},p.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,R.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},p.prototype.addCursor=function(){var c=R.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},p.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},p.prototype.hideCursor=function(){this.isVisible=!1,R.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},p.prototype.showCursor=function(){this.isVisible=!0,R.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},p.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,R.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&R.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),R.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),h()},this.blinkInterval),h()}},p.prototype.getPixelPosition=function(c,h){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(c),i=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,c.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),r=(a.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},p.prototype.isCursorInView=function(c,h){return c.top>=0&&c.top<h.maxHeight},p.prototype.update=function(c){this.config=c;var h=this.session.$selectionMarkers,a=0,i=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var a=0,r=h.length;a<r;a++){var o=this.getPixelPosition(h[a].cursor,!0);if(!((o.top>c.height+c.offset||o.top<0)&&a>1)){var s=this.cursors[i++]||this.addCursor(),l=s.style;this.drawCursor?this.drawCursor(s,o,c,h[a],this.session):this.isCursorInView(o,c)?(R.setStyle(l,"display","block"),R.translate(s,o.left,o.top),R.setStyle(l,"width",Math.round(c.characterWidth)+"px"),R.setStyle(l,"height",c.lineHeight+"px")):R.setStyle(l,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var n=this.session.getOverwrite();this.$setOverwrite(n),this.$pixelPos=o,this.restartTimer()},p.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?R.addCssClass(this.element,"ace_overwrite-cursors"):R.removeCssClass(this.element,"ace_overwrite-cursors"))},p.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},p})();x.prototype.$padding=0,x.prototype.drawCursor=null,D.Cursor=x}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function($,D,V){var R=this&&this.__extends||(function(){var s=function(l,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var y in f)Object.prototype.hasOwnProperty.call(f,y)&&(d[y]=f[y])},s(l,n)};return function(l,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");s(l,n);function d(){this.constructor=l}l.prototype=n===null?Object.create(n):(d.prototype=n.prototype,new d)}})(),x=$("./lib/oop"),p=$("./lib/dom"),c=$("./lib/event"),h=$("./lib/event_emitter").EventEmitter,a=32768,i=(function(){function s(l,n){this.element=p.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+n,this.inner=p.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return s.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},s})();x.implement(i.prototype,h);var r=(function(s){R(l,s);function l(n,d){var f=s.call(this,n,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,d.$scrollbarWidth=f.width=p.scrollbarWidth(n.ownerDocument),f.inner.style.width=f.element.style.width=(f.width||15)+5+"px",f.$minWidth=0,f}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var n=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-n)/(this.coeff-n)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(n){this.element.style.height=n+"px"},l.prototype.setScrollHeight=function(n){this.scrollHeight=n,n>a?(this.coeff=a/n,n=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=n+"px"},l.prototype.setScrollTop=function(n){this.scrollTop!=n&&(this.skipEvent=!0,this.scrollTop=n,this.element.scrollTop=n*this.coeff)},l})(i);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var o=(function(s){R(l,s);function l(n,d){var f=s.call(this,n,"-h")||this;return f.scrollLeft=0,f.height=d.$scrollbarWidth,f.inner.style.height=f.element.style.height=(f.height||15)+5+"px",f}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(n){this.element.style.width=n+"px"},l.prototype.setInnerWidth=function(n){this.inner.style.width=n+"px"},l.prototype.setScrollWidth=function(n){this.inner.style.width=n+"px"},l.prototype.setScrollLeft=function(n){this.scrollLeft!=n&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=n)},l})(i);D.ScrollBar=r,D.ScrollBarV=r,D.ScrollBarH=o,D.VScrollBar=r,D.HScrollBar=o}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function($,D,V){var R=this&&this.__extends||(function(){var o=function(s,l){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,d){n.__proto__=d}||function(n,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(n[f]=d[f])},o(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");o(s,l);function n(){this.constructor=s}s.prototype=l===null?Object.create(l):(n.prototype=l.prototype,new n)}})(),x=$("./lib/oop"),p=$("./lib/dom"),c=$("./lib/event"),h=$("./lib/event_emitter").EventEmitter;p.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
330
- position: absolute;
331
- background: rgba(128, 128, 128, 0.6);
332
- -moz-box-sizing: border-box;
333
- box-sizing: border-box;
334
- border: 1px solid #bbb;
335
- border-radius: 2px;
336
- z-index: 8;
337
- }
338
- .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
339
- position: absolute;
340
- z-index: 6;
341
- background: none;
342
- overflow: hidden!important;
343
- }
344
- .ace_editor>.ace_sb-v {
345
- z-index: 6;
346
- right: 0;
347
- top: 0;
348
- width: 12px;
349
- }
350
- .ace_editor>.ace_sb-v div {
351
- z-index: 8;
352
- right: 0;
353
- width: 100%;
354
- }
355
- .ace_editor>.ace_sb-h {
356
- bottom: 0;
357
- left: 0;
358
- height: 12px;
359
- }
360
- .ace_editor>.ace_sb-h div {
361
- bottom: 0;
362
- height: 100%;
363
- }
364
- .ace_editor>.ace_sb_grabbed {
365
- z-index: 8;
366
- background: #000;
367
- }`,"ace_scrollbar.css",!1);var a=(function(){function o(s,l){this.element=p.createElement("div"),this.element.className="ace_sb"+l,this.inner=p.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return o.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},o})();x.implement(a.prototype,h);var i=(function(o){R(s,o);function s(l,n){var d=o.call(this,l,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,d.parent=l,d.width=d.VScrollWidth,d.renderer=n,d.inner.style.width=d.element.style.width=(d.width||15)+"px",d.$minWidth=0,d}return s.prototype.onMouseDown=function(l,n){if(l==="mousedown"&&!(c.getButton(n)!==0||n.detail===2)){if(n.target===this.inner){var d=this,f=n.clientY,y=function(T){f=T.clientY},_=function(){clearInterval(b)},v=n.clientY,g=this.thumbTop,w=function(){if(f!==void 0){var T=d.scrollTopFromThumbTop(g+f-v);T!==d.scrollTop&&d._emit("scroll",{data:T})}};c.capture(this.inner,y,_);var b=setInterval(w,20);return c.preventDefault(n)}var S=n.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(S)}),c.preventDefault(n)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(l){var n=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return n=n>>0,n<0?n=0:n>this.pageHeight-this.viewHeight&&(n=this.pageHeight-this.viewHeight),n},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(l,n){this.pageHeight===l&&!n||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},s.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s})(a);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var r=(function(o){R(s,o);function s(l,n){var d=o.call(this,l,"-h")||this;return d.scrollLeft=0,d.scrollWidth=0,d.height=d.HScrollHeight,d.inner.style.height=d.element.style.height=(d.height||12)+"px",d.renderer=n,d}return s.prototype.onMouseDown=function(l,n){if(l==="mousedown"&&!(c.getButton(n)!==0||n.detail===2)){if(n.target===this.inner){var d=this,f=n.clientX,y=function(T){f=T.clientX},_=function(){clearInterval(b)},v=n.clientX,g=this.thumbLeft,w=function(){if(f!==void 0){var T=d.scrollLeftFromThumbLeft(g+f-v);T!==d.scrollLeft&&d._emit("scroll",{data:T})}};c.capture(this.inner,y,_);var b=setInterval(w,20);return c.preventDefault(n)}var S=n.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(S)}),c.preventDefault(n)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(l){var n=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return n=n>>0,n<0?n=0:n>this.pageWidth-this.viewWidth&&(n=this.pageWidth-this.viewWidth),n},s.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(l,n){this.pageWidth===l&&!n||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},s.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s})(a);r.prototype.setInnerWidth=r.prototype.setScrollWidth,D.ScrollBar=i,D.ScrollBarV=i,D.ScrollBarH=r,D.VScrollBar=i,D.HScrollBar=r}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function($,D,V){var R=$("./lib/event"),x=(function(){function p(c,h){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var a=this;this._flush=function(i){a.pending=!1;var r=a.changes;if(r&&(R.blockIdle(100),a.changes=0,a.onRender(r)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return p.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(R.nextFrame(this._flush),this.pending=!0)},p.prototype.clear=function(c){var h=this.changes;return this.changes=0,h},p})();D.RenderLoop=x}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function($,D,V){var R=$("../lib/oop"),x=$("../lib/dom"),p=$("../lib/lang"),c=$("../lib/event"),h=$("../lib/useragent"),a=$("../lib/event_emitter").EventEmitter,i=512,r=typeof ResizeObserver=="function",o=200,s=(function(){function l(n){this.el=x.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=x.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=x.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),n.appendChild(this.el),this.$measureNode.textContent=p.stringRepeat("X",i),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(n,d){n.width=n.height="auto",n.left=n.top="0px",n.visibility="hidden",n.position="absolute",n.whiteSpace="pre",h.isIE<8?n["font-family"]="inherit":n.font="inherit",n.overflow=d?"hidden":"visible"},l.prototype.checkForSizeChanges=function(n){if(n===void 0&&(n=this.$measureSizes()),n&&(this.$characterSize.width!==n.width||this.$characterSize.height!==n.height)){this.$measureNode.style.fontWeight="bold";var d=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=n,this.charSizes=Object.create(null),this.allowBoldFonts=d&&d.width===n.width&&d.height===n.height,this._emit("changeCharacterSize",{data:n})}},l.prototype.$addObserver=function(){var n=this;this.$observer=new window.ResizeObserver(function(d){n.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var n=this;return this.$pollSizeChangesTimer=c.onIdle(function d(){n.checkForSizeChanges(),c.onIdle(d,500)},500)},l.prototype.setPolling=function(n){n?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(n){var d={height:(n||this.$measureNode).clientHeight,width:(n||this.$measureNode).clientWidth/i};return d.width===0||d.height===0?null:d},l.prototype.$measureCharWidth=function(n){this.$main.textContent=p.stringRepeat(n,i);var d=this.$main.getBoundingClientRect();return d.width/i},l.prototype.getCharacterWidth=function(n){var d=this.charSizes[n];return d===void 0&&(d=this.charSizes[n]=this.$measureCharWidth(n)/this.$characterSize.width),d},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(n){return!n||!n.parentElement?1:(Number(window.getComputedStyle(n).zoom)||1)*this.$getZoom(n.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var n=function(d,f){return["div",{style:"position: absolute;top:"+d+"px;left:"+f+"px;"}]};this.els=x.buildDom([n(0,0),n(o,0),n(0,o),n(o,o)],this.el)},l.prototype.transformCoordinates=function(n,d){if(n){var f=this.$getZoom(this.el);n=g(1/f,n)}function y(F,H,Y){var K=F[1]*H[0]-F[0]*H[1];return[(-H[1]*Y[0]+H[0]*Y[1])/K,(+F[1]*Y[0]-F[0]*Y[1])/K]}function _(F,H){return[F[0]-H[0],F[1]-H[1]]}function v(F,H){return[F[0]+H[0],F[1]+H[1]]}function g(F,H){return[F*H[0],F*H[1]]}this.els||this.$initTransformMeasureNodes();function w(F){var H=F.getBoundingClientRect();return[H.left,H.top]}var b=w(this.els[0]),S=w(this.els[1]),T=w(this.els[2]),j=w(this.els[3]),E=y(_(j,S),_(j,T),_(v(S,T),v(j,b))),A=g(1+E[0],_(S,b)),M=g(1+E[1],_(T,b));if(d){var C=d,L=E[0]*C[0]/o+E[1]*C[1]/o+1,I=v(g(C[0],A),g(C[1],M));return v(g(1/L/o,I),b)}var O=_(n,b),z=y(_(A,g(E[0],O)),_(M,g(E[1],O)),O);return g(o,z)},l})();s.prototype.$characterSize={width:0,height:0},R.implement(s.prototype,a),D.FontMetrics=s}),ace.define("ace/css/editor-css",["require","exports","module"],function($,D,V){V.exports=`
368
- .ace_br1 {border-top-left-radius : 3px;}
369
- .ace_br2 {border-top-right-radius : 3px;}
370
- .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
371
- .ace_br4 {border-bottom-right-radius: 3px;}
372
- .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
373
- .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
374
- .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
375
- .ace_br8 {border-bottom-left-radius : 3px;}
376
- .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
377
- .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
378
- .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
379
- .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
380
- .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
381
- .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
382
- .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
383
-
384
-
385
- .ace_editor {
386
- position: relative;
387
- overflow: hidden;
388
- padding: 0;
389
- font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
390
- direction: ltr;
391
- text-align: left;
392
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
393
- forced-color-adjust: none;
394
- }
395
-
396
- .ace_scroller {
397
- position: absolute;
398
- overflow: hidden;
399
- top: 0;
400
- bottom: 0;
401
- background-color: inherit;
402
- -ms-user-select: none;
403
- -moz-user-select: none;
404
- -webkit-user-select: none;
405
- user-select: none;
406
- cursor: text;
407
- }
408
-
409
- .ace_content {
410
- position: absolute;
411
- box-sizing: border-box;
412
- min-width: 100%;
413
- contain: style size layout;
414
- font-variant-ligatures: no-common-ligatures;
415
- }
416
- .ace_invisible {
417
- font-variant-ligatures: none;
418
- }
419
-
420
- .ace_keyboard-focus:focus {
421
- box-shadow: inset 0 0 0 2px #5E9ED6;
422
- outline: none;
423
- }
424
-
425
- .ace_dragging .ace_scroller:before{
426
- position: absolute;
427
- top: 0;
428
- left: 0;
429
- right: 0;
430
- bottom: 0;
431
- content: '';
432
- background: rgba(250, 250, 250, 0.01);
433
- z-index: 1000;
434
- }
435
- .ace_dragging.ace_dark .ace_scroller:before{
436
- background: rgba(0, 0, 0, 0.01);
437
- }
438
-
439
- .ace_gutter {
440
- position: absolute;
441
- overflow : hidden;
442
- width: auto;
443
- top: 0;
444
- bottom: 0;
445
- left: 0;
446
- cursor: default;
447
- z-index: 4;
448
- -ms-user-select: none;
449
- -moz-user-select: none;
450
- -webkit-user-select: none;
451
- user-select: none;
452
- contain: style size layout;
453
- }
454
-
455
- .ace_gutter-active-line {
456
- position: absolute;
457
- left: 0;
458
- right: 0;
459
- }
460
-
461
- .ace_scroller.ace_scroll-left:after {
462
- content: "";
463
- position: absolute;
464
- top: 0;
465
- right: 0;
466
- bottom: 0;
467
- left: 0;
468
- box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
469
- pointer-events: none;
470
- }
471
-
472
- .ace_gutter-cell, .ace_gutter-cell_svg-icons {
473
- position: absolute;
474
- top: 0;
475
- left: 0;
476
- right: 0;
477
- padding-left: 19px;
478
- padding-right: 6px;
479
- background-repeat: no-repeat;
480
- }
481
-
482
- .ace_gutter-cell_svg-icons .ace_gutter_annotation {
483
- margin-left: -14px;
484
- float: left;
485
- }
486
-
487
- .ace_gutter-cell .ace_gutter_annotation {
488
- margin-left: -19px;
489
- float: left;
490
- }
491
-
492
- .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
493
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
494
- background-repeat: no-repeat;
495
- background-position: 2px center;
496
- }
497
-
498
- .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
499
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
500
- background-repeat: no-repeat;
501
- background-position: 2px center;
502
- }
503
-
504
- .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
505
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
506
- background-repeat: no-repeat;
507
- background-position: 2px center;
508
- }
509
-
510
- .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
511
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
512
- }
513
-
514
- .ace_icon_svg.ace_error {
515
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
516
- background-color: crimson;
517
- }
518
- .ace_icon_svg.ace_security {
519
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
520
- background-color: crimson;
521
- }
522
- .ace_icon_svg.ace_warning {
523
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
524
- background-color: darkorange;
525
- }
526
- .ace_icon_svg.ace_info {
527
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
528
- background-color: royalblue;
529
- }
530
- .ace_icon_svg.ace_hint {
531
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
532
- background-color: silver;
533
- }
534
-
535
- .ace_icon_svg.ace_error_fold {
536
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
537
- background-color: crimson;
538
- }
539
- .ace_icon_svg.ace_security_fold {
540
- -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
541
- background-color: crimson;
542
- }
543
- .ace_icon_svg.ace_warning_fold {
544
- -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
545
- background-color: darkorange;
546
- }
547
-
548
- .ace_scrollbar {
549
- contain: strict;
550
- position: absolute;
551
- right: 0;
552
- bottom: 0;
553
- z-index: 6;
554
- }
555
-
556
- .ace_scrollbar-inner {
557
- position: absolute;
558
- cursor: text;
559
- left: 0;
560
- top: 0;
561
- }
562
-
563
- .ace_scrollbar-v{
564
- overflow-x: hidden;
565
- overflow-y: scroll;
566
- top: 0;
567
- }
568
-
569
- .ace_scrollbar-h {
570
- overflow-x: scroll;
571
- overflow-y: hidden;
572
- left: 0;
573
- }
574
-
575
- .ace_print-margin {
576
- position: absolute;
577
- height: 100%;
578
- }
579
-
580
- .ace_text-input {
581
- position: absolute;
582
- z-index: 0;
583
- width: 0.5em;
584
- height: 1em;
585
- opacity: 0;
586
- background: transparent;
587
- -moz-appearance: none;
588
- appearance: none;
589
- border: none;
590
- resize: none;
591
- outline: none;
592
- overflow: hidden;
593
- font: inherit;
594
- padding: 0 1px;
595
- margin: 0 -1px;
596
- contain: strict;
597
- -ms-user-select: text;
598
- -moz-user-select: text;
599
- -webkit-user-select: text;
600
- user-select: text;
601
- /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
602
- white-space: pre!important;
603
- }
604
- .ace_text-input.ace_composition {
605
- background: transparent;
606
- color: inherit;
607
- z-index: 1000;
608
- opacity: 1;
609
- }
610
- .ace_composition_placeholder { color: transparent }
611
- .ace_composition_marker {
612
- border-bottom: 1px solid;
613
- position: absolute;
614
- border-radius: 0;
615
- margin-top: 1px;
616
- }
617
-
618
- [ace_nocontext=true] {
619
- transform: none!important;
620
- filter: none!important;
621
- clip-path: none!important;
622
- mask : none!important;
623
- contain: none!important;
624
- perspective: none!important;
625
- mix-blend-mode: initial!important;
626
- z-index: auto;
627
- }
628
-
629
- .ace_layer {
630
- z-index: 1;
631
- position: absolute;
632
- overflow: hidden;
633
- /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
634
- word-wrap: normal;
635
- white-space: pre;
636
- height: 100%;
637
- width: 100%;
638
- box-sizing: border-box;
639
- /* setting pointer-events: auto; on node under the mouse, which changes
640
- during scroll, will break mouse wheel scrolling in Safari */
641
- pointer-events: none;
642
- }
643
-
644
- .ace_gutter-layer {
645
- position: relative;
646
- width: auto;
647
- text-align: right;
648
- pointer-events: auto;
649
- height: 1000000px;
650
- contain: style size layout;
651
- }
652
-
653
- .ace_text-layer {
654
- font: inherit !important;
655
- position: absolute;
656
- height: 1000000px;
657
- width: 1000000px;
658
- contain: style size layout;
659
- }
660
-
661
- .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
662
- contain: style size layout;
663
- position: absolute;
664
- top: 0;
665
- left: 0;
666
- right: 0;
667
- }
668
-
669
- .ace_hidpi .ace_text-layer,
670
- .ace_hidpi .ace_gutter-layer,
671
- .ace_hidpi .ace_content,
672
- .ace_hidpi .ace_gutter {
673
- contain: strict;
674
- }
675
- .ace_hidpi .ace_text-layer > .ace_line,
676
- .ace_hidpi .ace_text-layer > .ace_line_group {
677
- contain: strict;
678
- }
679
-
680
- .ace_cjk {
681
- display: inline-block;
682
- text-align: center;
683
- }
684
-
685
- .ace_cursor-layer {
686
- z-index: 4;
687
- }
688
-
689
- .ace_cursor {
690
- z-index: 4;
691
- position: absolute;
692
- box-sizing: border-box;
693
- border-left: 2px solid;
694
- /* workaround for smooth cursor repaintng whole screen in chrome */
695
- transform: translatez(0);
696
- }
697
-
698
- .ace_multiselect .ace_cursor {
699
- border-left-width: 1px;
700
- }
701
-
702
- .ace_slim-cursors .ace_cursor {
703
- border-left-width: 1px;
704
- }
705
-
706
- .ace_overwrite-cursors .ace_cursor {
707
- border-left-width: 0;
708
- border-bottom: 1px solid;
709
- }
710
-
711
- .ace_hidden-cursors .ace_cursor {
712
- opacity: 0.2;
713
- }
714
-
715
- .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
716
- opacity: 0;
717
- }
718
-
719
- .ace_smooth-blinking .ace_cursor {
720
- transition: opacity 0.18s;
721
- }
722
-
723
- .ace_animate-blinking .ace_cursor {
724
- animation-duration: 1000ms;
725
- animation-timing-function: step-end;
726
- animation-name: blink-ace-animate;
727
- animation-iteration-count: infinite;
728
- }
729
-
730
- .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
731
- animation-duration: 1000ms;
732
- animation-timing-function: ease-in-out;
733
- animation-name: blink-ace-animate-smooth;
734
- }
735
-
736
- @keyframes blink-ace-animate {
737
- from, to { opacity: 1; }
738
- 60% { opacity: 0; }
739
- }
740
-
741
- @keyframes blink-ace-animate-smooth {
742
- from, to { opacity: 1; }
743
- 45% { opacity: 1; }
744
- 60% { opacity: 0; }
745
- 85% { opacity: 0; }
746
- }
747
-
748
- .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
749
- position: absolute;
750
- z-index: 3;
751
- }
752
-
753
- .ace_marker-layer .ace_selection {
754
- position: absolute;
755
- z-index: 5;
756
- }
757
-
758
- .ace_marker-layer .ace_bracket {
759
- position: absolute;
760
- z-index: 6;
761
- }
762
-
763
- .ace_marker-layer .ace_error_bracket {
764
- position: absolute;
765
- border-bottom: 1px solid #DE5555;
766
- border-radius: 0;
767
- }
768
-
769
- .ace_marker-layer .ace_active-line {
770
- position: absolute;
771
- z-index: 2;
772
- }
773
-
774
- .ace_marker-layer .ace_selected-word {
775
- position: absolute;
776
- z-index: 4;
777
- box-sizing: border-box;
778
- }
779
-
780
- .ace_line .ace_fold {
781
- box-sizing: border-box;
782
-
783
- display: inline-block;
784
- height: 11px;
785
- margin-top: -2px;
786
- vertical-align: middle;
787
-
788
- background-image:
789
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
790
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
791
- background-repeat: no-repeat, repeat-x;
792
- background-position: center center, top left;
793
- color: transparent;
794
-
795
- border: 1px solid black;
796
- border-radius: 2px;
797
-
798
- cursor: pointer;
799
- pointer-events: auto;
800
- }
801
-
802
- .ace_dark .ace_fold {
803
- }
804
-
805
- .ace_fold:hover{
806
- background-image:
807
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
808
- url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
809
- }
810
-
811
- .ace_tooltip {
812
- background-color: #f5f5f5;
813
- border: 1px solid gray;
814
- border-radius: 1px;
815
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
816
- color: black;
817
- padding: 3px 4px;
818
- position: fixed;
819
- z-index: 999999;
820
- box-sizing: border-box;
821
- cursor: default;
822
- white-space: pre-wrap;
823
- word-wrap: break-word;
824
- line-height: normal;
825
- font-style: normal;
826
- font-weight: normal;
827
- letter-spacing: normal;
828
- pointer-events: none;
829
- overflow: auto;
830
- max-width: min(33em, 66vw);
831
- overscroll-behavior: contain;
832
- }
833
- .ace_tooltip pre {
834
- white-space: pre-wrap;
835
- }
836
-
837
- .ace_tooltip.ace_dark {
838
- background-color: #636363;
839
- color: #fff;
840
- }
841
-
842
- .ace_tooltip:focus {
843
- outline: 1px solid #5E9ED6;
844
- }
845
-
846
- .ace_icon {
847
- display: inline-block;
848
- width: 18px;
849
- vertical-align: top;
850
- }
851
-
852
- .ace_icon_svg {
853
- display: inline-block;
854
- width: 12px;
855
- vertical-align: top;
856
- -webkit-mask-repeat: no-repeat;
857
- -webkit-mask-size: 12px;
858
- -webkit-mask-position: center;
859
- }
860
-
861
- .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
862
- padding-right: 13px;
863
- }
864
-
865
- .ace_fold-widget, .ace_custom-widget {
866
- box-sizing: border-box;
867
-
868
- margin: 0 -12px 0 1px;
869
- display: none;
870
- width: 11px;
871
- vertical-align: top;
872
-
873
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
874
- background-repeat: no-repeat;
875
- background-position: center;
876
-
877
- border-radius: 3px;
878
-
879
- border: 1px solid transparent;
880
- cursor: pointer;
881
- pointer-events: auto;
882
- }
883
-
884
- .ace_custom-widget {
885
- background: none;
886
- }
887
-
888
- .ace_folding-enabled .ace_fold-widget {
889
- display: inline-block;
890
- }
891
-
892
- .ace_fold-widget.ace_end {
893
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
894
- }
895
-
896
- .ace_fold-widget.ace_closed {
897
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
898
- }
899
-
900
- .ace_fold-widget:hover {
901
- border: 1px solid rgba(0, 0, 0, 0.3);
902
- background-color: rgba(255, 255, 255, 0.2);
903
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
904
- }
905
-
906
- .ace_fold-widget:active {
907
- border: 1px solid rgba(0, 0, 0, 0.4);
908
- background-color: rgba(0, 0, 0, 0.05);
909
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
910
- }
911
- /**
912
- * Dark version for fold widgets
913
- */
914
- .ace_dark .ace_fold-widget {
915
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
916
- }
917
- .ace_dark .ace_fold-widget.ace_end {
918
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
919
- }
920
- .ace_dark .ace_fold-widget.ace_closed {
921
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
922
- }
923
- .ace_dark .ace_fold-widget:hover {
924
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
925
- background-color: rgba(255, 255, 255, 0.1);
926
- }
927
- .ace_dark .ace_fold-widget:active {
928
- box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
929
- }
930
-
931
- .ace_inline_button {
932
- border: 1px solid lightgray;
933
- display: inline-block;
934
- margin: -1px 8px;
935
- padding: 0 5px;
936
- pointer-events: auto;
937
- cursor: pointer;
938
- }
939
- .ace_inline_button:hover {
940
- border-color: gray;
941
- background: rgba(200,200,200,0.2);
942
- display: inline-block;
943
- pointer-events: auto;
944
- }
945
-
946
- .ace_fold-widget.ace_invalid {
947
- background-color: #FFB4B4;
948
- border-color: #DE5555;
949
- }
950
-
951
- .ace_fade-fold-widgets .ace_fold-widget {
952
- transition: opacity 0.4s ease 0.05s;
953
- opacity: 0;
954
- }
955
-
956
- .ace_fade-fold-widgets:hover .ace_fold-widget {
957
- transition: opacity 0.05s ease 0.05s;
958
- opacity:1;
959
- }
960
-
961
- .ace_underline {
962
- text-decoration: underline;
963
- }
964
-
965
- .ace_bold {
966
- font-weight: bold;
967
- }
968
-
969
- .ace_nobold .ace_bold {
970
- font-weight: normal;
971
- }
972
-
973
- .ace_italic {
974
- font-style: italic;
975
- }
976
-
977
-
978
- .ace_error-marker {
979
- background-color: rgba(255, 0, 0,0.2);
980
- position: absolute;
981
- z-index: 9;
982
- }
983
-
984
- .ace_highlight-marker {
985
- background-color: rgba(255, 255, 0,0.2);
986
- position: absolute;
987
- z-index: 8;
988
- }
989
-
990
- .ace_mobile-menu {
991
- position: absolute;
992
- line-height: 1.5;
993
- border-radius: 4px;
994
- -ms-user-select: none;
995
- -moz-user-select: none;
996
- -webkit-user-select: none;
997
- user-select: none;
998
- background: white;
999
- box-shadow: 1px 3px 2px grey;
1000
- border: 1px solid #dcdcdc;
1001
- color: black;
1002
- }
1003
- .ace_dark > .ace_mobile-menu {
1004
- background: #333;
1005
- color: #ccc;
1006
- box-shadow: 1px 3px 2px grey;
1007
- border: 1px solid #444;
1008
-
1009
- }
1010
- .ace_mobile-button {
1011
- padding: 2px;
1012
- cursor: pointer;
1013
- overflow: hidden;
1014
- }
1015
- .ace_mobile-button:hover {
1016
- background-color: #eee;
1017
- opacity:1;
1018
- }
1019
- .ace_mobile-button:active {
1020
- background-color: #ddd;
1021
- }
1022
-
1023
- .ace_placeholder {
1024
- position: relative;
1025
- font-family: arial;
1026
- transform: scale(0.9);
1027
- transform-origin: left;
1028
- white-space: pre;
1029
- opacity: 0.7;
1030
- margin: 0 10px;
1031
- z-index: 1;
1032
- }
1033
-
1034
- .ace_ghost_text {
1035
- opacity: 0.5;
1036
- font-style: italic;
1037
- }
1038
-
1039
- .ace_ghost_text_container > div {
1040
- white-space: pre;
1041
- }
1042
-
1043
- .ghost_text_line_wrapped::after {
1044
- content: "↩";
1045
- position: absolute;
1046
- }
1047
-
1048
- .ace_lineWidgetContainer.ace_ghost_text {
1049
- margin: 0px 4px
1050
- }
1051
-
1052
- .ace_screenreader-only {
1053
- position:absolute;
1054
- left:-10000px;
1055
- top:auto;
1056
- width:1px;
1057
- height:1px;
1058
- overflow:hidden;
1059
- }
1060
-
1061
- .ace_hidden_token {
1062
- display: none;
1063
- }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function($,D,V){var R=$("../lib/dom"),x=$("../lib/oop"),p=$("../lib/event_emitter").EventEmitter,c=(function(){function h(a,i){this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(a)}return h.prototype.$createCanvas=function(){this.canvas=R.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},h.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},h.prototype.$updateDecorators=function(a){if(typeof this.canvas.getContext!="function")return;var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(a);var r=this.canvas.getContext("2d");function o(A,M){return A.priority<M.priority?-1:A.priority>M.priority?1:0}var s=this.renderer.session.$annotations;if(r.clearRect(0,0,this.canvas.width,this.canvas.height),s){var l={info:1,warning:2,error:3};s.forEach(function(A){A.priority=l[A.type]||null}),s=s.sort(o);for(var n=0;n<s.length;n++){var d=s[n].row,f=this.getVerticalOffsetForRow(d),y=f+this.lineHeight,_=Math.round(this.heightRatio*f),v=Math.round(this.heightRatio*y),g=Math.round((_+v)/2),w=v-g;w<this.halfMinDecorationHeight&&(w=this.halfMinDecorationHeight),g-w<0&&(g=w),g+w>this.canvasHeight&&(g=this.canvasHeight-w);var b=g-w,S=g+w,T=S-b;r.fillStyle=i[s[n].type]||null,r.fillRect(0,b,Math.round(this.oneZoneWidth-1),T)}}var j=this.renderer.session.selection.getCursor();if(j){var E=Math.round(this.getVerticalOffsetForRow(j.row)*this.heightRatio);r.fillStyle="rgba(0, 0, 0, 0.5)",r.fillRect(0,E,this.canvasWidth,2)}},h.prototype.getVerticalOffsetForRow=function(a){a=a|0;var i=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return i},h.prototype.setDimensions=function(a){a=a||this.renderer.layerConfig,this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},h.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},h.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},h})();x.implement(c.prototype,p),D.Decorator=c}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function($,D,V){var R=$("./lib/oop"),x=$("./lib/dom"),p=$("./lib/lang"),c=$("./config"),h=$("./layer/gutter").Gutter,a=$("./layer/marker").Marker,i=$("./layer/text").Text,r=$("./layer/cursor").Cursor,o=$("./scrollbar").HScrollBar,s=$("./scrollbar").VScrollBar,l=$("./scrollbar_custom").HScrollBar,n=$("./scrollbar_custom").VScrollBar,d=$("./renderloop").RenderLoop,f=$("./layer/font_metrics").FontMetrics,y=$("./lib/event_emitter").EventEmitter,_=$("./css/editor-css"),v=$("./layer/decorators").Decorator,g=$("./lib/useragent"),w=$("./layer/text_util").isTextToken;x.importCssString(_,"ace_editor.css",!1);var b=(function(){function S(T,j){var E=this;this.container=T||x.createElement("div"),x.addCssClass(this.container,"ace_editor"),x.HI_DPI&&x.addCssClass(this.container,"ace_hidpi"),this.setTheme(j),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=x.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=x.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=x.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var A=this.$textLayer=new i(this.content);this.canvas=A.element,this.$markerFront=new a(this.content),this.$cursorLayer=new r(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.on("scroll",function(M){E.$scrollAnimation||E.session.setScrollTop(M.data-E.scrollMargin.top)}),this.scrollBarH.on("scroll",function(M){E.$scrollAnimation||E.session.setScrollLeft(M.data-E.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(M){E.updateCharacterSize(),E.onResize(!0,E.gutterWidth,E.$size.width,E.$size.height),E._signal("changeCharacterSize",M)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}return S.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),x.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},S.prototype.setSession=function(T){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=T,T&&this.scrollMargin.top&&T.getScrollTop()<=0&&T.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(T),this.$markerBack.setSession(T),this.$markerFront.setSession(T),this.$gutterLayer.setSession(T),this.$textLayer.setSession(T),T&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},S.prototype.updateLines=function(T,j,E){if(j===void 0&&(j=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRow<j&&(this.$changedLines.lastRow=j)):this.$changedLines={firstRow:T,lastRow:j},this.$changedLines.lastRow<this.layerConfig.firstRow)if(E)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},S.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},S.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},S.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},S.prototype.updateFull=function(T){T?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},S.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},S.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},S.prototype.onResize=function(T,j,E,A){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?1:0;var M=this.container;A||(A=M.clientHeight||M.scrollHeight),!A&&this.$maxLines&&this.lineHeight>1&&(!M.style.height||M.style.height=="0px")&&(M.style.height="1px",A=M.clientHeight||M.scrollHeight),E||(E=M.clientWidth||M.scrollWidth);var C=this.$updateCachedSize(T,j,E,A);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!E&&!A)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?this.$renderChanges(C|this.$changes,!0):this.$loop.schedule(C|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},S.prototype.$updateCachedSize=function(T,j,E,A){A-=this.$extraHeight||0;var M=0,C=this.$size,L={width:C.width,height:C.height,scrollerHeight:C.scrollerHeight,scrollerWidth:C.scrollerWidth};if(A&&(T||C.height!=A)&&(C.height=A,M|=this.CHANGE_SIZE,C.scrollerHeight=C.height,this.$horizScroll&&(C.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(C.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",M=M|this.CHANGE_SCROLL),E&&(T||C.width!=E)){M|=this.CHANGE_SIZE,C.width=E,j==null&&(j=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=j,x.setStyle(this.scrollBarH.element.style,"left",j+"px"),x.setStyle(this.scroller.style,"left",j+this.margin.left+"px"),C.scrollerWidth=Math.max(0,E-j-this.scrollBarV.getWidth()-this.margin.h),x.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";x.setStyle(this.scrollBarH.element.style,"right",I),x.setStyle(this.scroller.style,"right",I),x.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(C.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&(M|=this.CHANGE_FULL)}return C.$dirty=!E||!A,M&&this._signal("resize",L),M},S.prototype.onGutterResize=function(T){var j=this.$showGutter?T:0;j!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,j,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},S.prototype.adjustWrapLimit=function(){var T=this.$size.scrollerWidth-this.$padding*2,j=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(j,this.$showPrintMargin&&this.$printMarginColumn)},S.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},S.prototype.getAnimatedScroll=function(){return this.$animatedScroll},S.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},S.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},S.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},S.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},S.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},S.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},S.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},S.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},S.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},S.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},S.prototype.getShowGutter=function(){return this.getOption("showGutter")},S.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},S.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var T=x.createElement("div");T.className="ace_layer ace_print-margin-layer",this.$printMarginEl=x.createElement("div"),this.$printMarginEl.className="ace_print-margin",T.appendChild(this.$printMarginEl),this.content.insertBefore(T,this.content.firstChild)}var j=this.$printMarginEl.style;j.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",j.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},S.prototype.getContainerElement=function(){return this.container},S.prototype.getMouseEventTarget=function(){return this.scroller},S.prototype.getTextAreaContainer=function(){return this.container},S.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var T=this.textarea.style,j=this.$composition;if(!this.$keepTextAreaAtCursor&&!j){x.translate(this.textarea,-100,0);return}var E=this.$cursorLayer.$pixelPos;if(E){j&&j.markerRange&&(E=this.$cursorLayer.getPixelPosition(j.markerRange.start,!0));var A=this.layerConfig,M=E.top,C=E.left;M-=A.offset;var L=j&&j.useTextareaForIME||g.isMobile?this.lineHeight:1;if(M<0||M>A.height-L){x.translate(this.textarea,0,0);return}var I=1,O=this.$size.height-L;if(!j)M+=this.lineHeight;else if(j.useTextareaForIME){var z=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(z)[0]}else M+=this.lineHeight+2;C-=this.scrollLeft,C>this.$size.scrollerWidth-I&&(C=this.$size.scrollerWidth-I),C+=this.gutterWidth+this.margin.left,x.setStyle(T,"height",L+"px"),x.setStyle(T,"width",I+"px"),x.translate(this.textarea,Math.min(C,this.$size.scrollerWidth-I),Math.min(M,O))}}},S.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},S.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},S.prototype.getLastFullyVisibleRow=function(){var T=this.layerConfig,j=T.lastRow,E=this.session.documentToScreenRow(j,0)*T.lineHeight;return E-this.session.getScrollTop()>T.height-T.lineHeight?j-1:j},S.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},S.prototype.setPadding=function(T){this.$padding=T,this.$textLayer.setPadding(T),this.$cursorLayer.setPadding(T),this.$markerFront.setPadding(T),this.$markerBack.setPadding(T),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},S.prototype.setScrollMargin=function(T,j,E,A){var M=this.scrollMargin;M.top=T|0,M.bottom=j|0,M.right=A|0,M.left=E|0,M.v=M.top+M.bottom,M.h=M.left+M.right,M.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-M.top),this.updateFull()},S.prototype.setMargin=function(T,j,E,A){var M=this.margin;M.top=T|0,M.bottom=j|0,M.right=A|0,M.left=E|0,M.v=M.top+M.bottom,M.h=M.left+M.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},S.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},S.prototype.setHScrollBarAlwaysVisible=function(T){this.setOption("hScrollBarAlwaysVisible",T)},S.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},S.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},S.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,j=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(j-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-j&&(T=this.scrollTop+j,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},S.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},S.prototype.freeze=function(){this.$frozen=!0},S.prototype.unfreeze=function(){this.$frozen=!1},S.prototype.$renderChanges=function(T,j){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!j){this.$changes|=T;return}if(this.$size.$dirty)return this.$changes|=T,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",T),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var E=this.layerConfig;if(T&this.CHANGE_FULL||T&this.CHANGE_SIZE||T&this.CHANGE_TEXT||T&this.CHANGE_LINES||T&this.CHANGE_SCROLL||T&this.CHANGE_H_SCROLL){if(T|=this.$computeLayerConfig()|this.$loop.clear(),E.firstRow!=this.layerConfig.firstRow&&E.firstRowScreen==this.layerConfig.firstRowScreen){var A=this.scrollTop+(E.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;A>0&&(this.scrollTop=A,T=T|this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}E=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),x.translate(this.content,-this.scrollLeft,-E.offset);var M=E.width+2*this.$padding+"px",C=E.minHeight+"px";x.setStyle(this.content.style,"width",M),x.setStyle(this.content.style,"height",C)}if(T&this.CHANGE_H_SCROLL&&(x.translate(this.content,-this.scrollLeft,-E.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),T&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(E),this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$markerBack.update(E),this.$markerFront.update(E),this.$cursorLayer.update(E),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}if(T&this.CHANGE_SCROLL){this.$changedLines=null,T&this.CHANGE_TEXT||T&this.CHANGE_LINES?this.$textLayer.update(E):this.$textLayer.scrollLines(E),this.$showGutter&&(T&this.CHANGE_GUTTER||T&this.CHANGE_LINES?this.$gutterLayer.update(E):this.$gutterLayer.scrollLines(E)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$markerBack.update(E),this.$markerFront.update(E),this.$cursorLayer.update(E),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}T&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(E),this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)):T&this.CHANGE_LINES?((this.$updateLines()||T&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)):T&this.CHANGE_TEXT||T&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)):T&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)),T&this.CHANGE_CURSOR&&(this.$cursorLayer.update(E),this.$moveTextAreaToCursor()),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(E),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(E),this._signal("afterRender",T)},S.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,j=this.$maxLines*this.lineHeight,E=Math.min(j,Math.max((this.$minLines||1)*this.lineHeight,T))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(E+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&E>this.$maxPixelHeight&&(E=this.$maxPixelHeight);var A=E<=2*this.lineHeight,M=!A&&T>j;if(E!=this.desiredHeight||this.$size.height!=this.desiredHeight||M!=this.$vScroll){M!=this.$vScroll&&(this.$vScroll=M,this.scrollBarV.setVisible(M));var C=this.container.clientWidth;this.container.style.height=E+"px",this.$updateCachedSize(!0,this.$gutterWidth,C,E),this.desiredHeight=E,this._signal("autosize")}},S.prototype.$computeLayerConfig=function(){var T=this.session,j=this.$size,E=j.height<=2*this.lineHeight,A=this.session.getScreenLength(),M=A*this.lineHeight,C=this.$getLongestLine(),L=!E&&(this.$hScrollBarAlwaysVisible||j.scrollerWidth-C-2*this.$padding<0),I=this.$horizScroll!==L;I&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var O=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),E=j.height<=2*this.lineHeight);var z=j.scrollerHeight+this.lineHeight,F=!this.$maxLines&&this.$scrollPastEnd?(j.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;M+=F;var H=this.scrollMargin;this.session.setScrollTop(Math.max(-H.top,Math.min(this.scrollTop,M-j.scrollerHeight+H.bottom))),this.session.setScrollLeft(Math.max(-H.left,Math.min(this.scrollLeft,C+2*this.$padding-j.scrollerWidth+H.right)));var Y=!E&&(this.$vScrollBarAlwaysVisible||j.scrollerHeight-M+F<0||this.scrollTop>H.top),K=O!==Y;K&&(this.$vScroll=Y,this.scrollBarV.setVisible(Y));var q=this.scrollTop%this.lineHeight,Q=Math.ceil(z/this.lineHeight)-1,ee=Math.max(0,Math.round((this.scrollTop-q)/this.lineHeight)),U=ee+Q,Z,te,ne=this.lineHeight;ee=T.screenToDocumentRow(ee,0);var ve=T.getFoldLine(ee);ve&&(ee=ve.start.row),Z=T.documentToScreenRow(ee,0),te=T.getRowLength(ee)*ne,U=Math.min(T.screenToDocumentRow(U,0),T.getLength()-1),z=j.scrollerHeight+T.getRowLength(U)*ne+te,q=this.scrollTop-Z*ne,q<0&&Z>0&&(Z=Math.max(0,Z+Math.floor(q/ne)),q=this.scrollTop-Z*ne);var ge=0;return(this.layerConfig.width!=C||I)&&(ge=this.CHANGE_H_SCROLL),(I||K)&&(ge|=this.$updateCachedSize(!0,this.gutterWidth,j.width,j.height),this._signal("scrollbarVisibilityChanged"),K&&(C=this.$getLongestLine())),this.layerConfig={width:C,padding:this.$padding,firstRow:ee,firstRowScreen:Z,lastRow:U,lineHeight:ne,characterWidth:this.characterWidth,minHeight:z,maxHeight:M,offset:q,gutterOffset:ne?Math.max(0,Math.ceil((q+j.height-j.scrollerHeight)/ne)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(C-this.$padding),ge},S.prototype.$updateLines=function(){if(this.$changedLines){var T=this.$changedLines.firstRow,j=this.$changedLines.lastRow;this.$changedLines=null;var E=this.layerConfig;if(!(T>E.lastRow+1)&&!(j<E.firstRow)){if(j===1/0){this.$showGutter&&this.$gutterLayer.update(E),this.$textLayer.update(E);return}return this.$textLayer.updateLines(E,T,j),!0}}},S.prototype.$getLongestLine=function(){var T=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(T+=1),this.$textLayer&&T>this.$textLayer.MAX_LINE_LENGTH&&(T=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(T*this.characterWidth))},S.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},S.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},S.prototype.addGutterDecoration=function(T,j){this.$gutterLayer.addGutterDecoration(T,j)},S.prototype.removeGutterDecoration=function(T,j){this.$gutterLayer.removeGutterDecoration(T,j)},S.prototype.updateBreakpoints=function(T){this._rows=T,this.$loop.schedule(this.CHANGE_GUTTER)},S.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),this.$loop.schedule(this.CHANGE_GUTTER)},S.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},S.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},S.prototype.showCursor=function(){this.$cursorLayer.showCursor()},S.prototype.scrollSelectionIntoView=function(T,j,E){this.scrollCursorIntoView(T,E),this.scrollCursorIntoView(j,E)},S.prototype.scrollCursorIntoView=function(T,j,E){if(this.$size.scrollerHeight!==0){var A=this.$cursorLayer.getPixelPosition(T),M=A.left,C=A.top,L=E&&E.top||0,I=E&&E.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+L>C?(j&&O+L>C+this.lineHeight&&(C-=j*this.$size.scrollerHeight),C===0&&(C=-this.scrollMargin.top),this.session.setScrollTop(C)):O+this.$size.scrollerHeight-I<C+this.lineHeight&&(j&&O+this.$size.scrollerHeight-I<C-this.lineHeight&&(C+=j*this.$size.scrollerHeight),this.session.setScrollTop(C+this.lineHeight+I-this.$size.scrollerHeight));var z=this.scrollLeft,F=2*this.layerConfig.characterWidth;M-F<z?(M-=F,M<this.$padding+F&&(M=-this.scrollMargin.left),this.session.setScrollLeft(M)):(M+=F,z+this.$size.scrollerWidth<M+this.characterWidth?this.session.setScrollLeft(Math.round(M+this.characterWidth-this.$size.scrollerWidth)):z<=this.$padding&&M-z<this.characterWidth&&this.session.setScrollLeft(0))}},S.prototype.getScrollTop=function(){return this.session.getScrollTop()},S.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},S.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},S.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},S.prototype.scrollToRow=function(T){this.session.setScrollTop(T*this.lineHeight)},S.prototype.alignCursor=function(T,j){typeof T=="number"&&(T={row:T,column:0});var E=this.$cursorLayer.getPixelPosition(T),A=this.$size.scrollerHeight-this.lineHeight,M=E.top-A*(j||0);return this.session.setScrollTop(M),M},S.prototype.$calcSteps=function(T,j){var E=0,A=this.STEPS,M=[],C=function(L,I,O){return O*(Math.pow(L-1,3)+1)+I};for(E=0;E<A;++E)M.push(C(E/this.STEPS,T,j-T));return M},S.prototype.scrollToLine=function(T,j,E,A){var M=this.$cursorLayer.getPixelPosition({row:T,column:0}),C=M.top;j&&(C-=this.$size.scrollerHeight/2);var L=this.scrollTop;this.session.setScrollTop(C),E!==!1&&this.animateScrolling(L,A)},S.prototype.animateScrolling=function(T,j){var E=this.scrollTop;if(!this.$animatedScroll)return;var A=this;if(T==E)return;if(this.$scrollAnimation){var M=this.$scrollAnimation.steps;if(M.length&&(T=M[0],T==E))return}var C=A.$calcSteps(T,E);this.$scrollAnimation={from:T,to:E,steps:C},clearInterval(this.$timer),A.session.setScrollTop(C.shift()),A.session.$scrollTop=E;function L(){A.$timer=clearInterval(A.$timer),A.$scrollAnimation=null,A.$stopAnimation=!1,j&&j()}this.$timer=setInterval(function(){if(A.$stopAnimation){L();return}if(!A.session)return clearInterval(A.$timer);C.length?(A.session.setScrollTop(C.shift()),A.session.$scrollTop=E):E!=null?(A.session.$scrollTop=-1,A.session.setScrollTop(E),E=null):L()},10)},S.prototype.scrollToY=function(T){this.scrollTop!==T&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=T)},S.prototype.scrollToX=function(T){this.scrollLeft!==T&&(this.scrollLeft=T),this.$loop.schedule(this.CHANGE_H_SCROLL)},S.prototype.scrollTo=function(T,j){this.session.setScrollTop(j),this.session.setScrollLeft(T)},S.prototype.scrollBy=function(T,j){j&&this.session.setScrollTop(this.session.getScrollTop()+j),T&&this.session.setScrollLeft(this.session.getScrollLeft()+T)},S.prototype.isScrollableBy=function(T,j){if(j<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||j>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||T<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||T>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},S.prototype.pixelToScreenCoordinates=function(T,j){var E;if(this.$hasCssTransforms){E={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([T,j]);T=A[1]-this.gutterWidth-this.margin.left,j=A[0]}else E=this.scroller.getBoundingClientRect();var M=T+this.scrollLeft-E.left-this.$padding,C=M/this.characterWidth,L=Math.floor((j+this.scrollTop-E.top)/this.lineHeight),I=this.$blockCursor?Math.floor(C):Math.round(C);return{row:L,column:I,side:C-I>0?1:-1,offsetX:M}},S.prototype.screenToTextCoordinates=function(T,j){var E;if(this.$hasCssTransforms){E={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([T,j]);T=A[1]-this.gutterWidth-this.margin.left,j=A[0]}else E=this.scroller.getBoundingClientRect();var M=T+this.scrollLeft-E.left-this.$padding,C=M/this.characterWidth,L=this.$blockCursor?Math.floor(C):Math.round(C),I=Math.floor((j+this.scrollTop-E.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max(L,0),M)},S.prototype.textToScreenCoordinates=function(T,j){var E=this.scroller.getBoundingClientRect(),A=this.session.documentToScreenPosition(T,j),M=this.$padding+(this.session.$bidiHandler.isBidiRow(A.row,T)?this.session.$bidiHandler.getPosLeft(A.column):Math.round(A.column*this.characterWidth)),C=A.row*this.lineHeight;return{pageX:E.left+M-this.scrollLeft,pageY:E.top+C-this.scrollTop}},S.prototype.visualizeFocus=function(){x.addCssClass(this.container,"ace_focus")},S.prototype.visualizeBlur=function(){x.removeCssClass(this.container,"ace_focus")},S.prototype.showComposition=function(T){this.$composition=T,T.cssText||(T.cssText=this.textarea.style.cssText),T.useTextareaForIME==null&&(T.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(x.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):T.markerId=this.session.addMarker(T.markerRange,"ace_composition_marker","text")},S.prototype.setCompositionText=function(T){var j=this.session.selection.cursor;this.addToken(T,"composition_placeholder",j.row,j.column),this.$moveTextAreaToCursor()},S.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),x.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var T=this.session.selection.cursor;this.removeExtraToken(T.row,T.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},S.prototype.setGhostText=function(T,j){var E=this.session.selection.cursor,A=j||{row:E.row,column:E.column};this.removeGhostText();var M=this.$calculateWrappedTextChunks(T,A);this.addToken(M[0].text,"ghost_text",A.row,A.column),this.$ghostText={text:T,position:{row:A.row,column:A.column}};var C=x.createElement("div");if(M.length>1){var L=this.hideTokensAfterPosition(A.row,A.column),I;M.slice(1).forEach(function(K){var q=x.createElement("div"),Q=x.createElement("span");Q.className="ace_ghost_text",K.wrapped&&(q.className="ghost_text_line_wrapped"),K.text.length===0&&(K.text=" "),Q.appendChild(x.createTextNode(K.text)),q.appendChild(Q),C.appendChild(q),I=q}),L.forEach(function(K){var q=x.createElement("span");w(K.type)||(q.className="ace_"+K.type.replace(/\./g," ace_")),q.appendChild(x.createTextNode(K.value)),I.appendChild(q)}),this.$ghostTextWidget={el:C,row:A.row,column:A.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var O=this.$cursorLayer.getPixelPosition(A,!0),z=this.container,F=z.getBoundingClientRect().height,H=M.length*this.lineHeight,Y=H<F-O.top;if(Y)return;H<F?this.scrollBy(0,(M.length-1)*this.lineHeight):this.scrollToRow(A.row)}},S.prototype.$calculateWrappedTextChunks=function(T,j){var E=this.$size.scrollerWidth-this.$padding*2,A=Math.floor(E/this.characterWidth)-2;A=A<=0?60:A;for(var M=T.split(/\r?\n/),C=[],L=0;L<M.length;L++){var I=this.session.$getDisplayTokens(M[L],j.column),O=this.session.$computeWrapSplits(I,A,this.session.$tabSize);if(O.length>0){var z=0;O.push(M[L].length);for(var F=0;F<O.length;F++){var H=M[L].slice(z,O[F]);C.push({text:H,wrapped:!0}),z=O[F]}}else C.push({text:M[L],wrapped:!1})}return C},S.prototype.removeGhostText=function(){if(this.$ghostText){var T=this.$ghostText.position;this.removeExtraToken(T.row,T.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},S.prototype.addToken=function(T,j,E,A){var M=this.session;M.bgTokenizer.lines[E]=null;var C={type:j,value:T},L=M.getTokens(E);if(A==null||!L.length)L.push(C);else for(var I=0,O=0;O<L.length;O++){var z=L[O];if(I+=z.value.length,A<=I){var F=z.value.length-(I-A),H=z.value.slice(0,F),Y=z.value.slice(F);L.splice(O,1,{type:z.type,value:H},C,{type:z.type,value:Y});break}}this.updateLines(E,E)},S.prototype.hideTokensAfterPosition=function(T,j){for(var E=this.session.getTokens(T),A=0,M=!1,C=[],L=0;L<E.length;L++){var I=E[L];if(A+=I.value.length,I.type!=="ghost_text"){if(M){C.push({type:I.type,value:I.value}),I.type="hidden_token";continue}A===j&&(M=!0)}}return this.updateLines(T,T),C},S.prototype.removeExtraToken=function(T,j){this.session.bgTokenizer.lines[T]=null,this.updateLines(T,T)},S.prototype.setTheme=function(T,j){var E=this;if(this.$themeId=T,E._dispatchEvent("themeChange",{theme:T}),!T||typeof T=="string"){var A=T||this.$options.theme.initialValue;c.loadModule(["theme",A],M)}else M(T);function M(C){if(E.$themeId!=T)return j&&j();if(!C||!C.cssClass)throw new Error("couldn't load module "+T+" or it didn't call define");C.$id&&(E.$themeId=C.$id),x.importCssString(C.cssText,C.cssClass,E.container),E.theme&&x.removeCssClass(E.container,E.theme.cssClass);var L="padding"in C?C.padding:"padding"in(E.theme||{})?4:E.$padding;if(E.$padding&&L!=E.$padding&&E.setPadding(L),E.$gutterLayer){var I=C.$showGutterCursorMarker;I&&!E.$gutterLayer.$showCursorMarker?E.$gutterLayer.$showCursorMarker="theme":!I&&E.$gutterLayer.$showCursorMarker=="theme"&&(E.$gutterLayer.$showCursorMarker=null)}E.$theme=C.cssClass,E.theme=C,x.addCssClass(E.container,C.cssClass),x.setCssClass(E.container,"ace_dark",C.isDark),E.$size&&(E.$size.width=0,E.$updateSizeAsync()),E._dispatchEvent("themeLoaded",{theme:C}),j&&j(),g.isSafari&&E.scroller&&(E.scroller.style.background="red",E.scroller.style.background="")}},S.prototype.getTheme=function(){return this.$themeId},S.prototype.setStyle=function(T,j){x.setCssClass(this.container,T,j!==!1)},S.prototype.unsetStyle=function(T){x.removeCssClass(this.container,T)},S.prototype.setCursorStyle=function(T){x.setStyle(this.scroller.style,"cursor",T)},S.prototype.setMouseCursor=function(T){x.setStyle(this.scroller.style,"cursor",T)},S.prototype.attachToShadowRoot=function(){x.importCssString(_,"ace_editor.css",this.container)},S.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},S.prototype.$updateCustomScrollbar=function(T){var j=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),T===!0?(this.scrollBarV=new n(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(E){j.$scrollAnimation||j.session.setScrollTop(E.data-j.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(E){j.$scrollAnimation||j.session.setScrollLeft(E.data-j.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new v(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new s(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.addEventListener("scroll",function(E){j.$scrollAnimation||j.session.setScrollTop(E.data-j.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(E){j.$scrollAnimation||j.session.setScrollLeft(E.data-j.scrollMargin.left)}))},S.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var T=this;this.$resizeTimer=p.delayedCall(function(){T.destroyed||T.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(j){var E=j[0].contentRect.width,A=j[0].contentRect.height;Math.abs(T.$size.width-E)>1||Math.abs(T.$size.height-A)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},S})();b.prototype.CHANGE_CURSOR=1,b.prototype.CHANGE_MARKER=2,b.prototype.CHANGE_GUTTER=4,b.prototype.CHANGE_SCROLL=8,b.prototype.CHANGE_LINES=16,b.prototype.CHANGE_TEXT=32,b.prototype.CHANGE_SIZE=64,b.prototype.CHANGE_MARKER_BACK=128,b.prototype.CHANGE_MARKER_FRONT=256,b.prototype.CHANGE_FULL=512,b.prototype.CHANGE_H_SCROLL=1024,b.prototype.$changes=0,b.prototype.$padding=null,b.prototype.$frozen=!1,b.prototype.STEPS=8,R.implement(b.prototype,y),c.defineOptions(b.prototype,"renderer",{useResizeObserver:{set:function(S){!S&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):S&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(S){this.$textLayer.setShowInvisibles(S)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(S){typeof S=="number"&&(this.$printMarginColumn=S),this.$showPrintMargin=!!S,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(S){this.$gutter.style.display=S?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(S){this.$gutterLayer.$useSvgGutterIcons=S},initialValue:!1},showFoldedAnnotations:{set:function(S){this.$gutterLayer.$showFoldedAnnotations=S},initialValue:!1},fadeFoldWidgets:{set:function(S){x.setCssClass(this.$gutter,"ace_fade-fold-widgets",S)},initialValue:!1},showFoldWidgets:{set:function(S){this.$gutterLayer.setShowFoldWidgets(S),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(S){this.$textLayer.setDisplayIndentGuides(S)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(S){this.$textLayer.setHighlightIndentGuides(S)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(S){this.$gutterLayer.setHighlightGutterLine(S),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(S){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(S){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(S){typeof S=="number"&&(S=S+"px"),this.container.style.fontSize=S,this.updateFontSize()},initialValue:12},fontFamily:{set:function(S){this.container.style.fontFamily=S,this.updateFontSize()}},maxLines:{set:function(S){this.updateFull()}},minLines:{set:function(S){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(S){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(S){S=+S||0,this.$scrollPastEnd!=S&&(this.$scrollPastEnd=S,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(S){this.$gutterLayer.$fixedWidth=!!S,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(S){this.$updateCustomScrollbar(S)},initialValue:!1},theme:{set:function(S){this.setTheme(S)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!g.isMobile&&!g.isIE}}),D.VirtualRenderer=b}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function($,D,V){var R=$("../lib/oop"),x=$("../lib/net"),p=$("../lib/event_emitter").EventEmitter,c=$("../config");function h(o){var s="importScripts('"+x.qualifyURL(o)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,n=new l;return n.append(s),n.getBlob("application/javascript")}}function a(o){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var s=h(o),l=window.URL||window.webkitURL,n=l.createObjectURL(s);return new Worker(n)}return new Worker(o)}var i=function(o){o.postMessage||(o=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=o,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){R.implement(this,p),this.$createWorkerFromOldConfig=function(o,s,l,n,d){if($.nameToUrl&&!$.toUrl&&($.toUrl=$.nameToUrl),c.get("packaged")||!$.toUrl)n=n||c.moduleUrl(s,"worker");else{var f=this.$normalizePath;n=n||f($.toUrl("ace/worker/worker.js",null,"_"));var y={};o.forEach(function(_){y[_]=f($.toUrl(_,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(n),d&&this.send("importScripts",d),this.$worker.postMessage({init:!0,tlns:y,module:s,classname:l}),this.$worker},this.onMessage=function(o){var s=o.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var l=this.callbacks[s.id];l&&(l(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(o){window.console&&console.error&&console.error(o)},this.$normalizePath=function(o){return x.qualifyURL(o)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(o){o.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(o,s){this.$worker.postMessage({command:o,args:s})},this.call=function(o,s,l){if(l){var n=this.callbackId++;this.callbacks[n]=l,s.push(n)}this.send(o,s)},this.emit=function(o,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:o,data:{data:s.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(o){this.$doc&&this.terminate(),this.$doc=o,this.call("setValue",[o.getValue()]),o.on("change",this.changeListener,!0)},this.changeListener=function(o){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),o.action=="insert"?this.deltaQueue.push(o.start,o.lines):this.deltaQueue.push(o.start,o.end)},this.$sendDeltaQueue=function(){var o=this.deltaQueue;o&&(this.deltaQueue=null,o.length>50&&o.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:o}))}}).call(i.prototype);var r=function(o,s,l){var n=null,d=!1,f=Object.create(p),y=[],_=new i({messageBuffer:y,terminate:function(){},postMessage:function(g){y.push(g),n&&(d?setTimeout(v):v())}});_.setEmitSync=function(g){d=g};var v=function(){var g=y.shift();g.command?n[g.command].apply(n,g.args):g.event&&f._signal(g.event,g.data)};return f.postMessage=function(g){_.onMessage({data:g})},f.callback=function(g,w){this.postMessage({type:"call",id:w,data:g})},f.emit=function(g,w){this.postMessage({type:"event",name:g,data:w})},c.loadModule(["worker",s],function(g){for(n=new g[l](f);y.length;)v()}),_};D.UIWorkerClient=r,D.WorkerClient=i,D.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function($,D,V){var R=$("./range").Range,x=$("./lib/event_emitter").EventEmitter,p=$("./lib/oop"),c=(function(){function h(a,i,r,o,s,l){var n=this;this.length=i,this.session=a,this.doc=a.getDocument(),this.mainClass=s,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=o,this.$onCursorChange=function(){setTimeout(function(){n.onCursorChange()})},this.$pos=r;var d=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=d.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var a=this,i=this.doc,r=this.session;this.selectionBefore=r.selection.toJSON(),r.selection.inMultiSelectMode&&r.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=r.addMarker(new R(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var l=i.createAnchor(s.row,s.column);l.$insertRight=!0,l.detach(),a.others.push(l)}),r.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,i=this;this.othersActive=!0,this.others.forEach(function(r){r.markerId=a.addMarker(new R(r.row,r.column,r.row,r.column+i.length),i.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},h.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var i=a;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var r=a.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,o=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,s=i.start.column-this.pos.column;if(this.updateAnchors(a),o&&(this.length+=r),o&&!this.session.$fromUndo){if(a.action==="insert")for(var l=this.others.length-1;l>=0;l--){var n=this.others[l],d={row:n.row,column:n.column+s};this.doc.insertMergedLines(d,a.lines)}else if(a.action==="remove")for(var l=this.others.length-1;l>=0;l--){var n=this.others[l],d={row:n.row,column:n.column+s};this.doc.remove(new R(d.row,d.column,d.row,d.column-r))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var i=this.others.length;i--;)this.others[i].onChange(a);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var a=this,i=this.session,r=function(s,l){i.removeMarker(s.markerId),s.markerId=i.addMarker(new R(s.row,s.column,s.row,s.column+a.length),l,null,!1)};r(this.pos,this.mainClass);for(var o=this.others.length;o--;)r(this.others[o],this.othersClass)}},h.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),i=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,r=0;r<i;r++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h})();p.implement(c.prototype,x),D.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function($,D,V){var R=$("../lib/event"),x=$("../lib/useragent");function p(h,a){return h.row==a.row&&h.column==a.column}function c(h){var a=h.domEvent,i=a.altKey,r=a.shiftKey,o=a.ctrlKey,s=h.getAccelKey(),l=h.getButton();if(o&&x.isMac&&(l=a.button),h.editor.inMultiSelectMode&&l==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!o&&!i&&!s){l===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(l===0){var n=h.editor,d=n.selection,f=n.inMultiSelectMode,y=h.getDocumentPosition(),_=d.getCursor(),v=h.inSelection()||d.isEmpty()&&p(y,_),g=h.x,w=h.y,b=function(H){g=H.clientX,w=H.clientY},S=n.session,T=n.renderer.pixelToScreenCoordinates(g,w),j=T,E;if(n.$mouseHandler.$enableJumpToDef)o&&i||s&&i?E=r?"block":"add":i&&n.$blockSelectEnabled&&(E="block");else if(s&&!i){if(E="add",!f&&r)return}else i&&n.$blockSelectEnabled&&(E="block");if(E&&x.isMac&&a.ctrlKey&&n.$mouseHandler.cancelContextMenu(),E=="add"){if(!f&&v)return;if(!f){var A=d.toOrientedRange();n.addSelectionMarker(A)}var M=d.rangeList.rangeAtPoint(y);n.inVirtualSelectionMode=!0,r&&(M=null,A=d.ranges[0]||A,n.removeSelectionMarker(A)),n.once("mouseup",function(){var H=d.toOrientedRange();M&&H.isEmpty()&&p(M.cursor,H.cursor)?d.substractPoint(H.cursor):(r?d.substractPoint(A.cursor):A&&(n.removeSelectionMarker(A),d.addRange(A)),d.addRange(H)),n.inVirtualSelectionMode=!1})}else if(E=="block"){h.stop(),n.inVirtualSelectionMode=!0;var C,L=[],I=function(){var H=n.renderer.pixelToScreenCoordinates(g,w),Y=S.screenToDocumentPosition(H.row,H.column,H.offsetX);p(j,H)&&p(Y,d.lead)||(j=H,n.selection.moveToPosition(Y),n.renderer.scrollCursorIntoView(),n.removeSelectionMarkers(L),L=d.rectangularRangeBlock(j,T),n.$mouseHandler.$clickSelection&&L.length==1&&L[0].isEmpty()&&(L[0]=n.$mouseHandler.$clickSelection.clone()),L.forEach(n.addSelectionMarker,n),n.updateSelectionMarkers())};f&&!s?d.toSingleRange():!f&&s&&(C=d.toOrientedRange(),n.addSelectionMarker(C)),r?T=S.documentToScreenPosition(d.lead):d.moveToPosition(y),j={row:-1,column:-1};var O=function(H){I(),clearInterval(F),n.removeSelectionMarkers(L),L.length||(L=[d.toOrientedRange()]),C&&(n.removeSelectionMarker(C),d.toSingleRange(C));for(var Y=0;Y<L.length;Y++)d.addRange(L[Y]);n.inVirtualSelectionMode=!1,n.$mouseHandler.$clickSelection=null},z=I;R.capture(n.container,b,O);var F=setInterval(function(){z()},20);return h.preventDefault()}}}D.onMouseDown=c}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function($,D,V){D.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(x){x.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(x){x.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(x){x.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(x){x.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(x){x.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(x){x.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(x){x.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(x){x.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(x){x.multiSelect.rangeCount>1?x.multiSelect.joinSelections():x.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(x){x.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(x){x.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(x){x.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],D.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(x){x.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(x){return x&&x.inMultiSelectMode}}];var R=$("../keyboard/hash_handler").HashHandler;D.keyboardHandler=new R(D.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function($,D,V){var R=$("./range_list").RangeList,x=$("./range").Range,p=$("./selection").Selection,c=$("./mouse/multi_select_handler").onMouseDown,h=$("./lib/event"),a=$("./lib/lang"),i=$("./commands/multi_select_commands");D.commands=i.defaultCommands.concat(i.multiSelectCommands);var r=$("./search").Search,o=new r;function s(_,v,g){return o.$options.wrap=!0,o.$options.needle=v,o.$options.backwards=g==-1,o.find(_)}var l=$("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(_,v){if(_){if(!this.inMultiSelectMode&&this.rangeCount===0){var g=this.toOrientedRange();if(this.rangeList.add(g),this.rangeList.add(_),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),v||this.fromOrientedRange(_);this.rangeList.removeAll(),this.rangeList.add(g),this.$onAddRange(g)}_.cursor||(_.cursor=_.end);var w=this.rangeList.add(_);return this.$onAddRange(_),w.length&&this.$onRemoveRange(w),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),v||this.fromOrientedRange(_)}},this.toSingleRange=function(_){_=_||this.ranges[0];var v=this.rangeList.removeAll();v.length&&this.$onRemoveRange(v),_&&this.fromOrientedRange(_)},this.substractPoint=function(_){var v=this.rangeList.substractPoint(_);if(v)return this.$onRemoveRange(v),v[0]},this.mergeOverlappingRanges=function(){var _=this.rangeList.merge();_.length&&this.$onRemoveRange(_)},this.$onAddRange=function(_){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(_),this._signal("addRange",{range:_})},this.$onRemoveRange=function(_){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var v=this.rangeList.ranges.pop();_.push(v),this.rangeCount=0}for(var g=_.length;g--;){var w=this.ranges.indexOf(_[g]);this.ranges.splice(w,1)}this._signal("removeRange",{ranges:_}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),v=v||this.ranges[0],v&&!v.isEqual(this.getRange())&&this.fromOrientedRange(v)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new R,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var _=this.ranges.length?this.ranges:[this.getRange()],v=[],g=0;g<_.length;g++){var w=_[g],b=w.start.row,S=w.end.row;if(b===S)v.push(w.clone());else{for(v.push(new x(b,w.start.column,b,this.session.getLine(b).length));++b<S;)v.push(this.getLineRange(b,!0));v.push(new x(S,0,S,w.end.column))}g==0&&!this.isBackwards()&&(v=v.reverse())}this.toSingleRange();for(var g=v.length;g--;)this.addRange(v[g])},this.joinSelections=function(){var _=this.rangeList.ranges,v=_[_.length-1],g=x.fromPoints(_[0].start,v.end);this.toSingleRange(),this.setSelectionRange(g,v.cursor==v.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var _=this.rangeList.ranges,v=_[_.length-1],g=x.fromPoints(_[0].start,v.end);this.toSingleRange(),this.setSelectionRange(g,v.cursor==v.start)}else{var w=this.session.documentToScreenPosition(this.cursor),b=this.session.documentToScreenPosition(this.anchor),S=this.rectangularRangeBlock(w,b);S.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(_,v,g){var w=[],b=_.column<v.column;if(b)var S=_.column,T=v.column,j=_.offsetX,E=v.offsetX;else var S=v.column,T=_.column,j=v.offsetX,E=_.offsetX;var A=_.row<v.row;if(A)var M=_.row,C=v.row;else var M=v.row,C=_.row;S<0&&(S=0),M<0&&(M=0),M==C&&(g=!0);for(var L,I=M;I<=C;I++){var O=x.fromPoints(this.session.screenToDocumentPosition(I,S,j),this.session.screenToDocumentPosition(I,T,E));if(O.isEmpty()){if(L&&d(O.end,L))break;L=O.end}O.cursor=b?O.start:O.end,w.push(O)}if(A&&w.reverse(),!g){for(var z=w.length-1;w[z].isEmpty()&&z>0;)z--;if(z>0)for(var F=0;w[F].isEmpty();)F++;for(var H=z;H>=F;H--)w[H].isEmpty()&&w.splice(H,1)}return w}}).call(p.prototype);var n=$("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(_){_.cursor||(_.cursor=_.end);var v=this.getSelectionStyle();return _.marker=this.session.addMarker(_,"ace_selection",v),this.session.$selectionMarkers.push(_),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,_},this.removeSelectionMarker=function(_){if(_.marker){this.session.removeMarker(_.marker);var v=this.session.$selectionMarkers.indexOf(_);v!=-1&&this.session.$selectionMarkers.splice(v,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(_){for(var v=this.session.$selectionMarkers,g=_.length;g--;){var w=_[g];if(w.marker){this.session.removeMarker(w.marker);var b=v.indexOf(w);b!=-1&&v.splice(b,1)}}this.session.selectionMarkerCount=v.length},this.$onAddRange=function(_){this.addSelectionMarker(_.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(_){this.removeSelectionMarkers(_.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(_){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(_){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(_){var v=_.command,g=_.editor;if(g.multiSelect){if(v.multiSelectAction)v.multiSelectAction=="forEach"?w=g.forEachSelection(v,_.args):v.multiSelectAction=="forEachLine"?w=g.forEachSelection(v,_.args,!0):v.multiSelectAction=="single"?(g.exitMultiSelectMode(),w=v.exec(g,_.args||{})):w=v.multiSelectAction(g,_.args||{});else{var w=v.exec(g,_.args||{});g.multiSelect.addRange(g.multiSelect.toOrientedRange()),g.multiSelect.mergeOverlappingRanges()}return w}},this.forEachSelection=function(_,v,g){if(!this.inVirtualSelectionMode){var w=g&&g.keepOrder,b=g==!0||g&&g.$byLines,S=this.session,T=this.selection,j=T.rangeList,E=(w?T:j).ranges,A;if(!E.length)return _.exec?_.exec(this,v||{}):_(this,v||{});var M=T._eventRegistry;T._eventRegistry={};var C=new p(S);this.inVirtualSelectionMode=!0;for(var L=E.length;L--;){if(b)for(;L>0&&E[L].start.row==E[L-1].end.row;)L--;C.fromOrientedRange(E[L]),C.index=L,this.selection=S.selection=C;var I=_.exec?_.exec(this,v||{}):_(this,v||{});!A&&I!==void 0&&(A=I),C.toOrientedRange(E[L])}C.detach(),this.selection=S.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=M,T.mergeOverlappingRanges(),T.ranges[0]&&T.fromOrientedRange(T.ranges[0]);var O=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),O&&O.from==O.to&&this.renderer.animateScrolling(O.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var _="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var v=this.multiSelect.rangeList.ranges,g=[],w=0;w<v.length;w++)g.push(this.session.getTextRange(v[w]));var b=this.session.getDocument().getNewLineCharacter();_=g.join(b),_.length==(g.length-1)*b.length&&(_="")}else this.selection.isEmpty()||(_=this.session.getTextRange(this.getSelectionRange()));return _},this.$checkMultiselectChange=function(_,v){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var g=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&v==this.multiSelect.anchor)return;var w=v==this.multiSelect.anchor?g.cursor==g.start?g.end:g.start:g.cursor;w.row!=v.row||this.session.$clipPositionToDocument(w.row,w.column).column!=v.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(_,v,g){if(v=v||{},v.needle=_||v.needle,v.needle==null){var w=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();v.needle=this.session.getTextRange(w)}this.$search.set(v);var b=this.$search.findAll(this.session);if(!b.length)return 0;var S=this.multiSelect;g||S.toSingleRange(b[0]);for(var T=b.length;T--;)S.addRange(b[T],!0);return w&&S.rangeList.rangeAtPoint(w.start)&&S.addRange(w,!0),b.length},this.selectMoreLines=function(_,v){var g=this.selection.toOrientedRange(),w=g.cursor==g.end,b=this.session.documentToScreenPosition(g.cursor);this.selection.$desiredColumn&&(b.column=this.selection.$desiredColumn);var S=this.session.screenToDocumentPosition(b.row+_,b.column);if(g.isEmpty())var j=S;else var T=this.session.documentToScreenPosition(w?g.end:g.start),j=this.session.screenToDocumentPosition(T.row+_,T.column);if(w){var E=x.fromPoints(S,j);E.cursor=E.start}else{var E=x.fromPoints(j,S);E.cursor=E.end}if(E.desiredColumn=b.column,!this.selection.inMultiSelectMode)this.selection.addRange(g);else if(v)var A=g.cursor;this.selection.addRange(E),A&&this.selection.substractPoint(A)},this.transposeSelections=function(_){for(var v=this.session,g=v.multiSelect,w=g.ranges,b=w.length;b--;){var S=w[b];if(S.isEmpty()){var T=v.getWordRange(S.start.row,S.start.column);S.start.row=T.start.row,S.start.column=T.start.column,S.end.row=T.end.row,S.end.column=T.end.column}}g.mergeOverlappingRanges();for(var j=[],b=w.length;b--;){var S=w[b];j.unshift(v.getTextRange(S))}_<0?j.unshift(j.pop()):j.push(j.shift());for(var b=w.length;b--;){var S=w[b],E=S.clone();v.replace(S,j[b]),S.start.row=E.start.row,S.start.column=E.start.column}g.fromOrientedRange(g.ranges[0])},this.selectMore=function(_,v,g){var w=this.session,b=w.multiSelect,S=b.toOrientedRange();if(!(S.isEmpty()&&(S=w.getWordRange(S.start.row,S.start.column),S.cursor=_==-1?S.start:S.end,this.multiSelect.addRange(S),g))){var T=w.getTextRange(S),j=s(w,T,_);j&&(j.cursor=_==-1?j.start:j.end,this.session.unfold(j),this.multiSelect.addRange(j),this.renderer.scrollCursorIntoView(null,.5)),v&&this.multiSelect.substractPoint(S.cursor)}},this.alignCursors=function(){var _=this.session,v=_.multiSelect,g=v.ranges,w=-1,b=g.filter(function(z){if(z.cursor.row==w)return!0;w=z.cursor.row});if(!g.length||b.length==g.length-1){var S=this.selection.getRange(),T=S.start.row,j=S.end.row,E=T==j;if(E){var A=this.session.getLength(),M;do M=this.session.getLine(j);while(/[=:]/.test(M)&&++j<A);do M=this.session.getLine(T);while(/[=:]/.test(M)&&--T>0);T<0&&(T=0),j>=A&&(j=A-1)}var C=this.session.removeFullLines(T,j);C=this.$reAlignText(C,E),this.session.insert({row:T,column:0},C.join(`
1064
- `)+`
1065
- `),E||(S.start.column=0,S.end.column=C[C.length-1].length),this.selection.setRange(S)}else{b.forEach(function(z){v.substractPoint(z.cursor)});var L=0,I=1/0,O=g.map(function(z){var F=z.cursor,H=_.getLine(F.row),Y=H.substr(F.column).search(/\S/g);return Y==-1&&(Y=0),F.column>L&&(L=F.column),Y<I&&(I=Y),Y});g.forEach(function(z,F){var H=z.cursor,Y=L-H.column,K=O[F]-I;Y>K?_.insert(H,a.stringRepeat(" ",Y-K)):_.remove(new x(H.row,H.column,H.row,H.column-Y+K)),z.start.column=z.end.column=L,z.start.row=z.end.row=H.row,z.cursor=z.end}),v.fromOrientedRange(g[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(_,v){var g=!0,w=!0,b,S,T;return _.map(function(C){var L=C.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?b==null?(b=L[1].length,S=L[2].length,T=L[3].length,L):(b+S+T!=L[1].length+L[2].length+L[3].length&&(w=!1),b!=L[1].length&&(g=!1),b>L[1].length&&(b=L[1].length),S<L[2].length&&(S=L[2].length),T>L[3].length&&(T=L[3].length),L):[C]}).map(v?E:g?w?A:E:M);function j(C){return a.stringRepeat(" ",C)}function E(C){return C[2]?j(b)+C[2]+j(S-C[2].length+T)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function A(C){return C[2]?j(b+S-C[2].length)+C[2]+j(T)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function M(C){return C[2]?j(b)+C[2]+j(T)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}}}).call(n.prototype);function d(_,v){return _.row==v.row&&_.column==v.column}D.onSessionChange=function(_){var v=_.session;v&&!v.multiSelect&&(v.$selectionMarkers=[],v.selection.$initRangeList(),v.multiSelect=v.selection),this.multiSelect=v&&v.multiSelect;var g=_.oldSession;g&&(g.multiSelect.off("addRange",this.$onAddRange),g.multiSelect.off("removeRange",this.$onRemoveRange),g.multiSelect.off("multiSelect",this.$onMultiSelect),g.multiSelect.off("singleSelect",this.$onSingleSelect),g.multiSelect.lead.off("change",this.$checkMultiselectChange),g.multiSelect.anchor.off("change",this.$checkMultiselectChange)),v&&(v.multiSelect.on("addRange",this.$onAddRange),v.multiSelect.on("removeRange",this.$onRemoveRange),v.multiSelect.on("multiSelect",this.$onMultiSelect),v.multiSelect.on("singleSelect",this.$onSingleSelect),v.multiSelect.lead.on("change",this.$checkMultiselectChange),v.multiSelect.anchor.on("change",this.$checkMultiselectChange)),v&&this.inMultiSelectMode!=v.selection.inMultiSelectMode&&(v.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function f(_){_.$multiselectOnSessionChange||(_.$onAddRange=_.$onAddRange.bind(_),_.$onRemoveRange=_.$onRemoveRange.bind(_),_.$onMultiSelect=_.$onMultiSelect.bind(_),_.$onSingleSelect=_.$onSingleSelect.bind(_),_.$multiselectOnSessionChange=D.onSessionChange.bind(_),_.$checkMultiselectChange=_.$checkMultiselectChange.bind(_),_.$multiselectOnSessionChange(_),_.on("changeSession",_.$multiselectOnSessionChange),_.on("mousedown",c),_.commands.addCommands(i.defaultCommands),y(_))}function y(_){if(!_.textInput)return;var v=_.textInput.getElement(),g=!1;h.addListener(v,"keydown",function(b){var S=b.keyCode==18&&!(b.ctrlKey||b.shiftKey||b.metaKey);_.$blockSelectEnabled&&S?g||(_.renderer.setMouseCursor("crosshair"),g=!0):g&&w()},_),h.addListener(v,"keyup",w,_),h.addListener(v,"blur",w,_);function w(b){g&&(_.renderer.setMouseCursor(""),g=!1)}}D.MultiSelect=f,$("./config").defineOptions(n.prototype,"editor",{enableMultiselect:{set:function(_){f(this),_?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function(_){this.$blockSelectEnabled=_},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function($,D,V){var R=$("../../range").Range,x=D.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(p,c,h){var a=p.getLine(h);return this.foldingStartMarker.test(a)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(p,c,h){return null},this.indentationBlock=function(p,c,h){var a=/\S/,i=p.getLine(c),r=i.search(a);if(r!=-1){for(var o=h||i.length,s=p.getLength(),l=c,n=c;++c<s;){var d=p.getLine(c).search(a);if(d!=-1){if(d<=r){var f=p.getTokenAt(c,0);if(!f||f.type!=="string")break}n=c}}if(n>l){var y=p.getLine(n).length;return new R(l,o,n,y)}}},this.openingBracketBlock=function(p,c,h,a,i){var r={row:h,column:a+1},o=p.$findClosingBracket(c,r,i);if(o){var s=p.foldWidgets[o.row];return s==null&&(s=p.getFoldWidget(o.row)),s=="start"&&o.row>r.row&&(o.row--,o.column=p.getLine(o.row).length),R.fromPoints(r,o)}},this.closingBracketBlock=function(p,c,h,a,i){var r={row:h,column:a},o=p.$findOpeningBracket(c,r);if(o)return o.column++,r.column--,R.fromPoints(o,r)}}).call(x.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function($,D,V){var R=$("../lib/dom"),x=$("../range").Range,p=$("../config").nls;function c(a,i,r){for(var o=0,s=a.length-1;o<=s;){var l=o+s>>1,n=r(i,a[l]);if(n>0)o=l+1;else if(n<0)s=l-1;else return l}return-(o+1)}function h(a,i,r){var o=a.getAnnotations().sort(x.comparePoints);if(o.length){var s=c(o,{row:i,column:-1},x.comparePoints);s<0&&(s=-s-1),s>=o.length?s=r>0?0:o.length-1:s===0&&r<0&&(s=o.length-1);var l=o[s];if(!(!l||!r)){if(l.row===i){do l=o[s+=r];while(l&&l.row===i);if(!l)return o.slice()}var n=[];i=l.row;do n[r<0?"unshift":"push"](l),l=o[s+=r];while(l&&l.row==i);return n.length&&n}}}D.showErrorMarker=function(a,i){var r=a.session,o=a.getCursorPosition(),s=o.row,l=r.widgetManager.getWidgetsAtRow(s).filter(function(b){return b.type=="errorMarker"})[0];l?l.destroy():s-=i;var n=h(r,s,i),d;if(n){var f=n[0];o.column=(f.pos&&typeof f.column!="number"?f.pos.sc:f.column)||0,o.row=f.row,d=a.renderer.$gutterLayer.$annotations[o.row]}else{if(l)return;d={displayText:[p("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(o.row),a.selection.moveToPosition(o);var y={row:o.row,fixedWidth:!0,coverGutter:!0,el:R.createElement("div"),type:"errorMarker"},_=y.el.appendChild(R.createElement("div")),v=y.el.appendChild(R.createElement("div"));v.className="error_widget_arrow "+d.className;var g=a.renderer.$cursorLayer.getPixelPosition(o).left;v.style.left=g+a.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",_.className="error_widget "+d.className,d.displayText.forEach(function(b,S){_.appendChild(R.createTextNode(b)),S<d.displayText.length-1&&_.appendChild(R.createElement("br"))}),_.appendChild(R.createElement("div"));var w=function(b,S,T){if(S===0&&(T==="esc"||T==="return"))return y.destroy(),{command:"null"}};y.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(w),r.widgetManager.removeLineWidget(y),a.off("changeSelection",y.destroy),a.off("changeSession",y.destroy),a.off("mouseup",y.destroy),a.off("change",y.destroy))},a.keyBinding.addKeyboardHandler(w),a.on("changeSelection",y.destroy),a.on("changeSession",y.destroy),a.on("mouseup",y.destroy),a.on("change",y.destroy),a.session.widgetManager.addLineWidget(y),y.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:y.el.offsetHeight})},R.importCssString(`
1066
- .error_widget_wrapper {
1067
- background: inherit;
1068
- color: inherit;
1069
- border:none
1070
- }
1071
- .error_widget {
1072
- border-top: solid 2px;
1073
- border-bottom: solid 2px;
1074
- margin: 5px 0;
1075
- padding: 10px 40px;
1076
- white-space: pre-wrap;
1077
- }
1078
- .error_widget.ace_error, .error_widget_arrow.ace_error{
1079
- border-color: #ff5a5a
1080
- }
1081
- .error_widget.ace_warning, .error_widget_arrow.ace_warning{
1082
- border-color: #F1D817
1083
- }
1084
- .error_widget.ace_info, .error_widget_arrow.ace_info{
1085
- border-color: #5a5a5a
1086
- }
1087
- .error_widget.ace_ok, .error_widget_arrow.ace_ok{
1088
- border-color: #5aaa5a
1089
- }
1090
- .error_widget_arrow {
1091
- position: absolute;
1092
- border: solid 5px;
1093
- border-top-color: transparent!important;
1094
- border-right-color: transparent!important;
1095
- border-left-color: transparent!important;
1096
- top: -5px;
1097
- }
1098
- `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function($,D,V){$("./loader_build")(D);var R=$("./lib/dom"),x=$("./range").Range,p=$("./editor").Editor,c=$("./edit_session").EditSession,h=$("./undomanager").UndoManager,a=$("./virtual_renderer").VirtualRenderer;$("./worker/worker_client"),$("./keyboard/hash_handler"),$("./placeholder"),$("./multi_select"),$("./mode/folding/fold_mode"),$("./theme/textmate"),$("./ext/error_marker"),D.config=$("./config"),D.edit=function(r,o){if(typeof r=="string"){var s=r;if(r=document.getElementById(s),!r)throw new Error("ace.edit can't find div #"+s)}if(r&&r.env&&r.env.editor instanceof p)return r.env.editor;var l="";if(r&&/input|textarea/i.test(r.tagName)){var n=r;l=n.value,r=R.createElement("pre"),n.parentNode.replaceChild(r,n)}else r&&(l=r.textContent,r.innerHTML="");var d=D.createEditSession(l),f=new p(new a(r),d,o),y={document:d,editor:f,onResize:f.resize.bind(f,null)};return n&&(y.textarea=n),f.on("destroy",function(){y.editor.container.env=null}),f.container.env=f.env=y,f},D.createEditSession=function(r,o){var s=new c(r,o);return s.setUndoManager(new h),s},D.Range=x,D.Editor=p,D.EditSession=c,D.UndoManager=h,D.VirtualRenderer=a;var i=D.config.version;D.version=i}),(function(){ace.require(["ace/ace"],function($){$&&($.config.init(!0),$.define=ace.define);var D=(function(){return this})();!D&&typeof window<"u"&&(D=window),!D&&typeof self<"u"&&(D=self),D.ace||(D.ace=$);for(var V in $)$.hasOwnProperty(V)&&(D.ace[V]=$[V]);D.ace.default=D.ace,W&&(W.exports=D.ace)})})()})(qc)),qc.exports}var Zc={exports:{}},Jc,fp;function o0(){if(fp)return Jc;fp=1;var W="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jc=W,Jc}var eu,pp;function a0(){if(pp)return eu;pp=1;var W=o0();function G(){}function $(){}return $.resetWarningCache=G,eu=function(){function D(x,p,c,h,a,i){if(i!==W){var r=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 r.name="Invariant Violation",r}}D.isRequired=D;function V(){return D}var R={array:D,bigint:D,bool:D,func:D,number:D,object:D,string:D,symbol:D,any:D,arrayOf:V,element:D,elementType:D,instanceOf:V,node:D,objectOf:V,oneOf:V,oneOfType:V,shape:V,exact:V,checkPropTypes:$,resetWarningCache:G};return R.PropTypes=R,R},eu}var gp;function du(){return gp||(gp=1,Zc.exports=a0()()),Zc.exports}var uo={exports:{}};uo.exports;var mp;function Hp(){return mp||(mp=1,(function(W,G){var $=200,D="__lodash_hash_undefined__",V=1,R=2,x=9007199254740991,p="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",a="[object Boolean]",i="[object Date]",r="[object Error]",o="[object Function]",s="[object GeneratorFunction]",l="[object Map]",n="[object Number]",d="[object Null]",f="[object Object]",y="[object Promise]",_="[object Proxy]",v="[object RegExp]",g="[object Set]",w="[object String]",b="[object Symbol]",S="[object Undefined]",T="[object WeakMap]",j="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",M="[object Float64Array]",C="[object Int8Array]",L="[object Int16Array]",I="[object Int32Array]",O="[object Uint8Array]",z="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",Y=/[\\^$.*+?()[\]{}|]/g,K=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,Q={};Q[A]=Q[M]=Q[C]=Q[L]=Q[I]=Q[O]=Q[z]=Q[F]=Q[H]=!0,Q[p]=Q[c]=Q[j]=Q[a]=Q[E]=Q[i]=Q[r]=Q[o]=Q[l]=Q[n]=Q[f]=Q[v]=Q[g]=Q[w]=Q[T]=!1;var ee=typeof Xi=="object"&&Xi&&Xi.Object===Object&&Xi,U=typeof self=="object"&&self&&self.Object===Object&&self,Z=ee||U||Function("return this")(),te=G&&!G.nodeType&&G,ne=te&&!0&&W&&!W.nodeType&&W,ve=ne&&ne.exports===te,ge=ve&&ee.process,xe=(function(){try{return ge&&ge.binding&&ge.binding("util")}catch{}})(),Me=xe&&xe.isTypedArray;function Re(J,se){for(var me=-1,be=J==null?0:J.length,We=0,Le=[];++me<be;){var Qe=J[me];se(Qe,me,J)&&(Le[We++]=Qe)}return Le}function it(J,se){for(var me=-1,be=se.length,We=J.length;++me<be;)J[We+me]=se[me];return J}function Te(J,se){for(var me=-1,be=J==null?0:J.length;++me<be;)if(se(J[me],me,J))return!0;return!1}function Tt(J,se){for(var me=-1,be=Array(J);++me<J;)be[me]=se(me);return be}function Ut(J){return function(se){return J(se)}}function fi(J,se){return J.has(se)}function Ei(J,se){return J?.[se]}function Hi(J){var se=-1,me=Array(J.size);return J.forEach(function(be,We){me[++se]=[We,be]}),me}function At(J,se){return function(me){return J(se(me))}}function lt(J){var se=-1,me=Array(J.size);return J.forEach(function(be){me[++se]=be}),me}var Bt=Array.prototype,pi=Function.prototype,Ft=Object.prototype,bt=Z["__core-js_shared__"],Ai=pi.toString,ot=Ft.hasOwnProperty,ei=(function(){var J=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""})(),Ge=Ft.toString,ti=RegExp("^"+Ai.call(ot).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mt=ve?Z.Buffer:void 0,Wt=Z.Symbol,ce=Z.Uint8Array,ye=Ft.propertyIsEnumerable,Ee=Bt.splice,He=Wt?Wt.toStringTag:void 0,ii=Object.getOwnPropertySymbols,gi=Mt?Mt.isBuffer:void 0,Qi=At(Object.keys,Object),Mi=ri(Z,"DataView"),zi=ri(Z,"Map"),qi=ri(Z,"Promise"),ps=ri(Z,"Set"),Er=ri(Z,"WeakMap"),Zi=ri(Object,"create"),tr=Ri(Mi),$a=Ri(zi),fo=Ri(qi),po=Ri(ps),go=Ri(Er),Ar=Wt?Wt.prototype:void 0,ir=Ar?Ar.valueOf:void 0;function Fi(J){var se=-1,me=J==null?0:J.length;for(this.clear();++se<me;){var be=J[se];this.set(be[0],be[1])}}function mo(){this.__data__=Zi?Zi(null):{},this.size=0}function Wi(J){var se=this.has(J)&&delete this.__data__[J];return this.size-=se?1:0,se}function wt(J){var se=this.__data__;if(Zi){var me=se[J];return me===D?void 0:me}return ot.call(se,J)?se[J]:void 0}function jt(J){var se=this.__data__;return Zi?se[J]!==void 0:ot.call(se,J)}function vn(J,se){var me=this.__data__;return this.size+=this.has(J)?0:1,me[J]=Zi&&se===void 0?D:se,this}Fi.prototype.clear=mo,Fi.prototype.delete=Wi,Fi.prototype.get=wt,Fi.prototype.has=jt,Fi.prototype.set=vn;function ni(J){var se=-1,me=J==null?0:J.length;for(this.clear();++se<me;){var be=J[se];this.set(be[0],be[1])}}function Oa(){this.__data__=[],this.size=0}function Na(J){var se=this.__data__,me=Lt(se,J);if(me<0)return!1;var be=se.length-1;return me==be?se.pop():Ee.call(se,me,1),--this.size,!0}function vo(J){var se=this.__data__,me=Lt(se,J);return me<0?void 0:se[me][1]}function nr(J){return Lt(this.__data__,J)>-1}function gs(J,se){var me=this.__data__,be=Lt(me,J);return be<0?(++this.size,me.push([J,se])):me[be][1]=se,this}ni.prototype.clear=Oa,ni.prototype.delete=Na,ni.prototype.get=vo,ni.prototype.has=nr,ni.prototype.set=gs;function Vt(J){var se=-1,me=J==null?0:J.length;for(this.clear();++se<me;){var be=J[se];this.set(be[0],be[1])}}function yn(){this.size=0,this.__data__={hash:new Fi,map:new(zi||ni),string:new Fi}}function rr(J){var se=ar(this,J).delete(J);return this.size-=se?1:0,se}function _n(J){return ar(this,J).get(J)}function pt(J){return ar(this,J).has(J)}function yo(J,se){var me=ar(this,J),be=me.size;return me.set(J,se),this.size+=me.size==be?0:1,this}Vt.prototype.clear=yn,Vt.prototype.delete=rr,Vt.prototype.get=_n,Vt.prototype.has=pt,Vt.prototype.set=yo;function sr(J){var se=-1,me=J==null?0:J.length;for(this.__data__=new Vt;++se<me;)this.add(J[se])}function Ji(J){return this.__data__.set(J,D),this}function bn(J){return this.__data__.has(J)}sr.prototype.add=sr.prototype.push=Ji,sr.prototype.has=bn;function Pi(J){var se=this.__data__=new ni(J);this.size=se.size}function _o(){this.__data__=new ni,this.size=0}function bo(J){var se=this.__data__,me=se.delete(J);return this.size=se.size,me}function Ba(J){return this.__data__.get(J)}function Mr(J){return this.__data__.has(J)}function kr(J,se){var me=this.__data__;if(me instanceof ni){var be=me.__data__;if(!zi||be.length<$-1)return be.push([J,se]),this.size=++me.size,this;me=this.__data__=new Vt(be)}return me.set(J,se),this.size=me.size,this}Pi.prototype.clear=_o,Pi.prototype.delete=bo,Pi.prototype.get=Ba,Pi.prototype.has=Mr,Pi.prototype.set=kr;function ki(J,se){var me=Di(J),be=!me&&Sn(J),We=!me&&!be&&lr(J),Le=!me&&!be&&!We&&Oi(J),Qe=me||be||We||Le,gt=Qe?Tt(J.length,String):[],ht=gt.length;for(var et in J)ot.call(J,et)&&!(Qe&&(et=="length"||We&&(et=="offset"||et=="parent")||Le&&(et=="buffer"||et=="byteLength"||et=="byteOffset")||ws(et,ht)))&&gt.push(et);return gt}function Lt(J,se){for(var me=J.length;me--;)if(Dr(J[me][0],se))return me;return-1}function wo(J,se,me){var be=se(J);return Di(J)?be:it(be,me(J))}function or(J){return J==null?J===void 0?S:d:He&&He in Object(J)?Ia(J):Li(J)}function Tr(J){return $i(J)&&or(J)==p}function ms(J,se,me,be,We){return J===se?!0:J==null||se==null||!$i(J)&&!$i(se)?J!==J&&se!==se:Lr(J,se,me,be,ms,We)}function Lr(J,se,me,be,We,Le){var Qe=Di(J),gt=Di(se),ht=Qe?c:Ti(J),et=gt?c:Ti(se);ht=ht==p?f:ht,et=et==p?f:et;var St=ht==f,It=et==f,xt=ht==et;if(xt&&lr(J)){if(!lr(se))return!1;Qe=!0,St=!1}if(xt&&!St)return Le||(Le=new Pi),Qe||Oi(J)?ys(J,se,me,be,We,Le):_s(J,se,ht,me,be,We,Le);if(!(me&V)){var Kt=St&&ot.call(J,"__wrapped__"),Yt=It&&ot.call(se,"__wrapped__");if(Kt||Yt){var Ui=Kt?J.value():J,si=Yt?se.value():se;return Le||(Le=new Pi),We(Ui,si,me,be,Le)}}return xt?(Le||(Le=new Pi),wn(J,se,me,be,We,Le)):!1}function ja(J){if(!$r(J)||za(J))return!1;var se=xn(J)?ti:K;return se.test(Ri(J))}function Gt(J){return $i(J)&&mi(J.length)&&!!Q[or(J)]}function vs(J){if(!Rr(J))return Qi(J);var se=[];for(var me in Object(J))ot.call(J,me)&&me!="constructor"&&se.push(me);return se}function ys(J,se,me,be,We,Le){var Qe=me&V,gt=J.length,ht=se.length;if(gt!=ht&&!(Qe&&ht>gt))return!1;var et=Le.get(J);if(et&&Le.get(se))return et==se;var St=-1,It=!0,xt=me&R?new sr:void 0;for(Le.set(J,se),Le.set(se,J);++St<gt;){var Kt=J[St],Yt=se[St];if(be)var Ui=Qe?be(Yt,Kt,St,se,J,Le):be(Kt,Yt,St,J,se,Le);if(Ui!==void 0){if(Ui)continue;It=!1;break}if(xt){if(!Te(se,function(si,en){if(!fi(xt,en)&&(Kt===si||We(Kt,si,me,be,Le)))return xt.push(en)})){It=!1;break}}else if(!(Kt===Yt||We(Kt,Yt,me,be,Le))){It=!1;break}}return Le.delete(J),Le.delete(se),It}function _s(J,se,me,be,We,Le,Qe){switch(me){case E:if(J.byteLength!=se.byteLength||J.byteOffset!=se.byteOffset)return!1;J=J.buffer,se=se.buffer;case j:return!(J.byteLength!=se.byteLength||!Le(new ce(J),new ce(se)));case a:case i:case n:return Dr(+J,+se);case r:return J.name==se.name&&J.message==se.message;case v:case w:return J==se+"";case l:var gt=Hi;case g:var ht=be&V;if(gt||(gt=lt),J.size!=se.size&&!ht)return!1;var et=Qe.get(J);if(et)return et==se;be|=R,Qe.set(J,se);var St=ys(gt(J),gt(se),be,We,Le,Qe);return Qe.delete(J),St;case b:if(ir)return ir.call(J)==ir.call(se)}return!1}function wn(J,se,me,be,We,Le){var Qe=me&V,gt=bs(J),ht=gt.length,et=bs(se),St=et.length;if(ht!=St&&!Qe)return!1;for(var It=ht;It--;){var xt=gt[It];if(!(Qe?xt in se:ot.call(se,xt)))return!1}var Kt=Le.get(J);if(Kt&&Le.get(se))return Kt==se;var Yt=!0;Le.set(J,se),Le.set(se,J);for(var Ui=Qe;++It<ht;){xt=gt[It];var si=J[xt],en=se[xt];if(be)var Ao=Qe?be(en,si,xt,se,J,Le):be(si,en,xt,J,se,Le);if(!(Ao===void 0?si===en||We(si,en,me,be,Le):Ao)){Yt=!1;break}Ui||(Ui=xt=="constructor")}if(Yt&&!Ui){var Nr=J.constructor,Br=se.constructor;Nr!=Br&&"constructor"in J&&"constructor"in se&&!(typeof Nr=="function"&&Nr instanceof Nr&&typeof Br=="function"&&Br instanceof Br)&&(Yt=!1)}return Le.delete(J),Le.delete(se),Yt}function bs(J){return wo(J,Ss,So)}function ar(J,se){var me=J.__data__;return Ha(se)?me[typeof se=="string"?"string":"hash"]:me.map}function ri(J,se){var me=Ei(J,se);return ja(me)?me:void 0}function Ia(J){var se=ot.call(J,He),me=J[He];try{J[He]=void 0;var be=!0}catch{}var We=Ge.call(J);return be&&(se?J[He]=me:delete J[He]),We}var So=ii?function(J){return J==null?[]:(J=Object(J),Re(ii(J),function(se){return ye.call(J,se)}))}:Or,Ti=or;(Mi&&Ti(new Mi(new ArrayBuffer(1)))!=E||zi&&Ti(new zi)!=l||qi&&Ti(qi.resolve())!=y||ps&&Ti(new ps)!=g||Er&&Ti(new Er)!=T)&&(Ti=function(J){var se=or(J),me=se==f?J.constructor:void 0,be=me?Ri(me):"";if(be)switch(be){case tr:return E;case $a:return l;case fo:return y;case po:return g;case go:return T}return se});function ws(J,se){return se=se??x,!!se&&(typeof J=="number"||q.test(J))&&J>-1&&J%1==0&&J<se}function Ha(J){var se=typeof J;return se=="string"||se=="number"||se=="symbol"||se=="boolean"?J!=="__proto__":J===null}function za(J){return!!ei&&ei in J}function Rr(J){var se=J&&J.constructor,me=typeof se=="function"&&se.prototype||Ft;return J===me}function Li(J){return Ge.call(J)}function Ri(J){if(J!=null){try{return Ai.call(J)}catch{}try{return J+""}catch{}}return""}function Dr(J,se){return J===se||J!==J&&se!==se}var Sn=Tr((function(){return arguments})())?Tr:function(J){return $i(J)&&ot.call(J,"callee")&&!ye.call(J,"callee")},Di=Array.isArray;function xo(J){return J!=null&&mi(J.length)&&!xn(J)}var lr=gi||Eo;function Co(J,se){return ms(J,se)}function xn(J){if(!$r(J))return!1;var se=or(J);return se==o||se==s||se==h||se==_}function mi(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=x}function $r(J){var se=typeof J;return J!=null&&(se=="object"||se=="function")}function $i(J){return J!=null&&typeof J=="object"}var Oi=Me?Ut(Me):Gt;function Ss(J){return xo(J)?ki(J):vs(J)}function Or(){return[]}function Eo(){return!1}W.exports=Co})(uo,uo.exports)),uo.exports}var Ii={},vp;function zp(){if(vp)return Ii;vp=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.getAceInstance=Ii.debounce=Ii.editorEvents=Ii.editorOptions=void 0;var W=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Ii.editorOptions=W;var G=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Ii.editorEvents=G;var $=function(){var V;return typeof window>"u"?(Xi.window={},V=Da(),delete Xi.window):window.ace?(V=window.ace,V.acequire=window.ace.require||window.ace.acequire):V=Da(),V};Ii.getAceInstance=$;var D=function(V,R){var x=null;return function(){var p=this,c=arguments;clearTimeout(x),x=setTimeout(function(){V.apply(p,c)},R)}};return Ii.debounce=D,Ii}var yp;function l0(){if(yp)return Kn;yp=1;var W=Kn&&Kn.__extends||(function(){var h=function(a,i){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},h(a,i)};return function(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");h(a,i);function r(){this.constructor=a}a.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}})(),G=Kn&&Kn.__assign||function(){return G=Object.assign||function(h){for(var a,i=1,r=arguments.length;i<r;i++){a=arguments[i];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(h[o]=a[o])}return h},G.apply(this,arguments)};Object.defineProperty(Kn,"__esModule",{value:!0});var $=Da(),D=du(),V=Qn(),R=Hp(),x=zp(),p=(0,x.getAceInstance)(),c=(function(h){W(a,h);function a(i){var r=h.call(this,i)||this;return x.editorEvents.forEach(function(o){r[o]=r[o].bind(r)}),r.debounce=x.debounce,r}return a.prototype.isInShadow=function(i){for(var r=i&&i.parentNode;r;){if(r.toString()==="[object ShadowRoot]")return!0;r=r.parentNode}return!1},a.prototype.componentDidMount=function(){var i=this,r=this.props,o=r.className,s=r.onBeforeLoad,l=r.onValidate,n=r.mode,d=r.focus,f=r.theme,y=r.fontSize,_=r.lineHeight,v=r.value,g=r.defaultValue,w=r.showGutter,b=r.wrapEnabled,S=r.showPrintMargin,T=r.scrollMargin,j=T===void 0?[0,0,0,0]:T,E=r.keyboardHandler,A=r.onLoad,M=r.commands,C=r.annotations,L=r.markers,I=r.placeholder;this.editor=p.edit(this.refEditor),s&&s(p);for(var O=Object.keys(this.props.editorProps),z=0;z<O.length;z++)this.editor[O[z]]=this.props.editorProps[O[z]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(j[0],j[1],j[2],j[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof n=="string"?"ace/mode/".concat(n):n),f&&f!==""&&this.editor.setTheme("ace/theme/".concat(f)),this.editor.setFontSize(typeof y=="number"?"".concat(y,"px"):y),_&&(this.editor.container.style.lineHeight=typeof _=="number"?"".concat(_,"px"):"".concat(_),this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(g||v||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(w),this.editor.getSession().setUseWrapMode(b),this.editor.setShowPrintMargin(S),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),I&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),l&&this.editor.getSession().on("changeAnnotation",function(){var H=i.editor.getSession().getAnnotations();i.props.onValidate(H)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(C||[]),L&&L.length>0&&this.handleMarkers(L);var F=this.editor.$options;x.editorOptions.forEach(function(H){F.hasOwnProperty(H)?i.editor.setOption(H,i.props[H]):i.props[H]&&console.warn("ReactAce: editor option ".concat(H," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(M)&&M.forEach(function(H){typeof H.exec=="string"?i.editor.commands.bindKey(H.bindKey,H.exec):i.editor.commands.addCommand(H)}),E&&this.editor.setKeyboardHandler("ace/keyboard/"+E),o&&(this.refEditor.className+=" "+o),A&&A(this.editor),this.editor.resize(),d&&this.editor.focus()},a.prototype.componentDidUpdate=function(i){for(var r=i,o=this.props,s=0;s<x.editorOptions.length;s++){var l=x.editorOptions[s];o[l]!==r[l]&&this.editor.setOption(l,o[l])}if(o.className!==r.className){var n=this.refEditor.className,d=n.trim().split(" "),f=r.className.trim().split(" ");f.forEach(function(v){var g=d.indexOf(v);d.splice(g,1)}),this.refEditor.className=" "+o.className+" "+d.join(" ")}var y=this.editor&&o.value!=null&&this.editor.getValue()!==o.value;if(y){this.silent=!0;var _=this.editor.session.selection.toJSON();this.editor.setValue(o.value,o.cursorStart),this.editor.session.selection.fromJSON(_),this.silent=!1}o.placeholder!==r.placeholder&&this.updatePlaceholder(),o.mode!==r.mode&&this.editor.getSession().setMode(typeof o.mode=="string"?"ace/mode/".concat(o.mode):o.mode),o.theme!==r.theme&&this.editor.setTheme("ace/theme/"+o.theme),o.keyboardHandler!==r.keyboardHandler&&(o.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):this.editor.setKeyboardHandler(null)),o.fontSize!==r.fontSize&&this.editor.setFontSize(typeof o.fontSize=="number"?"".concat(o.fontSize,"px"):o.fontSize),o.lineHeight!==r.lineHeight&&(this.editor.container.style.lineHeight=typeof o.lineHeight=="number"?"".concat(o.lineHeight,"px"):o.lineHeight,this.editor.renderer.updateFontSize()),o.wrapEnabled!==r.wrapEnabled&&this.editor.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==r.showPrintMargin&&this.editor.setShowPrintMargin(o.showPrintMargin),o.showGutter!==r.showGutter&&this.editor.renderer.setShowGutter(o.showGutter),R(o.setOptions,r.setOptions)||this.handleOptions(o),(y||!R(o.annotations,r.annotations))&&this.editor.getSession().setAnnotations(o.annotations||[]),!R(o.markers,r.markers)&&Array.isArray(o.markers)&&this.handleMarkers(o.markers),R(o.scrollMargin,r.scrollMargin)||this.handleScrollMargins(o.scrollMargin),(i.height!==this.props.height||i.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!i.focus&&this.editor.focus()},a.prototype.handleScrollMargins=function(i){i===void 0&&(i=[0,0,0,0]),this.editor.renderer.setScrollMargin(i[0],i[1],i[2],i[3])},a.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},a.prototype.onChange=function(i){if(this.editor&&this.props.onChange&&!this.silent){var r=this.editor.getValue();this.props.onChange(r,i)}},a.prototype.onSelectionChange=function(i){if(this.props.onSelectionChange){var r=this.editor.getSelection();this.props.onSelectionChange(r,i)}},a.prototype.onCursorChange=function(i){if(this.props.onCursorChange){var r=this.editor.getSelection();this.props.onCursorChange(r,i)}},a.prototype.onInput=function(i){this.props.onInput&&this.props.onInput(i),this.props.placeholder&&this.updatePlaceholder()},a.prototype.onFocus=function(i){this.props.onFocus&&this.props.onFocus(i,this.editor)},a.prototype.onBlur=function(i){this.props.onBlur&&this.props.onBlur(i,this.editor)},a.prototype.onCopy=function(i){var r=i.text;this.props.onCopy&&this.props.onCopy(r)},a.prototype.onPaste=function(i){var r=i.text;this.props.onPaste&&this.props.onPaste(r)},a.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},a.prototype.handleOptions=function(i){for(var r=Object.keys(i.setOptions),o=0;o<r.length;o++)this.editor.setOption(r[o],i.setOptions[r[o]])},a.prototype.handleMarkers=function(i){var r=this,o=this.editor.getSession().getMarkers(!0);for(var s in o)o.hasOwnProperty(s)&&this.editor.getSession().removeMarker(o[s].id);o=this.editor.getSession().getMarkers(!1);for(var s in o)o.hasOwnProperty(s)&&o[s].clazz!=="ace_active-line"&&o[s].clazz!=="ace_selected-word"&&this.editor.getSession().removeMarker(o[s].id);i.forEach(function(l){var n=l.startRow,d=l.startCol,f=l.endRow,y=l.endCol,_=l.className,v=l.type,g=l.inFront,w=g===void 0?!1:g,b=new $.Range(n,d,f,y);r.editor.getSession().addMarker(b,_,v,w)})},a.prototype.updatePlaceholder=function(){var i=this.editor,r=this.props.placeholder,o=!i.session.getValue().length,s=i.renderer.placeholderNode;!o&&s?(i.renderer.scroller.removeChild(i.renderer.placeholderNode),i.renderer.placeholderNode=null):o&&!s?(s=i.renderer.placeholderNode=document.createElement("div"),s.textContent=r||"",s.className="ace_comment ace_placeholder",s.style.padding="0 9px",s.style.position="absolute",s.style.zIndex="3",i.renderer.scroller.appendChild(s)):o&&s&&(s.textContent=r)},a.prototype.updateRef=function(i){this.refEditor=i},a.prototype.render=function(){var i=this.props,r=i.name,o=i.width,s=i.height,l=i.style,n=G({width:o,height:s},l);return V.createElement("div",{ref:this.updateRef,id:r,style:n})},a.propTypes={mode:D.oneOfType([D.string,D.object]),focus:D.bool,theme:D.string,name:D.string,className:D.string,height:D.string,width:D.string,fontSize:D.oneOfType([D.number,D.string]),lineHeight:D.oneOfType([D.number,D.string]),showGutter:D.bool,onChange:D.func,onCopy:D.func,onPaste:D.func,onFocus:D.func,onInput:D.func,onBlur:D.func,onScroll:D.func,value:D.string,defaultValue:D.string,onLoad:D.func,onSelectionChange:D.func,onCursorChange:D.func,onBeforeLoad:D.func,onValidate:D.func,minLines:D.number,maxLines:D.number,readOnly:D.bool,highlightActiveLine:D.bool,tabSize:D.number,showPrintMargin:D.bool,cursorStart:D.number,debounceChangePeriod:D.number,editorProps:D.object,setOptions:D.object,style:D.object,scrollMargin:D.array,annotations:D.array,markers:D.array,keyboardHandler:D.string,wrapEnabled:D.bool,enableSnippets:D.bool,enableBasicAutocompletion:D.oneOfType([D.bool,D.array]),enableLiveAutocompletion:D.oneOfType([D.bool,D.array]),navigateToFileEnd:D.bool,commands:D.array,placeholder:D.string},a.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},a})(V.Component);return Kn.default=c,Kn}var ds={},Yn={},tu={exports:{}},_p;function c0(){return _p||(_p=1,(function(W,G){ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function($,D,V){var R=$("./lib/oop");$("./lib/lang");var x=$("./lib/event_emitter").EventEmitter,p=$("./editor").Editor,c=$("./virtual_renderer").VirtualRenderer,h=$("./edit_session").EditSession,a;a=function(i,r,o){this.BELOW=1,this.BESIDE=0,this.$container=i,this.$theme=r,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(o||1),this.$cEditor=this.$editors[0],this.on("focus",(function(s){this.$cEditor=s}).bind(this))},(function(){R.implement(this,x),this.$createEditor=function(){var i=document.createElement("div");i.className=this.$editorCSS,i.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(i);var r=new p(new c(i,this.$theme));return r.on("focus",(function(){this._emit("focus",r)}).bind(this)),this.$editors.push(r),r.setFontSize(this.$fontSize),r},this.setSplits=function(i){var r;if(i<1)throw"The number of splits have to be > 0!";if(i!=this.$splits){if(i>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<i;)r=this.$editors[this.$splits],this.$container.appendChild(r.container),r.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<i;)this.$createEditor(),this.$splits++}else for(;this.$splits>i;)r=this.$editors[this.$splits-1],this.$container.removeChild(r.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(i){return this.$editors[i]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(i){this.$editors.forEach(function(r){r.setTheme(i)})},this.setKeyboardHandler=function(i){this.$editors.forEach(function(r){r.setKeyboardHandler(i)})},this.forEach=function(i,r){this.$editors.forEach(i,r)},this.$fontSize="",this.setFontSize=function(i){this.$fontSize=i,this.forEach(function(r){r.setFontSize(i)})},this.$cloneSession=function(i){var r=new h(i.getDocument(),i.getMode()),o=i.getUndoManager();return r.setUndoManager(o),r.setTabSize(i.getTabSize()),r.setUseSoftTabs(i.getUseSoftTabs()),r.setOverwrite(i.getOverwrite()),r.setBreakpoints(i.getBreakpoints()),r.setUseWrapMode(i.getUseWrapMode()),r.setUseWorker(i.getUseWorker()),r.setWrapLimitRange(i.$wrapLimitRange.min,i.$wrapLimitRange.max),r.$foldData=i.$cloneFoldData(),r},this.setSession=function(i,r){var o;r==null?o=this.$cEditor:o=this.$editors[r];var s=this.$editors.some(function(l){return l.session===i});return s&&(i=this.$cloneSession(i)),o.setSession(i),i},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(i){this.$orientation!=i&&(this.$orientation=i,this.resize())},this.resize=function(){var i=this.$container.clientWidth,r=this.$container.clientHeight,o;if(this.$orientation==this.BESIDE)for(var s=i/this.$splits,l=0;l<this.$splits;l++)o=this.$editors[l],o.container.style.width=s+"px",o.container.style.top="0px",o.container.style.left=l*s+"px",o.container.style.height=r+"px",o.resize();else for(var n=r/this.$splits,l=0;l<this.$splits;l++)o=this.$editors[l],o.container.style.width=i+"px",o.container.style.top=l*n+"px",o.container.style.left="0px",o.container.style.height=n+"px",o.resize()}}).call(a.prototype),D.Split=a}),ace.define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],function($,D,V){V.exports=$("../split")}),(function(){ace.require(["ace/ext/split"],function($){W&&(W.exports=$)})})()})(tu)),tu.exports}var iu,bp;function u0(){if(bp)return iu;bp=1;var W="Expected a function",G="__lodash_hash_undefined__",$="[object Function]",D="[object GeneratorFunction]",V="[object Symbol]",R=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,x=/^\w*$/,p=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/[\\^$.*+?()[\]{}|]/g,a=/\\(\\)?/g,i=/^\[object .+?Constructor\]$/,r=typeof Xi=="object"&&Xi&&Xi.Object===Object&&Xi,o=typeof self=="object"&&self&&self.Object===Object&&self,s=r||o||Function("return this")();function l(ce,ye){return ce?.[ye]}function n(ce){var ye=!1;if(ce!=null&&typeof ce.toString!="function")try{ye=!!(ce+"")}catch{}return ye}var d=Array.prototype,f=Function.prototype,y=Object.prototype,_=s["__core-js_shared__"],v=(function(){var ce=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return ce?"Symbol(src)_1."+ce:""})(),g=f.toString,w=y.hasOwnProperty,b=y.toString,S=RegExp("^"+g.call(w).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=s.Symbol,j=d.splice,E=fi(s,"Map"),A=fi(Object,"create"),M=T?T.prototype:void 0,C=M?M.toString:void 0;function L(ce){var ye=-1,Ee=ce?ce.length:0;for(this.clear();++ye<Ee;){var He=ce[ye];this.set(He[0],He[1])}}function I(){this.__data__=A?A(null):{}}function O(ce){return this.has(ce)&&delete this.__data__[ce]}function z(ce){var ye=this.__data__;if(A){var Ee=ye[ce];return Ee===G?void 0:Ee}return w.call(ye,ce)?ye[ce]:void 0}function F(ce){var ye=this.__data__;return A?ye[ce]!==void 0:w.call(ye,ce)}function H(ce,ye){var Ee=this.__data__;return Ee[ce]=A&&ye===void 0?G:ye,this}L.prototype.clear=I,L.prototype.delete=O,L.prototype.get=z,L.prototype.has=F,L.prototype.set=H;function Y(ce){var ye=-1,Ee=ce?ce.length:0;for(this.clear();++ye<Ee;){var He=ce[ye];this.set(He[0],He[1])}}function K(){this.__data__=[]}function q(ce){var ye=this.__data__,Ee=Me(ye,ce);if(Ee<0)return!1;var He=ye.length-1;return Ee==He?ye.pop():j.call(ye,Ee,1),!0}function Q(ce){var ye=this.__data__,Ee=Me(ye,ce);return Ee<0?void 0:ye[Ee][1]}function ee(ce){return Me(this.__data__,ce)>-1}function U(ce,ye){var Ee=this.__data__,He=Me(Ee,ce);return He<0?Ee.push([ce,ye]):Ee[He][1]=ye,this}Y.prototype.clear=K,Y.prototype.delete=q,Y.prototype.get=Q,Y.prototype.has=ee,Y.prototype.set=U;function Z(ce){var ye=-1,Ee=ce?ce.length:0;for(this.clear();++ye<Ee;){var He=ce[ye];this.set(He[0],He[1])}}function te(){this.__data__={hash:new L,map:new(E||Y),string:new L}}function ne(ce){return Ut(this,ce).delete(ce)}function ve(ce){return Ut(this,ce).get(ce)}function ge(ce){return Ut(this,ce).has(ce)}function xe(ce,ye){return Ut(this,ce).set(ce,ye),this}Z.prototype.clear=te,Z.prototype.delete=ne,Z.prototype.get=ve,Z.prototype.has=ge,Z.prototype.set=xe;function Me(ce,ye){for(var Ee=ce.length;Ee--;)if(bt(ce[Ee][0],ye))return Ee;return-1}function Re(ce,ye){ye=Ei(ye,ce)?[ye]:Tt(ye);for(var Ee=0,He=ye.length;ce!=null&&Ee<He;)ce=ce[Bt(ye[Ee++])];return Ee&&Ee==He?ce:void 0}function it(ce){if(!ei(ce)||At(ce))return!1;var ye=ot(ce)||n(ce)?S:i;return ye.test(pi(ce))}function Te(ce){if(typeof ce=="string")return ce;if(ti(ce))return C?C.call(ce):"";var ye=ce+"";return ye=="0"&&1/ce==-1/0?"-0":ye}function Tt(ce){return Ai(ce)?ce:lt(ce)}function Ut(ce,ye){var Ee=ce.__data__;return Hi(ye)?Ee[typeof ye=="string"?"string":"hash"]:Ee.map}function fi(ce,ye){var Ee=l(ce,ye);return it(Ee)?Ee:void 0}function Ei(ce,ye){if(Ai(ce))return!1;var Ee=typeof ce;return Ee=="number"||Ee=="symbol"||Ee=="boolean"||ce==null||ti(ce)?!0:x.test(ce)||!R.test(ce)||ye!=null&&ce in Object(ye)}function Hi(ce){var ye=typeof ce;return ye=="string"||ye=="number"||ye=="symbol"||ye=="boolean"?ce!=="__proto__":ce===null}function At(ce){return!!v&&v in ce}var lt=Ft(function(ce){ce=Mt(ce);var ye=[];return p.test(ce)&&ye.push(""),ce.replace(c,function(Ee,He,ii,gi){ye.push(ii?gi.replace(a,"$1"):He||Ee)}),ye});function Bt(ce){if(typeof ce=="string"||ti(ce))return ce;var ye=ce+"";return ye=="0"&&1/ce==-1/0?"-0":ye}function pi(ce){if(ce!=null){try{return g.call(ce)}catch{}try{return ce+""}catch{}}return""}function Ft(ce,ye){if(typeof ce!="function"||ye&&typeof ye!="function")throw new TypeError(W);var Ee=function(){var He=arguments,ii=ye?ye.apply(this,He):He[0],gi=Ee.cache;if(gi.has(ii))return gi.get(ii);var Qi=ce.apply(this,He);return Ee.cache=gi.set(ii,Qi),Qi};return Ee.cache=new(Ft.Cache||Z),Ee}Ft.Cache=Z;function bt(ce,ye){return ce===ye||ce!==ce&&ye!==ye}var Ai=Array.isArray;function ot(ce){var ye=ei(ce)?b.call(ce):"";return ye==$||ye==D}function ei(ce){var ye=typeof ce;return!!ce&&(ye=="object"||ye=="function")}function Ge(ce){return!!ce&&typeof ce=="object"}function ti(ce){return typeof ce=="symbol"||Ge(ce)&&b.call(ce)==V}function Mt(ce){return ce==null?"":Te(ce)}function Wt(ce,ye,Ee){var He=ce==null?void 0:Re(ce,ye);return He===void 0?Ee:He}return iu=Wt,iu}var wp;function Fp(){if(wp)return Yn;wp=1;var W=Yn&&Yn.__extends||(function(){var i=function(r,o){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(s[n]=l[n])},i(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");i(r,o);function s(){this.constructor=r}r.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}})(),G=Yn&&Yn.__assign||function(){return G=Object.assign||function(i){for(var r,o=1,s=arguments.length;o<s;o++){r=arguments[o];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(i[l]=r[l])}return i},G.apply(this,arguments)};Object.defineProperty(Yn,"__esModule",{value:!0});var $=zp(),D=(0,$.getAceInstance)(),V=Da(),R=c0(),x=du(),p=Qn(),c=Hp(),h=u0(),a=(function(i){W(r,i);function r(o){var s=i.call(this,o)||this;return $.editorEvents.forEach(function(l){s[l]=s[l].bind(s)}),s.debounce=$.debounce,s}return r.prototype.isInShadow=function(o){for(var s=o&&o.parentNode;s;){if(s.toString()==="[object ShadowRoot]")return!0;s=s.parentNode}return!1},r.prototype.componentDidMount=function(){var o=this,s=this.props,l=s.className,n=s.onBeforeLoad,d=s.mode,f=s.focus,y=s.theme,_=s.fontSize,v=s.value,g=s.defaultValue,w=s.cursorStart,b=s.showGutter,S=s.wrapEnabled,T=s.showPrintMargin,j=s.scrollMargin,E=j===void 0?[0,0,0,0]:j,A=s.keyboardHandler,M=s.onLoad,C=s.commands,L=s.annotations,I=s.markers,O=s.splits;this.editor=D.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(y)),n&&n(D);var z=Object.keys(this.props.editorProps),F=new R.Split(this.editor.container,"ace/theme/".concat(y),O);this.editor.env.split=F,this.splitEditor=F.getEditor(0),this.split=F,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var H=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),F.forEach(function(K,q){for(var Q=0;Q<z.length;Q++)K[z[Q]]=o.props.editorProps[z[Q]];var ee=h(g,q),U=h(v,q,"");K.session.setUndoManager(new D.UndoManager),K.setTheme("ace/theme/".concat(y)),K.renderer.setScrollMargin(E[0],E[1],E[2],E[3]),K.getSession().setMode("ace/mode/".concat(d)),K.setFontSize(_),K.renderer.setShowGutter(b),K.getSession().setUseWrapMode(S),K.setShowPrintMargin(T),K.on("focus",o.onFocus),K.on("blur",o.onBlur),K.on("input",o.onInput),K.on("copy",o.onCopy),K.on("paste",o.onPaste),K.on("change",o.onChange),K.getSession().selection.on("changeSelection",o.onSelectionChange),K.getSession().selection.on("changeCursor",o.onCursorChange),K.session.on("changeScrollTop",o.onScroll),K.setValue(ee===void 0?U:ee,w);var Z=h(L,q,[]),te=h(I,q,[]);K.getSession().setAnnotations(Z),te&&te.length>0&&o.handleMarkers(te,K);for(var Q=0;Q<$.editorOptions.length;Q++){var ne=$.editorOptions[Q];H.hasOwnProperty(ne)?K.setOption(ne,o.props[ne]):o.props[ne]&&console.warn("ReaceAce: editor option ".concat(ne," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}o.handleOptions(o.props,K),Array.isArray(C)&&C.forEach(function(ve){typeof ve.exec=="string"?K.commands.bindKey(ve.bindKey,ve.exec):K.commands.addCommand(ve)}),A&&K.setKeyboardHandler("ace/keyboard/"+A)}),l&&(this.refEditor.className+=" "+l),f&&this.splitEditor.focus();var Y=this.editor.env.split;Y.setOrientation(this.props.orientation==="below"?Y.BELOW:Y.BESIDE),Y.resize(!0),M&&M(Y)},r.prototype.componentDidUpdate=function(o){var s=this,l=o,n=this.props,d=this.editor.env.split;if(n.splits!==l.splits&&d.setSplits(n.splits),n.orientation!==l.orientation&&d.setOrientation(n.orientation==="below"?d.BELOW:d.BESIDE),d.forEach(function(v,g){n.mode!==l.mode&&v.getSession().setMode("ace/mode/"+n.mode),n.keyboardHandler!==l.keyboardHandler&&(n.keyboardHandler?v.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):v.setKeyboardHandler(null)),n.fontSize!==l.fontSize&&v.setFontSize(n.fontSize),n.wrapEnabled!==l.wrapEnabled&&v.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==l.showPrintMargin&&v.setShowPrintMargin(n.showPrintMargin),n.showGutter!==l.showGutter&&v.renderer.setShowGutter(n.showGutter);for(var w=0;w<$.editorOptions.length;w++){var b=$.editorOptions[w];n[b]!==l[b]&&v.setOption(b,n[b])}c(n.setOptions,l.setOptions)||s.handleOptions(n,v);var S=h(n.value,g,"");if(v.getValue()!==S){s.silent=!0;var T=v.session.selection.toJSON();v.setValue(S,n.cursorStart),v.session.selection.fromJSON(T),s.silent=!1}var j=h(n.annotations,g,[]),E=h(l.annotations,g,[]);c(j,E)||v.getSession().setAnnotations(j);var A=h(n.markers,g,[]),M=h(l.markers,g,[]);!c(A,M)&&Array.isArray(A)&&s.handleMarkers(A,v)}),n.className!==l.className){var f=this.refEditor.className,y=f.trim().split(" "),_=l.className.trim().split(" ");_.forEach(function(v){var g=y.indexOf(v);y.splice(g,1)}),this.refEditor.className=" "+n.className+" "+y.join(" ")}n.theme!==l.theme&&d.setTheme("ace/theme/"+n.theme),n.focus&&!l.focus&&this.splitEditor.focus(),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize()},r.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},r.prototype.onChange=function(o){if(this.props.onChange&&!this.silent){var s=[];this.editor.env.split.forEach(function(l){s.push(l.getValue())}),this.props.onChange(s,o)}},r.prototype.onSelectionChange=function(o){if(this.props.onSelectionChange){var s=[];this.editor.env.split.forEach(function(l){s.push(l.getSelection())}),this.props.onSelectionChange(s,o)}},r.prototype.onCursorChange=function(o){if(this.props.onCursorChange){var s=[];this.editor.env.split.forEach(function(l){s.push(l.getSelection())}),this.props.onCursorChange(s,o)}},r.prototype.onFocus=function(o){this.props.onFocus&&this.props.onFocus(o)},r.prototype.onInput=function(o){this.props.onInput&&this.props.onInput(o)},r.prototype.onBlur=function(o){this.props.onBlur&&this.props.onBlur(o)},r.prototype.onCopy=function(o){this.props.onCopy&&this.props.onCopy(o)},r.prototype.onPaste=function(o){this.props.onPaste&&this.props.onPaste(o)},r.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},r.prototype.handleOptions=function(o,s){for(var l=Object.keys(o.setOptions),n=0;n<l.length;n++)s.setOption(l[n],o.setOptions[l[n]])},r.prototype.handleMarkers=function(o,s){var l=s.getSession().getMarkers(!0);for(var n in l)l.hasOwnProperty(n)&&s.getSession().removeMarker(l[n].id);l=s.getSession().getMarkers(!1);for(var n in l)l.hasOwnProperty(n)&&s.getSession().removeMarker(l[n].id);o.forEach(function(d){var f=d.startRow,y=d.startCol,_=d.endRow,v=d.endCol,g=d.className,w=d.type,b=d.inFront,S=b===void 0?!1:b,T=new V.Range(f,y,_,v);s.getSession().addMarker(T,g,w,S)})},r.prototype.updateRef=function(o){this.refEditor=o},r.prototype.render=function(){var o=this.props,s=o.name,l=o.width,n=o.height,d=o.style,f=G({width:l,height:n},d);return p.createElement("div",{ref:this.updateRef,id:s,style:f})},r.propTypes={className:x.string,debounceChangePeriod:x.number,defaultValue:x.arrayOf(x.string),focus:x.bool,fontSize:x.oneOfType([x.number,x.string]),height:x.string,mode:x.string,name:x.string,onBlur:x.func,onChange:x.func,onCopy:x.func,onFocus:x.func,onInput:x.func,onLoad:x.func,onPaste:x.func,onScroll:x.func,orientation:x.string,showGutter:x.bool,splits:x.number,theme:x.string,value:x.arrayOf(x.string),width:x.string,onSelectionChange:x.func,onCursorChange:x.func,onBeforeLoad:x.func,minLines:x.number,maxLines:x.number,readOnly:x.bool,highlightActiveLine:x.bool,tabSize:x.number,showPrintMargin:x.bool,cursorStart:x.number,editorProps:x.object,setOptions:x.object,style:x.object,scrollMargin:x.array,annotations:x.array,markers:x.array,keyboardHandler:x.string,wrapEnabled:x.bool,enableBasicAutocompletion:x.oneOfType([x.bool,x.array]),enableLiveAutocompletion:x.oneOfType([x.bool,x.array]),commands:x.array},r.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},r})(p.Component);return Yn.default=a,Yn}var nu={exports:{}},Sp;function h0(){return Sp||(Sp=1,(function(W){var G=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},$=-1,D=1,V=0;G.Diff=function(R,x){return[R,x]},G.prototype.diff_main=function(R,x,p,c){typeof c>"u"&&(this.Diff_Timeout<=0?c=Number.MAX_VALUE:c=new Date().getTime()+this.Diff_Timeout*1e3);var h=c;if(R==null||x==null)throw new Error("Null input. (diff_main)");if(R==x)return R?[new G.Diff(V,R)]:[];typeof p>"u"&&(p=!0);var a=p,i=this.diff_commonPrefix(R,x),r=R.substring(0,i);R=R.substring(i),x=x.substring(i),i=this.diff_commonSuffix(R,x);var o=R.substring(R.length-i);R=R.substring(0,R.length-i),x=x.substring(0,x.length-i);var s=this.diff_compute_(R,x,a,h);return r&&s.unshift(new G.Diff(V,r)),o&&s.push(new G.Diff(V,o)),this.diff_cleanupMerge(s),s},G.prototype.diff_compute_=function(R,x,p,c){var h;if(!R)return[new G.Diff(D,x)];if(!x)return[new G.Diff($,R)];var a=R.length>x.length?R:x,i=R.length>x.length?x:R,r=a.indexOf(i);if(r!=-1)return h=[new G.Diff(D,a.substring(0,r)),new G.Diff(V,i),new G.Diff(D,a.substring(r+i.length))],R.length>x.length&&(h[0][0]=h[2][0]=$),h;if(i.length==1)return[new G.Diff($,R),new G.Diff(D,x)];var o=this.diff_halfMatch_(R,x);if(o){var s=o[0],l=o[1],n=o[2],d=o[3],f=o[4],y=this.diff_main(s,n,p,c),_=this.diff_main(l,d,p,c);return y.concat([new G.Diff(V,f)],_)}return p&&R.length>100&&x.length>100?this.diff_lineMode_(R,x,c):this.diff_bisect_(R,x,c)},G.prototype.diff_lineMode_=function(R,x,p){var c=this.diff_linesToChars_(R,x);R=c.chars1,x=c.chars2;var h=c.lineArray,a=this.diff_main(R,x,!1,p);this.diff_charsToLines_(a,h),this.diff_cleanupSemantic(a),a.push(new G.Diff(V,""));for(var i=0,r=0,o=0,s="",l="";i<a.length;){switch(a[i][0]){case D:o++,l+=a[i][1];break;case $:r++,s+=a[i][1];break;case V:if(r>=1&&o>=1){a.splice(i-r-o,r+o),i=i-r-o;for(var n=this.diff_main(s,l,!1,p),d=n.length-1;d>=0;d--)a.splice(i,0,n[d]);i=i+n.length}o=0,r=0,s="",l="";break}i++}return a.pop(),a},G.prototype.diff_bisect_=function(R,x,p){for(var c=R.length,h=x.length,a=Math.ceil((c+h)/2),i=a,r=2*a,o=new Array(r),s=new Array(r),l=0;l<r;l++)o[l]=-1,s[l]=-1;o[i+1]=0,s[i+1]=0;for(var n=c-h,d=n%2!=0,f=0,y=0,_=0,v=0,g=0;g<a&&!(new Date().getTime()>p);g++){for(var w=-g+f;w<=g-y;w+=2){var b=i+w,S;w==-g||w!=g&&o[b-1]<o[b+1]?S=o[b+1]:S=o[b-1]+1;for(var T=S-w;S<c&&T<h&&R.charAt(S)==x.charAt(T);)S++,T++;if(o[b]=S,S>c)y+=2;else if(T>h)f+=2;else if(d){var j=i+n-w;if(j>=0&&j<r&&s[j]!=-1){var E=c-s[j];if(S>=E)return this.diff_bisectSplit_(R,x,S,T,p)}}}for(var A=-g+_;A<=g-v;A+=2){var j=i+A,E;A==-g||A!=g&&s[j-1]<s[j+1]?E=s[j+1]:E=s[j-1]+1;for(var M=E-A;E<c&&M<h&&R.charAt(c-E-1)==x.charAt(h-M-1);)E++,M++;if(s[j]=E,E>c)v+=2;else if(M>h)_+=2;else if(!d){var b=i+n-A;if(b>=0&&b<r&&o[b]!=-1){var S=o[b],T=i+S-b;if(E=c-E,S>=E)return this.diff_bisectSplit_(R,x,S,T,p)}}}}return[new G.Diff($,R),new G.Diff(D,x)]},G.prototype.diff_bisectSplit_=function(R,x,p,c,h){var a=R.substring(0,p),i=x.substring(0,c),r=R.substring(p),o=x.substring(c),s=this.diff_main(a,i,!1,h),l=this.diff_main(r,o,!1,h);return s.concat(l)},G.prototype.diff_linesToChars_=function(R,x){var p=[],c={};p[0]="";function h(o){for(var s="",l=0,n=-1,d=p.length;n<o.length-1;){n=o.indexOf(`
1099
- `,l),n==-1&&(n=o.length-1);var f=o.substring(l,n+1);(c.hasOwnProperty?c.hasOwnProperty(f):c[f]!==void 0)?s+=String.fromCharCode(c[f]):(d==a&&(f=o.substring(l),n=o.length),s+=String.fromCharCode(d),c[f]=d,p[d++]=f),l=n+1}return s}var a=4e4,i=h(R);a=65535;var r=h(x);return{chars1:i,chars2:r,lineArray:p}},G.prototype.diff_charsToLines_=function(R,x){for(var p=0;p<R.length;p++){for(var c=R[p][1],h=[],a=0;a<c.length;a++)h[a]=x[c.charCodeAt(a)];R[p][1]=h.join("")}},G.prototype.diff_commonPrefix=function(R,x){if(!R||!x||R.charAt(0)!=x.charAt(0))return 0;for(var p=0,c=Math.min(R.length,x.length),h=c,a=0;p<h;)R.substring(a,h)==x.substring(a,h)?(p=h,a=p):c=h,h=Math.floor((c-p)/2+p);return h},G.prototype.diff_commonSuffix=function(R,x){if(!R||!x||R.charAt(R.length-1)!=x.charAt(x.length-1))return 0;for(var p=0,c=Math.min(R.length,x.length),h=c,a=0;p<h;)R.substring(R.length-h,R.length-a)==x.substring(x.length-h,x.length-a)?(p=h,a=p):c=h,h=Math.floor((c-p)/2+p);return h},G.prototype.diff_commonOverlap_=function(R,x){var p=R.length,c=x.length;if(p==0||c==0)return 0;p>c?R=R.substring(p-c):p<c&&(x=x.substring(0,p));var h=Math.min(p,c);if(R==x)return h;for(var a=0,i=1;;){var r=R.substring(h-i),o=x.indexOf(r);if(o==-1)return a;i+=o,(o==0||R.substring(h-i)==x.substring(0,i))&&(a=i,i++)}},G.prototype.diff_halfMatch_=function(R,x){if(this.Diff_Timeout<=0)return null;var p=R.length>x.length?R:x,c=R.length>x.length?x:R;if(p.length<4||c.length*2<p.length)return null;var h=this;function a(y,_,v){for(var g=y.substring(v,v+Math.floor(y.length/4)),w=-1,b="",S,T,j,E;(w=_.indexOf(g,w+1))!=-1;){var A=h.diff_commonPrefix(y.substring(v),_.substring(w)),M=h.diff_commonSuffix(y.substring(0,v),_.substring(0,w));b.length<M+A&&(b=_.substring(w-M,w)+_.substring(w,w+A),S=y.substring(0,v-M),T=y.substring(v+A),j=_.substring(0,w-M),E=_.substring(w+A))}return b.length*2>=y.length?[S,T,j,E,b]:null}var i=a(p,c,Math.ceil(p.length/4)),r=a(p,c,Math.ceil(p.length/2)),o;if(!i&&!r)return null;r?i?o=i[4].length>r[4].length?i:r:o=r:o=i;var s,l,n,d;R.length>x.length?(s=o[0],l=o[1],n=o[2],d=o[3]):(n=o[0],d=o[1],s=o[2],l=o[3]);var f=o[4];return[s,l,n,d,f]},G.prototype.diff_cleanupSemantic=function(R){for(var x=!1,p=[],c=0,h=null,a=0,i=0,r=0,o=0,s=0;a<R.length;)R[a][0]==V?(p[c++]=a,i=o,r=s,o=0,s=0,h=R[a][1]):(R[a][0]==D?o+=R[a][1].length:s+=R[a][1].length,h&&h.length<=Math.max(i,r)&&h.length<=Math.max(o,s)&&(R.splice(p[c-1],0,new G.Diff($,h)),R[p[c-1]+1][0]=D,c--,c--,a=c>0?p[c-1]:-1,i=0,r=0,o=0,s=0,h=null,x=!0)),a++;for(x&&this.diff_cleanupMerge(R),this.diff_cleanupSemanticLossless(R),a=1;a<R.length;){if(R[a-1][0]==$&&R[a][0]==D){var l=R[a-1][1],n=R[a][1],d=this.diff_commonOverlap_(l,n),f=this.diff_commonOverlap_(n,l);d>=f?(d>=l.length/2||d>=n.length/2)&&(R.splice(a,0,new G.Diff(V,n.substring(0,d))),R[a-1][1]=l.substring(0,l.length-d),R[a+1][1]=n.substring(d),a++):(f>=l.length/2||f>=n.length/2)&&(R.splice(a,0,new G.Diff(V,l.substring(0,f))),R[a-1][0]=D,R[a-1][1]=n.substring(0,n.length-f),R[a+1][0]=$,R[a+1][1]=l.substring(f),a++),a++}a++}},G.prototype.diff_cleanupSemanticLossless=function(R){function x(f,y){if(!f||!y)return 6;var _=f.charAt(f.length-1),v=y.charAt(0),g=_.match(G.nonAlphaNumericRegex_),w=v.match(G.nonAlphaNumericRegex_),b=g&&_.match(G.whitespaceRegex_),S=w&&v.match(G.whitespaceRegex_),T=b&&_.match(G.linebreakRegex_),j=S&&v.match(G.linebreakRegex_),E=T&&f.match(G.blanklineEndRegex_),A=j&&y.match(G.blanklineStartRegex_);return E||A?5:T||j?4:g&&!b&&S?3:b||S?2:g||w?1:0}for(var p=1;p<R.length-1;){if(R[p-1][0]==V&&R[p+1][0]==V){var c=R[p-1][1],h=R[p][1],a=R[p+1][1],i=this.diff_commonSuffix(c,h);if(i){var r=h.substring(h.length-i);c=c.substring(0,c.length-i),h=r+h.substring(0,h.length-i),a=r+a}for(var o=c,s=h,l=a,n=x(c,h)+x(h,a);h.charAt(0)===a.charAt(0);){c+=h.charAt(0),h=h.substring(1)+a.charAt(0),a=a.substring(1);var d=x(c,h)+x(h,a);d>=n&&(n=d,o=c,s=h,l=a)}R[p-1][1]!=o&&(o?R[p-1][1]=o:(R.splice(p-1,1),p--),R[p][1]=s,l?R[p+1][1]=l:(R.splice(p+1,1),p--))}p++}},G.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,G.whitespaceRegex_=/\s/,G.linebreakRegex_=/[\r\n]/,G.blanklineEndRegex_=/\n\r?\n$/,G.blanklineStartRegex_=/^\r?\n\r?\n/,G.prototype.diff_cleanupEfficiency=function(R){for(var x=!1,p=[],c=0,h=null,a=0,i=!1,r=!1,o=!1,s=!1;a<R.length;)R[a][0]==V?(R[a][1].length<this.Diff_EditCost&&(o||s)?(p[c++]=a,i=o,r=s,h=R[a][1]):(c=0,h=null),o=s=!1):(R[a][0]==$?s=!0:o=!0,h&&(i&&r&&o&&s||h.length<this.Diff_EditCost/2&&i+r+o+s==3)&&(R.splice(p[c-1],0,new G.Diff($,h)),R[p[c-1]+1][0]=D,c--,h=null,i&&r?(o=s=!0,c=0):(c--,a=c>0?p[c-1]:-1,o=s=!1),x=!0)),a++;x&&this.diff_cleanupMerge(R)},G.prototype.diff_cleanupMerge=function(R){R.push(new G.Diff(V,""));for(var x=0,p=0,c=0,h="",a="",i;x<R.length;)switch(R[x][0]){case D:c++,a+=R[x][1],x++;break;case $:p++,h+=R[x][1],x++;break;case V:p+c>1?(p!==0&&c!==0&&(i=this.diff_commonPrefix(a,h),i!==0&&(x-p-c>0&&R[x-p-c-1][0]==V?R[x-p-c-1][1]+=a.substring(0,i):(R.splice(0,0,new G.Diff(V,a.substring(0,i))),x++),a=a.substring(i),h=h.substring(i)),i=this.diff_commonSuffix(a,h),i!==0&&(R[x][1]=a.substring(a.length-i)+R[x][1],a=a.substring(0,a.length-i),h=h.substring(0,h.length-i))),x-=p+c,R.splice(x,p+c),h.length&&(R.splice(x,0,new G.Diff($,h)),x++),a.length&&(R.splice(x,0,new G.Diff(D,a)),x++),x++):x!==0&&R[x-1][0]==V?(R[x-1][1]+=R[x][1],R.splice(x,1)):x++,c=0,p=0,h="",a="";break}R[R.length-1][1]===""&&R.pop();var r=!1;for(x=1;x<R.length-1;)R[x-1][0]==V&&R[x+1][0]==V&&(R[x][1].substring(R[x][1].length-R[x-1][1].length)==R[x-1][1]?(R[x][1]=R[x-1][1]+R[x][1].substring(0,R[x][1].length-R[x-1][1].length),R[x+1][1]=R[x-1][1]+R[x+1][1],R.splice(x-1,1),r=!0):R[x][1].substring(0,R[x+1][1].length)==R[x+1][1]&&(R[x-1][1]+=R[x+1][1],R[x][1]=R[x][1].substring(R[x+1][1].length)+R[x+1][1],R.splice(x+1,1),r=!0)),x++;r&&this.diff_cleanupMerge(R)},G.prototype.diff_xIndex=function(R,x){var p=0,c=0,h=0,a=0,i;for(i=0;i<R.length&&(R[i][0]!==D&&(p+=R[i][1].length),R[i][0]!==$&&(c+=R[i][1].length),!(p>x));i++)h=p,a=c;return R.length!=i&&R[i][0]===$?a:a+(x-h)},G.prototype.diff_prettyHtml=function(R){for(var x=[],p=/&/g,c=/</g,h=/>/g,a=/\n/g,i=0;i<R.length;i++){var r=R[i][0],o=R[i][1],s=o.replace(p,"&amp;").replace(c,"&lt;").replace(h,"&gt;").replace(a,"&para;<br>");switch(r){case D:x[i]='<ins style="background:#e6ffe6;">'+s+"</ins>";break;case $:x[i]='<del style="background:#ffe6e6;">'+s+"</del>";break;case V:x[i]="<span>"+s+"</span>";break}}return x.join("")},G.prototype.diff_text1=function(R){for(var x=[],p=0;p<R.length;p++)R[p][0]!==D&&(x[p]=R[p][1]);return x.join("")},G.prototype.diff_text2=function(R){for(var x=[],p=0;p<R.length;p++)R[p][0]!==$&&(x[p]=R[p][1]);return x.join("")},G.prototype.diff_levenshtein=function(R){for(var x=0,p=0,c=0,h=0;h<R.length;h++){var a=R[h][0],i=R[h][1];switch(a){case D:p+=i.length;break;case $:c+=i.length;break;case V:x+=Math.max(p,c),p=0,c=0;break}}return x+=Math.max(p,c),x},G.prototype.diff_toDelta=function(R){for(var x=[],p=0;p<R.length;p++)switch(R[p][0]){case D:x[p]="+"+encodeURI(R[p][1]);break;case $:x[p]="-"+R[p][1].length;break;case V:x[p]="="+R[p][1].length;break}return x.join(" ").replace(/%20/g," ")},G.prototype.diff_fromDelta=function(R,x){for(var p=[],c=0,h=0,a=x.split(/\t/g),i=0;i<a.length;i++){var r=a[i].substring(1);switch(a[i].charAt(0)){case"+":try{p[c++]=new G.Diff(D,decodeURI(r))}catch{throw new Error("Illegal escape in diff_fromDelta: "+r)}break;case"-":case"=":var o=parseInt(r,10);if(isNaN(o)||o<0)throw new Error("Invalid number in diff_fromDelta: "+r);var s=R.substring(h,h+=o);a[i].charAt(0)=="="?p[c++]=new G.Diff(V,s):p[c++]=new G.Diff($,s);break;default:if(a[i])throw new Error("Invalid diff operation in diff_fromDelta: "+a[i])}}if(h!=R.length)throw new Error("Delta length ("+h+") does not equal source text length ("+R.length+").");return p},G.prototype.match_main=function(R,x,p){if(R==null||x==null||p==null)throw new Error("Null input. (match_main)");return p=Math.max(0,Math.min(p,R.length)),R==x?0:R.length?R.substring(p,p+x.length)==x?p:this.match_bitap_(R,x,p):-1},G.prototype.match_bitap_=function(R,x,p){if(x.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var c=this.match_alphabet_(x),h=this;function a(S,T){var j=S/x.length,E=Math.abs(p-T);return h.Match_Distance?j+E/h.Match_Distance:E?1:j}var i=this.Match_Threshold,r=R.indexOf(x,p);r!=-1&&(i=Math.min(a(0,r),i),r=R.lastIndexOf(x,p+x.length),r!=-1&&(i=Math.min(a(0,r),i)));var o=1<<x.length-1;r=-1;for(var s,l,n=x.length+R.length,d,f=0;f<x.length;f++){for(s=0,l=n;s<l;)a(f,p+l)<=i?s=l:n=l,l=Math.floor((n-s)/2+s);n=l;var y=Math.max(1,p-l+1),_=Math.min(p+l,R.length)+x.length,v=Array(_+2);v[_+1]=(1<<f)-1;for(var g=_;g>=y;g--){var w=c[R.charAt(g-1)];if(f===0?v[g]=(v[g+1]<<1|1)&w:v[g]=(v[g+1]<<1|1)&w|((d[g+1]|d[g])<<1|1)|d[g+1],v[g]&o){var b=a(f,g-1);if(b<=i)if(i=b,r=g-1,r>p)y=Math.max(1,2*p-r);else break}}if(a(f+1,p)>i)break;d=v}return r},G.prototype.match_alphabet_=function(R){for(var x={},p=0;p<R.length;p++)x[R.charAt(p)]=0;for(var p=0;p<R.length;p++)x[R.charAt(p)]|=1<<R.length-p-1;return x},G.prototype.patch_addContext_=function(R,x){if(x.length!=0){if(R.start2===null)throw Error("patch not initialized");for(var p=x.substring(R.start2,R.start2+R.length1),c=0;x.indexOf(p)!=x.lastIndexOf(p)&&p.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)c+=this.Patch_Margin,p=x.substring(R.start2-c,R.start2+R.length1+c);c+=this.Patch_Margin;var h=x.substring(R.start2-c,R.start2);h&&R.diffs.unshift(new G.Diff(V,h));var a=x.substring(R.start2+R.length1,R.start2+R.length1+c);a&&R.diffs.push(new G.Diff(V,a)),R.start1-=h.length,R.start2-=h.length,R.length1+=h.length+a.length,R.length2+=h.length+a.length}},G.prototype.patch_make=function(R,x,p){var c,h;if(typeof R=="string"&&typeof x=="string"&&typeof p>"u")c=R,h=this.diff_main(c,x,!0),h.length>2&&(this.diff_cleanupSemantic(h),this.diff_cleanupEfficiency(h));else if(R&&typeof R=="object"&&typeof x>"u"&&typeof p>"u")h=R,c=this.diff_text1(h);else if(typeof R=="string"&&x&&typeof x=="object"&&typeof p>"u")c=R,h=x;else if(typeof R=="string"&&typeof x=="string"&&p&&typeof p=="object")c=R,h=p;else throw new Error("Unknown call format to patch_make.");if(h.length===0)return[];for(var a=[],i=new G.patch_obj,r=0,o=0,s=0,l=c,n=c,d=0;d<h.length;d++){var f=h[d][0],y=h[d][1];switch(!r&&f!==V&&(i.start1=o,i.start2=s),f){case D:i.diffs[r++]=h[d],i.length2+=y.length,n=n.substring(0,s)+y+n.substring(s);break;case $:i.length1+=y.length,i.diffs[r++]=h[d],n=n.substring(0,s)+n.substring(s+y.length);break;case V:y.length<=2*this.Patch_Margin&&r&&h.length!=d+1?(i.diffs[r++]=h[d],i.length1+=y.length,i.length2+=y.length):y.length>=2*this.Patch_Margin&&r&&(this.patch_addContext_(i,l),a.push(i),i=new G.patch_obj,r=0,l=n,o=s);break}f!==D&&(o+=y.length),f!==$&&(s+=y.length)}return r&&(this.patch_addContext_(i,l),a.push(i)),a},G.prototype.patch_deepCopy=function(R){for(var x=[],p=0;p<R.length;p++){var c=R[p],h=new G.patch_obj;h.diffs=[];for(var a=0;a<c.diffs.length;a++)h.diffs[a]=new G.Diff(c.diffs[a][0],c.diffs[a][1]);h.start1=c.start1,h.start2=c.start2,h.length1=c.length1,h.length2=c.length2,x[p]=h}return x},G.prototype.patch_apply=function(R,x){if(R.length==0)return[x,[]];R=this.patch_deepCopy(R);var p=this.patch_addPadding(R);x=p+x+p,this.patch_splitMax(R);for(var c=0,h=[],a=0;a<R.length;a++){var i=R[a].start2+c,r=this.diff_text1(R[a].diffs),o,s=-1;if(r.length>this.Match_MaxBits?(o=this.match_main(x,r.substring(0,this.Match_MaxBits),i),o!=-1&&(s=this.match_main(x,r.substring(r.length-this.Match_MaxBits),i+r.length-this.Match_MaxBits),(s==-1||o>=s)&&(o=-1))):o=this.match_main(x,r,i),o==-1)h[a]=!1,c-=R[a].length2-R[a].length1;else{h[a]=!0,c=o-i;var l;if(s==-1?l=x.substring(o,o+r.length):l=x.substring(o,s+this.Match_MaxBits),r==l)x=x.substring(0,o)+this.diff_text2(R[a].diffs)+x.substring(o+r.length);else{var n=this.diff_main(r,l,!1);if(r.length>this.Match_MaxBits&&this.diff_levenshtein(n)/r.length>this.Patch_DeleteThreshold)h[a]=!1;else{this.diff_cleanupSemanticLossless(n);for(var d=0,f,y=0;y<R[a].diffs.length;y++){var _=R[a].diffs[y];_[0]!==V&&(f=this.diff_xIndex(n,d)),_[0]===D?x=x.substring(0,o+f)+_[1]+x.substring(o+f):_[0]===$&&(x=x.substring(0,o+f)+x.substring(o+this.diff_xIndex(n,d+_[1].length))),_[0]!==$&&(d+=_[1].length)}}}}}return x=x.substring(p.length,x.length-p.length),[x,h]},G.prototype.patch_addPadding=function(R){for(var x=this.Patch_Margin,p="",c=1;c<=x;c++)p+=String.fromCharCode(c);for(var c=0;c<R.length;c++)R[c].start1+=x,R[c].start2+=x;var h=R[0],a=h.diffs;if(a.length==0||a[0][0]!=V)a.unshift(new G.Diff(V,p)),h.start1-=x,h.start2-=x,h.length1+=x,h.length2+=x;else if(x>a[0][1].length){var i=x-a[0][1].length;a[0][1]=p.substring(a[0][1].length)+a[0][1],h.start1-=i,h.start2-=i,h.length1+=i,h.length2+=i}if(h=R[R.length-1],a=h.diffs,a.length==0||a[a.length-1][0]!=V)a.push(new G.Diff(V,p)),h.length1+=x,h.length2+=x;else if(x>a[a.length-1][1].length){var i=x-a[a.length-1][1].length;a[a.length-1][1]+=p.substring(0,i),h.length1+=i,h.length2+=i}return p},G.prototype.patch_splitMax=function(R){for(var x=this.Match_MaxBits,p=0;p<R.length;p++)if(!(R[p].length1<=x)){var c=R[p];R.splice(p--,1);for(var h=c.start1,a=c.start2,i="";c.diffs.length!==0;){var r=new G.patch_obj,o=!0;for(r.start1=h-i.length,r.start2=a-i.length,i!==""&&(r.length1=r.length2=i.length,r.diffs.push(new G.Diff(V,i)));c.diffs.length!==0&&r.length1<x-this.Patch_Margin;){var s=c.diffs[0][0],l=c.diffs[0][1];s===D?(r.length2+=l.length,a+=l.length,r.diffs.push(c.diffs.shift()),o=!1):s===$&&r.diffs.length==1&&r.diffs[0][0]==V&&l.length>2*x?(r.length1+=l.length,h+=l.length,o=!1,r.diffs.push(new G.Diff(s,l)),c.diffs.shift()):(l=l.substring(0,x-r.length1-this.Patch_Margin),r.length1+=l.length,h+=l.length,s===V?(r.length2+=l.length,a+=l.length):o=!1,r.diffs.push(new G.Diff(s,l)),l==c.diffs[0][1]?c.diffs.shift():c.diffs[0][1]=c.diffs[0][1].substring(l.length))}i=this.diff_text2(r.diffs),i=i.substring(i.length-this.Patch_Margin);var n=this.diff_text1(c.diffs).substring(0,this.Patch_Margin);n!==""&&(r.length1+=n.length,r.length2+=n.length,r.diffs.length!==0&&r.diffs[r.diffs.length-1][0]===V?r.diffs[r.diffs.length-1][1]+=n:r.diffs.push(new G.Diff(V,n))),o||R.splice(++p,0,r)}}},G.prototype.patch_toText=function(R){for(var x=[],p=0;p<R.length;p++)x[p]=R[p];return x.join("")},G.prototype.patch_fromText=function(R){var x=[];if(!R)return x;for(var p=R.split(`
1100
- `),c=0,h=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<p.length;){var a=p[c].match(h);if(!a)throw new Error("Invalid patch string: "+p[c]);var i=new G.patch_obj;for(x.push(i),i.start1=parseInt(a[1],10),a[2]===""?(i.start1--,i.length1=1):a[2]=="0"?i.length1=0:(i.start1--,i.length1=parseInt(a[2],10)),i.start2=parseInt(a[3],10),a[4]===""?(i.start2--,i.length2=1):a[4]=="0"?i.length2=0:(i.start2--,i.length2=parseInt(a[4],10)),c++;c<p.length;){var r=p[c].charAt(0);try{var o=decodeURI(p[c].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+o)}if(r=="-")i.diffs.push(new G.Diff($,o));else if(r=="+")i.diffs.push(new G.Diff(D,o));else if(r==" ")i.diffs.push(new G.Diff(V,o));else{if(r=="@")break;if(r!=="")throw new Error('Invalid patch mode "'+r+'" in: '+o)}c++}}return x},G.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},G.patch_obj.prototype.toString=function(){var R,x;this.length1===0?R=this.start1+",0":this.length1==1?R=this.start1+1:R=this.start1+1+","+this.length1,this.length2===0?x=this.start2+",0":this.length2==1?x=this.start2+1:x=this.start2+1+","+this.length2;for(var p=["@@ -"+R+" +"+x+` @@
1101
- `],c,h=0;h<this.diffs.length;h++){switch(this.diffs[h][0]){case D:c="+";break;case $:c="-";break;case V:c=" ";break}p[h+1]=c+encodeURI(this.diffs[h][1])+`
1102
- `}return p.join("").replace(/%20/g," ")},W.exports=G,W.exports.diff_match_patch=G,W.exports.DIFF_DELETE=$,W.exports.DIFF_INSERT=D,W.exports.DIFF_EQUAL=V})(nu)),nu.exports}var xp;function d0(){if(xp)return ds;xp=1;var W=ds&&ds.__extends||(function(){var x=function(p,c){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,a){h.__proto__=a}||function(h,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(h[i]=a[i])},x(p,c)};return function(p,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");x(p,c);function h(){this.constructor=p}p.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}})();Object.defineProperty(ds,"__esModule",{value:!0});var G=du(),$=Qn(),D=Fp(),V=h0(),R=(function(x){W(p,x);function p(c){var h=x.call(this,c)||this;return h.state={value:h.props.value},h.onChange=h.onChange.bind(h),h.diff=h.diff.bind(h),h}return p.prototype.componentDidUpdate=function(){var c=this.props.value;c!==this.state.value&&this.setState({value:c})},p.prototype.onChange=function(c){this.setState({value:c}),this.props.onChange&&this.props.onChange(c)},p.prototype.diff=function(){var c=new V,h=this.state.value[0],a=this.state.value[1];if(h.length===0&&a.length===0)return[];var i=c.diff_main(h,a);c.diff_cleanupSemantic(i);var r=this.generateDiffedLines(i),o=this.setCodeMarkers(r);return o},p.prototype.generateDiffedLines=function(c){var h={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},a={left:[],right:[]},i={left:1,right:1};return c.forEach(function(r){var o=r[0],s=r[1],l=s.split(`
1103
- `).length-1;if(s.length!==0){var n=s[0],d=s[s.length-1],f=0;switch(o){case h.DIFF_EQUAL:i.left+=l,i.right+=l;break;case h.DIFF_DELETE:n===`
1104
- `&&(i.left++,l--),f=l,f===0&&a.right.push({startLine:i.right,endLine:i.right}),d===`
1105
- `&&(f-=1),a.left.push({startLine:i.left,endLine:i.left+f}),i.left+=l;break;case h.DIFF_INSERT:n===`
1106
- `&&(i.right++,l--),f=l,f===0&&a.left.push({startLine:i.left,endLine:i.left}),d===`
1107
- `&&(f-=1),a.right.push({startLine:i.right,endLine:i.right+f}),i.right+=l;break;default:throw new Error("Diff type was not defined.")}}}),a},p.prototype.setCodeMarkers=function(c){c===void 0&&(c={left:[],right:[]});for(var h=[],a={left:[],right:[]},i=0;i<c.left.length;i++){var r={startRow:c.left[i].startLine-1,endRow:c.left[i].endLine,type:"text",className:"codeMarker"};a.left.push(r)}for(var i=0;i<c.right.length;i++){var r={startRow:c.right[i].startLine-1,endRow:c.right[i].endLine,type:"text",className:"codeMarker"};a.right.push(r)}return h[0]=a.left,h[1]=a.right,h},p.prototype.render=function(){var c=this.diff();return $.createElement(D.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:c})},p.propTypes={cursorStart:G.number,editorProps:G.object,enableBasicAutocompletion:G.bool,enableLiveAutocompletion:G.bool,focus:G.bool,fontSize:G.number,height:G.string,highlightActiveLine:G.bool,maxLines:G.number,minLines:G.number,mode:G.string,name:G.string,className:G.string,onLoad:G.func,onPaste:G.func,onScroll:G.func,onChange:G.func,orientation:G.string,readOnly:G.bool,scrollMargin:G.array,setOptions:G.object,showGutter:G.bool,showPrintMargin:G.bool,splits:G.number,style:G.object,tabSize:G.number,theme:G.string,value:G.array,width:G.string,wrapEnabled:G.bool},p.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},p})($.Component);return ds.default=R,ds}var Cp;function f0(){if(Cp)return Gn;Cp=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.diff=Gn.split=void 0;var W=l0(),G=d0();Gn.diff=G.default;var $=Fp();return Gn.split=$.default,Gn.default=W.default,Gn}var p0=f0();const g0=hu(p0);var ru={exports:{}},Ep;function m0(){return Ep||(Ep=1,(function(W,G){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function($,D,V){var R=$("../lib/oop"),x=$("./text_highlight_rules").TextHighlightRules,p=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};R.inherits(p,x),D.JsonHighlightRules=p}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function($,D,V){var R=$("../range").Range,x=function(){};(function(){this.checkOutdent=function(p,c){return/^\s+$/.test(p)?/^\s*\}/.test(c):!1},this.autoOutdent=function(p,c){var h=p.getLine(c),a=h.match(/^(\s*\})/);if(!a)return 0;var i=a[1].length,r=p.findMatchingBracket({row:c,column:i});if(!r||r.row==c)return 0;var o=this.$getIndent(p.getLine(r.row));p.replace(new R(c,0,c,i-1),o)},this.$getIndent=function(p){return p.match(/^\s*/)[0]}}).call(x.prototype),D.MatchingBraceOutdent=x}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function($,D,V){var R=$("../../lib/oop"),x=$("../../range").Range,p=$("./fold_mode").FoldMode,c=D.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end)))};R.inherits(c,p),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,a,i){var r=h.getLine(i);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(h,a,i);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(h,a,i,r){var o=h.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(h,o,i);var n=o.match(this.foldingStartMarker);if(n){var s=n.index;if(n[1])return this.openingBracketBlock(h,n[1],i,s);var l=h.getCommentFoldRange(i,s+n[0].length,1);return l&&!l.isMultiLine()&&(r?l=this.getSectionRange(h,i):a!="all"&&(l=null)),l}if(a!=="markbegin"){var n=o.match(this.foldingStopMarker);if(n){var s=n.index+n[0].length;return n[1]?this.closingBracketBlock(h,n[1],i,s):h.getCommentFoldRange(i,s,-1)}}},this.getSectionRange=function(h,a){var i=h.getLine(a),r=i.search(/\S/),o=a,s=i.length;a=a+1;for(var l=a,n=h.getLength();++a<n;){i=h.getLine(a);var d=i.search(/\S/);if(d!==-1){if(r>d)break;var f=this.getFoldWidgetRange(h,"all",a);if(f){if(f.start.row<=o)break;if(f.isMultiLine())a=f.end.row;else if(r==d)break}l=a}}return new x(o,s,l,h.getLine(l).length)},this.getCommentRegionBlock=function(h,a,i){for(var r=a.search(/\s*$/),o=h.getLength(),s=i,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,n=1;++i<o;){a=h.getLine(i);var d=l.exec(a);if(d&&(d[1]?n--:n++,!n))break}var f=i;if(f>s)return new x(s,r,f,a.length)}}).call(c.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function($,D,V){var R=$("../lib/oop"),x=$("./text").Mode,p=$("./json_highlight_rules").JsonHighlightRules,c=$("./matching_brace_outdent").MatchingBraceOutdent,h=$("./folding/cstyle").FoldMode,a=$("../worker/worker_client").WorkerClient,i=function(){this.HighlightRules=p,this.$outdent=new c,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new h};R.inherits(i,x),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(r,o,s){var l=this.$getIndent(o);if(r=="start"){var n=o.match(/^.*[\{\(\[]\s*$/);n&&(l+=s)}return l},this.checkOutdent=function(r,o,s){return this.$outdent.checkOutdent(o,s)},this.autoOutdent=function(r,o,s){this.$outdent.autoOutdent(o,s)},this.createWorker=function(r){var o=new a(["ace"],"ace/mode/json_worker","JsonWorker");return o.attachToDocument(r.getDocument()),o.on("annotate",function(s){r.setAnnotations(s.data)}),o.on("terminate",function(){r.clearAnnotations()}),o},this.$id="ace/mode/json"}).call(i.prototype),D.Mode=i}),(function(){ace.require(["ace/mode/json"],function($){W&&(W.exports=$)})})()})(ru)),ru.exports}m0();var su={exports:{}},Ap;function v0(){return Ap||(Ap=1,(function(W,G){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function($,D,V){var R=$("../lib/oop"),x=$("./text_highlight_rules").TextHighlightRules,p=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},p.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};R.inherits(p,x),p.getTagRule=function(c){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},p.getStartRule=function(c){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:c}},p.getEndRule=function(c){return{token:"comment.doc",regex:"\\*\\/",next:c}},D.JsDocCommentHighlightRules=p}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function($,D,V){var R=$("../lib/oop"),x=$("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,p=$("./text_highlight_rules").TextHighlightRules,c="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",h=function(r){var o={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},s=this.createKeywordMapper(o,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",d="(function)(\\s*)(\\*?)",f={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(o).join("|")+"\\b)"+c+")(\\s*)(\\()"};this.$rules={no_regex:[x.getStartRule("doc-start"),i("no_regex"),f,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+c+")(\\s*)(=)(\\s*)"+d+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+c+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+c+")(\\s*)(:)(\\s*)"+d+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+d+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:s,regex:c},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:d+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:c},{regex:"",token:"empty",next:"no_regex"}],start:[x.getStartRule("doc-start"),i("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[i("function_arguments"),{token:"variable.parameter",regex:c},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!r||!r.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(y,_,v){if(this.next=y=="{"?this.nextState:"",y=="{"&&v.length)v.unshift("start",_);else if(y=="}"&&v.length&&(v.shift(),this.next=v.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return y=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+c+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!r||r.jsx!=!1)&&a.call(this)),this.embedRules(x,"doc-",[x.getEndRule("no_regex")]),this.normalizeRules()};R.inherits(h,p);function a(){var r=c.replace("\\d","\\d\\-"),o={onMatch:function(l,n,d){var f=l.charAt(1)=="/"?2:1;return f==1?(n!=this.nextState?d.unshift(this.next,this.nextState,0):d.unshift(this.next),d[2]++):f==2&&n==this.nextState&&(d[1]--,(!d[1]||d[1]<0)&&(d.shift(),d.shift())),[{type:"meta.tag.punctuation."+(f==1?"":"end-")+"tag-open.xml",value:l.slice(0,f)},{type:"meta.tag.tag-name.xml",value:l.substr(f)}]},regex:"</?(?:"+r+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(o);var s={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[s,o,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,n,d){return n==d[0]&&d.shift(),l.length==2&&(d[0]==this.nextState&&d[1]--,(!d[1]||d[1]<0)&&d.splice(0,2)),this.next=d[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},s,i("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:r},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},o],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function i(r){return[{token:"comment",regex:/\/\*/,next:[x.getTagRule(),{token:"comment",regex:"\\*\\/",next:r||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[x.getTagRule(),{token:"comment",regex:"$|^",next:r||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}D.JavaScriptHighlightRules=h}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function($,D,V){var R=$("../range").Range,x=function(){};(function(){this.checkOutdent=function(p,c){return/^\s+$/.test(p)?/^\s*\}/.test(c):!1},this.autoOutdent=function(p,c){var h=p.getLine(c),a=h.match(/^(\s*\})/);if(!a)return 0;var i=a[1].length,r=p.findMatchingBracket({row:c,column:i});if(!r||r.row==c)return 0;var o=this.$getIndent(p.getLine(r.row));p.replace(new R(c,0,c,i-1),o)},this.$getIndent=function(p){return p.match(/^\s*/)[0]}}).call(x.prototype),D.MatchingBraceOutdent=x}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function($,D,V){var R=$("../../lib/oop"),x=$("../behaviour").Behaviour,p=$("../../token_iterator").TokenIterator;function c(a,i){return a&&a.type.lastIndexOf(i+".xml")>-1}var h=function(){this.add("string_dquotes","insertion",function(a,i,r,o,s){if(s=='"'||s=="'"){var l=s,n=o.doc.getTextRange(r.getSelectionRange());if(n!==""&&n!=="'"&&n!='"'&&r.getWrapBehavioursEnabled())return{text:l+n+l,selection:!1};var d=r.getCursorPosition(),f=o.doc.getLine(d.row),y=f.substring(d.column,d.column+1),_=new p(o,d.row,d.column),v=_.getCurrentToken();if(y==l&&(c(v,"attribute-value")||c(v,"string")))return{text:"",selection:[1,1]};if(v||(v=_.stepBackward()),!v)return;for(;c(v,"tag-whitespace")||c(v,"whitespace");)v=_.stepBackward();var g=!y||y.match(/\s/);if(c(v,"attribute-equals")&&(g||y==">")||c(v,"decl-attribute-equals")&&(g||y=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,i,r,o,s){var l=o.doc.getTextRange(s);if(!s.isMultiLine()&&(l=='"'||l=="'")){var n=o.doc.getLine(s.start.row),d=n.substring(s.start.column+1,s.start.column+2);if(d==l)return s.end.column++,s}}),this.add("autoclosing","insertion",function(a,i,r,o,s){if(s==">"){var l=r.getSelectionRange().start,n=new p(o,l.row,l.column),d=n.getCurrentToken()||n.stepBackward();if(!d||!(c(d,"tag-name")||c(d,"tag-whitespace")||c(d,"attribute-name")||c(d,"attribute-equals")||c(d,"attribute-value"))||c(d,"reference.attribute-value"))return;if(c(d,"attribute-value")){var f=n.getCurrentTokenColumn()+d.value.length;if(l.column<f)return;if(l.column==f){var y=n.stepForward();if(y&&c(y,"attribute-value"))return;n.stepBackward()}}if(/^\s*>/.test(o.getLine(l.row).slice(l.column)))return;for(;!c(d,"tag-name");)if(d=n.stepBackward(),d.value=="<"){d=n.stepForward();break}var _=n.getCurrentTokenRow(),v=n.getCurrentTokenColumn();if(c(n.stepBackward(),"end-tag-open"))return;var g=d.value;return _==l.row&&(g=g.substring(0,l.column-v)),this.voidElements&&this.voidElements.hasOwnProperty(g.toLowerCase())?void 0:{text:"></"+g+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,i,r,o,s){if(s==`
1108
- `){var l=r.getCursorPosition(),n=o.getLine(l.row),d=new p(o,l.row,l.column),f=d.getCurrentToken();if(c(f,"")&&f.type.indexOf("tag-close")!==-1){if(f.value=="/>")return;for(;f&&f.type.indexOf("tag-name")===-1;)f=d.stepBackward();if(!f)return;var y=f.value,_=d.getCurrentTokenRow();if(f=d.stepBackward(),!f||f.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[y]||!this.voidElements){var v=o.getTokenAt(l.row,l.column+1),n=o.getLine(_),g=this.$getIndent(n),w=g+o.getTabString();return v&&v.value==="</"?{text:`
1109
- `+w+`
1110
- `+g,selection:[1,w.length,1,w.length]}:{text:`
1111
- `+w}}}}})};R.inherits(h,x),D.XmlBehaviour=h}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function($,D,V){var R=$("../../lib/oop"),x=$("../../token_iterator").TokenIterator,p=$("../behaviour/cstyle").CstyleBehaviour,c=$("../behaviour/xml").XmlBehaviour,h=function(){var a=new c({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(p),this.add("autoclosing-fragment","insertion",function(i,r,o,s,l){if(l==">"){var n=o.getSelectionRange().start,d=new x(s,n.row,n.column),f=d.getCurrentToken()||d.stepBackward();if(!f)return;if(f.value=="<")return{text:"></>",selection:[1,1]}}})};R.inherits(h,p),D.JavaScriptBehaviour=h}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function($,D,V){var R=$("../../lib/oop"),x=$("../../range").Range,p=$("./fold_mode").FoldMode,c=D.FoldMode=function(i,r){p.call(this),this.voidElements=i||{},this.optionalEndTags=R.mixin({},this.voidElements),r&&R.mixin(this.optionalEndTags,r)};R.inherits(c,p);var h=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function a(i,r){return i&&i.type&&i.type.lastIndexOf(r+".xml")>-1}(function(){this.getFoldWidget=function(i,r,o){var s=this._getFirstTagInLine(i,o);return s?s.closing||!s.tagName&&s.selfClosing?r==="markbeginend"?"end":"":!s.tagName||s.selfClosing||this.voidElements.hasOwnProperty(s.tagName.toLowerCase())||this._findEndTagInLine(i,o,s.tagName,s.end.column)?"":"start":this.getCommentFoldWidget(i,o)},this.getCommentFoldWidget=function(i,r){return/comment/.test(i.getState(r))&&/<!-/.test(i.getLine(r))?"start":""},this._getFirstTagInLine=function(i,r){for(var o=i.getTokens(r),s=new h,l=0;l<o.length;l++){var n=o[l];if(a(n,"tag-open")){if(s.end.column=s.start.column+n.value.length,s.closing=a(n,"end-tag-open"),n=o[++l],!n)return null;if(s.tagName=n.value,n.value===""){if(n=o[++l],!n)return null;s.tagName=n.value}for(s.end.column+=n.value.length,l++;l<o.length;l++)if(n=o[l],s.end.column+=n.value.length,a(n,"tag-close")){s.selfClosing=n.value=="/>";break}return s}else if(a(n,"tag-close"))return s.selfClosing=n.value=="/>",s;s.start.column+=n.value.length}return null},this._findEndTagInLine=function(i,r,o,s){for(var l=i.getTokens(r),n=0,d=0;d<l.length;d++){var f=l[d];if(n+=f.value.length,!(n<s-1)&&a(f,"end-tag-open")&&(f=l[d+1],a(f,"tag-name")&&f.value===""&&(f=l[d+2]),f&&f.value==o))return!0}return!1},this.getFoldWidgetRange=function(i,r,o){var s=this._getFirstTagInLine(i,o);if(!s)return this.getCommentFoldWidget(i,o)&&i.getCommentFoldRange(o,i.getLine(o).length);var l=i.getMatchingTags({row:o,column:0});if(l)return new x(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.closeTag.start.column)}}).call(c.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function($,D,V){var R=$("../../lib/oop"),x=$("../../range").Range,p=$("./fold_mode").FoldMode,c=D.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end)))};R.inherits(c,p),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,a,i){var r=h.getLine(i);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(h,a,i);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(h,a,i,r){var o=h.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(h,o,i);var n=o.match(this.foldingStartMarker);if(n){var s=n.index;if(n[1])return this.openingBracketBlock(h,n[1],i,s);var l=h.getCommentFoldRange(i,s+n[0].length,1);return l&&!l.isMultiLine()&&(r?l=this.getSectionRange(h,i):a!="all"&&(l=null)),l}if(a!=="markbegin"){var n=o.match(this.foldingStopMarker);if(n){var s=n.index+n[0].length;return n[1]?this.closingBracketBlock(h,n[1],i,s):h.getCommentFoldRange(i,s,-1)}}},this.getSectionRange=function(h,a){var i=h.getLine(a),r=i.search(/\S/),o=a,s=i.length;a=a+1;for(var l=a,n=h.getLength();++a<n;){i=h.getLine(a);var d=i.search(/\S/);if(d!==-1){if(r>d)break;var f=this.getFoldWidgetRange(h,"all",a);if(f){if(f.start.row<=o)break;if(f.isMultiLine())a=f.end.row;else if(r==d)break}l=a}}return new x(o,s,l,h.getLine(l).length)},this.getCommentRegionBlock=function(h,a,i){for(var r=a.search(/\s*$/),o=h.getLength(),s=i,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,n=1;++i<o;){a=h.getLine(i);var d=l.exec(a);if(d&&(d[1]?n--:n++,!n))break}var f=i;if(f>s)return new x(s,r,f,a.length)}}).call(c.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function($,D,V){var R=$("../../lib/oop"),x=$("./xml").FoldMode,p=$("./cstyle").FoldMode,c=D.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end))),this.xmlFoldMode=new x};R.inherits(c,p),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,a,i){var r=this.getFoldWidgetBase(h,a,i);return r||this.xmlFoldMode.getFoldWidget(h,a,i)},this.getFoldWidgetRange=function(h,a,i,r){var o=this.getFoldWidgetRangeBase(h,a,i,r);return o||this.xmlFoldMode.getFoldWidgetRange(h,a,i)}}).call(c.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function($,D,V){var R=$("../lib/oop"),x=$("./text").Mode,p=$("./javascript_highlight_rules").JavaScriptHighlightRules,c=$("./matching_brace_outdent").MatchingBraceOutdent,h=$("../worker/worker_client").WorkerClient,a=$("./behaviour/javascript").JavaScriptBehaviour,i=$("./folding/javascript").FoldMode,r=function(){this.HighlightRules=p,this.$outdent=new c,this.$behaviour=new a,this.foldingRules=new i};R.inherits(r,x),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(o,s,l){var n=this.$getIndent(s),d=this.getTokenizer().getLineTokens(s,o),f=d.tokens,y=d.state;if(f.length&&f[f.length-1].type=="comment")return n;if(o=="start"||o=="no_regex"){var _=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);_&&(n+=l)}else if(o=="doc-start"&&(y=="start"||y=="no_regex"))return"";return n},this.checkOutdent=function(o,s,l){return this.$outdent.checkOutdent(s,l)},this.autoOutdent=function(o,s,l){this.$outdent.autoOutdent(s,l)},this.createWorker=function(o){var s=new h(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(o.getDocument()),s.on("annotate",function(l){o.setAnnotations(l.data)}),s.on("terminate",function(){o.clearAnnotations()}),s},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(r.prototype),D.Mode=r}),(function(){ace.require(["ace/mode/javascript"],function($){W&&(W.exports=$)})})()})(su)),su.exports}v0();var ou={exports:{}},Mp;function y0(){return Mp||(Mp=1,(function(W,G){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function($,D,V){var R=$("../lib/oop"),x=$("./text_highlight_rules").TextHighlightRules,p=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},p.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};R.inherits(p,x),p.getTagRule=function(c){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},p.getStartRule=function(c){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:c}},p.getEndRule=function(c){return{token:"comment.doc",regex:"\\*\\/",next:c}},D.JsDocCommentHighlightRules=p}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function($,D,V){var R=$("../lib/oop"),x=$("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,p=$("./text_highlight_rules").TextHighlightRules,c="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",h=function(r){var o={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},s=this.createKeywordMapper(o,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",d="(function)(\\s*)(\\*?)",f={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(o).join("|")+"\\b)"+c+")(\\s*)(\\()"};this.$rules={no_regex:[x.getStartRule("doc-start"),i("no_regex"),f,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+c+")(\\s*)(=)(\\s*)"+d+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+c+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+c+")(\\s*)(:)(\\s*)"+d+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+d+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:s,regex:c},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:d+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:c},{regex:"",token:"empty",next:"no_regex"}],start:[x.getStartRule("doc-start"),i("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[i("function_arguments"),{token:"variable.parameter",regex:c},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!r||!r.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(y,_,v){if(this.next=y=="{"?this.nextState:"",y=="{"&&v.length)v.unshift("start",_);else if(y=="}"&&v.length&&(v.shift(),this.next=v.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return y=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+c+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!r||r.jsx!=!1)&&a.call(this)),this.embedRules(x,"doc-",[x.getEndRule("no_regex")]),this.normalizeRules()};R.inherits(h,p);function a(){var r=c.replace("\\d","\\d\\-"),o={onMatch:function(l,n,d){var f=l.charAt(1)=="/"?2:1;return f==1?(n!=this.nextState?d.unshift(this.next,this.nextState,0):d.unshift(this.next),d[2]++):f==2&&n==this.nextState&&(d[1]--,(!d[1]||d[1]<0)&&(d.shift(),d.shift())),[{type:"meta.tag.punctuation."+(f==1?"":"end-")+"tag-open.xml",value:l.slice(0,f)},{type:"meta.tag.tag-name.xml",value:l.substr(f)}]},regex:"</?(?:"+r+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(o);var s={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[s,o,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,n,d){return n==d[0]&&d.shift(),l.length==2&&(d[0]==this.nextState&&d[1]--,(!d[1]||d[1]<0)&&d.splice(0,2)),this.next=d[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},s,i("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:r},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},o],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function i(r){return[{token:"comment",regex:/\/\*/,next:[x.getTagRule(),{token:"comment",regex:"\\*\\/",next:r||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[x.getTagRule(),{token:"comment",regex:"$|^",next:r||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}D.JavaScriptHighlightRules=h}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function($,D,V){var R=$("../range").Range,x=function(){};(function(){this.checkOutdent=function(p,c){return/^\s+$/.test(p)?/^\s*\}/.test(c):!1},this.autoOutdent=function(p,c){var h=p.getLine(c),a=h.match(/^(\s*\})/);if(!a)return 0;var i=a[1].length,r=p.findMatchingBracket({row:c,column:i});if(!r||r.row==c)return 0;var o=this.$getIndent(p.getLine(r.row));p.replace(new R(c,0,c,i-1),o)},this.$getIndent=function(p){return p.match(/^\s*/)[0]}}).call(x.prototype),D.MatchingBraceOutdent=x}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function($,D,V){var R=$("../../lib/oop"),x=$("../behaviour").Behaviour,p=$("../../token_iterator").TokenIterator;function c(a,i){return a&&a.type.lastIndexOf(i+".xml")>-1}var h=function(){this.add("string_dquotes","insertion",function(a,i,r,o,s){if(s=='"'||s=="'"){var l=s,n=o.doc.getTextRange(r.getSelectionRange());if(n!==""&&n!=="'"&&n!='"'&&r.getWrapBehavioursEnabled())return{text:l+n+l,selection:!1};var d=r.getCursorPosition(),f=o.doc.getLine(d.row),y=f.substring(d.column,d.column+1),_=new p(o,d.row,d.column),v=_.getCurrentToken();if(y==l&&(c(v,"attribute-value")||c(v,"string")))return{text:"",selection:[1,1]};if(v||(v=_.stepBackward()),!v)return;for(;c(v,"tag-whitespace")||c(v,"whitespace");)v=_.stepBackward();var g=!y||y.match(/\s/);if(c(v,"attribute-equals")&&(g||y==">")||c(v,"decl-attribute-equals")&&(g||y=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,i,r,o,s){var l=o.doc.getTextRange(s);if(!s.isMultiLine()&&(l=='"'||l=="'")){var n=o.doc.getLine(s.start.row),d=n.substring(s.start.column+1,s.start.column+2);if(d==l)return s.end.column++,s}}),this.add("autoclosing","insertion",function(a,i,r,o,s){if(s==">"){var l=r.getSelectionRange().start,n=new p(o,l.row,l.column),d=n.getCurrentToken()||n.stepBackward();if(!d||!(c(d,"tag-name")||c(d,"tag-whitespace")||c(d,"attribute-name")||c(d,"attribute-equals")||c(d,"attribute-value"))||c(d,"reference.attribute-value"))return;if(c(d,"attribute-value")){var f=n.getCurrentTokenColumn()+d.value.length;if(l.column<f)return;if(l.column==f){var y=n.stepForward();if(y&&c(y,"attribute-value"))return;n.stepBackward()}}if(/^\s*>/.test(o.getLine(l.row).slice(l.column)))return;for(;!c(d,"tag-name");)if(d=n.stepBackward(),d.value=="<"){d=n.stepForward();break}var _=n.getCurrentTokenRow(),v=n.getCurrentTokenColumn();if(c(n.stepBackward(),"end-tag-open"))return;var g=d.value;return _==l.row&&(g=g.substring(0,l.column-v)),this.voidElements&&this.voidElements.hasOwnProperty(g.toLowerCase())?void 0:{text:"></"+g+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,i,r,o,s){if(s==`
1112
- `){var l=r.getCursorPosition(),n=o.getLine(l.row),d=new p(o,l.row,l.column),f=d.getCurrentToken();if(c(f,"")&&f.type.indexOf("tag-close")!==-1){if(f.value=="/>")return;for(;f&&f.type.indexOf("tag-name")===-1;)f=d.stepBackward();if(!f)return;var y=f.value,_=d.getCurrentTokenRow();if(f=d.stepBackward(),!f||f.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[y]||!this.voidElements){var v=o.getTokenAt(l.row,l.column+1),n=o.getLine(_),g=this.$getIndent(n),w=g+o.getTabString();return v&&v.value==="</"?{text:`
1113
- `+w+`
1114
- `+g,selection:[1,w.length,1,w.length]}:{text:`
1115
- `+w}}}}})};R.inherits(h,x),D.XmlBehaviour=h}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function($,D,V){var R=$("../../lib/oop"),x=$("../../token_iterator").TokenIterator,p=$("../behaviour/cstyle").CstyleBehaviour,c=$("../behaviour/xml").XmlBehaviour,h=function(){var a=new c({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(p),this.add("autoclosing-fragment","insertion",function(i,r,o,s,l){if(l==">"){var n=o.getSelectionRange().start,d=new x(s,n.row,n.column),f=d.getCurrentToken()||d.stepBackward();if(!f)return;if(f.value=="<")return{text:"></>",selection:[1,1]}}})};R.inherits(h,p),D.JavaScriptBehaviour=h}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function($,D,V){var R=$("../../lib/oop"),x=$("../../range").Range,p=$("./fold_mode").FoldMode,c=D.FoldMode=function(i,r){p.call(this),this.voidElements=i||{},this.optionalEndTags=R.mixin({},this.voidElements),r&&R.mixin(this.optionalEndTags,r)};R.inherits(c,p);var h=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function a(i,r){return i&&i.type&&i.type.lastIndexOf(r+".xml")>-1}(function(){this.getFoldWidget=function(i,r,o){var s=this._getFirstTagInLine(i,o);return s?s.closing||!s.tagName&&s.selfClosing?r==="markbeginend"?"end":"":!s.tagName||s.selfClosing||this.voidElements.hasOwnProperty(s.tagName.toLowerCase())||this._findEndTagInLine(i,o,s.tagName,s.end.column)?"":"start":this.getCommentFoldWidget(i,o)},this.getCommentFoldWidget=function(i,r){return/comment/.test(i.getState(r))&&/<!-/.test(i.getLine(r))?"start":""},this._getFirstTagInLine=function(i,r){for(var o=i.getTokens(r),s=new h,l=0;l<o.length;l++){var n=o[l];if(a(n,"tag-open")){if(s.end.column=s.start.column+n.value.length,s.closing=a(n,"end-tag-open"),n=o[++l],!n)return null;if(s.tagName=n.value,n.value===""){if(n=o[++l],!n)return null;s.tagName=n.value}for(s.end.column+=n.value.length,l++;l<o.length;l++)if(n=o[l],s.end.column+=n.value.length,a(n,"tag-close")){s.selfClosing=n.value=="/>";break}return s}else if(a(n,"tag-close"))return s.selfClosing=n.value=="/>",s;s.start.column+=n.value.length}return null},this._findEndTagInLine=function(i,r,o,s){for(var l=i.getTokens(r),n=0,d=0;d<l.length;d++){var f=l[d];if(n+=f.value.length,!(n<s-1)&&a(f,"end-tag-open")&&(f=l[d+1],a(f,"tag-name")&&f.value===""&&(f=l[d+2]),f&&f.value==o))return!0}return!1},this.getFoldWidgetRange=function(i,r,o){var s=this._getFirstTagInLine(i,o);if(!s)return this.getCommentFoldWidget(i,o)&&i.getCommentFoldRange(o,i.getLine(o).length);var l=i.getMatchingTags({row:o,column:0});if(l)return new x(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.closeTag.start.column)}}).call(c.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function($,D,V){var R=$("../../lib/oop"),x=$("../../range").Range,p=$("./fold_mode").FoldMode,c=D.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end)))};R.inherits(c,p),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,a,i){var r=h.getLine(i);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(h,a,i);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(h,a,i,r){var o=h.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(h,o,i);var n=o.match(this.foldingStartMarker);if(n){var s=n.index;if(n[1])return this.openingBracketBlock(h,n[1],i,s);var l=h.getCommentFoldRange(i,s+n[0].length,1);return l&&!l.isMultiLine()&&(r?l=this.getSectionRange(h,i):a!="all"&&(l=null)),l}if(a!=="markbegin"){var n=o.match(this.foldingStopMarker);if(n){var s=n.index+n[0].length;return n[1]?this.closingBracketBlock(h,n[1],i,s):h.getCommentFoldRange(i,s,-1)}}},this.getSectionRange=function(h,a){var i=h.getLine(a),r=i.search(/\S/),o=a,s=i.length;a=a+1;for(var l=a,n=h.getLength();++a<n;){i=h.getLine(a);var d=i.search(/\S/);if(d!==-1){if(r>d)break;var f=this.getFoldWidgetRange(h,"all",a);if(f){if(f.start.row<=o)break;if(f.isMultiLine())a=f.end.row;else if(r==d)break}l=a}}return new x(o,s,l,h.getLine(l).length)},this.getCommentRegionBlock=function(h,a,i){for(var r=a.search(/\s*$/),o=h.getLength(),s=i,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,n=1;++i<o;){a=h.getLine(i);var d=l.exec(a);if(d&&(d[1]?n--:n++,!n))break}var f=i;if(f>s)return new x(s,r,f,a.length)}}).call(c.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function($,D,V){var R=$("../../lib/oop"),x=$("./xml").FoldMode,p=$("./cstyle").FoldMode,c=D.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end))),this.xmlFoldMode=new x};R.inherits(c,p),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,a,i){var r=this.getFoldWidgetBase(h,a,i);return r||this.xmlFoldMode.getFoldWidget(h,a,i)},this.getFoldWidgetRange=function(h,a,i,r){var o=this.getFoldWidgetRangeBase(h,a,i,r);return o||this.xmlFoldMode.getFoldWidgetRange(h,a,i)}}).call(c.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function($,D,V){var R=$("../lib/oop"),x=$("./text").Mode,p=$("./javascript_highlight_rules").JavaScriptHighlightRules,c=$("./matching_brace_outdent").MatchingBraceOutdent,h=$("../worker/worker_client").WorkerClient,a=$("./behaviour/javascript").JavaScriptBehaviour,i=$("./folding/javascript").FoldMode,r=function(){this.HighlightRules=p,this.$outdent=new c,this.$behaviour=new a,this.foldingRules=new i};R.inherits(r,x),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(o,s,l){var n=this.$getIndent(s),d=this.getTokenizer().getLineTokens(s,o),f=d.tokens,y=d.state;if(f.length&&f[f.length-1].type=="comment")return n;if(o=="start"||o=="no_regex"){var _=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);_&&(n+=l)}else if(o=="doc-start"&&(y=="start"||y=="no_regex"))return"";return n},this.checkOutdent=function(o,s,l){return this.$outdent.checkOutdent(s,l)},this.autoOutdent=function(o,s,l){this.$outdent.autoOutdent(s,l)},this.createWorker=function(o){var s=new h(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(o.getDocument()),s.on("annotate",function(l){o.setAnnotations(l.data)}),s.on("terminate",function(){o.clearAnnotations()}),s},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(r.prototype),D.Mode=r}),ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function($,D,V){var R=$("../lib/oop"),x=$("./javascript_highlight_rules").JavaScriptHighlightRules,p=function(c){var h=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_¡-￿][a-zA-Z0-9d$_¡-￿]*)"},{token:"keyword",regex:"(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)"},{token:["keyword","storage.type.variable.ts"],regex:"(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)"},{token:"keyword",regex:"\\b(?:super|export|import|keyof|infer)\\b"},{token:["storage.type.variable.ts"],regex:"(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))"}],a=new x({jsx:(c&&c.jsx)==!0}).getRules();a.no_regex=h.concat(a.no_regex),this.$rules=a};R.inherits(p,x),D.TypeScriptHighlightRules=p}),ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function($,D,V){var R=$("../lib/oop"),x=$("./javascript").Mode,p=$("./typescript_highlight_rules").TypeScriptHighlightRules,c=$("./folding/cstyle").FoldMode,h=$("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.HighlightRules=p,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new c};R.inherits(a,x),(function(){this.createWorker=function(i){return null},this.$id="ace/mode/typescript"}).call(a.prototype),D.Mode=a}),(function(){ace.require(["ace/mode/typescript"],function($){W&&(W.exports=$)})})()})(ou)),ou.exports}y0();var au={exports:{}},kp;function _0(){return kp||(kp=1,(function(W,G){ace.define("ace/theme/monokai-css",["require","exports","module"],function($,D,V){V.exports=`.ace-monokai .ace_gutter {
1116
- background: #2F3129;
1117
- color: #8F908A
1118
- }
1119
-
1120
- .ace-monokai .ace_print-margin {
1121
- width: 1px;
1122
- background: #555651
1123
- }
1124
-
1125
- .ace-monokai {
1126
- background-color: #272822;
1127
- color: #F8F8F2
1128
- }
1129
-
1130
- .ace-monokai .ace_cursor {
1131
- color: #F8F8F0
1132
- }
1133
-
1134
- .ace-monokai .ace_marker-layer .ace_selection {
1135
- background: #49483E
1136
- }
1137
-
1138
- .ace-monokai.ace_multiselect .ace_selection.ace_start {
1139
- box-shadow: 0 0 3px 0px #272822;
1140
- }
1141
-
1142
- .ace-monokai .ace_marker-layer .ace_step {
1143
- background: rgb(102, 82, 0)
1144
- }
1145
-
1146
- .ace-monokai .ace_marker-layer .ace_bracket {
1147
- margin: -1px 0 0 -1px;
1148
- border: 1px solid #49483E
1149
- }
1150
-
1151
- .ace-monokai .ace_marker-layer .ace_active-line {
1152
- background: #202020
1153
- }
1154
-
1155
- .ace-monokai .ace_gutter-active-line {
1156
- background-color: #272727
1157
- }
1158
-
1159
- .ace-monokai .ace_marker-layer .ace_selected-word {
1160
- border: 1px solid #49483E
1161
- }
1162
-
1163
- .ace-monokai .ace_invisible {
1164
- color: #52524d
1165
- }
1166
-
1167
- .ace-monokai .ace_entity.ace_name.ace_tag,
1168
- .ace-monokai .ace_keyword,
1169
- .ace-monokai .ace_meta.ace_tag,
1170
- .ace-monokai .ace_storage {
1171
- color: #F92672
1172
- }
1173
-
1174
- .ace-monokai .ace_punctuation,
1175
- .ace-monokai .ace_punctuation.ace_tag {
1176
- color: #fff
1177
- }
1178
-
1179
- .ace-monokai .ace_constant.ace_character,
1180
- .ace-monokai .ace_constant.ace_language,
1181
- .ace-monokai .ace_constant.ace_numeric,
1182
- .ace-monokai .ace_constant.ace_other {
1183
- color: #AE81FF
1184
- }
1185
-
1186
- .ace-monokai .ace_invalid {
1187
- color: #F8F8F0;
1188
- background-color: #F92672
1189
- }
1190
-
1191
- .ace-monokai .ace_invalid.ace_deprecated {
1192
- color: #F8F8F0;
1193
- background-color: #AE81FF
1194
- }
1195
-
1196
- .ace-monokai .ace_support.ace_constant,
1197
- .ace-monokai .ace_support.ace_function {
1198
- color: #66D9EF
1199
- }
1200
-
1201
- .ace-monokai .ace_fold {
1202
- background-color: #A6E22E;
1203
- border-color: #F8F8F2
1204
- }
1205
-
1206
- .ace-monokai .ace_storage.ace_type,
1207
- .ace-monokai .ace_support.ace_class,
1208
- .ace-monokai .ace_support.ace_type {
1209
- font-style: italic;
1210
- color: #66D9EF
1211
- }
1212
-
1213
- .ace-monokai .ace_entity.ace_name.ace_function,
1214
- .ace-monokai .ace_entity.ace_other,
1215
- .ace-monokai .ace_entity.ace_other.ace_attribute-name,
1216
- .ace-monokai .ace_variable {
1217
- color: #A6E22E
1218
- }
1219
-
1220
- .ace-monokai .ace_variable.ace_parameter {
1221
- font-style: italic;
1222
- color: #FD971F
1223
- }
1224
-
1225
- .ace-monokai .ace_string {
1226
- color: #E6DB74
1227
- }
1228
-
1229
- .ace-monokai .ace_comment {
1230
- color: #75715E
1231
- }
1232
-
1233
- .ace-monokai .ace_indent-guide {
1234
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y
1235
- }
1236
-
1237
- .ace-monokai .ace_indent-guide-active {
1238
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1239
- }
1240
- `}),ace.define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"],function($,D,V){D.isDark=!0,D.cssClass="ace-monokai",D.cssText=$("./monokai-css");var R=$("../lib/dom");R.importCssString(D.cssText,D.cssClass,!1)}),(function(){ace.require(["ace/theme/monokai"],function($){W&&(W.exports=$)})})()})(au)),au.exports}_0();var lu={exports:{}},Tp;function b0(){return Tp||(Tp=1,(function(W,G){ace.define("ace/theme/github-css",["require","exports","module"],function($,D,V){V.exports=`/* CSS style content from github's default pygments highlighter template.
1241
- Cursor and selection styles from textmate.css. */
1242
- .ace-github .ace_gutter {
1243
- background: #e8e8e8;
1244
- color: #AAA;
1245
- }
1246
-
1247
- .ace-github {
1248
- background: #fff;
1249
- color: #000;
1250
- }
1251
-
1252
- .ace-github .ace_keyword {
1253
- font-weight: bold;
1254
- }
1255
-
1256
- .ace-github .ace_string {
1257
- color: #D14;
1258
- }
1259
-
1260
- .ace-github .ace_variable.ace_class {
1261
- color: teal;
1262
- }
1263
-
1264
- .ace-github .ace_constant.ace_numeric {
1265
- color: #099;
1266
- }
1267
-
1268
- .ace-github .ace_constant.ace_buildin {
1269
- color: #0086B3;
1270
- }
1271
-
1272
- .ace-github .ace_support.ace_function {
1273
- color: #0086B3;
1274
- }
1275
-
1276
- .ace-github .ace_comment {
1277
- color: #998;
1278
- font-style: italic;
1279
- }
1280
-
1281
- .ace-github .ace_variable.ace_language {
1282
- color: #0086B3;
1283
- }
1284
-
1285
- .ace-github .ace_paren {
1286
- font-weight: bold;
1287
- }
1288
-
1289
- .ace-github .ace_boolean {
1290
- font-weight: bold;
1291
- }
1292
-
1293
- .ace-github .ace_string.ace_regexp {
1294
- color: #009926;
1295
- font-weight: normal;
1296
- }
1297
-
1298
- .ace-github .ace_variable.ace_instance {
1299
- color: teal;
1300
- }
1301
-
1302
- .ace-github .ace_constant.ace_language {
1303
- font-weight: bold;
1304
- }
1305
-
1306
- .ace-github .ace_cursor {
1307
- color: black;
1308
- }
1309
-
1310
- .ace-github.ace_focus .ace_marker-layer .ace_active-line {
1311
- background: rgb(255, 255, 204);
1312
- }
1313
- .ace-github .ace_marker-layer .ace_active-line {
1314
- background: rgb(245, 245, 245);
1315
- }
1316
-
1317
- .ace-github .ace_marker-layer .ace_selection {
1318
- background: rgb(181, 213, 255);
1319
- }
1320
-
1321
- .ace-github.ace_multiselect .ace_selection.ace_start {
1322
- box-shadow: 0 0 3px 0px white;
1323
- }
1324
- /* bold keywords cause cursor issues for some fonts */
1325
- /* this disables bold style for editor and keeps for static highlighter */
1326
- .ace-github.ace_nobold .ace_line > span {
1327
- font-weight: normal !important;
1328
- }
1329
-
1330
- .ace-github .ace_marker-layer .ace_step {
1331
- background: rgb(252, 255, 0);
1332
- }
1333
-
1334
- .ace-github .ace_marker-layer .ace_stack {
1335
- background: rgb(164, 229, 101);
1336
- }
1337
-
1338
- .ace-github .ace_marker-layer .ace_bracket {
1339
- margin: -1px 0 0 -1px;
1340
- border: 1px solid rgb(192, 192, 192);
1341
- }
1342
-
1343
- .ace-github .ace_gutter-active-line {
1344
- background-color : rgba(0, 0, 0, 0.07);
1345
- }
1346
-
1347
- .ace-github .ace_marker-layer .ace_selected-word {
1348
- background: rgb(250, 250, 255);
1349
- border: 1px solid rgb(200, 200, 250);
1350
- }
1351
-
1352
- .ace-github .ace_invisible {
1353
- color: #BFBFBF
1354
- }
1355
-
1356
- .ace-github .ace_print-margin {
1357
- width: 1px;
1358
- background: #e8e8e8;
1359
- }
1360
-
1361
- .ace-github .ace_indent-guide {
1362
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
1363
- }
1364
-
1365
- .ace-github .ace_indent-guide-active {
1366
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
1367
- }
1368
- `}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function($,D,V){D.isDark=!1,D.cssClass="ace-github",D.cssText=$("./github-css");var R=$("../lib/dom");R.importCssString(D.cssText,D.cssClass,!1)}),(function(){ace.require(["ace/theme/github"],function($){W&&(W.exports=$)})})()})(lu)),lu.exports}b0();var cu={exports:{}},Lp;function w0(){return Lp||(Lp=1,(function(W,G){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function($,D,V){var R=$("./lib/dom"),x=$("./lib/oop"),p=$("./lib/event_emitter").EventEmitter,c=$("./lib/lang"),h=$("./range").Range,a=$("./range_list").RangeList,i=$("./keyboard/hash_handler").HashHandler,r=$("./tokenizer").Tokenizer,o=$("./clipboard"),s={CURRENT_WORD:function(g){return g.session.getTextRange(g.session.getWordRange())},SELECTION:function(g,w,b){var S=g.session.getTextRange();return b?S.replace(/\n\r?([ \t]*\S)/g,`
1369
- `+b+"$1"):S},CURRENT_LINE:function(g){return g.session.getLine(g.getCursorPosition().row)},PREV_LINE:function(g){return g.session.getLine(g.getCursorPosition().row-1)},LINE_INDEX:function(g){return g.getCursorPosition().row},LINE_NUMBER:function(g){return g.getCursorPosition().row+1},SOFT_TABS:function(g){return g.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(g){return g.session.getTabSize()},CLIPBOARD:function(g){return o.getText&&o.getText()},FILENAME:function(g){return/[^/\\]*$/.exec(this.FILEPATH(g))[0]},FILENAME_BASE:function(g){return/[^/\\]*$/.exec(this.FILEPATH(g))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(g){return this.FILEPATH(g).replace(/[^/\\]*$/,"")},FILEPATH:function(g){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(g){var w=g.session.$mode||{};return w.blockComment&&w.blockComment.start||""},BLOCK_COMMENT_END:function(g){var w=g.session.$mode||{};return w.blockComment&&w.blockComment.end||""},LINE_COMMENT:function(g){var w=g.session.$mode||{};return w.lineCommentStart||""},CURRENT_YEAR:l.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:l.bind(null,{year:"2-digit"}),CURRENT_MONTH:l.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:l.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:l.bind(null,{month:"short"}),CURRENT_DATE:l.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:l.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:l.bind(null,{weekday:"short"}),CURRENT_HOUR:l.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:l.bind(null,{minute:"2-digit"}),CURRENT_SECOND:l.bind(null,{second:"2-digit"})};s.SELECTED_TEXT=s.SELECTION;function l(g){var w=new Date().toLocaleString("en-us",g);return w.length==1?"0"+w:w}var n=(function(){function g(){this.snippetMap={},this.snippetNameMap={},this.variables=s}return g.prototype.getTokenizer=function(){return g.$tokenizer||this.createTokenizer()},g.prototype.createTokenizer=function(){function w(T){return T=T.substr(1),/^\d+$/.test(T)?[{tabstopId:parseInt(T,10)}]:[{text:T}]}function b(T){return"(?:[^\\\\"+T+"]|\\\\.)"}var S={regex:"/("+b("/")+"+)/",onMatch:function(T,j,E){var A=E[0];return A.fmtString=!0,A.guard=T.slice(1,-1),A.flag="",""},next:"formatString"};return g.$tokenizer=new r({start:[{regex:/\\./,onMatch:function(T,j,E){var A=T[1];return(A=="}"&&E.length||"`$\\".indexOf(A)!=-1)&&(T=A),[T]}},{regex:/}/,onMatch:function(T,j,E){return[E.length?E.shift():T]}},{regex:/\$(?:\d+|\w+)/,onMatch:w},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(T,j,E){var A=w(T.substr(1));return E.unshift(A[0]),A},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+b("\\|")+"*\\|",onMatch:function(T,j,E){var A=T.slice(1,-1).replace(/\\[,|\\]|,/g,function(M){return M.length==2?M[1]:"\0"}).split("\0").map(function(M){return{value:M}});return E[0].choices=A,[A[0]]},next:"start"},S,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(T,j,E){return E.length&&E[0].expectElse?(E[0].expectElse=!1,E[0].ifEnd={elseEnd:E[0]},[E[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(T,j,E){var A=T[1];return A=="}"&&E.length||"`$\\".indexOf(A)!=-1?T=A:A=="n"?T=`
1370
- `:A=="t"?T=" ":"ulULE".indexOf(A)!=-1&&(T={changeCase:A,local:A>"a"}),[T]}},{regex:"/\\w*}",onMatch:function(T,j,E){var A=E.shift();return A&&(A.flag=T.slice(1,-1)),this.next=A&&A.tabstopId?"start":"",[A||T]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(T,j,E){return[{text:T.slice(1)}]}},{regex:/\${\w+/,onMatch:function(T,j,E){var A={text:T.slice(2)};return E.unshift(A),[A]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(T,j,E){var A=E.shift();return this.next=A&&A.tabstopId?"start":"",[A||T]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(T,j,E){var A=E[0];return A.formatFunction=T.slice(2,-1),[E.shift()]},next:"formatString"},S,{regex:/:[\?\-+]?/,onMatch:function(T,j,E){T[1]=="+"&&(E[0].ifEnd=E[0]),T[1]=="?"&&(E[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),g.$tokenizer},g.prototype.tokenizeTmSnippet=function(w,b){return this.getTokenizer().getLineTokens(w,b).tokens.map(function(S){return S.value||S})},g.prototype.getVariableValue=function(w,b,S){if(/^\d+$/.test(b))return(this.variables.__||{})[b]||"";if(/^[A-Z]\d+$/.test(b))return(this.variables[b[0]+"__"]||{})[b.substr(1)]||"";if(b=b.replace(/^TM_/,""),!this.variables.hasOwnProperty(b))return"";var T=this.variables[b];return typeof T=="function"&&(T=this.variables[b](w,b,S)),T??""},g.prototype.tmStrFormat=function(w,b,S){if(!b.fmt)return w;var T=b.flag||"",j=b.guard;j=new RegExp(j,T.replace(/[^gim]/g,""));var E=typeof b.fmt=="string"?this.tokenizeTmSnippet(b.fmt,"formatString"):b.fmt,A=this,M=w.replace(j,function(){var C=A.variables.__;A.variables.__=[].slice.call(arguments);for(var L=A.resolveVariables(E,S),I="E",O=0;O<L.length;O++){var z=L[O];if(typeof z=="object")if(L[O]="",z.changeCase&&z.local){var F=L[O+1];F&&typeof F=="string"&&(z.changeCase=="u"?L[O]=F[0].toUpperCase():L[O]=F[0].toLowerCase(),L[O+1]=F.substr(1))}else z.changeCase&&(I=z.changeCase);else I=="U"?L[O]=z.toUpperCase():I=="L"&&(L[O]=z.toLowerCase())}return A.variables.__=C,L.join("")});return M},g.prototype.tmFormatFunction=function(w,b,S){return b.formatFunction=="upcase"?w.toUpperCase():b.formatFunction=="downcase"?w.toLowerCase():w},g.prototype.resolveVariables=function(w,b){for(var S=[],T="",j=!0,E=0;E<w.length;E++){var A=w[E];if(typeof A=="string"){S.push(A),A==`
1371
- `?(j=!0,T=""):j&&(T=/^\t*/.exec(A)[0],j=/\S/.test(A));continue}if(A){if(j=!1,A.fmtString){var M=w.indexOf(A,E+1);M==-1&&(M=w.length),A.fmt=w.slice(E+1,M),E=M}if(A.text){var C=this.getVariableValue(b,A.text,T)+"";A.fmtString&&(C=this.tmStrFormat(C,A,b)),A.formatFunction&&(C=this.tmFormatFunction(C,A,b)),C&&!A.ifEnd?(S.push(C),L(A)):!C&&A.ifEnd&&L(A.ifEnd)}else A.elseEnd?L(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&S.push(A)}}function L(I){var O=w.indexOf(I,E+1);O!=-1&&(E=O)}return S},g.prototype.getDisplayTextForSnippet=function(w,b){var S=d.call(this,w,b);return S.text},g.prototype.insertSnippetForSelection=function(w,b,S){S===void 0&&(S={});var T=d.call(this,w,b,S),j=w.getSelectionRange(),E=w.session.replace(j,T.text),A=new f(w),M=w.inVirtualSelectionMode&&w.selection.index;A.addTabstops(T.tabstops,j.start,E,M)},g.prototype.insertSnippet=function(w,b,S){S===void 0&&(S={});var T=this;if(w.inVirtualSelectionMode)return T.insertSnippetForSelection(w,b,S);w.forEachSelection(function(){T.insertSnippetForSelection(w,b,S)},null,{keepOrder:!0}),w.tabstopManager&&w.tabstopManager.tabNext()},g.prototype.$getScope=function(w){var b=w.session.$mode.$id||"";if(b=b.split("/").pop(),b==="html"||b==="php"){b==="php"&&!w.session.$mode.inlinePhp&&(b="html");var S=w.getCursorPosition(),T=w.session.getState(S.row);typeof T=="object"&&(T=T[0]),T.substring&&(T.substring(0,3)=="js-"?b="javascript":T.substring(0,4)=="css-"?b="css":T.substring(0,4)=="php-"&&(b="php"))}return b},g.prototype.getActiveScopes=function(w){var b=this.$getScope(w),S=[b],T=this.snippetMap;return T[b]&&T[b].includeScopes&&S.push.apply(S,T[b].includeScopes),S.push("_"),S},g.prototype.expandWithTab=function(w,b){var S=this,T=w.forEachSelection(function(){return S.expandSnippetForSelection(w,b)},null,{keepOrder:!0});return T&&w.tabstopManager&&w.tabstopManager.tabNext(),T},g.prototype.expandSnippetForSelection=function(w,b){var S=w.getCursorPosition(),T=w.session.getLine(S.row),j=T.substring(0,S.column),E=T.substr(S.column),A=this.snippetMap,M;return this.getActiveScopes(w).some(function(C){var L=A[C];return L&&(M=this.findMatchingSnippet(L,j,E)),!!M},this),M?(b&&b.dryRun||(w.session.doc.removeInLine(S.row,S.column-M.replaceBefore.length,S.column+M.replaceAfter.length),this.variables.M__=M.matchBefore,this.variables.T__=M.matchAfter,this.insertSnippetForSelection(w,M.content),this.variables.M__=this.variables.T__=null),!0):!1},g.prototype.findMatchingSnippet=function(w,b,S){for(var T=w.length;T--;){var j=w[T];if(!(j.startRe&&!j.startRe.test(b))&&!(j.endRe&&!j.endRe.test(S))&&!(!j.startRe&&!j.endRe))return j.matchBefore=j.startRe?j.startRe.exec(b):[""],j.matchAfter=j.endRe?j.endRe.exec(S):[""],j.replaceBefore=j.triggerRe?j.triggerRe.exec(b)[0]:"",j.replaceAfter=j.endTriggerRe?j.endTriggerRe.exec(S)[0]:"",j}},g.prototype.register=function(w,b){var S=this.snippetMap,T=this.snippetNameMap,j=this;w||(w=[]);function E(C){return C&&!/^\^?\(.*\)\$?$|^\\b$/.test(C)&&(C="(?:"+C+")"),C||""}function A(C,L,I){return C=E(C),L=E(L),C=L+C,C&&C[C.length-1]!="$"&&(C=C+"$"),new RegExp(C)}function M(C){C.scope||(C.scope=b||"_"),b=C.scope,S[b]||(S[b]=[],T[b]={});var L=T[b];if(C.name){var I=L[C.name];I&&j.unregister(I),L[C.name]=C}S[b].push(C),C.prefix&&(C.tabTrigger=C.prefix),!C.content&&C.body&&(C.content=Array.isArray(C.body)?C.body.join(`
1372
- `):C.body),C.tabTrigger&&!C.trigger&&(!C.guard&&/^\w/.test(C.tabTrigger)&&(C.guard="\\b"),C.trigger=c.escapeRegExp(C.tabTrigger)),!(!C.trigger&&!C.guard&&!C.endTrigger&&!C.endGuard)&&(C.startRe=A(C.trigger,C.guard),C.triggerRe=new RegExp(C.trigger),C.endRe=A(C.endTrigger,C.endGuard),C.endTriggerRe=new RegExp(C.endTrigger))}Array.isArray(w)?w.forEach(M):Object.keys(w).forEach(function(C){M(w[C])}),this._signal("registerSnippets",{scope:b})},g.prototype.unregister=function(w,b){var S=this.snippetMap,T=this.snippetNameMap;function j(E){var A=T[E.scope||b];if(A&&A[E.name]){delete A[E.name];var M=S[E.scope||b],C=M&&M.indexOf(E);C>=0&&M.splice(C,1)}}w.content?j(w):Array.isArray(w)&&w.forEach(j)},g.prototype.parseSnippetFile=function(w){w=w.replace(/\r/g,"");for(var b=[],S={},T=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,j;j=T.exec(w);){if(j[1])try{S=JSON.parse(j[1]),b.push(S)}catch{}if(j[4])S.content=j[4].replace(/^\t/gm,""),b.push(S),S={};else{var E=j[2],A=j[3];if(E=="regex"){var M=/\/((?:[^\/\\]|\\.)*)|$/g;S.guard=M.exec(A)[1],S.trigger=M.exec(A)[1],S.endTrigger=M.exec(A)[1],S.endGuard=M.exec(A)[1]}else E=="snippet"?(S.tabTrigger=A.match(/^\S*/)[0],S.name||(S.name=A)):E&&(S[E]=A)}}return b},g.prototype.getSnippetByName=function(w,b){var S=this.snippetNameMap,T;return this.getActiveScopes(b).some(function(j){var E=S[j];return E&&(T=E[w]),!!T},this),T},g})();x.implement(n.prototype,p);var d=function(g,w,b){b===void 0&&(b={});var S=g.getCursorPosition(),T=g.session.getLine(S.row),j=g.session.getTabString(),E=T.match(/^\s*/)[0];S.column<E.length&&(E=E.slice(0,S.column)),w=w.replace(/\r/g,"");var A=this.tokenizeTmSnippet(w);A=this.resolveVariables(A,g),A=A.map(function(ee){return ee==`
1373
- `&&!b.excludeExtraIndent?ee+E:typeof ee=="string"?ee.replace(/\t/g,j):ee});var M=[];A.forEach(function(ee,U){if(typeof ee=="object"){var Z=ee.tabstopId,te=M[Z];if(te||(te=M[Z]=[],te.index=Z,te.value="",te.parents={}),te.indexOf(ee)===-1){ee.choices&&!te.choices&&(te.choices=ee.choices),te.push(ee);var ne=A.indexOf(ee,U+1);if(ne!==-1){var ve=A.slice(U+1,ne),ge=ve.some(function(xe){return typeof xe=="object"});ge&&!te.value?te.value=ve:ve.length&&(!te.value||typeof te.value!="string")&&(te.value=ve.join(""))}}}}),M.forEach(function(ee){ee.length=0});var C={};function L(ee){for(var U=[],Z=0;Z<ee.length;Z++){var te=ee[Z];if(typeof te=="object"){if(C[te.tabstopId])continue;var ne=ee.lastIndexOf(te,Z-1);te=U[ne]||{tabstopId:te.tabstopId}}U[Z]=te}return U}for(var I=0;I<A.length;I++){var O=A[I];if(typeof O=="object"){var z=O.tabstopId,F=M[z],H=A.indexOf(O,I+1);if(C[z]){C[z]===O&&(delete C[z],Object.keys(C).forEach(function(ee){F.parents[ee]=!0}));continue}C[z]=O;var Y=F.value;typeof Y!="string"?Y=L(Y):O.fmt&&(Y=this.tmStrFormat(Y,O,g)),A.splice.apply(A,[I+1,Math.max(0,H-I)].concat(Y,O)),F.indexOf(O)===-1&&F.push(O)}}var K=0,q=0,Q="";return A.forEach(function(ee){if(typeof ee=="string"){var U=ee.split(`
1374
- `);U.length>1?(q=U[U.length-1].length,K+=U.length-1):q+=ee.length,Q+=ee}else ee&&(ee.start?ee.end={row:K,column:q}:ee.start={row:K,column:q})}),{text:Q,tabstops:M,tokens:A}},f=(function(){function g(w){if(this.index=0,this.ranges=[],this.tabstops=[],w.tabstopManager)return w.tabstopManager;w.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=c.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(w)}return g.prototype.attach=function(w){this.$openTabstops=null,this.selectedTabstop=null,this.editor=w,this.session=w.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},g.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},g.prototype.onChange=function(w){for(var b=w.action[0]=="r",S=this.selectedTabstop||{},T=S.parents||{},j=this.tabstops.slice(),E=0;E<j.length;E++){var A=j[E],M=A==S||T[A.index];if(A.rangeList.$bias=M?0:1,w.action=="remove"&&A!==S){var C=A.parents&&A.parents[S.index],L=A.rangeList.pointIndex(w.start,C);L=L<0?-L-1:L+1;var I=A.rangeList.pointIndex(w.end,C);I=I<0?-I-1:I-1;for(var O=A.rangeList.ranges.slice(L,I),z=0;z<O.length;z++)this.removeRange(O[z])}A.rangeList.$onChange(w)}var F=this.session;!this.$inChange&&b&&F.getLength()==1&&!F.getValue()&&this.detach()},g.prototype.updateLinkedFields=function(){var w=this.selectedTabstop;if(!(!w||!w.hasLinkedRanges||!w.firstNonLinked)){this.$inChange=!0;for(var b=this.session,S=b.getTextRange(w.firstNonLinked),T=0;T<w.length;T++){var j=w[T];if(j.linked){var E=j.original,A=D.snippetManager.tmStrFormat(S,E,this.editor);b.replace(j,A)}}this.$inChange=!1}},g.prototype.onAfterExec=function(w){w.command&&!w.command.readOnly&&this.updateLinkedFields()},g.prototype.onChangeSelection=function(){if(this.editor){for(var w=this.editor.selection.lead,b=this.editor.selection.anchor,S=this.editor.selection.isEmpty(),T=0;T<this.ranges.length;T++)if(!this.ranges[T].linked){var j=this.ranges[T].contains(w.row,w.column),E=S||this.ranges[T].contains(b.row,b.column);if(j&&E)return}this.detach()}},g.prototype.onChangeSession=function(){this.detach()},g.prototype.tabNext=function(w){var b=this.tabstops.length,S=this.index+(w||1);S=Math.min(Math.max(S,1),b),S==b&&(S=0),this.selectTabstop(S),this.updateTabstopMarkers(),S===0&&this.detach()},g.prototype.selectTabstop=function(w){this.$openTabstops=null;var b=this.tabstops[this.index];if(b&&this.addTabstopMarkers(b),this.index=w,b=this.tabstops[this.index],!(!b||!b.length)){this.selectedTabstop=b;var S=b.firstNonLinked||b;if(b.choices&&(S.cursor=S.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(S);else{var T=this.editor.multiSelect;T.toSingleRange(S);for(var j=0;j<b.length;j++)b.hasLinkedRanges&&b[j].linked||T.addRange(b[j].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},g.prototype.addTabstops=function(w,b,S){var T=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!w[0]){var j=h.fromPoints(S,S);_(j.start,b),_(j.end,b),w[0]=[j],w[0].index=0}var E=this.index,A=[E+1,0],M=this.ranges,C=this.snippetId=(this.snippetId||0)+1;w.forEach(function(L,I){var O=this.$openTabstops[I]||L;O.snippetId=C;for(var z=0;z<L.length;z++){var F=L[z],H=h.fromPoints(F.start,F.end||F.start);y(H.start,b),y(H.end,b),H.original=F,H.tabstop=O,M.push(H),O!=L?O.unshift(H):O[z]=H,F.fmtString||O.firstNonLinked&&T?(H.linked=!0,O.hasLinkedRanges=!0):O.firstNonLinked||(O.firstNonLinked=H)}O.firstNonLinked||(O.hasLinkedRanges=!1),O===L&&(A.push(O),this.$openTabstops[I]=O),this.addTabstopMarkers(O),O.rangeList=O.rangeList||new a,O.rangeList.$bias=0,O.rangeList.addList(O)},this),A.length>2&&(this.tabstops.length&&A.push(A.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,A))},g.prototype.addTabstopMarkers=function(w){var b=this.session;w.forEach(function(S){S.markerId||(S.markerId=b.addMarker(S,"ace_snippet-marker","text"))})},g.prototype.removeTabstopMarkers=function(w){var b=this.session;w.forEach(function(S){b.removeMarker(S.markerId),S.markerId=null})},g.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var w=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&w--,this.tabstops.forEach(function(b){b.snippetId===w?this.addTabstopMarkers(b):this.removeTabstopMarkers(b)},this)}},g.prototype.removeRange=function(w){var b=w.tabstop.indexOf(w);b!=-1&&w.tabstop.splice(b,1),b=this.ranges.indexOf(w),b!=-1&&this.ranges.splice(b,1),b=w.tabstop.rangeList.ranges.indexOf(w),b!=-1&&w.tabstop.splice(b,1),this.session.removeMarker(w.markerId),w.tabstop.length||(b=this.tabstops.indexOf(w.tabstop),b!=-1&&this.tabstops.splice(b,1),this.tabstops.length||this.detach())},g})();f.prototype.keyboardHandler=new i,f.prototype.keyboardHandler.bindKeys({Tab:function(g){D.snippetManager&&D.snippetManager.expandWithTab(g)||(g.tabstopManager.tabNext(1),g.renderer.scrollCursorIntoView())},"Shift-Tab":function(g){g.tabstopManager.tabNext(-1),g.renderer.scrollCursorIntoView()},Esc:function(g){g.tabstopManager.detach()}});var y=function(g,w){g.row==0&&(g.column+=w.column),g.row+=w.row},_=function(g,w){g.row==w.row&&(g.column-=w.column),g.row-=w.row};R.importCssString(`
1375
- .ace_snippet-marker {
1376
- -moz-box-sizing: border-box;
1377
- box-sizing: border-box;
1378
- background: rgba(194, 193, 208, 0.09);
1379
- border: 1px dotted rgba(211, 208, 235, 0.62);
1380
- position: absolute;
1381
- }`,"snippets.css",!1),D.snippetManager=new n;var v=$("./editor").Editor;(function(){this.insertSnippet=function(g,w){return D.snippetManager.insertSnippet(this,g,w)},this.expandSnippet=function(g){return D.snippetManager.expandWithTab(this,g)}}).call(v.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function($,D,V){var R=$("../virtual_renderer").VirtualRenderer,x=$("../editor").Editor,p=$("../range").Range,c=$("../lib/event"),h=$("../lib/lang"),a=$("../lib/dom"),i=$("../config").nls,r=$("./../lib/useragent"),o=function(y){return"suggest-aria-id:".concat(y)},s=r.isSafari?"menu":"listbox",l=r.isSafari?"menuitem":"option",n=r.isSafari?"aria-current":"aria-selected",d=function(y){var _=new R(y);_.$maxLines=4;var v=new x(_);return v.setHighlightActiveLine(!1),v.setShowPrintMargin(!1),v.renderer.setShowGutter(!1),v.renderer.setHighlightGutterLine(!1),v.$mouseHandler.$focusTimeout=0,v.$highlightTagPending=!0,v},f=(function(){function y(_){var v=a.createElement("div"),g=d(v);_&&_.appendChild(v),v.style.display="none",g.renderer.content.style.cursor="default",g.renderer.setStyle("ace_autocomplete"),g.renderer.$textLayer.element.setAttribute("role",s),g.renderer.$textLayer.element.setAttribute("aria-roledescription",i("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),g.renderer.$textLayer.element.setAttribute("aria-label",i("autocomplete.popup.aria-label","Autocomplete suggestions")),g.renderer.textarea.setAttribute("aria-hidden","true"),g.setOption("displayIndentGuides",!1),g.setOption("dragDelay",150);var w=function(){};g.focus=w,g.$isFocused=!0,g.renderer.$cursorLayer.restartTimer=w,g.renderer.$cursorLayer.element.style.opacity="0",g.renderer.$maxLines=8,g.renderer.$keepTextAreaAtCursor=!1,g.setHighlightActiveLine(!1),g.session.highlight(""),g.session.$searchHighlight.clazz="ace_highlight-marker",g.on("mousedown",function(M){var C=M.getDocumentPosition();g.selection.moveToPosition(C),T.start.row=T.end.row=C.row,M.stop()});var b,S=new p(-1,0,-1,1/0),T=new p(-1,0,-1,1/0);T.id=g.session.addMarker(T,"ace_active-line","fullLine"),g.setSelectOnHover=function(M){M?S.id&&(g.session.removeMarker(S.id),S.id=null):S.id=g.session.addMarker(S,"ace_line-hover","fullLine")},g.setSelectOnHover(!1),g.on("mousemove",function(M){if(!b){b=M;return}if(!(b.x==M.x&&b.y==M.y)){b=M,b.scrollTop=g.renderer.scrollTop,g.isMouseOver=!0;var C=b.getDocumentPosition().row;S.start.row!=C&&(S.id||g.setRow(C),E(C))}}),g.renderer.on("beforeRender",function(){if(b&&S.start.row!=-1){b.$pos=null;var M=b.getDocumentPosition().row;S.id||g.setRow(M),E(M,!0)}}),g.renderer.on("afterRender",function(){for(var M=g.renderer.$textLayer,C=M.config.firstRow,L=M.config.lastRow;C<=L;C++){var I=M.element.childNodes[C-M.config.firstRow];I.setAttribute("role",l),I.setAttribute("aria-roledescription",i("autocomplete.popup.item.aria-roledescription","item")),I.setAttribute("aria-setsize",g.data.length),I.setAttribute("aria-describedby","doc-tooltip"),I.setAttribute("aria-posinset",C+1);var O=g.getData(C);if(O){var z="".concat(O.caption||O.value).concat(O.meta?", ".concat(O.meta):"");I.setAttribute("aria-label",z)}var F=I.querySelectorAll(".ace_completion-highlight");F.forEach(function(H){H.setAttribute("role","mark")})}}),g.renderer.on("afterRender",function(){var M=g.getRow(),C=g.renderer.$textLayer,L=C.element.childNodes[M-C.config.firstRow],I=document.activeElement;if(L!==g.selectedNode&&g.selectedNode&&(a.removeCssClass(g.selectedNode,"ace_selected"),g.selectedNode.removeAttribute(n),g.selectedNode.removeAttribute("id")),I.removeAttribute("aria-activedescendant"),g.selectedNode=L,L){var O=o(M);a.addCssClass(L,"ace_selected"),L.id=O,C.element.setAttribute("aria-activedescendant",O),I.setAttribute("aria-activedescendant",O),L.setAttribute(n,"true")}});var j=function(){E(-1)},E=function(M,C){M!==S.start.row&&(S.start.row=S.end.row=M,C||g.session._emit("changeBackMarker"),g._emit("changeHoverMarker"))};g.getHoveredRow=function(){return S.start.row},c.addListener(g.container,"mouseout",function(){g.isMouseOver=!1,j()}),g.on("hide",j),g.on("changeSelection",j),g.session.doc.getLength=function(){return g.data.length},g.session.doc.getLine=function(M){var C=g.data[M];return typeof C=="string"?C:C&&C.value||""};var A=g.session.bgTokenizer;return A.$tokenizeRow=function(M){var C=g.data[M],L=[];if(!C)return L;typeof C=="string"&&(C={value:C});var I=C.caption||C.value||C.name;function O(ee,U){ee&&L.push({type:(C.className||"")+(U||""),value:ee})}for(var z=I.toLowerCase(),F=(g.filterText||"").toLowerCase(),H=0,Y=0,K=0;K<=F.length;K++)if(K!=Y&&(C.matchMask&1<<K||K==F.length)){var q=F.slice(Y,K);Y=K;var Q=z.indexOf(q,H);if(Q==-1)continue;O(I.slice(H,Q),""),H=Q+q.length,O(I.slice(Q,H),"completion-highlight")}return O(I.slice(H,I.length),""),L.push({type:"completion-spacer",value:" "}),C.meta&&L.push({type:"completion-meta",value:C.meta}),C.message&&L.push({type:"completion-message",value:C.message}),L},A.$updateOnChange=w,A.start=w,g.session.$computeWidth=function(){return this.screenWidth=0},g.isOpen=!1,g.isTopdown=!1,g.autoSelect=!0,g.filterText="",g.isMouseOver=!1,g.data=[],g.setData=function(M,C){g.filterText=C||"",g.setValue(h.stringRepeat(`
1382
- `,M.length),-1),g.data=M||[],g.setRow(0)},g.getData=function(M){return g.data[M]},g.getRow=function(){return T.start.row},g.setRow=function(M){M=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,M)),T.start.row!=M&&(g.selection.clearSelection(),T.start.row=T.end.row=M||0,g.session._emit("changeBackMarker"),g.moveCursorTo(M||0,0),g.isOpen&&g._signal("select"))},g.on("changeSelection",function(){g.isOpen&&g.setRow(g.selection.lead.row),g.renderer.scrollCursorIntoView()}),g.hide=function(){this.container.style.display="none",g.anchorPos=null,g.anchor=null,g.isOpen&&(g.isOpen=!1,this._signal("hide"))},g.tryShow=function(M,C,L,I){if(!I&&g.isOpen&&g.anchorPos&&g.anchor&&g.anchorPos.top===M.top&&g.anchorPos.left===M.left&&g.anchor===L)return!0;var O=this.container,z=this.renderer.scrollBar.width||10,F=window.innerHeight-z,H=window.innerWidth-z,Y=this.renderer,K=Y.$maxLines*C*1.4,q={top:0,bottom:0},Q=F-M.top-3*this.$borderSize-C,ee=M.top-3*this.$borderSize;L||(ee<=Q||Q>=K?L="bottom":L="top"),L==="top"?(q.bottom=M.top-this.$borderSize,q.top=q.bottom-K):L==="bottom"&&(q.top=M.top+C+this.$borderSize,q.bottom=q.top+K);var U=q.top>=0&&q.bottom<=F;if(!I&&!U)return!1;U?Y.$maxPixelHeight=null:L==="top"?Y.$maxPixelHeight=ee:Y.$maxPixelHeight=Q,L==="top"?(O.style.top="",O.style.bottom=F+z-q.bottom+"px",g.isTopdown=!1):(O.style.top=q.top+"px",O.style.bottom="",g.isTopdown=!0),O.style.display="";var Z=M.left;return Z+O.offsetWidth>H&&(Z=H-O.offsetWidth),O.style.left=Z+"px",O.style.right="",a.$fixPositionBug(O),g.isOpen||(g.isOpen=!0,this._signal("show"),b=null),g.anchorPos=M,g.anchor=L,!0},g.show=function(M,C,L){this.tryShow(M,C,L?"bottom":void 0,!0)},g.goTo=function(M){var C=this.getRow(),L=this.session.getLength()-1;switch(M){case"up":C=C<=0?L:C-1;break;case"down":C=C>=L?-1:C+1;break;case"start":C=0;break;case"end":C=L;break}this.setRow(C)},g.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},g.$imageSize=0,g.$borderSize=1,g}return y})();a.importCssString(`
1383
- .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1384
- background-color: #CAD6FA;
1385
- z-index: 1;
1386
- }
1387
- .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1388
- background-color: #3a674e;
1389
- }
1390
- .ace_editor.ace_autocomplete .ace_line-hover {
1391
- border: 1px solid #abbffe;
1392
- margin-top: -1px;
1393
- background: rgba(233,233,253,0.4);
1394
- position: absolute;
1395
- z-index: 2;
1396
- }
1397
- .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1398
- border: 1px solid rgba(109, 150, 13, 0.8);
1399
- background: rgba(58, 103, 78, 0.62);
1400
- }
1401
- .ace_completion-meta {
1402
- opacity: 0.5;
1403
- margin-left: 0.9em;
1404
- }
1405
- .ace_completion-message {
1406
- margin-left: 0.9em;
1407
- color: blue;
1408
- }
1409
- .ace_editor.ace_autocomplete .ace_completion-highlight{
1410
- color: #2d69c7;
1411
- }
1412
- .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1413
- color: #93ca12;
1414
- }
1415
- .ace_editor.ace_autocomplete {
1416
- width: 300px;
1417
- z-index: 200000;
1418
- border: 1px lightgray solid;
1419
- position: fixed;
1420
- box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1421
- line-height: 1.4;
1422
- background: #fefefe;
1423
- color: #111;
1424
- }
1425
- .ace_dark.ace_editor.ace_autocomplete {
1426
- border: 1px #484747 solid;
1427
- box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1428
- line-height: 1.4;
1429
- background: #25282c;
1430
- color: #c1c1c1;
1431
- }
1432
- .ace_autocomplete .ace_text-layer {
1433
- width: calc(100% - 8px);
1434
- }
1435
- .ace_autocomplete .ace_line {
1436
- display: flex;
1437
- align-items: center;
1438
- }
1439
- .ace_autocomplete .ace_line > * {
1440
- min-width: 0;
1441
- flex: 0 0 auto;
1442
- }
1443
- .ace_autocomplete .ace_line .ace_ {
1444
- flex: 0 1 auto;
1445
- overflow: hidden;
1446
- text-overflow: ellipsis;
1447
- }
1448
- .ace_autocomplete .ace_completion-spacer {
1449
- flex: 1;
1450
- }
1451
- .ace_autocomplete.ace_loading:after {
1452
- content: "";
1453
- position: absolute;
1454
- top: 0px;
1455
- height: 2px;
1456
- width: 8%;
1457
- background: blue;
1458
- z-index: 100;
1459
- animation: ace_progress 3s infinite linear;
1460
- animation-delay: 300ms;
1461
- transform: translateX(-100%) scaleX(1);
1462
- }
1463
- @keyframes ace_progress {
1464
- 0% { transform: translateX(-100%) scaleX(1) }
1465
- 50% { transform: translateX(625%) scaleX(2) }
1466
- 100% { transform: translateX(1500%) scaleX(3) }
1467
- }
1468
- @media (prefers-reduced-motion) {
1469
- .ace_autocomplete.ace_loading:after {
1470
- transform: translateX(625%) scaleX(2);
1471
- animation: none;
1472
- }
1473
- }
1474
- `,"autocompletion.css",!1),D.AcePopup=f,D.$singleLineEditor=d,D.getAriaId=o}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function($,D,V){var R=(function(){function x(p){this.editor=p,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return x.prototype.setScreenReaderContent=function(p){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var h=this.popup.getRow(),a=this.popup.renderer.$textLayer,i=a.element.childNodes[h-a.config.firstRow];if(i){for(var r="doc-tooltip ",o=0;o<this._lines.length;o++)r+="ace-inline-screenreader-line-".concat(o," ");i.setAttribute("aria-describedby",r)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=p.split(/\r\n|\r|\n/);var c=this.createCodeBlock();this.screenReaderDiv.appendChild(c)},x.prototype.destroy=function(){this.screenReaderDiv.remove()},x.prototype.createCodeBlock=function(){var p=document.createElement("pre");p.setAttribute("id","ace-inline-screenreader");for(var c=0;c<this._lines.length;c++){var h=document.createElement("code");h.setAttribute("id","ace-inline-screenreader-line-".concat(c));var a=document.createTextNode(this._lines[c]);h.appendChild(a),p.appendChild(h)}return p},x})();D.AceInlineScreenReader=R}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function($,D,V){var R=$("../snippets").snippetManager,x=$("./inline_screenreader").AceInlineScreenReader,p=(function(){function c(){this.editor=null}return c.prototype.show=function(h,a,i){if(i=i||"",h&&this.editor&&this.editor!==h&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!h||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new x(h));var r=a.snippet?R.getDisplayTextForSnippet(h,a.snippet):a.value;return a.hideInlinePreview||!r||!r.startsWith(i)?!1:(this.editor=h,this.inlineScreenReader.setScreenReaderContent(r),r=r.slice(i.length),r===""?h.removeGhostText():h.setGhostText(r),!0)},c.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},c.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},c.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},c})();D.AceInline=p}),ace.define("ace/autocomplete/util",["require","exports","module"],function($,D,V){D.parForEach=function(x,p,c){var h=0,a=x.length;a===0&&c();for(var i=0;i<a;i++)p(x[i],function(r,o){h++,h===a&&c(r,o)})};var R=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;D.retrievePrecedingIdentifier=function(x,p,c){c=c||R;for(var h=[],a=p-1;a>=0&&c.test(x[a]);a--)h.push(x[a]);return h.reverse().join("")},D.retrieveFollowingIdentifier=function(x,p,c){c=c||R;for(var h=[],a=p;a<x.length&&c.test(x[a]);a++)h.push(x[a]);return h},D.getCompletionPrefix=function(x){var p=x.getCursorPosition(),c=x.session.getLine(p.row),h;return x.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(i){!h&&i&&(h=this.retrievePrecedingIdentifier(c,p.column,i))}).bind(this))}).bind(this)),h||this.retrievePrecedingIdentifier(c,p.column)},D.triggerAutocomplete=function(x,c){var c=c??x.session.getPrecedingCharacter();return x.completers.some(function(h){if(h.triggerCharacters&&Array.isArray(h.triggerCharacters))return h.triggerCharacters.includes(c)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function($,D,V){var R=$("./keyboard/hash_handler").HashHandler,x=$("./autocomplete/popup").AcePopup,p=$("./autocomplete/inline").AceInline,c=$("./autocomplete/popup").getAriaId,h=$("./autocomplete/util"),a=$("./lib/lang"),i=$("./lib/dom"),r=$("./snippets").snippetManager,o=$("./config"),s=$("./lib/event"),l=$("./lib/scroll").preventParentScroll,n=function(_,v){v.completer&&v.completer.destroy()},d=(function(){function _(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new R,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=a.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=a.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=a.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=a.delayedCall((function(){var v=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!v||this.editor.completers.length===0||(this.completions=new y(_.completionsForLoading),this.openPopup(this.editor,v.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(_,"completionsForLoading",{get:function(){return[{caption:o.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),_.prototype.$init=function(){return this.popup=new x(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(v){this.insertMatch(),v.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),s.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},_.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new p,this.inlineRenderer},_.prototype.getPopup=function(){return this.popup||this.$init()},_.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},_.prototype.$seen=function(v){!this.hasSeen.has(v)&&v&&v.completer&&v.completer.onSeen&&typeof v.completer.onSeen=="function"&&(v.completer.onSeen(this.editor,v),this.hasSeen.add(v))},_.prototype.$onPopupChange=function(v){if(this.inlineRenderer&&this.inlineEnabled){var g=v?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(g),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},_.prototype.$updateGhostText=function(v){var g=this.base.row,w=this.base.column,b=this.editor.getCursorPosition().column,S=this.editor.session.getLine(g).slice(w,b);this.inlineRenderer.show(this.editor,v,S)?this.$seen(v):this.inlineRenderer.hide()},_.prototype.$onPopupRender=function(){var v=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var g=this.popup.getFirstVisibleRow();g<=this.popup.getLastVisibleRow();g++){var w=this.popup.getData(g);w&&(!v||w.hideInlinePreview)&&this.$seen(w)}},_.prototype.$onPopupShow=function(v){this.$onPopupChange(v),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},_.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var v=this.editor.container.parentNode,g=[];v;)g.push(v),v.addEventListener("scroll",this.onLayoutChange,{passive:!0}),v=v.parentNode;this.$elements=g}},_.prototype.unObserveLayoutChanges=function(){var v=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(g){g.removeEventListener("scroll",v.onLayoutChange,{passive:!0})}),this.$elements=null},_.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},_.prototype.$updatePopupPosition=function(){var v=this.editor,g=v.renderer,w=g.layerConfig.lineHeight,b=g.$cursorLayer.getPixelPosition(this.base,!0);b.left-=this.popup.getTextLeftOffset();var S=v.container.getBoundingClientRect();b.top+=S.top-g.layerConfig.offset,b.left+=S.left-v.renderer.scrollLeft,b.left+=g.gutterWidth;var T={top:b.top,left:b.left};g.$ghostText&&g.$ghostTextWidget&&this.base.row===g.$ghostText.position.row&&(T.top+=g.$ghostTextWidget.el.offsetHeight);var j=v.container.getBoundingClientRect().bottom-w,E=j<T.top?{top:j,left:T.left}:T;this.popup.tryShow(E,w,"bottom")||this.popup.tryShow(b,w,"top")||this.popup.show(b,w)},_.prototype.openPopup=function(v,g,w){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var b=this.popup.getRow(),S=this.popup.data[b];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:c(this.popup.getRow()),inline:this.inlineEnabled}),v.keyBinding.addKeyboardHandler(this.keyboardHandler);var T;this.stickySelection&&(T=this.popup.data.indexOf(S)),(!T||T===-1)&&(T=0),this.popup.setRow(this.autoSelect?T:-1),T===b&&S!==this.completions.filtered[T]&&this.$onPopupChange();var j=this.inlineRenderer&&this.inlineEnabled;if(T===b&&j){var E=this.popup.getData(this.popup.getRow());this.$updateGhostText(E)}w||(this.popup.setTheme(v.getTheme()),this.popup.setFontSize(v.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},_.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},_.prototype.changeListener=function(v){var g=this.editor.selection.lead;(g.row!=this.base.row||g.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},_.prototype.blurListener=function(v){var g=document.activeElement,w=this.editor.textInput.getElement(),b=v.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(v.relatedTarget),S=this.popup&&this.popup.container;g!=w&&g.parentNode!=S&&!b&&g!=this.tooltipNode&&v.relatedTarget!=w&&this.detach()},_.prototype.mousedownListener=function(v){this.detach()},_.prototype.mousewheelListener=function(v){this.popup&&!this.popup.isMouseOver&&this.detach()},_.prototype.mouseOutListener=function(v){this.popup.isOpen&&this.$updatePopupPosition()},_.prototype.goTo=function(v){this.popup.goTo(v)},_.prototype.insertMatch=function(v,g){if(v||(v=this.popup.getData(this.popup.getRow())),!v)return!1;if(v.value==="")return this.detach();var w=this.completions,b=this.getCompletionProvider().insertMatch(this.editor,v,w.filterText,g);return this.completions==w&&this.detach(),b},_.prototype.showPopup=function(v,g){this.editor&&this.detach(),this.activated=!0,this.editor=v,v.completer!=this&&(v.completer&&v.completer.detach(),v.completer=this),v.on("changeSelection",this.changeListener),v.on("blur",this.blurListener),v.on("mousedown",this.mousedownListener),v.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,g)},_.prototype.getCompletionProvider=function(v){return this.completionProvider||(this.completionProvider=new f(v)),this.completionProvider},_.prototype.gatherCompletions=function(v,g){return this.getCompletionProvider().gatherCompletions(v,g)},_.prototype.updateCompletions=function(v,g){if(v&&this.base&&this.completions){var b=this.editor.getCursorPosition(),S=this.editor.session.getTextRange({start:this.base,end:b});if(S==this.completions.filterText)return;if(this.completions.setFilter(S),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==S&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,S,v);return}if(g&&g.matches){var b=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(b.row,b.column),this.base.$insertRight=!0,this.completions=new y(g.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",v)}var w=this.editor.getSession(),b=this.editor.getCursorPosition(),S=h.getCompletionPrefix(this.editor);this.base=w.doc.createAnchor(b.row,b.column-S.length),this.base.$insertRight=!0;var T={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:S,pos:b}).provideCompletions(this.editor,T,(function(j,E,A){var M=E.filtered,C=h.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),A){if(!M.length){var L=!this.autoShown&&this.emptyMessage;if(typeof L=="function"&&(L=this.emptyMessage(C)),L){var I=[{caption:L,value:""}];this.completions=new y(I),this.openPopup(this.editor,C,v),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(M.length==1&&M[0].value==C&&!M[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&M.length==1)return this.insertMatch(M[0])}this.completions=!A&&this.showLoadingState?new y(_.completionsForLoading.concat(M),E.filterText):E,this.openPopup(this.editor,C,v),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!A)}).bind(this)),this.showLoadingState&&!this.autoShown&&!(this.popup&&this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},_.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},_.prototype.updateDocTooltip=function(){var v=this.popup,g=this.completions&&this.completions.filtered,w=g&&(g[v.getHoveredRow()]||g[v.getRow()]),b=null;if(!w||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var S=this.editor.completers.length,T=0;T<S;T++){var j=this.editor.completers[T];if(j.getDocTooltip&&w.completerId===j.id){b=j.getDocTooltip(w);break}}if(!b&&typeof w!="string"&&(b=w),typeof b=="string"&&(b={docText:b}),!b||!(b.docHTML||b.docText))return this.hideDocTooltip();this.showDocTooltip(b)},_.prototype.showDocTooltip=function(v){this.tooltipNode||(this.tooltipNode=i.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",l));var g=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(g.isDark?"ace_dark ":"")+(g.cssClass||"");var w=this.tooltipNode;v.docHTML?w.innerHTML=v.docHTML:v.docText&&(w.textContent=v.docText),w.parentNode||this.popup.container.appendChild(this.tooltipNode);var b=this.popup,S=b.container.getBoundingClientRect(),T=400,j=300,E=b.renderer.scrollBar.width||10,A=S.left,M=window.innerWidth-S.right-E,C=b.isTopdown?window.innerHeight-E-S.bottom:S.top,L=[Math.min(M/T,1),Math.min(A/T,1),Math.min(C/j,1)*.9],I=Math.max.apply(Math,L),O=w.style;O.display="block",I==L[0]||L[0]>=1?(O.left=S.right+1+"px",O.right="",O.maxWidth=T*I+"px",O.top=S.top+"px",O.bottom="",O.maxHeight=Math.min(window.innerHeight-E-S.top,j)+"px"):I==L[1]||L[1]>=1?(O.right=window.innerWidth-S.left+"px",O.left="",O.maxWidth=T*I+"px",O.top=S.top+"px",O.bottom="",O.maxHeight=Math.min(window.innerHeight-E-S.top,j)+"px"):I==L[2]&&(O.left=S.left+"px",O.right="",O.maxWidth=Math.min(T,window.innerWidth-S.left)+"px",b.isTopdown?(O.top=S.bottom+"px",O.bottom="",O.maxHeight=Math.min(window.innerHeight-E-S.bottom,j)+"px"):(O.top="",O.bottom=window.innerHeight-S.top+"px",O.maxHeight=Math.min(S.top,j)+"px")),i.$fixPositionBug(w)},_.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var v=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==v&&this.editor.focus(),this.tooltipNode=null,v.parentNode&&v.parentNode.removeChild(v)}},_.prototype.onTooltipClick=function(v){for(var g=v.target;g&&g!=this.tooltipNode;){if(g.nodeName=="A"&&g.href){g.rel="noreferrer",g.target="_blank";break}g=g.parentNode}},_.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var v=this.popup.container;v&&v.parentNode&&v.parentNode.removeChild(v)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",n),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},_.for=function(v){return v.completer instanceof _||(v.completer&&(v.completer.destroy(),v.completer=null),o.get("sharedPopups")?(_.$sharedInstance||(_.$sharedInstance=new _),v.completer=_.$sharedInstance):(v.completer=new _,v.once("destroy",n))),v.completer},_})();d.prototype.commands={Up:function(_){_.completer.goTo("up")},Down:function(_){_.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(_){_.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(_){_.completer.goTo("end")},Esc:function(_){_.completer.detach()},Return:function(_){return _.completer.insertMatch()},"Shift-Return":function(_){_.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(_){var v=_.completer.insertMatch();if(!v&&!_.tabstopManager)_.completer.goTo("down");else return v},Backspace:function(_){_.execCommand("backspace");var v=h.getCompletionPrefix(_);!v&&_.completer&&_.completer.detach()},PageUp:function(_){_.completer.popup.gotoPageUp()},PageDown:function(_){_.completer.popup.gotoPageDown()}},d.startCommand={name:"startAutocomplete",exec:function(_,v){var g=d.for(_);g.autoInsert=!1,g.autoSelect=!0,g.autoShown=!1,g.showPopup(_,v),g.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var f=(function(){function _(v){this.initialPosition=v,this.active=!0}return _.prototype.insertByIndex=function(v,g,w){return!this.completions||!this.completions.filtered?!1:this.insertMatch(v,this.completions.filtered[g],w)},_.prototype.insertMatch=function(v,g,w){if(!g)return!1;if(v.startOperation({command:{name:"insertMatch"}}),g.completer&&g.completer.insertMatch)g.completer.insertMatch(v,g);else{if(!this.completions)return!1;var b=this.completions.filterText.length,S=0;if(g.range&&g.range.start.row===g.range.end.row&&(b-=this.initialPosition.prefix.length,b+=this.initialPosition.pos.column-g.range.start.column,S+=g.range.end.column-this.initialPosition.pos.column),b||S){var T;v.selection.getAllRanges?T=v.selection.getAllRanges():T=[v.getSelectionRange()];for(var j=0,E;E=T[j];j++)E.start.column-=b,E.end.column+=S,v.session.remove(E)}g.snippet?r.insertSnippet(v,g.snippet):this.$insertString(v,g),g.completer&&g.completer.onInsert&&typeof g.completer.onInsert=="function"&&g.completer.onInsert(v,g),g.command&&g.command==="startAutocomplete"&&v.execCommand(g.command)}return v.endOperation(),!0},_.prototype.$insertString=function(v,g){var w=g.value||g;v.execCommand("insertstring",w)},_.prototype.gatherCompletions=function(v,g){var w=v.getSession(),b=v.getCursorPosition(),S=h.getCompletionPrefix(v),T=[];this.completers=v.completers;var j=v.completers.length;return v.completers.forEach(function(E,A){E.getCompletions(v,w,b,S,function(M,C){E.hideInlinePreview&&(C=C.map(function(L){return Object.assign(L,{hideInlinePreview:E.hideInlinePreview})})),!M&&C&&(T=T.concat(C)),g(null,{prefix:h.getCompletionPrefix(v),matches:T,finished:--j===0})})}),!0},_.prototype.provideCompletions=function(v,g,w){var b=(function(E){var A=E.prefix,M=E.matches;this.completions=new y(M),g.exactMatch&&(this.completions.exactMatch=!0),g.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(A),(E.finished||this.completions.filtered.length)&&w(null,this.completions,E.finished)}).bind(this),S=!0,T=null;if(this.gatherCompletions(v,(function(E,A){if(this.active){E&&(w(E,[],!0),this.detach());var M=A.prefix;if(M.indexOf(A.prefix)===0){if(S){T=A;return}b(A)}}}).bind(this)),S=!1,T){var j=T;T=null,b(j)}},_.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(v){typeof v.cancel=="function"&&v.cancel()})},_})(),y=(function(){function _(v,g){this.all=v,this.filtered=v,this.filterText=g||"",this.exactMatch=!1,this.ignoreCaption=!1}return _.prototype.setFilter=function(v){if(v.length>this.filterText&&v.lastIndexOf(this.filterText,0)===0)var g=this.filtered;else var g=this.all;this.filterText=v,g=this.filterCompletions(g,this.filterText),g=g.sort(function(b,S){return S.exactMatch-b.exactMatch||S.$score-b.$score||(b.caption||b.value).localeCompare(S.caption||S.value)});var w=null;g=g.filter(function(b){var S=b.snippet||b.caption||b.value;return S===w?!1:(w=S,!0)}),this.filtered=g},_.prototype.filterCompletions=function(v,g){var w=[],b=g.toUpperCase(),S=g.toLowerCase();e:for(var T=0,j;j=v[T];T++){if(j.skipFilter){j.$score=j.score,w.push(j);continue}var E=!this.ignoreCaption&&j.caption||j.value||j.snippet;if(E){var A=-1,M=0,C=0,L,I;if(this.exactMatch){if(g!==E.substr(0,g.length))continue e}else{var O=E.toLowerCase().indexOf(S);if(O>-1)C=O;else for(var z=0;z<g.length;z++){var F=E.indexOf(S[z],A+1),H=E.indexOf(b[z],A+1);if(L=F>=0&&(H<0||F<H)?F:H,L<0)continue e;I=L-A-1,I>0&&(A===-1&&(C+=10),C+=I,M=M|1<<z),A=L}}j.matchMask=M,j.exactMatch=C?0:1,j.$score=(j.score||0)-C,w.push(j)}}return w},_})();D.Autocomplete=d,D.CompletionProvider=f,D.FilteredList=y}),ace.define("ace/marker_group",["require","exports","module"],function($,D,V){var R=(function(){function x(p,c){c&&(this.markerType=c.markerType),this.markers=[],this.session=p,p.addDynamicMarker(this)}return x.prototype.getMarkerAtPosition=function(p){return this.markers.find(function(c){return c.range.contains(p.row,p.column)})},x.prototype.markersComparator=function(p,c){return p.range.start.row-c.range.start.row},x.prototype.setMarkers=function(p){this.markers=p.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},x.prototype.update=function(p,c,h,a){if(!(!this.markers||!this.markers.length))for(var i=a.firstRow,r=a.lastRow,o,s=0,l=0,n=0;n<this.markers.length;n++){var d=this.markers[n];if(!(d.range.end.row<i)&&!(d.range.start.row>r)&&(d.range.start.row===l?s++:(l=d.range.start.row,s=0),!(s>200))){var f=d.range.clipRows(i,r);if(!(f.start.row===f.end.row&&f.start.column===f.end.column)){var y=f.toScreenRange(h);if(y.isEmpty()){o=h.getNextFoldLine(f.end.row,o),o&&o.end.row>f.end.row&&(i=o.end.row);continue}this.markerType==="fullLine"?c.drawFullLineMarker(p,y,d.className,a):y.isMultiLine()?this.markerType==="line"?c.drawMultiLineMarker(p,y,d.className,a):c.drawTextMarker(p,y,d.className,a):c.drawSingleLineMarker(p,y,d.className+" ace_br15",a)}}}},x})();R.prototype.MAX_MARKERS=1e4,D.MarkerGroup=R}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function($,D,V){var R=$("../range").Range,x=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function p(h,a){var i=h.getTextRange(R.fromPoints({row:0,column:0},a));return i.split(x).length-1}function c(h,a){var i=p(h,a),r=h.getValue().split(x),o=Object.create(null),s=r[i];return r.forEach(function(l,n){if(!(!l||l===s)){var d=Math.abs(i-n),f=r.length-d;o[l]?o[l]=Math.max(f,o[l]):o[l]=f}}),o}D.getCompletions=function(h,a,i,r,o){var s=c(a,i),l=Object.keys(s);o(null,l.map(function(n){return{caption:n,value:n,score:s[n],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function($,D,V){var R=$("../snippets").snippetManager,x=$("../autocomplete").Autocomplete,p=$("../config"),c=$("../lib/lang"),h=$("../autocomplete/util"),a=$("../marker_group").MarkerGroup,i=$("../autocomplete/text_completer"),r={getCompletions:function(S,T,j,E,A){if(T.$mode.completer)return T.$mode.completer.getCompletions(S,T,j,E,A);var M=S.session.getState(j.row),C=T.$mode.getCompletions(M,T,j,E);C=C.map(function(L){return L.completerId=r.id,L}),A(null,C)},id:"keywordCompleter"},o=function(S){var T={};return S.replace(/\${(\d+)(:(.*?))?}/g,function(j,E,A,M){return T[E]=M||""}).replace(/\$(\d+?)/g,function(j,E){return T[E]})},s={getCompletions:function(S,T,j,E,A){var M=[],C=T.getTokenAt(j.row,j.column);C&&C.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?M.push("html-tag"):M=R.getActiveScopes(S);var L=R.snippetMap,I=[];M.forEach(function(O){for(var z=L[O]||[],F=z.length;F--;){var H=z[F],Y=H.name||H.tabTrigger;Y&&I.push({caption:Y,snippet:H.content,meta:H.tabTrigger&&!H.name?H.tabTrigger+"⇥ ":"snippet",completerId:s.id})}},this),A(null,I)},getDocTooltip:function(S){S.snippet&&!S.docHTML&&(S.docHTML=["<b>",c.escapeHTML(S.caption),"</b>","<hr></hr>",c.escapeHTML(o(S.snippet))].join(""))},id:"snippetCompleter"},l=[s,i,r];D.setCompleters=function(S){l.length=0,S&&l.push.apply(l,S)},D.addCompleter=function(S){l.push(S)},D.textCompleter=i,D.keyWordCompleter=r,D.snippetCompleter=s;var n={name:"expandSnippet",exec:function(S){return R.expandWithTab(S)},bindKey:"Tab"},d=function(S,T){f(T.session.$mode)},f=function(S){typeof S=="string"&&(S=p.$modes[S]),S&&(R.files||(R.files={}),y(S.$id,S.snippetFileId),S.modes&&S.modes.forEach(f))},y=function(S,T){!T||!S||R.files[S]||(R.files[S]={},p.loadModule(T,function(j){j&&(R.files[S]=j,!j.snippets&&j.snippetText&&(j.snippets=R.parseSnippetFile(j.snippetText)),R.register(j.snippets||[],j.scope),j.includeScopes&&(R.snippetMap[j.scope].includeScopes=j.includeScopes,j.includeScopes.forEach(function(E){f("ace/mode/"+E)})))}))},_=function(S){var T=S.editor,j=T.completer&&T.completer.activated;if(S.command.name==="backspace")j&&!h.getCompletionPrefix(T)&&T.completer.detach();else if(S.command.name==="insertstring"&&!j){v=S;var E=S.editor.$liveAutocompletionDelay;E?g.delay(E):w(S)}},v,g=c.delayedCall(function(){w(v)},0),w=function(S){var T=S.editor,j=h.getCompletionPrefix(T),E=S.args,A=h.triggerAutocomplete(T,E);if(j&&j.length>=T.$liveAutocompletionThreshold||A){var M=x.for(T);M.autoShown=!0,M.showPopup(T)}},b=$("../editor").Editor;$("../config").defineOptions(b.prototype,"editor",{enableBasicAutocompletion:{set:function(S){S?(x.for(this),this.completers||(this.completers=Array.isArray(S)?S:l),this.commands.addCommand(x.startCommand)):this.commands.removeCommand(x.startCommand)},value:!1},enableLiveAutocompletion:{set:function(S){S?(this.completers||(this.completers=Array.isArray(S)?S:l),this.commands.on("afterExec",_)):this.commands.off("afterExec",_)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(S){S?(this.commands.addCommand(n),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(n),this.off("changeMode",d))},value:!1}}),D.MarkerGroup=a}),(function(){ace.require(["ace/ext/language_tools"],function($){W&&(W.exports=$)})})()})(cu)),cu.exports}w0();function fu({value:W="",onChange:G,mode:$="json",theme:D="monokai",readOnly:V=!1,height:R="100%",width:x="100%",className:p,wrapperClassName:c,transparent:h=!1}){const[a,i]=_e.useState(!1),[r]=_e.useState(()=>`ace-editor-${Math.random()}`);return B.jsxs("div",{className:`h-full w-full ${c||""}`,children:[h&&B.jsx("style",{children:`
1475
- #${r.replace(/\./g,"\\.")} {
1476
- background-color: transparent !important;
1477
- }
1478
- #${r.replace(/\./g,"\\.")} .ace_gutter {
1479
- background-color: transparent !important;
1480
- color: #8F908A; /* Monokai gutter text color preserved, modify if needed */
1481
- }
1482
- #${r.replace(/\./g,"\\.")} .ace_scroller {
1483
- background-color: transparent !important;
1484
- }
1485
- #${r.replace(/\./g,"\\.")} .ace_marker-layer .ace_active-line {
1486
- background-color: transparent !important;
1487
- }
1488
- #${r.replace(/\./g,"\\.")} .ace_gutter-active-line {
1489
- background-color: transparent !important;
1490
- }
1491
- `}),B.jsx(g0,{mode:$,theme:D,onChange:G,value:W,name:r,editorProps:{$blockScrolling:!0},onFocus:()=>i(!0),onBlur:()=>i(!1),setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!0,tabSize:2,useWorker:!1,fontFamily:"monospace",fontSize:14,highlightActiveLine:a},height:R,width:x,className:p,readOnly:V,style:h?{backgroundColor:"transparent"}:void 0})]})}function Rp(){const W=ke.use.body(),G=ke.use.setBody();return B.jsxs("div",{className:"flex-1 flex flex-col min-h-0 gap-2",children:[B.jsx("h2",{className:"text-md font-bold text-gray-200",children:"Request Body"}),B.jsx("div",{className:"flex-1 min-h-0",children:B.jsx(fu,{transparent:!0,value:W,onChange:G})})]})}function S0({onMinimize:W}){const G=ke.use.expectedOutput(),$=_e.useRef(null),[D,V]=_e.useState("");_e.useEffect(()=>{R(G)},[G]);const R=x=>{try{let p="";typeof x=="object"?p=JSON.stringify(x,null,2):p=String(x);let c=p.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");c=c.replace(/"([^"]+)":/g,'<span class="text-green-400">"$1"</span>:'),c=c.replace(/([{}\[\],])/g,h=>`<span class="text-gray-500">${h}</span>`),V(c)}catch{V("Invalid output")}};return B.jsxs("div",{className:"flex flex-col h-full overflow-hidden gap-2",children:[B.jsxs("div",{className:"flex items-center justify-between shrink-0",children:[B.jsxs("h2",{className:"text-md font-bold text-gray-200 flex items-center gap-2",children:[B.jsx("i",{className:"fa fa-circle-info text-sm"}),"Expected Response"]}),B.jsx("button",{className:"px-2 py-1 bg-gray-700 rounded-md text-gray-300 text-sm",onClick:W,children:B.jsx("i",{className:"fa fa-minus"})})]}),B.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar p-1 relative",children:B.jsx("pre",{ref:$,className:"w-full text-gray-300 whitespace-pre-wrap leading-relaxed text-[14px] font-mono",dangerouslySetInnerHTML:{__html:D}})})]})}function x0({isOpen:W,onClose:G}){const{crudData:$,currentCategoryIndex:D,currentCrudIndex:V,useDevURL:R,params:x,method:p,header:c,body:h}=ke();if(!W||D===-1||V===-1)return null;const a=$[D].items[V],r=`${R?$[D].devurl:$[D].produrl}${a.route}${x?`?${x}`:""}`;let o="";if(p==="STREAM")o=`const url = "${r}";
1492
-
1493
- const response = await fetch(url, {
1494
- method: "GET",
1495
- headers: ${c}
1496
- });
1497
-
1498
- if (!response.body) throw new Error("No response body");
1499
-
1500
- const reader = response.body.getReader();
1501
- const decoder = new TextDecoder("utf-8");
1502
-
1503
- while (true) {
1504
- const { done, value } = await reader.read();
1505
- if (done) break;
1506
- const chunk = decoder.decode(value, { stream: true });
1507
- console.log(chunk);
1508
- }`;else{const s=p!=="GET";let l=`{
1509
- method: "${p}",
1510
- headers: ${c}`;if(s){let n=h;try{n=JSON.stringify(JSON.parse(h),null,2).replace(/\n/g,`
1511
- `),l+=`,
1512
- body: JSON.stringify(${n})`}catch{l+=`,
1513
- body: ${JSON.stringify(h)}`}}l+=`
1514
- }`,o=`const url = "${r}";
1515
-
1516
- const response = await fetch(url, ${l});
1517
-
1518
- const data = await response.json();
1519
- console.log(data);`}return B.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:B.jsxs("div",{className:"bg-[#111111] border border-white/10 rounded-xl w-full max-w-3xl flex flex-col h-[70vh]",children:[B.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-white/5",children:[B.jsxs("h3",{className:"text-lg font-bold text-white flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-code text-blue-400"}),"Code Example"]}),B.jsx("button",{onClick:G,className:"text-gray-400 hover:text-white transition-colors",children:B.jsx("i",{className:"fas fa-times"})})]}),B.jsx("div",{className:"flex-1 overflow-hidden p-1 relative",children:B.jsx(fu,{value:o,mode:"javascript",theme:"monokai",readOnly:!0,transparent:!0})}),B.jsxs("div",{className:"p-4 border-t border-white/5 flex justify-end gap-2",children:[B.jsx("button",{onClick:()=>{navigator.clipboard.writeText(o),alert("Code copied to clipboard!")},className:"px-4 py-2 rounded-lg text-sm font-bold text-white bg-blue-600 hover:bg-blue-500 transition-colors shadow-lg shadow-blue-500/20",children:"Copy Code"}),B.jsx("button",{onClick:G,className:"px-4 py-2 rounded-lg text-sm text-gray-400 hover:text-white hover:bg-white/5 transition-colors",children:"Close"})]})]})})}function Dp(){const W=ke.use.output(),G=_e.useRef(null),[$,D]=_e.useState(""),[V,R]=_e.useState(!1);_e.useEffect(()=>{x(W)},[W]);const x=h=>{try{let a=h;if(typeof h=="string")try{a=JSON.parse(h)}catch{}let i="",r=!1;typeof a=="object"&&a!==null?(i=JSON.stringify(a,null,2),r=!0):i=String(a);let o=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");r&&(o=o.replace(/"([^"]+)":/g,'<span class="text-green-400">"$1"</span>:'),o=o.replace(/([{}\[\],])/g,s=>`<span class="text-gray-500">${s}</span>`)),D(o)}catch{D("Invalid output")}},p=()=>{const h=JSON.stringify(W,null,2);localStorage.setItem("crud-output-last",h),alert("Output saved to LocalStorage")},c=()=>{const h=localStorage.getItem("crud-output-last");if(h)try{const a=JSON.parse(h);x(a)}catch{x(h)}else alert("No saved output found")};return B.jsxs("div",{className:"flex flex-col h-full overflow-hidden gap-2",children:[B.jsxs("div",{className:"flex items-center justify-between shrink-0",children:[B.jsxs("h2",{className:"text-md font-bold text-gray-200 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-terminal text-sm"}),"Response"]}),B.jsxs("div",{className:"flex gap-2",children:[B.jsx("button",{onClick:p,className:"p-1 text-md text-gray-500 hover:text-white transition-colors",title:"Save to LocalStorage",children:B.jsx("i",{className:"fas fa-save"})}),B.jsx("button",{onClick:c,className:"p-1 text-md text-gray-500 hover:text-white transition-colors",title:"Load from LocalStorage",children:B.jsx("i",{className:"fas fa-upload"})}),B.jsx("button",{onClick:()=>R(!0),className:"p-1 text-md text-blue-500 hover:text-blue-400 transition-colors flex items-center gap-1",children:B.jsx("i",{className:"fas fa-code"})})]})]}),B.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar p-1 relative",children:B.jsx("pre",{ref:G,className:"w-full text-gray-300 whitespace-pre-wrap leading-relaxed text-[14px] font-mono",style:{lineHeight:"1.1"},dangerouslySetInnerHTML:{__html:$}})}),B.jsx(x0,{isOpen:V,onClose:()=>R(!1)})]})}function $p(){const W=ke.use.header(),G=ke.use.setHeader();return B.jsxs("div",{className:"h-[30%] flex flex-col overflow-hidden gap-2",children:[B.jsx("h2",{className:"text-md font-bold text-gray-200",children:"Header"}),B.jsx("div",{className:"flex-1 min-h-0",children:B.jsx(fu,{value:W,onChange:G,transparent:!0})})]})}function C0(){const W=ke.use.useDevURL(),G=ke.use.setUseDevURL(),$=ke.use.params(),D=ke.use.method(),V=ke.use.crudData(),R=ke.use.currentCategoryIndex(),x=ke.use.currentCrudIndex();return B.jsxs("header",{className:"h-16 flex items-center px-4 gap-6 mb-4",children:[B.jsxs("div",{className:"flex items-center gap-2 bg-white/5 rounded-xl p-1 border border-white/5",children:[B.jsx("button",{onClick:()=>G(!0),className:`${W?"bg-gradient-to-r from-blue-600 to-blue-500":""} px-4 py-1.5 text-[10px] font-bold uppercase rounded-lg transition-all text-white`,title:V[R].devurl,children:"Dev"}),B.jsx("button",{onClick:()=>G(!1),className:`${W?"":"bg-gradient-to-r from-blue-600 to-blue-500"} px-4 py-1.5 text-[10px] font-bold uppercase rounded-lg transition-all text-white`,title:V[R].produrl,children:"Prod"})]}),B.jsx("div",{className:"h-12 w-px bg-white/10"}),B.jsxs("div",{className:" flex flex-col gap-1",children:[B.jsxs("div",{className:"flex flex-start justify-start gap-2 overflow-hidden",children:[B.jsx("span",{className:"font-mono text-md font-bold text-blue-400 bg-blue-500/10 border border-blue-500/20 px-2 rounded",children:D}),B.jsx("span",{className:"text-gray-500 font-mono text-md",children:`${W?V[R].devurl:V[R].produrl}${V[R].items[x].route}${$?encodeURI($.startsWith("?")?$:`?${$}`):""}`})]}),B.jsxs("div",{className:"flex items-baseline gap-2 overflow-hidden",children:[B.jsx("span",{className:" text-xs font-bold text-blue-400 ",children:V[R].items[x].label}),B.jsx("span",{className:"text-gray-500 text-sm",children:V[R].items[x].description})]})]})]})}function E0(){const W=ke.use.params(),G=ke.use.setParams(),$=ke.use.sendRequest(),D=ke.use.crudData(),V=ke.use.currentCategoryIndex(),R=ke.use.currentCrudIndex(),x=ke.use.setBody(),p=ke.use.executionTime(),c=ke.use.isFetching(),h=ke.use.requestStartTime(),[a,i]=_e.useState(0),[r,o]=_e.useState(!1),l=(V!==-1&&R!==-1?D[V]?.items[R]:null)?.suggested||[],n=d=>{d.content&&x(d.content),d.urlparams&&G(d.urlparams),o(!1)};return _e.useEffect(()=>{let d;const f=()=>{c?(i(Date.now()-h),d=requestAnimationFrame(f)):i(p)};return c?f():i(p),()=>{d&&cancelAnimationFrame(d)}},[c,h,p]),B.jsx("div",{className:"flex flex-col gap-5 px-4",children:B.jsxs("div",{className:"flex items-center gap-4",children:[B.jsxs("button",{className:"group relative px-6 py-2 rounded-xl font-bold text-xs tracking-wide text-white overflow-hidden transition-all hover:scale-105 active:scale-95 shadow-lg shadow-blue-600/20 flex-none h-10 flex items-center gap-2",onClick:$,children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 to-purple-600"}),B.jsx("div",{className:"absolute inset-0 bg-white/20 opacity-0 group-hover:opacity-100 transition-opacity"}),B.jsx("span",{className:"relative z-10",children:"SEND REQUEST"}),B.jsx("i",{className:"fas fa-paper-plane relative z-10"})]}),l.length>0&&B.jsxs("div",{className:"relative",children:[B.jsxs("button",{className:"bg-black/40 border border-white/5 hover:bg-white/5 active:scale-95 transition-all rounded-xl px-4 h-10 flex items-center gap-2 text-xs font-bold text-gray-400 hover:text-white",onClick:()=>o(!r),children:[B.jsx("i",{className:"fas fa-list-ul"}),"Presets",B.jsx("i",{className:`fas fa-chevron-down transition-transform ${r?"rotate-180":""}`})]}),r&&B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>o(!1)}),B.jsx("div",{className:"absolute top-full left-0 mt-2 w-56 bg-[#1a1a1a] border border-white/10 rounded-xl shadow-2xl z-50 overflow-hidden animate-fade-in-up",children:B.jsx("div",{className:"py-1",children:l.map((d,f)=>B.jsxs("button",{className:"w-full text-left px-4 py-2.5 text-sm text-gray-300 hover:text-white hover:bg-white/5 transition-colors flex items-center gap-2",onClick:()=>n(d),children:[B.jsx("i",{className:"fas fa-bolt text-blue-400 text-xs"}),d.name]},f))})})]})]}),B.jsx("div",{className:"flex-none bg-black/40 border border-white/5 rounded-xl px-4 h-10 flex items-center gap-3",children:B.jsxs("span",{className:"text-green-400 font-mono font-bold text-sm",children:[a," ms"]})}),B.jsx("div",{className:"group rounded-lg transition-all duration-300 w-full mr-4 lg:mr-12",children:B.jsx("div",{className:`p-[1px] rounded-lg bg-gradient-to-r
1520
- from-gray-700/40 to-gray-800/40
1521
- group-focus-within:from-blue-500/40
1522
- group-focus-within:to-purple-600/40
1523
- transition-colors duration-300`,children:B.jsxs("div",{className:"bg-gray/[0.1] rounded flex items-center overflow-hidden",children:[B.jsx("div",{className:"pl-3 flex items-center pointer-events-none",children:B.jsx("i",{className:"fas fa-code-branch text-gray-500 group-focus-within:text-blue-400 transition-colors text-sm"})}),B.jsx("input",{type:"text",className:"pl-3 pr-4 py-2.5 text-sm w-full text-white placeholder-gray-600 focus:outline-none",placeholder:"Query Params (e.g. ?id=123)",value:W,onChange:d=>{G(d.target.value)}})]})})})]})})}function A0(){const W=ke.use.currentCategoryIndex(),G=ke.use.currentCrudIndex(),[$,D]=_e.useState(!1);return W===-1||G===-1?B.jsxs("div",{id:"crud-empty-state",className:"relative z-10 flex-1 flex items-center justify-center text-gray-600 flex-col gap-6 opacity-60 select-none animate-pulse",children:[B.jsx("div",{className:"w-32 h-32 rounded-full bg-white/5 flex items-center justify-center",children:B.jsx("i",{className:"fas fa-rocket text-6xl text-gray-700"})}),B.jsx("p",{className:"text-xl font-medium tracking-tight",children:"Select an endpoint to start testing"})]}):B.jsxs("div",{className:"flex-1 flex flex-col relative overflow-hidden",children:[B.jsx(C0,{}),B.jsx(E0,{}),$?B.jsxs("div",{className:"flex flex-row flex-1 pt-4 pb-6 gap-4 h-full overflow-hidden transition-all duration-300 ease-in-out",children:[B.jsxs("div",{className:"w-[32%] flex flex-col gap-4",children:[B.jsx($p,{}),B.jsx(Rp,{})]}),B.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:B.jsx(Dp,{})}),B.jsx("div",{className:"w-[32px] flex flex-col",children:B.jsx("button",{onClick:()=>D(!1),className:"w-6 h-6 rounded-md bg-gray-700 text-gray-300 flex items-center justify-center hover:bg-gray-600 transition-colors",children:B.jsx("i",{className:"fa fa-chevron-right"})})})]}):B.jsxs("div",{className:"grid grid-cols-3 flex-1 pt-4 pb-6 gap-4 h-full overflow-hidden transition-all duration-300 ease-in-out",children:[B.jsxs("div",{className:"col-span-1 flex flex-col gap-4",children:[B.jsx($p,{}),B.jsx(Rp,{})]}),B.jsx("div",{className:"col-span-1 overflow-hidden",children:B.jsx(Dp,{})}),B.jsx("div",{className:"col-span-1 overflow-hidden transition-all duration-300 ease-in-out",children:B.jsx(S0,{onMinimize:()=>D(!0)})})]})]})}function uu({label:W,placeholder:G,value:$,onChange:D,rows:V=4}){return B.jsxs("div",{className:"flex flex-col gap-2 w-full m-0 p-0 group/input",children:[B.jsx("label",{className:"text-xs font-bold tracking-wider text-gray-400 group-focus-within/input:text-blue-400 transition-colors uppercase",children:W}),B.jsx("div",{className:"relative group rounded-lg transition-all duration-300",children:B.jsx("div",{className:`relative p-[1px] rounded-lg bg-gradient-to-r
1524
- from-gray-700/40 to-gray-800/40
1525
- group-focus-within:from-blue-500/40
1526
- group-focus-within:to-purple-600/40
1527
- transition-colors duration-300`,children:B.jsx("div",{className:"relative bg-gray/[0.1] rounded flex items-center overflow-hidden",children:B.jsx("textarea",{className:"pl-3 pr-4 py-2.5 text-sm w-full text-white placeholder-gray-600 focus:outline-none resize-none",rows:V,placeholder:G,value:$,onChange:R=>{D(R)}})})})})]})}function M0({isOpen:W,onClose:G,categoryIndex:$,itemIndex:D}){const V=ke.use.crudData(),R=ke.use.setCrudData(),x=ke.use.currentCategoryIndex(),p=ke.use.currentCrudIndex(),c=ke.use.setCurrentCrudIndex(),[h,a]=_e.useState(""),[i,r]=_e.useState(""),[o,s]=_e.useState(""),[l,n]=_e.useState(""),[d,f]=_e.useState(""),[y,_]=_e.useState(""),[v,g]=_e.useState([]);_e.useEffect(()=>{if(W){if(D===-1)a(""),r(""),s("GET"),n(""),f("{}"),_(""),g([]);else if(V[$]&&V[$].items[D]){const E=V[$].items[D];a(E.label),r(E.route),s(E.methods),n(E.description),f(E.sampleInput),_(E.expectedOutcome),g(E.suggested||[])}}},[W,V,$,D]);const w=()=>{const E=[...V],A={label:h,route:i,methods:o,description:l,sampleInput:d,expectedOutcome:y,suggested:v};if(D===-1)E[$].items||(E[$].items=[]),E[$].items.push(A);else{const M=E[$].items[D];E[$].items[D]={...M,...A}}R(E),G()},b=()=>{const E=[...V];E[$]&&E[$].items&&(E[$].items.splice(D,1),$===x&&(D===p?c(-1):D<p&&c(p-1)),R(E),G())},S=()=>{g([...v,{name:"New Preset",urlparams:"",content:"{}"}])},T=(E,A,M)=>{const C=[...v];C[E]={...C[E],[A]:M},g(C)},j=E=>{const A=[...v];A.splice(E,1),g(A)};return W?B.jsxs(er,{width:"800px",children:[B.jsx(Jn,{title:D===-1?"Add New Item":"Edit CRUD Item",description:D===-1?"Add a new item":"Edit an existing item",icon:D===-1?"fas fa-plus":"fas fa-edit",close:G}),B.jsxs("div",{className:"p-4 flex-1 flex flex-col gap-3 max-h-[60vh] overflow-y-auto text-md",children:[B.jsxs("div",{className:"flex gap-4",children:[B.jsx(Nt,{label:"Label",icon:"fas fa-info",placeholder:"Name for the route",value:h,onChange:E=>a(E.target.value)}),B.jsx(Nt,{label:"Description",icon:"fas fa-info",placeholder:"(optional) Description",value:l,onChange:E=>n(E.target.value)})]}),B.jsxs("div",{className:"flex gap-4",children:[B.jsx(Nt,{label:"Route",icon:"fas fa-info",placeholder:"/mytest",value:i,onChange:E=>r(E.target.value)}),B.jsx(Nt,{label:"Method",icon:"fas fa-info",placeholder:"GET | POST | DELETE | PUT",value:o,onChange:E=>s(E.target.value)})]}),B.jsxs("div",{className:"flex gap-4",children:[B.jsx(uu,{label:"Sample Input",placeholder:"{}",value:d,onChange:E=>f(E.target.value),rows:5}),B.jsx(uu,{label:"Expected Outcome",placeholder:"{}",value:y,onChange:E=>_(E.target.value),rows:5})]}),B.jsxs("div",{className:"flex flex-col gap-2",children:[B.jsx("label",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:"Suggested Presets"}),B.jsxs("div",{className:"space-y-3",children:[v.map((E,A)=>B.jsxs("div",{className:"flex flex-row gap-3",children:[B.jsxs("div",{className:"w-[50%] flex flex-col gap-2",children:[B.jsxs("div",{className:"flex flex-row gap-2",children:[B.jsx(Nt,{label:"Preset Name",icon:"fas fa-info",placeholder:"Preset Name",value:E.name,onChange:M=>T(A,"name",M.target.value)}),B.jsx("button",{onClick:()=>j(A),className:"text-red-400 hover:text-red-300 px-2",children:B.jsx("i",{className:"pt-6 fas fa-trash"})})]}),B.jsx(Nt,{label:"URL Params",icon:"fas fa-info",placeholder:"URL Params",value:E.urlparams,onChange:M=>T(A,"urlparams",M.target.value)})]}),B.jsx("div",{className:"w-[50%]",children:B.jsx(uu,{label:"Body Content",placeholder:"{}",value:E.content,onChange:M=>T(A,"content",M.target.value),rows:5})})]},A)),B.jsx("button",{onClick:S,className:"w-full py-2 bg-white/5 border border-dashed border-white/20 rounded-lg text-xs text-gray-400 hover:text-white hover:bg-white/10 transition-colors",children:"+ Add Preset"})]})]})]}),B.jsxs("footer",{className:"mt-2 mb-4 flex justify-between px-4",children:[$!==-1?B.jsxs("button",{onClick:b,className:"group relative px-6 py-2 rounded-lg font-medium text-sm text-red-400 hover:text-red-600 transition-colors overflow-hidden",children:["Delete",B.jsx("div",{className:"absolute inset-0 bg-white/5 opacity-0 group-hover:opacity-100 transition-opacity"})]}):B.jsx("div",{}),B.jsxs("div",{className:"flex gap-6",children:[B.jsxs("button",{onClick:G,className:"group relative px-6 py-2 rounded-lg font-medium text-sm text-gray-400 hover:text-white transition-colors overflow-hidden",children:[B.jsx("span",{className:"relative z-10",children:"Cancel"}),B.jsx("div",{className:"absolute inset-0 bg-white/5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),B.jsxs("button",{onClick:w,className:"group relative px-6 py-2 rounded-lg font-bold text-sm text-white transition-all hover:shadow-[0_0_20px_-5px_rgba(59,130,246,0.5)]",children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg"}),B.jsx("div",{className:"absolute inset-0 bg-white/20 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg"}),B.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-save"}),"Save"]})]})]})]})]}):null}function k0({isOpen:W,onClose:G,categoryIndex:$}){const D=ke.use.crudData(),V=ke.use.setCrudData(),R=ke.use.currentCategoryIndex(),x=ke.use.setCurrentCategoryIndex(),p=ke.use.setCurrentCrudIndex(),[c,h]=_e.useState(""),[a,i]=_e.useState("http://localhost:3000"),[r,o]=_e.useState("");_e.useEffect(()=>{if(W){if($===-1)h(""),i("http://localhost:3000"),o("");else if(D[$]){const n=D[$];h(n.category),i(n.devurl),o(n.produrl)}}},[W,D,$]);const s=()=>{const n=[...D];if($===-1){const d={category:c,devurl:a,produrl:r,items:[]};n.push(d)}else n[$]={...n[$],category:c,devurl:a,produrl:r};V(n),G()},l=()=>{const n=[...D];n.splice($,1),$===R?(x(-1),p(-1)):$<R&&x(R-1),V(n),G()};return W?B.jsxs(er,{children:[B.jsx(Jn,{title:$===-1?"Add New Category":"Edit Category",description:$===-1?"Add a new category":"Edit an existing category",icon:$===-1?"fas fa-plus":"fas fa-edit",close:G}),B.jsxs("div",{className:"p-4 flex-1 overflow-y-auto text-md",children:[B.jsxs("div",{className:"flex flex-col gap-4",children:[B.jsx(Nt,{label:"Category",icon:"fas fa-info",placeholder:"Category Name",value:c,onChange:n=>{h(n.target.value)}}),B.jsxs("div",{className:"flex gap-4",children:[B.jsx(Nt,{label:"Dev URL",icon:"fas fa-info",placeholder:"Dev URL",value:a,onChange:n=>i(n.target.value)}),B.jsx(Nt,{label:"Prod URL",icon:"fas fa-info",placeholder:"Prod URL",value:r,onChange:n=>o(n.target.value)})]})]}),B.jsxs("footer",{className:"mt-4 flex justify-between px-4",children:[$!==-1?B.jsxs("button",{onClick:l,className:"group relative px-6 py-2 rounded-lg font-medium text-sm text-red-400 hover:text-red-600 transition-colors overflow-hidden",children:["Delete",B.jsx("div",{className:"absolute inset-0 bg-white/5 opacity-0 group-hover:opacity-100 transition-opacity"})]}):B.jsx("div",{}),B.jsxs("div",{className:"flex gap-6",children:[B.jsxs("button",{onClick:G,className:"group relative px-6 py-2 rounded-lg font-medium text-sm text-gray-400 hover:text-white transition-colors overflow-hidden",children:[B.jsx("span",{className:"relative z-10",children:"Cancel"}),B.jsx("div",{className:"absolute inset-0 bg-white/5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),B.jsxs("button",{onClick:s,className:"group relative px-6 py-2 rounded-lg font-bold text-sm text-white transition-all hover:shadow-[0_0_20px_-5px_rgba(59,130,246,0.5)]",children:[B.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg"}),B.jsx("div",{className:"absolute inset-0 bg-white/20 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg"}),B.jsxs("span",{className:"relative z-10 flex items-center gap-2",children:[B.jsx("i",{className:"fas fa-save"}),"Save"]})]})]})]})]})]}):null}function T0(){const W=ke.use.crudData(),G=ke.use.currentCategoryIndex(),$=ke.use.currentCrudIndex(),D=ke.use.setCurrentCategoryIndex(),V=ke.use.setCurrentCrudIndex(),R=ke.use.setMethod(),x=ke.use.setParams(),p=ke.use.setBody(),c=ke.use.setExpectedOutput(),h=ke.use.setOutput(),[a,i]=_e.useState({0:!1}),[r,o]=_e.useState({isOpen:!1,categoryIndex:0,itemIndex:0}),[s,l]=_e.useState({isOpen:!1,categoryIndex:-1}),n=f=>{i(y=>({...y,[f]:!y[f]}))},d=(f,y,_)=>{D(f),V(y),R(_.methods),x(""),p(_.sampleInput||""),c(_.expectedOutcome||""),h("")};return B.jsxs("div",{className:"w-full flex flex-col gap-3 pb-10",children:[W.map((f,y)=>B.jsxs("div",{className:"flex flex-col",children:[B.jsxs("button",{onClick:()=>n(y),className:"flex items-center justify-between p-2 hover:bg-white/5 rounded-lg transition-colors group mb-1",children:[B.jsx("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider group-hover:text-white transition-colors",children:f.category}),B.jsxs("div",{className:"flex items-center gap-2",children:[B.jsx("div",{onClick:_=>{_.stopPropagation(),l({isOpen:!0,categoryIndex:y})},className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-white/10 rounded transition-all text-gray-500 hover:text-white",children:B.jsx("i",{className:"fas fa-pen text-[10px]"})}),B.jsx("i",{className:`fas fa-chevron-down text-[10px] text-gray-600 transition-transform duration-200 ${a[y]?"rotate-180":""}`})]})]}),a[y]&&B.jsxs("div",{className:"flex flex-col gap-1 pl-2",children:[f.items.map((_,v)=>{const g=y===G&&v===$;return B.jsxs("div",{className:`group relative flex items-center justify-between px-2 rounded-lg cursor-pointer transition-all border border-transparent
1528
- ${g?"bg-blue-500/10 border-blue-500/20":"hover:bg-white/5 hover:border-white/5"}`,onClick:()=>d(y,v,_),children:[B.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[B.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded shrink-0 ${_.methods==="GET"?"bg-green-500/20 text-green-400":_.methods==="POST"?"bg-blue-500/20 text-blue-400":_.methods==="PUT"?"bg-orange-500/20 text-orange-400":_.methods==="DELETE"?"bg-red-500/20 text-red-400":"bg-purple-500/20 text-purple-400"}`,children:_.methods}),B.jsx("span",{className:`text-sm font-medium truncate transition-colors ${g?"text-blue-400":"text-gray-300 group-hover:text-white"}`,children:_.label})]}),B.jsx("button",{onClick:w=>{w.stopPropagation(),o({isOpen:!0,categoryIndex:y,itemIndex:v})},className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-md hover:bg-white/10 text-gray-500 hover:text-white transition-all",title:"Edit Item",children:B.jsx("i",{className:"fas fa-pen text-xs"})})]},v)}),B.jsxs("button",{onClick:()=>o({isOpen:!0,categoryIndex:y,itemIndex:-1}),className:"w-full py-1 mt-1 text-xs text-gray-500 hover:text-white transition-all flex gap-2",children:[B.jsx("i",{className:"fas fa-plus"}),"Add Route"]})]})]},y)),B.jsxs("button",{onClick:()=>l({isOpen:!0,categoryIndex:-1}),className:"w-full py-2 hover:border-white/20 text-xs font-bold text-gray-500 hover:text-white transition-all flex gap-2",children:[B.jsx("i",{className:"fas fa-folder-plus group-hover:scale-110 transition-transform"}),"Add Category"]}),B.jsx(M0,{isOpen:r.isOpen,onClose:()=>o(f=>({...f,isOpen:!1})),categoryIndex:r.categoryIndex,itemIndex:r.itemIndex}),B.jsx(k0,{isOpen:s.isOpen,onClose:()=>l(f=>({...f,isOpen:!1})),categoryIndex:s.categoryIndex})]})}function L0(){return B.jsxs("div",{className:"w-[340px] h-full flex-none flex flex-col z-20",children:[B.jsxs("div",{className:"h-14 px-4 flex-none flex items-center justify-between ",children:[B.jsxs("span",{className:"text-xs font-bold uppercase text-blue-400 tracking-widest flex items-center gap-2",children:[B.jsx("i",{className:"fa-solid fa-circle-nodes"}),"Simple CRUD Test"]}),B.jsx("button",{className:"text-gray-500 hover:text-white transition-colors p-2 hover:bg-white/5 rounded-lg",children:B.jsx("i",{className:"fas fa-sync-alt text-xs"})})]}),B.jsx("div",{className:"flex-1 overflow-y-auto px-3 custom-scrollbar",children:B.jsx(T0,{})})]})}function R0(){const W=Et.use.initMonorepoTime(),G=ke.use.loadCrudData();return B.jsxs("div",{className:"relative z-10 flex-1 flex flex-col items-center justify-center text-gray-400 gap-8 p-4 animate-fade-in top-20",children:[B.jsx("div",{className:"flex flex-col items-center gap-4 text-center",children:B.jsxs("div",{className:"space-y-2",children:[B.jsx("h2",{className:"text-3xl font-bold text-white tracking-tight",children:"Initialize CRUD Tester"}),B.jsxs("p",{className:"text-gray-500 max-w-md mx-auto",children:["A ",B.jsx("code",{className:"px-1.5 py-0.5 rounded bg-white/5 text-blue-300 font-mono text-xs",children:"monorepotime.json"})," file is required to start testing and documenting your API routes."]})]})}),B.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 w-full max-w-4xl",children:[B.jsxs("div",{className:"p-4 rounded-xl bg-white/5 border border-white/5 flex flex-col items-center text-center gap-3 transition-colors hover:bg-white/10 hover:border-white/10",children:[B.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-500/10 flex items-center justify-center text-blue-400",children:B.jsx("i",{className:"fas fa-user-slash"})}),B.jsxs("div",{children:[B.jsx("h3",{className:"text-white font-medium mb-1",children:"No Sign-up"}),B.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:"No accounts or logins needed. Your data stays on your machine."})]})]}),B.jsxs("div",{className:"p-4 rounded-xl bg-white/5 border border-white/5 flex flex-col items-center text-center gap-3 transition-colors hover:bg-white/10 hover:border-white/10",children:[B.jsx("div",{className:"w-10 h-10 rounded-full bg-purple-500/10 flex items-center justify-center text-purple-400",children:B.jsx("i",{className:"fas fa-save"})}),B.jsxs("div",{children:[B.jsx("h3",{className:"text-white font-medium mb-1",children:"Local Storage"}),B.jsxs("p",{className:"text-xs text-gray-500 leading-relaxed",children:["Everything is saved locally in ",B.jsx("span",{className:"text-purple-300",children:"monorepotime.json"})," within your project root."]})]})]}),B.jsxs("div",{className:"p-4 rounded-xl bg-white/5 border border-white/5 flex flex-col items-center text-center gap-3 transition-colors hover:bg-white/10 hover:border-white/10",children:[B.jsx("div",{className:"w-10 h-10 rounded-full bg-green-500/10 flex items-center justify-center text-green-400",children:B.jsx("i",{className:"fas fa-book-open"})}),B.jsxs("div",{children:[B.jsx("h3",{className:"text-white font-medium mb-1",children:"Live Documentation"}),B.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:"Perfect for documenting and sharing API route configurations with your team."})]})]})]}),B.jsx("div",{className:"w-full max-w-sm mt-4",children:B.jsx(Cr,{name:"Create Configuration File",description:"Initialize /root/monorepotime.json",icon:"fa-plus",color:"blueIndigo",onClick:async()=>{await W(),await G()},className:""})})]})}function D0(W){const G=ke.use.noData(),$=ke.use.loadCrudData();return _e.useEffect(()=>{W.isVisible&&$()},[W.isVisible]),G&&W.isVisible?B.jsx(R0,{}):B.jsxs("div",{className:`flex h-full w-full pb-8 px-4 ${W.isVisible?"block":"hidden"}`,children:[B.jsx(L0,{}),B.jsx("div",{id:"crud-main-content",className:"flex-1 flex flex-col relative overflow-hidden",children:B.jsx(A0,{})})]})}function $0({isOpen:W,setIsOpen:G}){return W?B.jsxs("div",{onClick:()=>G(!1),className:"fixed inset-0 z-[999999] flex items-center justify-center bg-black/80 backdrop-blur-sm p-4 animate-fadeIn",children:[B.jsx("div",{className:"w-full max-w-lg bg-[#111] border border-white/10 rounded-xl shadow-2xl overflow-hidden scale-100 animate-scaleIn relative",children:B.jsxs("div",{className:"p-8 flex flex-col items-center text-center",children:[B.jsx("div",{className:"w-20 h-20 mb-6 rounded-2xl bg-gradient-to-br from-blue-600 to-purple-600 p-[1px] shadow-lg shadow-purple-500/20",children:B.jsx("div",{className:"w-full h-full bg-black rounded-2xl flex items-center justify-center overflow-hidden",children:B.jsx(Op,{className:"w-12 h-12"})})}),B.jsxs("h2",{className:"text-3xl font-bold text-white mb-2",children:["Monorepo",B.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-400",children:" Time"})]}),B.jsx("p",{className:"text-gray-400 mb-8 leading-relaxed max-w-sm",children:"The ultimate tool for managing your monorepos with speed and style. Streamline your workflow, visualize dependencies, and execute commands effortlessly."}),B.jsxs("a",{href:"https://buymeacoffee.com/angheloamir",target:"_blank",rel:"noopener noreferrer",className:"group relative inline-flex items-center gap-2 px-6 py-3 bg-[#FFDD00] text-black font-bold rounded-full overflow-hidden transition-all duration-300 hover:scale-105 hover:shadow-[0_0_20px_rgba(255,221,0,0.4)] hover:bg-[#ffe233]",children:[B.jsx("div",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -translate-x-full group-hover:animate-[shimmer_1.5s_infinite]"}),B.jsx("i",{className:"fas fa-coffee text-xl transition-transform duration-300 group-hover:rotate-12"}),B.jsx("span",{className:"relative",children:"Buy me a coffee"})]})]})}),B.jsx("style",{children:`
1529
- @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
1530
- @keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
1531
- @keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
1532
- .animate-fadeIn { animation: fadeIn 0.2s ease-out forwards; }
1533
- .animate-scaleIn { animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
1534
- `})]}):null}function O0(){const W=sp.use.currentPage(),G=sp.use.action(),$=Et.use.loadRootDir(),D=Et.use.checkIfFirstTime(),V=Et.use.showAboutModal(),R=Et.use.setShowAboutModal(),[x,p]=_e.useState(!1),[c,h]=_e.useState(!0);return _e.useEffect(()=>{h(!1),setTimeout(async()=>{await D()&&p(!0),await $()},0)},[]),c?B.jsx(Jv,{}):x?B.jsx(Zv,{onComplete:()=>p(!1)}):B.jsxs("div",{className:"w-screen h-screen overflow-hidden bg-black relative",children:[B.jsx(Bp,{}),B.jsxs("div",{className:"flex flex-1 overflow-hidden h-full w-full ",children:[B.jsx(lv,{navs:[{name:"dashboard",label:"Dashboard",icon:"fa fa-solid fa-house",isSelected:W==="dashboard",onClick:()=>G.setCurrentPage("dashboard")},{name:"workspace",label:"Workspace",icon:"fa fa-cube",isSelected:W==="workspace",onClick:()=>G.setCurrentPage("workspace")},{name:"turborepo",label:"Turborepo",icon:"fa fa-solid fa-truck-fast",isSelected:W==="turborepo",onClick:()=>G.setCurrentPage("turborepo")},{name:"crud",label:"CRUD Tester",icon:"fa fa-microscope",isSelected:W==="crud",onClick:()=>G.setCurrentPage("crud")}]}),B.jsxs("main",{className:"flex-1 relative overflow-hidden",children:[B.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none overflow-hidden",children:[B.jsx("div",{className:"absolute -top-[25%] -left-[10%] w-[50%] h-[50%] bg-blue-600/20 rounded-full blur-[128px]"}),B.jsx("div",{className:"absolute top-[20%] right-[10%] w-[40%] h-[40%] bg-purple-600/20 rounded-full blur-[128px]"}),B.jsx("div",{className:"absolute -bottom-[25%] -right-[10%] w-[50%] h-[50%] bg-fuchsia-600/20 rounded-full blur-[128px]"})]}),B.jsxs("div",{id:"app-content",className:"w-full max-w-[2100px] mx-auto h-full relative z-10",children:[B.jsx(pv,{isVisible:W==="dashboard"}),B.jsx(Yv,{isVisible:W==="workspace"}),B.jsx(r0,{isVisible:W==="turborepo"}),B.jsx(D0,{isVisible:W==="crud"})]})]})]}),B.jsx(Qv,{}),B.jsx(qv,{}),B.jsx($0,{isOpen:V,setIsOpen:()=>R(!1)})]})}Gm.createRoot(document.getElementById("root")).render(B.jsx(_e.StrictMode,{children:B.jsx(O0,{})}));