diff --git a/raphtory-graphql/resources/editor.worker-D1juwFt8.js b/raphtory-graphql/resources/editor.worker-D1juwFt8.js deleted file mode 100644 index 68caf016e4..0000000000 --- a/raphtory-graphql/resources/editor.worker-D1juwFt8.js +++ /dev/null @@ -1,12 +0,0 @@ -(function(){"use strict";var Ye,ht,Me,ke,Xe,ge,Pe,We,Je,ce,Te,Oe,Qe,we,De,Se,Ze,ze,z,ae,Ke;var Gt={exports:{}},V={};var Vn;function ci(){if(Vn)return V;Vn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),d=Symbol.iterator;function m(g){return g===null||typeof g!="object"?null:(g=d&&g[d]||g["@@iterator"],typeof g=="function"?g:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,L={};function w(g,y,F){this.props=g,this.context=y,this.refs=L,this.updater=F||p}w.prototype.isReactComponent={},w.prototype.setState=function(g,y){if(typeof g!="object"&&typeof g!="function"&&g!=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,g,y,"setState")},w.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function A(){}A.prototype=w.prototype;function C(g,y,F){this.props=g,this.context=y,this.refs=L,this.updater=F||p}var b=C.prototype=new A;b.constructor=C,_(b,w.prototype),b.isPureReactComponent=!0;var v=Array.isArray;function N(){}var S={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function G(g,y,F){var D=F.ref;return{$$typeof:e,type:g,key:y,ref:D!==void 0?D:null,props:F}}function se(g,y){return G(g.type,y,g.props)}function U(g){return typeof g=="object"&&g!==null&&g.$$typeof===e}function I(g){var y={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(F){return y[F]})}var x=/\/+/g;function R(g,y){return typeof g=="object"&&g!==null&&g.key!=null?I(""+g.key):y.toString(36)}function M(g){switch(g.status){case"fulfilled":return g.value;case"rejected":throw g.reason;default:switch(typeof g.status=="string"?g.then(N,N):(g.status="pending",g.then(function(y){g.status==="pending"&&(g.status="fulfilled",g.value=y)},function(y){g.status==="pending"&&(g.status="rejected",g.reason=y)})),g.status){case"fulfilled":return g.value;case"rejected":throw g.reason}}throw g}function E(g,y,F,D,W){var O=typeof g;(O==="undefined"||O==="boolean")&&(g=null);var X=!1;if(g===null)X=!0;else switch(O){case"bigint":case"string":case"number":X=!0;break;case"object":switch(g.$$typeof){case e:case t:X=!0;break;case h:return X=g._init,E(X(g._payload),y,F,D,W)}}if(X)return W=W(g),X=D===""?"."+R(g,0):D,v(W)?(F="",X!=null&&(F=X.replace(x,"$&/")+"/"),E(W,y,F,"",function(d1){return d1})):W!=null&&(U(W)&&(W=se(W,F+(W.key==null||g&&g.key===W.key?"":(""+W.key).replace(x,"$&/")+"/")+X)),y.push(W)),1;X=0;var be=D===""?".":D+":";if(v(g))for(var me=0;me"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Yt.exports=hi(),Yt.exports}fi();var Xt={exports:{}},gt={};var $n;function mi(){if($n)return gt;$n=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var l in s)l!=="key"&&(i[l]=s[l])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:o,ref:s!==void 0?s:null,props:i}}return gt.Fragment=t,gt.jsx=n,gt.jsxs=n,gt}var Wn;function di(){return Wn||(Wn=1,Xt.exports=mi()),Xt.exports}di();var On={},gi=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Qt.isErrorNoTelemetry(e)?new Qt(e.message+` - -`+e.stack):new Error(e.message+` - -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},pi=new gi;function pt(e){bi(e)||pi.onUnexpectedError(e)}function zn(e){if(e instanceof Error){const{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:Qt.isErrorNoTelemetry(e)}}return e}var Jt="Canceled";function bi(e){return e instanceof vi?!0:e instanceof Error&&e.name===Jt&&e.message===Jt}var vi=class extends Error{constructor(){super(Jt),this.name=this.message}},Qt=class Dn extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Dn)return t;const n=new Dn;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},ye=class ni extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,ni.prototype)}};function yi(e,t){const n=this;let r=!1,s;return function(){return r||(r=!0,s=e.apply(n,arguments)),s}}var St;(function(e){function t(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*s(b){yield b}e.single=s;function i(b){return t(b)?b:s(b)}e.wrap=i;function o(b){return b||n}e.from=o;function*l(b){for(let v=b.length-1;v>=0;v--)yield b[v]}e.reverse=l;function u(b){return!b||b[Symbol.iterator]().next().done===!0}e.isEmpty=u;function c(b){return b[Symbol.iterator]().next().value}e.first=c;function h(b,v){let N=0;for(const S of b)if(v(S,N++))return!0;return!1}e.some=h;function f(b,v){for(const N of b)if(v(N))return N}e.find=f;function*d(b,v){for(const N of b)v(N)&&(yield N)}e.filter=d;function*m(b,v){let N=0;for(const S of b)yield v(S,N++)}e.map=m;function*p(b,v){let N=0;for(const S of b)yield*v(S,N++)}e.flatMap=p;function*_(...b){for(const v of b)yield*v}e.concat=_;function L(b,v,N){let S=N;for(const T of b)S=v(S,T);return S}e.reduce=L;function*w(b,v,N=b.length){for(v<0&&(v+=b.length),N<0?N+=b.length:N>b.length&&(N=b.length);v1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function _i(...e){return Rt(()=>jn(e))}function Rt(e){return{dispose:yi(()=>{e()})}}var Zt=(Ye=class{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{jn(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ye.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&this._toDispose.delete(t)}},Ye.DISABLE_DISPOSED_WARNING=!1,Ye),Ct=(ht=class{constructor(){this._store=new Zt,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}},ht.None=Object.freeze({dispose(){}}),ht),Z=(Me=class{constructor(t){this.element=t,this.next=Me.Undefined,this.prev=Me.Undefined}},Me.Undefined=new Me(void 0),Me),wi=class{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let e=this._first;for(;e!==Z.Undefined;){const t=e.next;e.prev=Z.Undefined,e.next=Z.Undefined,e=t}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new Z(e);if(this._first===Z.Undefined)this._first=n,this._last=n;else if(t){const s=this._last;this._last=n,n.prev=s,s.next=n}else{const s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==Z.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Z.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Z.Undefined&&e.next!==Z.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Z.Undefined&&e.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):e.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):e.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Z.Undefined;)yield e.element,e=e.next}},Li=globalThis.performance&&typeof globalThis.performance.now=="function",Gn=class ri{static create(t){return new ri(t)}constructor(t){this._now=Li&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},At;(function(e){e.None=()=>Ct.None;function t(x,R){return d(x,()=>{},0,void 0,!0,void 0,R)}e.defer=t;function n(x){return(R,M=null,E)=>{let P=!1,B;return B=x(j=>{if(!P)return B?B.dispose():P=!0,R.call(M,j)},null,E),P&&B.dispose(),B}}e.once=n;function r(x,R){return e.once(e.filter(x,R))}e.onceIf=r;function s(x,R,M){return h((E,P=null,B)=>x(j=>E.call(P,R(j)),null,B),M)}e.map=s;function i(x,R,M){return h((E,P=null,B)=>x(j=>{R(j),E.call(P,j)},null,B),M)}e.forEach=i;function o(x,R,M){return h((E,P=null,B)=>x(j=>R(j)&&E.call(P,j),null,B),M)}e.filter=o;function l(x){return x}e.signal=l;function u(...x){return(R,M=null,E)=>{const P=_i(...x.map(B=>B(j=>R.call(M,j))));return f(P,E)}}e.any=u;function c(x,R,M,E){let P=M;return s(x,B=>(P=R(P,B),P),E)}e.reduce=c;function h(x,R){let M;const E={onWillAddFirstListener(){M=x(P.fire,P)},onDidRemoveLastListener(){M?.dispose()}},P=new pe(E);return R?.add(P),P.event}function f(x,R){return R instanceof Array?R.push(x):R&&R.add(x),x}function d(x,R,M=100,E=!1,P=!1,B,j){let ne,g,y,F=0,D;const W={leakWarningThreshold:B,onWillAddFirstListener(){ne=x(X=>{F++,g=R(g,X),E&&!y&&(O.fire(g),g=void 0),D=()=>{const be=g;g=void 0,y=void 0,(!E||F>1)&&O.fire(be),F=0},typeof M=="number"?(clearTimeout(y),y=setTimeout(D,M)):y===void 0&&(y=0,queueMicrotask(D))})},onWillRemoveListener(){P&&F>0&&D?.()},onDidRemoveLastListener(){D=void 0,ne.dispose()}},O=new pe(W);return j?.add(O),O.event}e.debounce=d;function m(x,R=0,M){return e.debounce(x,(E,P)=>E?(E.push(P),E):[P],R,void 0,!0,void 0,M)}e.accumulate=m;function p(x,R=(E,P)=>E===P,M){let E=!0,P;return o(x,B=>{const j=E||!R(B,P);return E=!1,P=B,j},M)}e.latch=p;function _(x,R,M){return[e.filter(x,R,M),e.filter(x,E=>!R(E),M)]}e.split=_;function L(x,R=!1,M=[],E){let P=M.slice(),B=x(g=>{P?P.push(g):ne.fire(g)});E&&E.add(B);const j=()=>{P?.forEach(g=>ne.fire(g)),P=null},ne=new pe({onWillAddFirstListener(){B||(B=x(g=>ne.fire(g)),E&&E.add(B))},onDidAddFirstListener(){P&&(R?setTimeout(j):j())},onDidRemoveLastListener(){B&&B.dispose(),B=null}});return E&&E.add(ne),ne.event}e.buffer=L;function w(x,R){return(E,P,B)=>{const j=R(new C);return x(function(ne){const g=j.evaluate(ne);g!==A&&E.call(P,g)},void 0,B)}}e.chain=w;const A=Symbol("HaltChainable");class C{constructor(){this.steps=[]}map(R){return this.steps.push(R),this}forEach(R){return this.steps.push(M=>(R(M),M)),this}filter(R){return this.steps.push(M=>R(M)?M:A),this}reduce(R,M){let E=M;return this.steps.push(P=>(E=R(E,P),E)),this}latch(R=(M,E)=>M===E){let M=!0,E;return this.steps.push(P=>{const B=M||!R(P,E);return M=!1,E=P,B?P:A}),this}evaluate(R){for(const M of this.steps)if(R=M(R),R===A)break;return R}}function b(x,R,M=E=>E){const E=(...ne)=>j.fire(M(...ne)),P=()=>x.on(R,E),B=()=>x.removeListener(R,E),j=new pe({onWillAddFirstListener:P,onDidRemoveLastListener:B});return j.event}e.fromNodeEventEmitter=b;function v(x,R,M=E=>E){const E=(...ne)=>j.fire(M(...ne)),P=()=>x.addEventListener(R,E),B=()=>x.removeEventListener(R,E),j=new pe({onWillAddFirstListener:P,onDidRemoveLastListener:B});return j.event}e.fromDOMEventEmitter=v;function N(x){return new Promise(R=>n(x)(R))}e.toPromise=N;function S(x){const R=new pe;return x.then(M=>{R.fire(M)},()=>{R.fire(void 0)}).finally(()=>{R.dispose()}),R.event}e.fromPromise=S;function T(x,R){return x(M=>R.fire(M))}e.forward=T;function G(x,R,M){return R(M),x(E=>R(E))}e.runAndSubscribe=G;class se{constructor(R,M){this._observable=R,this._counter=0,this._hasChanged=!1;const E={onWillAddFirstListener:()=>{R.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{R.removeObserver(this)}};this.emitter=new pe(E),M&&M.add(this.emitter)}beginUpdate(R){this._counter++}handlePossibleChange(R){}handleChange(R,M){this._hasChanged=!0}endUpdate(R){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function U(x,R){return new se(x,R).emitter.event}e.fromObservable=U;function I(x){return(R,M,E)=>{let P=0,B=!1;const j={beginUpdate(){P++},endUpdate(){P--,P===0&&(x.reportChanges(),B&&(B=!1,R.call(M)))},handlePossibleChange(){},handleChange(){B=!0}};x.addObserver(j),x.reportChanges();const ne={dispose(){x.removeObserver(j)}};return E instanceof Zt?E.add(ne):Array.isArray(E)&&E.push(ne),ne}}e.fromObservableLight=I})(At||(At={}));var Ni=(ke=class{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${ke._idPool++}`,ke.all.add(this)}start(t){this._stopWatch=new Gn,this.listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},ke.all=new Set,ke._idPool=0,ke),Si=-1,Ri=(Xe=class{constructor(t,n,r=(Xe._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){const r=this.threshold;if(r<=0||n{const i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(const[r,s]of this._stacks)(!t||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=new Ei(`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||pt)(u),Ct.None}if(this._disposed)return Ct.None;t&&(e=e.bind(t));const r=new Kt(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=Ci.create(),s=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Kt?(this._deliveryQueue??=new Mi,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;const i=Rt(()=>{s?.(),this._removeListener(r)});return n instanceof Zt?n.add(i):Array.isArray(n)&&n.push(i),i},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const r=this._deliveryQueue.current===this;if(this._size*xi<=t.length){let s=0;for(let i=0;i0}},Mi=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function ki(){return globalThis._VSCODE_NLS_MESSAGES}function Yn(){return globalThis._VSCODE_NLS_LANGUAGE}var Pi=Yn()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function Xn(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,s)=>{const i=s[0],o=t[i];let l=r;return typeof o=="string"?l=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(l=String(o)),l}),Pi&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function J(e,t,...n){return Xn(typeof e=="number"?Ti(e,t):t,n)}function Ti(e,t){const n=ki()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var tt="en",en=!1,tn=!1,nn=!1,Jn=!1,rn=!1,Et=void 0,sn=tt,Qn=tt,Di=void 0,Ce=void 0,Ae=globalThis,de=void 0;typeof Ae.vscode<"u"&&typeof Ae.vscode.process<"u"?de=Ae.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(de=process);var Fi=typeof de?.versions?.electron=="string",Ii=Fi&&de?.type==="renderer";if(typeof de=="object"){en=de.platform==="win32",tn=de.platform==="darwin",nn=de.platform==="linux",nn&&de.env.SNAP&&de.env.SNAP_REVISION,de.env.CI||de.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Et=tt,sn=tt;const e=de.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);Et=t.userLocale,Qn=t.osLocale,sn=t.resolvedLanguage||tt,Di=t.languagePack?.translationsConfigFile}catch{}Jn=!0}else typeof navigator=="object"&&!Ii?(Ce=navigator.userAgent,en=Ce.indexOf("Windows")>=0,tn=Ce.indexOf("Macintosh")>=0,(Ce.indexOf("Macintosh")>=0||Ce.indexOf("iPad")>=0||Ce.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,nn=Ce.indexOf("Linux")>=0,Ce?.indexOf("Mobi")>=0,rn=!0,sn=Yn()||tt,Et=navigator.language.toLowerCase(),Qn=Et):console.error("Unable to resolve platform.");var bt=en,Vi=tn,Bi=Jn,qi=rn,Ui=rn&&typeof Ae.importScripts=="function",Hi=Ui?Ae.origin:void 0,Le=Ce,$i=typeof Ae.postMessage=="function"&&!Ae.importScripts;(()=>{if($i){const e=[];Ae.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,s=e.length;r{const r=++t;e.push({id:r,callback:n}),Ae.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var Wi=!!(Le&&Le.indexOf("Chrome")>=0);Le&&Le.indexOf("Firefox")>=0,!Wi&&Le&&Le.indexOf("Safari")>=0,Le&&Le.indexOf("Edg/")>=0,Le&&Le.indexOf("Android")>=0;function Oi(e){return e}var zi=class{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Oi):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}},Zn=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function ji(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Gi(e){return e.split(/\r\n|\r|\n/)}function Yi(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Kn(e){return e>=65&&e<=90}function an(e){return 55296<=e&&e<=56319}function Ji(e){return 56320<=e&&e<=57343}function Qi(e,t){return(e-55296<<10)+(t-56320)+65536}function Zi(e,t,n){const r=e.charCodeAt(n);if(an(r)&&n+1JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),ge.cache=new zi({getCacheKey:JSON.stringify},t=>{function n(h){const f=new Map;for(let d=0;d!h.startsWith("_")&&h in i);o.length===0&&(o=["_default"]);let l;for(const h of o){const f=n(i[h]);l=s(l,f)}const u=n(i._common),c=r(u,l);return new ge(c)}),ge._locales=new Zn(()=>Object.keys(ge.ambiguousCharacterData.value).filter(t=>!t.startsWith("_"))),ge),ln=(Pe=class{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Pe.getRawData())),this._data}static isInvisibleCharacter(t){return Pe.getData().has(t)}static get codePoints(){return Pe.getData()}},Pe._data=void 0,Pe),nt,un=globalThis.vscode;if(typeof un<"u"&&typeof un.process<"u"){const e=un.process;nt={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?nt={get platform(){return process.platform},get arch(){return process.arch},get env(){return On},cwd(){return On.VSCODE_CWD||process.cwd()}}:nt={get platform(){return bt?"win32":Vi?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var xt=nt.cwd,ta=nt.env,na=nt.platform,ra=65,sa=97,ia=90,aa=122,Ve=46,ie=47,he=92,Be=58,oa=63,er=class extends Error{constructor(e,t,n){let r;typeof t=="string"&&t.indexOf("not ")===0?(r="must not be",t=t.replace(/^not /,"")):r="must be";const s=e.indexOf(".")!==-1?"property":"argument";let i=`The "${e}" ${s} ${r} of type ${t}`;i+=`. Received type ${typeof n}`,super(i),this.code="ERR_INVALID_ARG_TYPE"}};function la(e,t){if(e===null||typeof e!="object")throw new er(t,"Object",e)}function K(e,t){if(typeof e!="string")throw new er(t,"string",e)}var Ee=na==="win32";function q(e){return e===ie||e===he}function cn(e){return e===ie}function qe(e){return e>=ra&&e<=ia||e>=sa&&e<=aa}function Mt(e,t,n,r){let s="",i=0,o=-1,l=0,u=0;for(let c=0;c<=e.length;++c){if(c2){const h=s.lastIndexOf(n);h===-1?(s="",i=0):(s=s.slice(0,h),i=s.length-1-s.lastIndexOf(n)),o=c,l=0;continue}else if(s.length!==0){s="",i=0,o=c,l=0;continue}}t&&(s+=s.length>0?`${n}..`:"..",i=2)}else s.length>0?s+=`${n}${e.slice(o+1,c)}`:s=e.slice(o+1,c),i=c-o-1;o=c,l=0}else u===Ve&&l!==-1?++l:l=-1}return s}function ua(e){return e?`${e[0]==="."?"":"."}${e}`:""}function tr(e,t){la(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${ua(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}var le={resolve(...e){let t="",n="",r=!1;for(let s=e.length-1;s>=-1;s--){let i;if(s>=0){if(i=e[s],K(i,`paths[${s}]`),i.length===0)continue}else t.length===0?i=xt():(i=ta[`=${t}`]||xt(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===he)&&(i=`${t}\\`));const o=i.length;let l=0,u="",c=!1;const h=i.charCodeAt(0);if(o===1)q(h)&&(l=1,c=!0);else if(q(h))if(c=!0,q(i.charCodeAt(1))){let f=2,d=f;for(;f2&&q(i.charCodeAt(2))&&(c=!0,l=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(r){if(t.length>0)break}else if(n=`${i.slice(l)}\\${n}`,r=c,c&&t.length>0)break}return n=Mt(n,!r,"\\",q),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){K(e,"path");const t=e.length;if(t===0)return".";let n=0,r,s=!1;const i=e.charCodeAt(0);if(t===1)return cn(i)?"\\":e;if(q(i))if(s=!0,q(e.charCodeAt(1))){let l=2,u=l;for(;l2&&q(e.charCodeAt(2))&&(s=!0,n=3));let o=n0&&q(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?s?`\\${o}`:o:s?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){K(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return q(n)||t>2&&qe(n)&&e.charCodeAt(1)===Be&&q(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let i=0;i0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,s=0;if(typeof n=="string"&&q(n.charCodeAt(0))){++s;const i=n.length;i>1&&q(n.charCodeAt(1))&&(++s,i>2&&(q(n.charCodeAt(2))?++s:r=!1))}if(r){for(;s=2&&(t=`\\${t.slice(s)}`)}return le.normalize(t)},relative(e,t){if(K(e,"from"),K(t,"to"),e===t)return"";const n=le.resolve(e),r=le.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let s=0;for(;ss&&e.charCodeAt(i-1)===he;)i--;const o=i-s;let l=0;for(;ll&&t.charCodeAt(u-1)===he;)u--;const c=u-l,h=oh){if(t.charCodeAt(l+d)===he)return r.slice(l+d+1);if(d===2)return r.slice(l+d)}o>h&&(e.charCodeAt(s+d)===he?f=d:d===2&&(f=3)),f===-1&&(f=0)}let m="";for(d=s+f+1;d<=i;++d)(d===i||e.charCodeAt(d)===he)&&(m+=m.length===0?"..":"\\..");return l+=f,m.length>0?`${m}${r.slice(l,u)}`:(r.charCodeAt(l)===he&&++l,r.slice(l,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=le.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===he){if(t.charCodeAt(1)===he){const n=t.charCodeAt(2);if(n!==oa&&n!==Ve)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(qe(t.charCodeAt(0))&&t.charCodeAt(1)===Be&&t.charCodeAt(2)===he)return`\\\\?\\${t}`;return e},dirname(e){K(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const s=e.charCodeAt(0);if(t===1)return q(s)?e:".";if(q(s)){if(n=r=1,q(e.charCodeAt(1))){let l=2,u=l;for(;l2&&q(e.charCodeAt(2))?3:2,r=n);let i=-1,o=!0;for(let l=t-1;l>=r;--l)if(q(e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;if(i===-1){if(n===-1)return".";i=n}return e.slice(0,i)},basename(e,t){t!==void 0&&K(t,"suffix"),K(e,"path");let n=0,r=-1,s=!0,i;if(e.length>=2&&qe(e.charCodeAt(0))&&e.charCodeAt(1)===Be&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(i=e.length-1;i>=n;--i){const u=e.charCodeAt(i);if(q(u)){if(!s){n=i+1;break}}else l===-1&&(s=!1,l=i+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=i):(o=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(i=e.length-1;i>=n;--i)if(q(e.charCodeAt(i))){if(!s){n=i+1;break}}else r===-1&&(s=!1,r=i+1);return r===-1?"":e.slice(n,r)},extname(e){K(e,"path");let t=0,n=-1,r=0,s=-1,i=!0,o=0;e.length>=2&&e.charCodeAt(1)===Be&&qe(e.charCodeAt(0))&&(t=r=2);for(let l=e.length-1;l>=t;--l){const u=e.charCodeAt(l);if(q(u)){if(!i){r=l+1;break}continue}s===-1&&(i=!1,s=l+1),u===Ve?n===-1?n=l:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||s===-1||o===0||o===1&&n===s-1&&n===r+1?"":e.slice(n,s)},format:tr.bind(null,"\\"),parse(e){K(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,s=e.charCodeAt(0);if(n===1)return q(s)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(q(s)){if(r=1,q(e.charCodeAt(1))){let f=2,d=f;for(;f0&&(t.root=e.slice(0,r));let i=-1,o=r,l=-1,u=!0,c=e.length-1,h=0;for(;c>=r;--c){if(s=e.charCodeAt(c),q(s)){if(!u){o=c+1;break}continue}l===-1&&(u=!1,l=c+1),s===Ve?i===-1?i=c:h!==1&&(h=1):i!==-1&&(h=-1)}return l!==-1&&(i===-1||h===0||h===1&&i===l-1&&i===o+1?t.base=t.name=e.slice(o,l):(t.name=e.slice(o,i),t.base=e.slice(o,l),t.ext=e.slice(i,l))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ca=(()=>{if(Ee){const e=/\\/g;return()=>{const t=xt().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>xt()})(),ue={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const s=r>=0?e[r]:ca();K(s,`paths[${r}]`),s.length!==0&&(t=`${s}/${t}`,n=s.charCodeAt(0)===ie)}return t=Mt(t,!n,"/",cn),n?`/${t}`:t.length>0?t:"."},normalize(e){if(K(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ie,n=e.charCodeAt(e.length-1)===ie;return e=Mt(e,!t,"/",cn),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return K(e,"path"),e.length>0&&e.charCodeAt(0)===ie},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":ue.normalize(t)},relative(e,t){if(K(e,"from"),K(t,"to"),e===t||(e=ue.resolve(e),t=ue.resolve(t),e===t))return"";const n=1,r=e.length,s=r-n,i=1,o=t.length-i,l=sl){if(t.charCodeAt(i+c)===ie)return t.slice(i+c+1);if(c===0)return t.slice(i+c)}else s>l&&(e.charCodeAt(n+c)===ie?u=c:c===0&&(u=0));let h="";for(c=n+u+1;c<=r;++c)(c===r||e.charCodeAt(c)===ie)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(i+u)}`},toNamespacedPath(e){return e},dirname(e){if(K(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===ie;let n=-1,r=!0;for(let s=e.length-1;s>=1;--s)if(e.charCodeAt(s)===ie){if(!r){n=s;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&K(t,"ext"),K(e,"path");let n=0,r=-1,s=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){const u=e.charCodeAt(i);if(u===ie){if(!s){n=i+1;break}}else l===-1&&(s=!1,l=i+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=i):(o=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===ie){if(!s){n=i+1;break}}else r===-1&&(s=!1,r=i+1);return r===-1?"":e.slice(n,r)},extname(e){K(e,"path");let t=-1,n=0,r=-1,s=!0,i=0;for(let o=e.length-1;o>=0;--o){const l=e.charCodeAt(o);if(l===ie){if(!s){n=o+1;break}continue}r===-1&&(s=!1,r=o+1),l===Ve?t===-1?t=o:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||r===-1||i===0||i===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:tr.bind(null,"/"),parse(e){K(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===ie;let r;n?(t.root="/",r=1):r=0;let s=-1,i=0,o=-1,l=!0,u=e.length-1,c=0;for(;u>=r;--u){const h=e.charCodeAt(u);if(h===ie){if(!l){i=u+1;break}continue}o===-1&&(l=!1,o=u+1),h===Ve?s===-1?s=u:c!==1&&(c=1):s!==-1&&(c=-1)}if(o!==-1){const h=i===0&&n?1:i;s===-1||c===0||c===1&&s===o-1&&s===i+1?t.base=t.name=e.slice(h,o):(t.name=e.slice(h,s),t.base=e.slice(h,o),t.ext=e.slice(s,o))}return i>0?t.dir=e.slice(0,i-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ue.win32=le.win32=le,ue.posix=le.posix=ue,Ee?le.normalize:ue.normalize;var ha=Ee?le.join:ue.join;Ee?le.resolve:ue.resolve,Ee?le.relative:ue.relative,Ee?le.dirname:ue.dirname,Ee?le.basename:ue.basename,Ee?le.extname:ue.extname,Ee?le.sep:ue.sep;var fa=/^\w[\w\d+.-]*$/,ma=/^\//,da=/^\/\//;function ga(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!fa.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!ma.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(da.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function pa(e,t){return!e&&!t?"file":e}function ba(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==_e&&(t=_e+t):t=_e;break}return t}var Y="",_e="/",va=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Ne=class zt{static isUri(t){return t instanceof zt?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,s,i,o=!1){typeof t=="object"?(this.scheme=t.scheme||Y,this.authority=t.authority||Y,this.path=t.path||Y,this.query=t.query||Y,this.fragment=t.fragment||Y):(this.scheme=pa(t,o),this.authority=n||Y,this.path=ba(this.scheme,r||Y),this.query=s||Y,this.fragment=i||Y,ga(this,o))}get fsPath(){return hn(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:s,query:i,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=Y),r===void 0?r=this.authority:r===null&&(r=Y),s===void 0?s=this.path:s===null&&(s=Y),i===void 0?i=this.query:i===null&&(i=Y),o===void 0?o=this.fragment:o===null&&(o=Y),n===this.scheme&&r===this.authority&&s===this.path&&i===this.query&&o===this.fragment?this:new rt(n,r,s,i,o)}static parse(t,n=!1){const r=va.exec(t);return r?new rt(r[2]||Y,kt(r[4]||Y),kt(r[5]||Y),kt(r[7]||Y),kt(r[9]||Y),n):new rt(Y,Y,Y,Y,Y)}static file(t){let n=Y;if(bt&&(t=t.replace(/\\/g,_e)),t[0]===_e&&t[1]===_e){const r=t.indexOf(_e,2);r===-1?(n=t.substring(2),t=_e):(n=t.substring(2,r),t=t.substring(r)||_e)}return new rt("file",n,t,Y,Y)}static from(t,n){return new rt(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return bt&&t.scheme==="file"?r=zt.file(le.join(hn(t,!0),...n)).path:r=ue.join(t.path,...n),t.with({path:r})}toString(t=!1){return fn(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof zt)return t;{const n=new rt(t);return n._formatted=t.external??null,n._fsPath=t._sep===nr?t.fsPath??null:null,n}}else return t}},nr=bt?1:void 0,rt=class extends Ne{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=hn(this,!1)),this._fsPath}toString(e=!1){return e?fn(this,!0):(this._formatted||(this._formatted=fn(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=nr),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},rr={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function sr(e,t,n){let r,s=-1;for(let i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)s!==-1&&(r+=encodeURIComponent(e.substring(s,i)),s=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));const l=rr[o];l!==void 0?(s!==-1&&(r+=encodeURIComponent(e.substring(s,i)),s=-1),r+=l):s===-1&&(s=i)}}return s!==-1&&(r+=encodeURIComponent(e.substring(s))),r!==void 0?r:e}function ya(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,bt&&(n=n.replace(/\//g,"\\")),n}function fn(e,t){const n=t?ya:sr;let r="",{scheme:s,authority:i,path:o,query:l,fragment:u}=e;if(s&&(r+=s,r+=":"),(i||s==="file")&&(r+=_e,r+=_e),i){let c=i.indexOf("@");if(c!==-1){const h=i.substr(0,c);i=i.substr(c+1),c=h.lastIndexOf(":"),c===-1?r+=n(h,!1,!1):(r+=n(h.substr(0,c),!1,!1),r+=":",r+=n(h.substr(c+1),!1,!0)),r+="@"}i=i.toLowerCase(),c=i.lastIndexOf(":"),c===-1?r+=n(i,!1,!0):(r+=n(i.substr(0,c),!1,!0),r+=i.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const c=o.charCodeAt(1);c>=65&&c<=90&&(o=`/${String.fromCharCode(c+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const c=o.charCodeAt(0);c>=65&&c<=90&&(o=`${String.fromCharCode(c+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return l&&(r+="?",r+=n(l,!1,!1)),u&&(r+="#",r+=t?u:sr(u,!1,!1)),r}function ir(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ir(e.substr(3)):e}}var ar=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function kt(e){return e.match(ar)?e.replace(ar,t=>ir(t)):e}var Ue;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(Ue||(Ue={}));var _a="tkn",wa=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return ue.join(this._serverRootPath,Ue.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(o){return pt(o),e}const t=e.authority;let n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);const r=this._ports[t],s=this._connectionTokens[t];let i=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(i+=`&${_a}=${encodeURIComponent(s)}`),Ne.from({scheme:qi?this._preferredWebSchema:Ue.vscodeRemoteResource,authority:`${n}:${r}`,path:this._remoteResourcesPath,query:i})}},La=new wa,Na="vscode-app",Sa=(We=class{asBrowserUri(t){const n=this.toUri(t);return this.uriToBrowserUri(n)}uriToBrowserUri(t){return t.scheme===Ue.vscodeRemote?La.rewrite(t):t.scheme===Ue.file&&(Bi||Hi===`${Ue.vscodeFileResource}://${We.FALLBACK_AUTHORITY}`)?t.with({scheme:Ue.vscodeFileResource,authority:t.authority||We.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(t,n){if(Ne.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){const r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return Ne.joinPath(Ne.parse(r,!0),t);const s=ha(r,t);return Ne.file(s)}return Ne.parse(n.toUrl(t))}},We.FALLBACK_AUTHORITY=Na,We),or=new Sa,lr;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function r(i){let o;typeof i=="string"?o=new URL(i).searchParams:i instanceof URL?o=i.searchParams:Ne.isUri(i)&&(o=new URL(i.toString(!0)).searchParams);const l=o?.get(n);if(l)return t.get(l)}e.getHeadersFromQuery=r;function s(i,o,l){if(!globalThis.crossOriginIsolated)return;const u=o&&l?"3":l?"2":"1";i instanceof URLSearchParams?i.set(n,u):i[n]=u}e.addSearchParam=s})(lr||(lr={}));var mn="default",Ra="$initialize",Ca=class{constructor(e,t,n,r,s){this.vsWorker=e,this.req=t,this.channel=n,this.method=r,this.args=s,this.type=0}},ur=class{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}},Aa=class{constructor(e,t,n,r,s){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=r,this.arg=s,this.type=2}},Ea=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},xa=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},Ma=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const r=String(++this._lastSentReq);return new Promise((s,i)=>{this._pendingReplies[r]={resolve:s,reject:i},this._send(new Ca(this._workerId,r,e,t,n))})}listen(e,t,n){let r=null;const s=new pe({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,s),this._send(new Aa(this._workerId,r,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new xa(this._workerId,r)),r=null}});return s.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,t){const n={get:(r,s)=>(typeof s=="string"&&!r[s]&&(hr(s)?r[s]=i=>this.listen(e,s,i):cr(s)?r[s]=this.listen(e,s,void 0):s.charCodeAt(0)===36&&(r[s]=async(...i)=>(await t?.(),this.sendMessage(e,s,i)))),r[s])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(r=>{this._send(new ur(this._workerId,t,r,void 0))},r=>{r.detail instanceof Error&&(r.detail=zn(r.detail)),this._send(new ur(this._workerId,t,void 0,zn(r)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(r=>{this._send(new Ea(this._workerId,t,r))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let n=0;n{e(n,r)},handleMessage:(n,r,s)=>this._handleMessage(n,r,s),handleEvent:(n,r,s)=>this._handleEvent(n,r,s)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===mn&&t===Ra)return this.initialize(n[0],n[1],n[2]);const r=e===mn?this._requestHandler:this._localChannels.get(e);if(!r)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if(typeof r[t]!="function")return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(r[t].apply(r,n))}catch(s){return Promise.reject(s)}}_handleEvent(e,t,n){const r=e===mn?this._requestHandler:this._localChannels.get(e);if(!r)throw new Error(`Missing channel ${e} on worker thread`);if(hr(t)){const s=r[t].call(r,n);if(typeof s!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);return s}if(cr(t)){const s=r[t];if(typeof s!="function")throw new Error(`Missing event ${t} on request handler.`);return s}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,n){if(this._protocol.setWorkerId(e),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}return t&&(typeof t.baseUrl<"u"&&delete t.baseUrl,typeof t.paths<"u"&&typeof t.paths.vs<"u"&&delete t.paths.vs,typeof t.trustedTypesPolicy<"u"&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t)),import(`${or.asBrowserUri(`${n}.js`).toString(!0)}`).then(s=>{if(this._requestHandler=s.create(this),!this._requestHandler)throw new Error("No RequestHandler!")})}},He=class{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function fr(e,t){return(t<<5)-t+e|0}function Pa(e,t){t=fr(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new He(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},gr=class ft{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[s,i,o]=ft._getElements(t),[l,u,c]=ft._getElements(n);this._hasStrings=o&&c,this._originalStringElements=s,this._originalElementsOrHash=i,this._modifiedStringElements=l,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(ft._isStringArray(n)){const r=new Int32Array(n.length);for(let s=0,i=n.length;s=t&&s>=r&&this.ElementsAreEqual(n,s);)n--,s--;if(t>n||r>s){let f;return r<=s?(st.Assert(t===n+1,"originalStart should only be one more than originalEnd"),f=[new He(t,0,r,s-r+1)]):t<=n?(st.Assert(r===s+1,"modifiedStart should only be one more than modifiedEnd"),f=[new He(t,n-t+1,r,0)]):(st.Assert(t===n+1,"originalStart should only be one more than originalEnd"),st.Assert(r===s+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const o=[0],l=[0],u=this.ComputeRecursionPoint(t,n,r,s,o,l,i),c=o[0],h=l[0];if(u!==null)return u;if(!i[0]){const f=this.ComputeDiffRecursive(t,c,r,h,i);let d=[];return i[0]?d=[new He(c+1,n-(c+1)+1,h+1,s-(h+1)+1)]:d=this.ComputeDiffRecursive(c+1,n,h+1,s,i),this.ConcatenateChanges(f,d)}return[new He(t,n-t+1,r,s-r+1)]}WALKTRACE(t,n,r,s,i,o,l,u,c,h,f,d,m,p,_,L,w,A){let C=null,b=null,v=new dr,N=n,S=r,T=m[0]-L[0]-s,G=-1073741824,se=this.m_forwardHistory.length-1;do{const U=T+t;U===N||U=0&&(c=this.m_forwardHistory[se],t=c[0],N=1,S=c.length-1)}while(--se>=-1);if(C=v.getReverseChanges(),A[0]){let U=m[0]+1,I=L[0]+1;if(C!==null&&C.length>0){const x=C[C.length-1];U=Math.max(U,x.getOriginalEnd()),I=Math.max(I,x.getModifiedEnd())}b=[new He(U,d-U+1,I,_-I+1)]}else{v=new dr,N=o,S=l,T=m[0]-L[0]-u,G=1073741824,se=w?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const U=T+i;U===N||U=h[U+1]?(f=h[U+1]-1,p=f-T-u,f>G&&v.MarkNextChange(),G=f+1,v.AddOriginalElement(f+1,p+1),T=U+1-i):(f=h[U-1],p=f-T-u,f>G&&v.MarkNextChange(),G=f,v.AddModifiedElement(f+1,p+1),T=U-1-i),se>=0&&(h=this.m_reverseHistory[se],i=h[0],N=1,S=h.length-1)}while(--se>=-1);b=v.getChanges()}return this.ConcatenateChanges(C,b)}ComputeRecursionPoint(t,n,r,s,i,o,l){let u=0,c=0,h=0,f=0,d=0,m=0;t--,r--,i[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=n-t+(s-r),_=p+1,L=new Int32Array(_),w=new Int32Array(_),A=s-r,C=n-t,b=t-r,v=n-s,S=(C-A)%2===0;L[A]=t,w[C]=n,l[0]=!1;for(let T=1;T<=p/2+1;T++){let G=0,se=0;h=this.ClipDiagonalBound(A-T,T,A,_),f=this.ClipDiagonalBound(A+T,T,A,_);for(let I=h;I<=f;I+=2){I===h||IG+se&&(G=u,se=c),!S&&Math.abs(I-C)<=T-1&&u>=w[I])return i[0]=u,o[0]=c,x<=w[I]&&T<=1448?this.WALKTRACE(A,h,f,b,C,d,m,v,L,w,u,n,i,c,s,o,S,l):null}const U=(G-t+(se-r)-T)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(G,U))return l[0]=!0,i[0]=G,o[0]=se,U>0&&T<=1448?this.WALKTRACE(A,h,f,b,C,d,m,v,L,w,u,n,i,c,s,o,S,l):(t++,r++,[new He(t,n-t+1,r,s-r+1)]);d=this.ClipDiagonalBound(C-T,T,C,_),m=this.ClipDiagonalBound(C+T,T,C,_);for(let I=d;I<=m;I+=2){I===d||I=w[I+1]?u=w[I+1]-1:u=w[I-1],c=u-(I-C)-v;const x=u;for(;u>t&&c>r&&this.ElementsAreEqual(u,c);)u--,c--;if(w[I]=u,S&&Math.abs(I-A)<=T&&u<=L[I])return i[0]=u,o[0]=c,x>=L[I]&&T<=1448?this.WALKTRACE(A,h,f,b,C,d,m,v,L,w,u,n,i,c,s,o,S,l):null}if(T<=1447){let I=new Int32Array(f-h+2);I[0]=A-h+1,it.Copy2(L,h,I,1,f-h+1),this.m_forwardHistory.push(I),I=new Int32Array(m-d+2),I[0]=C-d+1,it.Copy2(w,d,I,1,m-d+1),this.m_reverseHistory.push(I)}}return this.WALKTRACE(A,h,f,b,C,d,m,v,L,w,u,n,i,c,s,o,S,l)}PrettifyChanges(t){for(let n=0;n0,l=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let s=0,i=0;if(n>0){const f=t[n-1];s=f.originalStart+f.originalLength,i=f.modifiedStart+f.modifiedLength}const o=r.originalLength>0,l=r.modifiedLength>0;let u=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let f=1;;f++){const d=r.originalStart-f,m=r.modifiedStart-f;if(dc&&(c=_,u=f)}r.originalStart-=u,r.modifiedStart-=u;const h=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],h)){t[n-1]=h[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&m>u&&(u=m,c=f,h=d)}return u>0?[c,h]:null}_contiguousSequenceScore(t,n,r){let s=0;for(let i=0;i=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,s){const i=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,s)?1:0;return i+o}ConcatenateChanges(t,n){const r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const s=new Array(t.length+n.length-1);return it.Copy(t,0,s,0,t.length-1),s[t.length-1]=r[0],it.Copy(n,1,s,t.length,n.length-1),s}else{const s=new Array(t.length+n.length);return it.Copy(t,0,s,0,t.length),it.Copy(n,0,s,t.length,n.length),s}}ChangesOverlap(t,n,r){if(st.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),st.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const s=t.originalStart;let i=t.originalLength;const o=t.modifiedStart;let l=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(l=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new He(s,i,o,l),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,s){if(t>=0&&tr||t===r&&n>s?(this.startLineNumber=r,this.startColumn=s,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=s)}isEmpty(){return te.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return te.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return te.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return te.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return te.plusRange(this,t)}static plusRange(t,n){let r,s,i,o;return n.startLineNumbert.endLineNumber?(i=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(i=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(i=t.endLineNumber,o=t.endColumn),new te(r,s,i,o)}intersectRanges(t){return te.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,s=t.startColumn,i=t.endLineNumber,o=t.endColumn;const l=n.startLineNumber,u=n.startColumn,c=n.endLineNumber,h=n.endColumn;return rc?(i=c,o=h):i===c&&(o=Math.min(o,h)),r>i||r===i&&s>o?null:new te(r,s,i,o)}equalsRange(t){return te.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return te.getEndPosition(this)}static getEndPosition(t){return new ee(t.endLineNumber,t.endColumn)}getStartPosition(){return te.getStartPosition(this)}static getStartPosition(t){return new ee(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new te(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new te(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return te.collapseToStart(this)}static collapseToStart(t){return new te(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return te.collapseToEnd(this)}static collapseToEnd(t){return new te(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new te(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new te(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new te(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function pr(e){return e<0?0:e>255?255:e|0}function at(e){return e<0?0:e>4294967295?4294967295:e|0}var Da=class ii{constructor(t){const n=pr(t);this._defaultValue=n,this._asciiMap=ii._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=pr(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},Fa=class{constructor(e,t,n){const r=new Uint8Array(e*t);for(let s=0,i=e*t;st&&(t=l),o>n&&(n=o),u>n&&(n=u)}t++,n++;const r=new Fa(n,t,0);for(let s=0,i=e.length;s=this._maxCharCode?0:this._states.get(e,t)}},dn=null;function Va(){return dn===null&&(dn=new Ia([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),dn}var vt=null;function Ba(){if(vt===null){vt=new Da(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let n=0;ns);if(s>0){const l=n.charCodeAt(s-1),u=n.charCodeAt(o);(l===40&&u===41||l===91&&u===93||l===123&&u===125)&&o--}return{range:{startLineNumber:r,startColumn:s+1,endLineNumber:r,endColumn:o+2},url:n.substring(s,o+1)}}static computeLinks(t,n=Va()){const r=Ba(),s=[];for(let i=1,o=t.getLineCount();i<=o;i++){const l=t.getLineContent(i),u=l.length;let c=0,h=0,f=0,d=1,m=!1,p=!1,_=!1,L=!1;for(;c=0?(s+=r?1:-1,s<0?s=t.length-1:s%=t.length,t[s]):null}},Je.INSTANCE=new Je,Je),br=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),Pt;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Tt?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:At.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:br})})(Pt||(Pt={}));var Tt=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?br:(this._emitter||(this._emitter=new pe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},$a=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Tt),this._token}cancel(){this._token?this._token instanceof Tt&&this._token.cancel():this._token=Pt.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Tt&&this._token.dispose():this._token=Pt.None}},gn=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Dt=new gn,pn=new gn,bn=new gn,Wa=new Array(230),Oa=Object.create(null),za=Object.create(null);(function(){const t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const s of t){const[i,o,l,u,c,h,f,d,m]=s;if(r[o]||(r[o]=!0,Oa[l]=o,za[l.toLowerCase()]=o),!n[u]){if(n[u]=!0,!c)throw new Error(`String representation missing for key code ${u} around scan code ${l}`);Dt.define(u,c),pn.define(u,d||c),bn.define(u,m||d||c)}h&&(Wa[h]=u)}})();var vr;(function(e){function t(l){return Dt.keyCodeToStr(l)}e.toString=t;function n(l){return Dt.strToKeyCode(l)}e.fromString=n;function r(l){return pn.keyCodeToStr(l)}e.toUserSettingsUS=r;function s(l){return bn.keyCodeToStr(l)}e.toUserSettingsGeneral=s;function i(l){return pn.strToKeyCode(l)||bn.strToKeyCode(l)}e.fromUserSettings=i;function o(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Dt.keyCodeToStr(l)}e.toElectronAccelerator=o})(vr||(vr={}));function ja(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}var Ga=class ve extends H{constructor(t,n,r,s){super(t,n,r,s),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=s}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return ve.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new ve(this.startLineNumber,this.startColumn,t,n):new ve(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new ee(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ee(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new ve(t,n,this.endLineNumber,this.endColumn):new ve(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new ve(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new ve(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new ve(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new ve(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,s=t.length;r{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new Qa(this,e,t);return this._factories.set(e,n),Rt(()=>{const r=this._factories.get(e);!r||r!==n||(this._factories.delete(e),r.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Qa=class extends Ct{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}},Za=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}},wr;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(wr||(wr={}));var Lr;(function(e){const t=new Map;t.set(0,k.symbolMethod),t.set(1,k.symbolFunction),t.set(2,k.symbolConstructor),t.set(3,k.symbolField),t.set(4,k.symbolVariable),t.set(5,k.symbolClass),t.set(6,k.symbolStruct),t.set(7,k.symbolInterface),t.set(8,k.symbolModule),t.set(9,k.symbolProperty),t.set(10,k.symbolEvent),t.set(11,k.symbolOperator),t.set(12,k.symbolUnit),t.set(13,k.symbolValue),t.set(15,k.symbolEnum),t.set(14,k.symbolConstant),t.set(15,k.symbolEnum),t.set(16,k.symbolEnumMember),t.set(17,k.symbolKeyword),t.set(27,k.symbolSnippet),t.set(18,k.symbolText),t.set(19,k.symbolColor),t.set(20,k.symbolFile),t.set(21,k.symbolReference),t.set(22,k.symbolCustomColor),t.set(23,k.symbolFolder),t.set(24,k.symbolTypeParameter),t.set(25,k.account),t.set(26,k.issues);function n(i){let o=t.get(i);return o||(console.info("No codicon found for CompletionItemKind "+i),o=k.symbolProperty),o}e.toIcon=n;const r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function s(i,o){let l=r.get(i);return typeof l>"u"&&!o&&(l=9),l}e.fromString=s})(Lr||(Lr={}));var Nr;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Nr||(Nr={}));var Sr;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(Sr||(Sr={}));var Rr;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Rr||(Rr={}));var Cr;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Cr||(Cr={})),J("Array","array"),J("Boolean","boolean"),J("Class","class"),J("Constant","constant"),J("Constructor","constructor"),J("Enum","enumeration"),J("EnumMember","enumeration member"),J("Event","event"),J("Field","field"),J("File","file"),J("Function","function"),J("Interface","interface"),J("Key","key"),J("Method","method"),J("Module","module"),J("Namespace","namespace"),J("Null","null"),J("Number","number"),J("Object","object"),J("Operator","operator"),J("Package","package"),J("Property","property"),J("String","string"),J("Struct","struct"),J("TypeParameter","type parameter"),J("Variable","variable");var Ar;(function(e){const t=new Map;t.set(0,k.symbolFile),t.set(1,k.symbolModule),t.set(2,k.symbolNamespace),t.set(3,k.symbolPackage),t.set(4,k.symbolClass),t.set(5,k.symbolMethod),t.set(6,k.symbolProperty),t.set(7,k.symbolField),t.set(8,k.symbolConstructor),t.set(9,k.symbolEnum),t.set(10,k.symbolInterface),t.set(11,k.symbolFunction),t.set(12,k.symbolVariable),t.set(13,k.symbolConstant),t.set(14,k.symbolString),t.set(15,k.symbolNumber),t.set(16,k.symbolBoolean),t.set(17,k.symbolArray),t.set(18,k.symbolObject),t.set(19,k.symbolKey),t.set(20,k.symbolNull),t.set(21,k.symbolEnumMember),t.set(22,k.symbolStruct),t.set(23,k.symbolEvent),t.set(24,k.symbolOperator),t.set(25,k.symbolTypeParameter);function n(r){let s=t.get(r);return s||(console.info("No codicon found for SymbolKind "+r),s=k.symbolProperty),s}e.toIcon=n})(Ar||(Ar={})),ce=class{static fromValue(t){switch(t){case"comment":return ce.Comment;case"imports":return ce.Imports;case"region":return ce.Region}return new ce(t)}constructor(t){this.value=t}},ce.Comment=new ce("comment"),ce.Imports=new ce("imports"),ce.Region=new ce("region");var Er;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Er||(Er={}));var xr;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(xr||(xr={}));var Mr;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(Mr||(Mr={}));var kr;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(kr||(kr={})),new _r,new _r;var Pr;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Pr||(Pr={}));var Tr;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(Tr||(Tr={}));var Dr;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(Dr||(Dr={}));var Fr;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Fr||(Fr={}));var Ir;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(Ir||(Ir={}));var Vr;(function(e){e[e.Deprecated=1]="Deprecated"})(Vr||(Vr={}));var Br;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Br||(Br={}));var qr;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(qr||(qr={}));var Ur;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(Ur||(Ur={}));var Hr;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Hr||(Hr={}));var $r;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})($r||($r={}));var Wr;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(Wr||(Wr={}));var Or;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(Or||(Or={}));var zr;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(zr||(zr={}));var jr;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(jr||(jr={}));var Gr;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Gr||(Gr={}));var Yr;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Yr||(Yr={}));var Xr;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(Xr||(Xr={}));var Jr;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Jr||(Jr={}));var Qr;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Qr||(Qr={}));var Zr;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Zr||(Zr={}));var Kr;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Kr||(Kr={}));var vn;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(vn||(vn={}));var yn;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(yn||(yn={}));var _n;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(_n||(_n={}));var es;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(es||(es={}));var ts;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(ts||(ts={}));var ns;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(ns||(ns={}));var rs;(function(e){e[e.AIGenerated=1]="AIGenerated"})(rs||(rs={}));var ss;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(ss||(ss={}));var is;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(is||(is={}));var as;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(as||(as={}));var os;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(os||(os={}));var ls;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(ls||(ls={}));var us;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(us||(us={}));var cs;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(cs||(cs={}));var hs;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(hs||(hs={}));var fs;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(fs||(fs={}));var wn;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(wn||(wn={}));var ms;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(ms||(ms={}));var ds;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(ds||(ds={}));var gs;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(gs||(gs={}));var ps;(function(e){e[e.Deprecated=1]="Deprecated"})(ps||(ps={}));var bs;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(bs||(bs={}));var vs;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(vs||(vs={}));var ys;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(ys||(ys={}));var _s;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(_s||(_s={}));var Ka=(Te=class{static chord(t,n){return ja(t,n)}},Te.CtrlCmd=2048,Te.Shift=1024,Te.Alt=512,Te.WinCtrl=256,Te);function eo(){return{editor:void 0,languages:void 0,CancellationTokenSource:$a,Emitter:pe,KeyCode:vn,KeyMod:Ka,Position:ee,Range:H,Selection:Ga,SelectionDirection:wn,MarkerSeverity:yn,MarkerTag:_n,Uri:Ne,Token:Za}}var to=(Oe=class{static getChannel(t){return t.getChannel(Oe.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(Oe.CHANNEL_NAME,n)}},Oe.CHANNEL_NAME="editorWorkerHost",Oe),ws,no=class{constructor(){this[ws]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,n!==0&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const s={value:n.key,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const s={value:n.value,done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const s={value:[n.key,n.value],done:!1};return n=n.next,s}else return{value:void 0,done:!0}}};return r}[(ws=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const n=e.next,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}},ro=class extends no{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},so=class extends ro{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}},io=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}};new so(10);function ao(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function Ls(e){const t=[];for(const n of ao(e))typeof e[n]=="function"&&t.push(n);return t}function oo(e,t){const n=s=>function(){const i=Array.prototype.slice.call(arguments,0);return t(s,i)},r={};for(const s of e)r[s]=n(s);return r}var Ns;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Ns||(Ns={}));var Ss;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Ss||(Ss={}));var Rs;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Rs||(Rs={}));function lo(e,t,n,r,s){if(r===0)return!0;const i=t.charCodeAt(r-1);if(e.get(i)!==0||i===13||i===10)return!0;if(s>0){const o=t.charCodeAt(r);if(e.get(o)!==0)return!0}return!1}function uo(e,t,n,r,s){if(r+s===n)return!0;const i=t.charCodeAt(r+s);if(e.get(i)!==0||i===13||i===10)return!0;if(s>0){const o=t.charCodeAt(r+s-1);if(e.get(o)!==0)return!0}return!1}function co(e,t,n,r,s){return lo(e,t,n,r,s)&&uo(e,t,n,r,s)}var ho=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;const r=n.index,s=n[0].length;if(r===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Zi(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=s,!this._wordSeparators||co(this._wordSeparators,e,t,r,s))return n}while(n);return null}};function fo(e,t="Unreachable"){throw new Error(t)}function Ft(e){if(!e()){debugger;e(),pt(new ye("Assertion Failed"))}}function Cs(e,t){let n=0;for(;n/?";function go(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of mo)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}var As=go();function Es(e){let t=As;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var xs=new wi;xs.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Ln(e,t,n,r,s){if(t=Es(t),s||(s=St.first(xs)),n.length>s.maxLen){let c=e-s.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,e+s.maxLen/2),Ln(e,t,n,r,s)}const i=Date.now(),o=e-1-r;let l=-1,u=null;for(let c=1;!(Date.now()-i>=s.timeBudget);c++){const h=o-s.windowSize*c;t.lastIndex=Math.max(0,h);const f=po(t,n,o,l);if(!f&&u||(u=f,h<=0))break;l=h}if(u){const c={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,c}return null}function po(e,t,n,r){let s;for(;s=e.exec(t);){const i=s.index||0;if(i<=n&&e.lastIndex>=n)return s;if(r>0&&i>r)return null}return null}var bo=class{static computeUnicodeHighlights(e,t,n){const r=n?n.startLineNumber:1,s=n?n.endLineNumber:e.getLineCount(),i=new Ms(t),o=i.getCandidateCodePoints();let l;o==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${vo(Array.from(o))}`,"g");const u=new ho(null,l),c=[];let h=!1,f,d=0,m=0,p=0;e:for(let _=r,L=s;_<=L;_++){const w=e.getLineContent(_),A=w.length;u.reset(0);do if(f=u.next(w),f){let C=f.index,b=f.index+f[0].length;if(C>0){const T=w.charCodeAt(C-1);an(T)&&C--}if(b+1=1e3){h=!0;break e}c.push(new H(_,C+1,_,b+1))}}while(f)}return{ranges:c,hasMore:h,ambiguousCharacterCount:d,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,t){const n=new Ms(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),i=n.ambiguousCharacters.getPrimaryConfusable(s),o=on.getLocales().filter(l=>!on.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(i),notAmbiguousInLocales:o}}case 1:return{kind:2}}}};function vo(e,t){return`[${ji(e.map(r=>String.fromCodePoint(r)).join(""))}]`}var Ms=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=on.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of ln.codePoints)ks(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,s=!1;if(t)for(const i of t){const o=i.codePointAt(0),l=ea(i);r=r||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!ln.isInvisibleCharacter(o)&&(s=!0)}return!r&&s?0:this.options.invisibleCharacters&&!ks(e)&&ln.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}};function ks(e){return e===" "||e===` -`||e===" "}var It=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},yo=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}},Q=class Re{static addRange(t,n){let r=0;for(;rn))return new Re(t,n)}static ofLength(t){return new Re(0,t)}static ofStartAndLength(t,n){return new Re(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new ye(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new Re(this.start+t,this.endExclusive+t)}deltaStart(t){return new Re(this.start+t,this.endExclusive)}deltaEnd(t){return new Re(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new ye(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new ye(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new ye(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ts.endLineNumberExclusive>=t.startLineNumber),r=yt(this._normalizedRanges,s=>s.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){const s=this._normalizedRanges[n];this._normalizedRanges[n]=s.join(t)}else{const s=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,s)}}contains(t){const n=ot(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=ot(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;const n=[];let r=0,s=0,i=null;for(;r=o.startLineNumber?i=new $(i.startLineNumber,Math.max(i.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(i),i=o)}return i!==null&&n.push(i),new mt(n)}subtractFrom(t){const n=Nn(this._normalizedRanges,o=>o.endLineNumberExclusive>=t.startLineNumber),r=yt(this._normalizedRanges,o=>o.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new mt([t]);const s=[];let i=t.startLineNumber;for(let o=n;oi&&s.push(new $(i,l.startLineNumber)),i=l.endLineNumberExclusive}return it.toString()).join(", ")}getIntersection(t){const n=[];let r=0,s=0;for(;rn.delta(t)))}};we=class{static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new we(0,n.column-t.column):new we(n.lineNumber-t.lineNumber,n.column-1)}static ofRange(t){return we.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(const s of t)s===` -`?(n++,r=0):r++;return new we(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}createRange(t){return this.lineCount===0?new H(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new H(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(t){return this.lineCount===0?new ee(t.lineNumber,t.column+this.columnCount):new ee(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}},we.zero=new we(0,0);var wo=class{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}},lt=class dt{static inverse(t,n,r){const s=[];let i=1,o=1;for(const u of t){const c=new dt(new $(i,u.original.startLineNumber),new $(o,u.modified.startLineNumber));c.modified.isEmpty||s.push(c),i=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}const l=new dt(new $(i,n+1),new $(o,r+1));return l.modified.isEmpty||s.push(l),s}static clip(t,n,r){const s=[];for(const i of t){const o=i.original.intersect(n),l=i.modified.intersect(r);o&&!o.isEmpty&&l&&!l.isEmpty&&s.push(new dt(o,l))}return s}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new dt(this.modified,this.original)}join(t){return new dt(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){const t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new xe(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new ye("not a valid diff");return new xe(new H(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new H(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new xe(new H(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new H(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(Ts(this.original.endLineNumberExclusive,t)&&Ts(this.modified.endLineNumberExclusive,n))return new xe(new H(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new H(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new xe(H.fromPositions(new ee(this.original.startLineNumber,1),ut(new ee(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),H.fromPositions(new ee(this.modified.startLineNumber,1),ut(new ee(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new xe(H.fromPositions(ut(new ee(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),ut(new ee(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),H.fromPositions(ut(new ee(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),ut(new ee(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new ye}};function ut(e,t){if(e.lineNumber<1)return new ee(1,1);if(e.lineNumber>t.length)return new ee(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new ee(e.lineNumber,n.length+1):e}function Ts(e,t){return e>=1&&e<=t.length}var _t=class jt extends lt{static fromRangeMappings(t){const n=$.join(t.map(s=>$.fromRangeInclusive(s.originalRange))),r=$.join(t.map(s=>$.fromRangeInclusive(s.modifiedRange)));return new jt(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new jt(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new jt(this.original,this.modified,[this.toRangeMapping()])}},xe=class ai{static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new ai(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new wo(this.originalRange,n)}},Lo=3,No=class{computeDiff(e,t,n){const s=new Co(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),i=[];let o=null;for(const l of s.changes){let u;l.originalEndLineNumber===0?u=new $(l.originalStartLineNumber+1,l.originalStartLineNumber+1):u=new $(l.originalStartLineNumber,l.originalEndLineNumber+1);let c;l.modifiedEndLineNumber===0?c=new $(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):c=new $(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let h=new _t(u,c,l.charChanges?.map(f=>new xe(new H(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn),new H(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===h.modified.startLineNumber||o.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new _t(o.original.join(h.original),o.modified.join(h.modified),o.innerChanges&&h.innerChanges?o.innerChanges.concat(h.innerChanges):void 0),i.pop()),i.push(h),o=h}return Ft(()=>Cs(i,(l,u)=>u.original.startLineNumber-l.original.endLineNumberExclusive===u.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},Bt=class oi{constructor(t,n,r,s,i,o,l,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=s,this.modifiedStartLineNumber=i,this.modifiedStartColumn=o,this.modifiedEndLineNumber=l,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){const s=n.getStartLineNumber(t.originalStart),i=n.getStartColumn(t.originalStart),o=n.getEndLineNumber(t.originalStart+t.originalLength-1),l=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),c=r.getStartColumn(t.modifiedStart),h=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new oi(s,i,o,l,u,c,h,f)}};function Ro(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,s=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){const m=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),p=s.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&p.getElements().length>0){let _=Ds(m,p,i,!0).changes;l&&(_=Ro(_)),d=[];for(let L=0,w=_.length;L1&&p>1;){const _=f.charCodeAt(m-2),L=d.charCodeAt(p-2);if(_!==L)break;m--,p--}(m>1||p>1)&&this._pushTrimWhitespaceCharChange(r,s+1,1,m,i+1,1,p)}{let m=Cn(f,1),p=Cn(d,1);const _=f.length+1,L=d.length+1;for(;m<_&&p!0;const t=Date.now();return()=>Date.now()-tr===s){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,s=e.length;r0}e.isGreaterThan=r;function s(i){return i===0}e.isNeitherLessOrGreaterThan=s,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(An||(An={}));function qt(e,t){return(n,r)=>t(e(n),e(r))}var Ut=(e,t)=>e-t;function Po(e){return(t,n)=>-e(t,n)}De=class{constructor(t){this.iterate=t}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new De(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new De(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(s=>((r||An.isGreaterThan(t(s,n)))&&(r=!1,n=s),!0)),n}},De.empty=new De(t=>{});var ct=class In{static trivial(t,n){return new In([new fe(Q.ofLength(t.length),Q.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new In([new fe(Q.ofLength(t.length),Q.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}},fe=class Ie{static invert(t,n){const r=[];return xo(t,(s,i)=>{r.push(Ie.fromOffsetPairs(s?s.getEndExclusives():je.zero,i?i.getStarts():new je(n,(s?s.seq2Range.endExclusive-s.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new Ie(new Q(t.offset1,n.offset1),new Q(t.offset2,n.offset2))}static assertSorted(t){let n;for(const r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new ye("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new Ie(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new Ie(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new Ie(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new Ie(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new Ie(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){const n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new Ie(n,r)}getStarts(){return new je(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new je(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},je=(Se=class{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new Se(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}},Se.zero=new Se(0,0),Se.max=new Se(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),Se),En=(Ze=class{isValid(){return!0}},Ze.instance=new Ze,Ze),To=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new ye("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&p>0&&i.get(m-1,p-1)===3&&(w+=o.get(m-1,p-1)),w+=r?r(m,p):1):w=-1;const A=Math.max(_,L,w);if(A===w){const C=m>0&&p>0?o.get(m-1,p-1):0;o.set(m,p,C+1),i.set(m,p,3)}else A===_?(o.set(m,p,0),i.set(m,p,1)):A===L&&(o.set(m,p,0),i.set(m,p,2));s.set(m,p,A)}const l=[];let u=e.length,c=t.length;function h(m,p){(m+1!==u||p+1!==c)&&l.push(new fe(new Q(m+1,u),new Q(p+1,c))),u=m,c=p}let f=e.length-1,d=t.length-1;for(;f>=0&&d>=0;)i.get(f,d)===3?(h(f,d),f--,d--):i.get(f,d)===1?f--:d--;return h(-1,-1),l.reverse(),new ct(l,!1)}},Bs=class{compute(e,t,n=En.instance){if(e.length===0||t.length===0)return ct.trivial(e,t);const r=e,s=t;function i(p,_){for(;pr.length||C>s.length)continue;const b=i(A,C);l.set(c,b);const v=A===L?u.get(c+1):u.get(c-1);if(u.set(c,b!==A?new qs(v,A,C,b-A):v),l.get(c)===r.length&&l.get(c)-c===s.length)break e}}let h=u.get(c);const f=[];let d=r.length,m=s.length;for(;;){const p=h?h.x+h.length:0,_=h?h.y+h.length:0;if((p!==d||_!==m)&&f.push(new fe(new Q(p,d),new Q(_,m))),!h)break;d=h.x,m=h.y,h=h.prev}return f.reverse(),new ct(f,!1)}},qs=class{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}},Fo=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}},Io=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}},Ht=class{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let s=e[r-1],i=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(i=this.range.startColumn-1,s=s.substring(i)),this.lineStartOffsets.push(i);let o=0;if(!n){const u=s.trimStart();o=s.length-u.length,s=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-i-o,s.length):s.length;for(let u=0;uString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=Hs(e>0?this.elements[e-1]:-1),n=Hs(es<=e),r=e-this.firstElementOffsetByLineIdx[n];return new ee(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(r===0&&t==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?H.fromPositions(n,n):H.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!kn(this.elements[e]))return;let t=e;for(;t>0&&kn(this.elements[t-1]);)t--;let n=e;for(;nr<=e.start)??0,n=_o(this.firstElementOffsetByLineIdx,r=>e.endExclusive<=r)??this.elements.length;return new Q(t,n)}};function kn(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}var Vo={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Us(e){return Vo[e]}function Hs(e){return e===10?8:e===13?7:Mn(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Bo(e,t,n,r,s,i){let{moves:o,excludedChanges:l}=Uo(e,t,n,i);if(!i.isValid())return[];const u=e.filter(h=>!l.has(h)),c=Ho(u,r,s,t,n,i);return ko(o,c),o=$o(o),o=o.filter(h=>{const f=h.original.toOffsetRange().slice(t).map(m=>m.trim());return f.join(` -`).length>=15&&qo(f,m=>m.length>=2)>=2}),o=Wo(e,o),o}function qo(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function Uo(e,t,n,r){const s=[],i=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Vs(u.original,t,u)),o=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Vs(u.modified,n,u))),l=new Set;for(const u of i){let c=-1,h;for(const f of o){const d=u.computeSimilarity(f);d>c&&(c=d,h=f)}if(c>.9&&h&&(o.delete(h),s.push(new lt(u.range,h.range)),l.add(u.source),l.add(h.source)),!r.isValid())return{moves:s,excludedChanges:l}}return{moves:s,excludedChanges:l}}function Ho(e,t,n,r,s,i){const o=[],l=new io;for(const d of e)for(let m=d.original.startLineNumber;md.modified.startLineNumber,Ut));for(const d of e){let m=[];for(let p=d.modified.startLineNumber;p{for(const b of m)if(b.originalLineRange.endLineNumberExclusive+1===A.endLineNumberExclusive&&b.modifiedLineRange.endLineNumberExclusive+1===L.endLineNumberExclusive){b.originalLineRange=new $(b.originalLineRange.startLineNumber,A.endLineNumberExclusive),b.modifiedLineRange=new $(b.modifiedLineRange.startLineNumber,L.endLineNumberExclusive),w.push(b);return}const C={modifiedLineRange:L,originalLineRange:A};u.push(C),w.push(C)}),m=w}if(!i.isValid())return[]}u.sort(Po(qt(d=>d.modifiedLineRange.length,Ut)));const c=new Vt,h=new Vt;for(const d of u){const m=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,p=c.subtractFrom(d.modifiedLineRange),_=h.subtractFrom(d.originalLineRange).getWithDelta(m),L=p.getIntersection(_);for(const w of L.ranges){if(w.length<3)continue;const A=w,C=w.delta(-m);o.push(new lt(C,A)),c.addRange(A),h.addRange(C)}}o.sort(qt(d=>d.original.startLineNumber,Ut));const f=new Ps(e);for(let d=0;dN.original.startLineNumber<=m.original.startLineNumber),_=ot(e,N=>N.modified.startLineNumber<=m.modified.startLineNumber),L=Math.max(m.original.startLineNumber-p.original.startLineNumber,m.modified.startLineNumber-_.modified.startLineNumber),w=f.findLastMonotonous(N=>N.original.startLineNumberN.modified.startLineNumberr.length||S>s.length||c.contains(S)||h.contains(N)||!$s(r[N-1],s[S-1],i))break}b>0&&(h.addRange(new $(m.original.startLineNumber-b,m.original.startLineNumber)),c.addRange(new $(m.modified.startLineNumber-b,m.modified.startLineNumber)));let v;for(v=0;vr.length||S>s.length||c.contains(S)||h.contains(N)||!$s(r[N-1],s[S-1],i))break}v>0&&(h.addRange(new $(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+v)),c.addRange(new $(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+v))),(b>0||v>0)&&(o[d]=new lt(new $(m.original.startLineNumber-b,m.original.endLineNumberExclusive+v),new $(m.modified.startLineNumber-b,m.modified.endLineNumberExclusive+v)))}return o}function $s(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const s=new Bs().compute(new Ht([e],new H(1,1,1,e.length),!1),new Ht([t],new H(1,1,1,t.length),!1),n);let i=0;const o=fe.invert(s.diffs,e.length);for(const h of o)h.seq1Range.forEach(f=>{Mn(e.charCodeAt(f))||i++});function l(h){let f=0;for(let d=0;dt.length?e:t);return i/u>.6&&u>10}function $o(e){if(e.length===0)return e;e.sort(qt(n=>n.original.startLineNumber,Ut));const t=[e[0]];for(let n=1;n=0&&o>=0&&i+o<=2){t[t.length-1]=r.join(s);continue}t.push(s)}return t}function Wo(e,t){const n=new Ps(e);return t=t.filter(r=>{const s=n.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber0&&(l=l.delta(c))}s.push(l)}return r.length>0&&s.push(r[r.length-1]),s}function Oo(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,i=n[r],o=r+1=r.start&&e.seq2Range.start-o>=s.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let l=0;for(;e.seq1Range.start+lc&&(c=p,u=h)}return e.delta(u)}function zo(e,t,n){const r=[];for(const s of n){const i=r[r.length-1];if(!i){r.push(s);continue}s.seq1Range.start-i.seq1Range.endExclusive<=2||s.seq2Range.start-i.seq2Range.endExclusive<=2?r[r.length-1]=new fe(i.seq1Range.join(s.seq1Range),i.seq2Range.join(s.seq2Range)):r.push(s)}return r}function jo(e,t,n){const r=fe.invert(n,e.length),s=[];let i=new je(0,0);function o(u,c){if(u.offset10;){const L=r[0];if(!(L.seq1Range.intersects(d.seq1Range)||L.seq2Range.intersects(d.seq2Range)))break;const A=e.findWordContaining(L.seq1Range.start),C=t.findWordContaining(L.seq2Range.start),b=new fe(A,C),v=b.intersect(L);if(p+=v.seq1Range.length,_+=v.seq2Range.length,d=d.join(b),d.seq1Range.endExclusive>=L.seq1Range.endExclusive)r.shift();else break}p+_<(d.seq1Range.length+d.seq2Range.length)*2/3&&s.push(d),i=d.getEndExclusives()}for(;r.length>0;){const u=r.shift();u.seq1Range.isEmpty||(o(u.getStarts(),u),o(u.getEndExclusives().delta(-1),u))}return Go(n,s)}function Go(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],s=t[0];let i;r&&(!s||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=i.seq1Range.start?n[n.length-1]=n[n.length-1].join(i):n.push(i)}return n}function Yo(e,t,n){let r=n;if(r.length===0)return r;let s=0,i;do{i=!1;const o=[r[0]];for(let l=1;l5||m.seq1Range.length+m.seq2Range.length>5)};const c=r[l],h=o[o.length-1];u(h,c)?(i=!0,o[o.length-1]=o[o.length-1].join(c)):o.push(c)}r=o}while(s++<10&&i);return r}function Xo(e,t,n){let r=n;if(r.length===0)return r;let s=0,i;do{i=!1;const l=[r[0]];for(let u=1;u5||_.length>500)return!1;const w=e.getText(_).trim();if(w.length>20||w.split(/\r\n|\r|\n/).length>1)return!1;const A=e.countLinesIn(m.seq1Range),C=m.seq1Range.length,b=t.countLinesIn(m.seq2Range),v=m.seq2Range.length,N=e.countLinesIn(p.seq1Range),S=p.seq1Range.length,T=t.countLinesIn(p.seq2Range),G=p.seq2Range.length,se=130;function U(I){return Math.min(I,se)}return Math.pow(Math.pow(U(A*40+C),1.5)+Math.pow(U(b*40+v),1.5),1.5)+Math.pow(Math.pow(U(N*40+S),1.5)+Math.pow(U(T*40+G),1.5),1.5)>(se**1.5)**1.5*1.3};const h=r[u],f=l[l.length-1];c(f,h)?(i=!0,l[l.length-1]=l[l.length-1].join(h)):l.push(h)}r=l}while(s++<10&&i);const o=[];return Mo(r,(l,u,c)=>{let h=u;function f(w){return w.length>0&&w.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}const d=e.extendToFullLines(u.seq1Range),m=e.getText(new Q(d.start,u.seq1Range.start));f(m)&&(h=h.deltaStart(-m.length));const p=e.getText(new Q(u.seq1Range.endExclusive,d.endExclusive));f(p)&&(h=h.deltaEnd(p.length));const _=fe.fromOffsetPairs(l?l.getEndExclusives():je.zero,c?c.getStarts():je.max),L=h.intersect(_);o.length>0&&L.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(L):o.push(L)}),o}var js=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:Gs(this.lines[e-1]),n=e===this.lines.length?0:Gs(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}};function Gs(e){let t=0;for(;tb===v))return new It([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new It([new _t(new $(1,e.length+1),new $(1,t.length+1),[new xe(new H(1,1,e.length,e[e.length-1].length+1),new H(1,1,t.length,t[t.length-1].length+1))])],[],!1);const r=n.maxComputationTimeMs===0?En.instance:new To(n.maxComputationTimeMs),s=!n.ignoreTrimWhitespace,i=new Map;function o(b){let v=i.get(b);return v===void 0&&(v=i.size,i.set(b,v)),v}const l=e.map(b=>o(b.trim())),u=t.map(b=>o(b.trim())),c=new js(l,e),h=new js(u,t),f=c.length+h.length<1700?this.dynamicProgrammingDiffing.compute(c,h,r,(b,v)=>e[b]===t[v]?t[v].length===0?.1:1+Math.log(1+t[v].length):.99):this.myersDiffingAlgorithm.compute(c,h,r);let d=f.diffs,m=f.hitTimeout;d=Ws(c,h,d),d=Yo(c,h,d);const p=[],_=b=>{if(s)for(let v=0;vb.seq1Range.start-L===b.seq2Range.start-w);const v=b.seq1Range.start-L;_(v),L=b.seq1Range.endExclusive,w=b.seq2Range.endExclusive;const N=this.refineDiff(e,t,b,r,s);N.hitTimeout&&(m=!0);for(const S of N.mappings)p.push(S)}_(e.length-L);const A=Ys(p,e,t);let C=[];return n.computeMoves&&(C=this.computeMoves(A,e,t,l,u,r,s)),Ft(()=>{function b(N,S){if(N.lineNumber<1||N.lineNumber>S.length)return!1;const T=S[N.lineNumber-1];return!(N.column<1||N.column>T.length+1)}function v(N,S){return!(N.startLineNumber<1||N.startLineNumber>S.length+1||N.endLineNumberExclusive<1||N.endLineNumberExclusive>S.length+1)}for(const N of A){if(!N.innerChanges)return!1;for(const S of N.innerChanges)if(!(b(S.modifiedRange.getStartPosition(),t)&&b(S.modifiedRange.getEndPosition(),t)&&b(S.originalRange.getStartPosition(),e)&&b(S.originalRange.getEndPosition(),e)))return!1;if(!v(N.modified,t)||!v(N.original,e))return!1}return!0}),new It(A,C,m)}computeMoves(e,t,n,r,s,i,o){return Bo(e,t,n,r,s,i).map(c=>{const h=this.refineDiff(t,n,new fe(c.original.toOffsetRange(),c.modified.toOffsetRange()),i,o),f=Ys(h.mappings,t,n,!0);return new yo(c,f)})}refineDiff(e,t,n,r,s){const o=Zo(n).toRangeMapping2(e,t),l=new Ht(e,o.originalRange,s),u=new Ht(t,o.modifiedRange,s),c=l.length+u.length<500?this.dynamicProgrammingDiffing.compute(l,u,r):this.myersDiffingAlgorithm.compute(l,u,r);let h=c.diffs;return h=Ws(l,u,h),h=jo(l,u,h),h=zo(l,u,h),h=Xo(l,u,h),{mappings:h.map(d=>new xe(l.translateRange(d.seq1Range),u.translateRange(d.seq2Range))),hitTimeout:c.hitTimeout}}};function Ys(e,t,n,r=!1){const s=[];for(const i of Eo(e.map(o=>Qo(o,t,n)),(o,l)=>o.original.overlapOrTouch(l.original)||o.modified.overlapOrTouch(l.modified))){const o=i[0],l=i[i.length-1];s.push(new _t(o.original.join(l.original),o.modified.join(l.modified),i.map(u=>u.innerChanges[0])))}return Ft(()=>!r&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||n.length-s[s.length-1].modified.endLineNumberExclusive!==t.length-s[s.length-1].original.endLineNumberExclusive)?!1:Cs(s,(i,o)=>o.original.startLineNumber-i.original.endLineNumberExclusive===o.modified.startLineNumber-i.modified.endLineNumberExclusive&&i.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+s&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+s&&(r=1);const i=new $(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+s),o=new $(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+s);return new _t(i,o,[e])}function Zo(e){return new lt(new $(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new $(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var Xs={getLegacy:()=>new No,getDefault:()=>new Jo};function $e(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var re=class{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=$e(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},Ge=class Nt{constructor(t,n,r,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=$e(Math.max(Math.min(1,n),0),3),this.l=$e(Math.max(Math.min(1,r),0),3),this.a=$e(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,s=t.b/255,i=t.a,o=Math.max(n,r,s),l=Math.min(n,r,s);let u=0,c=0;const h=(l+o)/2,f=o-l;if(f>0){switch(c=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),o){case n:u=(r-s)/f+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){const n=t.h/360,{s:r,l:s,a:i}=t;let o,l,u;if(r===0)o=l=u=s;else{const c=s<.5?s*(1+r):s+r-s*r,h=2*s-c;o=Nt._hue2rgb(h,c,n+1/3),l=Nt._hue2rgb(h,c,n),u=Nt._hue2rgb(h,c,n-1/3)}return new re(Math.round(o*255),Math.round(l*255),Math.round(u*255),i)}},$t=class ui{constructor(t,n,r,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=$e(Math.max(Math.min(1,n),0),3),this.v=$e(Math.max(Math.min(1,r),0),3),this.a=$e(Math.max(Math.min(1,s),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,s=t.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),l=i-o,u=i===0?0:l/i;let c;return l===0?c=0:i===n?c=((r-s)/l%6+6)%6:i===r?c=(s-n)/l+2:c=(n-r)/l+4,new ui(Math.round(c*60),u,i,t.a)}static toRGBA(t){const{h:n,s:r,v:s,a:i}=t,o=s*r,l=o*(1-Math.abs(n/60%2-1)),u=s-o;let[c,h,f]=[0,0,0];return n<60?(c=o,h=l):n<120?(c=l,h=o):n<180?(h=o,f=l):n<240?(h=l,f=o):n<300?(c=l,f=o):n<=360&&(c=o,f=l),c=Math.round((c+u)*255),h=Math.round((h+u)*255),f=Math.round((f+u)*255),new re(c,h,f,i)}},Wt=(z=class{static fromHex(t){return z.Format.CSS.parseHex(t)||z.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:Ge.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:$t.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof re)this.rgba=t;else if(t instanceof Ge)this._hsla=t,this.rgba=Ge.toRGBA(t);else if(t instanceof $t)this._hsva=t,this.rgba=$t.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&re.equals(this.rgba,t.rgba)&&Ge.equals(this.hsla,t.hsla)&&$t.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=z._relativeLuminanceForComponent(this.rgba.r),n=z._relativeLuminanceForComponent(this.rgba.g),r=z._relativeLuminanceForComponent(this.rgba.b),s=.2126*t+.7152*n+.0722*r;return $e(s,4)}static _relativeLuminanceForComponent(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(const s of r){const i=s.filter(c=>c!==void 0),o=i[1],l=i[2];if(!l)continue;let u;if(o==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=Qs(wt(e,s),Lt(l,c),!1)}else if(o==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=Qs(wt(e,s),Lt(l,c),!0)}else if(o==="hsl"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=Zs(wt(e,s),Lt(l,c),!1)}else if(o==="hsla"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=Zs(wt(e,s),Lt(l,c),!0)}else o==="#"&&(u=Ko(wt(e,s),o+l));u&&t.push(u)}return t}function t1(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:e1(e)}var Ks=new RegExp("\\bMARK:\\s*(.*)$","d"),n1=/^-+|-+$/g;function r1(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=s1(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const r=i1(e);n=n.concat(r)}return n}function s1(e,t){const n=[],r=e.getLineCount();for(let s=1;s<=r;s++){const i=e.getLineContent(s),o=i.match(t.foldingRules.markers.start);if(o){const l={startLineNumber:s,startColumn:o[0].length+1,endLineNumber:s,endColumn:i.length+1};if(l.endColumn>l.startColumn){const u={range:l,...ei(i.substring(o[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function i1(e){const t=[],n=e.getLineCount();for(let r=1;r<=n;r++){const s=e.getLineContent(r);a1(s,r,t)}return t}function a1(e,t,n){Ks.lastIndex=0;const r=Ks.exec(e);if(r){const s=r.indices[1][0]+1,i=r.indices[1][1]+1,o={startLineNumber:t,startColumn:s,endLineNumber:t,endColumn:i};if(o.endColumn>o.startColumn){const l={range:o,...ei(r[1]),shouldBeInComments:!0};(l.text||l.hasSeparatorLine)&&n.push(l)}}}function ei(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(n1,""),{text:e,hasSeparatorLine:t}}var ti;(function(e){async function t(r){let s;const i=await Promise.all(r.map(o=>o.then(l=>l,l=>{s||(s=l)})));if(typeof s<"u")throw s;return i}e.settled=t;function n(r){return new Promise(async(s,i)=>{try{await r(s,i)}catch(o){i(o)}})}e.withAsyncBody=n})(ti||(ti={})),ae=class{static fromArray(t){return new ae(n=>{n.emitMany(t)})}static fromPromise(t){return new ae(async n=>{n.emitMany(await t)})}static fromPromises(t){return new ae(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new ae(async n=>{await Promise.all(t.map(async r=>{for await(const s of r)n.emitOne(s)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new pe,queueMicrotask(async()=>{const r={emitOne:s=>this.emitOne(s),emitMany:s=>this.emitMany(s),reject:s=>this.reject(s)};try{await Promise.resolve(t(r)),this.resolve()}catch(s){this.reject(s)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new ae(async r=>{for await(const s of t)r.emitOne(n(s))})}map(t){return ae.map(this,t)}static filter(t,n){return new ae(async r=>{for await(const s of t)n(s)&&r.emitOne(s)})}filter(t){return ae.filter(this,t)}static coalesce(t){return ae.filter(t,n=>!!n)}coalesce(){return ae.coalesce(this)}static async toPromise(t){const n=[];for await(const r of t)n.push(r);return n}toPromise(){return ae.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}},ae.EMPTY=ae.fromArray([]);var o1=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=at(e);const n=this.values,r=this.prefixSum,s=t.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+s),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=at(e),t=at(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;const s=n.length-e;return t>=s&&(t=s),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=at(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,s=0,i=0;for(;t<=n;)if(r=t+(n-t)/2|0,s=this.prefixSum[r],i=s-this.values[r],e=s)t=r+1;else break;return new l1(r,e-i)}},l1=class{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}},u1=class{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new ee(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;re.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new h1(Ne.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},h1=class extends u1{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{const s=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>s&&(n=s,r=!0)}return r?{lineNumber:t,column:n}:e}},f1=(Ke=class{constructor(){this._workerTextModelSyncServer=new c1}dispose(){}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){const s=this._getModel(t);return s?bo.computeUnicodeHighlights(s,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){const r=this._getModel(t);return r?r1(r,n):[]}async $computeDiff(t,n,r,s){const i=this._getModel(t),o=this._getModel(n);return!i||!o?null:Ot.computeDiff(i,o,r,s)}static computeDiff(t,n,r,s){const i=s==="advanced"?Xs.getDefault():Xs.getLegacy(),o=t.getLinesContent(),l=n.getLinesContent(),u=i.computeDiff(o,l,r),c=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function h(f){return f.map(d=>[d.original.startLineNumber,d.original.endLineNumberExclusive,d.modified.startLineNumber,d.modified.endLineNumberExclusive,d.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:c,quitEarly:u.hitTimeout,changes:h(u.changes),moves:u.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,h(f.changes)])}}static _modelsAreIdentical(t,n){const r=t.getLineCount(),s=n.getLineCount();if(r!==s)return!1;for(let i=1;i<=r;i++){const o=t.getLineContent(i),l=n.getLineContent(i);if(o!==l)return!1}return!0}async $computeMoreMinimalEdits(t,n,r){const s=this._getModel(t);if(!s)return n;const i=[];let o;n=n.slice(0).sort((u,c)=>{if(u.range&&c.range)return H.compareRangesUsingStarts(u.range,c.range);const h=u.range?0:1,f=c.range?0:1;return h-f});let l=0;for(let u=1;uOt._diffLimit){i.push({range:u,text:c});continue}const d=Ta(f,c,r),m=s.offsetAt(H.lift(u).getStartPosition());for(const p of d){const _=s.positionAt(m+p.originalStart),L=s.positionAt(m+p.originalStart+p.originalLength),w={text:c.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:_.lineNumber,startColumn:_.column,endLineNumber:L.lineNumber,endColumn:L.column}};s.getValueInRange(w.range)!==w.text&&i.push(w)}}return typeof o=="number"&&i.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i}async $computeLinks(t){const n=this._getModel(t);return n?Ua(n):null}async $computeDefaultDocumentColors(t){const n=this._getModel(t);return n?t1(n):null}async $textualSuggest(t,n,r,s){const i=new Gn,o=new RegExp(r,s),l=new Set;e:for(const u of t){const c=this._getModel(u);if(c){for(const h of c.words(o))if(!(h===n||!isNaN(Number(h)))&&(l.add(h),l.size>Ot._suggestionsLimit))break e}}return{words:Array.from(l),duration:i.elapsed()}}async $computeWordRanges(t,n,r,s){const i=this._getModel(t);if(!i)return Object.create(null);const o=new RegExp(r,s),l=Object.create(null);for(let u=n.startLineNumber;uthis._host.$fhr(o,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(i,t),Promise.resolve(Ls(this._foreignModule))):new Promise((o,l)=>{const u=c=>{this._foreignModule=c.create(i,t),o(Ls(this._foreignModule))};import(`${or.asBrowserUri(`${e}.js`).toString(!0)}`).then(u).catch(l)})}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}};typeof importScripts=="function"&&(globalThis.monaco=eo());var Tn=!1;function m1(e){if(Tn)return;Tn=!0;const t=new ka(n=>{globalThis.postMessage(n)},n=>new Ot(to.getChannel(n),e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{Tn||m1(null)}})(); diff --git a/raphtory-graphql/resources/graphql.worker-D5sB41vO.js b/raphtory-graphql/resources/graphql.worker-D5sB41vO.js deleted file mode 100644 index 21c0157a3f..0000000000 --- a/raphtory-graphql/resources/graphql.worker-D5sB41vO.js +++ /dev/null @@ -1,152 +0,0 @@ -(function(){"use strict";var Ir,hi,Bn,Vn,Rr,$t,Un,ur,xr,St,$n,lr,kr,un,jn,_n,Or,cr,Ae,ft,Mr;var La={exports:{}},pe={};var Fl;function Nm(){if(Fl)return pe;Fl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),m=Symbol.iterator;function p(C){return C===null||typeof C!="object"?null:(C=m&&C[m]||C["@@iterator"],typeof C=="function"?C:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function T(C,v,$){this.props=C,this.context=v,this.refs=A,this.updater=$||g}T.prototype.isReactComponent={},T.prototype.setState=function(C,v){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,v,"setState")},T.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function w(){}w.prototype=T.prototype;function F(C,v,$){this.props=C,this.context=v,this.refs=A,this.updater=$||g}var S=F.prototype=new w;S.constructor=F,E(S,T.prototype),S.isPureReactComponent=!0;var L=Array.isArray;function O(){}var P={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function R(C,v,$){var U=$.ref;return{$$typeof:e,type:C,key:v,ref:U!==void 0?U:null,props:$}}function V(C,v){return R(C.type,v,C.props)}function q(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function Q(C){var v={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function($){return v[$]})}var M=/\/+/g;function B(C,v){return typeof C=="object"&&C!==null&&C.key!=null?Q(""+C.key):v.toString(36)}function J(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(O,O):(C.status="pending",C.then(function(v){C.status==="pending"&&(C.status="fulfilled",C.value=v)},function(v){C.status==="pending"&&(C.status="rejected",C.reason=v)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function Y(C,v,$,U,W){var I=typeof C;(I==="undefined"||I==="boolean")&&(C=null);var x=!1;if(C===null)x=!0;else switch(I){case"bigint":case"string":case"number":x=!0;break;case"object":switch(C.$$typeof){case e:case t:x=!0;break;case c:return x=C._init,Y(x(C._payload),v,$,U,W)}}if(x)return W=W(C),x=U===""?"."+B(C,0):U,L(W)?($="",x!=null&&($=x.replace(M,"$&/")+"/"),Y(W,v,$,"",function(Je){return Je})):W!=null&&(q(W)&&(W=V(W,$+(W.key==null||C&&C.key===W.key?"":(""+W.key).replace(M,"$&/")+"/")+x)),v.push(W)),1;x=0;var re=U===""?".":U+":";if(L(C))for(var ue=0;ue"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ia.exports=Tm(),Ia.exports}Sm();var Ra={exports:{}},Ei={};var xl;function Cm(){if(xl)return Ei;xl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var o in i)o!=="key"&&(s[o]=i[o])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:s}}return Ei.Fragment=t,Ei.jsx=n,Ei.jsxs=n,Ei}var kl;function Am(){return kl||(kl=1,Ra.exports=Cm()),Ra.exports}Am();var Ol={},Fm=Object.create,xa=Object.defineProperty,wm=Object.getOwnPropertyDescriptor,ka=Object.getOwnPropertyNames,Lm=Object.getPrototypeOf,Im=Object.prototype.hasOwnProperty,Rm=(e,t)=>function(){return e&&(t=(0,e[ka(e)[0]])(e=0)),t},Gn=(e,t)=>function(){return t||(0,e[ka(e)[0]])((t={exports:{}}).exports,t),t.exports},xm=(e,t)=>{for(var n in t)xa(e,n,{get:t[n],enumerable:!0})},km=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ka(t))!Im.call(e,i)&&i!==n&&xa(e,i,{get:()=>t[i],enumerable:!(r=wm(t,i))||r.enumerable});return e},Oa=(e,t,n)=>(n=e!=null?Fm(Lm(e)):{},km(!e||!e.__esModule?xa(n,"default",{value:e,enumerable:!0}):n,e)),Om=Gn({"../node_modules/.pnpm/nullthrows@1.1.1/node_modules/nullthrows/nullthrows.js"(e,t){function n(r,i){if(r!=null)return r;var s=new Error(i!==void 0?i:"Got unexpected "+r);throw s.framesToPop=1,s}t.exports=n,t.exports.default=n,Object.defineProperty(t.exports,"__esModule",{value:!0})}}),ns=Gn({"../node_modules/.pnpm/picomatch-browser@2.2.6/node_modules/picomatch-browser/lib/constants.js"(e,t){var n="\\\\/",r=`[^${n}]`,i="\\.",s="\\+",a="\\?",o="\\/",u="(?=.)",l="[^/]",c=`(?:${o}|$)`,d=`(?:^|${o})`,m=`${i}{1,2}${c}`,p=`(?!${i})`,g=`(?!${d}${m})`,E=`(?!${i}{0,1}${c})`,A=`(?!${m})`,T=`[^.${o}]`,w=`${l}*?`,F="/",S={DOT_LITERAL:i,PLUS_LITERAL:s,QMARK_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:u,QMARK:l,END_ANCHOR:c,DOTS_SLASH:m,NO_DOT:p,NO_DOTS:g,NO_DOT_SLASH:E,NO_DOTS_SLASH:A,QMARK_NO_DOT:T,STAR:w,START_ANCHOR:d,SEP:F},L={...S,SLASH_LITERAL:`[${n}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${i}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${i})`,NO_DOTS:`(?!(?:^|[${n}])${i}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${i}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${i}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`,SEP:"\\"},O={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:O,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(P){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${P.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(P){return P===!0?L:S}}}}),Ma=Gn({"../node_modules/.pnpm/picomatch-browser@2.2.6/node_modules/picomatch-browser/lib/utils.js"(e){var{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=ns();e.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),e.hasRegexChars=s=>r.test(s),e.isRegexChar=s=>s.length===1&&e.hasRegexChars(s),e.escapeRegex=s=>s.replace(i,"\\$1"),e.toPosixSlashes=s=>s.replace(t,"/"),e.removeBackslashes=s=>s.replace(n,a=>a==="\\"?"":a),e.supportsLookbehinds=()=>{const s=process.version.slice(1).split(".").map(Number);return s.length===3&&s[0]>=9||s[0]===8&&s[1]>=10},e.escapeLast=(s,a,o)=>{const u=s.lastIndexOf(a,o);return u===-1?s:s[u-1]==="\\"?e.escapeLast(s,a,u-1):`${s.slice(0,u)}\\${s.slice(u)}`},e.removePrefix=(s,a={})=>{let o=s;return o.startsWith("./")&&(o=o.slice(2),a.prefix="./"),o},e.wrapOutput=(s,a={},o={})=>{const u=o.contains?"":"^",l=o.contains?"":"$";let c=`${u}(?:${s})${l}`;return a.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},e.basename=(s,{windows:a}={})=>a?s.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):s.replace(/\/$/,"").replace(/.*\//,"")}}),Mm=Gn({"../node_modules/.pnpm/picomatch-browser@2.2.6/node_modules/picomatch-browser/lib/scan.js"(e,t){var n=Ma(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:a,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:p,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:E,CHAR_RIGHT_PARENTHESES:A,CHAR_RIGHT_SQUARE_BRACKET:T}=ns(),w=L=>L===l||L===s,F=L=>{L.isPrefix!==!0&&(L.depth=L.isGlobstar?1/0:1)},S=(L,O)=>{const P=O||{},X=L.length-1,R=P.parts===!0||P.scanToEnd===!0,V=[],q=[],Q=[];let M=L,B=-1,J=0,Y=0,ne=!1,K=!1,ae=!1,ce=!1,C=!1,v=!1,$=!1,U=!1,W=!1,I=0,x,re,ue={value:"",depth:0,isGlob:!1};const Je=()=>B>=X,Ct=()=>M.charCodeAt(B+1),be=()=>(x=re,M.charCodeAt(++B));for(;B0&&(ln=M.slice(0,J),M=M.slice(J),Y-=J),Ue&&ae===!0&&Y>0?(Ue=M.slice(0,Y),pt=M.slice(Y)):ae===!0?(Ue="",pt=M):Ue=M,Ue&&Ue!==""&&Ue!=="/"&&Ue!==M&&w(Ue.charCodeAt(Ue.length-1))&&(Ue=Ue.slice(0,-1)),P.unescape===!0&&(pt&&(pt=n.removeBackslashes(pt)),Ue&&$===!0&&(Ue=n.removeBackslashes(Ue)));const mt={prefix:ln,input:L,start:J,base:Ue,glob:pt,isBrace:ne,isBracket:K,isGlob:ae,isExtglob:ce,isGlobstar:C,negated:U};if(P.tokens===!0&&(mt.maxDepth=0,w(re)||q.push(ue),mt.tokens=q),P.parts===!0||P.tokens===!0){let he;for(let Xe=0;Xe{if(typeof p.expandRange=="function")return p.expandRange(...m,p);m.sort();const g=`[${m.join("-")}]`;try{new RegExp(g)}catch{return m.map(A=>r.escapeRegex(A)).join("..")}return g},c=(m,p)=>`Missing ${m}: "${p}" - use "\\\\${p}" to match literal characters`,d=(m,p)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=u[m]||m;const g={...p},E=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i;let A=m.length;if(A>E)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${E}`);const T={type:"bos",value:"",output:g.prepend||""},w=[T],F=g.capture?"":"?:",S=n.globChars(g.windows),L=n.extglobChars(S),{DOT_LITERAL:O,PLUS_LITERAL:P,SLASH_LITERAL:X,ONE_CHAR:R,DOTS_SLASH:V,NO_DOT:q,NO_DOT_SLASH:Q,NO_DOTS_SLASH:M,QMARK:B,QMARK_NO_DOT:J,STAR:Y,START_ANCHOR:ne}=S,K=ie=>`(${F}(?:(?!${ne}${ie.dot?V:O}).)*?)`,ae=g.dot?"":q,ce=g.dot?B:J;let C=g.bash===!0?K(g):Y;g.capture&&(C=`(${C})`),typeof g.noext=="boolean"&&(g.noextglob=g.noext);const v={input:m,index:-1,start:0,dot:g.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:w};m=r.removePrefix(m,v),A=m.length;const $=[],U=[],W=[];let I=T,x;const re=()=>v.index===A-1,ue=v.peek=(ie=1)=>m[v.index+ie],Je=v.advance=()=>m[++v.index],Ct=()=>m.slice(v.index+1),be=(ie="",we=0)=>{v.consumed+=ie,v.index+=we},Ue=ie=>{v.output+=ie.output!=null?ie.output:ie.value,be(ie.value)},ln=()=>{let ie=1;for(;ue()==="!"&&(ue(2)!=="("||ue(3)==="?");)Je(),v.start++,ie++;return ie%2===0?!1:(v.negated=!0,v.start++,!0)},pt=ie=>{v[ie]++,W.push(ie)},mt=ie=>{v[ie]--,W.pop()},he=ie=>{if(I.type==="globstar"){const we=v.braces>0&&(ie.type==="comma"||ie.type==="brace"),te=ie.extglob===!0||$.length&&(ie.type==="pipe"||ie.type==="paren");ie.type!=="slash"&&ie.type!=="paren"&&!we&&!te&&(v.output=v.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=C,v.output+=I.output)}if($.length&&ie.type!=="paren"&&!L[ie.value]&&($[$.length-1].inner+=ie.value),(ie.value||ie.output)&&Ue(ie),I&&I.type==="text"&&ie.type==="text"){I.value+=ie.value,I.output=(I.output||"")+ie.value;return}ie.prev=I,w.push(ie),I=ie},Xe=(ie,we)=>{const te={...L[we],conditions:1,inner:""};te.prev=I,te.parens=v.parens,te.output=v.output;const ve=(g.capture?"(":"")+te.open;pt("parens"),he({type:ie,value:we,output:v.output?"":R}),he({type:"paren",extglob:!0,value:Je(),output:ve}),$.push(te)},Qi=ie=>{let we=ie.close+(g.capture?")":"");if(ie.type==="negate"){let te=C;ie.inner&&ie.inner.length>1&&ie.inner.includes("/")&&(te=K(g)),(te!==C||re()||/^\)+$/.test(Ct()))&&(we=ie.close=`)$))${te}`),ie.prev.type==="bos"&&re()&&(v.negatedExtglob=!0)}he({type:"paren",extglob:!0,value:x,output:we}),mt("parens")};if(g.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let ie=!1,we=m.replace(o,(te,ve,Be,gt,Qe,Zi)=>gt==="\\"?(ie=!0,te):gt==="?"?ve?ve+gt+(Qe?B.repeat(Qe.length):""):Zi===0?ce+(Qe?B.repeat(Qe.length):""):B.repeat(Be.length):gt==="."?O.repeat(Be.length):gt==="*"?ve?ve+gt+(Qe?C:""):C:ve?te:`\\${te}`);return ie===!0&&(g.unescape===!0?we=we.replace(/\\/g,""):we=we.replace(/\\+/g,te=>te.length%2===0?"\\\\":te?"\\":"")),we===m&&g.contains===!0?(v.output=m,v):(v.output=r.wrapOutput(we,v,p),v)}for(;!re();){if(x=Je(),x==="\0")continue;if(x==="\\"){const te=ue();if(te==="/"&&g.bash!==!0||te==="."||te===";")continue;if(!te){x+="\\",he({type:"text",value:x});continue}const ve=/^\\+/.exec(Ct());let Be=0;if(ve&&ve[0].length>2&&(Be=ve[0].length,v.index+=Be,Be%2!==0&&(x+="\\")),g.unescape===!0?x=Je()||"":x+=Je()||"",v.brackets===0){he({type:"text",value:x});continue}}if(v.brackets>0&&(x!=="]"||I.value==="["||I.value==="[^")){if(g.posix!==!1&&x===":"){const te=I.value.slice(1);if(te.includes("[")&&(I.posix=!0,te.includes(":"))){const ve=I.value.lastIndexOf("["),Be=I.value.slice(0,ve),gt=I.value.slice(ve+2),Qe=s[gt];if(Qe){I.value=Be+Qe,v.backtrack=!0,Je(),!T.output&&w.indexOf(I)===1&&(T.output=R);continue}}}(x==="["&&ue()!==":"||x==="-"&&ue()==="]")&&(x=`\\${x}`),x==="]"&&(I.value==="["||I.value==="[^")&&(x=`\\${x}`),g.posix===!0&&x==="!"&&I.value==="["&&(x="^"),I.value+=x,Ue({value:x});continue}if(v.quotes===1&&x!=='"'){x=r.escapeRegex(x),I.value+=x,Ue({value:x});continue}if(x==='"'){v.quotes=v.quotes===1?0:1,g.keepQuotes===!0&&he({type:"text",value:x});continue}if(x==="("){pt("parens"),he({type:"paren",value:x});continue}if(x===")"){if(v.parens===0&&g.strictBrackets===!0)throw new SyntaxError(c("opening","("));const te=$[$.length-1];if(te&&v.parens===te.parens+1){Qi($.pop());continue}he({type:"paren",value:x,output:v.parens?")":"\\)"}),mt("parens");continue}if(x==="["){if(g.nobracket===!0||!Ct().includes("]")){if(g.nobracket!==!0&&g.strictBrackets===!0)throw new SyntaxError(c("closing","]"));x=`\\${x}`}else pt("brackets");he({type:"bracket",value:x});continue}if(x==="]"){if(g.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){he({type:"text",value:x,output:`\\${x}`});continue}if(v.brackets===0){if(g.strictBrackets===!0)throw new SyntaxError(c("opening","["));he({type:"text",value:x,output:`\\${x}`});continue}mt("brackets");const te=I.value.slice(1);if(I.posix!==!0&&te[0]==="^"&&!te.includes("/")&&(x=`/${x}`),I.value+=x,Ue({value:x}),g.literalBrackets===!1||r.hasRegexChars(te))continue;const ve=r.escapeRegex(I.value);if(v.output=v.output.slice(0,-I.value.length),g.literalBrackets===!0){v.output+=ve,I.value=ve;continue}I.value=`(${F}${ve}|${I.value})`,v.output+=I.value;continue}if(x==="{"&&g.nobrace!==!0){pt("braces");const te={type:"brace",value:x,output:"(",outputIndex:v.output.length,tokensIndex:v.tokens.length};U.push(te),he(te);continue}if(x==="}"){const te=U[U.length-1];if(g.nobrace===!0||!te){he({type:"text",value:x,output:x});continue}let ve=")";if(te.dots===!0){const Be=w.slice(),gt=[];for(let Qe=Be.length-1;Qe>=0&&(w.pop(),Be[Qe].type!=="brace");Qe--)Be[Qe].type!=="dots"&>.unshift(Be[Qe].value);ve=l(gt,g),v.backtrack=!0}if(te.comma!==!0&&te.dots!==!0){const Be=v.output.slice(0,te.outputIndex),gt=v.tokens.slice(te.tokensIndex);te.value=te.output="\\{",x=ve="\\}",v.output=Be;for(const Qe of gt)v.output+=Qe.output||Qe.value}he({type:"brace",value:x,output:ve}),mt("braces"),U.pop();continue}if(x==="|"){$.length>0&&$[$.length-1].conditions++,he({type:"text",value:x});continue}if(x===","){let te=x;const ve=U[U.length-1];ve&&W[W.length-1]==="braces"&&(ve.comma=!0,te="|"),he({type:"comma",value:x,output:te});continue}if(x==="/"){if(I.type==="dot"&&v.index===v.start+1){v.start=v.index+1,v.consumed="",v.output="",w.pop(),I=T;continue}he({type:"slash",value:x,output:X});continue}if(x==="."){if(v.braces>0&&I.type==="dot"){I.value==="."&&(I.output=O);const te=U[U.length-1];I.type="dots",I.output+=x,I.value+=x,te.dots=!0;continue}if(v.braces+v.parens===0&&I.type!=="bos"&&I.type!=="slash"){he({type:"text",value:x,output:O});continue}he({type:"dot",value:x,output:O});continue}if(x==="?"){if(!(I&&I.value==="(")&&g.noextglob!==!0&&ue()==="("&&ue(2)!=="?"){Xe("qmark",x);continue}if(I&&I.type==="paren"){const ve=ue();let Be=x;if(ve==="<"&&!r.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(I.value==="("&&!/[!=<:]/.test(ve)||ve==="<"&&!/<([!=]|\w+>)/.test(Ct()))&&(Be=`\\${x}`),he({type:"text",value:x,output:Be});continue}if(g.dot!==!0&&(I.type==="slash"||I.type==="bos")){he({type:"qmark",value:x,output:J});continue}he({type:"qmark",value:x,output:B});continue}if(x==="!"){if(g.noextglob!==!0&&ue()==="("&&(ue(2)!=="?"||!/[!=<:]/.test(ue(3)))){Xe("negate",x);continue}if(g.nonegate!==!0&&v.index===0){ln();continue}}if(x==="+"){if(g.noextglob!==!0&&ue()==="("&&ue(2)!=="?"){Xe("plus",x);continue}if(I&&I.value==="("||g.regex===!1){he({type:"plus",value:x,output:P});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||v.parens>0){he({type:"plus",value:x});continue}he({type:"plus",value:P});continue}if(x==="@"){if(g.noextglob!==!0&&ue()==="("&&ue(2)!=="?"){he({type:"at",extglob:!0,value:x,output:""});continue}he({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);const te=a.exec(Ct());te&&(x+=te[0],v.index+=te[0].length),he({type:"text",value:x});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=x,I.output=C,v.backtrack=!0,v.globstar=!0,be(x);continue}let ie=Ct();if(g.noextglob!==!0&&/^\([^?]/.test(ie)){Xe("star",x);continue}if(I.type==="star"){if(g.noglobstar===!0){be(x);continue}const te=I.prev,ve=te.prev,Be=te.type==="slash"||te.type==="bos",gt=ve&&(ve.type==="star"||ve.type==="globstar");if(g.bash===!0&&(!Be||ie[0]&&ie[0]!=="/")){he({type:"star",value:x,output:""});continue}const Qe=v.braces>0&&(te.type==="comma"||te.type==="brace"),Zi=$.length&&(te.type==="pipe"||te.type==="paren");if(!Be&&te.type!=="paren"&&!Qe&&!Zi){he({type:"star",value:x,output:""});continue}for(;ie.slice(0,3)==="/**";){const Pr=m[v.index+4];if(Pr&&Pr!=="/")break;ie=ie.slice(3),be("/**",3)}if(te.type==="bos"&&re()){I.type="globstar",I.value+=x,I.output=K(g),v.output=I.output,v.globstar=!0,be(x);continue}if(te.type==="slash"&&te.prev.type!=="bos"&&!gt&&re()){v.output=v.output.slice(0,-(te.output+I.output).length),te.output=`(?:${te.output}`,I.type="globstar",I.output=K(g)+(g.strictSlashes?")":"|$)"),I.value+=x,v.globstar=!0,v.output+=te.output+I.output,be(x);continue}if(te.type==="slash"&&te.prev.type!=="bos"&&ie[0]==="/"){const Pr=ie[1]!==void 0?"|$":"";v.output=v.output.slice(0,-(te.output+I.output).length),te.output=`(?:${te.output}`,I.type="globstar",I.output=`${K(g)}${X}|${X}${Pr})`,I.value+=x,v.output+=te.output+I.output,v.globstar=!0,be(x+Je()),he({type:"slash",value:"/",output:""});continue}if(te.type==="bos"&&ie[0]==="/"){I.type="globstar",I.value+=x,I.output=`(?:^|${X}|${K(g)}${X})`,v.output=I.output,v.globstar=!0,be(x+Je()),he({type:"slash",value:"/",output:""});continue}v.output=v.output.slice(0,-I.output.length),I.type="globstar",I.output=K(g),I.value+=x,v.output+=I.output,v.globstar=!0,be(x);continue}const we={type:"star",value:x,output:C};if(g.bash===!0){we.output=".*?",(I.type==="bos"||I.type==="slash")&&(we.output=ae+we.output),he(we);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&g.regex===!0){we.output=x,he(we);continue}(v.index===v.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(v.output+=Q,I.output+=Q):g.dot===!0?(v.output+=M,I.output+=M):(v.output+=ae,I.output+=ae),ue()!=="*"&&(v.output+=R,I.output+=R)),he(we)}for(;v.brackets>0;){if(g.strictBrackets===!0)throw new SyntaxError(c("closing","]"));v.output=r.escapeLast(v.output,"["),mt("brackets")}for(;v.parens>0;){if(g.strictBrackets===!0)throw new SyntaxError(c("closing",")"));v.output=r.escapeLast(v.output,"("),mt("parens")}for(;v.braces>0;){if(g.strictBrackets===!0)throw new SyntaxError(c("closing","}"));v.output=r.escapeLast(v.output,"{"),mt("braces")}if(g.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&he({type:"maybe_slash",value:"",output:`${X}?`}),v.backtrack===!0){v.output="";for(const ie of v.tokens)v.output+=ie.output!=null?ie.output:ie.value,ie.suffix&&(v.output+=ie.suffix)}return v};d.fastpaths=(m,p)=>{const g={...p},E=typeof g.maxLength=="number"?Math.min(i,g.maxLength):i,A=m.length;if(A>E)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${E}`);m=u[m]||m;const{DOT_LITERAL:T,SLASH_LITERAL:w,ONE_CHAR:F,DOTS_SLASH:S,NO_DOT:L,NO_DOTS:O,NO_DOTS_SLASH:P,STAR:X,START_ANCHOR:R}=n.globChars(g.windows),V=g.dot?O:L,q=g.dot?P:L,Q=g.capture?"":"?:",M={negated:!1,prefix:""};let B=g.bash===!0?".*?":X;g.capture&&(B=`(${B})`);const J=ae=>ae.noglobstar===!0?B:`(${Q}(?:(?!${R}${ae.dot?S:T}).)*?)`,Y=ae=>{switch(ae){case"*":return`${V}${F}${B}`;case".*":return`${T}${F}${B}`;case"*.*":return`${V}${B}${T}${F}${B}`;case"*/*":return`${V}${B}${w}${F}${q}${B}`;case"**":return V+J(g);case"**/*":return`(?:${V}${J(g)}${w})?${q}${F}${B}`;case"**/*.*":return`(?:${V}${J(g)}${w})?${q}${B}${T}${F}${B}`;case"**/.*":return`(?:${V}${J(g)}${w})?${T}${F}${B}`;default:{const ce=/^(.*?)\.(\w+)$/.exec(ae);if(!ce)return;const C=Y(ce[1]);return C?C+T+ce[2]:void 0}}},ne=r.removePrefix(m,M);let K=Y(ne);return K&&g.strictSlashes!==!0&&(K+=`${w}?`),K},t.exports=d}}),Bm=Gn({"../node_modules/.pnpm/picomatch-browser@2.2.6/node_modules/picomatch-browser/lib/picomatch.js"(e,t){var n=Mm(),r=Pm(),i=Ma(),s=ns(),a=u=>u&&typeof u=="object"&&!Array.isArray(u),o=(u,l,c=!1)=>{if(Array.isArray(u)){const w=u.map(S=>o(S,l,c));return S=>{for(const L of w){const O=L(S);if(O)return O}return!1}}const d=a(u)&&u.tokens&&u.input;if(u===""||typeof u!="string"&&!d)throw new TypeError("Expected pattern to be a non-empty string");const m=l||{},p=m.windows,g=d?o.compileRe(u,l):o.makeRe(u,l,!1,!0),E=g.state;delete g.state;let A=()=>!1;if(m.ignore){const w={...l,ignore:null,onMatch:null,onResult:null};A=o(m.ignore,w,c)}const T=(w,F=!1)=>{const{isMatch:S,match:L,output:O}=o.test(w,g,l,{glob:u,posix:p}),P={glob:u,state:E,regex:g,posix:p,input:w,output:O,match:L,isMatch:S};return typeof m.onResult=="function"&&m.onResult(P),S===!1?(P.isMatch=!1,F?P:!1):A(w)?(typeof m.onIgnore=="function"&&m.onIgnore(P),P.isMatch=!1,F?P:!1):(typeof m.onMatch=="function"&&m.onMatch(P),F?P:!0)};return c&&(T.state=E),T};o.test=(u,l,c,{glob:d,posix:m}={})=>{if(typeof u!="string")throw new TypeError("Expected input to be a string");if(u==="")return{isMatch:!1,output:""};const p=c||{},g=p.format||(m?i.toPosixSlashes:null);let E=u===d,A=E&&g?g(u):u;return E===!1&&(A=g?g(u):u,E=A===d),(E===!1||p.capture===!0)&&(p.matchBase===!0||p.basename===!0?E=o.matchBase(u,l,c,m):E=l.exec(A)),{isMatch:!!E,match:E,output:A}},o.matchBase=(u,l,c)=>(l instanceof RegExp?l:o.makeRe(l,c)).test(i.basename(u)),o.isMatch=(u,l,c)=>o(l,c)(u),o.parse=(u,l)=>Array.isArray(u)?u.map(c=>o.parse(c,l)):r(u,{...l,fastpaths:!1}),o.scan=(u,l)=>n(u,l),o.compileRe=(u,l,c=!1,d=!1)=>{if(c===!0)return u.output;const m=l||{},p=m.contains?"":"^",g=m.contains?"":"$";let E=`${p}(?:${u.output})${g}`;u&&u.negated===!0&&(E=`^(?!${E}).*$`);const A=o.toRegex(E,l);return d===!0&&(A.state=u),A},o.makeRe=(u,l,c=!1,d=!1)=>{if(!u||typeof u!="string")throw new TypeError("Expected a non-empty string");const m=l||{};let p={negated:!1,fastpaths:!0},g="",E;return u.startsWith("./")&&(u=u.slice(2),g=p.prefix="./"),m.fastpaths!==!1&&(u[0]==="."||u[0]==="*")&&(E=r.fastpaths(u,l)),E===void 0?(p=r(u,l),p.prefix=g+(p.prefix||"")):p.output=E,o.compileRe(p,l,c,d)},o.toRegex=(u,l)=>{try{const c=l||{};return new RegExp(u,c.flags||(c.nocase?"i":""))}catch(c){if(l&&l.debug===!0)throw c;return/$^/}},o.constants=s,t.exports=o}}),Vm=Gn({"../node_modules/.pnpm/picomatch-browser@2.2.6/node_modules/picomatch-browser/index.js"(e,t){t.exports=Bm()}}),Ml={};xm(Ml,{__debug:()=>Mo,check:()=>Nc,default:()=>za,doc:()=>Cs,format:()=>Ya,formatWithCursor:()=>Rs,getSupportInfo:()=>Oo,util:()=>As,version:()=>Ro});function Um(e,t,n){return Pc.diff(e,t,n)}function $m(e){let t=e.indexOf(ds);return t!==-1?e.charAt(t+1)===Ci?Xa:Ja:Uc}function Pa(e){return e===Ja?ds:e===Xa?Qa:$c}function Pl(e,t){let n=jc.get(t);return e.match(n)?.length??0}function jm(e){return Si(0,e,qc,Ci)}function qm(e){return this[e<0?this.length+e:e]}function Hm(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===` -`);)t--;return t`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${r}.`}function Ym(e,t,n,r){let i=[e];for(;i.length>0;){let s=i.pop();if(s===Ka){n(i.pop());continue}n&&i.push(s,Ka);let a=Yn(s);if(!a)throw new hr(s);if(t?.(s)!==!1)switch(a){case cn:case zt:{let o=a===cn?s:s.parts;for(let u=o.length,l=u-1;l>=0;--l)i.push(o[l]);break}case wt:i.push(s.flatContents,s.breakContents);break;case Et:if(r&&s.expandedStates)for(let o=s.expandedStates.length,u=o-1;u>=0;--u)i.push(s.expandedStates[u]);else i.push(s.contents);break;case dn:case fn:case pn:case Jt:case mn:i.push(s.contents);break;case Wn:case An:case hn:case gn:case ut:case Ot:break;default:throw new hr(s)}}}function rs(e,t){if(typeof e=="string")return t(e);let n=new Map;return r(e);function r(s){if(n.has(s))return n.get(s);let a=i(s);return n.set(s,a),a}function i(s){switch(Yn(s)){case cn:return t(s.map(r));case zt:return t({...s,parts:s.parts.map(r)});case wt:return t({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case Et:{let{expandedStates:a,contents:o}=s;return a?(a=a.map(r),o=a[0]):o=r(o),t({...s,contents:o,expandedStates:a})}case dn:case fn:case pn:case Jt:case mn:return t({...s,contents:r(s.contents)});case Wn:case An:case hn:case gn:case ut:case Ot:return t(s);default:throw new hr(s)}}}function Ba(e,t,n){let r=n,i=!1;function s(a){if(i)return!1;let o=t(a);o!==void 0&&(i=!0,r=o)}return hs(e,s),r}function zm(e){if(e.type===Et&&e.break||e.type===ut&&e.hard||e.type===Ot)return!0}function Jm(e){return Ba(e,zm,!1)}function Bl(e){if(e.length>0){let t=Ke(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Xm(e){let t=new Set,n=[];function r(s){if(s.type===Ot&&Bl(n),s.type===Et){if(n.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===Et&&n.pop().break&&Bl(n)}hs(e,r,i,!0)}function Qm(e){return e.type===ut&&!e.hard?e.soft?"":" ":e.type===wt?e.flatContents:e}function Zm(e){return rs(e,Qm)}function Vl(e){for(e=[...e];e.length>=2&&Ke(0,e,-2).type===ut&&Ke(0,e,-1).type===Ot;)e.length-=2;if(e.length>0){let t=bi(Ke(0,e,-1));e[e.length-1]=t}return e}function bi(e){switch(Yn(e)){case fn:case pn:case Et:case mn:case Jt:{let t=bi(e.contents);return{...e,contents:t}}case wt:return{...e,breakContents:bi(e.breakContents),flatContents:bi(e.flatContents)};case zt:return{...e,parts:Vl(e.parts)};case cn:return Vl(e);case Wn:return Hm(e);case dn:case An:case hn:case gn:case ut:case Ot:break;default:throw new hr(e)}return e}function Ul(e){return bi(eg(e))}function Km(e){switch(Yn(e)){case zt:if(e.parts.every(t=>t===""))return"";break;case Et:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Et&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case dn:case fn:case pn:case mn:if(!e.contents)return"";break;case wt:if(!e.flatContents&&!e.breakContents)return"";break;case cn:{let t=[];for(let n of e){if(!n)continue;let[r,...i]=Array.isArray(n)?n:[n];typeof r=="string"&&typeof Ke(0,t,-1)=="string"?t[t.length-1]+=r:t.push(r),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Wn:case An:case hn:case gn:case ut:case Jt:case Ot:break;default:throw new hr(e)}return e}function eg(e){return rs(e,t=>Km(t))}function tg(e,t=ro){return rs(e,n=>typeof n=="string"?Hl(t,n.split(` -`)):n)}function ng(e){if(e.type===ut)return!0}function rg(e){return Ba(e,ng,!1)}function is(e,t){return e.type===Jt?{...e,contents:t(e.contents)}:t(e)}function ss(e){return Xt(e),{type:fn,contents:e}}function $r(e,t){return zc(e),Xt(t),{type:dn,contents:t,n:e}}function ig(e){return $r(Number.NEGATIVE_INFINITY,e)}function $l(e){return $r({type:"root"},e)}function sg(e){return $r(-1,e)}function jl(e,t,n){Xt(e);let r=e;if(t>0){for(let i=0;i0?`, { ${u.join(", ")} }`:"";return`indentIfBreak(${r(s.contents)}${l})`}if(s.type===Et){let u=[];s.break&&s.break!=="propagated"&&u.push("shouldBreak: true"),s.id&&u.push(`id: ${i(s.id)}`);let l=u.length>0?`, { ${u.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(c=>r(c)).join(",")}]${l})`:`group(${r(s.contents)}${l})`}if(s.type===zt)return`fill([${s.parts.map(u=>r(u)).join(", ")}])`;if(s.type===mn)return"lineSuffix("+r(s.contents)+")";if(s.type===gn)return"lineSuffixBoundary";if(s.type===Jt)return`label(${JSON.stringify(s.label)}, ${r(s.contents)})`;if(s.type===An)return"cursor";throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let a=s.description||"symbol";for(let o=0;;o++){let u=a+(o>0?` #${o}`:"");if(!n.has(u))return n.add(u),t[s]=`Symbol.for(${JSON.stringify(u)})`}}}function dg(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function hg(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function pg(e){if(!e)return 0;if(!ef.test(e))return e.length;e=e.replace(Zc(),n=>tf.has(n)?" ":" ");let t=0;for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||r>=65024&&r<=65039||(t+=dg(r)||hg(r)?2:1)}return t}function Gl(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let g of r)switch(g.type){case 0:c(),n.useTabs?u(1):l(n.tabWidth);break;case 3:{let{string:E}=g;c(),i+=E,s+=E.length;break}case 2:{let{width:E}=g;a+=1,o+=E;break}default:throw new Error(`Unexpected indent comment '${g.type}'.`)}return m(),{...e,value:i,length:s,queue:r};function u(g){i+=" ".repeat(g),s+=n.tabWidth*g}function l(g){i+=" ".repeat(g),s+=g}function c(){n.useTabs?d():m()}function d(){a>0&&u(a),p()}function m(){o>0&&l(o),p()}function p(){a=0,o=0}}function mg(e,t,n){if(!t)return e;if(t.type==="root")return{...e,root:e};if(t===Number.NEGATIVE_INFINITY)return e.root;let r;return typeof t=="number"?t<0?r=rf:r={type:2,width:t}:r={type:3,string:t},Gl(e,r,n)}function gg(e,t){return Gl(e,nf,t)}function Dg(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===" "||r===" ")t++;else break}return t}function Wl(e){let t=Dg(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}function as(e,t,n,r,i,s){if(n===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=!1,u=[e],l="";for(;n>=0;){if(u.length===0){if(a===0)return!0;u.push(t[--a]);continue}let{mode:c,doc:d}=u.pop(),m=Yn(d);switch(m){case Wn:d&&(o&&(l+=" ",n-=1,o=!1),l+=d,n-=ms(d));break;case cn:case zt:{let p=m===cn?d:d.parts,g=d[gs]??0;for(let E=p.length-1;E>=g;E--)u.push({mode:c,doc:p[E]});break}case fn:case dn:case pn:case Jt:u.push({mode:c,doc:d.contents});break;case hn:{let{text:p,count:g}=Wl(l);l=p,n+=g;break}case Et:{if(s&&d.break)return!1;let p=d.break?bt:c,g=d.expandedStates&&p===bt?Ke(0,d.expandedStates,-1):d.contents;u.push({mode:p,doc:g});break}case wt:{let p=(d.groupId?i[d.groupId]||Qt:c)===bt?d.breakContents:d.flatContents;p&&u.push({mode:c,doc:p});break}case ut:if(c===bt||d.hard)return!0;d.soft||(o=!0);break;case mn:r=!0;break;case gn:if(r)return!1;break}}return!1}function os(e,t){let n=Object.create(null),r=t.printWidth,i=Pa(t.endOfLine),s=0,a=[{indent:io,mode:bt,doc:e}],o="",u=!1,l=[],c=[],d=[],m=[],p=0;for(Xm(e);a.length>0;){let{indent:w,mode:F,doc:S}=a.pop();switch(Yn(S)){case Wn:{let L=i!==` -`?Si(0,S,` -`,i):S;L&&(o+=L,a.length>0&&(s+=ms(L)));break}case cn:for(let L=S.length-1;L>=0;L--)a.push({indent:w,mode:F,doc:S[L]});break;case An:if(c.length>=2)throw new Error("There are too many 'cursor' in doc.");c.push(p+o.length);break;case fn:a.push({indent:gg(w,t),mode:F,doc:S.contents});break;case dn:a.push({indent:mg(w,S.n,t),mode:F,doc:S.contents});break;case hn:T();break;case Et:switch(F){case Qt:if(!u){a.push({indent:w,mode:S.break?bt:Qt,doc:S.contents});break}case bt:{u=!1;let L={indent:w,mode:Qt,doc:S.contents},O=r-s,P=l.length>0;if(!S.break&&as(L,a,O,P,n))a.push(L);else if(S.expandedStates){let X=Ke(0,S.expandedStates,-1);if(S.break){a.push({indent:w,mode:bt,doc:X});break}else for(let R=1;R=S.expandedStates.length){a.push({indent:w,mode:bt,doc:X});break}else{let V=S.expandedStates[R],q={indent:w,mode:Qt,doc:V};if(as(q,a,O,P,n)){a.push(q);break}}}else a.push({indent:w,mode:bt,doc:S.contents});break}}S.id&&(n[S.id]=Ke(0,a,-1).mode);break;case zt:{let L=r-s,O=S[gs]??0,{parts:P}=S,X=P.length-O;if(X===0)break;let R=P[O+0],V=P[O+1],q={indent:w,mode:Qt,doc:R},Q={indent:w,mode:bt,doc:R},M=as(q,[],L,l.length>0,n,!0);if(X===1){M?a.push(q):a.push(Q);break}let B={indent:w,mode:Qt,doc:V},J={indent:w,mode:bt,doc:V};if(X===2){M?a.push(B,q):a.push(J,Q);break}let Y=P[O+2],ne={indent:w,mode:F,doc:{...S,[gs]:O+2}},K=as({indent:w,mode:Qt,doc:[R,V,Y]},[],L,l.length>0,n,!0);a.push(ne),K?a.push(B,q):M?a.push(J,q):a.push(J,Q);break}case wt:case pn:{let L=S.groupId?n[S.groupId]:F;if(L===bt){let O=S.type===wt?S.breakContents:S.negate?S.contents:ss(S.contents);O&&a.push({indent:w,mode:F,doc:O})}if(L===Qt){let O=S.type===wt?S.flatContents:S.negate?ss(S.contents):S.contents;O&&a.push({indent:w,mode:F,doc:O})}break}case mn:l.push({indent:w,mode:F,doc:S.contents});break;case gn:l.length>0&&a.push({indent:w,mode:F,doc:ps});break;case ut:switch(F){case Qt:if(S.hard)u=!0;else{S.soft||(o+=" ",s+=1);break}case bt:if(l.length>0){a.push({indent:w,mode:F,doc:S},...l.reverse()),l.length=0;break}S.literal?(o+=i,s=0,w.root&&(w.root.value&&(o+=w.root.value),s=w.root.length)):(T(),o+=i+w.value,s=w.length);break}break;case Jt:a.push({indent:w,mode:F,doc:S.contents});break;case Ot:break;default:throw new hr(S)}a.length===0&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let g=d.join("")+o,E=[...m,...c];if(E.length!==2)return{formatted:g};let A=E[0];return{formatted:g,cursorNodeStart:A,cursorNodeText:g.slice(A,Ke(0,E,-1))};function T(){let{text:w,count:F}=Wl(o);w&&(d.push(w),p+=w.length),o="",s-=F,c.length>0&&(m.push(...c.map(S=>Math.min(S,p))),c.length=0)}}function vg(e,t,n=0){let r=0;for(let i=n;i{let i=!!r?.backwards;if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a0}function*us(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=s=>vs(s)&&r(s);for(let s of n(e)){let a=e[s];if(Array.isArray(a))for(let o of a)i(o)&&(yield o);else i(a)&&(yield a)}}function*Ng(e,t){let n=[e];for(let r=0;r(s??(s=[e,...t]),i(l,s)?[l]:Yl(l,s,n))),{locStart:o,locEnd:u}=n;return a.sort((l,c)=>o(l)-o(c)||u(l)-u(c)),r.set(e,a),a}function Sg(e){let t=e.type||e.kind||"(unknown type)",n=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return n.length>20&&(n=n.slice(0,19)+"…"),t+(n?" "+n:"")}function Ua(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Sg(e)}function Ni(e,t){t.leading=!0,t.trailing=!1,Ua(e,t)}function fr(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),Ua(e,t)}function Ti(e,t){t.leading=!1,t.trailing=!0,Ua(e,t)}function zl(e,t,n,r,i=[]){let{locStart:s,locEnd:a}=n,o=s(t),u=a(t),l=uo(e,i,{cache:lo,locStart:s,locEnd:a,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),c,d,m=0,p=l.length;for(;m>1,E=l[g],A=s(E),T=a(E);if(A<=o&&u<=T)return zl(E,t,n,E,[E,...i]);if(T<=o){c=E,m=g+1;continue}if(u<=A){d=E,p=g;continue}throw new Error("Comment location overlaps with node location")}if(r?.type==="TemplateLiteral"){let{quasis:g}=r,E=$a(g,t,n);c&&$a(g,c,n)!==E&&(c=null),d&&$a(g,d,n)!==E&&(d=null)}return{enclosingNode:r,precedingNode:c,followingNode:d}}function Cg(e,t){let{comments:n}=e;if(delete e.comments,!uf(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:s={}},originalText:a}=t,{ownLine:o=ys,endOfLine:u=ys,remaining:l=ys}=s,c=n.map((d,m)=>({...zl(e,d,t),comment:d,text:a,options:t,ast:e,isLastComment:n.length-1===m}));for(let[d,m]of c.entries()){let{comment:p,precedingNode:g,enclosingNode:E,followingNode:A,text:T,options:w,ast:F,isLastComment:S}=m,L;if(i?L=[m]:(p.enclosingNode=E,p.precedingNode=g,p.followingNode=A,L=[p,T,w,F,S]),Ag(T,w,c,d))p.placement="ownLine",o(...L)||(A?Ni(A,p):g?Ti(g,p):fr(E||F,p));else if(Fg(T,w,c,d))p.placement="endOfLine",u(...L)||(g?Ti(g,p):A?Ni(A,p):fr(E||F,p));else if(p.placement="remaining",!l(...L))if(g&&A){let O=r.length;O>0&&r[O-1].followingNode!==A&&Jl(r,w),r.push(m)}else g?Ti(g,p):A?Ni(A,p):fr(E||F,p)}if(Jl(r,t),!i)for(let d of n)delete d.precedingNode,delete d.enclosingNode,delete d.followingNode}function Ag(e,t,n,r){let{comment:i,precedingNode:s}=n[r],{locStart:a,locEnd:o}=t,u=a(i);if(s)for(let l=r-1;l>=0;l--){let{comment:c,precedingNode:d}=n[l];if(d!==s||!co(e.slice(o(c),u)))break;u=a(c)}return wn(e,u,{backwards:!0})}function Fg(e,t,n,r){let{comment:i,followingNode:s}=n[r],{locStart:a,locEnd:o}=t,u=o(i);if(s)for(let l=r+1;l0;--a){let{comment:o,precedingNode:u,followingNode:l}=e[a-1];Cn(u,r),Cn(l,i);let c=t.originalText.slice(t.locEnd(o),s);if(t.printer.isGap?.(c,t)??/^[\s(]*$/u.test(c))s=t.locStart(o);else break}for(let[o,{comment:u}]of e.entries())o1&&o.comments.sort((u,l)=>t.locStart(u)-t.locStart(l));e.length=0}function $a(e,t,n){let r=n.locStart(t)-1;for(let i=1;i!r.has(o)).length===0)return{leading:"",trailing:""};let i=[],s=[],a;return e.each(()=>{let o=e.node;if(r?.has(o))return;let{leading:u,trailing:l}=o;u?i.push(Lg(e,t)):l&&(a=Ig(e,t,a),s.push(a.doc))},"comments"),{leading:i,trailing:s}}function xg(e,t,n){let{leading:r,trailing:i}=Rg(e,n);return!r&&!i?t:is(t,s=>[r,s,i])}function kg(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:n}=e;for(let r of t){if(!r.printed&&!n.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}function Ql({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(i=>i.languages??[]),r=[];for(let i of Mg(Object.assign({},...e.map(({options:s})=>s),cf)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...Og(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>s.defaultOptions?.[i.name]!==void 0).map(s=>[s.name,s.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*Og(e,t,n){let r=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!r.has(s)){r.add(s);let a=n.find(u=>u.parsers&&Object.prototype.hasOwnProperty.call(u.parsers,s)),o=i.name;a?.name&&(o+=` (plugin: ${a.name})`),yield{value:s,description:o}}}}function Mg(e){let t=[];for(let[n,r]of Object.entries(e)){let i={name:n,...r};Array.isArray(i.default)&&(i.default=Ke(0,i.default,-1).value),t.push(i)}return t}function Pg(){let e=globalThis,t=e.Deno?.build?.os;return typeof t=="string"?t==="windows":e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}function Zl(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Bg(e){return e=Zl(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Vg(e){e=Zl(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function Ug(e){return pf?Vg(e):Bg(e)}function Kl(e,t){if(!t)return;let n=mf(t).toLowerCase();return e.find(({filenames:r})=>r?.some(i=>i.toLowerCase()===n))??e.find(({extensions:r})=>r?.some(i=>n.endsWith(i)))}function $g(e,t){if(t)return e.find(({name:n})=>n.toLowerCase()===t)??e.find(({aliases:n})=>n?.includes(t))??e.find(({extensions:n})=>n?.includes(`.${t}`))}function ec(e,t){if(t){if(gf(t))try{t=Ug(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:n})=>n?.({filepath:t}))}}function jg(e,t){let n=hf(0,e.plugins).flatMap(r=>r.languages??[]);return($g(n,t.language)??Kl(n,t.physicalFile)??Kl(n,t.file)??ec(n,t.physicalFile)??ec(n,t.file)??Df?.(n,t.physicalFile))?.parsers[0]}function tc(e,t,n,r){return[`Invalid ${Zt.red(r.key(e))} value.`,`Expected ${Zt.blue(n)},`,`but received ${t===go?Zt.gray("nothing"):Zt.red(r.value(t))}.`].join(" ")}function nc({text:e,list:t},n){let r=[];return e&&r.push(`- ${Zt.blue(e)}`),t&&r.push([`- ${Zt.blue(t.title)}:`].concat(t.values.map(i=>nc(i,n-Do.length).replace(/^|\n/g,`$&${Do}`))).join(` -`)),rc(r,n)}function rc(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,s]=e.map(a=>a.split(` -`,1)[0].length);return i>t&&i>s?r:n}function ja(e,t,n){if(e===t)return 0;let r=n?.maxDistance,i=e;e.length>t.length&&(e=t,t=i);let s=e.length,a=t.length;for(;s>0&&e.charCodeAt(~-s)===t.charCodeAt(~-a);)s--,a--;let o=0;for(;or)return r;if(s===0)return r!==void 0&&a>r?r:a;let u,l,c,d,m=0,p=0;for(;ml?d>l?l+1:d:d>c?c+1:d;if(r!==void 0){let g=l;for(m=0;mr)return r}}return mr.length=s,_s.length=s,r!==void 0&&l>r?r:l}function qg(e,t,n){if(!Array.isArray(t)||t.length===0)return;let r=n?.maxDistance,i=e.length;for(let u of t)if(u===e)return u;let s,a=Number.POSITIVE_INFINITY,o=new Set;for(let u of t){if(o.has(u))continue;o.add(u);let l=Math.abs(u.length-i);if(l>=a||l>r)continue;let c=Number.isFinite(a)?Math.min(a,r):r,d=c===void 0?ja(e,u):ja(e,u,{maxDistance:c});if(d>r)continue;let m=d;if(c!==void 0&&d===c&&c===r&&(m=ja(e,u)),mr))return s}function Hg(e,t){let n=new e(t),r=Object.create(n);for(let i of Ef)i in t&&(r[i]=Gg(t[i],n,Ln.prototype[i].length));return r}function Gg(e,t,n){return typeof e=="function"?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}function ic({from:e,to:t}){return{from:[e],to:t}}function Wg(e,t){let n=Object.create(null);for(let r of e){let i=r[t];if(n[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n[i]=r}return n}function Yg(e,t){let n=new Map;for(let r of e){let i=r[t];if(n.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n.set(i,r)}return n}function zg(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function Jg(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function Xg(e){return e===Math.floor(e)}function Qg(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=["undefined","object","boolean","number","string"];return n!==r?i.indexOf(n)-i.indexOf(r):n!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Zg(e){return(...t)=>{let n=e(...t);return typeof n=="string"?new Error(n):n}}function sc(e){return e===void 0?{}:e}function ac(e){if(typeof e=="string")return{text:e};let{text:t,list:n}=e;return Kg((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(ac)}}:{text:t}}function oc(e,t){return e===!0?!0:e===!1?{value:t}:e}function uc(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function lc(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function qa(e,t){return e===void 0?[]:Array.isArray(e)?e.map(n=>lc(n,t)):[lc(e,t)]}function cc(e,t){let n=qa(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}}function Kg(e,t){if(!e)throw new Error(t)}function eD(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:s,descriptor:a}={}){if(r){if(!s)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=pr;let o=i?Array.isArray(i)?(m,p)=>i.includes(m)?{[m]:p}:void 0:(m,p)=>({[m]:p}):(m,p,g)=>{let{_:E,...A}=g.schemas;return vo(m,p,{...g,schemas:A})},u=tD(t,{isCLI:r,FlagSchema:s}),l=new Rf(u,{logger:n,unknown:o,descriptor:a}),c=n!==!1;c&&Eo&&(l._hasDeprecationWarned=Eo);let d=l.normalize(e);return c&&(Eo=l._hasDeprecationWarned),d}function tD(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(_f.create({name:"_"}));for(let i of e)r.push(nD(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(bf.create({name:i.alias,sourceName:i.name}));return r}function nD(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,s={name:i},a,o={};switch(e.type){case"int":a=Af,t&&(s.preprocess=Number);break;case"string":a=yo;break;case"choice":a=Sf,s.choices=e.choices.map(u=>u?.redirect?{...u,redirect:{to:{key:e.name,value:u.redirect}}}:u);break;case"boolean":a=Tf;break;case"flag":a=r,s.flags=n.flatMap(u=>[u.alias,u.description&&u.name,u.oppositeDescription&&`no-${u.name}`].filter(Boolean));break;case"path":a=yo;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(u,l,c)=>e.exception(u)||l.validate(u,c):s.validate=(u,l,c)=>u===void 0||l.validate(u,c),e.redirect&&(o.redirect=u=>u?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),t&&!e.array){let u=s.preprocess||(l=>l);s.preprocess=(l,c,d)=>c.preprocess(u(Array.isArray(l)?Ke(0,l,-1):l),d)}return e.array?Nf.create({...t?{preprocess:u=>Array.isArray(u)?u:[u]}:{},...o,valueSchema:a.create(s)}):a.create({...s,...o})}function rD(e){return!!e?.[Mf]}async function iD(e,t,n,r){let{node:i}=n,{language:s}=i;if(!_o.has(s))return;let a=i.value.trim(),o;if(a){let u=s==="yaml"?s:po(r,{language:s});if(!u)return;o=a?await e(a,{parser:u}):""}else o=a;return $l([i.startDelimiter,i.explicitLanguage??"",Dn,o,o?Dn:"",i.endDelimiter])}function sD(e,t){return No({node:e})&&(delete t.end,delete t.raw,delete t.value),t}function aD({node:e}){return e.raw}function oD(e,t){let n=e?r=>e(r,To):Uf;return t?new Proxy(n,{apply:(r,i,s)=>Ns(s[0])?Pf:Reflect.apply(r,i,s)}):n}function fc(e,t){if(!t)throw new Error("parserName is required.");let n=bo(0,e,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new fo(r)}function uD(e,t){if(!t)throw new Error("astFormat is required.");let n=bo(0,e,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new fo(r)}function Ha({plugins:e,parser:t}){let n=fc(e,t);return dc(n,t)}function dc(e,t){let n=e.parsers[t];return typeof n=="function"?n():n}async function lD(e,t){let n=e.printers[t],r=typeof n=="function"?await n():n;return cD(r)}function cD(e){if(Ts.has(e))return Ts.get(e);let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:s,...a}=e;t=dD(t);let o=t.experimental_frontMatterSupport;n=So(n,o.massageAstNode||o.embed||o.print);let u=i;i&&o.massageAstNode&&(u=new Proxy(i,{apply(m,p,g){return Bf(...g),Reflect.apply(m,p,g)}}));let l=r;if(r){let m;l=new Proxy(r,{get(p,g,E){return g==="getVisitorKeys"?(m??(m=r.getVisitorKeys?So(r.getVisitorKeys,o.massageAstNode||o.embed):n),m):Reflect.get(p,g,E)},apply:(p,g,E)=>o.embed&&No(...E)?iD:Reflect.apply(p,g,E)})}let c=s;o.print&&(c=new Proxy(s,{apply(m,p,g){let[E]=g;return Ns(E.node)?Vf(E):Reflect.apply(m,p,g)}}));let d={features:t,getVisitorKeys:n,embed:l,massageAstNode:u,print:c,...a};return Ts.set(e,d),d}function fD(e){return{...jf,...e}}function dD(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:fD(e?.experimental_frontMatterSupport)}}async function hD(e,t={}){let n={...e};if(!n.parser)if(n.filepath){if(n.parser=po(n,{physicalFile:n.filepath}),!n.parser)throw new ho(`No parser could be inferred for file "${n.filepath}".`)}else throw new ho("No parser and no file path given, couldn't infer a parser.");let r=Ql({plugins:e.plugins,showDeprecated:!0}).options,i={...Co,...Object.fromEntries(r.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},s=fc(n.plugins,n.parser),a=await dc(s,n.parser);n.astFormat=a.astFormat,n.locEnd=a.locEnd,n.locStart=a.locStart;let o=s.printers?.[a.astFormat]?s:uD(n.plugins,a.astFormat),u=await lD(o,a.astFormat);n.printer=u,n.getVisitorKeys=u.getVisitorKeys;let l=o.defaultOptions?Object.fromEntries(Object.entries(o.defaultOptions).filter(([,d])=>d!==void 0)):{},c={...i,...l};for(let[d,m]of Object.entries(c))(n[d]===null||n[d]===void 0)&&(n[d]=m);return n.parser==="json"&&(n.trailingComma="none"),xf(n,r,{passThrough:Object.keys(Co),...t})}function hc(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:wi(wi(e.white,e.bgRed),e.bold),gutter:e.gray,marker:wi(e.red,e.bold),message:wi(e.red,e.bold),reset:e.reset}}function pD(){return new Proxy({},{get:()=>e=>e})}function mD(e,t,n){let r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:s=2,linesBelow:a=3}=n||{},o=r.line,u=r.column,l=i.line,c=i.column,d=Math.max(o-(s+1),0),m=Math.min(t.length,l+a);o===-1&&(d=0),l===-1&&(m=t.length);let p=l-o,g={};if(p)for(let E=0;E<=p;E++){let A=E+o;if(!u)g[A]=!0;else if(E===0){let T=t[A-1].length;g[A]=[u,T-u+1]}else if(E===p)g[A]=[0,c];else{let T=t[A-E].length;g[A]=[0,T]}}else u===c?u?g[o]=[u,0]:g[o]=!0:g[o]=[u,c-u];return{start:d,end:m,markerLines:g}}function gD(e,t,n={}){let r=pD(),i=e.split(Ao),{start:s,end:a,markerLines:o}=mD(t,i,n),u=t.start&&typeof t.start.column=="number",l=String(a).length,c=e.split(Ao,a).slice(s,a).map((d,m)=>{let p=s+1+m,g=` ${` ${p}`.slice(-l)} |`,E=o[p],A=!o[p+1];if(E){let T="";if(Array.isArray(E)){let w=d.slice(0,Math.max(E[0]-1,0)).replace(/[^\t]/g," "),F=E[1]||1;T=[` - `,r.gutter(g.replace(/\d/g," "))," ",w,r.marker("^").repeat(F)].join(""),A&&n.message&&(T+=" "+r.message(n.message))}return[r.marker(">"),r.gutter(g),d.length>0?` ${d}`:"",T].join("")}else return` ${r.gutter(g)}${d.length>0?` ${d}`:""}`}).join(` -`);return n.message&&!u&&(c=`${" ".repeat(l+1)}${n.message} -${c}`),c}async function DD(e,t){let n=await Ha(t),r=n.preprocess?await n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(s){vD(s,e)}return{text:r,ast:i}}function vD(e,t){let{loc:n}=e;if(n){let r=gD(t,n,{});throw e.message+=` -`+r,e.codeFrame=r,e}throw e}async function yD(e,t,n,r,i){if(n.embeddedLanguageFormatting!=="auto")return;let{printer:s}=n,{embed:a}=s;if(!a)return;if(a.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:o}=s,{getVisitorKeys:u}=a,l=[];m();let c=e.stack;for(let{print:p,node:g,pathStack:E}of l)try{e.stack=E;let A=await p(d,t,e,n);A&&i.set(g,A)}catch(A){if(globalThis.PRETTIER_DEBUG)throw A}e.stack=c;function d(p,g){return ED(p,g,n,r)}function m(){let{node:p}=e;if(p===null||typeof p!="object"||o?.(e))return;for(let E of u(p))Array.isArray(p[E])?e.each(m,E):e.call(m,E);let g=a(e,n);if(g){if(typeof g=="function"){l.push({print:g,node:p,pathStack:[...e.stack]});return}i.set(p,g)}}}async function ED(e,t,n,r){let i=await gr({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:s}=await qr(e,i),a=await r(s,i);return Ul(a)}function bD(e,t,n,r){let{originalText:i,[Symbol.for("comments")]:s,locStart:a,locEnd:o,[Symbol.for("printedComments")]:u}=t,{node:l}=e,c=a(l),d=o(l);for(let p of s)a(p)>=c&&o(p)<=d&&u.add(p);let{printPrettierIgnored:m}=t.printer;return m?m(e,t,n,r):i.slice(c,d)}async function ls(e,t){({ast:e}=await mc(e,t));let n=new Map,r=new af(e),i=lf(t),s=new Map;await yD(r,o,t,ls,s);let a=await pc(r,t,o,void 0,s);if(kg(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[zn,a];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[a,zn]}return a;function o(l,c){return l===void 0||l===r?u(c):Array.isArray(l)?r.call(()=>u(c),...l):r.call(()=>u(c),l)}function u(l){i(r);let c=r.node;if(c==null)return"";let d=vs(c)&&l===void 0;if(d&&n.has(c))return n.get(c);let m=pc(r,t,o,l,s);return d&&n.set(c,m),m}}function pc(e,t,n,r,i){let{node:s}=e,{printer:a}=t,o;switch(a.hasPrettierIgnore?.(e)?o=qf(e,t,n,r):i.has(s)?o=i.get(s):o=a.print(e,t,n,r),s){case t.cursorNode:o=is(o,u=>[zn,u,zn]);break;case t.nodeBeforeCursor:o=is(o,u=>[u,zn]);break;case t.nodeAfterCursor:o=is(o,u=>[zn,u]);break}return a.printComment&&!a.willPrintOwnComments?.(e,t)&&(o=xg(e,o,t)),o}async function mc(e,t){let n=e.comments??[];t[Symbol.for("comments")]=n,t[Symbol.for("printedComments")]=new Set,Cg(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function _D(e,t){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:s}=t,a=p=>r(p)<=n&&i(p)>=n,o=e,u=[e];for(let p of Ng(e,{getVisitorKeys:s,filter:a}))u.push(p),o=p;if(Tg(o,{getVisitorKeys:s}))return{cursorNode:o};let l,c,d=-1,m=Number.POSITIVE_INFINITY;for(;u.length>0&&(l===void 0||c===void 0);){o=u.pop();let p=l!==void 0,g=c!==void 0;for(let E of us(o,{getVisitorKeys:s})){if(!p){let A=i(E);A<=n&&A>d&&(l=E,d=A)}if(!g){let A=r(E);A>=n&&Aa(m,u)).filter(Boolean);let l={},c=new Set(i(o));for(let m in o)!Object.prototype.hasOwnProperty.call(o,m)||s?.has(m)||(c.has(m)?l[m]=a(o[m],o):l[m]=o[m]);let d=r(o,l,u);if(d!==null)return d??l}}function TD(e,t){return t=new Set(t),e.find(n=>wo.has(n.type)&&t.has(n))}function gc(e){let t=Yf(0,e,n=>n.type!=="Program"&&n.type!=="File");return t===-1?e:e.slice(0,t+1)}function SD(e,t,{locStart:n,locEnd:r}){let[i,...s]=e,[a,...o]=t;if(i===a)return[i,a];let u=n(i);for(let c of gc(o))if(n(c)>=u)a=c;else break;let l=r(a);for(let c of gc(s)){if(r(c)<=l)i=c;else break;if(i===a)break}return[i,a]}function Ga(e,t,n,r,i=[],s){let{locStart:a,locEnd:o}=n,u=a(e),l=o(e);if(t>l||tr);let o=e.slice(r,i).search(/\S/u),u=o===-1;if(!u)for(r+=o;i>r&&!/\S/u.test(e[i-1]);--i);let l=Ga(n,r,t,(p,g)=>Dc(t,p,g),[],"rangeStart");if(!l)return;let c=u?l:Ga(n,i,t,p=>Dc(t,p),[],"rangeEnd");if(!c)return;let d,m;if(zf(t)){let p=TD(l,c);d=p,m=p}else[d,m]=SD(l,c,t);return[Math.min(s(d),s(m)),Math.max(a(d),a(m))]}async function vc(e,t,n=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:i}=await qr(e,t);t.cursorOffset>=0&&(t={...t,...Fo(r,t)});let s=await ls(r,t);n>0&&(s=jl([Dn,s],n,t.tabWidth));let a=os(s,t);if(n>0){let u=a.formatted.trim();a.cursorNodeStart!==void 0&&(a.cursorNodeStart-=a.formatted.indexOf(u),a.cursorNodeStart<0&&(a.cursorNodeStart=0,a.cursorNodeText=a.cursorNodeText.trimStart()),a.cursorNodeStart+a.cursorNodeText.length>u.length&&(a.cursorNodeText=a.cursorNodeText.trimEnd())),a.formatted=u+Pa(t.endOfLine)}let o=t[Symbol.for("comments")];if(t.cursorOffset>=0){let u,l,c,d;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&a.cursorNodeText)if(c=a.cursorNodeStart,d=a.cursorNodeText,t.cursorNode)u=t.locStart(t.cursorNode),l=i.slice(u,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");u=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let T=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;l=i.slice(u,T)}else u=0,l=i,c=0,d=a.formatted;let m=t.cursorOffset-u;if(l===d)return{formatted:a.formatted,cursorOffset:c+m,comments:o};let p=l.split("");p.splice(m,0,Io);let g=d.split(""),E=Um(p,g),A=c;for(let T of E)if(T.removed){if(T.value.includes(Io))break}else A+=T.count;return{formatted:a.formatted,cursorOffset:A,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}async function FD(e,t){let{ast:n,text:r}=await qr(e,t),[i,s]=AD(r,t,n)??[0,0],a=r.slice(i,s),o=Math.min(i,r.lastIndexOf(` -`,i)+1),u=r.slice(o,i).match(/^\s*/u)[0],l=Ds(u,t.tabWidth),c=await vc(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),d=c.formatted.trimEnd(),{cursorOffset:m}=t;m>s?m+=d.length-a.length:c.cursorOffset>=0&&(m=c.cursorOffset+i);let p=r.slice(0,i)+d+r.slice(s);if(t.endOfLine!=="lf"){let g=Pa(t.endOfLine);m>=0&&g===`\r -`&&(m+=Pl(p.slice(0,m),` -`)),p=Si(0,p,` -`,g)}return{formatted:p,cursorOffset:m,comments:c.comments}}function Wa(e,t,n){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?n:t}function yc(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=Wa(e,n,-1),r=Wa(e,r,0),i=Wa(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function Ec(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s}=yc(e,t),a=e.charAt(0)===Lo;if(a&&(e=e.slice(1),n--,r--,i--),s==="auto"&&(s=$m(e)),e.includes("\r")){let o=u=>Pl(e.slice(0,Math.max(u,0)),`\r -`);n-=o(n),r-=o(r),i-=o(i),e=jm(e)}return{hasBOM:a,text:e,options:yc(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s})}}async function bc(e,t){let n=await Ha(t);return!n.hasPragma||n.hasPragma(e)}async function wD(e,t){return(await Ha(t)).hasIgnorePragma?.(e)}async function _c(e,t){let{hasBOM:n,text:r,options:i}=Ec(e,await gr(t));if(i.rangeStart>=i.rangeEnd&&r!==""||i.requirePragma&&!await bc(r,i)||i.checkIgnorePragma&&await wD(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function LD(e,t,n){let{text:r,options:i}=Ec(e,await gr(t)),s=await qr(r,i);return n&&(n.preprocessForPrint&&(s.ast=await mc(s.ast,i)),n.massage&&(s.ast=Hf(s.ast,i))),s}async function ID(e,t){t=await gr(t);let n=await ls(e,t);return os(n,t)}async function RD(e,t){let n=fg(e),{formatted:r}=await _c(n,{...t,parser:"__js_expression"});return r}async function xD(e,t){t=await gr(t);let{ast:n}=await qr(e,t);return t.cursorOffset>=0&&(t={...t,...Fo(n,t)}),ls(n,t)}async function kD(e,t){return os(e,await gr(t))}function OD(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;nMath.max(r,i.length),0)/t.length}function jD(e,t){let n=Ls(e,t);return n===!1?"":e.charAt(n)}function qD(e,t){let{preferred:n,alternate:r}=t===!0||t==="'"?nd:rd,{length:i}=e,s=0,a=0;for(let o=0;oa?r:n).character}function HD(e,t,n){for(let r=t;ra===r?a:o===t?"\\"+o:o||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a)?a:"\\"+a));return t+i+t}function ZD(e,t){return arguments.length===2||typeof t=="number"?Is(e,t):XD(...arguments)}function dr(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},e(...n)}}async function Ya(e,t){let{formatted:n}=await Rs(e,{...t,cursorOffset:-1});return n}async function Nc(e,t){return await Ya(e,t)===e}var Tc,cs,Sc,Cc,Ac,Fc,wc,fs,Lc,Ic,Rc,za,jr,xc,kc,Si,Oc,Mc,Pc,Bc,Cn,Ja,Xa,Vc,Uc,ds,Qa,Ci,$c,jc,qc,Hc,Ke,Wn,cn,An,fn,dn,hn,Et,zt,wt,pn,mn,gn,ut,Jt,Ot,Za,Yn,Gc,Wc,hr,Ka,hs,Xt,eo,Yc,zc,Ai,zn,to,Jc,ps,Dn,no,ro,Xc,Qc,Zc,Kc,ef,tf,ms,nf,rf,io,bt,Qt,gs,Ds,sf,af,vs,of,Fn,so,ao,oo,Jn,wn,uf,uo,lo,ys,co,Es,lf,fo,ho,cf,ff,df,hf,pf,mf,gf,Df,po,pr,bs,Zt,mo,vf,go,Fi,Do,yf,mr,_s,vo,Ef,Ln,bf,_f,Nf,Tf,Sf,Cf,Af,yo,Ff,wf,Lf,If,Rf,Eo,xf,kf,Of,bo,Mf,Pf,Ns,_o,No,Bf,Vf,To,Uf,So,Ts,$f,jf,Co,gr,Ss,wi,Ao,qr,qf,Fo,Hf,Gf,Wf,Yf,zf,wo,Jf,Lo,Io,Cs,Xf,Qf,Zf,Ro,As,Fs,ws,Ls,Is,Kf,ed,td,xo,ko,nd,rd,id,sd,ad,Rs,Oo,Mo,KD=Rm({"../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/standalone.mjs"(){Tc=Object.create,cs=Object.defineProperty,Sc=Object.getOwnPropertyDescriptor,Cc=Object.getOwnPropertyNames,Ac=Object.getPrototypeOf,Fc=Object.prototype.hasOwnProperty,wc=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fs=(e,t)=>{for(var n in t)cs(e,n,{get:t[n],enumerable:!0})},Lc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Cc(t))!Fc.call(e,i)&&i!==n&&cs(e,i,{get:()=>t[i],enumerable:!(r=Sc(t,i))||r.enumerable});return e},Ic=(e,t,n)=>(n=e!=null?Tc(Ac(e)):{},Lc(t||!e||!e.__esModule?cs(n,"default",{value:e,enumerable:!0}):n,e)),Rc=wc((e,t)=>{var n,r,i,s,a,o,u,l,c,d,m,p,g,E,A,T,w,F,S;g=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,n=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,A=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,m=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,T=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,S=/[\t\v\f\ufeff\p{Zs}]+/yu,l=/\r?\n|[\r\u2028\u2029]/y,c=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,E=/\/\/.*/y,i=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,s=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,a=/[^<>{}]+/y,F=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,w=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,o=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,u=/^(?:return|throw|yield)$/,d=RegExp(l.source),t.exports=function*(L,{jsx:O=!1}={}){var P,X,R,V,q,Q,M,B,J,Y,ne,K,ae,ce;for({length:Q}=L,V=0,q="",ce=[{tag:"JS"}],P=[],ne=0,K=!1;V":ce.pop(),q==="/"||B.tag==="JSXTagEnd"?(Y="?JSX",K=!0):ce.push({tag:"JSXChildren"});break;case"{":ce.push({tag:"InterpolationInJSX",nesting:P.length}),Y="?InterpolationInJSX",K=!1;break;case"/":q==="<"&&(ce.pop(),ce[ce.length-1].tag==="JSXChildren"&&ce.pop(),ce.push({tag:"JSXTagEnd"}))}q=Y,yield{type:"JSXPunctuator",value:M[0]};continue}if(r.lastIndex=V,M=r.exec(L)){V=r.lastIndex,q=M[0],yield{type:"JSXIdentifier",value:M[0]};continue}if(s.lastIndex=V,M=s.exec(L)){V=s.lastIndex,q=M[0],yield{type:"JSXString",value:M[0],closed:M[2]!==void 0};continue}break;case"JSXChildren":if(a.lastIndex=V,M=a.exec(L)){V=a.lastIndex,q=M[0],yield{type:"JSXText",value:M[0]};continue}switch(L[V]){case"<":ce.push({tag:"JSXTag"}),V++,q="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":ce.push({tag:"InterpolationInJSX",nesting:P.length}),V++,q="?InterpolationInJSX",K=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(S.lastIndex=V,M=S.exec(L)){V=S.lastIndex,yield{type:"WhiteSpace",value:M[0]};continue}if(l.lastIndex=V,M=l.exec(L)){V=l.lastIndex,K=!1,u.test(q)&&(q="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:M[0]};continue}if(c.lastIndex=V,M=c.exec(L)){V=c.lastIndex,d.test(M[0])&&(K=!1,u.test(q)&&(q="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:M[0],closed:M[1]!==void 0};continue}if(E.lastIndex=V,M=E.exec(L)){V=E.lastIndex,K=!1,yield{type:"SingleLineComment",value:M[0]};continue}X=String.fromCodePoint(L.codePointAt(V)),V+=X.length,q=X,K=!1,yield{type:B.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:X}}}}),za={},fs(za,{__debug:()=>Mo,check:()=>Nc,doc:()=>Cs,format:()=>Ya,formatWithCursor:()=>Rs,getSupportInfo:()=>Oo,util:()=>As,version:()=>Ro}),jr=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),xc=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},kc=jr("replaceAll",function(){if(typeof this=="string")return xc}),Si=kc,Oc=class{diff(e,t,n={}){let r;typeof n=="function"?(r=n,n={}):"callback"in n&&(r=n.callback);let i=this.castInput(e,n),s=this.castInput(t,n),a=this.removeEmpty(this.tokenize(i,n)),o=this.removeEmpty(this.tokenize(s,n));return this.diffWithOptionsObj(a,o,n,r)}diffWithOptionsObj(e,t,n,r){var i;let s=T=>{if(T=this.postProcess(T,n),r){setTimeout(function(){r(T)},0);return}else return T},a=t.length,o=e.length,u=1,l=a+o;n.maxEditLength!=null&&(l=Math.min(l,n.maxEditLength));let c=(i=n.timeout)!==null&&i!==void 0?i:1/0,d=Date.now()+c,m=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(m[0],t,e,0,n);if(m[0].oldPos+1>=o&&p+1>=a)return s(this.buildValues(m[0].lastComponent,t,e));let g=-1/0,E=1/0,A=()=>{for(let T=Math.max(g,-u);T<=Math.min(E,u);T+=2){let w,F=m[T-1],S=m[T+1];F&&(m[T-1]=void 0);let L=!1;if(S){let P=S.oldPos-T;L=S&&0<=P&&P=o&&p+1>=a)return s(this.buildValues(w.lastComponent,t,e))||!0;m[T]=w,w.oldPos+1>=o&&(E=Math.min(E,T-1)),p+1>=a&&(g=Math.max(g,T+1))}u++};if(r)(function T(){setTimeout(function(){if(u>l||Date.now()>d)return r(void 0);A()||T()},0)})();else for(;u<=l&&Date.now()<=d;){let T=A();if(T)return T}}addToPath(e,t,n,r,i){let s=e.lastComponent;return s&&!i.oneChangePerToken&&s.added===t&&s.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:s.count+1,added:t,removed:n,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:s}}}extractCommon(e,t,n,r,i){let s=t.length,a=n.length,o=e.oldPos,u=o-r,l=0;for(;u+1d.length?p:d}),l.value=this.join(c)}else l.value=this.join(t.slice(o,o+l.count));o+=l.count,l.added||(u+=l.count)}}return r}},Mc=class extends Oc{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},Pc=new Mc,Bc=()=>{},Cn=Bc,Ja="cr",Xa="crlf",Vc="lf",Uc=Vc,ds="\r",Qa=`\r -`,Ci=` -`,$c=Ci,jc=new Map([[Ci,/\n/gu],[ds,/\r/gu],[Qa,/\r\n/gu]]),qc=/\r\n?/gu,Hc=jr("at",function(){if(Array.isArray(this)||typeof this=="string")return qm}),Ke=Hc,Wn="string",cn="array",An="cursor",fn="indent",dn="align",hn="trim",Et="group",zt="fill",wt="if-break",pn="indent-if-break",mn="line-suffix",gn="line-suffix-boundary",ut="line",Jt="label",Ot="break-parent",Za=new Set([An,fn,dn,hn,Et,zt,wt,pn,mn,gn,ut,Jt,Ot]),Yn=Gm,Gc=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e),Wc=class extends Error{name="InvalidDocError";constructor(e){super(Wm(e)),this.doc=e}},hr=Wc,Ka={},hs=Ym,Xt=Cn,eo=Cn,Yc=Cn,zc=Cn,Ai={type:Ot},zn={type:An},to={type:ut},Jc={type:ut,soft:!0},ps={type:ut,hard:!0},Dn=[ps,Ai],no={type:ut,hard:!0,literal:!0},ro=[no,Ai],Xc={type:gn},Qc={type:hn},Zc=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,Kc="©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇",ef=/[^\x20-\x7F]/u,tf=new Set(Kc),ms=pg,nf={type:0},rf={type:1},io={value:"",length:0,queue:[],get root(){return io}},bt=Symbol("MODE_BREAK"),Qt=Symbol("MODE_FLAT"),gs=Symbol("DOC_FILL_PRINTED_LENGTH"),Ds=vg,sf=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return Ke(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:Ke(0,this.stack,-2)}get node(){return Ke(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=Ke(0,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#e()]}getName(){let{stack:e}=this,{length:t}=e;return t>1?Ke(0,e,-2):null}getValue(){return Ke(0,this.stack,-1)}getNode(e=0){let t=this.#t(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#t(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1}call(e,...t){let{stack:n}=this,{length:r}=n,i=Ke(0,n,-1);for(let s of t)i=i?.[s],n.push(s,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=this.#t(t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=Ke(0,n,-1);for(let s of t)i=i[s],n.push(s,i);try{for(let s=0;s{n[i]=e(r,i,s)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let s=null;if(typeof n=="number"&&(s=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,s))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#e())if(e(t))return t}hasAncestor(e){for(let t of this.#e())if(e(t))return!0;return!1}*#e(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}}},af=sf,vs=yg,of=_i(/\s/u),Fn=_i(" "),so=_i(",; "),ao=_i(/[^\n\r]/u),oo=e=>e===` -`||e==="\r"||e==="\u2028"||e==="\u2029",Jn=Eg,wn=bg,uf=_g,uo=Yl,lo=new WeakMap,ys=()=>!1,co=e=>!/[\S\n\u2028\u2029]/u.test(e),Es=wg,lf=()=>Cn,fo=class extends Error{name="ConfigError"},ho=class extends Error{name="UndefinedParserError"},cf={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing -(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). -The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. -The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}},ff=Array.prototype.toReversed??function(){return[...this].reverse()},df=jr("toReversed",function(){if(Array.isArray(this))return ff}),hf=df,pf=Pg(),mf=e=>String(e).split(/[/\\]/u).pop(),gf=e=>String(e).startsWith("file:"),Df=void 0,po=jg,pr={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>pr.value(n)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(n=>`${pr.key(n)}: ${pr.value(e[n])}`).join(", ")} }`},pair:({key:e,value:t})=>pr.value({[e]:t})},bs=new Proxy(String,{get:()=>bs}),Zt=bs,mo=()=>bs,vf=(e,t,{descriptor:n})=>{let r=[`${Zt.yellow(typeof e=="string"?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${Zt.blue(typeof t=="string"?n.key(t):n.pair(t))}`),r.join("; ")+"."},go=Symbol.for("vnopts.VALUE_NOT_EXIST"),Fi=Symbol.for("vnopts.VALUE_UNCHANGED"),Do=" ".repeat(2),yf=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),s=[];return r&&s.push(tc(e,t,r,n.descriptor)),i&&s.push([tc(e,t,i.title,n.descriptor)].concat(i.values.map(a=>nc(a,n.loggerPrintWidth))).join(` -`)),rc(s,n.loggerPrintWidth)},mr=[],_s=[],vo=(e,t,{descriptor:n,logger:r,schemas:i})=>{let s=[`Ignored unknown option ${Zt.yellow(n.pair({key:e,value:t}))}.`],a=qg(e,Object.keys(i),{maxDistance:3});a&&s.push(`Did you mean ${Zt.blue(n.key(a))}?`),r.warn(s.join(" "))},Ef=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"],Ln=class{static create(e){return Hg(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return Fi}},bf=class extends Ln{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},_f=class extends Ln{expected(){return"anything"}validate(){return!0}},Nf=class extends Ln{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let i=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let i=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);i!==!1&&n.push(...i.map(({value:s})=>({value:[s]})))}return n}forward(e,t){let n=[];for(let r of e){let i=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...i.map(ic))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let s=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in s&&n.push(s.remain),r.push(...s.redirect.map(ic))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}},Tf=class extends Ln{expected(){return"true or false"}validate(e){return typeof e=="boolean"}},Sf=class extends Ln{constructor(e){super(e),this._choices=Yg(e.choices.map(t=>t&&typeof t=="object"?t:{value:t}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(Qg).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},Cf=class extends Ln{expected(){return"a number"}validate(e,t){return typeof e=="number"}},Af=class extends Cf{expected(){return"an integer"}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&Xg(e)}},yo=class extends Ln{expected(){return"a string"}validate(e){return typeof e=="string"}},Ff=pr,wf=vo,Lf=yf,If=vf,Rf=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=Ff,unknown:s=wf,invalid:a=Lf,deprecated:o=If,missing:u=()=>!1,required:l=()=>!1,preprocess:c=m=>m,postprocess:d=()=>Fi}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:Wg(e,"name"),normalizeDefaultResult:sc,normalizeExpectedResult:ac,normalizeDeprecatedResult:uc,normalizeForwardResult:qa,normalizeRedirectResult:cc,normalizeValidateResult:oc},this._unknownHandler=s,this._invalidHandler=Zg(a),this._deprecatedHandler=o,this._identifyMissing=(m,p)=>!(m in p)||u(m,p),this._identifyRequired=l,this._preprocess=c,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=zg()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let i=n.shift(),s=this._applyNormalization(i,t);n.push(...s)}};r();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in t)){let a=sc(s.default(this._utils));"value"in a&&n.push({[i]:a.value})}}r();for(let i of Object.keys(this._utils.schemas)){if(!(i in t))continue;let s=this._utils.schemas[i],a=t[i],o=s.postprocess(a,this._utils);o!==Fi&&(this._applyValidation(o,i,s),t[i]=o)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let s of r){let a=this._utils.schemas[s],o=a.preprocess(e[s],this._utils);this._applyValidation(o,s,a);let u=({from:d,to:m})=>{n.push(typeof m=="string"?{[m]:d}:{[m.key]:m.value})},l=({value:d,redirectTo:m})=>{let p=uc(a.deprecated(d,this._utils),o,!0);if(p!==!1)if(p===!0)this._hasDeprecationWarned(s)||this._utils.logger.warn(this._deprecatedHandler(s,m,this._utils));else for(let{value:g}of p){let E={key:s,value:g};if(!this._hasDeprecationWarned(E)){let A=typeof m=="string"?{key:m,value:g}:m;this._utils.logger.warn(this._deprecatedHandler(E,A,this._utils))}}};qa(a.forward(o,this._utils),o).forEach(u);let c=cc(a.redirect(o,this._utils),o);if(c.redirect.forEach(u),"remain"in c){let d=c.remain;t[s]=s in t?a.overlap(t[s],d,this._utils):d,l({value:d})}for(let{from:d,to:m}of c.redirect)l({value:d,redirectTo:m})}for(let s of i){let a=e[s];this._applyUnknownHandler(s,a,t,(o,u)=>{n.push({[o]:u})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,go,this._utils)}_partitionOptionKeys(e){let[t,n]=Jg(Object.keys(e).filter(r=>!this._identifyMissing(r,e)),r=>r in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=oc(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let s of Object.keys(i)){if(this._identifyMissing(s,i))continue;let a=i[s];s in this._utils.schemas?r(s,a):n[s]=a}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Fi){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let i of n){let s=t.override[i];this._applyValidation(s,i,this._utils.schemas[i]),e[i]=s}for(let i of r){let s=t.override[i];this._applyUnknownHandler(i,s,e,(a,o)=>{let u=this._utils.schemas[a];this._applyValidation(o,a,u),e[a]=o})}}}}},xf=eD,kf=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},Of=jr("findLast",function(){if(Array.isArray(this))return kf}),bo=Of,Mf=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Pf=[],Ns=rD,_o=new Set(["yaml","toml"]),No=({node:e})=>Ns(e)&&_o.has(e.language),Bf=sD,Vf=aD,To=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Uf=e=>Object.keys(e).filter(t=>!To.has(t)),So=oD,Ts=new WeakMap,$f=["clean","embed","print"],jf=Object.fromEntries($f.map(e=>[e,!1])),Co={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null},gr=hD,Ic(Rc(),1),Ss={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},new Set(Ss.keyword),new Set(Ss.strict),new Set(Ss.strictBind),wi=(e,t)=>n=>e(t(n)),hc(mo(!0)),hc(mo(!1)),Ao=/\r\n|[\n\r\u2028\u2029]/,qr=DD,qf=bD,Fo=_D,Hf=ND,Gf=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return t}return-1},Wf=jr("findLastIndex",function(){if(Array.isArray(this))return Gf}),Yf=Wf,zf=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify",wo=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Jf=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]),Lo="\uFEFF",Io=Symbol("cursor"),Cs={},fs(Cs,{builders:()=>Xf,printer:()=>Qf,utils:()=>Zf}),Xf={join:Hl,line:to,softline:Jc,hardline:Dn,literalline:ro,group:ql,conditionalGroup:og,fill:ag,lineSuffix:Va,lineSuffixBoundary:Xc,cursor:zn,breakParent:Ai,ifBreak:ug,trim:Qc,indent:ss,indentIfBreak:lg,align:$r,addAlignmentToDoc:jl,markAsRoot:$l,dedentToRoot:ig,dedent:sg,hardlineWithoutBreakParent:ps,literallineWithoutBreakParent:no,label:cg,concat:e=>e},Qf={printDocToString:os},Zf={willBreak:Jm,traverseDoc:hs,findInDoc:Ba,mapDoc:rs,removeLines:Zm,stripTrailingHardline:Ul,replaceEndOfLine:tg,canBreak:rg},Ro="3.8.1",As={},fs(As,{addDanglingComment:()=>fr,addLeadingComment:()=>Ni,addTrailingComment:()=>Ti,getAlignmentSize:()=>Ds,getIndentSize:()=>Kf,getMaxContinuousCount:()=>ed,getNextNonSpaceNonCommentCharacter:()=>td,getNextNonSpaceNonCommentCharacterIndex:()=>YD,getPreferredQuote:()=>id,getStringWidth:()=>ms,hasNewline:()=>wn,hasNewlineInRange:()=>sd,hasSpaces:()=>ad,isNextLineEmpty:()=>ZD,isNextLineEmptyAfterIndex:()=>Is,isPreviousLineEmpty:()=>JD,makeString:()=>QD,skip:()=>_i,skipEverythingButNewLine:()=>ao,skipInlineComment:()=>Fs,skipNewline:()=>Jn,skipSpaces:()=>Fn,skipToLineEnd:()=>so,skipTrailingComment:()=>ws,skipWhitespace:()=>of}),Fs=OD,ws=MD,Ls=PD,Is=BD,Kf=VD,ed=$D,td=jD,xo=Object.freeze({character:"'",codePoint:39}),ko=Object.freeze({character:'"',codePoint:34}),nd=Object.freeze({preferred:xo,alternate:ko}),rd=Object.freeze({preferred:ko,alternate:xo}),id=qD,sd=HD,ad=GD,Rs=dr(_c),Oo=dr(Ql,0),Mo={parse:dr(LD),formatAST:dr(ID),formatDoc:dr(RD),printToDoc:dr(xD),printDocToString:dr(kD)}}}),ev=Gn({"../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/graphql.js"(e,t){(function(n){function r(){var s=n();return s.default||s}if(typeof e=="object"&&typeof t=="object")t.exports=r();else if(typeof define=="function"&&define.amd)define(r);else{var i=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};i.prettierPlugins=i.prettierPlugins||{},i.prettierPlugins.graphql=r()}})(function(){var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a=(f,D)=>{for(var y in D)n(f,y,{get:D[y],enumerable:!0})},o=(f,D,y,N)=>{if(D&&typeof D=="object"||typeof D=="function")for(let _ of i(D))!s.call(f,_)&&_!==y&&n(f,_,{get:()=>D[_],enumerable:!(N=r(D,_))||N.enumerable});return f},u=f=>o(n({},"__esModule",{value:!0}),f),l={};a(l,{languages:()=>j6,options:()=>G6,parsers:()=>tm,printers:()=>LT});var c=(f,D)=>(y,N,..._)=>y|1&&N==null?void 0:(D.call(N)??N[f]).apply(N,_),d=String.prototype.replaceAll??function(f,D){return f.global?this.replace(f,D):this.split(f).join(D)},m=c("replaceAll",function(){if(typeof this=="string")return d}),p=m,g=()=>{},E=g,A="indent",T="group",w="if-break",F="line",S="break-parent",L=E;function O(f){return{type:A,contents:f}}var P={type:S};function X(f,D={}){return L(D.expandedStates),{type:T,id:D.id,contents:f,break:!!D.shouldBreak,expandedStates:D.expandedStates}}function R(f,D="",y={}){return{type:w,breakContents:f,flatContents:D,groupId:y.groupId}}function V(f,D){let y=[];for(let N=0;N{let _=!!N?.backwards;if(y===!1)return!1;let{length:j}=D,de=y;for(;de>=0&&def===` -`||f==="\r"||f==="\u2028"||f==="\u2029";function ce(f,D,y){let N=!!y?.backwards;if(D===!1)return!1;let _=f.charAt(D);if(N){if(f.charAt(D-1)==="\r"&&_===` -`)return D-2;if(ae(_))return D-1}else{if(_==="\r"&&f.charAt(D+1)===` -`)return D+2;if(ae(_))return D+1}return D}var C=ce;function v(f,D,y={}){let N=Y(f,y.backwards?D-1:D,y),_=C(f,N,y);return N!==_}var $=v;function U(f,D){if(D===!1)return!1;if(f.charAt(D)==="/"&&f.charAt(D+1)==="*"){for(let y=D+2;y0}var Ct=Je,be=class extends Error{name="UnexpectedNodeError";constructor(f,D,y="type"){super(`Unexpected ${D} node ${y}: ${JSON.stringify(f[y])}.`),this.node=f}},Ue=be,ln=null;function pt(f){if(ln!==null&&typeof ln.property){let D=ln;return ln=pt.prototype=null,D}return ln=pt.prototype=f??Object.create(null),new pt}var mt=10;for(let f=0;f<=mt;f++)pt();function he(f){return pt(f)}function Xe(f,D="type"){he(f);function y(N){let _=N[D],j=f[_];if(!Array.isArray(j))throw Object.assign(new Error(`Missing visitor keys for '${_}'.`),{node:N});return j}return y}var Qi=Xe,ie=class{constructor(f,D,y){this.start=f.start,this.end=D.end,this.startToken=f,this.endToken=D,this.source=y}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},we=class{constructor(f,D,y,N,_,j){this.kind=f,this.start=D,this.end=y,this.line=N,this.column=_,this.value=j,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},te={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]};new Set(Object.keys(te));var ve;(function(f){f.QUERY="query",f.MUTATION="mutation",f.SUBSCRIPTION="subscription"})(ve||(ve={}));var Be={...te};for(let f of["ArgumentCoordinate","DirectiveArgumentCoordinate","DirectiveCoordinate","MemberCoordinate","TypeCoordinate"])delete Be[f];var gt=Be,Qe=Qi(gt,"kind"),Zi=Qe,Pr=f=>f.loc.start,Z0=f=>f.loc.end,F6="format",w6=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,L6=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u,I6=f=>L6.test(f),R6=f=>w6.test(f),x6=f=>`# @${F6} - -${f}`;function k6(f,D,y){let{node:N}=f;if(!N.description)return"";let _=[y("description")];return N.kind==="InputValueDefinition"&&!N.description.block?_.push(q):_.push(B),_}var Wt=k6;function O6(f,D,y){let{node:N}=f;switch(N.kind){case"Document":return[...V(B,Nn(f,D,y,"definitions")),B];case"OperationDefinition":{let _=D.originalText[Pr(N)]!=="{",j=!!N.name;return[Wt(f,D,y),_?N.operation:"",_&&j?[" ",y("name")]:"",_&&!j&&Ct(N.variableDefinitions)?" ":"",K0(f,y),At(f,y,N),!_&&!j?"":" ",y("selectionSet")]}case"FragmentDefinition":return[Wt(f,D,y),"fragment ",y("name"),K0(f,y)," on ",y("typeCondition"),At(f,y,N)," ",y("selectionSet")];case"SelectionSet":return["{",O([B,V(B,Nn(f,D,y,"selections"))]),B,"}"];case"Field":return X([N.alias?[y("alias"),": "]:"",y("name"),N.arguments.length>0?X(["(",O([Q,V([R("",", "),Q],Nn(f,D,y,"arguments"))]),Q,")"]):"",At(f,y,N),N.selectionSet?" ":"",y("selectionSet")]);case"Name":return N.value;case"StringValue":if(N.block){let _=p(0,N.value,'"""','\\"""').split(` -`);return _.length===1&&(_[0]=_[0].trim()),_.every(j=>j==="")&&(_.length=0),V(B,['"""',..._,'"""'])}return['"',p(0,p(0,N.value,/["\\]/gu,"\\$&"),` -`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return N.value;case"BooleanValue":return N.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",y("name")];case"ListValue":return X(["[",O([Q,V([R("",", "),Q],f.map(y,"values"))]),Q,"]"]);case"ObjectValue":{let _=D.bracketSpacing&&N.fields.length>0?" ":"";return X(["{",_,O([Q,V([R("",", "),Q],f.map(y,"fields"))]),Q,R("",_),"}"])}case"ObjectField":case"Argument":return[y("name"),": ",y("value")];case"Directive":return["@",y("name"),N.arguments.length>0?X(["(",O([Q,V([R("",", "),Q],Nn(f,D,y,"arguments"))]),Q,")"]):""];case"NamedType":return y("name");case"VariableDefinition":return[Wt(f,D,y),y("variable"),": ",y("type"),N.defaultValue?[" = ",y("defaultValue")]:"",At(f,y,N)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:_}=N,j=[];return _.endsWith("TypeDefinition")?j.push(Wt(f,D,y)):j.push("extend "),_.startsWith("ObjectType")?j.push("type"):_.startsWith("InputObjectType")?j.push("input"):j.push("interface"),j.push(" ",y("name")),!_.startsWith("InputObjectType")&&N.interfaces.length>0&&j.push(" implements ",...B6(f,D,y)),j.push(At(f,y,N)),N.fields.length>0&&j.push([" {",O([B,V(B,Nn(f,D,y,"fields"))]),B,"}"]),j}case"FieldDefinition":return[Wt(f,D,y),y("name"),N.arguments.length>0?X(["(",O([Q,V([R("",", "),Q],Nn(f,D,y,"arguments"))]),Q,")"]):"",": ",y("type"),At(f,y,N)];case"DirectiveDefinition":return[Wt(f,D,y),"directive ","@",y("name"),N.arguments.length>0?X(["(",O([Q,V([R("",", "),Q],Nn(f,D,y,"arguments"))]),Q,")"]):"",N.repeatable?" repeatable":""," on ",...V(" | ",f.map(y,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[Wt(f,D,y),N.kind==="EnumTypeExtension"?"extend ":"","enum ",y("name"),At(f,y,N),N.values.length>0?[" {",O([B,V(B,Nn(f,D,y,"values"))]),B,"}"]:""];case"EnumValueDefinition":return[Wt(f,D,y),y("name"),At(f,y,N)];case"InputValueDefinition":return[Wt(f,D,y),y("name"),": ",y("type"),N.defaultValue?[" = ",y("defaultValue")]:"",At(f,y,N)];case"SchemaExtension":return["extend schema",At(f,y,N),...N.operationTypes.length>0?[" {",O([B,V(B,Nn(f,D,y,"operationTypes"))]),B,"}"]:[]];case"SchemaDefinition":return[Wt(f,D,y),"schema",At(f,y,N)," {",N.operationTypes.length>0?O([B,V(B,Nn(f,D,y,"operationTypes"))]):"",B,"}"];case"OperationTypeDefinition":return[N.operation,": ",y("type")];case"FragmentSpread":return["...",y("name"),At(f,y,N)];case"InlineFragment":return["...",N.typeCondition?[" on ",y("typeCondition")]:"",At(f,y,N)," ",y("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return X([Wt(f,D,y),X([N.kind==="UnionTypeExtension"?"extend ":"","union ",y("name"),At(f,y,N),N.types.length>0?[" =",R(""," "),O([R([q,"| "]),V([q,"| "],f.map(y,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[Wt(f,D,y),N.kind==="ScalarTypeExtension"?"extend ":"","scalar ",y("name"),At(f,y,N)];case"NonNullType":return[y("type"),"!"];case"ListType":return["[",y("type"),"]"];default:throw new Ue(N,"Graphql","kind")}}function At(f,D,y){if(y.directives.length===0)return"";let N=V(q,f.map(D,"directives"));return y.kind==="FragmentDefinition"||y.kind==="OperationDefinition"?X([q,N]):[" ",X(O([Q,N]))]}function Nn(f,D,y,N){return f.map(({isLast:_,node:j})=>{let de=y();return!_&&ue(D.originalText,Z0(j))?[de,B]:de},N)}function M6(f){return f.kind!=="Comment"}function P6({node:f}){if(f.kind==="Comment")return"#"+f.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(f))}function B6(f,D,y){let{node:N}=f,_=[],{interfaces:j}=N,de=f.map(y,"interfaces");for(let Fe=0;Fey.value.trim()==="prettier-ignore")}var U6={print:O6,massageAstNode:em,hasPrettierIgnore:V6,insertPragma:x6,printComment:P6,canAttachComment:M6,getVisitorKeys:Zi},$6=U6,j6=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],q6={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."}},H6={bracketSpacing:q6.bracketSpacing},G6=H6,tm={};a(tm,{graphql:()=>wT});function W6(f){return typeof f=="object"&&f!==null}function Y6(f,D){throw new Error("Unexpected invariant triggered.")}var z6=/\r\n|[\n\r]/g;function El(f,D){let y=0,N=1;for(let _ of f.body.matchAll(z6)){if(typeof _.index=="number"||Y6(),_.index>=D)break;y=_.index+_[0].length,N+=1}return{line:N,column:D+1-y}}function J6(f){return nm(f.source,El(f.source,f.start))}function nm(f,D){let y=f.locationOffset.column-1,N="".padStart(y)+f.body,_=D.line-1,j=f.locationOffset.line-1,de=D.line+j,Fe=D.line===1?y:0,He=D.column+Fe,xt=`${f.name}:${de}:${He} -`,kt=N.split(/\r\n|[\n\r]/g),mi=kt[_];if(mi.length>120){let Vr=Math.floor(He/80),Tl=He%80,Ft=[];for(let gi=0;gi["|",gi]),["|","^".padStart(Tl)],["|",Ft[Vr+1]]])}return xt+rm([[`${de-1} |`,kt[_-1]],[`${de} |`,mi],["|","^".padStart(He)],[`${de+1} |`,kt[_+1]]])}function rm(f){let D=f.filter(([N,_])=>_!==void 0),y=Math.max(...D.map(([N])=>N.length));return D.map(([N,_])=>N.padStart(y)+(_?" "+_:"")).join(` -`)}function X6(f){let D=f[0];return D==null||"kind"in D||"length"in D?{nodes:D,source:f[1],positions:f[2],path:f[3],originalError:f[4],extensions:f[5]}:D}var Q6=class hm extends Error{constructor(D,...y){var N,_,j;let{nodes:de,source:Fe,positions:He,path:xt,originalError:kt,extensions:mi}=X6(y);super(D),this.name="GraphQLError",this.path=xt??void 0,this.originalError=kt??void 0,this.nodes=im(Array.isArray(de)?de:de?[de]:void 0);let Vr=im((N=this.nodes)===null||N===void 0?void 0:N.map(Ft=>Ft.loc).filter(Ft=>Ft!=null));this.source=Fe??(Vr==null||(_=Vr[0])===null||_===void 0?void 0:_.source),this.positions=He??Vr?.map(Ft=>Ft.start),this.locations=He&&Fe?He.map(Ft=>El(Fe,Ft)):Vr?.map(Ft=>El(Ft.source,Ft.start));let Tl=W6(kt?.extensions)?kt?.extensions:void 0;this.extensions=(j=mi??Tl)!==null&&j!==void 0?j:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),kt!=null&&kt.stack?Object.defineProperty(this,"stack",{value:kt.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,hm):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let D=this.message;if(this.nodes)for(let y of this.nodes)y.loc&&(D+=` - -`+J6(y.loc));else if(this.source&&this.locations)for(let y of this.locations)D+=` - -`+nm(this.source,y);return D}toJSON(){let D={message:this.message};return this.locations!=null&&(D.locations=this.locations),this.path!=null&&(D.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(D.extensions=this.extensions),D}};function im(f){return f===void 0||f.length===0?void 0:f}function ot(f,D,y){return new Q6(`Syntax Error: ${y}`,{source:f,positions:[D]})}var bl;(function(f){f.QUERY="QUERY",f.MUTATION="MUTATION",f.SUBSCRIPTION="SUBSCRIPTION",f.FIELD="FIELD",f.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",f.FRAGMENT_SPREAD="FRAGMENT_SPREAD",f.INLINE_FRAGMENT="INLINE_FRAGMENT",f.VARIABLE_DEFINITION="VARIABLE_DEFINITION",f.SCHEMA="SCHEMA",f.SCALAR="SCALAR",f.OBJECT="OBJECT",f.FIELD_DEFINITION="FIELD_DEFINITION",f.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",f.INTERFACE="INTERFACE",f.UNION="UNION",f.ENUM="ENUM",f.ENUM_VALUE="ENUM_VALUE",f.INPUT_OBJECT="INPUT_OBJECT",f.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(bl||(bl={}));var fe;(function(f){f.NAME="Name",f.DOCUMENT="Document",f.OPERATION_DEFINITION="OperationDefinition",f.VARIABLE_DEFINITION="VariableDefinition",f.SELECTION_SET="SelectionSet",f.FIELD="Field",f.ARGUMENT="Argument",f.FRAGMENT_SPREAD="FragmentSpread",f.INLINE_FRAGMENT="InlineFragment",f.FRAGMENT_DEFINITION="FragmentDefinition",f.VARIABLE="Variable",f.INT="IntValue",f.FLOAT="FloatValue",f.STRING="StringValue",f.BOOLEAN="BooleanValue",f.NULL="NullValue",f.ENUM="EnumValue",f.LIST="ListValue",f.OBJECT="ObjectValue",f.OBJECT_FIELD="ObjectField",f.DIRECTIVE="Directive",f.NAMED_TYPE="NamedType",f.LIST_TYPE="ListType",f.NON_NULL_TYPE="NonNullType",f.SCHEMA_DEFINITION="SchemaDefinition",f.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",f.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",f.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",f.FIELD_DEFINITION="FieldDefinition",f.INPUT_VALUE_DEFINITION="InputValueDefinition",f.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",f.UNION_TYPE_DEFINITION="UnionTypeDefinition",f.ENUM_TYPE_DEFINITION="EnumTypeDefinition",f.ENUM_VALUE_DEFINITION="EnumValueDefinition",f.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",f.DIRECTIVE_DEFINITION="DirectiveDefinition",f.SCHEMA_EXTENSION="SchemaExtension",f.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",f.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",f.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",f.UNION_TYPE_EXTENSION="UnionTypeExtension",f.ENUM_TYPE_EXTENSION="EnumTypeExtension",f.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",f.TYPE_COORDINATE="TypeCoordinate",f.MEMBER_COORDINATE="MemberCoordinate",f.ARGUMENT_COORDINATE="ArgumentCoordinate",f.DIRECTIVE_COORDINATE="DirectiveCoordinate",f.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(fe||(fe={}));function Z6(f){return f===9||f===32}function Ki(f){return f>=48&&f<=57}function sm(f){return f>=97&&f<=122||f>=65&&f<=90}function am(f){return sm(f)||f===95}function K6(f){return sm(f)||Ki(f)||f===95}function eT(f){var D;let y=Number.MAX_SAFE_INTEGER,N=null,_=-1;for(let de=0;deFe===0?de:de.slice(y)).slice((D=N)!==null&&D!==void 0?D:0,_+1)}function tT(f){let D=0;for(;D=0&&f<=55295||f>=57344&&f<=1114111}function Sa(f,D){return om(f.charCodeAt(D))&&um(f.charCodeAt(D+1))}function om(f){return f>=55296&&f<=56319}function um(f){return f>=56320&&f<=57343}function Br(f,D){let y=f.source.body.codePointAt(D);if(y===void 0)return G.EOF;if(y>=32&&y<=126){let N=String.fromCodePoint(y);return N==='"'?`'"'`:`"${N}"`}return"U+"+y.toString(16).toUpperCase().padStart(4,"0")}function rt(f,D,y,N,_){let j=f.line,de=1+y-f.lineStart;return new we(D,y,N,j,de,_)}function iT(f,D){let y=f.source.body,N=y.length,_=D;for(;_=48&&f<=57?f-48:f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:-1}function cT(f,D){let y=f.source.body;switch(y.charCodeAt(D+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ot(f.source,D,`Invalid character escape sequence: "${y.slice(D,D+2)}".`)}function fT(f,D){let y=f.source.body,N=y.length,_=f.lineStart,j=D+3,de=j,Fe="",He=[];for(;j2?"["+DT(f)+"]":"{ "+y.map(([N,_])=>N+": "+Ca(_,D)).join(", ")+" }"}function gT(f,D){if(f.length===0)return"[]";if(D.length>2)return"[Array]";let y=Math.min(10,f.length),N=f.length-y,_=[];for(let j=0;j1&&_.push(`... ${N} more items`),"["+_.join(", ")+"]"}function DT(f){let D=Object.prototype.toString.call(f).replace(/^\[object /,"").replace(/]$/,"");if(D==="Object"&&typeof f.constructor=="function"){let y=f.constructor.name;if(typeof y=="string"&&y!=="")return y}return D}var vT=globalThis.process&&!0,yT=vT?function(f,D){return f instanceof D}:function(f,D){if(f instanceof D)return!0;if(typeof f=="object"&&f!==null){var y;let N=D.prototype[Symbol.toStringTag],_=Symbol.toStringTag in f?f[Symbol.toStringTag]:(y=f.constructor)===null||y===void 0?void 0:y.name;if(N===_){let j=cm(f);throw new Error(`Cannot use ${N} "${j}" from another module or realm. - -Ensure that there is only one instance of "graphql" in the node_modules -directory. If different versions of "graphql" are the dependencies of other -relied on modules, use "resolutions" to ensure only one version is installed. - -https://yarnpkg.com/en/docs/selective-version-resolutions - -Duplicate "graphql" modules cannot be used at the same time since different -versions may have different capabilities and behavior. The data from one -version used in the function from another could produce confusing and -spurious results.`)}}return!1},fm=class{constructor(f,D="GraphQL request",y={line:1,column:1}){typeof f=="string"||Nl(!1,`Body must be a string. Received: ${cm(f)}.`),this.body=f,this.name=D,this.locationOffset=y,this.locationOffset.line>0||Nl(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Nl(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ET(f){return yT(f,fm)}function bT(f,D){let y=new _T(f,D),N=y.parseDocument();return Object.defineProperty(N,"tokenCount",{enumerable:!1,value:y.tokenCount}),N}var _T=class{constructor(f,D={}){let{lexer:y,...N}=D;if(y)this._lexer=y;else{let _=ET(f)?f:new fm(f);this._lexer=new nT(_)}this._options=N,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let f=this.expectToken(G.NAME);return this.node(f,{kind:fe.NAME,value:f.value})}parseDocument(){return this.node(this._lexer.token,{kind:fe.DOCUMENT,definitions:this.many(G.SOF,this.parseDefinition,G.EOF)})}parseDefinition(){if(this.peek(G.BRACE_L))return this.parseOperationDefinition();let f=this.peekDescription(),D=f?this._lexer.lookahead():this._lexer.token;if(f&&D.kind===G.BRACE_L)throw ot(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(D.kind===G.NAME){switch(D.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(D.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(f)throw ot(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(D.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(D)}parseOperationDefinition(){let f=this._lexer.token;if(this.peek(G.BRACE_L))return this.node(f,{kind:fe.OPERATION_DEFINITION,operation:ve.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let D=this.parseDescription(),y=this.parseOperationType(),N;return this.peek(G.NAME)&&(N=this.parseName()),this.node(f,{kind:fe.OPERATION_DEFINITION,operation:y,description:D,name:N,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let f=this.expectToken(G.NAME);switch(f.value){case"query":return ve.QUERY;case"mutation":return ve.MUTATION;case"subscription":return ve.SUBSCRIPTION}throw this.unexpected(f)}parseVariableDefinitions(){return this.optionalMany(G.PAREN_L,this.parseVariableDefinition,G.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:fe.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(G.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(G.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let f=this._lexer.token;return this.expectToken(G.DOLLAR),this.node(f,{kind:fe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:fe.SELECTION_SET,selections:this.many(G.BRACE_L,this.parseSelection,G.BRACE_R)})}parseSelection(){return this.peek(G.SPREAD)?this.parseFragment():this.parseField()}parseField(){let f=this._lexer.token,D=this.parseName(),y,N;return this.expectOptionalToken(G.COLON)?(y=D,N=this.parseName()):N=D,this.node(f,{kind:fe.FIELD,alias:y,name:N,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(G.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(f){let D=f?this.parseConstArgument:this.parseArgument;return this.optionalMany(G.PAREN_L,D,G.PAREN_R)}parseArgument(f=!1){let D=this._lexer.token,y=this.parseName();return this.expectToken(G.COLON),this.node(D,{kind:fe.ARGUMENT,name:y,value:this.parseValueLiteral(f)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let f=this._lexer.token;this.expectToken(G.SPREAD);let D=this.expectOptionalKeyword("on");return!D&&this.peek(G.NAME)?this.node(f,{kind:fe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(f,{kind:fe.INLINE_FRAGMENT,typeCondition:D?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let f=this._lexer.token,D=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(f,{kind:fe.FRAGMENT_DEFINITION,description:D,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(f,{kind:fe.FRAGMENT_DEFINITION,description:D,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(f){let D=this._lexer.token;switch(D.kind){case G.BRACKET_L:return this.parseList(f);case G.BRACE_L:return this.parseObject(f);case G.INT:return this.advanceLexer(),this.node(D,{kind:fe.INT,value:D.value});case G.FLOAT:return this.advanceLexer(),this.node(D,{kind:fe.FLOAT,value:D.value});case G.STRING:case G.BLOCK_STRING:return this.parseStringLiteral();case G.NAME:switch(this.advanceLexer(),D.value){case"true":return this.node(D,{kind:fe.BOOLEAN,value:!0});case"false":return this.node(D,{kind:fe.BOOLEAN,value:!1});case"null":return this.node(D,{kind:fe.NULL});default:return this.node(D,{kind:fe.ENUM,value:D.value})}case G.DOLLAR:if(f)if(this.expectToken(G.DOLLAR),this._lexer.token.kind===G.NAME){let y=this._lexer.token.value;throw ot(this._lexer.source,D.start,`Unexpected variable "$${y}" in constant value.`)}else throw this.unexpected(D);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let f=this._lexer.token;return this.advanceLexer(),this.node(f,{kind:fe.STRING,value:f.value,block:f.kind===G.BLOCK_STRING})}parseList(f){let D=()=>this.parseValueLiteral(f);return this.node(this._lexer.token,{kind:fe.LIST,values:this.any(G.BRACKET_L,D,G.BRACKET_R)})}parseObject(f){let D=()=>this.parseObjectField(f);return this.node(this._lexer.token,{kind:fe.OBJECT,fields:this.any(G.BRACE_L,D,G.BRACE_R)})}parseObjectField(f){let D=this._lexer.token,y=this.parseName();return this.expectToken(G.COLON),this.node(D,{kind:fe.OBJECT_FIELD,name:y,value:this.parseValueLiteral(f)})}parseDirectives(f){let D=[];for(;this.peek(G.AT);)D.push(this.parseDirective(f));return D}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(f){let D=this._lexer.token;return this.expectToken(G.AT),this.node(D,{kind:fe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(f)})}parseTypeReference(){let f=this._lexer.token,D;if(this.expectOptionalToken(G.BRACKET_L)){let y=this.parseTypeReference();this.expectToken(G.BRACKET_R),D=this.node(f,{kind:fe.LIST_TYPE,type:y})}else D=this.parseNamedType();return this.expectOptionalToken(G.BANG)?this.node(f,{kind:fe.NON_NULL_TYPE,type:D}):D}parseNamedType(){return this.node(this._lexer.token,{kind:fe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(G.STRING)||this.peek(G.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("schema");let y=this.parseConstDirectives(),N=this.many(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);return this.node(f,{kind:fe.SCHEMA_DEFINITION,description:D,directives:y,operationTypes:N})}parseOperationTypeDefinition(){let f=this._lexer.token,D=this.parseOperationType();this.expectToken(G.COLON);let y=this.parseNamedType();return this.node(f,{kind:fe.OPERATION_TYPE_DEFINITION,operation:D,type:y})}parseScalarTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("scalar");let y=this.parseName(),N=this.parseConstDirectives();return this.node(f,{kind:fe.SCALAR_TYPE_DEFINITION,description:D,name:y,directives:N})}parseObjectTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("type");let y=this.parseName(),N=this.parseImplementsInterfaces(),_=this.parseConstDirectives(),j=this.parseFieldsDefinition();return this.node(f,{kind:fe.OBJECT_TYPE_DEFINITION,description:D,name:y,interfaces:N,directives:_,fields:j})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(G.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseFieldDefinition,G.BRACE_R)}parseFieldDefinition(){let f=this._lexer.token,D=this.parseDescription(),y=this.parseName(),N=this.parseArgumentDefs();this.expectToken(G.COLON);let _=this.parseTypeReference(),j=this.parseConstDirectives();return this.node(f,{kind:fe.FIELD_DEFINITION,description:D,name:y,arguments:N,type:_,directives:j})}parseArgumentDefs(){return this.optionalMany(G.PAREN_L,this.parseInputValueDef,G.PAREN_R)}parseInputValueDef(){let f=this._lexer.token,D=this.parseDescription(),y=this.parseName();this.expectToken(G.COLON);let N=this.parseTypeReference(),_;this.expectOptionalToken(G.EQUALS)&&(_=this.parseConstValueLiteral());let j=this.parseConstDirectives();return this.node(f,{kind:fe.INPUT_VALUE_DEFINITION,description:D,name:y,type:N,defaultValue:_,directives:j})}parseInterfaceTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("interface");let y=this.parseName(),N=this.parseImplementsInterfaces(),_=this.parseConstDirectives(),j=this.parseFieldsDefinition();return this.node(f,{kind:fe.INTERFACE_TYPE_DEFINITION,description:D,name:y,interfaces:N,directives:_,fields:j})}parseUnionTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("union");let y=this.parseName(),N=this.parseConstDirectives(),_=this.parseUnionMemberTypes();return this.node(f,{kind:fe.UNION_TYPE_DEFINITION,description:D,name:y,directives:N,types:_})}parseUnionMemberTypes(){return this.expectOptionalToken(G.EQUALS)?this.delimitedMany(G.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("enum");let y=this.parseName(),N=this.parseConstDirectives(),_=this.parseEnumValuesDefinition();return this.node(f,{kind:fe.ENUM_TYPE_DEFINITION,description:D,name:y,directives:N,values:_})}parseEnumValuesDefinition(){return this.optionalMany(G.BRACE_L,this.parseEnumValueDefinition,G.BRACE_R)}parseEnumValueDefinition(){let f=this._lexer.token,D=this.parseDescription(),y=this.parseEnumValueName(),N=this.parseConstDirectives();return this.node(f,{kind:fe.ENUM_VALUE_DEFINITION,description:D,name:y,directives:N})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ot(this._lexer.source,this._lexer.token.start,`${Aa(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("input");let y=this.parseName(),N=this.parseConstDirectives(),_=this.parseInputFieldsDefinition();return this.node(f,{kind:fe.INPUT_OBJECT_TYPE_DEFINITION,description:D,name:y,directives:N,fields:_})}parseInputFieldsDefinition(){return this.optionalMany(G.BRACE_L,this.parseInputValueDef,G.BRACE_R)}parseTypeSystemExtension(){let f=this._lexer.lookahead();if(f.kind===G.NAME)switch(f.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(f)}parseSchemaExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let D=this.parseConstDirectives(),y=this.optionalMany(G.BRACE_L,this.parseOperationTypeDefinition,G.BRACE_R);if(D.length===0&&y.length===0)throw this.unexpected();return this.node(f,{kind:fe.SCHEMA_EXTENSION,directives:D,operationTypes:y})}parseScalarTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let D=this.parseName(),y=this.parseConstDirectives();if(y.length===0)throw this.unexpected();return this.node(f,{kind:fe.SCALAR_TYPE_EXTENSION,name:D,directives:y})}parseObjectTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let D=this.parseName(),y=this.parseImplementsInterfaces(),N=this.parseConstDirectives(),_=this.parseFieldsDefinition();if(y.length===0&&N.length===0&&_.length===0)throw this.unexpected();return this.node(f,{kind:fe.OBJECT_TYPE_EXTENSION,name:D,interfaces:y,directives:N,fields:_})}parseInterfaceTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let D=this.parseName(),y=this.parseImplementsInterfaces(),N=this.parseConstDirectives(),_=this.parseFieldsDefinition();if(y.length===0&&N.length===0&&_.length===0)throw this.unexpected();return this.node(f,{kind:fe.INTERFACE_TYPE_EXTENSION,name:D,interfaces:y,directives:N,fields:_})}parseUnionTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let D=this.parseName(),y=this.parseConstDirectives(),N=this.parseUnionMemberTypes();if(y.length===0&&N.length===0)throw this.unexpected();return this.node(f,{kind:fe.UNION_TYPE_EXTENSION,name:D,directives:y,types:N})}parseEnumTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let D=this.parseName(),y=this.parseConstDirectives(),N=this.parseEnumValuesDefinition();if(y.length===0&&N.length===0)throw this.unexpected();return this.node(f,{kind:fe.ENUM_TYPE_EXTENSION,name:D,directives:y,values:N})}parseInputObjectTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let D=this.parseName(),y=this.parseConstDirectives(),N=this.parseInputFieldsDefinition();if(y.length===0&&N.length===0)throw this.unexpected();return this.node(f,{kind:fe.INPUT_OBJECT_TYPE_EXTENSION,name:D,directives:y,fields:N})}parseDirectiveDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("directive"),this.expectToken(G.AT);let y=this.parseName(),N=this.parseArgumentDefs(),_=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let j=this.parseDirectiveLocations();return this.node(f,{kind:fe.DIRECTIVE_DEFINITION,description:D,name:y,arguments:N,repeatable:_,locations:j})}parseDirectiveLocations(){return this.delimitedMany(G.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let f=this._lexer.token,D=this.parseName();if(Object.prototype.hasOwnProperty.call(bl,D.value))return D;throw this.unexpected(f)}parseSchemaCoordinate(){let f=this._lexer.token,D=this.expectOptionalToken(G.AT),y=this.parseName(),N;!D&&this.expectOptionalToken(G.DOT)&&(N=this.parseName());let _;return(D||N)&&this.expectOptionalToken(G.PAREN_L)&&(_=this.parseName(),this.expectToken(G.COLON),this.expectToken(G.PAREN_R)),D?_?this.node(f,{kind:fe.DIRECTIVE_ARGUMENT_COORDINATE,name:y,argumentName:_}):this.node(f,{kind:fe.DIRECTIVE_COORDINATE,name:y}):N?_?this.node(f,{kind:fe.ARGUMENT_COORDINATE,name:y,fieldName:N,argumentName:_}):this.node(f,{kind:fe.MEMBER_COORDINATE,name:y,memberName:N}):this.node(f,{kind:fe.TYPE_COORDINATE,name:y})}node(f,D){return this._options.noLocation!==!0&&(D.loc=new ie(f,this._lexer.lastToken,this._lexer.source)),D}peek(f){return this._lexer.token.kind===f}expectToken(f){let D=this._lexer.token;if(D.kind===f)return this.advanceLexer(),D;throw ot(this._lexer.source,D.start,`Expected ${dm(f)}, found ${Aa(D)}.`)}expectOptionalToken(f){return this._lexer.token.kind===f?(this.advanceLexer(),!0):!1}expectKeyword(f){let D=this._lexer.token;if(D.kind===G.NAME&&D.value===f)this.advanceLexer();else throw ot(this._lexer.source,D.start,`Expected "${f}", found ${Aa(D)}.`)}expectOptionalKeyword(f){let D=this._lexer.token;return D.kind===G.NAME&&D.value===f?(this.advanceLexer(),!0):!1}unexpected(f){let D=f??this._lexer.token;return ot(this._lexer.source,D.start,`Unexpected ${Aa(D)}.`)}any(f,D,y){this.expectToken(f);let N=[];for(;!this.expectOptionalToken(y);)N.push(D.call(this));return N}optionalMany(f,D,y){if(this.expectOptionalToken(f)){let N=[];do N.push(D.call(this));while(!this.expectOptionalToken(y));return N}return[]}many(f,D,y){this.expectToken(f);let N=[];do N.push(D.call(this));while(!this.expectOptionalToken(y));return N}delimitedMany(f,D){this.expectOptionalToken(f);let y=[];do y.push(D.call(this));while(this.expectOptionalToken(f));return y}advanceLexer(){let{maxTokens:f}=this._options,D=this._lexer.advance();if(D.kind!==G.EOF&&(++this._tokenCounter,f!==void 0&&this._tokenCounter>f))throw ot(this._lexer.source,D.start,`Document contains more that ${f} tokens. Parsing aborted.`)}};function Aa(f){let D=f.value;return dm(f.kind)+(D!=null?` "${D}"`:"")}function dm(f){return rT(f)?`"${f}"`:f}function NT(f,D){let y=new SyntaxError(f+" ("+D.loc.start.line+":"+D.loc.start.column+")");return Object.assign(y,D)}var TT=NT;function ST(f){let D=[],{startToken:y,endToken:N}=f.loc;for(let _=y;_!==N;_=_.next)_.kind==="Comment"&&D.push({..._,loc:{start:_.start,end:_.end}});return D}var CT={allowLegacyFragmentVariables:!0};function AT(f){if(f?.name==="GraphQLError"){let{message:D,locations:[y]}=f;return TT(D,{loc:{start:y},cause:f})}return f}function FT(f){let D;try{D=bT(f,CT)}catch(y){throw AT(y)}return D.comments=ST(D),D}var wT={parse:FT,astFormat:"graphql",hasPragma:I6,hasIgnorePragma:R6,locStart:Pr,locEnd:Z0},LT={graphql:$6};return u(l)})}}),tv=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Bo.isErrorNoTelemetry(e)?new Bo(e.message+` - -`+e.stack):new Error(e.message+` - -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},nv=new tv;function Li(e){rv(e)||nv.onUnexpectedError(e)}function od(e){if(e instanceof Error){const{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:Bo.isErrorNoTelemetry(e)}}return e}var Po="Canceled";function rv(e){return e instanceof iv?!0:e instanceof Error&&e.name===Po&&e.message===Po}var iv=class extends Error{constructor(){super(Po),this.name=this.message}},Bo=class Sl extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Sl)return t;const n=new Sl;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Kt=class pm extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,pm.prototype)}};function sv(e,t){const n=this;let r=!1,i;return function(){return r||(r=!0,i=e.apply(n,arguments)),i}}var xs;(function(e){function t(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(S){yield S}e.single=i;function s(S){return t(S)?S:i(S)}e.wrap=s;function a(S){return S||n}e.from=a;function*o(S){for(let L=S.length-1;L>=0;L--)yield S[L]}e.reverse=o;function u(S){return!S||S[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(S){return S[Symbol.iterator]().next().value}e.first=l;function c(S,L){let O=0;for(const P of S)if(L(P,O++))return!0;return!1}e.some=c;function d(S,L){for(const O of S)if(L(O))return O}e.find=d;function*m(S,L){for(const O of S)L(O)&&(yield O)}e.filter=m;function*p(S,L){let O=0;for(const P of S)yield L(P,O++)}e.map=p;function*g(S,L){let O=0;for(const P of S)yield*L(P,O++)}e.flatMap=g;function*E(...S){for(const L of S)yield*L}e.concat=E;function A(S,L,O){let P=O;for(const X of S)P=L(P,X);return P}e.reduce=A;function*T(S,L,O=S.length){for(L<0&&(L+=S.length),O<0?O+=S.length:O>S.length&&(O=S.length);L1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function av(...e){return ks(()=>ud(e))}function ks(e){return{dispose:sv(()=>{e()})}}var Vo=(Ir=class{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ud(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ir.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&this._toDispose.delete(t)}},Ir.DISABLE_DISPOSED_WARNING=!1,Ir),Os=(hi=class{constructor(){this._store=new Vo,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}},hi.None=Object.freeze({dispose(){}}),hi),Ve=(Bn=class{constructor(t){this.element=t,this.next=Bn.Undefined,this.prev=Bn.Undefined}},Bn.Undefined=new Bn(void 0),Bn),ov=class{constructor(){this._first=Ve.Undefined,this._last=Ve.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ve.Undefined}clear(){let e=this._first;for(;e!==Ve.Undefined;){const t=e.next;e.prev=Ve.Undefined,e.next=Ve.Undefined,e=t}this._first=Ve.Undefined,this._last=Ve.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new Ve(e);if(this._first===Ve.Undefined)this._first=n,this._last=n;else if(t){const i=this._last;this._last=n,n.prev=i,i.next=n}else{const i=this._first;this._first=n,n.next=i,i.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==Ve.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ve.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ve.Undefined&&e.next!==Ve.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ve.Undefined&&e.next===Ve.Undefined?(this._first=Ve.Undefined,this._last=Ve.Undefined):e.next===Ve.Undefined?(this._last=this._last.prev,this._last.next=Ve.Undefined):e.prev===Ve.Undefined&&(this._first=this._first.next,this._first.prev=Ve.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ve.Undefined;)yield e.element,e=e.next}},uv=globalThis.performance&&typeof globalThis.performance.now=="function",ld=class mm{static create(t){return new mm(t)}constructor(t){this._now=uv&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Ms;(function(e){e.None=()=>Os.None;function t(M,B){return m(M,()=>{},0,void 0,!0,void 0,B)}e.defer=t;function n(M){return(B,J=null,Y)=>{let ne=!1,K;return K=M(ae=>{if(!ne)return K?K.dispose():ne=!0,B.call(J,ae)},null,Y),ne&&K.dispose(),K}}e.once=n;function r(M,B){return e.once(e.filter(M,B))}e.onceIf=r;function i(M,B,J){return c((Y,ne=null,K)=>M(ae=>Y.call(ne,B(ae)),null,K),J)}e.map=i;function s(M,B,J){return c((Y,ne=null,K)=>M(ae=>{B(ae),Y.call(ne,ae)},null,K),J)}e.forEach=s;function a(M,B,J){return c((Y,ne=null,K)=>M(ae=>B(ae)&&Y.call(ne,ae),null,K),J)}e.filter=a;function o(M){return M}e.signal=o;function u(...M){return(B,J=null,Y)=>{const ne=av(...M.map(K=>K(ae=>B.call(J,ae))));return d(ne,Y)}}e.any=u;function l(M,B,J,Y){let ne=J;return i(M,K=>(ne=B(ne,K),ne),Y)}e.reduce=l;function c(M,B){let J;const Y={onWillAddFirstListener(){J=M(ne.fire,ne)},onDidRemoveLastListener(){J?.dispose()}},ne=new jt(Y);return B?.add(ne),ne.event}function d(M,B){return B instanceof Array?B.push(M):B&&B.add(M),M}function m(M,B,J=100,Y=!1,ne=!1,K,ae){let ce,C,v,$=0,U;const W={leakWarningThreshold:K,onWillAddFirstListener(){ce=M(x=>{$++,C=B(C,x),Y&&!v&&(I.fire(C),C=void 0),U=()=>{const re=C;C=void 0,v=void 0,(!Y||$>1)&&I.fire(re),$=0},typeof J=="number"?(clearTimeout(v),v=setTimeout(U,J)):v===void 0&&(v=0,queueMicrotask(U))})},onWillRemoveListener(){ne&&$>0&&U?.()},onDidRemoveLastListener(){U=void 0,ce.dispose()}},I=new jt(W);return ae?.add(I),I.event}e.debounce=m;function p(M,B=0,J){return e.debounce(M,(Y,ne)=>Y?(Y.push(ne),Y):[ne],B,void 0,!0,void 0,J)}e.accumulate=p;function g(M,B=(Y,ne)=>Y===ne,J){let Y=!0,ne;return a(M,K=>{const ae=Y||!B(K,ne);return Y=!1,ne=K,ae},J)}e.latch=g;function E(M,B,J){return[e.filter(M,B,J),e.filter(M,Y=>!B(Y),J)]}e.split=E;function A(M,B=!1,J=[],Y){let ne=J.slice(),K=M(C=>{ne?ne.push(C):ce.fire(C)});Y&&Y.add(K);const ae=()=>{ne?.forEach(C=>ce.fire(C)),ne=null},ce=new jt({onWillAddFirstListener(){K||(K=M(C=>ce.fire(C)),Y&&Y.add(K))},onDidAddFirstListener(){ne&&(B?setTimeout(ae):ae())},onDidRemoveLastListener(){K&&K.dispose(),K=null}});return Y&&Y.add(ce),ce.event}e.buffer=A;function T(M,B){return(Y,ne,K)=>{const ae=B(new F);return M(function(ce){const C=ae.evaluate(ce);C!==w&&Y.call(ne,C)},void 0,K)}}e.chain=T;const w=Symbol("HaltChainable");class F{constructor(){this.steps=[]}map(B){return this.steps.push(B),this}forEach(B){return this.steps.push(J=>(B(J),J)),this}filter(B){return this.steps.push(J=>B(J)?J:w),this}reduce(B,J){let Y=J;return this.steps.push(ne=>(Y=B(Y,ne),Y)),this}latch(B=(J,Y)=>J===Y){let J=!0,Y;return this.steps.push(ne=>{const K=J||!B(ne,Y);return J=!1,Y=ne,K?ne:w}),this}evaluate(B){for(const J of this.steps)if(B=J(B),B===w)break;return B}}function S(M,B,J=Y=>Y){const Y=(...ce)=>ae.fire(J(...ce)),ne=()=>M.on(B,Y),K=()=>M.removeListener(B,Y),ae=new jt({onWillAddFirstListener:ne,onDidRemoveLastListener:K});return ae.event}e.fromNodeEventEmitter=S;function L(M,B,J=Y=>Y){const Y=(...ce)=>ae.fire(J(...ce)),ne=()=>M.addEventListener(B,Y),K=()=>M.removeEventListener(B,Y),ae=new jt({onWillAddFirstListener:ne,onDidRemoveLastListener:K});return ae.event}e.fromDOMEventEmitter=L;function O(M){return new Promise(B=>n(M)(B))}e.toPromise=O;function P(M){const B=new jt;return M.then(J=>{B.fire(J)},()=>{B.fire(void 0)}).finally(()=>{B.dispose()}),B.event}e.fromPromise=P;function X(M,B){return M(J=>B.fire(J))}e.forward=X;function R(M,B,J){return B(J),M(Y=>B(Y))}e.runAndSubscribe=R;class V{constructor(B,J){this._observable=B,this._counter=0,this._hasChanged=!1;const Y={onWillAddFirstListener:()=>{B.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{B.removeObserver(this)}};this.emitter=new jt(Y),J&&J.add(this.emitter)}beginUpdate(B){this._counter++}handlePossibleChange(B){}handleChange(B,J){this._hasChanged=!0}endUpdate(B){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function q(M,B){return new V(M,B).emitter.event}e.fromObservable=q;function Q(M){return(B,J,Y)=>{let ne=0,K=!1;const ae={beginUpdate(){ne++},endUpdate(){ne--,ne===0&&(M.reportChanges(),K&&(K=!1,B.call(J)))},handlePossibleChange(){},handleChange(){K=!0}};M.addObserver(ae),M.reportChanges();const ce={dispose(){M.removeObserver(ae)}};return Y instanceof Vo?Y.add(ce):Array.isArray(Y)&&Y.push(ce),ce}}e.fromObservableLight=Q})(Ms||(Ms={}));var lv=(Vn=class{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Vn._idPool++}`,Vn.all.add(this)}start(t){this._stopWatch=new ld,this.listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},Vn.all=new Set,Vn._idPool=0,Vn),cv=-1,fv=(Rr=class{constructor(t,n,r=(Rr._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(const[r,i]of this._stacks)(!t||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const a=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(a);const o=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],u=new pv(`${a}. HINT: Stack shows most frequent listener (${o[1]}-times)`,o[0]);return(this._options?.onListenerError||Li)(u),Os.None}if(this._disposed)return Os.None;t&&(e=e.bind(t));const r=new Uo(e);let i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=dv.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Uo?(this._deliveryQueue??=new gv,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;const s=ks(()=>{i?.(),this._removeListener(r)});return n instanceof Vo?n.add(s):Array.isArray(n)&&n.push(s),s},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const r=this._deliveryQueue.current===this;if(this._size*mv<=t.length){let i=0;for(let s=0;s0}},gv=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function Dv(){return globalThis._VSCODE_NLS_MESSAGES}function cd(){return globalThis._VSCODE_NLS_LANGUAGE}var vv=cd()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function fd(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=t[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),vv&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function xe(e,t,...n){return fd(typeof e=="number"?yv(e,t):t,n)}function yv(e,t){const n=Dv()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var Hr="en",$o=!1,jo=!1,qo=!1,dd=!1,Ho=!1,Ps=void 0,Go=Hr,hd=Hr,Ev=void 0,In=void 0,Rn=globalThis,Mt=void 0;typeof Rn.vscode<"u"&&typeof Rn.vscode.process<"u"?Mt=Rn.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Mt=process);var bv=typeof Mt?.versions?.electron=="string",_v=bv&&Mt?.type==="renderer";if(typeof Mt=="object"){$o=Mt.platform==="win32",jo=Mt.platform==="darwin",qo=Mt.platform==="linux",qo&&Mt.env.SNAP&&Mt.env.SNAP_REVISION,Mt.env.CI||Mt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Ps=Hr,Go=Hr;const e=Mt.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);Ps=t.userLocale,hd=t.osLocale,Go=t.resolvedLanguage||Hr,Ev=t.languagePack?.translationsConfigFile}catch{}dd=!0}else typeof navigator=="object"&&!_v?(In=navigator.userAgent,$o=In.indexOf("Windows")>=0,jo=In.indexOf("Macintosh")>=0,(In.indexOf("Macintosh")>=0||In.indexOf("iPad")>=0||In.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,qo=In.indexOf("Linux")>=0,In?.indexOf("Mobi")>=0,Ho=!0,Go=cd()||Hr,Ps=navigator.language.toLowerCase(),hd=Ps):console.error("Unable to resolve platform.");var Ii=$o,Nv=jo,Tv=dd,Sv=Ho,Cv=Ho&&typeof Rn.importScripts=="function",Av=Cv?Rn.origin:void 0,vn=In,Fv=typeof Rn.postMessage=="function"&&!Rn.importScripts;(()=>{if(Fv){const e=[];Rn.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{const r=++t;e.push({id:r,callback:n}),Rn.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var wv=!!(vn&&vn.indexOf("Chrome")>=0);vn&&vn.indexOf("Firefox")>=0,!wv&&vn&&vn.indexOf("Safari")>=0,vn&&vn.indexOf("Edg/")>=0,vn&&vn.indexOf("Android")>=0;function Lv(e){return e}var Iv=class{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Lv):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}},pd=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function Rv(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function xv(e){return e.split(/\r\n|\r|\n/)}function kv(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function md(e){return e>=65&&e<=90}function Wo(e){return 55296<=e&&e<=56319}function Mv(e){return 56320<=e&&e<=57343}function Pv(e,t){return(e-55296<<10)+(t-56320)+65536}function Bv(e,t,n){const r=e.charCodeAt(n);if(Wo(r)&&n+1JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),$t.cache=new Iv({getCacheKey:JSON.stringify},t=>{function n(c){const d=new Map;for(let m=0;m!c.startsWith("_")&&c in s);a.length===0&&(a=["_default"]);let o;for(const c of a){const d=n(s[c]);o=i(o,d)}const u=n(s._common),l=r(u,o);return new $t(l)}),$t._locales=new pd(()=>Object.keys($t.ambiguousCharacterData.value).filter(t=>!t.startsWith("_"))),$t),zo=(Un=class{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Un.getRawData())),this._data}static isInvisibleCharacter(t){return Un.getData().has(t)}static get codePoints(){return Un.getData()}},Un._data=void 0,Un),Gr,Jo=globalThis.vscode;if(typeof Jo<"u"&&typeof Jo.process<"u"){const e=Jo.process;Gr={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Gr={get platform(){return process.platform},get arch(){return process.arch},get env(){return Ol},cwd(){return Ol.VSCODE_CWD||process.cwd()}}:Gr={get platform(){return Ii?"win32":Nv?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var Bs=Gr.cwd,$v=Gr.env,jv=Gr.platform,qv=65,Hv=97,Gv=90,Wv=122,Xn=46,lt=47,Lt=92,Qn=58,Yv=63,gd=class extends Error{constructor(e,t,n){let r;typeof t=="string"&&t.indexOf("not ")===0?(r="must not be",t=t.replace(/^not /,"")):r="must be";const i=e.indexOf(".")!==-1?"property":"argument";let s=`The "${e}" ${i} ${r} of type ${t}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};function zv(e,t){if(e===null||typeof e!="object")throw new gd(t,"Object",e)}function $e(e,t){if(typeof e!="string")throw new gd(t,"string",e)}var xn=jv==="win32";function De(e){return e===lt||e===Lt}function Xo(e){return e===lt}function Zn(e){return e>=qv&&e<=Gv||e>=Hv&&e<=Wv}function Vs(e,t,n,r){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l2){const c=i.lastIndexOf(n);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(n)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===Xn&&o!==-1?++o:o=-1}return i}function Jv(e){return e?`${e[0]==="."?"":"."}${e}`:""}function Dd(e,t){zv(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${Jv(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}var vt={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],$e(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=Bs():(s=$v[`=${t}`]||Bs(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===Lt)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const c=s.charCodeAt(0);if(a===1)De(c)&&(o=1,l=!0);else if(De(c))if(l=!0,De(s.charCodeAt(1))){let d=2,m=d;for(;d2&&De(s.charCodeAt(2))&&(l=!0,o=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(r){if(t.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=l,l&&t.length>0)break}return n=Vs(n,!r,"\\",De),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){$e(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const s=e.charCodeAt(0);if(t===1)return Xo(s)?"\\":e;if(De(s))if(i=!0,De(e.charCodeAt(1))){let o=2,u=o;for(;o2&&De(e.charCodeAt(2))&&(i=!0,n=3));let a=n0&&De(e.charCodeAt(t-1))&&(a+="\\"),r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(e){$e(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return De(n)||t>2&&Zn(n)&&e.charCodeAt(1)===Qn&&De(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=a:t+=`\\${a}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&De(n.charCodeAt(0))){++i;const s=n.length;s>1&&De(n.charCodeAt(1))&&(++i,s>2&&(De(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return vt.normalize(t)},relative(e,t){if($e(e,"from"),$e(t,"to"),e===t)return"";const n=vt.resolve(e),r=vt.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===Lt;)s--;const a=s-i;let o=0;for(;oo&&t.charCodeAt(u-1)===Lt;)u--;const l=u-o,c=ac){if(t.charCodeAt(o+m)===Lt)return r.slice(o+m+1);if(m===2)return r.slice(o+m)}a>c&&(e.charCodeAt(i+m)===Lt?d=m:m===2&&(d=3)),d===-1&&(d=0)}let p="";for(m=i+d+1;m<=s;++m)(m===s||e.charCodeAt(m)===Lt)&&(p+=p.length===0?"..":"\\..");return o+=d,p.length>0?`${p}${r.slice(o,u)}`:(r.charCodeAt(o)===Lt&&++o,r.slice(o,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=vt.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Lt){if(t.charCodeAt(1)===Lt){const n=t.charCodeAt(2);if(n!==Yv&&n!==Xn)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Zn(t.charCodeAt(0))&&t.charCodeAt(1)===Qn&&t.charCodeAt(2)===Lt)return`\\\\?\\${t}`;return e},dirname(e){$e(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return De(i)?e:".";if(De(i)){if(n=r=1,De(e.charCodeAt(1))){let o=2,u=o;for(;o2&&De(e.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=t-1;o>=r;--o)if(De(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&$e(t,"suffix"),$e(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&Zn(e.charCodeAt(0))&&e.charCodeAt(1)===Qn&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=n;--s){const u=e.charCodeAt(s);if(De(u)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(De(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){$e(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===Qn&&Zn(e.charCodeAt(0))&&(t=r=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(De(u)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===Xn?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Dd.bind(null,"\\"),parse(e){$e(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return De(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(De(i)){if(r=1,De(e.charCodeAt(1))){let d=2,m=d;for(;d0&&(t.root=e.slice(0,r));let s=-1,a=r,o=-1,u=!0,l=e.length-1,c=0;for(;l>=r;--l){if(i=e.charCodeAt(l),De(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===Xn?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return o!==-1&&(s===-1||c===0||c===1&&s===o-1&&s===a+1?t.base=t.name=e.slice(a,o):(t.name=e.slice(a,s),t.base=e.slice(a,o),t.ext=e.slice(s,o))),a>0&&a!==r?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Xv=(()=>{if(xn){const e=/\\/g;return()=>{const t=Bs().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>Bs()})(),yt={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:Xv();$e(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===lt)}return t=Vs(t,!n,"/",Xo),n?`/${t}`:t.length>0?t:"."},normalize(e){if($e(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===lt,n=e.charCodeAt(e.length-1)===lt;return e=Vs(e,!t,"/",Xo),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return $e(e,"path"),e.length>0&&e.charCodeAt(0)===lt},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":yt.normalize(t)},relative(e,t){if($e(e,"from"),$e(t,"to"),e===t||(e=yt.resolve(e),t=yt.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,s=1,a=t.length-s,o=io){if(t.charCodeAt(s+l)===lt)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(n+l)===lt?u=l:l===0&&(u=0));let c="";for(l=n+u+1;l<=r;++l)(l===r||e.charCodeAt(l)===lt)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if($e(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===lt;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===lt){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&$e(t,"ext"),$e(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===lt){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===lt){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){$e(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e.charCodeAt(a);if(o===lt){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o===Xn?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Dd.bind(null,"/"),parse(e){$e(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===lt;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=r;--u){const c=e.charCodeAt(u);if(c===lt){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),c===Xn?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=s===0&&n?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(c,a):(t.name=e.slice(c,i),t.base=e.slice(c,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};yt.win32=vt.win32=vt,yt.posix=vt.posix=yt,xn?vt.normalize:yt.normalize;var Qv=xn?vt.join:yt.join;xn?vt.resolve:yt.resolve,xn?vt.relative:yt.relative,xn?vt.dirname:yt.dirname,xn?vt.basename:yt.basename,xn?vt.extname:yt.extname,xn?vt.sep:yt.sep;var Zv=/^\w[\w\d+.-]*$/,Kv=/^\//,ey=/^\/\//;function ty(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Zv.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Kv.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(ey.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function ny(e,t){return!e&&!t?"file":e}function ry(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==en&&(t=en+t):t=en;break}return t}var Le="",en="/",iy=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,yn=class Fa{static isUri(t){return t instanceof Fa?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Le,this.authority=t.authority||Le,this.path=t.path||Le,this.query=t.query||Le,this.fragment=t.fragment||Le):(this.scheme=ny(t,a),this.authority=n||Le,this.path=ry(this.scheme,r||Le),this.query=i||Le,this.fragment=s||Le,ty(this,a))}get fsPath(){return Qo(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=t;return n===void 0?n=this.scheme:n===null&&(n=Le),r===void 0?r=this.authority:r===null&&(r=Le),i===void 0?i=this.path:i===null&&(i=Le),s===void 0?s=this.query:s===null&&(s=Le),a===void 0?a=this.fragment:a===null&&(a=Le),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Wr(n,r,i,s,a)}static parse(t,n=!1){const r=iy.exec(t);return r?new Wr(r[2]||Le,Us(r[4]||Le),Us(r[5]||Le),Us(r[7]||Le),Us(r[9]||Le),n):new Wr(Le,Le,Le,Le,Le)}static file(t){let n=Le;if(Ii&&(t=t.replace(/\\/g,en)),t[0]===en&&t[1]===en){const r=t.indexOf(en,2);r===-1?(n=t.substring(2),t=en):(n=t.substring(2,r),t=t.substring(r)||en)}return new Wr("file",n,t,Le,Le)}static from(t,n){return new Wr(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Ii&&t.scheme==="file"?r=Fa.file(vt.join(Qo(t,!0),...n)).path:r=yt.join(t.path,...n),t.with({path:r})}toString(t=!1){return Zo(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Fa)return t;{const n=new Wr(t);return n._formatted=t.external??null,n._fsPath=t._sep===vd?t.fsPath??null:null,n}}else return t}},vd=Ii?1:void 0,Wr=class extends yn{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Qo(this,!1)),this._fsPath}toString(e=!1){return e?Zo(this,!0):(this._formatted||(this._formatted=Zo(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=vd),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},yd={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Ed(e,t,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));const o=yd[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function sy(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Ii&&(n=n.replace(/\//g,"\\")),n}function Zo(e,t){const n=t?sy:Ed;let r="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=en,r+=en),s){let l=s.indexOf("@");if(l!==-1){const c=s.substr(0,l);s=s.substr(l+1),l=c.lastIndexOf(":"),l===-1?r+=n(c,!1,!1):(r+=n(c.substr(0,l),!1,!1),r+=":",r+=n(c.substr(l+1),!1,!0)),r+="@"}s=s.toLowerCase(),l=s.lastIndexOf(":"),l===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,l),!1,!0),r+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),u&&(r+="#",r+=t?u:Ed(u,!1,!1)),r}function bd(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+bd(e.substr(3)):e}}var _d=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Us(e){return e.match(_d)?e.replace(_d,t=>bd(t)):e}var Kn;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(Kn||(Kn={}));var ay="tkn",oy=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return yt.join(this._serverRootPath,Kn.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return Li(a),e}const t=e.authority;let n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);const r=this._ports[t],i=this._connectionTokens[t];let s=`path=${encodeURIComponent(e.path)}`;return typeof i=="string"&&(s+=`&${ay}=${encodeURIComponent(i)}`),yn.from({scheme:Sv?this._preferredWebSchema:Kn.vscodeRemoteResource,authority:`${n}:${r}`,path:this._remoteResourcesPath,query:s})}},uy=new oy,ly="vscode-app",cy=(ur=class{asBrowserUri(t){const n=this.toUri(t);return this.uriToBrowserUri(n)}uriToBrowserUri(t){return t.scheme===Kn.vscodeRemote?uy.rewrite(t):t.scheme===Kn.file&&(Tv||Av===`${Kn.vscodeFileResource}://${ur.FALLBACK_AUTHORITY}`)?t.with({scheme:Kn.vscodeFileResource,authority:t.authority||ur.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(t,n){if(yn.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){const r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return yn.joinPath(yn.parse(r,!0),t);const i=Qv(r,t);return yn.file(i)}return yn.parse(n.toUrl(t))}},ur.FALLBACK_AUTHORITY=ly,ur),Nd=new cy,Td;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function r(s){let a;typeof s=="string"?a=new URL(s).searchParams:s instanceof URL?a=s.searchParams:yn.isUri(s)&&(a=new URL(s.toString(!0)).searchParams);const o=a?.get(n);if(o)return t.get(o)}e.getHeadersFromQuery=r;function i(s,a,o){if(!globalThis.crossOriginIsolated)return;const u=a&&o?"3":o?"2":"1";s instanceof URLSearchParams?s.set(n,u):s[n]=u}e.addSearchParam=i})(Td||(Td={}));var Ko="default",fy="$initialize",dy=class{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.method=r,this.args=i,this.type=0}},Sd=class{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}},hy=class{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=r,this.arg=i,this.type=2}},py=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},my=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},gy=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new dy(this._workerId,r,e,t,n))})}listen(e,t,n){let r=null;const i=new jt({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new hy(this._workerId,r,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new my(this._workerId,r)),r=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,t){const n={get:(r,i)=>(typeof i=="string"&&!r[i]&&(Ad(i)?r[i]=s=>this.listen(e,i,s):Cd(i)?r[i]=this.listen(e,i,void 0):i.charCodeAt(0)===36&&(r[i]=async(...s)=>(await t?.(),this.sendMessage(e,i,s)))),r[i])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(r=>{this._send(new Sd(this._workerId,t,r,void 0))},r=>{r.detail instanceof Error&&(r.detail=od(r.detail)),this._send(new Sd(this._workerId,t,void 0,od(r)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(r=>{this._send(new py(this._workerId,t,r))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let n=0;n{e(n,r)},handleMessage:(n,r,i)=>this._handleMessage(n,r,i),handleEvent:(n,r,i)=>this._handleEvent(n,r,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===Ko&&t===fy)return this.initialize(n[0],n[1],n[2]);const r=e===Ko?this._requestHandler:this._localChannels.get(e);if(!r)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if(typeof r[t]!="function")return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(r[t].apply(r,n))}catch(i){return Promise.reject(i)}}_handleEvent(e,t,n){const r=e===Ko?this._requestHandler:this._localChannels.get(e);if(!r)throw new Error(`Missing channel ${e} on worker thread`);if(Ad(t)){const i=r[t].call(r,n);if(typeof i!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);return i}if(Cd(t)){const i=r[t];if(typeof i!="function")throw new Error(`Missing event ${t} on request handler.`);return i}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,n){if(this._protocol.setWorkerId(e),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}return t&&(typeof t.baseUrl<"u"&&delete t.baseUrl,typeof t.paths<"u"&&typeof t.paths.vs<"u"&&delete t.paths.vs,typeof t.trustedTypesPolicy<"u"&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t)),import(`${Nd.asBrowserUri(`${n}.js`).toString(!0)}`).then(i=>{if(this._requestHandler=i.create(this),!this._requestHandler)throw new Error("No RequestHandler!")})}},er=class{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function Fd(e,t){return(t<<5)-t+e|0}function vy(e,t){t=Fd(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new er(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},Id=class Di{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,s,a]=Di._getElements(t),[o,u,l]=Di._getElements(n);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(Di._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let d;return r<=i?(Yr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),d=[new er(t,0,r,i-r+1)]):t<=n?(Yr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[new er(t,n-t+1,r,0)]):(Yr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),Yr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,n,r,i,a,o,s),l=a[0],c=o[0];if(u!==null)return u;if(!s[0]){const d=this.ComputeDiffRecursive(t,l,r,c,s);let m=[];return s[0]?m=[new er(l+1,n-(l+1)+1,c+1,i-(c+1)+1)]:m=this.ComputeDiffRecursive(l+1,n,c+1,i,s),this.ConcatenateChanges(d,m)}return[new er(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,a,o,u,l,c,d,m,p,g,E,A,T,w){let F=null,S=null,L=new Ld,O=n,P=r,X=p[0]-A[0]-i,R=-1073741824,V=this.m_forwardHistory.length-1;do{const q=X+t;q===O||q=0&&(l=this.m_forwardHistory[V],t=l[0],O=1,P=l.length-1)}while(--V>=-1);if(F=L.getReverseChanges(),w[0]){let q=p[0]+1,Q=A[0]+1;if(F!==null&&F.length>0){const M=F[F.length-1];q=Math.max(q,M.getOriginalEnd()),Q=Math.max(Q,M.getModifiedEnd())}S=[new er(q,m-q+1,Q,E-Q+1)]}else{L=new Ld,O=a,P=o,X=p[0]-A[0]-u,R=1073741824,V=T?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const q=X+s;q===O||q=c[q+1]?(d=c[q+1]-1,g=d-X-u,d>R&&L.MarkNextChange(),R=d+1,L.AddOriginalElement(d+1,g+1),X=q+1-s):(d=c[q-1],g=d-X-u,d>R&&L.MarkNextChange(),R=d,L.AddModifiedElement(d+1,g+1),X=q-1-s),V>=0&&(c=this.m_reverseHistory[V],s=c[0],O=1,P=c.length-1)}while(--V>=-1);S=L.getChanges()}return this.ConcatenateChanges(F,S)}ComputeRecursionPoint(t,n,r,i,s,a,o){let u=0,l=0,c=0,d=0,m=0,p=0;t--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-t+(i-r),E=g+1,A=new Int32Array(E),T=new Int32Array(E),w=i-r,F=n-t,S=t-r,L=n-i,P=(F-w)%2===0;A[w]=t,T[F]=n,o[0]=!1;for(let X=1;X<=g/2+1;X++){let R=0,V=0;c=this.ClipDiagonalBound(w-X,X,w,E),d=this.ClipDiagonalBound(w+X,X,w,E);for(let Q=c;Q<=d;Q+=2){Q===c||QR+V&&(R=u,V=l),!P&&Math.abs(Q-F)<=X-1&&u>=T[Q])return s[0]=u,a[0]=l,M<=T[Q]&&X<=1448?this.WALKTRACE(w,c,d,S,F,m,p,L,A,T,u,n,s,l,i,a,P,o):null}const q=(R-t+(V-r)-X)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(R,q))return o[0]=!0,s[0]=R,a[0]=V,q>0&&X<=1448?this.WALKTRACE(w,c,d,S,F,m,p,L,A,T,u,n,s,l,i,a,P,o):(t++,r++,[new er(t,n-t+1,r,i-r+1)]);m=this.ClipDiagonalBound(F-X,X,F,E),p=this.ClipDiagonalBound(F+X,X,F,E);for(let Q=m;Q<=p;Q+=2){Q===m||Q=T[Q+1]?u=T[Q+1]-1:u=T[Q-1],l=u-(Q-F)-L;const M=u;for(;u>t&&l>r&&this.ElementsAreEqual(u,l);)u--,l--;if(T[Q]=u,P&&Math.abs(Q-w)<=X&&u<=A[Q])return s[0]=u,a[0]=l,M>=A[Q]&&X<=1448?this.WALKTRACE(w,c,d,S,F,m,p,L,A,T,u,n,s,l,i,a,P,o):null}if(X<=1447){let Q=new Int32Array(d-c+2);Q[0]=w-c+1,zr.Copy2(A,c,Q,1,d-c+1),this.m_forwardHistory.push(Q),Q=new Int32Array(p-m+2),Q[0]=F-m+1,zr.Copy2(T,m,Q,1,p-m+1),this.m_reverseHistory.push(Q)}}return this.WALKTRACE(w,c,d,S,F,m,p,L,A,T,u,n,s,l,i,a,P,o)}PrettifyChanges(t){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,s=0;if(n>0){const d=t[n-1];i=d.originalStart+d.originalLength,s=d.modifiedStart+d.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let u=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let d=1;;d++){const m=r.originalStart-d,p=r.modifiedStart-d;if(ml&&(l=E,u=d)}r.originalStart-=u,r.modifiedStart-=u;const c=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],c)){t[n-1]=c[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&p>u&&(u=p,l=d,c=m)}return u>0?[l,c]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const s=this._OriginalRegionIsBoundary(t,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(t,n){const r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return zr.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],zr.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return zr.Copy(t,0,i,0,t.length),zr.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(Yr.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Yr.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new er(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return Ze.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return Ze.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return Ze.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return Ze.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return Ze.plusRange(this,t)}static plusRange(t,n){let r,i,s,a;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new Ze(r,i,s,a)}intersectRanges(t){return Ze.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn;const o=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(s=l,a=c):s===l&&(a=Math.min(a,c)),r>s||r===s&&i>a?null:new Ze(r,i,s,a)}equalsRange(t){return Ze.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return Ze.getEndPosition(this)}static getEndPosition(t){return new je(t.endLineNumber,t.endColumn)}getStartPosition(){return Ze.getStartPosition(this)}static getStartPosition(t){return new je(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new Ze(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new Ze(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return Ze.collapseToStart(this)}static collapseToStart(t){return new Ze(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return Ze.collapseToEnd(this)}static collapseToEnd(t){return new Ze(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new Ze(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new Ze(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new Ze(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function Rd(e){return e<0?0:e>255?255:e|0}function Jr(e){return e<0?0:e>4294967295?4294967295:e|0}var Ey=class Dm{constructor(t){const n=Rd(t);this._defaultValue=n,this._asciiMap=Dm._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=Rd(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},by=class{constructor(e,t,n){const r=new Uint8Array(e*t);for(let i=0,s=e*t;it&&(t=o),a>n&&(n=a),u>n&&(n=u)}t++,n++;const r=new by(n,t,0);for(let i=0,s=e.length;i=this._maxCharCode?0:this._states.get(e,t)}},eu=null;function Ny(){return eu===null&&(eu=new _y([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),eu}var Ri=null;function Ty(){if(Ri===null){Ri=new Ey(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),u=n.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(t,n=Ny()){const r=Ty(),i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,c=0,d=0,m=1,p=!1,g=!1,E=!1,A=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}},xr.INSTANCE=new xr,xr),xd=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),$s;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof js?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ms.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:xd})})($s||($s={}));var js=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?xd:(this._emitter||(this._emitter=new jt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Fy=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new js),this._token}cancel(){this._token?this._token instanceof js&&this._token.cancel():this._token=$s.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof js&&this._token.dispose():this._token=$s.None}},tu=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},qs=new tu,nu=new tu,ru=new tu,wy=new Array(230),Ly=Object.create(null),Iy=Object.create(null);(function(){const t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const i of t){const[s,a,o,u,l,c,d,m,p]=i;if(r[a]||(r[a]=!0,Ly[o]=a,Iy[o.toLowerCase()]=a),!n[u]){if(n[u]=!0,!l)throw new Error(`String representation missing for key code ${u} around scan code ${o}`);qs.define(u,l),nu.define(u,m||l),ru.define(u,p||m||l)}c&&(wy[c]=u)}})();var kd;(function(e){function t(o){return qs.keyCodeToStr(o)}e.toString=t;function n(o){return qs.strToKeyCode(o)}e.fromString=n;function r(o){return nu.keyCodeToStr(o)}e.toUserSettingsUS=r;function i(o){return ru.keyCodeToStr(o)}e.toUserSettingsGeneral=i;function s(o){return nu.strToKeyCode(o)||ru.strToKeyCode(o)}e.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return qs.keyCodeToStr(o)}e.toElectronAccelerator=a})(kd||(kd={}));function Ry(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}var xy=class Yt extends _e{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return Yt.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new Yt(this.startLineNumber,this.startColumn,t,n):new Yt(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new je(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new je(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new Yt(t,n,this.endLineNumber,this.endColumn):new Yt(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new Yt(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new Yt(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new Yt(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new Yt(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new Py(this,e,t);return this._factories.set(e,n),ks(()=>{const r=this._factories.get(e);!r||r!==n||(this._factories.delete(e),r.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Py=class extends Os{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}},By=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}},Pd;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Pd||(Pd={}));var Bd;(function(e){const t=new Map;t.set(0,le.symbolMethod),t.set(1,le.symbolFunction),t.set(2,le.symbolConstructor),t.set(3,le.symbolField),t.set(4,le.symbolVariable),t.set(5,le.symbolClass),t.set(6,le.symbolStruct),t.set(7,le.symbolInterface),t.set(8,le.symbolModule),t.set(9,le.symbolProperty),t.set(10,le.symbolEvent),t.set(11,le.symbolOperator),t.set(12,le.symbolUnit),t.set(13,le.symbolValue),t.set(15,le.symbolEnum),t.set(14,le.symbolConstant),t.set(15,le.symbolEnum),t.set(16,le.symbolEnumMember),t.set(17,le.symbolKeyword),t.set(27,le.symbolSnippet),t.set(18,le.symbolText),t.set(19,le.symbolColor),t.set(20,le.symbolFile),t.set(21,le.symbolReference),t.set(22,le.symbolCustomColor),t.set(23,le.symbolFolder),t.set(24,le.symbolTypeParameter),t.set(25,le.account),t.set(26,le.issues);function n(s){let a=t.get(s);return a||(console.info("No codicon found for CompletionItemKind "+s),a=le.symbolProperty),a}e.toIcon=n;const r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,a){let o=r.get(s);return typeof o>"u"&&!a&&(o=9),o}e.fromString=i})(Bd||(Bd={}));var Vd;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Vd||(Vd={}));var Ud;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(Ud||(Ud={}));var $d;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})($d||($d={}));var jd;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(jd||(jd={})),xe("Array","array"),xe("Boolean","boolean"),xe("Class","class"),xe("Constant","constant"),xe("Constructor","constructor"),xe("Enum","enumeration"),xe("EnumMember","enumeration member"),xe("Event","event"),xe("Field","field"),xe("File","file"),xe("Function","function"),xe("Interface","interface"),xe("Key","key"),xe("Method","method"),xe("Module","module"),xe("Namespace","namespace"),xe("Null","null"),xe("Number","number"),xe("Object","object"),xe("Operator","operator"),xe("Package","package"),xe("Property","property"),xe("String","string"),xe("Struct","struct"),xe("TypeParameter","type parameter"),xe("Variable","variable");var qd;(function(e){const t=new Map;t.set(0,le.symbolFile),t.set(1,le.symbolModule),t.set(2,le.symbolNamespace),t.set(3,le.symbolPackage),t.set(4,le.symbolClass),t.set(5,le.symbolMethod),t.set(6,le.symbolProperty),t.set(7,le.symbolField),t.set(8,le.symbolConstructor),t.set(9,le.symbolEnum),t.set(10,le.symbolInterface),t.set(11,le.symbolFunction),t.set(12,le.symbolVariable),t.set(13,le.symbolConstant),t.set(14,le.symbolString),t.set(15,le.symbolNumber),t.set(16,le.symbolBoolean),t.set(17,le.symbolArray),t.set(18,le.symbolObject),t.set(19,le.symbolKey),t.set(20,le.symbolNull),t.set(21,le.symbolEnumMember),t.set(22,le.symbolStruct),t.set(23,le.symbolEvent),t.set(24,le.symbolOperator),t.set(25,le.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=le.symbolProperty),i}e.toIcon=n})(qd||(qd={})),St=class{static fromValue(t){switch(t){case"comment":return St.Comment;case"imports":return St.Imports;case"region":return St.Region}return new St(t)}constructor(t){this.value=t}},St.Comment=new St("comment"),St.Imports=new St("imports"),St.Region=new St("region");var Hd;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Hd||(Hd={}));var Gd;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Gd||(Gd={}));var Wd;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(Wd||(Wd={}));var Yd;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Yd||(Yd={})),new Md,new Md;var zd;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(zd||(zd={}));var Jd;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(Jd||(Jd={}));var Xd;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(Xd||(Xd={}));var Qd;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Qd||(Qd={}));var Zd;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(Zd||(Zd={}));var Kd;(function(e){e[e.Deprecated=1]="Deprecated"})(Kd||(Kd={}));var eh;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(eh||(eh={}));var th;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(th||(th={}));var nh;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(nh||(nh={}));var rh;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(rh||(rh={}));var ih;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(ih||(ih={}));var sh;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(sh||(sh={}));var ah;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(ah||(ah={}));var oh;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(oh||(oh={}));var uh;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(uh||(uh={}));var lh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(lh||(lh={}));var ch;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(ch||(ch={}));var fh;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(fh||(fh={}));var dh;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(dh||(dh={}));var hh;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(hh||(hh={}));var ph;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(ph||(ph={}));var mh;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(mh||(mh={}));var iu;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(iu||(iu={}));var Dr;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(Dr||(Dr={}));var su;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(su||(su={}));var gh;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(gh||(gh={}));var Dh;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(Dh||(Dh={}));var vh;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(vh||(vh={}));var yh;(function(e){e[e.AIGenerated=1]="AIGenerated"})(yh||(yh={}));var Eh;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Eh||(Eh={}));var bh;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(bh||(bh={}));var _h;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(_h||(_h={}));var Nh;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(Nh||(Nh={}));var Th;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(Th||(Th={}));var Sh;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(Sh||(Sh={}));var Ch;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Ch||(Ch={}));var Ah;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Ah||(Ah={}));var Fh;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Fh||(Fh={}));var au;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(au||(au={}));var wh;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(wh||(wh={}));var Lh;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Lh||(Lh={}));var Ih;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(Ih||(Ih={}));var Rh;(function(e){e[e.Deprecated=1]="Deprecated"})(Rh||(Rh={}));var xh;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(xh||(xh={}));var kh;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(kh||(kh={}));var Oh;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Oh||(Oh={}));var Mh;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Mh||(Mh={}));var Vy=($n=class{static chord(t,n){return Ry(t,n)}},$n.CtrlCmd=2048,$n.Shift=1024,$n.Alt=512,$n.WinCtrl=256,$n);function Uy(){return{editor:void 0,languages:void 0,CancellationTokenSource:Fy,Emitter:jt,KeyCode:iu,KeyMod:Vy,Position:je,Range:_e,Selection:xy,SelectionDirection:au,MarkerSeverity:Dr,MarkerTag:su,Uri:yn,Token:By}}var $y=(lr=class{static getChannel(t){return t.getChannel(lr.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(lr.CHANNEL_NAME,n)}},lr.CHANNEL_NAME="editorWorkerHost",lr),Ph,jy=class{constructor(){this[Ph]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,n!==0&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Ph=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const n=e.next,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}},qy=class extends jy{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},Hy=class extends qy{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}},Gy=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}};new Hy(10);function Wy(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function Bh(e){const t=[];for(const n of Wy(e))typeof e[n]=="function"&&t.push(n);return t}function Yy(e,t){const n=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(const i of e)r[i]=n(i);return r}var Vh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Vh||(Vh={}));var Uh;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Uh||(Uh={}));var $h;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})($h||($h={}));function zy(e,t,n,r,i){if(r===0)return!0;const s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r);if(e.get(a)!==0)return!0}return!1}function Jy(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=t.charCodeAt(r+i-1);if(e.get(a)!==0)return!0}return!1}function Xy(e,t,n,r,i){return zy(e,t,n,r,i)&&Jy(e,t,n,r,i)}var Qy=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;const r=n.index,i=n[0].length;if(r===this._prevMatchStartIndex&&i===this._prevMatchLength){if(i===0){Bv(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=i,!this._wordSeparators||Xy(this._wordSeparators,e,t,r,i))return n}while(n);return null}};function Zy(e,t="Unreachable"){throw new Error(t)}function Hs(e){if(!e()){debugger;e(),Li(new Kt("Assertion Failed"))}}function jh(e,t){let n=0;for(;n/?";function eE(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of Ky)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}var qh=eE();function Hh(e){let t=qh;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var Gh=new ov;Gh.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function ou(e,t,n,r,i){if(t=Hh(t),i||(i=xs.first(Gh)),n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),ou(e,t,n,r,i)}const s=Date.now(),a=e-1-r;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const c=a-i.windowSize*l;t.lastIndex=Math.max(0,c);const d=tE(t,n,a,o);if(!d&&u||(u=d,c<=0))break;o=c}if(u){const l={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function tE(e,t,n,r){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var nE=class{static computeUnicodeHighlights(e,t,n){const r=n?n.startLineNumber:1,i=n?n.endLineNumber:e.getLineCount(),s=new Wh(t),a=s.getCandidateCodePoints();let o;a==="allNonBasicAscii"?o=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):o=new RegExp(`${rE(Array.from(a))}`,"g");const u=new Qy(null,o),l=[];let c=!1,d,m=0,p=0,g=0;e:for(let E=r,A=i;E<=A;E++){const T=e.getLineContent(E),w=T.length;u.reset(0);do if(d=u.next(T),d){let F=d.index,S=d.index+d[0].length;if(F>0){const X=T.charCodeAt(F-1);Wo(X)&&F--}if(S+1=1e3){c=!0;break e}l.push(new _e(E,F+1,E,S+1))}}while(d)}return{ranges:l,hasMore:c,ambiguousCharacterCount:m,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,t){const n=new Wh(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),s=n.ambiguousCharacters.getPrimaryConfusable(i),a=Yo.getLocales().filter(o=>!Yo.getInstance(new Set([...t.allowedLocales,o])).isAmbiguous(i));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};function rE(e,t){return`[${Rv(e.map(r=>String.fromCodePoint(r)).join(""))}]`}var Wh=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Yo.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of zo.codePoints)Yh(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,i=!1;if(t)for(const s of t){const a=s.codePointAt(0),o=Uv(s);r=r||o,!o&&!this.ambiguousCharacters.isAmbiguous(a)&&!zo.isInvisibleCharacter(a)&&(i=!0)}return!r&&i?0:this.options.invisibleCharacters&&!Yh(e)&&zo.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}};function Yh(e){return e===" "||e===` -`||e===" "}var Gs=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},iE=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}},ke=class Tn{static addRange(t,n){let r=0;for(;rn))return new Tn(t,n)}static ofLength(t){return new Tn(0,t)}static ofStartAndLength(t,n){return new Tn(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new Kt(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new Tn(this.start+t,this.endExclusive+t)}deltaStart(t){return new Tn(this.start+t,this.endExclusive)}deltaEnd(t){return new Tn(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new Kt(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new Kt(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new Kt(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=xi(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){const n=Xr(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=Xr(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=a.startLineNumber?s=new Ne(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new vi(n)}subtractFrom(t){const n=uu(this._normalizedRanges,a=>a.endLineNumberExclusive>=t.startLineNumber),r=xi(this._normalizedRanges,a=>a.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new vi([t]);const i=[];let s=t.startLineNumber;for(let a=n;as&&i.push(new Ne(s,o.startLineNumber)),s=o.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){const n=[];let r=0,i=0;for(;rn.delta(t)))}};un=class{static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new un(0,n.column-t.column):new un(n.lineNumber-t.lineNumber,n.column-1)}static ofRange(t){return un.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(const i of t)i===` -`?(n++,r=0):r++;return new un(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}createRange(t){return this.lineCount===0?new _e(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new _e(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(t){return this.lineCount===0?new je(t.lineNumber,t.column+this.columnCount):new je(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}},un.zero=new un(0,0);var aE=class{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}},Qr=class yi{static inverse(t,n,r){const i=[];let s=1,a=1;for(const u of t){const l=new yi(new Ne(s,u.original.startLineNumber),new Ne(a,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,a=u.modified.endLineNumberExclusive}const o=new yi(new Ne(s,n+1),new Ne(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(t,n,r){const i=[];for(const s of t){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new yi(a,o))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new yi(this.modified,this.original)}join(t){return new yi(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){const t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new kn(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Kt("not a valid diff");return new kn(new _e(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new _e(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new kn(new _e(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new _e(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(Jh(this.original.endLineNumberExclusive,t)&&Jh(this.modified.endLineNumberExclusive,n))return new kn(new _e(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new _e(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new kn(_e.fromPositions(new je(this.original.startLineNumber,1),Zr(new je(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),_e.fromPositions(new je(this.modified.startLineNumber,1),Zr(new je(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new kn(_e.fromPositions(Zr(new je(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Zr(new je(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),_e.fromPositions(Zr(new je(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Zr(new je(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new Kt}};function Zr(e,t){if(e.lineNumber<1)return new je(1,1);if(e.lineNumber>t.length)return new je(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new je(e.lineNumber,n.length+1):e}function Jh(e,t){return e>=1&&e<=t.length}var ki=class wa extends Qr{static fromRangeMappings(t){const n=Ne.join(t.map(i=>Ne.fromRangeInclusive(i.originalRange))),r=Ne.join(t.map(i=>Ne.fromRangeInclusive(i.modifiedRange)));return new wa(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new wa(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new wa(this.original,this.modified,[this.toRangeMapping()])}},kn=class vm{static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new vm(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new aE(this.originalRange,n)}},oE=3,uE=class{computeDiff(e,t,n){const i=new fE(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[];let a=null;for(const o of i.changes){let u;o.originalEndLineNumber===0?u=new Ne(o.originalStartLineNumber+1,o.originalStartLineNumber+1):u=new Ne(o.originalStartLineNumber,o.originalEndLineNumber+1);let l;o.modifiedEndLineNumber===0?l=new Ne(o.modifiedStartLineNumber+1,o.modifiedStartLineNumber+1):l=new Ne(o.modifiedStartLineNumber,o.modifiedEndLineNumber+1);let c=new ki(u,l,o.charChanges?.map(d=>new kn(new _e(d.originalStartLineNumber,d.originalStartColumn,d.originalEndLineNumber,d.originalEndColumn),new _e(d.modifiedStartLineNumber,d.modifiedStartColumn,d.modifiedEndLineNumber,d.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===c.modified.startLineNumber||a.original.endLineNumberExclusive===c.original.startLineNumber)&&(c=new ki(a.original.join(c.original),a.modified.join(c.modified),a.innerChanges&&c.innerChanges?a.innerChanges.concat(c.innerChanges):void 0),s.pop()),s.push(c),a=c}return Hs(()=>jh(s,(o,u)=>u.original.startLineNumber-o.original.endLineNumberExclusive===u.modified.startLineNumber-o.modified.endLineNumberExclusive&&o.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},Ys=class ym{constructor(t,n,r,i,s,a,o,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){const i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),a=n.getEndLineNumber(t.originalStart+t.originalLength-1),o=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),d=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new ym(i,s,a,o,u,l,c,d)}};function cE(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const p=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(p.getElements().length>0&&g.getElements().length>0){let E=Xh(p,g,s,!0).changes;o&&(E=cE(E)),m=[];for(let A=0,T=E.length;A1&&g>1;){const E=d.charCodeAt(p-2),A=m.charCodeAt(g-2);if(E!==A)break;p--,g--}(p>1||g>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,p,s+1,1,g)}{let p=fu(d,1),g=fu(m,1);const E=d.length+1,A=m.length+1;for(;p!0;const t=Date.now();return()=>Date.now()-tr===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(du||(du={}));function zs(e,t){return(n,r)=>t(e(n),e(r))}var Js=(e,t)=>e-t;function DE(e){return(t,n)=>-e(t,n)}jn=class{constructor(t){this.iterate=t}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new jn(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new jn(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||du.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}},jn.empty=new jn(t=>{});var Kr=class Al{static trivial(t,n){return new Al([new It(ke.ofLength(t.length),ke.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new Al([new It(ke.ofLength(t.length),ke.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}},It=class Hn{static invert(t,n){const r=[];return pE(t,(i,s)=>{r.push(Hn.fromOffsetPairs(i?i.getEndExclusives():vr.zero,s?s.getStarts():new vr(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new Hn(new ke(t.offset1,n.offset1),new ke(t.offset2,n.offset2))}static assertSorted(t){let n;for(const r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new Kt("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new Hn(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new Hn(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new Hn(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new Hn(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new Hn(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){const n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new Hn(n,r)}getStarts(){return new vr(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new vr(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},vr=(_n=class{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new _n(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}},_n.zero=new _n(0,0),_n.max=new _n(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),_n),hu=(Or=class{isValid(){return!0}},Or.instance=new Or,Or),vE=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Kt("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&g>0&&s.get(p-1,g-1)===3&&(T+=a.get(p-1,g-1)),T+=r?r(p,g):1):T=-1;const w=Math.max(E,A,T);if(w===T){const F=p>0&&g>0?a.get(p-1,g-1):0;a.set(p,g,F+1),s.set(p,g,3)}else w===E?(a.set(p,g,0),s.set(p,g,1)):w===A&&(a.set(p,g,0),s.set(p,g,2));i.set(p,g,w)}const o=[];let u=e.length,l=t.length;function c(p,g){(p+1!==u||g+1!==l)&&o.push(new It(new ke(p+1,u),new ke(g+1,l))),u=p,l=g}let d=e.length-1,m=t.length-1;for(;d>=0&&m>=0;)s.get(d,m)===3?(c(d,m),d--,m--):s.get(d,m)===1?d--:m--;return c(-1,-1),o.reverse(),new Kr(o,!1)}},ep=class{compute(e,t,n=hu.instance){if(e.length===0||t.length===0)return Kr.trivial(e,t);const r=e,i=t;function s(g,E){for(;gr.length||F>i.length)continue;const S=s(w,F);o.set(l,S);const L=w===A?u.get(l+1):u.get(l-1);if(u.set(l,S!==w?new tp(L,w,F,S-w):L),o.get(l)===r.length&&o.get(l)-l===i.length)break e}}let c=u.get(l);const d=[];let m=r.length,p=i.length;for(;;){const g=c?c.x+c.length:0,E=c?c.y+c.length:0;if((g!==m||E!==p)&&d.push(new It(new ke(g,m),new ke(E,p))),!c)break;m=c.x,p=c.y,c=c.prev}return d.reverse(),new Kr(d,!1)}},tp=class{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}},EE=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}},bE=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}},Xs=class{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let i=e[r-1],s=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,i=i.substring(s)),this.lineStartOffsets.push(s);let a=0;if(!n){const u=i.trimStart();a=i.length-u.length,i=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);const o=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-a,i.length):i.length;for(let u=0;uString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=rp(e>0?this.elements[e-1]:-1),n=rp(ei<=e),r=e-this.firstElementOffsetByLineIdx[n];return new je(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(r===0&&t==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?_e.fromPositions(n,n):_e.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!gu(this.elements[e]))return;let t=e;for(;t>0&&gu(this.elements[t-1]);)t--;let n=e;for(;nr<=e.start)??0,n=sE(this.firstElementOffsetByLineIdx,r=>e.endExclusive<=r)??this.elements.length;return new ke(t,n)}};function gu(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}var _E={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function np(e){return _E[e]}function rp(e){return e===10?8:e===13?7:mu(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function NE(e,t,n,r,i,s){let{moves:a,excludedChanges:o}=SE(e,t,n,s);if(!s.isValid())return[];const u=e.filter(c=>!o.has(c)),l=CE(u,r,i,t,n,s);return gE(a,l),a=AE(a),a=a.filter(c=>{const d=c.original.toOffsetRange().slice(t).map(p=>p.trim());return d.join(` -`).length>=15&&TE(d,p=>p.length>=2)>=2}),a=FE(e,a),a}function TE(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function SE(e,t,n,r){const i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Kh(u.original,t,u)),a=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Kh(u.modified,n,u))),o=new Set;for(const u of s){let l=-1,c;for(const d of a){const m=u.computeSimilarity(d);m>l&&(l=m,c=d)}if(l>.9&&c&&(a.delete(c),i.push(new Qr(u.range,c.range)),o.add(u.source),o.add(c.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function CE(e,t,n,r,i,s){const a=[],o=new Gy;for(const m of e)for(let p=m.original.startLineNumber;pm.modified.startLineNumber,Js));for(const m of e){let p=[];for(let g=m.modified.startLineNumber;g{for(const S of p)if(S.originalLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive&&S.modifiedLineRange.endLineNumberExclusive+1===A.endLineNumberExclusive){S.originalLineRange=new Ne(S.originalLineRange.startLineNumber,w.endLineNumberExclusive),S.modifiedLineRange=new Ne(S.modifiedLineRange.startLineNumber,A.endLineNumberExclusive),T.push(S);return}const F={modifiedLineRange:A,originalLineRange:w};u.push(F),T.push(F)}),p=T}if(!s.isValid())return[]}u.sort(DE(zs(m=>m.modifiedLineRange.length,Js)));const l=new Ws,c=new Ws;for(const m of u){const p=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=l.subtractFrom(m.modifiedLineRange),E=c.subtractFrom(m.originalLineRange).getWithDelta(p),A=g.getIntersection(E);for(const T of A.ranges){if(T.length<3)continue;const w=T,F=T.delta(-p);a.push(new Qr(F,w)),l.addRange(w),c.addRange(F)}}a.sort(zs(m=>m.original.startLineNumber,Js));const d=new zh(e);for(let m=0;mO.original.startLineNumber<=p.original.startLineNumber),E=Xr(e,O=>O.modified.startLineNumber<=p.modified.startLineNumber),A=Math.max(p.original.startLineNumber-g.original.startLineNumber,p.modified.startLineNumber-E.modified.startLineNumber),T=d.findLastMonotonous(O=>O.original.startLineNumberO.modified.startLineNumberr.length||P>i.length||l.contains(P)||c.contains(O)||!ip(r[O-1],i[P-1],s))break}S>0&&(c.addRange(new Ne(p.original.startLineNumber-S,p.original.startLineNumber)),l.addRange(new Ne(p.modified.startLineNumber-S,p.modified.startLineNumber)));let L;for(L=0;Lr.length||P>i.length||l.contains(P)||c.contains(O)||!ip(r[O-1],i[P-1],s))break}L>0&&(c.addRange(new Ne(p.original.endLineNumberExclusive,p.original.endLineNumberExclusive+L)),l.addRange(new Ne(p.modified.endLineNumberExclusive,p.modified.endLineNumberExclusive+L))),(S>0||L>0)&&(a[m]=new Qr(new Ne(p.original.startLineNumber-S,p.original.endLineNumberExclusive+L),new Ne(p.modified.startLineNumber-S,p.modified.endLineNumberExclusive+L)))}return a}function ip(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new ep().compute(new Xs([e],new _e(1,1,1,e.length),!1),new Xs([t],new _e(1,1,1,t.length),!1),n);let s=0;const a=It.invert(i.diffs,e.length);for(const c of a)c.seq1Range.forEach(d=>{mu(e.charCodeAt(d))||s++});function o(c){let d=0;for(let m=0;mt.length?e:t);return s/u>.6&&u>10}function AE(e){if(e.length===0)return e;e.sort(zs(n=>n.original.startLineNumber,Js));const t=[e[0]];for(let n=1;n=0&&a>=0&&s+a<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function FE(e,t){const n=new zh(e);return t=t.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumbero.modified.startLineNumber0&&(o=o.delta(l))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function wE(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&e.seq2Range.start-a>=i.start&&n.isStronglyEqual(e.seq2Range.start-a,e.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;e.seq1Range.start+ol&&(l=g,u=c)}return e.delta(u)}function LE(e,t,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new It(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function IE(e,t,n){const r=It.invert(n,e.length),i=[];let s=new vr(0,0);function a(u,l){if(u.offset10;){const A=r[0];if(!(A.seq1Range.intersects(m.seq1Range)||A.seq2Range.intersects(m.seq2Range)))break;const w=e.findWordContaining(A.seq1Range.start),F=t.findWordContaining(A.seq2Range.start),S=new It(w,F),L=S.intersect(A);if(g+=L.seq1Range.length,E+=L.seq2Range.length,m=m.join(S),m.seq1Range.endExclusive>=A.seq1Range.endExclusive)r.shift();else break}g+E<(m.seq1Range.length+m.seq2Range.length)*2/3&&i.push(m),s=m.getEndExclusives()}for(;r.length>0;){const u=r.shift();u.seq1Range.isEmpty||(a(u.getStarts(),u),a(u.getEndExclusives().delta(-1),u))}return RE(n,i)}function RE(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function xE(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let o=1;o5||p.seq1Range.length+p.seq2Range.length>5)};const l=r[o],c=a[a.length-1];u(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);return r}function kE(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const o=[r[0]];for(let u=1;u5||E.length>500)return!1;const T=e.getText(E).trim();if(T.length>20||T.split(/\r\n|\r|\n/).length>1)return!1;const w=e.countLinesIn(p.seq1Range),F=p.seq1Range.length,S=t.countLinesIn(p.seq2Range),L=p.seq2Range.length,O=e.countLinesIn(g.seq1Range),P=g.seq1Range.length,X=t.countLinesIn(g.seq2Range),R=g.seq2Range.length,V=130;function q(Q){return Math.min(Q,V)}return Math.pow(Math.pow(q(w*40+F),1.5)+Math.pow(q(S*40+L),1.5),1.5)+Math.pow(Math.pow(q(O*40+P),1.5)+Math.pow(q(X*40+R),1.5),1.5)>(V**1.5)**1.5*1.3};const c=r[u],d=o[o.length-1];l(d,c)?(s=!0,o[o.length-1]=o[o.length-1].join(c)):o.push(c)}r=o}while(i++<10&&s);const a=[];return mE(r,(o,u,l)=>{let c=u;function d(T){return T.length>0&&T.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}const m=e.extendToFullLines(u.seq1Range),p=e.getText(new ke(m.start,u.seq1Range.start));d(p)&&(c=c.deltaStart(-p.length));const g=e.getText(new ke(u.seq1Range.endExclusive,m.endExclusive));d(g)&&(c=c.deltaEnd(g.length));const E=It.fromOffsetPairs(o?o.getEndExclusives():vr.zero,l?l.getStarts():vr.max),A=c.intersect(E);a.length>0&&A.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(A):a.push(A)}),a}var up=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:lp(this.lines[e-1]),n=e===this.lines.length?0:lp(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}};function lp(e){let t=0;for(;tS===L))return new Gs([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new Gs([new ki(new Ne(1,e.length+1),new Ne(1,t.length+1),[new kn(new _e(1,1,e.length,e[e.length-1].length+1),new _e(1,1,t.length,t[t.length-1].length+1))])],[],!1);const r=n.maxComputationTimeMs===0?hu.instance:new vE(n.maxComputationTimeMs),i=!n.ignoreTrimWhitespace,s=new Map;function a(S){let L=s.get(S);return L===void 0&&(L=s.size,s.set(S,L)),L}const o=e.map(S=>a(S.trim())),u=t.map(S=>a(S.trim())),l=new up(o,e),c=new up(u,t),d=l.length+c.length<1700?this.dynamicProgrammingDiffing.compute(l,c,r,(S,L)=>e[S]===t[L]?t[L].length===0?.1:1+Math.log(1+t[L].length):.99):this.myersDiffingAlgorithm.compute(l,c,r);let m=d.diffs,p=d.hitTimeout;m=sp(l,c,m),m=xE(l,c,m);const g=[],E=S=>{if(i)for(let L=0;LS.seq1Range.start-A===S.seq2Range.start-T);const L=S.seq1Range.start-A;E(L),A=S.seq1Range.endExclusive,T=S.seq2Range.endExclusive;const O=this.refineDiff(e,t,S,r,i);O.hitTimeout&&(p=!0);for(const P of O.mappings)g.push(P)}E(e.length-A);const w=cp(g,e,t);let F=[];return n.computeMoves&&(F=this.computeMoves(w,e,t,o,u,r,i)),Hs(()=>{function S(O,P){if(O.lineNumber<1||O.lineNumber>P.length)return!1;const X=P[O.lineNumber-1];return!(O.column<1||O.column>X.length+1)}function L(O,P){return!(O.startLineNumber<1||O.startLineNumber>P.length+1||O.endLineNumberExclusive<1||O.endLineNumberExclusive>P.length+1)}for(const O of w){if(!O.innerChanges)return!1;for(const P of O.innerChanges)if(!(S(P.modifiedRange.getStartPosition(),t)&&S(P.modifiedRange.getEndPosition(),t)&&S(P.originalRange.getStartPosition(),e)&&S(P.originalRange.getEndPosition(),e)))return!1;if(!L(O.modified,t)||!L(O.original,e))return!1}return!0}),new Gs(w,F,p)}computeMoves(e,t,n,r,i,s,a){return NE(e,t,n,r,i,s).map(l=>{const c=this.refineDiff(t,n,new It(l.original.toOffsetRange(),l.modified.toOffsetRange()),s,a),d=cp(c.mappings,t,n,!0);return new iE(l,d)})}refineDiff(e,t,n,r,i){const a=PE(n).toRangeMapping2(e,t),o=new Xs(e,a.originalRange,i),u=new Xs(t,a.modifiedRange,i),l=o.length+u.length<500?this.dynamicProgrammingDiffing.compute(o,u,r):this.myersDiffingAlgorithm.compute(o,u,r);let c=l.diffs;return c=sp(o,u,c),c=IE(o,u,c),c=LE(o,u,c),c=kE(o,u,c),{mappings:c.map(m=>new kn(o.translateRange(m.seq1Range),u.translateRange(m.seq2Range))),hitTimeout:l.hitTimeout}}};function cp(e,t,n,r=!1){const i=[];for(const s of hE(e.map(a=>ME(a,t,n)),(a,o)=>a.original.overlapOrTouch(o.original)||a.modified.overlapOrTouch(o.modified))){const a=s[0],o=s[s.length-1];i.push(new ki(a.original.join(o.original),a.modified.join(o.modified),s.map(u=>u.innerChanges[0])))}return Hs(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)?!1:jh(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);const s=new Ne(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),a=new Ne(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new ki(s,a,[e])}function PE(e){return new Qr(new Ne(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new Ne(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var fp={getLegacy:()=>new uE,getDefault:()=>new OE};function tr(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var it=class{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=tr(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},yr=class ts{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=tr(Math.max(Math.min(1,n),0),3),this.l=tr(Math.max(Math.min(1,r),0),3),this.a=tr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let u=0,l=0;const c=(o+a)/2,d=a-o;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),a){case n:u=(r-i)/d+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){const n=t.h/360,{s:r,l:i,a:s}=t;let a,o,u;if(r===0)a=o=u=i;else{const l=i<.5?i*(1+r):i+r-i*r,c=2*i-l;a=ts._hue2rgb(c,l,n+1/3),o=ts._hue2rgb(c,l,n),u=ts._hue2rgb(c,l,n-1/3)}return new it(Math.round(a*255),Math.round(o*255),Math.round(u*255),s)}},Qs=class bm{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=tr(Math.max(Math.min(1,n),0),3),this.v=tr(Math.max(Math.min(1,r),0),3),this.a=tr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,u=s===0?0:o/s;let l;return o===0?l=0:s===n?l=((r-i)/o%6+6)%6:s===r?l=(i-n)/o+2:l=(n-r)/o+4,new bm(Math.round(l*60),u,s,t.a)}static toRGBA(t){const{h:n,s:r,v:i,a:s}=t,a=i*r,o=a*(1-Math.abs(n/60%2-1)),u=i-a;let[l,c,d]=[0,0,0];return n<60?(l=a,c=o):n<120?(l=o,c=a):n<180?(c=a,d=o):n<240?(c=o,d=a):n<300?(l=o,d=a):n<=360&&(l=a,d=o),l=Math.round((l+u)*255),c=Math.round((c+u)*255),d=Math.round((d+u)*255),new it(l,c,d,s)}},Zs=(Ae=class{static fromHex(t){return Ae.Format.CSS.parseHex(t)||Ae.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:yr.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Qs.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof it)this.rgba=t;else if(t instanceof yr)this._hsla=t,this.rgba=yr.toRGBA(t);else if(t instanceof Qs)this._hsva=t,this.rgba=Qs.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&it.equals(this.rgba,t.rgba)&&yr.equals(this.hsla,t.hsla)&&Qs.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=Ae._relativeLuminanceForComponent(this.rgba.r),n=Ae._relativeLuminanceForComponent(this.rgba.g),r=Ae._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return tr(i,4)}static _relativeLuminanceForComponent(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(const i of r){const s=i.filter(l=>l!==void 0),a=s[1],o=s[2];if(!o)continue;let u;if(a==="rgb"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=hp(Oi(e,i),Mi(o,l),!1)}else if(a==="rgba"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=hp(Oi(e,i),Mi(o,l),!0)}else if(a==="hsl"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=pp(Oi(e,i),Mi(o,l),!1)}else if(a==="hsla"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=pp(Oi(e,i),Mi(o,l),!0)}else a==="#"&&(u=BE(Oi(e,i),a+o));u&&t.push(u)}return t}function UE(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:VE(e)}var mp=new RegExp("\\bMARK:\\s*(.*)$","d"),$E=/^-+|-+$/g;function jE(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=qE(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const r=HE(e);n=n.concat(r)}return n}function qE(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const s=e.getLineContent(i),a=s.match(t.foldingRules.markers.start);if(a){const o={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:s.length+1};if(o.endColumn>o.startColumn){const u={range:o,...gp(s.substring(a[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function HE(e){const t=[],n=e.getLineCount();for(let r=1;r<=n;r++){const i=e.getLineContent(r);GE(i,r,t)}return t}function GE(e,t,n){mp.lastIndex=0;const r=mp.exec(e);if(r){const i=r.indices[1][0]+1,s=r.indices[1][1]+1,a={startLineNumber:t,startColumn:i,endLineNumber:t,endColumn:s};if(a.endColumn>a.startColumn){const o={range:a,...gp(r[1]),shouldBeInComments:!0};(o.text||o.hasSeparatorLine)&&n.push(o)}}}function gp(e){e=e.trim();const t=e.startsWith("-");return e=e.replace($E,""),{text:e,hasSeparatorLine:t}}var Dp;(function(e){async function t(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}e.withAsyncBody=n})(Dp||(Dp={})),ft=class{static fromArray(t){return new ft(n=>{n.emitMany(t)})}static fromPromise(t){return new ft(async n=>{n.emitMany(await t)})}static fromPromises(t){return new ft(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new ft(async n=>{await Promise.all(t.map(async r=>{for await(const i of r)n.emitOne(i)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new jt,queueMicrotask(async()=>{const r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new ft(async r=>{for await(const i of t)r.emitOne(n(i))})}map(t){return ft.map(this,t)}static filter(t,n){return new ft(async r=>{for await(const i of t)n(i)&&r.emitOne(i)})}filter(t){return ft.filter(this,t)}static coalesce(t){return ft.filter(t,n=>!!n)}coalesce(){return ft.coalesce(this)}static async toPromise(t){const n=[];for await(const r of t)n.push(r);return n}toPromise(){return ft.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}},ft.EMPTY=ft.fromArray([]);var WE=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Jr(e);const n=this.values,r=this.prefixSum,i=t.length;return i===0?!1:(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Jr(e),t=Jr(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;const i=n.length-e;return t>=i&&(t=i),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Jr(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,s=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],s=i-this.values[r],e=i)t=r+1;else break;return new YE(r,e-s)}},YE=class{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}},zE=class{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new je(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;re.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new XE(yn.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},XE=class extends zE{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{const i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e}},QE=(Mr=class{constructor(){this._workerTextModelSyncServer=new JE}dispose(){}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){const i=this._getModel(t);return i?nE.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){const r=this._getModel(t);return r?jE(r,n):[]}async $computeDiff(t,n,r,i){const s=this._getModel(t),a=this._getModel(n);return!s||!a?null:Ks.computeDiff(s,a,r,i)}static computeDiff(t,n,r,i){const s=i==="advanced"?fp.getDefault():fp.getLegacy(),a=t.getLinesContent(),o=n.getLinesContent(),u=s.computeDiff(a,o,r),l=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function c(d){return d.map(m=>[m.original.startLineNumber,m.original.endLineNumberExclusive,m.modified.startLineNumber,m.modified.endLineNumberExclusive,m.innerChanges?.map(p=>[p.originalRange.startLineNumber,p.originalRange.startColumn,p.originalRange.endLineNumber,p.originalRange.endColumn,p.modifiedRange.startLineNumber,p.modifiedRange.startColumn,p.modifiedRange.endLineNumber,p.modifiedRange.endColumn])])}return{identical:l,quitEarly:u.hitTimeout,changes:c(u.changes),moves:u.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,c(d.changes)])}}static _modelsAreIdentical(t,n){const r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=t.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}async $computeMoreMinimalEdits(t,n,r){const i=this._getModel(t);if(!i)return n;const s=[];let a;n=n.slice(0).sort((u,l)=>{if(u.range&&l.range)return _e.compareRangesUsingStarts(u.range,l.range);const c=u.range?0:1,d=l.range?0:1;return c-d});let o=0;for(let u=1;uKs._diffLimit){s.push({range:u,text:l});continue}const m=yy(d,l,r),p=i.offsetAt(_e.lift(u).getStartPosition());for(const g of m){const E=i.positionAt(p+g.originalStart),A=i.positionAt(p+g.originalStart+g.originalLength),T={text:l.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:E.lineNumber,startColumn:E.column,endLineNumber:A.lineNumber,endColumn:A.column}};i.getValueInRange(T.range)!==T.text&&s.push(T)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(t){const n=this._getModel(t);return n?Cy(n):null}async $computeDefaultDocumentColors(t){const n=this._getModel(t);return n?UE(n):null}async $textualSuggest(t,n,r,i){const s=new ld,a=new RegExp(r,i),o=new Set;e:for(const u of t){const l=this._getModel(u);if(l){for(const c of l.words(a))if(!(c===n||!isNaN(Number(c)))&&(o.add(c),o.size>Ks._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}}async $computeWordRanges(t,n,r,i){const s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let u=n.startLineNumber;uthis._host.$fhr(a,o)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(Bh(this._foreignModule))):new Promise((a,o)=>{const u=l=>{this._foreignModule=l.create(s,t),a(Bh(this._foreignModule))};import(`${Nd.asBrowserUri(`${e}.js`).toString(!0)}`).then(u).catch(o)})}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}};typeof importScripts=="function"&&(globalThis.monaco=Uy());var vu=!1;function vp(e){if(vu)return;vu=!0;const t=new Dy(n=>{globalThis.postMessage(n)},n=>new Ks($y.getChannel(n),e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{vu||vp(null)};function Te(e,t){if(!!!e)throw new Error(t)}function On(e){return typeof e=="object"&&e!==null}function Rt(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var ZE=/\r\n|[\n\r]/g;function yu(e,t){let n=0,r=1;for(const i of e.body.matchAll(ZE)){if(typeof i.index=="number"||Rt(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function KE(e){return yp(e.source,yu(e.source,e.start))}function yp(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,o=t.line===1?n:0,u=t.column+o,l=`${e.name}:${a}:${u} -`,c=r.split(/\r\n|[\n\r]/g),d=c[i];if(d.length>120){const m=Math.floor(u/80),p=u%80,g=[];for(let E=0;E["|",E]),["|","^".padStart(p)],["|",g[m+1]]])}return l+Ep([[`${a-1} |`,c[i-1]],[`${a} |`,d],["|","^".padStart(u)],[`${a+1} |`,c[i+1]]])}function Ep(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` -`)}function eb(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var z=class _m extends Error{constructor(t,...n){var r,i,s;const{nodes:a,source:o,positions:u,path:l,originalError:c,extensions:d}=eb(n);super(t),this.name="GraphQLError",this.path=l??void 0,this.originalError=c??void 0,this.nodes=bp(Array.isArray(a)?a:a?[a]:void 0);const m=bp((r=this.nodes)===null||r===void 0?void 0:r.map(g=>g.loc).filter(g=>g!=null));this.source=o??(m==null||(i=m[0])===null||i===void 0?void 0:i.source),this.positions=u??m?.map(g=>g.start),this.locations=u&&o?u.map(g=>yu(o,g)):m?.map(g=>yu(g.source,g.start));const p=On(c?.extensions)?c?.extensions:void 0;this.extensions=(s=d??p)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,_m):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=` - -`+KE(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=` - -`+yp(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function bp(e){return e===void 0||e.length===0?void 0:e}function st(e,t,n){return new z(`Syntax Error: ${n}`,{source:e,positions:[t]})}var tb=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},_p=class{constructor(e,t,n,r,i,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Eu={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},nb=new Set(Object.keys(Eu));function bu(e){const t=e?.kind;return typeof t=="string"&&nb.has(t)}var _t;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(_t||(_t={}));var se;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(se||(se={}));var b;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(b||(b={}));function _u(e){return e===9||e===32}function Pi(e){return e>=48&&e<=57}function Np(e){return e>=97&&e<=122||e>=65&&e<=90}function Nu(e){return Np(e)||e===95}function Tp(e){return Np(e)||Pi(e)||e===95}function rb(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;ao===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function ib(e){let t=0;for(;t1&&r.slice(1).every(p=>p.length===0||_u(p.charCodeAt(0))),a=n.endsWith('\\"""'),o=e.endsWith('"')&&!a,u=e.endsWith("\\"),l=o||u,c=!i||e.length>70||l||s||a;let d="";const m=i&&_u(e.charCodeAt(0));return(c&&!m||s)&&(d+=` -`),d+=n,(c||l)&&(d+=` -`),'"""'+d+'"""'}var H;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(H||(H={}));var ab=class{constructor(e){const t=new _p(H.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==H.EOF)do if(e.next)e=e.next;else{const t=ub(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===H.COMMENT);return e}};function ob(e){return e===H.BANG||e===H.DOLLAR||e===H.AMP||e===H.PAREN_L||e===H.PAREN_R||e===H.DOT||e===H.SPREAD||e===H.COLON||e===H.EQUALS||e===H.AT||e===H.BRACKET_L||e===H.BRACKET_R||e===H.BRACE_L||e===H.PIPE||e===H.BRACE_R}function ei(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ea(e,t){return Sp(e.charCodeAt(t))&&Cp(e.charCodeAt(t+1))}function Sp(e){return e>=55296&&e<=56319}function Cp(e){return e>=56320&&e<=57343}function Er(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return H.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function et(e,t,n,r,i){const s=e.line,a=1+n-e.lineStart;return new _p(t,n,r,s,a,i)}function ub(e,t){const n=e.source.body,r=n.length;let i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function pb(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw st(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function mb(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,a=s,o="";const u=[];for(;sFp?"["+_b(e)+"]":"{ "+n.map(([i,s])=>i+": "+ta(s,t)).join(", ")+" }"}function bb(e,t){if(e.length===0)return"[]";if(t.length>Fp)return"[Array]";const n=Math.min(Db,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function _b(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Nb=globalThis.process&&!0,tn=Nb?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){const a=ee(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm. - -Ensure that there is only one instance of "graphql" in the node_modules -directory. If different versions of "graphql" are the dependencies of other -relied on modules, use "resolutions" to ensure only one version is installed. - -https://yarnpkg.com/en/docs/selective-version-resolutions - -Duplicate "graphql" modules cannot be used at the same time since different -versions may have different capabilities and behavior. The data from one -version used in the function from another could produce confusing and -spurious results.`)}}return!1},wp=class{constructor(e,t="GraphQL request",n={line:1,column:1}){typeof e=="string"||Te(!1,`Body must be a string. Received: ${ee(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Te(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Te(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Tb(e){return tn(e,wp)}function na(e,t){const n=new Lp(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}function Sb(e,t){const n=new Lp(e,t);n.expectToken(H.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(H.EOF),r}var Lp=class{constructor(e,t={}){const{lexer:n,...r}=t;if(n)this._lexer=n;else{const i=Tb(e)?e:new wp(e);this._lexer=new ab(i)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(H.NAME);return this.node(e,{kind:b.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:b.DOCUMENT,definitions:this.many(H.SOF,this.parseDefinition,H.EOF)})}parseDefinition(){if(this.peek(H.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===H.BRACE_L)throw st(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===H.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw st(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(t.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(H.BRACE_L))return this.node(e,{kind:b.OPERATION_DEFINITION,operation:_t.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseDescription(),n=this.parseOperationType();let r;return this.peek(H.NAME)&&(r=this.parseName()),this.node(e,{kind:b.OPERATION_DEFINITION,operation:n,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(H.NAME);switch(e.value){case"query":return _t.QUERY;case"mutation":return _t.MUTATION;case"subscription":return _t.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(H.PAREN_L,this.parseVariableDefinition,H.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:b.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(H.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(H.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(H.DOLLAR),this.node(e,{kind:b.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:b.SELECTION_SET,selections:this.many(H.BRACE_L,this.parseSelection,H.BRACE_R)})}parseSelection(){return this.peek(H.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(H.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:b.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(H.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(H.PAREN_L,t,H.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(H.COLON),this.node(t,{kind:b.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(H.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(H.NAME)?this.node(e,{kind:b.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:b.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:b.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:b.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case H.BRACKET_L:return this.parseList(e);case H.BRACE_L:return this.parseObject(e);case H.INT:return this.advanceLexer(),this.node(t,{kind:b.INT,value:t.value});case H.FLOAT:return this.advanceLexer(),this.node(t,{kind:b.FLOAT,value:t.value});case H.STRING:case H.BLOCK_STRING:return this.parseStringLiteral();case H.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:b.BOOLEAN,value:!0});case"false":return this.node(t,{kind:b.BOOLEAN,value:!1});case"null":return this.node(t,{kind:b.NULL});default:return this.node(t,{kind:b.ENUM,value:t.value})}case H.DOLLAR:if(e)if(this.expectToken(H.DOLLAR),this._lexer.token.kind===H.NAME){const n=this._lexer.token.value;throw st(this._lexer.source,t.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:b.STRING,value:e.value,block:e.kind===H.BLOCK_STRING})}parseList(e){const t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:b.LIST,values:this.any(H.BRACKET_L,t,H.BRACKET_R)})}parseObject(e){const t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:b.OBJECT,fields:this.any(H.BRACE_L,t,H.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(H.COLON),this.node(t,{kind:b.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(H.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(H.AT),this.node(t,{kind:b.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(H.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(H.BRACKET_R),t=this.node(e,{kind:b.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(H.BANG)?this.node(e,{kind:b.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:b.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(H.STRING)||this.peek(H.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(H.BRACE_L,this.parseOperationTypeDefinition,H.BRACE_R);return this.node(e,{kind:b.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(H.COLON);const n=this.parseNamedType();return this.node(e,{kind:b.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:b.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:b.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(H.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(H.BRACE_L,this.parseFieldDefinition,H.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(H.COLON);const i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:b.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(H.PAREN_L,this.parseInputValueDef,H.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(H.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(H.EQUALS)&&(i=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(e,{kind:b.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:b.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:b.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(H.EQUALS)?this.delimitedMany(H.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:b.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(H.BRACE_L,this.parseEnumValueDefinition,H.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:b.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw st(this._lexer.source,this._lexer.token.start,`${ra(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:b.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(H.BRACE_L,this.parseInputValueDef,H.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===H.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(H.BRACE_L,this.parseOperationTypeDefinition,H.BRACE_R);if(t.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:b.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:b.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:b.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:b.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:b.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:b.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:b.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(H.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(e,{kind:b.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(H.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(se,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){const e=this._lexer.token,t=this.expectOptionalToken(H.AT),n=this.parseName();let r;!t&&this.expectOptionalToken(H.DOT)&&(r=this.parseName());let i;return(t||r)&&this.expectOptionalToken(H.PAREN_L)&&(i=this.parseName(),this.expectToken(H.COLON),this.expectToken(H.PAREN_R)),t?i?this.node(e,{kind:b.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:i}):this.node(e,{kind:b.DIRECTIVE_COORDINATE,name:n}):r?i?this.node(e,{kind:b.ARGUMENT_COORDINATE,name:n,fieldName:r,argumentName:i}):this.node(e,{kind:b.MEMBER_COORDINATE,name:n,memberName:r}):this.node(e,{kind:b.TYPE_COORDINATE,name:n})}node(e,t){return this._options.noLocation!==!0&&(t.loc=new tb(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw st(this._lexer.source,t.start,`Expected ${Ip(e)}, found ${ra(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const t=this._lexer.token;if(t.kind===H.NAME&&t.value===e)this.advanceLexer();else throw st(this._lexer.source,t.start,`Expected "${e}", found ${ra(t)}.`)}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===H.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const t=e??this._lexer.token;return st(this._lexer.source,t.start,`Unexpected ${ra(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(e,t,n){this.expectToken(e);const r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==H.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw st(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function ra(e){const t=e.value;return Ip(e.kind)+(t!=null?` "${t}"`:"")}function Ip(e){return ob(e)?`"${e}"`:e}var Cb=5;function nr(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const s=r.map(u=>`"${u}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}const a=s.slice(0,Cb),o=a.pop();return i+a.join(", ")+", or "+o+"?"}function Rp(e){return e}function br(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function _r(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function En(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function Su(e,t){let n=0,r=0;for(;n0);let o=0;do++r,o=o*10+s-Cu,s=t.charCodeAt(r);while(ia(s)&&o>0);if(ao)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}var Cu=48,Ab=57;function ia(e){return!isNaN(e)&&Cu<=e&&e<=Ab}function Nr(e,t){const n=Object.create(null),r=new Fb(e),i=Math.floor(e.length*.4)+1;for(const s of t){const a=r.measure(s,i);a!==void 0&&(n[s]=a)}return Object.keys(n).sort((s,a)=>{const o=n[s]-n[a];return o!==0?o:Su(s,a)})}var Fb=class{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=xp(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;const n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let r=xp(n),i=this._inputArray;if(r.lengtht)return;const o=this._rows;for(let l=0;l<=a;l++)o[0][l]=l;for(let l=1;l<=s;l++){const c=o[(l-1)%3],d=o[l%3];let m=d[0]=l;for(let p=1;p<=a;p++){const g=r[l-1]===i[p-1]?0:1;let E=Math.min(c[p]+1,d[p-1]+1,c[p-1]+g);if(l>1&&p>1&&r[l-1]===i[p-2]&&r[l-2]===i[p-1]){const A=o[(l-2)%3][p-2];E=Math.min(E,A+1)}Et)return}const u=o[s%3][a];return u<=t?u:void 0}};function xp(e){const t=e.length,n=new Array(t);for(let r=0;re.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>oe(e.definitions,` - -`)},OperationDefinition:{leave(e){const t=Au(e.variableDefinitions)?me(`( -`,oe(e.variableDefinitions,` -`),` -)`):me("(",oe(e.variableDefinitions,", "),")"),n=me("",e.description,` -`)+oe([e.operation,oe([e.name,t]),oe(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>me("",i,` -`)+e+": "+t+me(" = ",n)+me(" ",oe(r," "))},SelectionSet:{leave:({selections:e})=>nn(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=me("",e,": ")+t;let a=s+me("(",oe(n,", "),")");return a.length>xb&&(a=s+me(`( -`,aa(oe(n,` -`)),` -)`)),oe([a,oe(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+me(" ",oe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>oe(["...",me("on ",e),oe(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:s})=>me("",s,` -`)+`fragment ${e}${me("(",oe(n,", "),")")} on ${t} ${me("",oe(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?sb(e):wb(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+oe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+oe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+me("(",oe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>me("",e,` -`)+oe(["schema",oe(t," "),nn(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>me("",e,` -`)+oe(["scalar",t,oe(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>me("",e,` -`)+oe(["type",t,me("implements ",oe(n," & ")),oe(r," "),nn(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>me("",e,` -`)+t+(Au(n)?me(`( -`,aa(oe(n,` -`)),` -)`):me("(",oe(n,", "),")"))+": "+r+me(" ",oe(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>me("",e,` -`)+oe([t+": "+n,me("= ",r),oe(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>me("",e,` -`)+oe(["interface",t,me("implements ",oe(n," & ")),oe(r," "),nn(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>me("",e,` -`)+oe(["union",t,oe(n," "),me("= ",oe(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>me("",e,` -`)+oe(["enum",t,oe(n," "),nn(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>me("",e,` -`)+oe([t,oe(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>me("",e,` -`)+oe(["input",t,oe(n," "),nn(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>me("",e,` -`)+"directive @"+t+(Au(n)?me(`( -`,aa(oe(n,` -`)),` -)`):me("(",oe(n,", "),")"))+(r?" repeatable":"")+" on "+oe(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>oe(["extend schema",oe(e," "),nn(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>oe(["extend scalar",e,oe(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>oe(["extend type",e,me("implements ",oe(t," & ")),oe(n," "),nn(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>oe(["extend interface",e,me("implements ",oe(t," & ")),oe(n," "),nn(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>oe(["extend union",e,oe(t," "),me("= ",oe(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>oe(["extend enum",e,oe(t," "),nn(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>oe(["extend input",e,oe(t," "),nn(n)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>oe([e,me(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>oe([e,me(".",t),me("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>oe(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>oe(["@",e,me("(",t,":)")])}};function oe(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function nn(e){return me(`{ -`,aa(oe(e,` -`)),` -}`)}function me(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function aa(e){return me(" ",e.replace(/\n/g,` - `))}function Au(e){var t;return(t=e?.some(n=>n.includes(` -`)))!==null&&t!==void 0?t:!1}function Fu(e,t){switch(e.kind){case b.NULL:return null;case b.INT:return parseInt(e.value,10);case b.FLOAT:return parseFloat(e.value);case b.STRING:case b.ENUM:case b.BOOLEAN:return e.value;case b.LIST:return e.values.map(n=>Fu(n,t));case b.OBJECT:return _r(e.fields,n=>n.name.value,n=>Fu(n.value,t));case b.VARIABLE:return t?.[e.name.value]}}function rn(e){if(e!=null||Te(!1,"Must provide name."),typeof e=="string"||Te(!1,"Expected name to be a string."),e.length===0)throw new z("Expected name to be a non-empty string.");for(let t=1;ts(Fu(a,o)),this.extensions=qt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(i=e.extensionASTNodes)!==null&&i!==void 0?i:[],e.specifiedByURL==null||typeof e.specifiedByURL=="string"||Te(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${ee(e.specifiedByURL)}.`),e.serialize==null||typeof e.serialize=="function"||Te(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&(typeof e.parseValue=="function"&&typeof e.parseLiteral=="function"||Te(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},Gt=class{constructor(e){var t;this.name=rn(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=qt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=()=>Bp(e),this._interfaces=()=>Pp(e),e.isTypeOf==null||typeof e.isTypeOf=="function"||Te(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${ee(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Up(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function Pp(e){var t;const n=Op((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||Te(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Bp(e){const t=Mp(e.fields);return ri(t)||Te(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),En(t,(n,r)=>{var i;ri(n)||Te(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||Te(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${ee(n.resolve)}.`);const s=(i=n.args)!==null&&i!==void 0?i:{};return ri(s)||Te(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:rn(r),description:n.description,type:n.type,args:Vp(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:qt(n.extensions),astNode:n.astNode}})}function Vp(e){return Object.entries(e).map(([t,n])=>({name:rn(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:qt(n.extensions),astNode:n.astNode}))}function ri(e){return On(e)&&!Array.isArray(e)}function Up(e){return En(e,t=>({description:t.description,type:t.type,args:$p(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function $p(e){return _r(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Vi(e){return Ce(e.type)&&e.defaultValue===void 0}var ir=class{constructor(e){var t;this.name=rn(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=qt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._fields=Bp.bind(void 0,e),this._interfaces=Pp.bind(void 0,e),e.resolveType==null||typeof e.resolveType=="function"||Te(!1,`${this.name} must provide "resolveType" as a function, but got: ${ee(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Up(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},oa=class{constructor(e){var t;this.name=rn(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=qt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._types=$b.bind(void 0,e),e.resolveType==null||typeof e.resolveType=="function"||Te(!1,`${this.name} must provide "resolveType" as a function, but got: ${ee(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function $b(e){const t=Op(e.types);return Array.isArray(t)||Te(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var sr=class{constructor(e){var t;this.name=rn(e.name),this.description=e.description,this.extensions=qt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._values=typeof e.values=="function"?e.values:jp(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=jp(this.name,this._values())),this._values}getValue(e){return this._nameLookup===null&&(this._nameLookup=br(this.getValues(),t=>t.name)),this._nameLookup[e]}serialize(e){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(n=>[n.value,n])));const t=this._valueLookup.get(e);if(t===void 0)throw new z(`Enum "${this.name}" cannot represent value: ${ee(e)}`);return t.name}parseValue(e){if(typeof e!="string"){const n=ee(e);throw new z(`Enum "${this.name}" cannot represent non-string value: ${n}.`+ua(this,n))}const t=this.getValue(e);if(t==null)throw new z(`Value "${e}" does not exist in "${this.name}" enum.`+ua(this,e));return t.value}parseLiteral(e,t){if(e.kind!==b.ENUM){const r=at(e);throw new z(`Enum "${this.name}" cannot represent non-enum value: ${r}.`+ua(this,r),{nodes:e})}const n=this.getValue(e.value);if(n==null){const r=at(e);throw new z(`Value "${r}" does not exist in "${this.name}" enum.`+ua(this,r),{nodes:e})}return n.value}toConfig(){const e=_r(this.getValues(),t=>t.name,t=>({description:t.description,value:t.value,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function ua(e,t){const n=e.getValues().map(i=>i.name),r=Nr(t,n);return nr("the enum value",r)}function jp(e,t){return ri(t)||Te(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(ri(r)||Te(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${ee(r)}.`),{name:Ob(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:qt(r.extensions),astNode:r.astNode}))}var Ui=class{constructor(e){var t,n;this.name=rn(e.name),this.description=e.description,this.extensions=qt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this.isOneOf=(n=e.isOneOf)!==null&&n!==void 0?n:!1,this._fields=jb.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const e=En(this.getFields(),t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};function jb(e){const t=Mp(e.fields);return ri(t)||Te(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),En(t,(n,r)=>(!("resolve"in n)||Te(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:rn(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:qt(n.extensions),astNode:n.astNode}))}function qp(e){return Ce(e.type)&&e.defaultValue===void 0}function xu(e,t){return e===t?!0:Ce(e)&&Ce(t)||tt(e)&&tt(t)?xu(e.ofType,t.ofType):!1}function ii(e,t,n){return t===n?!0:Ce(n)?Ce(t)?ii(e,t.ofType,n.ofType):!1:Ce(t)?ii(e,t.ofType,n):tt(n)?tt(t)?ii(e,t.ofType,n.ofType):!1:tt(t)?!1:bn(n)&&(Oe(t)||Ie(t))&&e.isSubType(n,t)}function ku(e,t,n){return t===n?!0:bn(t)?bn(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):bn(n)?e.isSubType(n,t):!1}var Ou=2147483647,Mu=-2147483648,qb=new Mn({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=$i(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new z(`Int cannot represent non-integer value: ${ee(t)}`);if(n>Ou||nOu||eOu||te.name===t)}function $i(e){if(On(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!On(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function Wp(e){return tn(e,Pn)}var Pn=class{constructor(e){var t,n;this.name=rn(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=(t=e.isRepeatable)!==null&&t!==void 0?t:!1,this.extensions=qt(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||Te(!1,`@${e.name} locations must be an Array.`);const r=(n=e.args)!==null&&n!==void 0?n:{};On(r)&&!Array.isArray(r)||Te(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=Vp(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:$p(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}},Yp=new Pn({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[se.FIELD,se.FRAGMENT_SPREAD,se.INLINE_FRAGMENT],args:{if:{type:new ye(ct),description:"Included when true."}}}),zp=new Pn({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[se.FIELD,se.FRAGMENT_SPREAD,se.INLINE_FRAGMENT],args:{if:{type:new ye(ct),description:"Skipped when true."}}}),Gb="No longer supported",Pu=new Pn({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[se.FIELD_DEFINITION,se.ARGUMENT_DEFINITION,se.INPUT_FIELD_DEFINITION,se.ENUM_VALUE],args:{reason:{type:We,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Gb}}}),Jp=new Pn({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[se.SCALAR],args:{url:{type:new ye(We),description:"The URL that specifies the behavior of this scalar."}}}),Xp=new Pn({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[se.INPUT_OBJECT],args:{}}),si=Object.freeze([Yp,zp,Pu,Jp,Xp]);function Wb(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function ji(e,t){if(Ce(t)){const n=ji(e,t.ofType);return n?.kind===b.NULL?null:n}if(e===null)return{kind:b.NULL};if(e===void 0)return null;if(tt(t)){const n=t.ofType;if(Wb(e)){const r=[];for(const i of e){const s=ji(i,n);s!=null&&r.push(s)}return{kind:b.LIST,values:r}}return ji(e,n)}if(qe(t)){if(!On(e))return null;const n=[];for(const r of Object.values(t.getFields())){const i=ji(e[r.name],r.type);i&&n.push({kind:b.OBJECT_FIELD,name:{kind:b.NAME,value:r.name},value:i})}return{kind:b.OBJECT,fields:n}}if(ni(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:b.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return Qp.test(r)?{kind:b.INT,value:r}:{kind:b.FLOAT,value:r}}if(typeof n=="string")return Nt(t)?{kind:b.ENUM,value:n}:t===Gp&&Qp.test(n)?{kind:b.INT,value:n}:{kind:b.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${ee(n)}.`)}Rt(!1,"Unexpected input type: "+ee(t))}var Qp=/^-?(?:0|[1-9][0-9]*)$/,Bu=new Gt({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:We,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ye(new dt(new ye(sn))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ye(sn),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:sn,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:sn,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ye(new dt(new ye(Zp))),resolve:e=>e.getDirectives()}})}),Zp=new Gt({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. - -In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new ye(We),resolve:e=>e.name},description:{type:We,resolve:e=>e.description},isRepeatable:{type:new ye(ct),resolve:e=>e.isRepeatable},locations:{type:new ye(new dt(new ye(Kp))),resolve:e=>e.locations},args:{type:new ye(new dt(new ye(ca))),args:{includeDeprecated:{type:ct,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),Kp=new sr({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:se.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:se.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:se.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:se.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:se.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:se.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:se.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:se.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:se.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:se.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:se.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:se.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:se.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:se.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:se.UNION,description:"Location adjacent to a union definition."},ENUM:{value:se.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:se.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:se.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:se.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),sn=new Gt({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new ye(n1),resolve(e){if(Ht(e))return Re.SCALAR;if(Ie(e))return Re.OBJECT;if(Oe(e))return Re.INTERFACE;if(Pt(e))return Re.UNION;if(Nt(e))return Re.ENUM;if(qe(e))return Re.INPUT_OBJECT;if(tt(e))return Re.LIST;if(Ce(e))return Re.NON_NULL;Rt(!1,`Unexpected type: "${ee(e)}".`)}},name:{type:We,resolve:e=>"name"in e?e.name:void 0},description:{type:We,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:We,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new dt(new ye(e1)),args:{includeDeprecated:{type:ct,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Ie(e)||Oe(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new dt(new ye(sn)),resolve(e){if(Ie(e)||Oe(e))return e.getInterfaces()}},possibleTypes:{type:new dt(new ye(sn)),resolve(e,t,n,{schema:r}){if(bn(e))return r.getPossibleTypes(e)}},enumValues:{type:new dt(new ye(t1)),args:{includeDeprecated:{type:ct,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Nt(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new dt(new ye(ca)),args:{includeDeprecated:{type:ct,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(qe(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:sn,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:ct,resolve:e=>{if(qe(e))return e.isOneOf}}})}),e1=new Gt({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new ye(We),resolve:e=>e.name},description:{type:We,resolve:e=>e.description},args:{type:new ye(new dt(new ye(ca))),args:{includeDeprecated:{type:ct,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ye(sn),resolve:e=>e.type},isDeprecated:{type:new ye(ct),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:We,resolve:e=>e.deprecationReason}})}),ca=new Gt({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new ye(We),resolve:e=>e.name},description:{type:We,resolve:e=>e.description},type:{type:new ye(sn),resolve:e=>e.type},defaultValue:{type:We,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=ji(n,t);return r?at(r):null}},isDeprecated:{type:new ye(ct),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:We,resolve:e=>e.deprecationReason}})}),t1=new Gt({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new ye(We),resolve:e=>e.name},description:{type:We,resolve:e=>e.description},isDeprecated:{type:new ye(ct),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:We,resolve:e=>e.deprecationReason}})}),Re;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(Re||(Re={}));var n1=new sr({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Re.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Re.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Re.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Re.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Re.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Re.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Re.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Re.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),qi={name:"__schema",type:new ye(Bu),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Hi={name:"__type",type:sn,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ye(We),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Gi={name:"__typename",type:new ye(We),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},fa=Object.freeze([Bu,Zp,Kp,sn,e1,ca,t1,n1]);function r1(e){return fa.some(({name:t})=>e.name===t)}function Yb(e){return tn(e,Vu)}function zb(e){if(!Yb(e))throw new Error(`Expected ${ee(e)} to be a GraphQL schema.`);return e}var Vu=class{constructor(e){var t,n;this.__validationErrors=e.assumeValid===!0?[]:void 0,On(e)||Te(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||Te(!1,`"types" must be Array if provided but got: ${ee(e.types)}.`),!e.directives||Array.isArray(e.directives)||Te(!1,`"directives" must be Array if provided but got: ${ee(e.directives)}.`),this.description=e.description,this.extensions=qt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=(t=e.extensionASTNodes)!==null&&t!==void 0?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=(n=e.directives)!==null&&n!==void 0?n:si;const r=new Set(e.types);if(e.types!=null)for(const i of e.types)r.delete(i),an(i,r);this._queryType!=null&&an(this._queryType,r),this._mutationType!=null&&an(this._mutationType,r),this._subscriptionType!=null&&an(this._subscriptionType,r);for(const i of this._directives)if(Wp(i))for(const s of i.args)an(s.type,r);an(Bu,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const i of r){if(i==null)continue;const s=i.name;if(s||Te(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[s]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${s}".`);if(this._typeMap[s]=i,Oe(i)){for(const a of i.getInterfaces())if(Oe(a)){let o=this._implementationsMap[a.name];o===void 0&&(o=this._implementationsMap[a.name]={objects:[],interfaces:[]}),o.interfaces.push(i)}}else if(Ie(i)){for(const a of i.getInterfaces())if(Oe(a)){let o=this._implementationsMap[a.name];o===void 0&&(o=this._implementationsMap[a.name]={objects:[],interfaces:[]}),o.objects.push(i)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case _t.QUERY:return this.getQueryType();case _t.MUTATION:return this.getMutationType();case _t.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return Pt(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const t=this._implementationsMap[e.name];return t??{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap[e.name];if(n===void 0){if(n=Object.create(null),Pt(e))for(const r of e.getTypes())n[r.name]=!0;else{const r=this.getImplementations(e);for(const i of r.objects)n[i.name]=!0;for(const i of r.interfaces)n[i.name]=!0}this._subTypeMap[e.name]=n}return n[t.name]!==void 0}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(t=>t.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}};function an(e,t){const n=Ge(e);if(!t.has(n)){if(t.add(n),Pt(n))for(const r of n.getTypes())an(r,t);else if(Ie(n)||Oe(n)){for(const r of n.getInterfaces())an(r,t);for(const r of Object.values(n.getFields())){an(r.type,t);for(const i of r.args)an(i.type,t)}}else if(qe(n))for(const r of Object.values(n.getFields()))an(r.type,t)}return t}function Jb(e){if(zb(e),e.__validationErrors)return e.__validationErrors;const t=new Qb(e);Zb(t),Kb(t),e_(t);const n=t.getErrors();return e.__validationErrors=n,n}function Xb(e){const t=Jb(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` - -`))}var Qb=class{constructor(e){this._errors=[],this.schema=e}reportError(e,t){const n=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new z(e,{nodes:n}))}getErrors(){return this._errors}};function Zb(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!Ie(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${ee(n)}.`,(r=Uu(t,_t.QUERY))!==null&&r!==void 0?r:n.astNode)}const i=t.getMutationType();if(i&&!Ie(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${ee(i)}.`,(s=Uu(t,_t.MUTATION))!==null&&s!==void 0?s:i.astNode)}const a=t.getSubscriptionType();if(a&&!Ie(a)){var o;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${ee(a)}.`,(o=Uu(t,_t.SUBSCRIPTION))!==null&&o!==void 0?o:a.astNode)}}function Uu(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r?.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function Kb(e){for(const n of e.schema.getDirectives()){if(!Wp(n)){e.reportError(`Expected directive but got: ${ee(n)}.`,n?.astNode);continue}Sr(e,n),n.locations.length===0&&e.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(const r of n.args)if(Sr(e,r),Bt(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${ee(r.type)}.`,r.astNode),Vi(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[$u(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Sr(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function e_(e){const t=o_(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!Ub(r)){e.reportError(`Expected GraphQL named type but got: ${ee(r)}.`,r.astNode);continue}r1(r)||Sr(e,r),Ie(r)||Oe(r)?(i1(e,r),s1(e,r)):Pt(r)?r_(e,r):Nt(r)?i_(e,r):qe(r)&&(s_(e,r),t(r))}}function i1(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const a of n){if(Sr(e,a),!Tr(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Output Type but got: ${ee(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}for(const o of a.args){const u=o.name;if(Sr(e,o),!Bt(o.type)){var i;e.reportError(`The type of ${t.name}.${a.name}(${u}:) must be Input Type but got: ${ee(o.type)}.`,(i=o.astNode)===null||i===void 0?void 0:i.type)}if(Vi(o)&&o.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${a.name}(${u}:) cannot be deprecated.`,[$u(o.astNode),(s=o.astNode)===null||s===void 0?void 0:s.type])}}}}function s1(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!Oe(r)){e.reportError(`Type ${ee(t)} must only implement Interface types, it cannot implement ${ee(r)}.`,Wi(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Wi(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,Wi(t,r));continue}n[r.name]=!0,n_(e,t,r),t_(e,t,r)}}function t_(e,t,n){const r=t.getFields();for(const u of Object.values(n.getFields())){const l=u.name,c=r[l];if(!c){e.reportError(`Interface field ${n.name}.${l} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!ii(e.schema,c.type,u.type)){var i,s;e.reportError(`Interface field ${n.name}.${l} expects type ${ee(u.type)} but ${t.name}.${l} is type ${ee(c.type)}.`,[(i=u.astNode)===null||i===void 0?void 0:i.type,(s=c.astNode)===null||s===void 0?void 0:s.type])}for(const d of u.args){const m=d.name,p=c.args.find(g=>g.name===m);if(!p){e.reportError(`Interface field argument ${n.name}.${l}(${m}:) expected but ${t.name}.${l} does not provide it.`,[d.astNode,c.astNode]);continue}if(!xu(d.type,p.type)){var a,o;e.reportError(`Interface field argument ${n.name}.${l}(${m}:) expects type ${ee(d.type)} but ${t.name}.${l}(${m}:) is type ${ee(p.type)}.`,[(a=d.astNode)===null||a===void 0?void 0:a.type,(o=p.astNode)===null||o===void 0?void 0:o.type])}}for(const d of c.args){const m=d.name;!u.args.find(g=>g.name===m)&&Vi(d)&&e.reportError(`Object field ${t.name}.${l} includes required argument ${m} that is missing from the Interface field ${n.name}.${l}.`,[d.astNode,u.astNode])}}}function n_(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...Wi(n,i),...Wi(t,n)])}function r_(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,a1(t,i.name));continue}r[i.name]=!0,Ie(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${ee(i)}.`,a1(t,String(i)))}}function i_(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)Sr(e,r)}function s_(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of n){if(Sr(e,s),!Bt(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${ee(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(qp(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[$u(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&a_(t,s,e)}}function a_(e,t,n){if(Ce(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function o_(e){const t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;const a=Object.values(s.getFields());for(const o of a)if(Ce(o.type)&&qe(o.type.ofType)){const u=o.type.ofType,l=r[u.name];if(n.push(o),l===void 0)i(u);else{const c=n.slice(l),d=c.map(m=>m.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`,c.map(m=>m.astNode))}n.pop()}r[s.name]=void 0}}function Wi(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var a;return(a=s.interfaces)!==null&&a!==void 0?a:[]}).filter(s=>s.name.value===t.name)}function a1(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var a;return(a=s.types)!==null&&a!==void 0?a:[]}).filter(s=>s.name.value===t)}function $u(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Pu.name)}function Ut(e,t){switch(t.kind){case b.LIST_TYPE:{const n=Ut(e,t.type);return n&&new dt(n)}case b.NON_NULL_TYPE:{const n=Ut(e,t.type);return n&&new ye(n)}case b.NAMED_TYPE:return e.getType(t.name.value)}}var o1=class{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n??u_,t&&(Bt(t)&&this._inputTypeStack.push(t),Vt(t)&&this._parentTypeStack.push(t),Tr(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case b.SELECTION_SET:{const r=Ge(this.getType());this._parentTypeStack.push(Vt(r)?r:void 0);break}case b.FIELD:{const r=this.getParentType();let i,s;r&&(i=this._getFieldDef(t,r,e),i&&(s=i.type)),this._fieldDefStack.push(i),this._typeStack.push(Tr(s)?s:void 0);break}case b.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case b.OPERATION_DEFINITION:{const r=t.getRootType(e.operation);this._typeStack.push(Ie(r)?r:void 0);break}case b.INLINE_FRAGMENT:case b.FRAGMENT_DEFINITION:{const r=e.typeCondition,i=r?Ut(t,r):Ge(this.getType());this._typeStack.push(Tr(i)?i:void 0);break}case b.VARIABLE_DEFINITION:{const r=Ut(t,e.type);this._inputTypeStack.push(Bt(r)?r:void 0);break}case b.ARGUMENT:{var n;let r,i;const s=(n=this.getDirective())!==null&&n!==void 0?n:this.getFieldDef();s&&(r=s.args.find(a=>a.name===e.name.value),r&&(i=r.type)),this._argument=r,this._defaultValueStack.push(r?r.defaultValue:void 0),this._inputTypeStack.push(Bt(i)?i:void 0);break}case b.LIST:{const r=Ru(this.getInputType()),i=tt(r)?r.ofType:r;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Bt(i)?i:void 0);break}case b.OBJECT_FIELD:{const r=Ge(this.getInputType());let i,s;qe(r)&&(s=r.getFields()[e.name.value],s&&(i=s.type)),this._defaultValueStack.push(s?s.defaultValue:void 0),this._inputTypeStack.push(Bt(i)?i:void 0);break}case b.ENUM:{const r=Ge(this.getInputType());let i;Nt(r)&&(i=r.getValue(e.value)),this._enumValue=i;break}}}leave(e){switch(e.kind){case b.SELECTION_SET:this._parentTypeStack.pop();break;case b.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case b.DIRECTIVE:this._directive=null;break;case b.OPERATION_DEFINITION:case b.INLINE_FRAGMENT:case b.FRAGMENT_DEFINITION:this._typeStack.pop();break;case b.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case b.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case b.LIST:case b.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case b.ENUM:this._enumValue=null;break}}};function u_(e,t,n){const r=n.name.value;if(r===qi.name&&e.getQueryType()===t)return qi;if(r===Hi.name&&e.getQueryType()===t)return Hi;if(r===Gi.name&&Vt(t))return Gi;if(Ie(t)||Oe(t))return t.getFields()[r]}function u1(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=sa(t,r.kind).enter;if(i){const s=i.apply(t,n);return s!==void 0&&(e.leave(r),bu(s)&&e.enter(s)),s}},leave(...n){const r=n[0],i=sa(t,r.kind).leave;let s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}function l_(e){return e.kind===b.OPERATION_DEFINITION||e.kind===b.FRAGMENT_DEFINITION}function c_(e){return e.kind===b.SCHEMA_DEFINITION||Yi(e)||e.kind===b.DIRECTIVE_DEFINITION}function Yi(e){return e.kind===b.SCALAR_TYPE_DEFINITION||e.kind===b.OBJECT_TYPE_DEFINITION||e.kind===b.INTERFACE_TYPE_DEFINITION||e.kind===b.UNION_TYPE_DEFINITION||e.kind===b.ENUM_TYPE_DEFINITION||e.kind===b.INPUT_OBJECT_TYPE_DEFINITION}function f_(e){return e.kind===b.SCHEMA_EXTENSION||ju(e)}function ju(e){return e.kind===b.SCALAR_TYPE_EXTENSION||e.kind===b.OBJECT_TYPE_EXTENSION||e.kind===b.INTERFACE_TYPE_EXTENSION||e.kind===b.UNION_TYPE_EXTENSION||e.kind===b.ENUM_TYPE_EXTENSION||e.kind===b.INPUT_OBJECT_TYPE_EXTENSION}function l1(e){return{Document(t){for(const n of t.definitions)if(!l_(n)){const r=n.kind===b.SCHEMA_DEFINITION||n.kind===b.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new z(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function d_(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let a=nr("to use an inline fragment on",h_(i,n,s));a===""&&(a=nr(p_(n,s))),e.reportError(new z(`Cannot query field "${s}" on type "${n.name}".`+a,{nodes:t}))}}}}function h_(e,t,n){if(!bn(t))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(t))if(a.getFields()[n]){r.add(a),i[a.name]=1;for(const o of a.getInterfaces()){var s;o.getFields()[n]&&(r.add(o),i[o.name]=((s=i[o.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((a,o)=>{const u=i[o.name]-i[a.name];return u!==0?u:Oe(a)&&e.isSubType(a,o)?-1:Oe(o)&&e.isSubType(o,a)?1:Su(a.name,o.name)}).map(a=>a.name)}function p_(e,t){if(Ie(e)||Oe(e)){const n=Object.keys(e.getFields());return Nr(t,n)}return[]}function m_(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=Ut(e.getSchema(),n);if(r&&!Vt(r)){const i=at(n);e.reportError(new z(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=Ut(e.getSchema(),t.typeCondition);if(n&&!Vt(n)){const r=at(t.typeCondition);e.reportError(new z(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function g_(e){return{...c1(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,a=r.args.map(u=>u.name),o=Nr(s,a);e.reportError(new z(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+nr(o),{nodes:t}))}}}}function c1(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():si;for(const a of r)t[a.name]=a.args.map(o=>o.name);const i=e.getDocument().definitions;for(const a of i)if(a.kind===b.DIRECTIVE_DEFINITION){var s;const o=(s=a.arguments)!==null&&s!==void 0?s:[];t[a.name.value]=o.map(u=>u.name.value)}return{Directive(a){const o=a.name.value,u=t[o];if(a.arguments&&u)for(const l of a.arguments){const c=l.name.value;if(!u.includes(c)){const d=Nr(c,u);e.reportError(new z(`Unknown argument "${c}" on directive "@${o}".`+nr(d),{nodes:l}))}}return!1}}}function f1(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():si;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===b.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,o,u,l){const c=s.name.value,d=t[c];if(!d){e.reportError(new z(`Unknown directive "@${c}".`,{nodes:s}));return}const m=D_(l);m&&!d.includes(m)&&e.reportError(new z(`Directive "@${c}" may not be used on ${m}.`,{nodes:s}))}}}function D_(e){const t=e[e.length-1];switch("kind"in t||Rt(!1),t.kind){case b.OPERATION_DEFINITION:return v_(t.operation);case b.FIELD:return se.FIELD;case b.FRAGMENT_SPREAD:return se.FRAGMENT_SPREAD;case b.INLINE_FRAGMENT:return se.INLINE_FRAGMENT;case b.FRAGMENT_DEFINITION:return se.FRAGMENT_DEFINITION;case b.VARIABLE_DEFINITION:return se.VARIABLE_DEFINITION;case b.SCHEMA_DEFINITION:case b.SCHEMA_EXTENSION:return se.SCHEMA;case b.SCALAR_TYPE_DEFINITION:case b.SCALAR_TYPE_EXTENSION:return se.SCALAR;case b.OBJECT_TYPE_DEFINITION:case b.OBJECT_TYPE_EXTENSION:return se.OBJECT;case b.FIELD_DEFINITION:return se.FIELD_DEFINITION;case b.INTERFACE_TYPE_DEFINITION:case b.INTERFACE_TYPE_EXTENSION:return se.INTERFACE;case b.UNION_TYPE_DEFINITION:case b.UNION_TYPE_EXTENSION:return se.UNION;case b.ENUM_TYPE_DEFINITION:case b.ENUM_TYPE_EXTENSION:return se.ENUM;case b.ENUM_VALUE_DEFINITION:return se.ENUM_VALUE;case b.INPUT_OBJECT_TYPE_DEFINITION:case b.INPUT_OBJECT_TYPE_EXTENSION:return se.INPUT_OBJECT;case b.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||Rt(!1),n.kind===b.INPUT_OBJECT_TYPE_DEFINITION?se.INPUT_FIELD_DEFINITION:se.ARGUMENT_DEFINITION}default:Rt(!1,"Unexpected kind: "+ee(t.kind))}}function v_(e){switch(e){case _t.QUERY:return se.QUERY;case _t.MUTATION:return se.MUTATION;case _t.SUBSCRIPTION:return se.SUBSCRIPTION}}function y_(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new z(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function d1(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)Yi(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,a,o,u,l){const c=s.name.value;if(!n[c]&&!r[c]){var d;const m=(d=l[2])!==null&&d!==void 0?d:o,p=m!=null&&E_(m);if(p&&h1.includes(c))return;const g=Nr(c,p?h1.concat(i):i);e.reportError(new z(`Unknown type "${c}".`+nr(g),{nodes:s}))}}}}var h1=[...la,...fa].map(e=>e.name);function E_(e){return"kind"in e&&(c_(e)||f_(e))}function b_(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===b.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new z("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function __(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i?.astNode)!==null&&r!==void 0?r:i?.getQueryType())!==null&&n!==void 0?n:i?.getMutationType())!==null&&t!==void 0?t:i?.getSubscriptionType();let a=0;return{SchemaDefinition(o){if(s){e.reportError(new z("Cannot define a new schema within a schema extension.",{nodes:o}));return}a>0&&e.reportError(new z("Must provide only one schema definition.",{nodes:o})),++a}}}var N_=3;function T_(e){function t(n,r=Object.create(null),i=0){if(n.kind===b.FRAGMENT_SPREAD){const s=n.name.value;if(r[s]===!0)return!1;const a=e.getFragment(s);if(!a)return!1;try{return r[s]=!0,t(a,r,i)}finally{r[s]=void 0}}if(n.kind===b.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=N_))return!0;if("selectionSet"in n&&n.selectionSet){for(const s of n.selectionSet.selections)if(t(s,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new z("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function S_(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const a=s.name.value;t[a]=!0;const o=e.getFragmentSpreads(s.selectionSet);if(o.length!==0){r[a]=n.length;for(const u of o){const l=u.name.value,c=r[l];if(n.push(u),c===void 0){const d=e.getFragment(l);d&&i(d)}else{const d=n.slice(c),m=d.slice(0,-1).map(p=>'"'+p.name.value+'"').join(", ");e.reportError(new z(`Cannot spread fragment "${l}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:d}))}n.pop()}r[a]=void 0}}}function C_(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new z(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function p1(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new z(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function A_(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const a=s.variable.name.value;r[a]!==!0&&e.reportError(new z(n.name?`Variable "$${a}" is never used in operation "${n.name.value}".`:`Variable "$${a}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function qu(e){switch(e.kind){case b.OBJECT:return{...e,fields:F_(e.fields)};case b.LIST:return{...e,values:e.values.map(qu)};case b.INT:case b.FLOAT:case b.STRING:case b.BOOLEAN:case b.NULL:case b.ENUM:case b.VARIABLE:return e}}function F_(e){return e.map(t=>({...t,value:qu(t.value)})).sort((t,n)=>Su(t.name.value,n.name.value))}function m1(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+m1(n)).join(" and "):e}function w_(e){const t=new y1,n=new O_,r=new Map;return{SelectionSet(i){const s=L_(e,r,t,n,e.getParentType(),i);for(const[[a,o],u,l]of s){const c=m1(o);e.reportError(new z(`Fields "${a}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function L_(e,t,n,r,i,s){const a=[],[o,u]=pa(e,t,i,s);if(R_(e,a,t,n,r,o),u.length!==0)for(let l=0;l1)for(let u=0;u[s.value,a]));return n.every(s=>{const a=s.value,o=i.get(s.name.value);return o===void 0?!1:D1(a)===D1(o)})}function D1(e){return at(qu(e))}function Gu(e,t){return tt(e)?tt(t)?Gu(e.ofType,t.ofType):!0:tt(t)?!0:Ce(e)?Ce(t)?Gu(e.ofType,t.ofType):!0:Ce(t)?!0:ni(e)||ni(t)?e!==t:!1}function pa(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),a=Object.create(null);v1(e,n,r,s,a);const o=[s,Object.keys(a)];return t.set(r,o),o}function Wu(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=Ut(e.getSchema(),n.typeCondition);return pa(e,t,i,n.selectionSet)}function v1(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case b.FIELD:{const a=s.name.value;let o;(Ie(t)||Oe(t))&&(o=t.getFields()[a]);const u=s.alias?s.alias.value:a;r[u]||(r[u]=[]),r[u].push([t,s,o]);break}case b.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case b.INLINE_FRAGMENT:{const a=s.typeCondition,o=a?Ut(e.getSchema(),a):t;v1(e,o,s.selectionSet,r,i);break}}}function k_(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var y1=class{constructor(){this._data=new Map}has(e,t,n){var r;const i=(r=this._data.get(e))===null||r===void 0?void 0:r.get(t);return i===void 0?!1:n?!0:n===i}add(e,t,n){const r=this._data.get(e);r===void 0?this._data.set(e,new Map([[t,n]])):r.set(t,n)}},O_=class{constructor(){this._orderedPairSet=new y1}has(e,t,n){return es.name.value));for(const s of r.args)if(!i.has(s.name)&&Vi(s)){const a=ee(s.type);e.reportError(new z(`Field "${r.name}" argument "${s.name}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function E1(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r?.getDirectives())!==null&&t!==void 0?t:si;for(const o of i)n[o.name]=br(o.args.filter(Vi),u=>u.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===b.DIRECTIVE_DEFINITION){var a;const u=(a=o.arguments)!==null&&a!==void 0?a:[];n[o.name.value]=br(u.filter(q_),l=>l.name.value)}return{Directive:{leave(o){const u=o.name.value,l=n[u];if(l){var c;const d=(c=o.arguments)!==null&&c!==void 0?c:[],m=new Set(d.map(p=>p.name.value));for(const[p,g]of Object.entries(l))if(!m.has(p)){const E=wu(g.type)?ee(g.type):at(g.type);e.reportError(new z(`Directive "@${u}" argument "${p}" of type "${E}" is required, but it was not provided.`,{nodes:o}))}}}}}}function q_(e){return e.type.kind===b.NON_NULL_TYPE&&e.defaultValue==null}function H_(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n)if(ni(Ge(n))){if(r){const i=t.name.value,s=ee(n);e.reportError(new z(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(r){if(r.selections.length===0){const i=t.name.value,s=ee(n);e.reportError(new z(`Field "${i}" of type "${s}" must have at least one field selected.`,{nodes:t}))}}else{const i=t.name.value,s=ee(n);e.reportError(new z(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}function ar(e,t,n){if(e){if(e.kind===b.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const i=n[r];return i===null&&Ce(t)?void 0:i}if(Ce(t))return e.kind===b.NULL?void 0:ar(e,t.ofType,n);if(e.kind===b.NULL)return null;if(tt(t)){const r=t.ofType;if(e.kind===b.LIST){const s=[];for(const a of e.values)if(b1(a,n)){if(Ce(r))return;s.push(null)}else{const o=ar(a,r,n);if(o===void 0)return;s.push(o)}return s}const i=ar(e,r,n);return i===void 0?void 0:[i]}if(qe(t)){if(e.kind!==b.OBJECT)return;const r=Object.create(null),i=br(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const a=i[s.name];if(!a||b1(a.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(Ce(s.type))return;continue}const o=ar(a.value,s.type,n);if(o===void 0)return;r[s.name]=o}if(t.isOneOf){const s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if(ni(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}Rt(!1,"Unexpected input type: "+ee(t))}}function b1(e,t){return e.kind===b.VARIABLE&&(t==null||t[e.name.value]===void 0)}function G_(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],a=br(s,o=>o.name.value);for(const o of e.args){const u=o.name,l=o.type,c=a[u];if(!c){if(o.defaultValue!==void 0)i[u]=o.defaultValue;else if(Ce(l))throw new z(`Argument "${u}" of required type "${ee(l)}" was not provided.`,{nodes:t});continue}const d=c.value;let m=d.kind===b.NULL;if(d.kind===b.VARIABLE){const g=d.name.value;if(n==null||!W_(n,g)){if(o.defaultValue!==void 0)i[u]=o.defaultValue;else if(Ce(l))throw new z(`Argument "${u}" of required type "${ee(l)}" was provided the variable "$${g}" which was not provided a runtime value.`,{nodes:d});continue}m=n[g]==null}if(m&&Ce(l))throw new z(`Argument "${u}" of non-null type "${ee(l)}" must not be null.`,{nodes:d});const p=ar(d,l,n);if(p===void 0)throw new z(`Argument "${u}" has invalid value ${at(d)}.`,{nodes:d});i[u]=p}return i}function zi(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return G_(e,i,n)}function W_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Y_(e,t,n,r,i){const s=new Map;return Yu(e,t,n,r,i,s,new Set),s}function Yu(e,t,n,r,i,s,a){for(const o of i.selections)switch(o.kind){case b.FIELD:{if(!zu(n,o))continue;const u=z_(o),l=s.get(u);l!==void 0?l.push(o):s.set(u,[o]);break}case b.INLINE_FRAGMENT:{if(!zu(n,o)||!_1(e,o,r))continue;Yu(e,t,n,r,o.selectionSet,s,a);break}case b.FRAGMENT_SPREAD:{const u=o.name.value;if(a.has(u)||!zu(n,o))continue;a.add(u);const l=t[u];if(!l||!_1(e,l,r))continue;Yu(e,t,n,r,l.selectionSet,s,a);break}}}function zu(e,t){const n=zi(zp,t,e);if(n?.if===!0)return!1;const r=zi(Yp,t,e);return r?.if!==!1}function _1(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=Ut(e,r);return i===n?!0:bn(i)?e.isSubType(i,n):!1}function z_(e){return e.alias?e.alias.value:e.name.value}function J_(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),a=e.getDocument(),o=Object.create(null);for(const l of a.definitions)l.kind===b.FRAGMENT_DEFINITION&&(o[l.name.value]=l);const u=Y_(n,o,s,r,t.selectionSet);if(u.size>1){const d=[...u.values()].slice(1).flat();e.reportError(new z(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const l of u.values())l[0].name.value.startsWith("__")&&e.reportError(new z(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:l}))}}}}}function Ju(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function X_(e){return{DirectiveDefinition(r){var i;const s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;const s=r.name.value,a=(i=r.fields)!==null&&i!==void 0?i:[];for(const u of a){var o;const l=u.name.value,c=(o=u.arguments)!==null&&o!==void 0?o:[];n(`${s}.${l}`,c)}return!1}function n(r,i){const s=Ju(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new z(`Argument "${r}(${a}:)" can only be defined once.`,{nodes:o.map(u=>u.name)}));return!1}}function N1(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Ju(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new z(`There can be only one argument named "${a}".`,{nodes:o.map(u=>u.name)}))}}function Q_(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new z(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new z(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function T1(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():si;for(const o of r)t[o.name]=!o.isRepeatable;const i=e.getDocument().definitions;for(const o of i)o.kind===b.DIRECTIVE_DEFINITION&&(t[o.name.value]=!o.repeatable);const s=Object.create(null),a=Object.create(null);return{enter(o){if(!("directives"in o)||!o.directives)return;let u;if(o.kind===b.SCHEMA_DEFINITION||o.kind===b.SCHEMA_EXTENSION)u=s;else if(Yi(o)||ju(o)){const l=o.name.value;u=a[l],u===void 0&&(a[l]=u=Object.create(null))}else u=Object.create(null);for(const l of o.directives){const c=l.name.value;t[c]&&(u[c]?e.reportError(new z(`The directive "@${c}" can only be used once at this location.`,{nodes:[u[c],l]})):u[c]=l)}}}}function Z_(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const u=(a=s.values)!==null&&a!==void 0?a:[],l=r[o];for(const c of u){const d=c.name.value,m=n[o];Nt(m)&&m.getValue(d)?e.reportError(new z(`Enum value "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:c.name})):l[d]?e.reportError(new z(`Enum value "${o}.${d}" can only be defined once.`,{nodes:[l[d],c.name]})):l[d]=c.name}return!1}}function K_(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const u=(a=s.fields)!==null&&a!==void 0?a:[],l=r[o];for(const c of u){const d=c.name.value;eN(n[o],d)?e.reportError(new z(`Field "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:c.name})):l[d]?e.reportError(new z(`Field "${o}.${d}" can only be defined once.`,{nodes:[l[d],c.name]})):l[d]=c.name}return!1}}function eN(e,t){return Ie(e)||Oe(e)||qe(e)?e.getFields()[t]!=null:!1}function tN(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new z(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function S1(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||Rt(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new z(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function nN(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new z(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function rN(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var a;const o=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const u of o){const l=u.operation,c=n[l];r[l]?e.reportError(new z(`Type for ${l} already defined in the schema. It cannot be redefined.`,{nodes:u})):c?e.reportError(new z(`There can be only one ${l} type in schema.`,{nodes:[c,u]})):n[l]=u}return!1}}function iN(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new z(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new z(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function sN(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Ju(r,s=>s.variable.name.value);for(const[s,a]of i)a.length>1&&e.reportError(new z(`There can be only one variable named "$${s}".`,{nodes:a.map(o=>o.variable.name)}))}}}function aN(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){const r=Ru(e.getParentInputType());if(!tt(r))return Cr(e,n),!1},ObjectValue(n){const r=Ge(e.getInputType());if(!qe(r))return Cr(e,n),!1;const i=br(n.fields,s=>s.name.value);for(const s of Object.values(r.getFields()))if(!i[s.name]&&qp(s)){const o=ee(s.type);e.reportError(new z(`Field "${r.name}.${s.name}" of required type "${o}" was not provided.`,{nodes:n}))}r.isOneOf&&oN(e,n,r,i)},ObjectField(n){const r=Ge(e.getParentInputType());if(!e.getInputType()&&qe(r)){const s=Nr(n.name.value,Object.keys(r.getFields()));e.reportError(new z(`Field "${n.name.value}" is not defined by type "${r.name}".`+nr(s),{nodes:n}))}},NullValue(n){const r=e.getInputType();Ce(r)&&e.reportError(new z(`Expected value of type "${ee(r)}", found ${at(n)}.`,{nodes:n}))},EnumValue:n=>Cr(e,n),IntValue:n=>Cr(e,n),FloatValue:n=>Cr(e,n),StringValue:n=>Cr(e,n),BooleanValue:n=>Cr(e,n)}}function Cr(e,t){const n=e.getInputType();if(!n)return;const r=Ge(n);if(!ni(r)){const i=ee(n);e.reportError(new z(`Expected value of type "${i}", found ${at(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=ee(n);e.reportError(new z(`Expected value of type "${s}", found ${at(t)}.`,{nodes:t}))}}catch(i){const s=ee(n);i instanceof z?e.reportError(i):e.reportError(new z(`Expected value of type "${s}", found ${at(t)}; `+i.message,{nodes:t,originalError:i}))}}function oN(e,t,n,r){var i;const s=Object.keys(r);if(s.length!==1){e.reportError(new z(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}const o=(i=r[s[0]])===null||i===void 0?void 0:i.value;(!o||o.kind===b.NULL)&&e.reportError(new z(`Field "${n.name}.${s[0]}" must be non-null.`,{nodes:[t]}))}function uN(e){return{VariableDefinition(t){const n=Ut(e.getSchema(),t.type);if(n!==void 0&&!Bt(n)){const r=t.variable.name.value,i=at(t.type);e.reportError(new z(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function lN(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:a,parentType:o}of r){const u=i.name.value,l=t[u];if(l&&s){const c=e.getSchema(),d=Ut(c,l.type);if(d&&!cN(c,d,l.defaultValue,s,a)){const m=ee(d),p=ee(s);e.reportError(new z(`Variable "$${u}" of type "${m}" used in position expecting type "${p}".`,{nodes:[l,i]}))}qe(o)&&o.isOneOf&&Iu(d)&&e.reportError(new z(`Variable "$${u}" is of type "${d}" but must be non-nullable to be used for OneOf Input Object "${o}".`,{nodes:[l,i]}))}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function cN(e,t,n,r,i){if(Ce(r)&&!Ce(t)){if(!(n!=null&&n.kind!==b.NULL)&&!(i!==void 0))return!1;const o=r.ofType;return ii(e,t,o)}return ii(e,t,r)}var fN=Object.freeze([T_]),C1=Object.freeze([l1,nN,b_,J_,d1,m_,uN,H_,d_,tN,y_,p1,M_,S_,sN,C_,A_,f1,T1,g_,N1,aN,j_,lN,w_,S1,...fN]),dN=Object.freeze([__,rN,iN,Z_,K_,X_,Q_,d1,f1,T1,B_,c1,N1,S1,E1]),A1=class{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{t=Object.create(null);for(const n of this.getDocument().definitions)n.kind===b.FRAGMENT_DEFINITION&&(t[n.name.value]=n);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){t=[];const n=[e];let r;for(;r=n.pop();)for(const i of r.selections)i.kind===b.FRAGMENT_SPREAD?t.push(i):i.selectionSet&&n.push(i.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];const n=Object.create(null),r=[e.selectionSet];let i;for(;i=r.pop();)for(const s of this.getFragmentSpreads(i)){const a=s.name.value;if(n[a]!==!0){n[a]=!0;const o=this.getFragment(a);o&&(t.push(o),r.push(o.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}},hN=class extends A1{constructor(e,t,n){super(e,n),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}},pN=class extends A1{constructor(e,t,n,r){super(t,r),this._schema=e,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){const n=[],r=new o1(this._schema);rr(e,u1(r,{VariableDefinition:()=>!1,Variable(i){n.push({node:i,type:r.getInputType(),defaultValue:r.getDefaultValue(),parentType:r.getParentInputType()})}})),t=n,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(const n of this.getRecursivelyReferencedFragments(e))t=t.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(e,t)}return t}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}},mN=En(Eu,e=>e.filter(t=>t!=="description"));function F1(e,t,n=C1,r,i=new o1(e)){var s;const a=(s=void 0)!==null&&s!==void 0?s:100;t||Te(!1,"Must provide document."),Xb(e);const o=Object.freeze({}),u=[],l=new pN(e,t,i,d=>{if(u.length>=a)throw u.push(new z("Too many validation errors, error limit reached. Validation aborted.")),o;u.push(d)}),c=kp(n.map(d=>d(l)));try{rr(t,u1(i,c),mN)}catch(d){if(d!==o)throw d}return u}function gN(e,t,n=dN){const r=[],i=new hN(e,t,a=>{r.push(a)}),s=n.map(a=>a(i));return rr(e,kp(s)),r}function DN(e){const t=gN(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` - -`))}function vN(e){return{Field(t){const n=e.getFieldDef(),r=n?.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||Rt(!1),e.reportError(new z(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n?.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new z(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),a=e.getFieldDef();s!=null&&a!=null||Rt(!1),e.reportError(new z(`Field "${s.name}.${a.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Ge(e.getParentInputType());if(qe(n)){const r=n.getFields()[t.name.value],i=r?.deprecationReason;i!=null&&e.reportError(new z(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n?.deprecationReason;if(n&&r!=null){const i=Ge(e.getInputType());i!=null||Rt(!1),e.reportError(new z(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function w1(e,t){On(e)&&On(e.__schema)||Te(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${ee(e)}.`);const n=e.__schema,r=_r(n.types,R=>R.name,R=>m(R));for(const R of[...la,...fa])r[R.name]&&(r[R.name]=R);const i=n.queryType?c(n.queryType):null,s=n.mutationType?c(n.mutationType):null,a=n.subscriptionType?c(n.subscriptionType):null,o=n.directives?n.directives.map(X):[];return new Vu({description:n.description,query:i,mutation:s,subscription:a,types:Object.values(r),directives:o,assumeValid:t?.assumeValid});function u(R){if(R.kind===Re.LIST){const V=R.ofType;if(!V)throw new Error("Decorated type deeper than introspection query.");return new dt(u(V))}if(R.kind===Re.NON_NULL){const V=R.ofType;if(!V)throw new Error("Decorated type deeper than introspection query.");const q=u(V);return new ye(Vb(q))}return l(R)}function l(R){const V=R.name;if(!V)throw new Error(`Unknown type reference: ${ee(R)}.`);const q=r[V];if(!q)throw new Error(`Invalid or incomplete schema, unknown type: ${V}. Ensure that a full introspection query is used in order to build a client schema.`);return q}function c(R){return Mb(l(R))}function d(R){return Pb(l(R))}function m(R){if(R!=null&&R.name!=null&&R.kind!=null)switch(R.kind){case Re.SCALAR:return p(R);case Re.OBJECT:return E(R);case Re.INTERFACE:return A(R);case Re.UNION:return T(R);case Re.ENUM:return w(R);case Re.INPUT_OBJECT:return F(R)}const V=ee(R);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${V}.`)}function p(R){return new Mn({name:R.name,description:R.description,specifiedByURL:R.specifiedByURL})}function g(R){if(R.interfaces===null&&R.kind===Re.INTERFACE)return[];if(!R.interfaces){const V=ee(R);throw new Error(`Introspection result missing interfaces: ${V}.`)}return R.interfaces.map(d)}function E(R){return new Gt({name:R.name,description:R.description,interfaces:()=>g(R),fields:()=>S(R)})}function A(R){return new ir({name:R.name,description:R.description,interfaces:()=>g(R),fields:()=>S(R)})}function T(R){if(!R.possibleTypes){const V=ee(R);throw new Error(`Introspection result missing possibleTypes: ${V}.`)}return new oa({name:R.name,description:R.description,types:()=>R.possibleTypes.map(c)})}function w(R){if(!R.enumValues){const V=ee(R);throw new Error(`Introspection result missing enumValues: ${V}.`)}return new sr({name:R.name,description:R.description,values:_r(R.enumValues,V=>V.name,V=>({description:V.description,deprecationReason:V.deprecationReason}))})}function F(R){if(!R.inputFields){const V=ee(R);throw new Error(`Introspection result missing inputFields: ${V}.`)}return new Ui({name:R.name,description:R.description,fields:()=>O(R.inputFields),isOneOf:R.isOneOf})}function S(R){if(!R.fields)throw new Error(`Introspection result missing fields: ${ee(R)}.`);return _r(R.fields,V=>V.name,L)}function L(R){const V=u(R.type);if(!Tr(V)){const q=ee(V);throw new Error(`Introspection must provide output type for fields, but received: ${q}.`)}if(!R.args){const q=ee(R);throw new Error(`Introspection result missing field args: ${q}.`)}return{description:R.description,deprecationReason:R.deprecationReason,type:V,args:O(R.args)}}function O(R){return _r(R,V=>V.name,P)}function P(R){const V=u(R.type);if(!Bt(V)){const Q=ee(V);throw new Error(`Introspection must provide input type for arguments, but received: ${Q}.`)}const q=R.defaultValue!=null?ar(Sb(R.defaultValue),V):void 0;return{description:R.description,type:V,defaultValue:q,deprecationReason:R.deprecationReason}}function X(R){if(!R.args){const V=ee(R);throw new Error(`Introspection result missing directive args: ${V}.`)}if(!R.locations){const V=ee(R);throw new Error(`Introspection result missing directive locations: ${V}.`)}return new Pn({name:R.name,description:R.description,isRepeatable:R.isRepeatable,locations:R.locations.slice(),args:O(R.args)})}}function yN(e,t,n){var r,i,s,a;const o=[],u=Object.create(null),l=[];let c;const d=[];for(const v of t.definitions)if(v.kind===b.SCHEMA_DEFINITION)c=v;else if(v.kind===b.SCHEMA_EXTENSION)d.push(v);else if(Yi(v))o.push(v);else if(ju(v)){const $=v.name.value,U=u[$];u[$]=U?U.concat([v]):[v]}else v.kind===b.DIRECTIVE_DEFINITION&&l.push(v);if(Object.keys(u).length===0&&o.length===0&&l.length===0&&d.length===0&&c==null)return e;const m=Object.create(null);for(const v of e.types)m[v.name]=w(v);for(const v of o){var p;const $=v.name.value;m[$]=(p=L1[$])!==null&&p!==void 0?p:C(v)}const g={query:e.query&&A(e.query),mutation:e.mutation&&A(e.mutation),subscription:e.subscription&&A(e.subscription),...c&&q([c]),...q(d)};return{description:(r=c)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...g,types:Object.values(m),directives:[...e.directives.map(T),...l.map(B)],extensions:Object.create(null),astNode:(s=c)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:(a=n?.assumeValid)!==null&&a!==void 0?a:!1};function E(v){return tt(v)?new dt(E(v.ofType)):Ce(v)?new ye(E(v.ofType)):A(v)}function A(v){return m[v.name]}function T(v){const $=v.toConfig();return new Pn({...$,args:En($.args,V)})}function w(v){if(r1(v)||Hb(v))return v;if(Ht(v))return L(v);if(Ie(v))return O(v);if(Oe(v))return P(v);if(Pt(v))return X(v);if(Nt(v))return S(v);if(qe(v))return F(v);Rt(!1,"Unexpected type: "+ee(v))}function F(v){var $;const U=v.toConfig(),W=($=u[U.name])!==null&&$!==void 0?$:[];return new Ui({...U,fields:()=>({...En(U.fields,I=>({...I,type:E(I.type)})),...ne(W)}),extensionASTNodes:U.extensionASTNodes.concat(W)})}function S(v){var $;const U=v.toConfig(),W=($=u[v.name])!==null&&$!==void 0?$:[];return new sr({...U,values:{...U.values,...K(W)},extensionASTNodes:U.extensionASTNodes.concat(W)})}function L(v){var $;const U=v.toConfig(),W=($=u[U.name])!==null&&$!==void 0?$:[];let I=U.specifiedByURL;for(const re of W){var x;I=(x=I1(re))!==null&&x!==void 0?x:I}return new Mn({...U,specifiedByURL:I,extensionASTNodes:U.extensionASTNodes.concat(W)})}function O(v){var $;const U=v.toConfig(),W=($=u[U.name])!==null&&$!==void 0?$:[];return new Gt({...U,interfaces:()=>[...v.getInterfaces().map(A),...ae(W)],fields:()=>({...En(U.fields,R),...J(W)}),extensionASTNodes:U.extensionASTNodes.concat(W)})}function P(v){var $;const U=v.toConfig(),W=($=u[U.name])!==null&&$!==void 0?$:[];return new ir({...U,interfaces:()=>[...v.getInterfaces().map(A),...ae(W)],fields:()=>({...En(U.fields,R),...J(W)}),extensionASTNodes:U.extensionASTNodes.concat(W)})}function X(v){var $;const U=v.toConfig(),W=($=u[U.name])!==null&&$!==void 0?$:[];return new oa({...U,types:()=>[...v.getTypes().map(A),...ce(W)],extensionASTNodes:U.extensionASTNodes.concat(W)})}function R(v){return{...v,type:E(v.type),args:v.args&&En(v.args,V)}}function V(v){return{...v,type:E(v.type)}}function q(v){const $={};for(const W of v){var U;const I=(U=W.operationTypes)!==null&&U!==void 0?U:[];for(const x of I)$[x.operation]=Q(x.type)}return $}function Q(v){var $;const U=v.name.value,W=($=L1[U])!==null&&$!==void 0?$:m[U];if(W===void 0)throw new Error(`Unknown type: "${U}".`);return W}function M(v){return v.kind===b.LIST_TYPE?new dt(M(v.type)):v.kind===b.NON_NULL_TYPE?new ye(M(v.type)):Q(v)}function B(v){var $;return new Pn({name:v.name.value,description:($=v.description)===null||$===void 0?void 0:$.value,locations:v.locations.map(({value:U})=>U),isRepeatable:v.repeatable,args:Y(v.arguments),astNode:v})}function J(v){const $=Object.create(null);for(const I of v){var U;const x=(U=I.fields)!==null&&U!==void 0?U:[];for(const re of x){var W;$[re.name.value]={type:M(re.type),description:(W=re.description)===null||W===void 0?void 0:W.value,args:Y(re.arguments),deprecationReason:ma(re),astNode:re}}}return $}function Y(v){const $=v??[],U=Object.create(null);for(const I of $){var W;const x=M(I.type);U[I.name.value]={type:x,description:(W=I.description)===null||W===void 0?void 0:W.value,defaultValue:ar(I.defaultValue,x),deprecationReason:ma(I),astNode:I}}return U}function ne(v){const $=Object.create(null);for(const I of v){var U;const x=(U=I.fields)!==null&&U!==void 0?U:[];for(const re of x){var W;const ue=M(re.type);$[re.name.value]={type:ue,description:(W=re.description)===null||W===void 0?void 0:W.value,defaultValue:ar(re.defaultValue,ue),deprecationReason:ma(re),astNode:re}}}return $}function K(v){const $=Object.create(null);for(const I of v){var U;const x=(U=I.values)!==null&&U!==void 0?U:[];for(const re of x){var W;$[re.name.value]={description:(W=re.description)===null||W===void 0?void 0:W.value,deprecationReason:ma(re),astNode:re}}}return $}function ae(v){return v.flatMap($=>{var U,W;return(U=(W=$.interfaces)===null||W===void 0?void 0:W.map(Q))!==null&&U!==void 0?U:[]})}function ce(v){return v.flatMap($=>{var U,W;return(U=(W=$.types)===null||W===void 0?void 0:W.map(Q))!==null&&U!==void 0?U:[]})}function C(v){var $;const U=v.name.value,W=($=u[U])!==null&&$!==void 0?$:[];switch(v.kind){case b.OBJECT_TYPE_DEFINITION:{var I;const be=[v,...W];return new Gt({name:U,description:(I=v.description)===null||I===void 0?void 0:I.value,interfaces:()=>ae(be),fields:()=>J(be),astNode:v,extensionASTNodes:W})}case b.INTERFACE_TYPE_DEFINITION:{var x;const be=[v,...W];return new ir({name:U,description:(x=v.description)===null||x===void 0?void 0:x.value,interfaces:()=>ae(be),fields:()=>J(be),astNode:v,extensionASTNodes:W})}case b.ENUM_TYPE_DEFINITION:{var re;const be=[v,...W];return new sr({name:U,description:(re=v.description)===null||re===void 0?void 0:re.value,values:K(be),astNode:v,extensionASTNodes:W})}case b.UNION_TYPE_DEFINITION:{var ue;const be=[v,...W];return new oa({name:U,description:(ue=v.description)===null||ue===void 0?void 0:ue.value,types:()=>ce(be),astNode:v,extensionASTNodes:W})}case b.SCALAR_TYPE_DEFINITION:{var Je;return new Mn({name:U,description:(Je=v.description)===null||Je===void 0?void 0:Je.value,specifiedByURL:I1(v),astNode:v,extensionASTNodes:W})}case b.INPUT_OBJECT_TYPE_DEFINITION:{var Ct;const be=[v,...W];return new Ui({name:U,description:(Ct=v.description)===null||Ct===void 0?void 0:Ct.value,fields:()=>ne(be),astNode:v,extensionASTNodes:W,isOneOf:EN(v)})}}}}var L1=br([...la,...fa],e=>e.name);function ma(e){const t=zi(Pu,e);return t?.reason}function I1(e){const t=zi(Jp,e);return t?.url}function EN(e){return!!zi(Xp,e)}function R1(e,t){e!=null&&e.kind===b.DOCUMENT||Te(!1,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&DN(e);const r=yN({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}const i=[...r.directives,...si.filter(s=>r.directives.every(a=>a.name!==s.name))];return new Vu({...r,directives:i})}function Ar(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i!r.isDeprecated);const n=e.map(r=>({proximity:_N(x1(r.label),t),entry:r}));return Xu(Xu(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,i)=>(r.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||r.proximity-i.proximity||r.entry.label.length-i.entry.label.length).map(r=>r.entry)}function Xu(e,t){const n=e.filter(t);return n.length===0?e:n}function x1(e){return e.toLowerCase().replaceAll(/\W/g,"")}function _N(e,t){let n=NN(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function NN(e,t){let n,r;const i=[],s=e.length,a=t.length;for(n=0;n<=s;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=s;n++)for(r=1;r<=a;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[s][a]}var TN=e=>` { - $1 -}`,ga=(e,t,n)=>{if(!t)return n??e;const r=Ge(t);return Ie(r)||qe(r)||tt(r)||bn(r)?e+TN():n??e},k1=(e,t,n)=>{if(tt(t)){const r=Ge(t.ofType);return e+`[${ga("",r,"$1")}]`}return ga(e,t,n)},SN=e=>{const t=e.args.filter(n=>n.type.toString().endsWith("!"));if(t.length)return e.name+`(${t.map((n,r)=>`${n.name}: $${r+1}`)}) ${ga("",e.type,` -`)}`},O1;(function(e){function t(n){return typeof n=="string"}e.is=t})(O1||(O1={}));var Qu;(function(e){function t(n){return typeof n=="string"}e.is=t})(Qu||(Qu={}));var M1;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(M1||(M1={}));var Da;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Da||(Da={}));var on;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=Da.MAX_VALUE),i===Number.MAX_VALUE&&(i=Da.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return k.objectLiteral(i)&&k.uinteger(i.line)&&k.uinteger(i.character)}e.is=n})(on||(on={}));var Ye;(function(e){function t(r,i,s,a){if(k.uinteger(r)&&k.uinteger(i)&&k.uinteger(s)&&k.uinteger(a))return{start:on.create(r,i),end:on.create(s,a)};if(on.is(r)&&on.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}e.create=t;function n(r){let i=r;return k.objectLiteral(i)&&on.is(i.start)&&on.is(i.end)}e.is=n})(Ye||(Ye={}));var va;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return k.objectLiteral(i)&&Ye.is(i.range)&&(k.string(i.uri)||k.undefined(i.uri))}e.is=n})(va||(va={}));var P1;(function(e){function t(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function n(r){let i=r;return k.objectLiteral(i)&&Ye.is(i.targetRange)&&k.string(i.targetUri)&&Ye.is(i.targetSelectionRange)&&(Ye.is(i.originSelectionRange)||k.undefined(i.originSelectionRange))}e.is=n})(P1||(P1={}));var Zu;(function(e){function t(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}e.create=t;function n(r){const i=r;return k.objectLiteral(i)&&k.numberRange(i.red,0,1)&&k.numberRange(i.green,0,1)&&k.numberRange(i.blue,0,1)&&k.numberRange(i.alpha,0,1)}e.is=n})(Zu||(Zu={}));var B1;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){const i=r;return k.objectLiteral(i)&&Ye.is(i.range)&&Zu.is(i.color)}e.is=n})(B1||(B1={}));var V1;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){const i=r;return k.objectLiteral(i)&&k.string(i.label)&&(k.undefined(i.textEdit)||oi.is(i))&&(k.undefined(i.additionalTextEdits)||k.typedArray(i.additionalTextEdits,oi.is))}e.is=n})(V1||(V1={}));var U1;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(U1||(U1={}));var $1;(function(e){function t(r,i,s,a,o,u){const l={startLine:r,endLine:i};return k.defined(s)&&(l.startCharacter=s),k.defined(a)&&(l.endCharacter=a),k.defined(o)&&(l.kind=o),k.defined(u)&&(l.collapsedText=u),l}e.create=t;function n(r){const i=r;return k.objectLiteral(i)&&k.uinteger(i.startLine)&&k.uinteger(i.startLine)&&(k.undefined(i.startCharacter)||k.uinteger(i.startCharacter))&&(k.undefined(i.endCharacter)||k.uinteger(i.endCharacter))&&(k.undefined(i.kind)||k.string(i.kind))}e.is=n})($1||($1={}));var Ku;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return k.defined(i)&&va.is(i.location)&&k.string(i.message)}e.is=n})(Ku||(Ku={}));var j1;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(j1||(j1={}));var q1;(function(e){e.Unnecessary=1,e.Deprecated=2})(q1||(q1={}));var H1;(function(e){function t(n){const r=n;return k.objectLiteral(r)&&k.string(r.href)}e.is=t})(H1||(H1={}));var ya;(function(e){function t(r,i,s,a,o,u){let l={range:r,message:i};return k.defined(s)&&(l.severity=s),k.defined(a)&&(l.code=a),k.defined(o)&&(l.source=o),k.defined(u)&&(l.relatedInformation=u),l}e.create=t;function n(r){var i;let s=r;return k.defined(s)&&Ye.is(s.range)&&k.string(s.message)&&(k.number(s.severity)||k.undefined(s.severity))&&(k.integer(s.code)||k.string(s.code)||k.undefined(s.code))&&(k.undefined(s.codeDescription)||k.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(k.string(s.source)||k.undefined(s.source))&&(k.undefined(s.relatedInformation)||k.typedArray(s.relatedInformation,Ku.is))}e.is=n})(ya||(ya={}));var ai;(function(e){function t(r,i,...s){let a={title:r,command:i};return k.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return k.defined(i)&&k.string(i.title)&&k.string(i.command)}e.is=n})(ai||(ai={}));var oi;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function n(s,a){return{range:{start:s,end:s},newText:a}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){const a=s;return k.objectLiteral(a)&&k.string(a.newText)&&Ye.is(a.range)}e.is=i})(oi||(oi={}));var el;(function(e){function t(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){const i=r;return k.objectLiteral(i)&&k.string(i.label)&&(k.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(k.string(i.description)||i.description===void 0)}e.is=n})(el||(el={}));var ui;(function(e){function t(n){const r=n;return k.string(r)}e.is=t})(ui||(ui={}));var G1;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}e.del=r;function i(s){const a=s;return oi.is(a)&&(el.is(a.annotationId)||ui.is(a.annotationId))}e.is=i})(G1||(G1={}));var tl;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return k.defined(i)&&al.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(tl||(tl={}));var nl;(function(e){function t(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&k.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||k.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||k.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ui.is(i.annotationId))}e.is=n})(nl||(nl={}));var rl;(function(e){function t(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&k.string(i.oldUri)&&k.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||k.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||k.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ui.is(i.annotationId))}e.is=n})(rl||(rl={}));var il;(function(e){function t(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&k.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||k.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||k.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ui.is(i.annotationId))}e.is=n})(il||(il={}));var sl;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>k.string(i.kind)?nl.is(i)||rl.is(i)||il.is(i):tl.is(i)))}e.is=t})(sl||(sl={}));var W1;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return k.defined(i)&&k.string(i.uri)}e.is=n})(W1||(W1={}));var Y1;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return k.defined(i)&&k.string(i.uri)&&k.integer(i.version)}e.is=n})(Y1||(Y1={}));var al;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return k.defined(i)&&k.string(i.uri)&&(i.version===null||k.integer(i.version))}e.is=n})(al||(al={}));var z1;(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){let i=r;return k.defined(i)&&k.string(i.uri)&&k.string(i.languageId)&&k.integer(i.version)&&k.string(i.text)}e.is=n})(z1||(z1={}));var ol;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(ol||(ol={}));var Ji;(function(e){function t(n){const r=n;return k.objectLiteral(n)&&ol.is(r.kind)&&k.string(r.value)}e.is=t})(Ji||(Ji={}));var J1;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(J1||(J1={}));var li;(function(e){e.PlainText=1,e.Snippet=2})(li||(li={}));var X1;(function(e){e.Deprecated=1})(X1||(X1={}));var Q1;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){const i=r;return i&&k.string(i.newText)&&Ye.is(i.insert)&&Ye.is(i.replace)}e.is=n})(Q1||(Q1={}));var Fr;(function(e){e.asIs=1,e.adjustIndentation=2})(Fr||(Fr={}));var Z1;(function(e){function t(n){const r=n;return r&&(k.string(r.detail)||r.detail===void 0)&&(k.string(r.description)||r.description===void 0)}e.is=t})(Z1||(Z1={}));var K1;(function(e){function t(n){return{label:n}}e.create=t})(K1||(K1={}));var e0;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(e0||(e0={}));var Ea;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return k.string(i)||k.objectLiteral(i)&&k.string(i.language)&&k.string(i.value)}e.is=n})(Ea||(Ea={}));var t0;(function(e){function t(n){let r=n;return!!r&&k.objectLiteral(r)&&(Ji.is(r.contents)||Ea.is(r.contents)||k.typedArray(r.contents,Ea.is))&&(n.range===void 0||Ye.is(n.range))}e.is=t})(t0||(t0={}));var n0;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(n0||(n0={}));var r0;(function(e){function t(n,r,...i){let s={label:n};return k.defined(r)&&(s.documentation=r),k.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(r0||(r0={}));var i0;(function(e){e.Text=1,e.Read=2,e.Write=3})(i0||(i0={}));var s0;(function(e){function t(n,r){let i={range:n};return k.number(r)&&(i.kind=r),i}e.create=t})(s0||(s0={}));var a0;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(a0||(a0={}));var o0;(function(e){e.Deprecated=1})(o0||(o0={}));var u0;(function(e){function t(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(u0||(u0={}));var l0;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(l0||(l0={}));var c0;(function(e){function t(r,i,s,a,o,u){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}e.create=t;function n(r){let i=r;return i&&k.string(i.name)&&k.number(i.kind)&&Ye.is(i.range)&&Ye.is(i.selectionRange)&&(i.detail===void 0||k.string(i.detail))&&(i.deprecated===void 0||k.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(c0||(c0={}));var f0;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(f0||(f0={}));var ba;(function(e){e.Invoked=1,e.Automatic=2})(ba||(ba={}));var d0;(function(e){function t(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function n(r){let i=r;return k.defined(i)&&k.typedArray(i.diagnostics,ya.is)&&(i.only===void 0||k.typedArray(i.only,k.string))&&(i.triggerKind===void 0||i.triggerKind===ba.Invoked||i.triggerKind===ba.Automatic)}e.is=n})(d0||(d0={}));var h0;(function(e){function t(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):ai.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return i&&k.string(i.title)&&(i.diagnostics===void 0||k.typedArray(i.diagnostics,ya.is))&&(i.kind===void 0||k.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||ai.is(i.command))&&(i.isPreferred===void 0||k.boolean(i.isPreferred))&&(i.edit===void 0||sl.is(i.edit))}e.is=n})(h0||(h0={}));var p0;(function(e){function t(r,i){let s={range:r};return k.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return k.defined(i)&&Ye.is(i.range)&&(k.undefined(i.command)||ai.is(i.command))}e.is=n})(p0||(p0={}));var m0;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return k.defined(i)&&k.uinteger(i.tabSize)&&k.boolean(i.insertSpaces)}e.is=n})(m0||(m0={}));var g0;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return k.defined(i)&&Ye.is(i.range)&&(k.undefined(i.target)||k.string(i.target))}e.is=n})(g0||(g0={}));var D0;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return k.objectLiteral(i)&&Ye.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(D0||(D0={}));var v0;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(v0||(v0={}));var y0;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(y0||(y0={}));var E0;(function(e){function t(n){const r=n;return k.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(E0||(E0={}));var b0;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&Ye.is(i.range)&&k.string(i.text)}e.is=n})(b0||(b0={}));var _0;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){const i=r;return i!=null&&Ye.is(i.range)&&k.boolean(i.caseSensitiveLookup)&&(k.string(i.variableName)||i.variableName===void 0)}e.is=n})(_0||(_0={}));var N0;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&Ye.is(i.range)&&(k.string(i.expression)||i.expression===void 0)}e.is=n})(N0||(N0={}));var T0;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return k.defined(i)&&Ye.is(r.stoppedLocation)}e.is=n})(T0||(T0={}));var ul;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(ul||(ul={}));var ll;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return k.objectLiteral(i)&&(i.tooltip===void 0||k.string(i.tooltip)||Ji.is(i.tooltip))&&(i.location===void 0||va.is(i.location))&&(i.command===void 0||ai.is(i.command))}e.is=n})(ll||(ll={}));var S0;(function(e){function t(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function n(r){const i=r;return k.objectLiteral(i)&&on.is(i.position)&&(k.string(i.label)||k.typedArray(i.label,ll.is))&&(i.kind===void 0||ul.is(i.kind))&&i.textEdits===void 0||k.typedArray(i.textEdits,oi.is)&&(i.tooltip===void 0||k.string(i.tooltip)||Ji.is(i.tooltip))&&(i.paddingLeft===void 0||k.boolean(i.paddingLeft))&&(i.paddingRight===void 0||k.boolean(i.paddingRight))}e.is=n})(S0||(S0={}));var C0;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(C0||(C0={}));var A0;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(A0||(A0={}));var F0;(function(e){function t(n){return{items:n}}e.create=t})(F0||(F0={}));var w0;(function(e){e.Invoked=0,e.Automatic=1})(w0||(w0={}));var L0;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(L0||(L0={}));var I0;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(I0||(I0={}));var R0;(function(e){function t(n){const r=n;return k.objectLiteral(r)&&Qu.is(r.uri)&&k.string(r.name)}e.is=t})(R0||(R0={}));var x0;(function(e){function t(s,a,o,u){return new CN(s,a,o,u)}e.create=t;function n(s){let a=s;return!!(k.defined(a)&&k.string(a.uri)&&(k.undefined(a.languageId)||k.string(a.languageId))&&k.uinteger(a.lineCount)&&k.func(a.getText)&&k.func(a.positionAt)&&k.func(a.offsetAt))}e.is=n;function r(s,a){let o=s.getText(),u=i(a,(c,d)=>{let m=c.range.start.line-d.range.start.line;return m===0?c.range.start.character-d.range.start.character:m}),l=o.length;for(let c=u.length-1;c>=0;c--){let d=u[c],m=s.offsetAt(d.range.start),p=s.offsetAt(d.range.end);if(p<=l)o=o.substring(0,m)+d.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");l=m}return o}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);let c=0,d=0,m=0;for(;c0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return on.create(0,e);for(;ne?r=s:n=s+1}let i=n-1;return on.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1"u"}e.undefined=r;function i(p){return p===!0||p===!1}e.boolean=i;function s(p){return t.call(p)==="[object String]"}e.string=s;function a(p){return t.call(p)==="[object Number]"}e.number=a;function o(p,g,E){return t.call(p)==="[object Number]"&&g<=p&&p<=E}e.numberRange=o;function u(p){return t.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}e.integer=u;function l(p){return t.call(p)==="[object Number]"&&0<=p&&p<=2147483647}e.uinteger=l;function c(p){return t.call(p)==="[object Function]"}e.func=c;function d(p){return p!==null&&typeof p=="object"}e.objectLiteral=d;function m(p,g){return Array.isArray(p)&&p.every(g)}e.typedArray=m})(k||(k={}));var cl=class{constructor(e){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const t=this._sourceText.charAt(this._pos);return this._pos++,t},this.eat=t=>{if(this._testNextCharacter(t))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=t=>{let n=this._testNextCharacter(t),r=!1;for(n&&(r=n,this._start=this._pos);n;)this._pos++,n=this._testNextCharacter(t),r=!0;return r},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=t=>{this._pos=t},this.match=(t,n=!0,r=!1)=>{let i=null,s=null;return typeof t=="string"?(s=new RegExp(t,r?"i":"g").test(this._sourceText.slice(this._pos,this._pos+t.length)),i=t):t instanceof RegExp&&(s=this._sourceText.slice(this._pos).match(t),i=s?.[0]),s!=null&&(typeof t=="string"||s instanceof Array&&this._sourceText.startsWith(s[0],this._pos))?(n&&(this._start=this._pos,i&&i.length&&(this._pos+=i.length)),s):!1},this.backUp=t=>{this._pos-=t},this.column=()=>this._pos,this.indentation=()=>{const t=this._sourceText.match(/\s*/);let n=0;if(t&&t.length!==0){const r=t[0];let i=0;for(;r.length>i;)r.charCodeAt(i)===9?n+=2:n++,i++}return n},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return typeof e=="string"?n=t===e:n=e instanceof RegExp?e.test(t):e(t),n}};function ze(e){return{ofRule:e}}function Se(e,t){return{ofRule:e,isList:!0,separator:t}}function AN(e,t){const n=e.match;return e.match=r=>{let i=!1;return n&&(i=n(r)),i&&t.every(s=>s.match&&!s.match(r))},e}function fl(e,t){return{style:t,match:n=>n.kind===e}}function ge(e,t){return{style:t||"punctuation",match:n=>n.kind==="Punctuation"&&n.value===e}}var FN=e=>e===" "||e===" "||e===","||e===` -`||e==="\r"||e==="\uFEFF"||e===" ",wN={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},LN={Document:[Se("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return b.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[ht("query"),ze(Me("def")),ze("VariableDefinitions"),Se("Directive"),"SelectionSet"],Mutation:[ht("mutation"),ze(Me("def")),ze("VariableDefinitions"),Se("Directive"),"SelectionSet"],Subscription:[ht("subscription"),ze(Me("def")),ze("VariableDefinitions"),Se("Directive"),"SelectionSet"],VariableDefinitions:[ge("("),Se("VariableDefinition"),ge(")")],VariableDefinition:["Variable",ge(":"),"Type",ze("DefaultValue")],Variable:[ge("$","variable"),Me("variable")],DefaultValue:[ge("="),"Value"],SelectionSet:[ge("{"),Se("Selection"),ge("}")],Selection(e,t){return e.value==="..."?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[Me("property"),ge(":"),Me("qualifier"),ze("Arguments"),Se("Directive"),ze("SelectionSet")],Field:[Me("property"),ze("Arguments"),Se("Directive"),ze("SelectionSet")],Arguments:[ge("("),Se("Argument"),ge(")")],Argument:[Me("attribute"),ge(":"),"Value"],FragmentSpread:[ge("..."),Me("def"),Se("Directive")],InlineFragment:[ge("..."),ze("TypeCondition"),Se("Directive"),"SelectionSet"],FragmentDefinition:[ht("fragment"),ze(AN(Me("def"),[ht("on")])),"TypeCondition",Se("Directive"),"SelectionSet"],TypeCondition:[ht("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return e.value==="null"?"NullValue":"EnumValue"}},NumberValue:[fl("Number","number")],StringValue:[{style:"string",match:e=>e.kind==="String",update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[fl("Name","builtin")],NullValue:[fl("Name","keyword")],EnumValue:[Me("string-2")],ListValue:[ge("["),Se("Value"),ge("]")],ObjectValue:[ge("{"),Se("ObjectField"),ge("}")],ObjectField:[Me("attribute"),ge(":"),"Value"],Type(e){return e.value==="["?"ListType":"NonNullType"},ListType:[ge("["),"Type",ge("]"),ze(ge("!"))],NonNullType:["NamedType",ze(ge("!"))],NamedType:[IN("atom")],Directive:[ge("@","meta"),Me("meta"),ze("Arguments")],DirectiveDef:[ht("directive"),ge("@","meta"),Me("meta"),ze("ArgumentsDef"),ht("on"),Se("DirectiveLocation",ge("|"))],InterfaceDef:[ht("interface"),Me("atom"),ze("Implements"),Se("Directive"),ge("{"),Se("FieldDef"),ge("}")],Implements:[ht("implements"),Se("NamedType",ge("&"))],DirectiveLocation:[Me("string-2")],SchemaDef:[ht("schema"),Se("Directive"),ge("{"),Se("OperationTypeDef"),ge("}")],OperationTypeDef:[Me("keyword"),ge(":"),Me("atom")],ScalarDef:[ht("scalar"),Me("atom"),Se("Directive")],ObjectTypeDef:[ht("type"),Me("atom"),ze("Implements"),Se("Directive"),ge("{"),Se("FieldDef"),ge("}")],FieldDef:[Me("property"),ze("ArgumentsDef"),ge(":"),"Type",Se("Directive")],ArgumentsDef:[ge("("),Se("InputValueDef"),ge(")")],InputValueDef:[Me("attribute"),ge(":"),"Type",ze("DefaultValue"),Se("Directive")],UnionDef:[ht("union"),Me("atom"),Se("Directive"),ge("="),Se("UnionMember",ge("|"))],UnionMember:["NamedType"],EnumDef:[ht("enum"),Me("atom"),Se("Directive"),ge("{"),Se("EnumValueDef"),ge("}")],EnumValueDef:[Me("string-2"),Se("Directive")],InputDef:[ht("input"),Me("atom"),Se("Directive"),ge("{"),Se("InputValueDef"),ge("}")],ExtendDef:[ht("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return b.SCHEMA_EXTENSION;case"scalar":return b.SCALAR_TYPE_EXTENSION;case"type":return b.OBJECT_TYPE_EXTENSION;case"interface":return b.INTERFACE_TYPE_EXTENSION;case"union":return b.UNION_TYPE_EXTENSION;case"enum":return b.ENUM_TYPE_EXTENSION;case"input":return b.INPUT_OBJECT_TYPE_EXTENSION}},[b.SCHEMA_EXTENSION]:["SchemaDef"],[b.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[b.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[b.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[b.UNION_TYPE_EXTENSION]:["UnionDef"],[b.ENUM_TYPE_EXTENSION]:["EnumDef"],[b.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function ht(e){return{style:"keyword",match:t=>t.kind==="Name"&&t.value===e}}function Me(e){return{style:e,match:t=>t.kind==="Name",update(t,n){t.name=n.value}}}function IN(e){return{style:e,match:t=>t.kind==="Name",update(t,n){var r;!((r=t.prevState)===null||r===void 0)&&r.prevState&&(t.name=n.value,t.prevState.prevState.type=n.value)}}}function k0(e={eatWhitespace:t=>t.eatWhile(FN),lexRules:wN,parseRules:LN,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return Xi(e.parseRules,t,b.DOCUMENT),t},token(t,n){return RN(t,n,e)}}}function RN(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:i,parseRules:s,eatWhitespace:a,editorConfig:o}=n;if(t.rule&&t.rule.length===0?hl(t):t.needsAdvance&&(t.needsAdvance=!1,pl(t,!0)),e.sol()){const c=o?.tabSize||2;t.indentLevel=Math.floor(e.indentation()/c)}if(a(e))return"ws";const u=kN(i,e);if(!u)return e.match(/\S+/)||e.match(/\s/),Xi(dl,t,"Invalid"),"invalidchar";if(u.kind==="Comment")return Xi(dl,t,"Comment"),"comment";const l=O0({},t);if(u.kind==="Punctuation"){if(/^[{([]/.test(u.value))t.indentLevel!==void 0&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(u.value)){const c=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&c.length>0&&c.at(-1){let t=or.UNKNOWN;if(e)try{rr(na(e),{enter(n){if(n.kind==="Document"){t=or.EXECUTABLE;return}return ON.includes(n.kind)?(t=or.TYPE_SYSTEM,ti):!1}})}catch{return t}return t};function PN(e,t){return t?.endsWith(".graphqls")?or.TYPE_SYSTEM:MN(e)}function BN(e,t,n=0){let r=null,i=null,s=null;const a=_a(e,(o,u,l,c)=>{if(!(c!==t.line||o.getCurrentPosition()+n=0;i--)t(n[i])}function VN(e){let t;return V0(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function UN(e,t){let n,r,i,s,a,o,u,l,c,d,m;return V0(t,p=>{var g;switch(p.kind){case Z.QUERY:case"ShortQuery":d=e.getQueryType();break;case Z.MUTATION:d=e.getMutationType();break;case Z.SUBSCRIPTION:d=e.getSubscriptionType();break;case Z.INLINE_FRAGMENT:case Z.FRAGMENT_DEFINITION:p.type&&(d=e.getType(p.type));break;case Z.FIELD:case Z.ALIASED_FIELD:{!d||!p.name?a=null:(a=c?B0(e,c,p.name):null,d=a?a.type:null);break}case Z.SELECTION_SET:c=Ge(d);break;case Z.DIRECTIVE:i=p.name?e.getDirective(p.name):null;break;case Z.INTERFACE_DEF:p.name&&(u=null,m=new ir({name:p.name,interfaces:[],fields:{}}));break;case Z.OBJECT_TYPE_DEF:p.name&&(m=null,u=new Gt({name:p.name,interfaces:[],fields:{}}));break;case Z.ARGUMENTS:{if(p.prevState)switch(p.prevState.kind){case Z.FIELD:r=a&&a.args;break;case Z.DIRECTIVE:r=i&&i.args;break;case Z.ALIASED_FIELD:{const F=(g=p.prevState)===null||g===void 0?void 0:g.name;if(!F){r=null;break}const S=c?B0(e,c,F):null;if(!S){r=null;break}r=S.args;break}default:r=null;break}else r=null;break}case Z.ARGUMENT:if(r){for(let F=0;FF.value===p.name):null;break;case Z.LIST_VALUE:const A=Ru(o);o=A instanceof dt?A.ofType:null;break;case Z.OBJECT_VALUE:const T=Ge(o);l=T instanceof Ui?T.getFields():null;break;case Z.OBJECT_FIELD:const w=p.name&&l?l[p.name]:null;o=w?.type,a=w,d=a?a.type:null;break;case Z.NAMED_TYPE:p.name&&(d=e.getType(p.name));break}}),{argDef:n,argDefs:r,directiveDef:i,enumValue:s,fieldDef:a,inputType:o,objectFieldDefs:l,parentType:c,type:d,interfaceDef:m,objectTypeDef:u}}var $N={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},Z=Object.assign(Object.assign({},b),$N),Ee;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Ee||(Ee={}));var ml={command:"editor.action.triggerSuggest",title:"Suggestions"},jN=e=>{const t=[];if(e)try{rr(na(e),{FragmentDefinition(n){t.push(n)}})}catch{return[]}return t};function qN(e,t,n,r,i,s){var a;const o=Object.assign(Object.assign({},s),{schema:e}),u=P0(t,n,e,r,s);if(!u)return[];const{state:l,typeInfo:c,mode:d,token:m}=u,{kind:p,step:g,prevState:E}=l;if(p===Z.DOCUMENT)return d===or.TYPE_SYSTEM?HN(m):d===or.EXECUTABLE?GN(m):WN(m);if(p===Z.EXTEND_DEF)return YN(m);if(((a=E?.prevState)===null||a===void 0?void 0:a.kind)===Z.EXTENSION_DEFINITION&&l.name)return Pe(m,[]);if(E?.kind===b.SCALAR_TYPE_EXTENSION)return Pe(m,Object.values(e.getTypeMap()).filter(Ht).map(T=>({label:T.name,kind:Ee.Function})));if(E?.kind===b.OBJECT_TYPE_EXTENSION)return Pe(m,Object.values(e.getTypeMap()).filter(T=>Ie(T)&&!T.name.startsWith("__")).map(T=>({label:T.name,kind:Ee.Function})));if(E?.kind===b.INTERFACE_TYPE_EXTENSION)return Pe(m,Object.values(e.getTypeMap()).filter(Oe).map(T=>({label:T.name,kind:Ee.Function})));if(E?.kind===b.UNION_TYPE_EXTENSION)return Pe(m,Object.values(e.getTypeMap()).filter(Pt).map(T=>({label:T.name,kind:Ee.Function})));if(E?.kind===b.ENUM_TYPE_EXTENSION)return Pe(m,Object.values(e.getTypeMap()).filter(T=>Nt(T)&&!T.name.startsWith("__")).map(T=>({label:T.name,kind:Ee.Function})));if(E?.kind===b.INPUT_OBJECT_TYPE_EXTENSION)return Pe(m,Object.values(e.getTypeMap()).filter(qe).map(T=>({label:T.name,kind:Ee.Function})));if(p===Z.IMPLEMENTS||p===Z.NAMED_TYPE&&E?.kind===Z.IMPLEMENTS)return XN(m,l,e,t,c);if(p===Z.SELECTION_SET||p===Z.FIELD||p===Z.ALIASED_FIELD)return zN(m,c,o);if(p===Z.ARGUMENTS||p===Z.ARGUMENT&&g===0){const{argDefs:T}=c;if(T)return Pe(m,T.map(w=>{var F;return{label:w.name,insertText:k1(w.name+": ",w.type),insertTextMode:Fr.adjustIndentation,insertTextFormat:li.Snippet,command:ml,labelDetails:{detail:" "+String(w.type)},documentation:(F=w.description)!==null&&F!==void 0?F:void 0,kind:Ee.Variable,type:w.type}}))}if((p===Z.OBJECT_VALUE||p===Z.OBJECT_FIELD&&g===0)&&c.objectFieldDefs){const T=Ar(c.objectFieldDefs),w=p===Z.OBJECT_VALUE?Ee.Value:Ee.Field;return Pe(m,T.map(F=>{var S;return{label:F.name,detail:String(F.type),documentation:(S=F?.description)!==null&&S!==void 0?S:void 0,kind:w,type:F.type,insertText:k1(F.name+": ",F.type),insertTextMode:Fr.adjustIndentation,insertTextFormat:li.Snippet,command:ml}}))}if(p===Z.ENUM_VALUE||p===Z.LIST_VALUE&&g===1||p===Z.OBJECT_FIELD&&g===2||p===Z.ARGUMENT&&g===2)return JN(m,c,t,e);if(p===Z.VARIABLE&&g===1){const T=Ge(c.inputType),w=$0(t,e,m);return Pe(m,w.filter(F=>F.detail===T?.name))}if(p===Z.TYPE_CONDITION&&g===1||p===Z.NAMED_TYPE&&E!=null&&E.kind===Z.TYPE_CONDITION)return QN(m,c,e);if(p===Z.FRAGMENT_SPREAD&&g===1)return ZN(m,c,e,t,Array.isArray(i)?i:jN(i));const A=j0(l);return A.kind===Z.FIELD_DEF?Pe(m,Object.values(e.getTypeMap()).filter(T=>Tr(T)&&!T.name.startsWith("__")).map(T=>({label:T.name,kind:Ee.Function,insertText:s?.fillLeafsOnComplete?T.name+` -`:T.name,insertTextMode:Fr.adjustIndentation}))):A.kind===Z.INPUT_VALUE_DEF&&g===2?Pe(m,Object.values(e.getTypeMap()).filter(T=>Bt(T)&&!T.name.startsWith("__")).map(T=>({label:T.name,kind:Ee.Function,insertText:s?.fillLeafsOnComplete?T.name+` -$1`:T.name,insertTextMode:Fr.adjustIndentation,insertTextFormat:li.Snippet}))):p===Z.VARIABLE_DEFINITION&&g===2||p===Z.LIST_TYPE&&g===1||p===Z.NAMED_TYPE&&E&&(E.kind===Z.VARIABLE_DEFINITION||E.kind===Z.LIST_TYPE||E.kind===Z.NON_NULL_TYPE)?t6(m,e):p===Z.DIRECTIVE?n6(m,l,e):p===Z.DIRECTIVE_DEF?r6(m,l,e):[]}var gl=[{label:"type",kind:Ee.Function},{label:"interface",kind:Ee.Function},{label:"union",kind:Ee.Function},{label:"input",kind:Ee.Function},{label:"scalar",kind:Ee.Function},{label:"schema",kind:Ee.Function}],U0=[{label:"query",kind:Ee.Function},{label:"mutation",kind:Ee.Function},{label:"subscription",kind:Ee.Function},{label:"fragment",kind:Ee.Function},{label:"{",kind:Ee.Constructor}];function HN(e){return Pe(e,[{label:"extend",kind:Ee.Function},...gl])}function GN(e){return Pe(e,U0)}function WN(e){return Pe(e,[{label:"extend",kind:Ee.Function},...U0,...gl])}function YN(e){return Pe(e,gl)}function zN(e,t,n){var r;if(t.parentType){const{parentType:i}=t;let s=[];return"getFields"in i&&(s=Ar(i.getFields())),Vt(i)&&s.push(Gi),i===((r=n?.schema)===null||r===void 0?void 0:r.getQueryType())&&s.push(qi,Hi),Pe(e,s.map((a,o)=>{var u;const l={sortText:String(o)+a.name,label:a.name,detail:String(a.type),documentation:(u=a.description)!==null&&u!==void 0?u:void 0,deprecated:!!a.deprecationReason,isDeprecated:!!a.deprecationReason,deprecationReason:a.deprecationReason,kind:Ee.Field,labelDetails:{detail:" "+a.type.toString()},type:a.type};return n?.fillLeafsOnComplete&&(l.insertText=SN(a),l.insertText||(l.insertText=ga(a.name,a.type,a.name+(e.state.needsAdvance?"":` -`))),l.insertText&&(l.insertTextFormat=li.Snippet,l.insertTextMode=Fr.adjustIndentation,l.command=ml)),l}))}return[]}function JN(e,t,n,r){const i=Ge(t.inputType),s=$0(n,r,e).filter(a=>a.detail===i?.name);if(i instanceof sr){const a=i.getValues();return Pe(e,a.map(o=>{var u;return{label:o.name,detail:String(i),documentation:(u=o.description)!==null&&u!==void 0?u:void 0,deprecated:!!o.deprecationReason,isDeprecated:!!o.deprecationReason,deprecationReason:o.deprecationReason,kind:Ee.EnumMember,type:i}}).concat(s))}return i===ct?Pe(e,s.concat([{label:"true",detail:String(ct),documentation:"Not false.",kind:Ee.Variable,type:ct},{label:"false",detail:String(ct),documentation:"Not true.",kind:Ee.Variable,type:ct}])):s}function XN(e,t,n,r,i){if(t.needsSeparator)return[];const s=n.getTypeMap(),a=Ar(s).filter(Oe),o=a.map(({name:p})=>p),u=new Set;_a(r,(p,g)=>{var E,A,T,w,F;if(g.name&&(g.kind===Z.INTERFACE_DEF&&!o.includes(g.name)&&u.add(g.name),g.kind===Z.NAMED_TYPE&&((E=g.prevState)===null||E===void 0?void 0:E.kind)===Z.IMPLEMENTS)){if(i.interfaceDef){if((A=i.interfaceDef)===null||A===void 0?void 0:A.getInterfaces().find(({name:P})=>P===g.name))return;const L=n.getType(g.name),O=(T=i.interfaceDef)===null||T===void 0?void 0:T.toConfig();i.interfaceDef=new ir(Object.assign(Object.assign({},O),{interfaces:[...O.interfaces,L||new ir({name:g.name,fields:{}})]}))}else if(i.objectTypeDef){if((w=i.objectTypeDef)===null||w===void 0?void 0:w.getInterfaces().find(({name:P})=>P===g.name))return;const L=n.getType(g.name),O=(F=i.objectTypeDef)===null||F===void 0?void 0:F.toConfig();i.objectTypeDef=new Gt(Object.assign(Object.assign({},O),{interfaces:[...O.interfaces,L||new ir({name:g.name,fields:{}})]}))}}});const l=i.interfaceDef||i.objectTypeDef,d=(l?.getInterfaces()||[]).map(({name:p})=>p),m=a.concat([...u].map(p=>({name:p}))).filter(({name:p})=>p!==l?.name&&!d.includes(p));return Pe(e,m.map(p=>{const g={label:p.name,kind:Ee.Interface,type:p};return p?.description&&(g.documentation=p.description),g}))}function QN(e,t,n,r){let i;if(t.parentType)if(bn(t.parentType)){const s=Bb(t.parentType),a=n.getPossibleTypes(s),o=Object.create(null);for(const u of a)for(const l of u.getInterfaces())o[l.name]=l;i=a.concat(Ar(o))}else i=[t.parentType];else{const s=n.getTypeMap();i=Ar(s).filter(a=>Vt(a)&&!a.name.startsWith("__"))}return Pe(e,i.map(s=>{const a=Ge(s);return{label:String(s),documentation:a?.description||"",kind:Ee.Field}}))}function ZN(e,t,n,r,i){if(!r)return[];const s=n.getTypeMap(),a=VN(e.state),o=e6(r);i&&i.length>0&&o.push(...i);const u=o.filter(l=>s[l.typeCondition.name.value]&&!(a&&a.kind===Z.FRAGMENT_DEFINITION&&a.name===l.name.value)&&Vt(t.parentType)&&Vt(s[l.typeCondition.name.value])&&ku(n,t.parentType,s[l.typeCondition.name.value]));return Pe(e,u.map(l=>({label:l.name.value,detail:String(s[l.typeCondition.name.value]),documentation:`fragment ${l.name.value} on ${l.typeCondition.name.value}`,labelDetails:{detail:`fragment ${l.name.value} on ${l.typeCondition.name.value}`},kind:Ee.Field,type:s[l.typeCondition.name.value]})))}var KN=(e,t)=>{var n,r,i,s,a,o,u,l,c,d;if(((n=e.prevState)===null||n===void 0?void 0:n.kind)===t)return e.prevState;if(((i=(r=e.prevState)===null||r===void 0?void 0:r.prevState)===null||i===void 0?void 0:i.kind)===t)return e.prevState.prevState;if(((o=(a=(s=e.prevState)===null||s===void 0?void 0:s.prevState)===null||a===void 0?void 0:a.prevState)===null||o===void 0?void 0:o.kind)===t)return e.prevState.prevState.prevState;if(((d=(c=(l=(u=e.prevState)===null||u===void 0?void 0:u.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.prevState)===null||d===void 0?void 0:d.kind)===t)return e.prevState.prevState.prevState.prevState};function $0(e,t,n){let r=null,i;const s=Object.create({});return _a(e,(a,o)=>{var u;if(o?.kind===Z.VARIABLE&&o.name&&(r=o.name),o?.kind===Z.NAMED_TYPE&&r){const l=KN(o,Z.TYPE);l?.type&&(i=t.getType(l?.type))}if(r&&i&&!s[r]){const l=n.string==="$"||((u=n?.state)===null||u===void 0?void 0:u.kind)==="Variable"?r:"$"+r;s[r]={detail:i.toString(),insertText:l,label:"$"+r,rawInsert:l,type:i,kind:Ee.Variable},r=null,i=null}}),Ar(s)}function e6(e){const t=[];return _a(e,(n,r)=>{r.kind===Z.FRAGMENT_DEFINITION&&r.name&&r.type&&t.push({kind:Z.FRAGMENT_DEFINITION,name:{kind:b.NAME,value:r.name},selectionSet:{kind:Z.SELECTION_SET,selections:[]},typeCondition:{kind:Z.NAMED_TYPE,name:{kind:b.NAME,value:r.type}}})}),t}function t6(e,t,n){const r=t.getTypeMap(),i=Ar(r).filter(Bt);return Pe(e,i.map(s=>({label:s.name,documentation:s?.description||"",kind:Ee.Variable})))}function n6(e,t,n,r){var i;if(!((i=t.prevState)===null||i===void 0)&&i.kind){const s=n.getDirectives().filter(a=>i6(t.prevState,a));return Pe(e,s.map(a=>({label:a.name,documentation:a?.description||"",kind:Ee.Function})))}return[]}function r6(e,t,n,r){const i=n.getDirectives().find(s=>s.name===t.name);return Pe(e,i?.args.map(s=>({label:s.name,documentation:s.description||"",kind:Ee.Field}))||[])}function i6(e,t){if(!e?.kind)return!1;const{kind:n,prevState:r}=e,{locations:i}=t;switch(n){case Z.QUERY:return i.includes(se.QUERY);case Z.MUTATION:return i.includes(se.MUTATION);case Z.SUBSCRIPTION:return i.includes(se.SUBSCRIPTION);case Z.FIELD:case Z.ALIASED_FIELD:return i.includes(se.FIELD);case Z.FRAGMENT_DEFINITION:return i.includes(se.FRAGMENT_DEFINITION);case Z.FRAGMENT_SPREAD:return i.includes(se.FRAGMENT_SPREAD);case Z.INLINE_FRAGMENT:return i.includes(se.INLINE_FRAGMENT);case Z.SCHEMA_DEF:return i.includes(se.SCHEMA);case Z.SCALAR_DEF:return i.includes(se.SCALAR);case Z.OBJECT_TYPE_DEF:return i.includes(se.OBJECT);case Z.FIELD_DEF:return i.includes(se.FIELD_DEFINITION);case Z.INTERFACE_DEF:return i.includes(se.INTERFACE);case Z.UNION_DEF:return i.includes(se.UNION);case Z.ENUM_DEF:return i.includes(se.ENUM);case Z.ENUM_VALUE:return i.includes(se.ENUM_VALUE);case Z.INPUT_DEF:return i.includes(se.INPUT_OBJECT);case Z.INPUT_VALUE_DEF:switch(r?.kind){case Z.ARGUMENTS_DEF:return i.includes(se.ARGUMENT_DEFINITION);case Z.INPUT_DEF:return i.includes(se.INPUT_FIELD_DEFINITION)}}return!1}function j0(e){return e.prevState&&e.kind&&[Z.NAMED_TYPE,Z.LIST_TYPE,Z.TYPE,Z.NON_NULL_TYPE].includes(e.kind)?j0(e.prevState):e}Oa(Om());function Tt(e,t){e.push(t)}function Dl(e,t){Ce(t)?(Dl(e,t.ofType),Tt(e,"!")):tt(t)?(Tt(e,"["),Dl(e,t.ofType),Tt(e,"]")):Tt(e,t.name)}function Na(e,t,n){const r=[],i="type"in e?e.type:e;return"type"in e&&e.description&&(Tt(r,e.description),Tt(r,` - -`)),Tt(r,s6(i,t)),n?(Tt(r,` -`),Tt(r,n)):!Ht(i)&&"description"in i&&i.description?(Tt(r,` -`),Tt(r,i.description)):"ofType"in i&&!Ht(i.ofType)&&"description"in i.ofType&&i.ofType.description&&(Tt(r,` -`),Tt(r,i.ofType.description)),r.join("")}function s6(e,t){const n=[];return t&&Tt(n,"```graphql\n"),Dl(n,e),t&&Tt(n,"\n```"),n.join("")}var a6={Int:{type:"integer"},String:{type:"string"},Float:{type:"number"},ID:{type:"string"},Boolean:{type:"boolean"},DateTime:{type:"string"}},o6=class{constructor(){this.set=new Set}mark(e){return this.set.has(e)?!1:(this.set.add(e),!0)}};function vl(e,t){var n,r;let i=Object.create(null);const s=Object.create(null),o="type"in e?e.type:e,u=Ce(o)?o.ofType:o,l=Ce(o);if(Ht(u))!((n=t?.scalarSchemas)===null||n===void 0)&&n[u.name]?i=JSON.parse(JSON.stringify(t.scalarSchemas[u.name])):i.type=["string","number","boolean","integer"],l||(Array.isArray(i.type)?i.type.push("null"):i.type?i.type=[i.type,"null"]:i.enum?i.enum.push(null):i.oneOf?i.oneOf.push({type:"null"}):i={oneOf:[i,{type:"null"}]});else if(Nt(u))i.enum=u.getValues().map(d=>d.name),l||i.enum.push(null);else if(tt(u)){l?i.type="array":i.type=["array","null"];const{definition:d,definitions:m}=vl(u.ofType,t);if(i.items=d,m)for(const p of Object.keys(m))s[p]=m[p]}else if(qe(u)&&(l?i.$ref=`#/definitions/${u.name}`:i.oneOf=[{$ref:`#/definitions/${u.name}`},{type:"null"}],!((r=t?.definitionMarker)===null||r===void 0)&&r.mark(u.name))){const d=u.getFields(),m={type:"object",properties:{},required:[]};m.description=Na(u),t?.useMarkdownDescription&&(m.markdownDescription=Na(u,!0));for(const p of Object.keys(d)){const g=d[p],{required:E,definition:A,definitions:T}=vl(g,t);if(m.properties[p]=A,E&&m.required.push(p),T)for(const[w,F]of Object.entries(T))s[w]=F}s[u.name]=m}"defaultValue"in e&&e.defaultValue!==void 0&&(i.default=e.defaultValue);const{description:c}=i;return i.description=Na(e,!1,c),t?.useMarkdownDescription&&(i.markdownDescription=Na(e,!0,c)),{required:l,definition:i,definitions:s}}function u6(e,t){var n;const r={$schema:"http://json-schema.org/draft-04/schema",type:"object",properties:{},required:[],additionalProperties:!1},i=Object.assign(Object.assign({},t),{definitionMarker:new o6,scalarSchemas:Object.assign(Object.assign({},a6),t?.scalarSchemas)});if(e)for(const[s,a]of Object.entries(e)){const{definition:o,required:u,definitions:l}=vl(a,i);r.properties[s]=o,u&&((n=r.required)===null||n===void 0||n.push(s)),l&&(r.definitions=Object.assign(Object.assign({},r?.definitions),l))}return r}var q0=class{constructor(e,t){this.containsPosition=n=>this.start.line===n.line?this.start.character<=n.character:this.end.line===n.line?this.end.character>=n.character:this.start.line<=n.line&&this.end.line>=n.line,this.start=e,this.end=t}setStart(e,t){this.start=new wr(e,t)}setEnd(e,t){this.end=new wr(e,t)}},wr=class{constructor(e,t){this.lessThanOrEqualTo=n=>this.line!(o===p1||o===l1));return n&&Array.prototype.push.apply(s,n),F1(e,t,s).filter(o=>{if(o.message.includes("Unknown directive")&&o.nodes){const u=o.nodes[0];if(u&&u.kind===b.DIRECTIVE){const l=u.name.value;if(l==="arguments"||l==="argumentDefinitions")return!1}}return!0})}function c6(e,t){const n=Object.create(null);for(const r of t.definitions)if(r.kind==="OperationDefinition"){const{variableDefinitions:i}=r;if(i)for(const{variable:s,type:a}of i){const o=Ut(e,a);o?n[s.name.value]=o:a.kind===b.NAMED_TYPE&&a.name.value==="Float"&&(n[s.name.value]=Hp)}}return n}function f6(e,t){const n=t?c6(t,e):void 0,r=[];return rr(e,{OperationDefinition(i){r.push(i)}}),{variableToType:n,operations:r}}var H0={Error:"Error",Warning:"Warning"},yl={[H0.Error]:1,[H0.Warning]:2},Ta=(e,t)=>{if(!e)throw new Error(t)};function d6(e,t=null,n,r,i){var s,a;let o=null,u="";i&&(u=typeof i=="string"?i:i.reduce((c,d)=>c+at(d)+` - -`,""));const l=u?`${e} - -${u}`:e;try{o=na(l)}catch(c){if(c instanceof z){const d=W0((a=(s=c.locations)===null||s===void 0?void 0:s[0])!==null&&a!==void 0?a:{line:0},l);return[{severity:yl.Error,message:c.message,source:"GraphQL: Syntax",range:d}]}throw c}return h6(o,t,n)}function h6(e,t=null,n,r){if(!t)return[];const i=l6(t,e,n).flatMap(a=>G0(a,yl.Error,"Validation")),s=F1(t,e,[vN]).flatMap(a=>G0(a,yl.Warning,"Deprecation"));return i.concat(s)}function G0(e,t,n){if(!e.nodes)return[];const r=[];for(const[i,s]of e.nodes.entries()){const a=s.kind!=="Variable"&&"name"in s&&s.name!==void 0?s.name:"variable"in s&&s.variable!==void 0?s.variable:s;if(a){Ta(e.locations,"GraphQL validation error requires locations.");const o=e.locations[i],u=p6(a),l=o.column+(u.end-u.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new q0(new wr(o.line-1,o.column-1),new wr(o.line-1,l))})}}return r}function W0(e,t){const n=k0(),r=n.startState(),i=t.split(` -`);Ta(i.length>=e.line,"Query text must have more lines than where the error happened");let s=null;for(let l=0;l{const{schema:n,documentAST:r,introspectionJSON:i,introspectionJSONString:s,buildSchemaOptions:a,documentString:o}=e;if(n)return n;if(s){const u=JSON.parse(s);return w1(u,a)}if(o&&t){const u=t(o);return R1(u,a)}if(i)return w1(i,a);if(r)return R1(r,a);throw new Error("No schema supplied")},b6=new Map,_6=class{_parser=na;_schemas=[];_schemaCache=b6;_schemaLoader=X0;_parseOptions;_customValidationRules;_externalFragmentDefinitionNodes=null;_externalFragmentDefinitionsString=null;_completionSettings;constructor({parser:e,schemas:t,parseOptions:n,externalFragmentDefinitions:r,customValidationRules:i,fillLeafsOnComplete:s,completionSettings:a}){this._schemaLoader=X0,t&&(this._schemas=t,this._cacheSchemas()),e&&(this._parser=e),this._completionSettings={...a,fillLeafsOnComplete:a?.fillLeafsOnComplete??s},n&&(this._parseOptions=n),i&&(this._customValidationRules=i),r&&(Array.isArray(r)?this._externalFragmentDefinitionNodes=r:this._externalFragmentDefinitionsString=r)}_cacheSchemas(){for(const e of this._schemas)this._cacheSchema(e)}_cacheSchema(e){const t=this._schemaLoader(e,this.parse.bind(this));return this._schemaCache.set(e.uri,{...e,schema:t})}getSchemaForFile(e){if(!this._schemas.length)return;if(this._schemas.length===1)return this._schemaCache.get(this._schemas[0].uri);const t=this._schemas.find(n=>n.fileMatch?n.fileMatch.some(r=>(0,E6.default)(r)(e)):!1);if(t){const n=this._schemaCache.get(t.uri);return n||this._cacheSchema(t).get(t.uri)}}getExternalFragmentDefinitions(){if(!this._externalFragmentDefinitionNodes&&this._externalFragmentDefinitionsString){const e=[];try{rr(this._parser(this._externalFragmentDefinitionsString),{FragmentDefinition(t){e.push(t)}})}catch{throw new Error(`Failed parsing externalFragmentDefinitions string: -${this._externalFragmentDefinitionsString}`)}this._externalFragmentDefinitionNodes=e}return this._externalFragmentDefinitionNodes}async updateSchemas(e){this._schemas=e,this._cacheSchemas()}updateSchema(e){const t=this._schemas.findIndex(n=>n.uri===e.uri);if(t<0){console.warn("updateSchema could not find a schema in your config by that URI",e.uri);return}this._schemas[t]=e,this._cacheSchema(e)}addSchema(e){this._schemas.push(e),this._cacheSchema(e)}parse(e,t){return this._parser(e,t||this._parseOptions)}getCompletion=(e,t,n)=>{const r=this.getSchemaForFile(e);return!t||!r?.schema?[]:qN(r.schema,t,n,void 0,this.getExternalFragmentDefinitions(),{uri:e,...this._completionSettings})};getDiagnostics=(e,t,n)=>{const r=this.getSchemaForFile(e);return!t||t.trim().length<2||!r?.schema?[]:d6(t,r.schema,n??this._customValidationRules,!1,this.getExternalFragmentDefinitions())};getHover=(e,t,n,r)=>{const i=this.getSchemaForFile(e);if(i&&t.length>3)return m6(i.schema,t,n,void 0,{useMarkdown:!0,...r})};getVariablesJSONSchema=(e,t,n)=>{const r=this.getSchemaForFile(e);if(r&&t.length>3)try{const i=this.parse(t),{variableToType:s}=f6(i,r.schema);if(s)return u6(s,{...n,scalarSchemas:r.customScalarSchemas})}catch{}return null}};function N6(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function Q0(e){return new wr(e.lineNumber-1,e.column-1)}function T6(e,t){return{label:e.label,insertText:e.insertText,sortText:e.sortText,filterText:e.filterText,...e.documentation&&{documentation:{value:e.documentation}},detail:e.detail,...t,kind:e.kind,...e.insertTextFormat&&{insertTextFormat:e.insertTextFormat},...e.insertTextMode&&{insertTextMode:e.insertTextMode},...e.command&&{command:{...e.command,id:e.command.command}},...e.labelDetails&&{labelDetails:e.labelDetails}}}function S6(e){const t={1:Dr.Error,2:Dr.Warning,3:Dr.Info,4:Dr.Hint};return e?t[e]:t[2]}function C6(e){return{startLineNumber:e.range.start.line+1,endLineNumber:e.range.end.line+1,startColumn:e.range.start.character+1,endColumn:e.range.end.character,message:e.message,severity:S6(e.severity),code:e.code||void 0}}var A6=class{_ctx;_languageService;_formattingOptions;constructor(e,t){this._ctx=e,this._languageService=new _6(t.languageConfig),this._formattingOptions=t.formattingOptions}async doValidation(e){try{const n=this._getTextModel(e)?.getValue();return n?this._languageService.getDiagnostics(e,n).map(C6):[]}catch(t){return console.error(t),[]}}async doComplete(e,t){try{const r=this._getTextModel(e)?.getValue();if(!r)return[];const i=Q0(t);return this._languageService.getCompletion(e,r,i).map(a=>T6(a))}catch(n){return console.error(n),[]}}async doHover(e,t){try{const r=this._getTextModel(e)?.getValue();if(!r)return null;const i=Q0(t),s=this._languageService.getHover(e,r,i),a={column:i.character,line:i.line};return{content:s,range:N6(W0(a,r))}}catch(n){return console.error(n),null}}async doGetVariablesJSONSchema(e){const t=this._getTextModel(e),n=t?.getValue();if(!t||!n)return null;const r=this._languageService.getVariablesJSONSchema(e,n,{useMarkdownDescription:!0});return r?{...r,$id:"monaco://variables-schema.json",title:"GraphQL Variables"}:null}async doFormat(e){const t=this._getTextModel(e),n=t?.getValue();if(!t||!n)return null;const r=await Promise.resolve().then(()=>(KD(),Ml)),i=await Promise.resolve().then(()=>Oa(ev()));return r.format(n,{parser:"graphql",plugins:[i],...this._formattingOptions?.prettierConfig})}_getTextModel(e){const t=this._ctx.getMirrorModels();for(const n of t)if(n.uri.toString()===e)return n;return null}doUpdateSchema(e){return this._languageService.updateSchema(e)}doUpdateSchemas(e){return this._languageService.updateSchemas(e)}};globalThis.onmessage=()=>{vp((e,t)=>new A6(e,t))}})(); diff --git a/raphtory-graphql/resources/index.html b/raphtory-graphql/resources/index.html index 8f00d5a5c1..1bb7f5acd8 100644 --- a/raphtory-graphql/resources/index.html +++ b/raphtory-graphql/resources/index.html @@ -4,242 +4,616 @@ Pometry UI - - +{ + graphs +} +`;function xon(){return{id:TPe(),title:"Query",query:bon,variables:"{}",result:"",headers:[]}}var wPe="pometry-playground-tabs";function nye(){try{const e=localStorage.getItem(wPe);if(!e)return null;const t=JSON.parse(e);if(t.tabs?.length>0){for(const r of t.tabs){const i=parseInt(r.id.replace("tab-",""),10);!isNaN(i)&&i>=l3&&(l3=i)}const n=t.headers??[];for(const r of t.tabs)r.headers||(r.headers=n.length>0?[...n]:[]);return{tabs:t.tabs,activeId:t.activeId}}}catch{}return null}function Ton(e,t){try{localStorage.setItem(wPe,JSON.stringify({tabs:e,activeId:t}))}catch{}}var won=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=cq(e.state,n.from);return r.line?Son(e):r.block?Con(e):!1};function lq(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var Son=lq(kon,0),Mon=lq(SPe,0),Con=lq((e,t)=>SPe(e,t,Zon(t)),0);function cq(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}var MM=50;function Ion(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-MM,r),o=e.sliceDoc(i,i+MM),s=/\s*$/.exec(a)[0].length,l=/^\s*/.exec(o)[0].length,c=a.length-s;if(a.slice(c-t.length,c)==t&&o.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let u,d;i-r<=2*MM?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+MM),d=e.sliceDoc(i-MM,i));let h=/^\s*/.exec(u)[0].length,f=/\s*$/.exec(d)[0].length,p=d.length-f-n.length;return u.slice(h,h+t.length)==t&&d.slice(p,p+n.length)==n?{open:{pos:r+h+t.length,margin:/\s/.test(u.charAt(h+t.length))?1:0},close:{pos:i-f-n.length,margin:/\s/.test(d.charAt(p-1))?1:0}}:null}function Zon(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function SPe(e,t,n=t.selection.ranges){let r=n.map(a=>cq(t,a.from).block);if(!r.every(a=>a))return null;let i=n.map((a,o)=>Ion(t,r[o],a.from,a.to));if(e!=2&&!i.every(a=>a))return{changes:t.changes(n.map((a,o)=>i[o]?[]:[{from:a.from,insert:r[o].open+" "},{from:a.to,insert:" "+r[o].close}]))};if(e!=1&&i.some(a=>a)){let a=[];for(let o=0,s;oi&&(a==o||o>d.from)){i=d.from;let h=/^\s*/.exec(d.text)[0].length,f=h==d.length,p=d.text.slice(h,h+c.length)==c?h:-1;ha.comment<0&&(!a.empty||a.single))){let a=[];for(let{line:s,token:l,indent:c,empty:u,single:d}of r)(d||!u)&&a.push({from:s.from+c,insert:l+" "});let o=t.changes(a);return{changes:o,selection:t.selection.map(o,1)}}else if(e!=1&&r.some(a=>a.comment>=0)){let a=[];for(let{line:o,comment:s,token:l}of r)if(s>=0){let c=o.from+s,u=c+l.length;o.text[u-o.from]==" "&&u++,a.push({from:c,to:u})}return{changes:a}}return null}var c3=lg.define(),Ron=lg.define(),Aon=br.define(),MPe=br.define({combine(e){return _p(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,n)=>(r,i)=>t(r,i)||n(r,i)})}}),CPe=Ic.define({create(){return _C.empty},update(e,t){let n=t.state.facet(MPe),r=t.annotation(c3);if(r){let l=Rm.fromTransaction(t,r.selection),c=r.side,u=c==0?e.undone:e.done;return l?u=TV(u,u.length,n.minDepth,l):u=kPe(u,t.startState.selection),new _C(c==0?r.rest:u,c==0?u:r.rest)}let i=t.annotation(Ron);if((i=="full"||i=="before")&&(e=e.isolate()),t.annotation(Du.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=Rm.fromTransaction(t),o=t.annotation(Du.time),s=t.annotation(Du.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i=="full"||i=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new _C(e.done.map(Rm.fromJSON),e.undone.map(Rm.fromJSON))}});function Non(e={}){return[CPe,MPe.of(e),Mr.domEventHandlers({beforeinput(t,n){let r=t.inputType=="historyUndo"?IPe:t.inputType=="historyRedo"?u3:null;return r?(t.preventDefault(),r(n)):!1}})]}function G5(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(CPe,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var IPe=G5(0,!1),u3=G5(1,!1),Xon=G5(0,!0),Eon=G5(1,!0),Rm=class gC{constructor(t,n,r,i,a){this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=a}setSelAfter(t){return new gC(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,r;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(t){return new gC(t.changes&&Rf.fromJSON(t.changes),[],t.mapped&&tT.fromJSON(t.mapped),t.startSelection&&xn.fromJSON(t.startSelection),t.selectionsAfter.map(xn.fromJSON))}static fromTransaction(t,n){let r=hh;for(let i of t.startState.facet(Aon)){let a=i(t);a.length&&(r=r.concat(a))}return!r.length&&t.changes.empty?null:new gC(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,hh)}static selection(t){return new gC(void 0,hh,void 0,void 0,t)}};function TV(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function Von(e,t){let n=[],r=!1;return e.iterChangedRanges((i,a)=>n.push(i,a)),t.iterChangedRanges((i,a,o,s)=>{for(let l=0;l=c&&o<=u&&(r=!0)}}),r}function Gon(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,r)=>n.empty!=t.ranges[r].empty).length===0}function ZPe(e,t){return e.length?t.length?e.concat(t):e:t}var hh=[],Don=200;function kPe(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Don));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),TV(e,e.length-1,1e9,n.setSelAfter(r)))}else return[Rm.selection([t])]}function Won(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function XY(e,t){if(!e.length)return e;let n=e.length,r=hh;for(;n;){let i=Oon(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let a=e.slice(0,n);return a[n-1]=i,a}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Rm.selection(r)]:hh}function Oon(e,t,n){let r=ZPe(e.selectionsAfter.length?e.selectionsAfter.map(s=>s.map(t)):hh,n);if(!e.changes)return Rm.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new Rm(i,Ai.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Lon=/^(input\.type|delete)($|\.)/,_C=class vC{constructor(t,n,r=0,i=void 0){this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new vC(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Lon.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?e.moveByChar(n,t):D5(n,t))}function Zc(e){return e.textDirectionAt(e.state.selection.main.head)==ho.LTR}var APe=e=>RPe(e,!Zc(e)),NPe=e=>RPe(e,Zc(e));function XPe(e,t){return Ff(e,n=>n.empty?e.moveByGroup(n,t):D5(n,t))}var Hon=e=>XPe(e,!Zc(e)),Fon=e=>XPe(e,Zc(e));function Uon(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function W5(e,t,n){let r=Cc(e).resolveInner(t.head),i=n?ji.closedBy:ji.openedBy;for(let l=t.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;Uon(e,c,i)?r=c:l=n?c.to:c.from}let a=r.type.prop(i),o,s;return a&&(o=n?Cp(e,r.from,1):Cp(e,r.to,-1))&&o.matched?s=n?o.end.to:o.end.from:s=n?r.to:r.from,xn.cursor(s,n?-1:1)}var zon=e=>Ff(e,t=>W5(e.state,t,!Zc(e))),Yon=e=>Ff(e,t=>W5(e.state,t,Zc(e)));function EPe(e,t){return Ff(e,n=>{if(!n.empty)return D5(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}var VPe=e=>EPe(e,!1),GPe=e=>EPe(e,!0);function DPe(e){let t=e.scrollDOM.clientHeighto.empty?e.moveVertically(o,t,n.height):D5(o,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let o=e.coordsAtPos(r.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,c=s.bottom-n.marginBottom;o&&o.top>l&&o.bottomWPe(e,!1),d3=e=>WPe(e,!0);function pv(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let a=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;a&&t.head!=r.from+a&&(i=xn.cursor(r.from+a))}return i}var Bon=e=>Ff(e,t=>pv(e,t,!0)),_on=e=>Ff(e,t=>pv(e,t,!1)),jon=e=>Ff(e,t=>pv(e,t,!Zc(e))),Qon=e=>Ff(e,t=>pv(e,t,Zc(e))),Kon=e=>Ff(e,t=>xn.cursor(e.lineBlockAt(t.head).from,1)),Jon=e=>Ff(e,t=>xn.cursor(e.lineBlockAt(t.head).to,-1));function qon(e,t,n){let r=!1,i=Bw(e.selection,a=>{let o=Cp(e,a.head,-1)||Cp(e,a.head,1)||a.head>0&&Cp(e,a.head-1,1)||a.headqon(e,t);function Wh(e,t){let n=Bw(e.state.selection,r=>{let i=t(r);return xn.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});return n.eq(e.state.selection)?!1:(e.dispatch(Hf(e.state,n)),!0)}function OPe(e,t){return Wh(e,n=>e.moveByChar(n,t))}var LPe=e=>OPe(e,!Zc(e)),PPe=e=>OPe(e,Zc(e));function HPe(e,t){return Wh(e,n=>e.moveByGroup(n,t))}var esn=e=>HPe(e,!Zc(e)),tsn=e=>HPe(e,Zc(e)),nsn=e=>Wh(e,t=>W5(e.state,t,!Zc(e))),rsn=e=>Wh(e,t=>W5(e.state,t,Zc(e)));function FPe(e,t){return Wh(e,n=>e.moveVertically(n,t))}var UPe=e=>FPe(e,!1),zPe=e=>FPe(e,!0);function YPe(e,t){return Wh(e,n=>e.moveVertically(n,t,DPe(e).height))}var iye=e=>YPe(e,!1),aye=e=>YPe(e,!0),isn=e=>Wh(e,t=>pv(e,t,!0)),asn=e=>Wh(e,t=>pv(e,t,!1)),osn=e=>Wh(e,t=>pv(e,t,!Zc(e))),ssn=e=>Wh(e,t=>pv(e,t,Zc(e))),lsn=e=>Wh(e,t=>xn.cursor(e.lineBlockAt(t.head).from)),csn=e=>Wh(e,t=>xn.cursor(e.lineBlockAt(t.head).to)),oye=({state:e,dispatch:t})=>(t(Hf(e,{anchor:0})),!0),sye=({state:e,dispatch:t})=>(t(Hf(e,{anchor:e.doc.length})),!0),lye=({state:e,dispatch:t})=>(t(Hf(e,{anchor:e.selection.main.anchor,head:0})),!0),cye=({state:e,dispatch:t})=>(t(Hf(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),usn=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),dsn=({state:e,dispatch:t})=>{let n=O5(e).map(({from:r,to:i})=>xn.range(r,Math.min(i+1,e.doc.length)));return t(e.update({selection:xn.create(n),userEvent:"select"})),!0},hsn=({state:e,dispatch:t})=>{let n=Bw(e.selection,r=>{let i=Cc(e),a=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=a.node.from&&o.node.to<=a.node.to&&(a=o)}for(let o=a;o;o=o.next){let{node:s}=o;if((s.from=r.to||s.to>r.to&&s.from<=r.from)&&o.next)return xn.range(s.to,s.from)}return r});return n.eq(e.selection)?!1:(t(Hf(e,n)),!0)};function BPe(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let a of n.selection.ranges){let o=n.doc.lineAt(a.head);if(t?o.to0)for(let s=a;;){let l=e.moveVertically(s,t);if(l.heado.to){i.some(c=>c.head==l.head)||i.push(l);break}else{if(l.head==s.head)break;s=l}}}return i.length==r.ranges.length?!1:(e.dispatch(Hf(n,xn.create(i,i.length-1))),!0)}var fsn=e=>BPe(e,!1),psn=e=>BPe(e,!0),msn=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=xn.create([n.main]):n.main.empty||(r=xn.create([xn.cursor(n.main.head)])),r?(t(Hf(e,r)),!0):!1};function zk(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(a=>{let{from:o,to:s}=a;if(o==s){let l=t(a);lo&&(n="delete.forward",l=vX(e,l,!0)),o=Math.min(o,l),s=Math.max(s,l)}else o=vX(e,o,!1),s=vX(e,s,!0);return o==s?{range:a}:{changes:{from:o,to:s},range:xn.cursor(o,oi(e)))r.between(t,t,(i,a)=>{it&&(t=n?a:i)});return t}var _Pe=(e,t,n)=>zk(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,l;if(n&&!t&&i>o.from&&i_Pe(e,!1,!0),jPe=e=>_Pe(e,!0,!1),QPe=(e,t)=>zk(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let s=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let l=El(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,l)-a.from,Math.max(r,l)-a.from),u=o(c);if(s!=null&&u!=s)break;(c!=" "||r!=n.head)&&(s=u),r=l}return r}),KPe=e=>QPe(e,!1),gsn=e=>QPe(e,!0),vsn=e=>zk(e,t=>{let n=e.lineBlockAt(t.head).to;return t.headzk(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),bsn=e=>zk(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head{if(e.readOnly)return!1;let n=e.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ra.of(["",""])},range:xn.cursor(r.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Tsn=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(r=>{if(!r.empty||r.from==0||r.from==e.doc.length)return{range:r};let i=r.from,a=e.doc.lineAt(i),o=i==a.from?i-1:El(a.text,i-a.from,!1)+a.from,s=i==a.to?i+1:El(a.text,i-a.from,!0)+a.from;return{changes:{from:o,to:s,insert:e.doc.slice(i,s).append(e.doc.slice(o,i))},range:xn.cursor(s)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function O5(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let o=t[t.length-1];o.to=a.to,o.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function JPe(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let a of O5(e)){if(n?a.to==e.doc.length:a.from==0)continue;let o=e.doc.lineAt(n?a.to+1:a.from-1),s=o.length+1;if(n){r.push({from:a.to,to:o.to},{from:a.from,insert:o.text+e.lineBreak});for(let l of a.ranges)i.push(xn.range(Math.min(e.doc.length,l.anchor+s),Math.min(e.doc.length,l.head+s)))}else{r.push({from:o.from,to:a.from},{from:a.to,insert:e.lineBreak+o.text});for(let l of a.ranges)i.push(xn.range(l.anchor-s,l.head-s))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:xn.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}var wsn=({state:e,dispatch:t})=>JPe(e,t,!1),Ssn=({state:e,dispatch:t})=>JPe(e,t,!0);function qPe(e,t,n){if(e.readOnly)return!1;let r=[];for(let a of O5(e))n?r.push({from:a.from,insert:e.doc.slice(a.from,a.to)+e.lineBreak}):r.push({from:a.to,insert:e.lineBreak+e.doc.slice(a.from,a.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}var Msn=({state:e,dispatch:t})=>qPe(e,t,!1),Csn=({state:e,dispatch:t})=>qPe(e,t,!0),Isn=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(O5(t).map(({from:i,to:a})=>(i>0?i--:a{let a;if(e.lineWrapping){let o=e.lineBlockAt(i.head),s=e.coordsAtPos(i.head,i.assoc||1);s&&(a=o.bottom+e.documentTop-s.bottom+e.defaultLineHeight/2)}return e.moveVertically(i,!0,a)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Zsn(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Cc(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(ji.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var uye=$Pe(!1),ksn=$Pe(!0);function $Pe(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(i=>{let{from:a,to:o}=i,s=t.doc.lineAt(a),l=!e&&a==o&&Zsn(t,a);e&&(a=o=(o<=s.to?s:t.doc.lineAt(o)).to);let c=new k5(t,{simulateBreak:a,simulateDoubleBreak:!!l}),u=W8(c,a);for(u==null&&(u=Fw(/^\s*/.exec(t.doc.lineAt(a).text)[0],t.tabSize));os.from&&a{let i=[];for(let o=r.from;o<=r.to;){let s=e.doc.lineAt(o);s.number>n&&(r.empty||r.to>s.from)&&(t(s,i,r),n=s.number),o=s.to+1}let a=e.changes(i);return{changes:i,range:xn.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var Rsn=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new k5(e,{overrideIndentation:a=>{let o=n[a];return o??-1}}),i=uq(e,(a,o,s)=>{let l=W8(r,a.from);if(l==null)return;/\S/.test(a.text)||(l=0);let c=/^\s*/.exec(a.text)[0],u=$I(e,l);(c!=u||s.frome.readOnly?!1:(t(e.update(uq(e,(n,r)=>{r.push({from:n.from,insert:e.facet(D8)})}),{userEvent:"input.indent"})),!0),Nsn=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(uq(e,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let a=Fw(i,e.tabSize),o=0,s=$I(e,Math.max(0,a-aV(e)));for(;o(e.setTabFocusMode(),!0),Esn=[{key:"Ctrl-b",run:APe,shift:LPe,preventDefault:!0},{key:"Ctrl-f",run:NPe,shift:PPe},{key:"Ctrl-p",run:VPe,shift:UPe},{key:"Ctrl-n",run:GPe,shift:zPe},{key:"Ctrl-a",run:Kon,shift:lsn},{key:"Ctrl-e",run:Jon,shift:csn},{key:"Ctrl-d",run:jPe},{key:"Ctrl-h",run:h3},{key:"Ctrl-k",run:vsn},{key:"Ctrl-Alt-h",run:KPe},{key:"Ctrl-o",run:xsn},{key:"Ctrl-t",run:Tsn},{key:"Ctrl-v",run:d3}],Vsn=[{key:"ArrowLeft",run:APe,shift:LPe,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Hon,shift:esn,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:jon,shift:osn,preventDefault:!0},{key:"ArrowRight",run:NPe,shift:PPe,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Fon,shift:tsn,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Qon,shift:ssn,preventDefault:!0},{key:"ArrowUp",run:VPe,shift:UPe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:oye,shift:lye},{mac:"Ctrl-ArrowUp",run:rye,shift:iye},{key:"ArrowDown",run:GPe,shift:zPe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:sye,shift:cye},{mac:"Ctrl-ArrowDown",run:d3,shift:aye},{key:"PageUp",run:rye,shift:iye},{key:"PageDown",run:d3,shift:aye},{key:"Home",run:_on,shift:asn,preventDefault:!0},{key:"Mod-Home",run:oye,shift:lye},{key:"End",run:Bon,shift:isn,preventDefault:!0},{key:"Mod-End",run:sye,shift:cye},{key:"Enter",run:uye,shift:uye},{key:"Mod-a",run:usn},{key:"Backspace",run:h3,shift:h3,preventDefault:!0},{key:"Delete",run:jPe,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:KPe,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:gsn,preventDefault:!0},{mac:"Mod-Backspace",run:ysn,preventDefault:!0},{mac:"Mod-Delete",run:bsn,preventDefault:!0}].concat(Esn.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),Gsn=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:zon,shift:nsn},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Yon,shift:rsn},{key:"Alt-ArrowUp",run:wsn},{key:"Shift-Alt-ArrowUp",run:Msn},{key:"Alt-ArrowDown",run:Ssn},{key:"Shift-Alt-ArrowDown",run:Csn},{key:"Mod-Alt-ArrowUp",run:fsn},{key:"Mod-Alt-ArrowDown",run:psn},{key:"Escape",run:msn},{key:"Mod-Enter",run:ksn},{key:"Alt-l",mac:"Ctrl-l",run:dsn},{key:"Mod-i",run:hsn,preventDefault:!0},{key:"Mod-[",run:Nsn},{key:"Mod-]",run:Asn},{key:"Mod-Alt-\\",run:Rsn},{key:"Shift-Mod-k",run:Isn},{key:"Shift-Mod-\\",run:$on},{key:"Mod-/",run:won},{key:"Alt-A",run:Mon},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Xsn}].concat(Vsn),dye=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e,lw=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?o=>i(dye(o)):dye,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return wu(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=y8(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=bp(e);let r=this.normalize(t);if(r.length)for(let i=0,a=n;;i++){let o=r.charCodeAt(i),s=this.match(o,a,this.bufferPos+this.bufferStart);if(i==r.length-1){if(s)return this.value=s,this;break}a==n&&ithis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=wV(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=n){let s=new bE(n,t.sliceString(n,r));return EY.set(t,s),s}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,r=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this.matchPos=wV(this.text,r+(n==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=hye.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(tHe.prototype[Symbol.iterator]=nHe.prototype[Symbol.iterator]=function(){return this});function Dsn(e){try{return new RegExp(e,dq),!0}catch{return!1}}function wV(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t=56320&&r<57344;)t++;return t}var Wsn=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=mtn(e,{label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return i.then(a=>{let o=a&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(a.elements.line.value);if(!o){e.dispatch({effects:r});return}let s=t.doc.lineAt(t.selection.main.head),[,l,c,u,d]=o,h=u?+u.slice(1):0,f=c?+c:s.number;if(c&&d){let v=f/100;l&&(v=v*(l=="-"?-1:1)+s.number/t.doc.lines),f=Math.round(t.doc.lines*v)}else c&&l&&(f=f*(l=="-"?-1:1)+s.number);let p=t.doc.line(Math.max(1,Math.min(t.doc.lines,f))),g=xn.cursor(p.from+Math.max(0,Math.min(h,p.length)));e.dispatch({effects:[r,Mr.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},Osn={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Lsn=br.define({combine(e){return _p(e,Osn,{highlightWordAroundCursor:(t,n)=>t||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Psn(e){return[Ysn,zsn]}var Hsn=ri.mark({class:"cm-selectionMatch"}),Fsn=ri.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function fye(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=Ho.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=Ho.Word)}function Usn(e,t,n,r){return e(t.sliceDoc(n,n+1))==Ho.Word&&e(t.sliceDoc(r-1,r))==Ho.Word}var zsn=vl.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Lsn),{state:n}=e,r=n.selection;if(r.ranges.length>1)return ri.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return ri.none;let l=n.wordAt(i.head);if(!l)return ri.none;o=n.charCategorizer(i.head),a=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return ri.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(fye(o,n,i.from,i.to)&&Usn(o,n,i.from,i.to)))return ri.none}else if(a=n.sliceDoc(i.from,i.to),!a)return ri.none}let s=[];for(let l of e.visibleRanges){let c=new lw(n.doc,a,l.from,l.to);for(;!c.next().done;){let{from:u,to:d}=c.value;if((!o||fye(o,n,u,d))&&(i.empty&&u<=i.from&&d>=i.to?s.push(Fsn.range(u,d)):(u>=i.to||d<=i.from)&&s.push(Hsn.range(u,d)),s.length>t.maxMatches))return ri.none}}return ri.set(s)}},{decorations:e=>e.decorations}),Ysn=Mr.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Bsn=({state:e,dispatch:t})=>{let{selection:n}=e,r=xn.create(n.ranges.map(i=>e.wordAt(i.head)||xn.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function _sn(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let o=!1,s=new lw(e.doc,t,r[r.length-1].to);;)if(s.next(),s.done){if(o)return null;s=new lw(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(l=>l.from==s.value.from))continue;if(a){let l=e.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}var jsn=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(a=>a.from===a.to))return Bsn({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(a=>e.sliceDoc(a.from,a.to)!=r))return!1;let i=_sn(e,r);return i?(t(e.update({selection:e.selection.addRange(xn.range(i.from,i.to),!1),effects:Mr.scrollIntoView(i.to)})),!0):!1},_w=br.define({combine(e){return _p(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new lln(t),scrollToMatch:t=>Mr.scrollIntoView(t)})}}),rHe=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Dsn(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?` +`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new eln(this):new Jsn(this)}getCursor(e,t=0,n){let r=e.doc?e:qo.create({doc:e});return n==null&&(n=r.doc.length),this.regexp?wx(this,r,t,n):Tx(this,r,t,n)}},iHe=class{constructor(e){this.spec=e}};function Qsn(e,t,n){return(r,i,a,o)=>{if(n&&!n(r,i,a,o))return!1;let s=r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i);return e(s,t,r,i)}}function Tx(e,t,n,r){let i;return e.wholeWord&&(i=Ksn(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=Qsn(e.test,t,i)),new lw(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:a=>a.toLowerCase(),i)}function Ksn(e,t){return(n,r,i,a)=>((a>n||a+i.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Tx(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function qsn(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function wx(e,t,n,r){let i;return e.wholeWord&&(i=$sn(t.charCategorizer(t.selection.main.head))),e.test&&(i=qsn(e.test,t,i)),new tHe(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function SV(e,t){return e.slice(El(e,t,!1),t)}function MV(e,t){return e.slice(t,El(e,t))}function $sn(e){return(t,n,r)=>!r[0].length||(e(SV(r.input,r.index))!=Ho.Word||e(MV(r.input,r.index))!=Ho.Word)&&(e(MV(r.input,r.index+r[0].length))!=Ho.Word||e(SV(r.input,r.index+r[0].length))!=Ho.Word)}var eln=class extends iHe{nextMatch(e,t,n){let r=wx(this.spec,e,n,e.doc.length).next();return r.done&&(r=wx(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=wx(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let r=n.length;r>0;r--){let i=+n.slice(0,r);if(i>0&&i=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=wx(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},aZ=Ai.define(),hq=Ai.define(),S0=Ic.define({create(e){return new VY(f3(e).create(),null)},update(e,t){for(let n of t.effects)n.is(aZ)?e=new VY(n.value.create(),e.panel):n.is(hq)&&(e=new VY(e.query,n.value?fq:null));return e},provide:e=>qI.from(e,t=>t.panel)}),VY=class{constructor(e,t){this.query=e,this.panel=t}},tln=ri.mark({class:"cm-searchMatch"}),nln=ri.mark({class:"cm-searchMatch cm-searchMatch-selected"}),rln=vl.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(S0))}update(e){let t=e.state.field(S0);(t!=e.startState.field(S0)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return ri.none;let{view:n}=this,r=new pb;for(let i=0,a=n.visibleRanges,o=a.length;ia[i+1].from-500;)l=a[++i].to;e.highlight(n.state,s,l,(c,u)=>{let d=n.state.selection.ranges.some(h=>h.from==c&&h.to==u);r.add(c,u,d?nln:tln)})}return r.finish()}},{decorations:e=>e.decorations});function Yk(e){return t=>{let n=t.state.field(S0,!1);return n&&n.query.spec.valid?e(t,n):sHe(t)}}var CV=Yk((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=xn.single(r.from,r.to),a=e.state.facet(_w);return e.dispatch({selection:i,effects:[pq(e,r),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),oHe(e),!0}),IV=Yk((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=xn.single(i.from,i.to),o=e.state.facet(_w);return e.dispatch({selection:a,effects:[pq(e,i),o.scrollToMatch(a.main,e)],userEvent:"select.search"}),oHe(e),!0}),iln=Yk((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:xn.create(n.map(r=>xn.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),aln=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let s=new lw(e.doc,e.sliceDoc(r,i));!s.next().done;){if(a.length>1e3)return!1;s.value.from==r&&(o=a.length),a.push(xn.range(s.value.from,s.value.to))}return t(e.update({selection:xn.create(a,o),userEvent:"select.search.matches"})),!0},pye=Yk((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],l,c,u=[];o.from==r&&o.to==i&&(c=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:c}),o=t.nextMatch(n,o.from,o.to),u.push(Mr.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=e.state.changes(s);return o&&(l=xn.single(o.from,o.to).map(d),u.push(pq(e,o)),u.push(n.facet(_w).scrollToMatch(l.main,e))),e.dispatch({changes:d,selection:l,effects:u,userEvent:"input.replace"}),!0}),oln=Yk((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(i=>{let{from:a,to:o}=i;return{from:a,to:o,insert:t.getReplacement(i)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:Mr.announce.of(r),userEvent:"input.replace.all"}),!0});function fq(e){return e.state.facet(_w).createPanel(e)}function f3(e,t){var n,r,i,a,o;let s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;let c=e.facet(_w);return new rHe({search:((n=t?.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=t?.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=t?.literal)!==null&&i!==void 0?i:c.literal,regexp:(a=t?.regexp)!==null&&a!==void 0?a:c.regexp,wholeWord:(o=t?.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function aHe(e){let t=G8(e,fq);return t&&t.dom.querySelector("[main-field]")}function oHe(e){let t=aHe(e);t&&t==e.root.activeElement&&t.select()}var sHe=e=>{let t=e.state.field(S0,!1);if(t&&t.panel){let n=aHe(e);if(n&&n!=e.root.activeElement){let r=f3(e.state,t.query.spec);r.valid&&e.dispatch({effects:aZ.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[hq.of(!0),t?aZ.of(f3(e.state,t.query.spec)):Ai.appendConfig.of(uln)]});return!0},lHe=e=>{let t=e.state.field(S0,!1);if(!t||!t.panel)return!1;let n=G8(e,fq);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:hq.of(!1)}),!0},sln=[{key:"Mod-f",run:sHe,scope:"editor search-panel"},{key:"F3",run:CV,shift:IV,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:CV,shift:IV,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:lHe,scope:"editor search-panel"},{key:"Mod-Shift-l",run:aln},{key:"Mod-Alt-g",run:Wsn},{key:"Mod-d",run:jsn,preventDefault:!0}],lln=class{constructor(e){this.view=e;let t=this.query=e.state.field(S0).query.spec;this.commit=this.commit.bind(this),this.searchField=Ja("input",{value:t.search,placeholder:id(e,"Find"),"aria-label":id(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ja("input",{value:t.replace,placeholder:id(e,"Replace"),"aria-label":id(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ja("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Ja("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Ja("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(r,i,a){return Ja("button",{class:"cm-button",name:r,onclick:i,type:"button"},a)}this.dom=Ja("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,n("next",()=>CV(e),[id(e,"next")]),n("prev",()=>IV(e),[id(e,"previous")]),n("select",()=>iln(e),[id(e,"all")]),Ja("label",null,[this.caseField,id(e,"match case")]),Ja("label",null,[this.reField,id(e,"regexp")]),Ja("label",null,[this.wordField,id(e,"by word")]),...e.state.readOnly?[]:[Ja("br"),this.replaceField,n("replace",()=>pye(e),[id(e,"replace")]),n("replaceAll",()=>oln(e),[id(e,"replace all")])],Ja("button",{name:"close",onclick:()=>lHe(e),"aria-label":id(e,"close"),type:"button"},["×"])])}commit(){let e=new rHe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:aZ.of(e)}))}keydown(e){Zen(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?IV:CV)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),pye(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(aZ)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(_w).top}};function id(e,t){return e.state.phrase(t)}var yX=30,bX=/[\s\.,:;?!]/;function pq(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-yX),o=Math.min(i,n+yX),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let l=0;ls.length-yX;l--)if(!bX.test(s[l-1])&&bX.test(s[l])){s=s.slice(0,l);break}}return Mr.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`)}var cln=Mr.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),uln=[S0,fv.low(rln),cln],cHe=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Cc(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(uHe(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function mye(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function dln(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let a=1;atypeof i=="string"?{label:i}:i),[n,r]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:dln(t);return i=>{let a=i.matchBefore(r);return a||i.explicit?{from:a?a.from:i.pos,options:t,validFor:n}:null}}var gye=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function Uy(e){return e.selection.main.from}function uHe(e,t){var n;let{source:r}=e,i=t&&r[0]!="^",a=r[r.length-1]!="$";return!i&&!a?e:new RegExp(`${i?"^":""}(?:${r})${a?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":"")}var dHe=lg.define();function fln(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let l=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:l},range:xn.cursor(s.from+a+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}var vye=new WeakMap;function pln(e){if(!Array.isArray(e))return e;let t=vye.get(e);return t||vye.set(e,t=hln(e)),t}var ZV=Ai.define(),oZ=Ai.define(),mln=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&M<=57||M>=97&&M<=122?2:M>=65&&M<=90?1:0:(C=y8(M))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!b||I==1&&g||w==0&&I!=0)&&(t[u]==M||n[u]==M&&(d=!0)?a[u++]=b:a.length&&(v=!1)),w=I,b+=bp(M)}return u==s&&a[0]==0&&v?this.result(-100+(d?-200:0),a,e):h==s&&f==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):h==s?this.ret(-900-e.length,[f,p]):u==s?this.result(-100+(d?-200:0)+-700+(v?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let a of t){let o=a+(this.astral?bp(wu(n,a)):1);i&&r[i-1]==a?r[i-1]=o:(r[i++]=a,r[i++]=o)}return this.ret(e-n.length,r)}},gln=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:vln,filterStrict:!1,compareCompletions:(t,n)=>(t.sortText||t.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,n)=>t&&n,closeOnBlur:(t,n)=>t&&n,icons:(t,n)=>t&&n,tooltipClass:(t,n)=>r=>yye(t(r),n(r)),optionClass:(t,n)=>r=>yye(t(r),n(r)),addToOptions:(t,n)=>t.concat(n),filterStrict:(t,n)=>t||n})}});function yye(e,t){return e?t?e+" "+t:e:t}function vln(e,t,n,r,i,a){let o=e.textDirection==ho.RTL,s=o,l=!1,c="top",u,d,h=t.left-i.left,f=i.right-t.right,p=r.right-r.left,g=r.bottom-r.top;if(s&&h=g||T>t.top?u=n.bottom-t.top:(c="bottom",u=t.bottom-n.top)}let v=(t.bottom-t.top)/a.offsetHeight,b=(t.right-t.left)/a.offsetWidth;return{style:`${c}: ${u/v}px; max-width: ${d/b}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":s?"left":"right")}}var mq=Ai.define();function yln(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),t.push({render(n,r,i,a){let o=document.createElement("span");o.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;cl&&o.appendChild(document.createTextNode(s.slice(l,u)));let h=o.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(s.slice(u,d))),h.className="cm-completionMatchedText",l=d}return ln.position-r.position).map(n=>n.render)}function GY(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let i=Math.floor(t/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}var bln=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:s=>this.placeInfo(s),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(Al);this.optionContent=yln(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=GY(i.length,a,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",s=>{let{options:l}=e.state.field(t).open;for(let c=s.target,u;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(u=/-(\d+)$/.exec(c.id))&&+u[1]this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:mq.of(c)}),s.preventDefault())}}),this.dom.addEventListener("focusout",s=>{let l=e.state.field(this.stateField,!1);l&&l.tooltip&&e.state.facet(Al).closeOnBlur&&s.relatedTarget!=e.contentDOM&&e.dispatch({effects:oZ.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:a,disabled:o}=n.open;(!r.open||r.open.options!=i)&&(this.range=GY(i.length,a,e.state.facet(Al).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),o!=((t=r.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected=this.range.to)&&(this.range=GY(t.options.length,t.selected,this.view.state.facet(Al).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i=="string"?document.createTextNode(i):i(r);if(!a)return;"then"in a?a.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,r)}).catch(o=>nu(this.view.state,o,"completion info")):(this.addInfoPane(a,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:i}=e;n.appendChild(r),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!="LI"||!n.id?r--:r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&Tln(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let a=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom{a.target==r&&a.preventDefault()});let i=null;for(let a=n.from;an.from||n.from==0))if(i=d,typeof l!="string"&&l.header)r.appendChild(l.header(l));else{let h=r.appendChild(document.createElement("completion-section"));h.textContent=d}}const c=r.appendChild(document.createElement("li"));c.id=t+"-"+a,c.setAttribute("role","option");let u=this.optionClass(o);u&&(c.className=u);for(let d of this.optionContent){let h=d(o,this.view.state,this.view,s);h&&c.appendChild(h)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.tonew bln(n,e,t)}function Tln(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function bye(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function wln(e,t){let n=[],r=null,i=null,a=u=>{n.push(u);let{section:d}=u.completion;if(d){r||(r=[]);let h=typeof d=="string"?d:d.name;r.some(f=>f.name==h)||r.push(typeof d=="string"?{name:h}:d)}},o=t.facet(Al);for(let u of e)if(u.hasResult()){let d=u.result.getMatch;if(u.result.filter===!1)for(let h of u.result.options)a(new gye(h,u.source,d?d(h):[],1e9-n.length));else{let h=t.sliceDoc(u.from,u.to),f,p=o.filterStrict?new gln(h):new mln(h);for(let g of u.result.options)if(f=p.match(g.label)){let v=g.displayLabel?d?d(g,f.matched):[]:f.matched,b=f.score+(g.boost||0);if(a(new gye(g,u.source,v,b)),typeof g.section=="object"&&g.section.rank==="dynamic"){let{name:T}=g.section;i||(i=Object.create(null)),i[T]=Math.max(b,i[T]||-1e9)}}}}if(r){let u=Object.create(null),d=0,h=(f,p)=>(f.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[f.name]:0)||(typeof f.rank=="number"?f.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(f.nameh.score-d.score||c(d.completion,h.completion))){let d=u.completion;!l||l.label!=d.label||l.detail!=d.detail||l.type!=null&&d.type!=null&&l.type!=d.type||l.apply!=d.apply||l.boost!=d.boost?s.push(u):bye(u.completion)>bye(l)&&(s[s.length-1]=u),l=u.completion}return s}var Sln=class yC{constructor(t,n,r,i,a,o){this.options=t,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=a,this.disabled=o}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new yC(this.options,xye(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(c=>c.isPending))return i.setDisabled();let s=wln(t,n);if(!s.length)return i&&t.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Al).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:Aln,above:a.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(t){return new yC(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new yC(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Mln=class p3{constructor(t,n,r){this.active=t,this.id=n,this.open=r}static start(){return new p3(kln,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(Al),a=(r.override||n.languageDataAt("autocomplete",Uy(n)).map(pln)).map(l=>(this.active.find(u=>u.source==l)||new ky(l,this.active.some(u=>u.state!=0)?1:0)).update(t,r));a.length==this.active.length&&a.every((l,c)=>l==this.active[c])&&(a=this.active);let o=this.open,s=t.effects.some(l=>l.is(gq));o&&t.docChanged&&(o=o.map(t.changes)),t.selection||a.some(l=>l.hasResult()&&t.changes.touchesRange(l.from,l.to))||!Cln(a,this.active)||s?o=Sln.build(a,n,this.id,o,r,s):o&&o.disabled&&!a.some(l=>l.isPending)&&(o=null),!o&&a.every(l=>!l.isPending)&&a.some(l=>l.hasResult())&&(a=a.map(l=>l.hasResult()?new ky(l.source,0):l));for(let l of t.effects)l.is(mq)&&(o=o&&o.setSelected(l.value,this.id));return a==this.active&&o==this.open?this:new p3(a,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Iln:Zln}};function Cln(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=e+"-"+t),n}var kln=[];function hHe(e,t){if(e.isUserEvent("input.complete")){let r=e.annotation(dHe);if(r&&t.activateOnCompletion(r))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}var ky=class bC{constructor(t,n,r=!1){this.source=t,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=hHe(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new bC(i.source,0)),r&4&&i.state==0&&(i=new bC(this.source,1)),i=i.updateFor(t,r);for(let a of t.effects)if(a.is(ZV))i=new bC(i.source,1,a.value);else if(a.is(oZ))i=new bC(i.source,0);else if(a.is(gq))for(let o of a.value)o.source==i.source&&(i=o);return i}updateFor(t,n){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(Uy(t.state))}},fHe=class xE extends ky{constructor(t,n,r,i,a,o){super(t,3,n),this.limit=r,this.result=i,this.from=a,this.to=o}hasResult(){return!0}updateFor(t,n){var r;if(!(n&3))return this.map(t.changes);let i=this.result;i.map&&!t.changes.empty&&(i=i.map(i,t.changes));let a=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),s=Uy(t.state);if(s>o||!i||n&2&&(Uy(t.startState)==this.from||sn.map(t))}}),Su=Ic.define({create(){return Mln.start()},update(e,t){return e.update(t)},provide:e=>[V8.from(e,t=>t.tooltip),Mr.contentAttributes.from(e,t=>t.attrs)]});function vq(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(Su).active.find(i=>i.source==t.source);return r instanceof fHe?(typeof n=="string"?e.dispatch({...fln(e.state,n,r.from,r.to),annotations:dHe.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}var Aln=xln(Su,vq);function xX(e,t="option"){return n=>{let r=n.state.field(Su,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t=="page"?0:o-1:s>=o&&(s=t=="page"?o-1:0),n.dispatch({effects:mq.of(s)}),!0}}var Nln=e=>{let t=e.state.field(Su,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.state.field(Su,!1)?(e.dispatch({effects:ZV.of(!0)}),!0):!1,Xln=e=>{let t=e.state.field(Su,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(e.dispatch({effects:oZ.of(null)}),!0)},Eln=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Vln=50,Gln=1e3,Dln=vl.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(Su).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(Su),n=e.state.facet(Al);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Su)==t)return;let r=e.transactions.some(a=>{let o=hHe(a,n);return o&8||(a.selection||a.docChanged)&&!(o&3)});for(let a=0;aVln&&Date.now()-o.time>Gln){for(let s of o.context.abortListeners)try{s()}catch(l){nu(this.view.state,l)}o.context.abortListeners=null,this.running.splice(a--,1)}else o.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(a=>a.effects.some(o=>o.is(ZV)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(a=>a.isPending&&!this.running.some(o=>o.active.source==a.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let a of e.transactions)a.isUserEvent("input.type")?this.composing=2:this.composing==2&&a.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(Su);for(let n of t.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Al).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=Uy(t),r=new cHe(t,n,e.explicit,this.view),i=new Eln(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(a=>{i.context.aborted||(i.done=a||null,this.scheduleAccept())},a=>{this.view.dispatch({effects:oZ.of(null)}),nu(this.view.state,a)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Al).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Al),r=this.view.state.field(Su);for(let i=0;is.source==a.active.source);if(o&&o.isPending)if(a.done==null){let s=new ky(a.active.source,0);for(let l of a.updates)s=s.update(l,n);s.isPending||t.push(s)}else this.startQuery(o)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:gq.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Su,!1);if(t&&t.tooltip&&this.view.state.facet(Al).closeOnBlur){let n=t.open&&LOe(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:oZ.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:ZV.of(!1)}),20),this.composing=0}}}),Wln=typeof navigator=="object"&&/Win/.test(navigator.platform),Oln=fv.highest(Mr.domEventHandlers({keydown(e,t){let n=t.state.field(Su,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Wln&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&vq(t,r),!1}})),Lln=Mr.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),sZ={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ry=Ai.define({map(e,t){let n=t.mapPos(e,-1,Jc.TrackAfter);return n??void 0}}),yq=new class extends Y0{};yq.startSide=1;yq.endSide=-1;var pHe=Ic.define({create(){return eo.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of t.effects)n.is(Ry)&&(e=e.update({add:[yq.range(n.value,n.value+1)]}));return e}});function Pln(){return[Fln,pHe]}var WY="()[]{}<>«»»«[]{}";function mHe(e){for(let t=0;t{if((Hln?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&bp(wu(r,0))==1||t!=i.from||n!=i.to)return!1;let a=Yln(e.state,r);return a?(e.dispatch(a),!0):!1}),Uln=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=gHe(e,e.selection.main.head).brackets||sZ.brackets,i=null,a=e.changeByRange(o=>{if(o.empty){let s=Bln(e.doc,o.head);for(let l of r)if(l==s&&L5(e.doc,o.head)==mHe(wu(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:xn.cursor(o.head-l.length)}}return{range:i=o}});return i||t(e.update(a,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},zln=[{key:"Backspace",run:Uln}];function Yln(e,t){let n=gHe(e,e.selection.main.head),r=n.brackets||sZ.brackets;for(let i of r){let a=mHe(wu(i,0));if(t==i)return a==i?Qln(e,i,r.indexOf(i+i+i)>-1,n):_ln(e,i,a,n.before||sZ.before);if(t==a&&vHe(e,e.selection.main.from))return jln(e,i,a)}return null}function vHe(e,t){let n=!1;return e.field(pHe).between(0,e.doc.length,r=>{r==t&&(n=!0)}),n}function L5(e,t){let n=e.sliceString(t,t+2);return n.slice(0,bp(wu(n,0)))}function Bln(e,t){let n=e.sliceString(t-2,t);return bp(wu(n,0))==n.length?n:n.slice(1)}function _ln(e,t,n,r){let i=null,a=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:Ry.of(o.to+t.length),range:xn.range(o.anchor+t.length,o.head+t.length)};let s=L5(e.doc,o.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:Ry.of(o.head+t.length),range:xn.cursor(o.head+t.length)}:{range:i=o}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function jln(e,t,n){let r=null,i=e.changeByRange(a=>a.empty&&L5(e.doc,a.head)==n?{changes:{from:a.head,to:a.head+n.length,insert:n},range:xn.cursor(a.head+n.length)}:r={range:a});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Qln(e,t,n,r){let i=r.stringPrefixes||sZ.stringPrefixes,a=null,o=e.changeByRange(s=>{if(!s.empty)return{changes:[{insert:t,from:s.from},{insert:t,from:s.to}],effects:Ry.of(s.to+t.length),range:xn.range(s.anchor+t.length,s.head+t.length)};let l=s.head,c=L5(e.doc,l),u;if(c==t){if(Tye(e,l))return{changes:{insert:t+t,from:l},effects:Ry.of(l+t.length),range:xn.cursor(l+t.length)};if(vHe(e,l)){let h=n&&e.sliceDoc(l,l+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:l,to:l+h.length,insert:h},range:xn.cursor(l+h.length)}}}else{if(n&&e.sliceDoc(l-2*t.length,l)==t+t&&(u=wye(e,l-2*t.length,i))>-1&&Tye(e,u))return{changes:{insert:t+t+t+t,from:l},effects:Ry.of(l+t.length),range:xn.cursor(l+t.length)};if(e.charCategorizer(l)(c)!=Ho.Word&&wye(e,l,i)>-1&&!Kln(e,l,t,i))return{changes:{insert:t+t,from:l},effects:Ry.of(l+t.length),range:xn.cursor(l+t.length)}}return{range:a=s}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Tye(e,t){let n=Cc(e).resolveInner(t+1);return n.parent&&n.from==t}function Kln(e,t,n,r){let i=Cc(e).resolveInner(t,-1),a=r.reduce((o,s)=>Math.max(o,s.length),0);for(let o=0;o<5;o++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(e.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function wye(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=Ho.Word)return t;for(let i of n){let a=t-i.length;if(e.sliceDoc(a,t)==i&&r(e.sliceDoc(a-1,a))!=Ho.Word)return a}return-1}function Jln(e={}){return[Oln,Su,Al.of(e),Dln,qln,Lln]}var yHe=[{key:"Ctrl-Space",run:DY},{mac:"Alt-`",run:DY},{mac:"Alt-i",run:DY},{key:"Escape",run:Xln},{key:"ArrowDown",run:xX(!0)},{key:"ArrowUp",run:xX(!1)},{key:"PageDown",run:xX(!0,"page")},{key:"PageUp",run:xX(!1,"page")},{key:"Enter",run:Nln}],qln=fv.highest(Z5.computeN([Al],e=>e.facet(Al).defaultKeymap?[yHe]:[])),$ln=[Itn(),Rtn(),zen(),Non(),inn(),Een(),Oen(),qo.allowMultipleSelections.of(!0),Ytn(),sLe(lnn,{fallback:!0}),mnn(),Pln(),Jln(),ntn(),atn(),Ken(),Psn(),Z5.of([...zln,...Gsn,...sln,...Pon,...enn,...yHe,...Dan])],lx=e=>`rgba(227, 6, 122, ${e})`,ecn=Mr.theme({"&":{height:"100%",fontSize:"13px",fontFamily:'"Geist Mono", "SF Mono", "Fira Code", monospace',backgroundColor:dt.white},".cm-scroller":{overflow:"auto"},".cm-content":{caretColor:dt.pink,padding:"12px 0"},".cm-cursor, .cm-dropCursor":{borderLeftColor:dt.pink,borderLeftWidth:"2px"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground":{backgroundColor:`${lx(.1)} !important`},"&.cm-focused":{outline:"none"},".cm-activeLine":{backgroundColor:lx(.025)},".cm-gutters":{backgroundColor:dt.greyLight,color:dt.muted,border:"none",borderRight:`1px solid ${dt.grey}`,paddingRight:"8px",fontSize:"12px"},".cm-activeLineGutter":{backgroundColor:lx(.06),color:dt.pink},".cm-lineNumbers .cm-gutterElement":{padding:"0 4px 0 12px",minWidth:"24px"},".cm-foldGutter .cm-gutterElement":{color:dt.muted},"&.cm-focused .cm-matchingBracket":{backgroundColor:lx(.12),outline:`1px solid ${lx(.25)}`,borderRadius:"2px"},".cm-searchMatch":{backgroundColor:`${dt.orangeLighter} !important`,borderRadius:"2px"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`${dt.pinkLighter} !important`},".cm-tooltip.cm-tooltip-autocomplete":{backgroundColor:dt.white,border:`1px solid ${dt.grey}`,borderRadius:"8px",fontSize:"12px",boxShadow:"0 4px 16px rgba(23, 19, 27, 0.08), 0 1px 4px rgba(23, 19, 27, 0.04)",color:dt.dark,overflow:"hidden"},".cm-tooltip-autocomplete ul":{maxHeight:"220px"},".cm-tooltip-autocomplete ul li":{color:`${dt.dark} !important`,padding:"4px 8px"},".cm-tooltip-autocomplete ul li[aria-selected]":{backgroundColor:lx(.08),color:`${dt.dark} !important`},".cm-completionLabel":{color:`${dt.dark} !important`,fontWeight:"500"},".cm-completionDetail":{color:`${dt.muted} !important`,fontStyle:"italic",marginLeft:"8px"},".cm-completionMatchedText":{color:`${dt.pink} !important`,textDecoration:"none",fontWeight:"600"},".cm-tooltip":{color:`${dt.dark} !important`},".cm-tooltip-hover":{border:`1px solid ${dt.grey}`,borderRadius:"6px",backgroundColor:dt.white,boxShadow:"0 2px 8px rgba(23, 19, 27, 0.06)"},".cm-panels":{backgroundColor:dt.greyLight,borderBottom:`1px solid ${dt.grey}`},".cm-panel.cm-search":{backgroundColor:dt.greyLight},".cm-panel.cm-search input":{borderRadius:"4px",border:`1px solid ${dt.grey}`},".cm-panel.cm-search input:focus":{borderColor:dt.pink,outline:"none"},".cm-panel.cm-search button":{borderRadius:"4px"}},{dark:!1}),tcn=sLe(P8.define([{tag:hn.keyword,color:"#cf3078"},{tag:hn.typeName,color:"#b35c2a"},{tag:hn.propertyName,color:"#3d3846"},{tag:hn.string,color:"#3a7d5c"},{tag:hn.number,color:"#8a6534"},{tag:hn.bool,color:"#8a6534"},{tag:hn.null,color:"#9a939e",fontStyle:"italic"},{tag:hn.comment,color:"#b0abb5",fontStyle:"italic"},{tag:hn.punctuation,color:"#9a939e"},{tag:hn.bracket,color:"#9a939e"},{tag:hn.variableName,color:"#cf3078"},{tag:hn.definition(hn.variableName),color:"#3d3846"},{tag:hn.attributeName,color:"#b35c2a"},{tag:hn.operator,color:"#9a939e"}]));function OY(e){const t=A.useRef(null),n=A.useRef(null);return A.useEffect(()=>{if(!t.current)return;const r=Mr.updateListener.of(o=>{o.docChanged&&e.onValueChange&&e.onValueChange(o.state.doc.toString())}),i=qo.create({doc:e.initialValue,extensions:[$ln,ecn,tcn,r,...Array.isArray(e.extensions)?e.extensions:e.extensions?[e.extensions]:[]]}),a=new Mr({state:i,parent:t.current});return n.current=a,()=>{a.destroy(),n.current=null}},[]),{containerRef:t,viewRef:n}}function ncn(e){const t=e.split(` +`),n=[];for(let l=0;ll.trim().startsWith("#")?"":l).join(` +`),i=pl(U8(r));if(n.length===0)return i;const a=i.split(` +`),o=[],s=new Set;for(const l of a){const c=l.trim();for(let u=0;u{const le=nye();return le?le.tabs:[xon()]}),[r,i]=A.useState(()=>{const le=nye();return le?le.activeId:t[0].id}),[a,o]=A.useState(null),[s,l]=A.useState(""),c=t.find(le=>le.id===r)??t[0],[u,d]=A.useState(!1),h=c.headers,f=A.useCallback(le=>{n(de=>de.map(pe=>pe.id===r?{...pe,headers:typeof le=="function"?le(pe.headers):le}:pe))},[r]),[p,g]=A.useState(50);A.useEffect(()=>{const le=t.map(de=>de.id===r?{...de,query:E.current,variables:F.current}:de);Ton(le,r)},[t,r]);const[v,b]=A.useState(!1),[T,w]=A.useState(!1),[M,C]=A.useState(),[I,k]=A.useState(()=>{try{const le=localStorage.getItem("pometry-playground-leftTab");return le!==null?parseInt(le,10):0}catch{return 0}}),[Z,X]=A.useState(()=>{try{const le=localStorage.getItem("pometry-playground-showLeftPanel");return le!==null?le==="true":!0}catch{return!0}}),[N,G]=A.useState(()=>{try{const le=localStorage.getItem("pometry-playground-leftPanelWidth");return le?Number(le):260}catch{return 260}});A.useEffect(()=>{try{localStorage.setItem("pometry-playground-leftTab",String(I)),localStorage.setItem("pometry-playground-showLeftPanel",String(Z))}catch{}},[I,Z]),A.useEffect(()=>{try{localStorage.setItem("pometry-playground-leftPanelWidth",String(N))}catch{}},[N]);const E=A.useRef(c.query),F=A.useRef(c.variables),Q=A.useRef(null),ee=A.useRef(null),q=A.useRef(null),te=A.useCallback(()=>{n(le=>le.map(de=>de.id===r?{...de,query:E.current,variables:F.current}:de))},[r]),P=A.useCallback(le=>{if(le===r)return;te();const de=t.find(D=>D.id===le);if(!de)return;i(le),E.current=de.query,F.current=de.variables;const pe=Q.current;pe&&pe.dispatch({changes:{from:0,to:pe.state.doc.length,insert:de.query}});const ye=ee.current;ye&&ye.dispatch({changes:{from:0,to:ye.state.doc.length,insert:de.variables}});const Ae=q.current;Ae&&Ae.dispatch({changes:{from:0,to:Ae.state.doc.length,insert:de.result}})},[r,t,te]),K=A.useCallback((le,de,pe,ye)=>{te();const Ae={id:TPe(),title:le??`Query ${t.length+1}`,query:de??`{ + +}`,variables:pe??"{}",result:"",headers:ye??[]};n(Te=>[...Te,Ae]),i(Ae.id),E.current=Ae.query,F.current=Ae.variables;const D=Q.current;D&&D.dispatch({changes:{from:0,to:D.state.doc.length,insert:Ae.query}});const re=ee.current;re&&re.dispatch({changes:{from:0,to:re.state.doc.length,insert:Ae.variables}});const xe=q.current;xe&&xe.dispatch({changes:{from:0,to:xe.state.doc.length,insert:""}})},[t,te]),he=A.useCallback(le=>{if(t.length<=1)return;const de=t.findIndex(ye=>ye.id===le),pe=t.filter(ye=>ye.id!==le);if(n(pe),le===r){const ye=Math.min(de,pe.length-1),Ae=pe[ye];i(Ae.id),E.current=Ae.query,F.current=Ae.variables;const D=Q.current;D&&D.dispatch({changes:{from:0,to:D.state.doc.length,insert:Ae.query}});const re=ee.current;re&&re.dispatch({changes:{from:0,to:re.state.doc.length,insert:Ae.variables}});const xe=q.current;xe&&xe.dispatch({changes:{from:0,to:xe.state.doc.length,insert:Ae.result}})}},[t,r]),j=A.useCallback((le,de)=>{o(le),l(de)},[]),ie=A.useCallback(()=>{a&&s.trim()&&n(le=>le.map(de=>de.id===a?{...de,title:s.trim()}:de)),o(null)},[a,s]),ce=A.useCallback((le,de,pe,ye)=>{K(le,de,pe,ye),pe&&pe!=="{}"&&w(!0),ye&&ye.length>0&&b(!0)},[K]);A.useEffect(()=>{fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:Lin()})}).then(le=>le.json()).then(le=>{le.data&&C(Pin(le.data))}).catch(le=>{console.warn("Schema introspection failed:",le)})},[e]);const H=A.useCallback(async()=>{d(!0);try{const le={"Content-Type":"application/json"};for(const xe of h)xe.key.trim()&&(le[xe.key.trim()]=xe.value);let de;try{const xe=JSON.parse(F.current);xe&&typeof xe=="object"&&(de=xe)}catch{}const pe={query:E.current};de&&Object.keys(de).length>0&&(pe.variables=de);const Ae=await(await fetch(e,{method:"POST",headers:le,body:JSON.stringify(pe)})).text();let D;try{const xe=JSON.parse(Ae);D=JSON.stringify(xe,null,2)}catch{D=Ae}n(xe=>xe.map(Te=>Te.id===r?{...Te,result:D}:Te));const re=q.current;re&&re.dispatch({changes:{from:0,to:re.state.doc.length,insert:D}})}catch(le){const de=`Error: ${le instanceof Error?le.message:String(le)}`;n(ye=>ye.map(Ae=>Ae.id===r?{...Ae,result:de}:Ae));const pe=q.current;pe&&pe.dispatch({changes:{from:0,to:pe.state.doc.length,insert:de}})}finally{d(!1)}},[e,h,r]),B=A.useRef(H);A.useEffect(()=>{B.current=H});const _=A.useMemo(()=>[son(),fv.highest(Z5.of([{key:"Mod-Enter",run:()=>(B.current(),!0)}]))],[]);A.useEffect(()=>{const le=Q.current;le&&M&&jan(le,M)},[M]);const ne=OY({initialValue:c.query,extensions:_,onValueChange:le=>{E.current=le}});A.useEffect(()=>{Q.current=ne.viewRef.current});const ae=OY({initialValue:c.variables,extensions:[Z0e()],onValueChange:le=>{F.current=le}});A.useEffect(()=>{ee.current=ae.viewRef.current});const J=OY({initialValue:c.result,extensions:[Z0e(),qo.readOnly.of(!0)]});A.useEffect(()=>{q.current=J.viewRef.current});const ue={backgroundColor:dt.white,border:`1px solid ${dt.grey}`,borderTop:"none",borderRadius:"0 0 10px 10px",overflow:"hidden",height:"100%",boxShadow:"0 1px 4px rgba(23, 19, 27, 0.04)"};return x.jsx(pt,{sx:{height:"100%",paddingLeft:"64px",display:"flex",flexDirection:"column",backgroundColor:dt.greyLight},children:x.jsxs(pt,{sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0},children:[Z&&x.jsxs(x.Fragment,{children:[x.jsxs(pt,{sx:{width:N,flexShrink:0,backgroundColor:dt.white,borderRight:`1px solid ${dt.grey}`,display:"flex",flexDirection:"column",overflow:"hidden"},children:[x.jsxs(k6,{value:I,onChange:(le,de)=>k(de),variant:"fullWidth",sx:{minHeight:36,borderBottom:`1px solid ${dt.grey}`,"& .MuiTabs-indicator":{backgroundColor:dt.pink},"& .MuiTab-root":{minHeight:36,py:.5,fontSize:"12px",fontWeight:600,"&.Mui-selected":{color:dt.pink}}},children:[x.jsx(wI,{label:M?"Schema":"Schema ..."}),x.jsx(wI,{label:"Examples"})]}),x.jsxs(pt,{sx:{flex:1,overflow:"auto"},children:[I===1&&x.jsx(con,{onSelect:(le,de,pe,ye)=>ce(de??"Query",le,pe,ye)}),I===0&&(M?x.jsx(yon,{schema:M}):x.jsx(Wt,{sx:{p:2,color:dt.muted,fontSize:"12px"},children:"Connecting to server for schema introspection..."}))]})]}),x.jsx(pt,{role:"separator","aria-label":"Resize left panel",onMouseDown:le=>{le.preventDefault();const de=le.clientX,pe=N,ye=D=>{const re=D.clientX-de;G(Math.max(180,Math.min(500,pe+re)))},Ae=()=>{document.removeEventListener("mousemove",ye),document.removeEventListener("mouseup",Ae),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",ye),document.addEventListener("mouseup",Ae),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},sx:{width:"6px",cursor:"col-resize",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{"& > div":{backgroundColor:dt.pink}}},children:x.jsx(pt,{sx:{width:"2px",height:"40px",borderRadius:"1px",backgroundColor:dt.grey,transition:"background-color 0.15s"}})})]}),x.jsxs(pt,{sx:{flex:1,display:"flex",flexDirection:"column",minWidth:0,p:1,gap:1},children:[x.jsxs(Wn,{direction:"row",alignItems:"center",sx:{backgroundColor:dt.greyLight,borderTop:"2px solid transparent",borderImage:`linear-gradient(90deg, ${dt.pink}, ${dt.purple}, ${dt.orange}) 1`,border:`1px solid ${dt.grey}`,borderRadius:"10px 10px 0 0",px:.5,minHeight:38,flexShrink:0},children:[x.jsx(fr,{size:"small",onClick:()=>X(!Z),sx:{p:.5,mr:.5,color:Z?dt.pink:dt.muted,"&:hover":{color:dt.pink},fontSize:"14px"},title:Z?"Hide panel":"Show panel",children:Z?"◀":"▶"}),x.jsxs(Wn,{direction:"row",alignItems:"center",role:"tablist","aria-label":"Query tabs",sx:{overflowX:"auto",overflowY:"hidden",flex:1,minWidth:0,"&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",msOverflowStyle:"none"},children:[t.map(le=>x.jsxs(Wn,{direction:"row",alignItems:"center",role:"tab","aria-selected":le.id===r,"aria-label":le.title,onClick:()=>P(le.id),onDoubleClick:()=>j(le.id,le.title),sx:{px:1.5,py:.5,cursor:"pointer",borderRadius:"6px 6px 0 0",backgroundColor:le.id===r?dt.white:"transparent","&:hover":{backgroundColor:le.id===r?dt.white:"rgba(0,0,0,0.04)"},gap:.75,flexShrink:0},children:[a===le.id?x.jsx("input",{"aria-label":"Rename tab",value:s,onChange:de=>l(de.target.value),onBlur:ie,onKeyDown:de=>{de.key==="Enter"&&ie(),de.key==="Escape"&&o(null)},autoFocus:!0,style:{background:dt.white,border:`1px solid ${dt.pink}`,borderRadius:"4px",color:dt.dark,fontFamily:'"Geist", sans-serif',fontSize:"12px",padding:"1px 6px",outline:"none",width:"80px"}}):x.jsx(Wt,{sx:{fontSize:"12px",fontWeight:le.id===r?600:400,color:le.id===r?dt.dark:dt.muted,whiteSpace:"nowrap",userSelect:"none"},children:le.title}),t.length>1&&x.jsx(fr,{size:"small","aria-label":`Close ${le.title}`,onClick:de=>{de.stopPropagation(),he(le.id)},sx:{p:0,fontSize:"11px",color:dt.muted,"&:hover":{color:dt.pink},width:16,height:16},children:"✕"})]},le.id)),x.jsx(fr,{size:"small",onClick:()=>K(),"aria-label":"Add tab",sx:{ml:.5,p:.5,color:dt.muted,"&:hover":{color:dt.pink},fontSize:"14px"},children:"+"})]}),x.jsxs(Wn,{direction:"row",spacing:.5,alignItems:"center",sx:{ml:1,flexShrink:0},children:[x.jsxs(oi,{size:"small",variant:v?"outlined":"text",onClick:()=>b(!v),sx:{textTransform:"none",fontSize:"11px",minWidth:0,px:1,color:h.length>0||v?dt.pink:dt.muted,borderColor:dt.pink,backgroundColor:h.length>0?"rgba(227, 6, 122, 0.08)":"transparent","&:hover":{backgroundColor:h.length>0?"rgba(227, 6, 122, 0.15)":void 0},position:"relative"},children:[h.length>0&&x.jsx(pt,{component:"span",sx:{width:6,height:6,borderRadius:"50%",backgroundColor:"#22c55e",display:"inline-block",mr:.5,flexShrink:0}}),"Headers",h.length>0?` (${h.length})`:""]}),x.jsx(oi,{size:"small",variant:T?"outlined":"text",onClick:()=>w(!T),sx:{textTransform:"none",fontSize:"11px",minWidth:0,px:1,color:T?dt.pink:dt.muted,borderColor:dt.pink},children:"Variables"}),x.jsx(oi,{variant:"contained",size:"small",onClick:H,disabled:u,sx:{backgroundColor:dt.pink,"&:hover":{backgroundColor:"#c90568"},minWidth:60,fontWeight:600,fontSize:"12px",px:1.5},children:u?"...":"▶ Run"})]})]}),x.jsx(W0,{in:v,sx:{mt:-1},children:x.jsx(pt,{sx:{p:1.5,border:`1px solid ${dt.grey}`,borderTop:"none",backgroundColor:dt.white},children:x.jsxs(Wn,{spacing:1,children:[h.map((le,de)=>x.jsx(uon,{headerKey:le.key,value:le.value,onChange:(pe,ye)=>{const Ae=[...h];Ae[de]={key:pe,value:ye},f(Ae)},onRemove:()=>{f(h.filter((pe,ye)=>ye!==de))}},`header-${de}`)),x.jsx(oi,{size:"small",variant:"text",onClick:()=>f([...h,{key:"",value:""}]),sx:{alignSelf:"flex-start",color:dt.pink,fontSize:"11px"},children:"+ Add Header"})]})})}),x.jsxs(pt,{sx:{flex:1,display:"flex",minHeight:0,mt:-1},children:[x.jsxs(pt,{sx:{width:`${p}%`,minWidth:100,display:"flex",flexDirection:"column"},children:[x.jsxs(pt,{sx:{flex:1,minHeight:0,position:"relative"},children:[x.jsx("div",{ref:ne.containerRef,style:ue,"aria-label":"Query editor"}),x.jsx(fr,{size:"small",title:"Prettify query",onClick:()=>{const le=Q.current;if(!le)return;const de=le.state.doc.toString();try{const pe=ncn(de);le.dispatch({changes:{from:0,to:le.state.doc.length,insert:pe}})}catch{}},sx:{position:"absolute",top:6,right:6,zIndex:2,color:dt.muted,backgroundColor:"rgba(255,255,255,0.85)",border:`1px solid ${dt.grey}`,borderRadius:"6px",width:32,height:28,fontSize:"14px","&:hover":{color:dt.pink,borderColor:dt.pink,backgroundColor:"rgba(255,255,255,0.95)"}},children:x.jsx(Wt,{sx:{fontSize:"14px",lineHeight:1},children:"✨"})})]}),x.jsx(W0,{in:T,children:x.jsxs(pt,{sx:{height:140,mt:1},children:[x.jsx(Wt,{variant:"caption",sx:{mb:.5,display:"block",color:dt.muted,fontWeight:600,fontSize:"10px"},children:"VARIABLES (JSON)"}),x.jsx("div",{ref:ae.containerRef,"aria-label":"Variables editor",style:{...ue,borderRadius:"10px",borderTop:`1px solid ${dt.grey}`,height:"calc(100% - 20px)"}})]})})]}),x.jsx(pt,{role:"separator","aria-label":"Resize editor split",onMouseDown:le=>{le.preventDefault();const de=le.clientX,pe=p,ye=le.target.parentElement;if(!ye)return;const Ae=ye.getBoundingClientRect().width,D=xe=>{const Me=(xe.clientX-de)/Ae*100,Ge=Math.min(80,Math.max(20,pe+Me));g(Ge)},re=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",re),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",D),document.addEventListener("mouseup",re),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},sx:{width:"6px",cursor:"col-resize",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{"& > div":{backgroundColor:dt.pink}}},children:x.jsx(pt,{sx:{width:"2px",height:"40px",borderRadius:"1px",backgroundColor:dt.grey,transition:"background-color 0.15s"}})}),x.jsx(pt,{sx:{flex:1,minWidth:100,minHeight:0},children:x.jsx("div",{ref:J.containerRef,style:ue,"aria-label":"Results editor"})})]})]})]})})}var icn=Yn.object({entityType:Yn.literal("edge"),srcId:Yn.string().optional(),dstId:Yn.string().optional(),layers:Yn.array(Yn.string()).optional()}),Sye={serializeSearchParam(e){return JSON.stringify({...e,graphPath:e.graphPath?.fullPath})},deserializeSearchParam(e){const t=e.at(0);if(t!==void 0){const n=acn.safeParse(JSON.parse(t)).data;if(n!==void 0)return{graphPath:Cd.fromFullPath(n.graphPath),range:[n.range?.[0]??void 0,n.range?.[1]??void 0],selected:n.selected??{entityType:"node"}}}return{graphPath:void 0,range:[void 0,void 0],selected:{entityType:"node"}}}},Mye={serializeSearchParam(e){return JSON.stringify({...e,graphPath:e.graphPath?.fullPath})},deserializeSearchParam(e){const t=e.at(0);if(t!==void 0){const n=ocn.safeParse(JSON.parse(t));if(n.success){const r=n.data;return{question:r.question,mode:r.mode,type:r.type,graphPath:r.graphPath,startDate:r.startDate??void 0,endDate:r.endDate??void 0}}}}},bHe=Yn.enum(["bool","u8","u16","u32","u64","i32","i64","f32","f64","str"]),xHe=Yn.enum(["eq","ne","gt","ge","lt","le","startsWith","endsWith","contains","notContains","isIn","isNotIn"]),acn=Yn.object({graphPath:Yn.string().optional(),range:Yn.tuple([Yn.null().or(Yn.coerce.date()),Yn.null().or(Yn.coerce.date())]).optional(),selected:Yn.union([Yn.object({entityType:Yn.literal("node"),selectedConditionsByType:Yn.array(Yn.object({type:Yn.string(),conditions:Yn.array(Yn.object({key:Yn.string(),field:Yn.string(),value:Yn.string(),op:xHe,type:bHe}))})).optional(),typeColors:Yn.map(Yn.string(),Yn.string()).optional()}),icn]).optional()}),ocn=Yn.object({question:Yn.string().optional(),mode:Yn.string().optional(),type:Yn.string().optional(),graphPath:Cd.zodSchema(),startDate:Yn.coerce.date().nullable().optional(),endDate:Yn.coerce.date().nullable().optional()}),scn="pometry-navbar-expanded";function lcn(){const{slots:e}=Na(),t=e?.catchAll?.navBar?.defaultExpanded??!1,[n,r]=ENe(scn,t,Yn.boolean());return x.jsx(BGe.Provider,{value:{expanded:n,setExpanded:r},children:x.jsxs(pt,{id:"parent",sx:{position:"relative",height:"100vh",width:"100vw",overflow:"hidden"},children:[x.jsx(pt,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0},children:x.jsx(A.Suspense,{fallback:x.jsx("div",{children:"Loading"}),children:x.jsx(V_e,{})})}),x.jsx(pt,{sx:{position:"absolute",top:0,left:0,bottom:0,zIndex:1},children:x.jsx(IJt,{})}),x.jsx(DQe,{position:"bottom-right",autoClose:4e3,hideProgressBar:!0,newestOnTop:!0,closeOnClick:!0,pauseOnFocusLoss:!1,draggable:!1,pauseOnHover:!0,theme:"light",toastStyle:{fontFamily:"Manrope, sans-serif",fontSize:"0.875rem",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",padding:"12px 16px",minHeight:"auto",borderLeft:"none"},style:{zIndex:9999}})]})})}var ci=LS({children:{search:LS({path:"search",searchParams:{builderState:Sye,selectedTab:ry(Yn.string()),committed:Sye,semanticInput:Mye,committedSemanticInput:Mye}}),graph:LS({path:"graph/*",params:{"*":Cd.routerParamSchema()},searchParams:{baseGraph:Cd.routerSearchParamSchema(),initialNodes:ry(Yn.array(Yn.string())).default([]),window:ry(Yn.tuple([Yn.number(),Yn.number()]).optional()),excludeLayers:ry(Yn.array(Yn.string()).optional())},state:{expansions:ry(Yn.array(Yn.string()))}}),savedGraphs:LS({path:"saved-graphs/*",params:{"*":ry(Yn.string())}}),gqlPlayground:LS({path:"playground"})}});function ccn(e){return oje([{path:"/",element:x.jsx(lcn,{}),children:[{path:"/",loader:()=>yBe(ci.search.$buildPath({}))},{path:ci.search.$path(),element:x.jsx(H8t,{})},{path:ci.savedGraphs.$path(),element:x.jsx(A7t,{})},{path:ci.graph.$path(),element:x.jsx(n7t,{})},{path:ci.gqlPlayground.$path(),element:x.jsx(rcn,{})},...e]}])}var ucn="SchemaNode",kV="Any Type",dcn="None";function P5(e){const{client:t}=A.useContext(Va);return el({enabled:e!==void 0,queryKey:["schema-nodes",e?.fullPath],queryFn:async()=>{Fo(e!==void 0);const n=await t.query({__name:ucn,graph:{__args:{path:e.fullPath},schema:{nodes:{typeName:!0,properties:{key:!0,propertyType:!0,variants:!0}}}}});if(n.graph===null)throw new Error(`Graph ${e.fullPath} cannot be found!`);const r=n.graph.schema.nodes,i=new Map(r.map(({typeName:l,properties:c})=>[l,new Map(c.flatMap(({key:u,propertyType:d,variants:h})=>{const{data:f}=bHe.safeParse(d.toLowerCase());return f!==void 0?[[u,{type:f,variants:h}]]:[]}))])),a=[kV,...Array.from(i?.keys()??[])],o=i.get(dcn);o!==void 0&&i.set(kV,o);const s=Object.fromEntries(a.map(l=>[l,QZ(l)]));return{schema:i,availableTypes:a,typeColors:s}}})}function hcn(e){const{client:t}=A.useContext(Va);return el({enabled:e!==void 0,queryKey:["schema-node-types",e?.fullPath],queryFn:async()=>{Fo(e!==void 0);const n=await t.query({__name:"SchemaNodeTypes",graph:{__args:{path:e.fullPath},schema:{nodes:{typeName:!0}}}});if(n.graph===null)throw new Error(`Graph ${e.fullPath} cannot be found!`);return n.graph.schema.nodes.map(({typeName:r})=>r)}})}var fcn=e=>{const t=Uu(),{client:n}=A.useContext(Va);return{queryShortestPathForTwoNodes:(i,a,o=[])=>t.ensureQueryData({queryKey:["shortest-path",i,a,e?.fullPath,o],queryFn:async()=>(await n.query({graph:{__args:{path:e.fullPath},applyViews:{__args:{views:[...o,{snapshotLatest:!0}]},algorithms:{shortest_path:{__args:{source:i,targets:a,direction:"both"},nodes:!0}}}}})).graph?.applyViews.algorithms.shortest_path.at(0)?.nodes??[]})}},pcn=Yt(Kbe(),1);function Cye(e){const{explodeLayers:t,...n}=e,r=t.list.flatMap(i=>{const a=new Map(i.history.timestamps.list.map(o=>[o,{}]));return i.properties.temporal.values.forEach(o=>{(0,pcn.default)(o.history.timestamps.list,o.values).forEach(([s,l])=>{if(s!==void 0){const c=a.get(s);c!==void 0&&(c[o.key]=l)}})}),[...a.entries()].map(([o,s])=>({time:o,layer:i.layerName,properties:s,style:i.metadata.values.find(l=>l.key==="_style")?.value}))});return{...n,id:fb(e.src.id,e.dst.id),src:{...e.src,displayName:e.src.properties.get?.value??e.src.id},dst:{...e.dst,displayName:e.dst.properties.get?.value??e.dst.id},layers:t.list.map(i=>({...i,history:i.history.timestamps.list})),events:r}}function mcn(e){const{nodeType:t,latestTime:n,properties:r,metadata:i,...a}=e,o=i.values.flatMap(({key:s,value:l})=>[[s,l]]);return{...a,metadata:i,properties:r,currentProps:Object.fromEntries(o),nodeType:t??"",latestTime:n?.timestamp??0}}async function gcn(e,{graphPath:t,nodes:n,nodeProperties:r,temporalNodeProperties:i,nameProperty:a,views:o}){return(await e.query({__name:"Subgraph",graph:{__args:{path:t.fullPath},applyViews:{__args:{views:o},metadata:{values:{key:!0,value:!0}},snapshotLatest:{nodes:{__args:{select:{node:{field:"NODE_NAME",where:{isIn:{list:n.map(l=>({str:l}))}}}}},list:{id:!0,nodeType:!0,latestTime:{timestamp:!0},degree:!0,metadata:{values:{key:!0,value:!0}},properties:{values:{__args:{keys:[...r,a]},key:!0,value:!0},temporal:{values:{__args:{keys:i},key:!0,values:!0,history:{timestamps:{list:!0}}}}}}}},subgraph:{__args:{nodes:n},nodes:{snapshotLatest:{list:{id:!0,degree:!0}}},edges:{list:{src:{id:!0,properties:{get:{__args:{key:a},value:!0}}},dst:{id:!0,properties:{get:{__args:{key:a},value:!0}}},layerNames:!0,isValid:!0,explodeLayers:{list:{layerName:!0,history:{timestamps:{list:!0}},metadata:{values:{key:!0,value:!0}},properties:{temporal:{values:{key:!0,history:{timestamps:{list:!0}},values:!0}}}}}}}}}}})).graph.applyViews}function vcn({graphPath:e,nodes:t,views:n}){const{nameProperty:r,nodeProperties:i,temporalNodeProperties:a}=Na(),{client:o}=A.useContext(Va),{data:s,error:l,isLoading:c,status:u}=el({enabled:e!==void 0,queryKey:["subgraph",e?.fullPath,t,n],queryFn:async()=>{if(t.length>0){Fo(e!==void 0);const f=await gcn(o,{graphPath:e,nodes:t,nodeProperties:i,temporalNodeProperties:a,nameProperty:r,views:n}),p=Object.fromEntries(f.snapshotLatest.nodes.list.map(({id:C,degree:I})=>[C,I])),g=Object.fromEntries(f.subgraph.nodes.snapshotLatest.list.map(({id:C,degree:I})=>[C,I])),v=FGe.safeParse(f.metadata.values.find(({key:C})=>C==="_style")?.value).data?.node_types,b=f.snapshotLatest.nodes.list.map(mcn).map(C=>{const{id:I,nodeType:k,metadata:Z}=C,X=v?.[k??"None"];let N,G;for(const{key:ee,value:q}of Z.values)switch(ee){case"_style":{N=O7.safeParse(q).data;break}case YGe:{G=qHt.safeParse(q).data;break}}const E=g[I]??0,F=p[I]??0,Q=Math.max(0,F-E);return{...C,nodeType:C.nodeType===""?"None":C.nodeType,hiddenNeighbours:Q,position:G,nodeStyle:N,typeStyle:X}}),T=f.subgraph.edges.list.map(Cye),w=f.subgraph.edges.list.map(Cye).map(C=>{const I=T.find(N=>N.id===C.id),{layers:k}=I||C,X=k.map(N=>N.metadata.values.find(G=>G.key==="_style")?.value).map(N=>DHt.safeParse(N).data).find(N=>N!==void 0);return{...C,style:X}}),M=w.filter(C=>C.isValid);return{nodes:b,allEdges:w,aliveEdges:M}}else return{nodes:[],allEdges:[],aliveEdges:[]}}}),[d,h]=A.useState({nodes:[],allEdges:[],aliveEdges:[]});return A.useEffect(()=>{s!==void 0&&h(s)},[s]),{data:d,error:l,isLoading:c,status:u}}function ycn(){const{client:e}=A.useContext(Va),t=Uu();return ev({mutationFn:async({baseGraphPath:n,newGraphPath:r,nodes:i,overwrite:a})=>{await e.mutation({__name:"CreateSubgraphMutation",createSubgraph:{__args:{parentPath:n.fullPath,nodes:i,newPath:r.fullPath,overwrite:a}}}),await LGe(e,r)},onSuccess:()=>t.invalidateQueries({queryKey:["graph-list"]})})}function bcn({graphSource:e,allNodes:t,temporaryStyles:n,setTemporaryStyles:r}){const{client:i}=A.useContext(Va),a=Uu(),o=async({path:u,name:d,nodeStyle:h})=>{const f=await i.query({__name:"UpdateNodeStyleMutation",updateGraph:{__args:{path:u.fullPath},node:{__args:{name:d},updateMetadata:{__args:{properties:[{key:"_style",value:{object:[...h.fill!==void 0?[{key:"fill",value:{str:h.fill}}]:[],...h.size!==void 0?[{key:"size",value:{u64:h.size}}]:[]]}}]}}}}});return Fo(f.updateGraph.node!==void 0&&f.updateGraph.node!==null,`Node ${d} does not exist on graph: ${u.fullPath}.`),f.updateGraph.node.updateMetadata},s=async({path:u,typeStyles:d})=>{const f=Yn.record(Yn.string(),O7).parse(d),p=xcn(f),g=await i.query({__name:"UpdateGraphNodeStyleMutation",updateGraph:{__args:{path:u.fullPath},updateMetadata:{__args:{properties:[{key:"_style",value:{object:[{key:"node_types",value:{object:p}}]}}]}}}});return Fo(g.updateGraph!==void 0&&g.updateGraph!==null,"Node does not exist"),g.updateGraph.updateMetadata},l=async({path:u,edgeIdentifiers:d,edgeStyle:h,layer:f})=>{const{src:p,dst:g}=d,v=await i.query({__name:"UpdateEdgeStyleMutation",updateGraph:{__args:{path:u?.fullPath??""},edge:{__args:{src:p,dst:g},updateMetadata:{__args:{properties:[{key:"_style",value:{object:[{key:"stroke",value:{str:h.stroke}},{key:"lineWidth",value:{u64:h.lineWidth}},{key:"startArrowSize",value:{u64:h.startArrowSize}},{key:"endArrowSize",value:{u64:h.endArrowSize}}]}}],layer:f}}}}});return Fo(v.updateGraph.edge!==void 0&&v.updateGraph.edge!==null,"Edge does not exist"),v.updateGraph.edge.updateMetadata},{data:c}=L7(e);return ev({mutationFn:async u=>{if(n===void 0)return;const d=[];let h=!1;for(const[g,v]of Object.entries(n.nodesByName??[])){if(v===void 0)continue;const b=t.find(M=>M.id===g),T=v.fill??b?.nodeStyle?.fill,w=v.size??b?.nodeStyle?.size;T===void 0&&w===void 0||(h=!0,d.push(o({path:u,name:g,nodeStyle:{fill:T,size:w}})))}let f=!1;if(n.nodesByType!==void 0){const g={...c};for(const[v,b]of Object.entries(n.nodesByType))b!==void 0&&(g[v]={...g[v],...b});f=!0,d.push(s({path:u,typeStyles:g}))}let p=!1;for(const[g,v]of Object.entries(n.explodedEdges??[])){const b=g.indexOf("->"),T=g.slice(0,b),w=g.slice(b+2);for(const[M,C]of Object.entries(v))C!==void 0&&(p=!0,d.push(l({path:u,edgeIdentifiers:{src:T,dst:w},edgeStyle:C,layer:M})))}return await Promise.all(d),{nodeStylesModified:h,nodeTypeStylesModified:f,edgeStylesModified:p}},onSuccess:async u=>{if(u===void 0)return;const{nodeStylesModified:d,nodeTypeStylesModified:h,edgeStylesModified:f}=u,p=["subgraph","node","nodes-apply-views","node-at-page"],g=["subgraph","node","nodes-apply-views","node-at-page","node-type-styles"],v=["subgraph","edges","edge-exists","node-edges","node-neighbours-exploded-edges","exploded-from-edges","rolling-edges"],b=[...d?p:[],...h?g:[],...f?v:[]];await Promise.all(b.map(T=>a.invalidateQueries({queryKey:[T]}))),r(void 0),Li.success("Styling updated")}})}function xcn(e){return Object.entries(e).map(([t,n])=>{const r=[];return n.fill!==void 0&&r.push({key:"fill",value:{str:n.fill}}),n.size!==void 0&&r.push({key:"size",value:{u64:n.size}}),{key:t==="None"?"":t,value:{object:r}}})}var Tcn=Yt(J0(),1);function wcn({children:e,theme:t}){const n=mD((0,Tcn.default)(t,R_t));return x.jsxs(Ict,{theme:n,children:[x.jsx(vCt,{}),e]})}function Scn(e){const t=YQe(),n=A.useMemo(()=>ccn(e.additionalRoutes??[]),[e.additionalRoutes]);return x.jsx(A.Suspense,{fallback:x.jsx("div",{children:"Loading"}),children:x.jsx($1e.Provider,{value:t,children:x.jsx(bSt,{children:x.jsx(exe.Provider,{value:e,children:x.jsx(jQe,{children:x.jsx(wcn,{theme:e.muiTheme,children:x.jsx(bje,{router:n})})})})})})})}var LY={exports:{}},CM={},PY={exports:{}},HY={};var Iye;function Mcn(){return Iye||(Iye=1,(function(e){function t(q,te){var P=q.length;q.push(te);e:for(;0>>1,he=q[K];if(0>>1;Ki(ce,P))Hi(B,ce)?(q[K]=B,q[H]=P,K=H):(q[K]=ce,q[ie]=P,K=ie);else if(Hi(B,P))q[K]=B,q[H]=P,K=H;else break e}}return te}function i(q,te){var P=q.sortIndex-te.sortIndex;return P!==0?P:q.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],c=[],u=1,d=null,h=3,f=!1,p=!1,g=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function M(q){for(var te=n(c);te!==null;){if(te.callback===null)r(c);else if(te.startTime<=q)r(c),te.sortIndex=te.expirationTime,t(l,te);else break;te=n(c)}}function C(q){if(g=!1,M(q),!p)if(n(l)!==null)p=!0,I||(I=!0,E());else{var te=n(c);te!==null&&ee(C,te.startTime-q)}}var I=!1,k=-1,Z=5,X=-1;function N(){return v?!0:!(e.unstable_now()-Xq&&N());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var he=K(d.expirationTime<=q);if(q=e.unstable_now(),typeof he=="function"){d.callback=he,M(q),te=!0;break t}d===n(l)&&r(l),M(q)}else r(l);d=n(l)}if(d!==null)te=!0;else{var j=n(c);j!==null&&ee(C,j.startTime-q),te=!1}}break e}finally{d=null,h=P,f=!1}te=void 0}}finally{te?E():I=!1}}}var E;if(typeof w=="function")E=function(){w(G)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Q=F.port2;F.port1.onmessage=G,E=function(){Q.postMessage(null)}}else E=function(){b(G,0)};function ee(q,te){k=b(function(){q(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125K?(q.sortIndex=P,t(c,q),n(l)===null&&q===n(c)&&(g?(T(k),k=-1):g=!0,ee(C,P-K))):(q.sortIndex=he,t(l,q),p||f||(p=!0,I||(I=!0,E()))),q},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(q){var te=h;return function(){var P=h;h=te;try{return q.apply(this,arguments)}finally{h=P}}}})(HY)),HY}var Zye;function Ccn(){return Zye||(Zye=1,PY.exports=Mcn()),PY.exports}var kye;function Icn(){if(kye)return CM;kye=1;var e=Ccn(),t=v3(),n=Aye();function r(m){var y="https://react.dev/errors/"+m;if(1he||(m.current=K[he],K[he]=null,he--)}function ce(m,y){he++,K[he]=m.current,m.current=y}var H=j(null),B=j(null),_=j(null),ne=j(null);function ae(m,y){switch(ce(_,y),ce(B,m),ce(H,null),y.nodeType){case 9:case 11:m=(m=y.documentElement)&&(m=m.namespaceURI)?Dee(m):0;break;default:if(m=y.tagName,y=y.namespaceURI)y=Dee(y),m=Wee(y,m);else switch(m){case"svg":m=1;break;case"math":m=2;break;default:m=0}}ie(H),ce(H,m)}function J(){ie(H),ie(B),ie(_)}function ue(m){m.memoizedState!==null&&ce(ne,m);var y=H.current,S=Wee(y,m.type);y!==S&&(ce(B,m),ce(H,S))}function le(m){B.current===m&&(ie(H),ie(B)),ne.current===m&&(ie(ne),AS._currentValue=P)}var de,pe;function ye(m){if(de===void 0)try{throw Error()}catch(S){var y=S.stack.trim().match(/\n( *(at )?)/);de=y&&y[1]||"",pe=-1)":-1Y||ut[R]!==Gt[Y]){var en=` +`+ut[R].replace(" at new "," at ");return m.displayName&&en.includes("")&&(en=en.replace("",m.displayName)),en}while(1<=R&&0<=Y);break}}}finally{Ae=!1,Error.prepareStackTrace=S}return(S=m?m.displayName||m.name:"")?ye(S):""}function re(m,y){switch(m.tag){case 26:case 27:case 5:return ye(m.type);case 16:return ye("Lazy");case 13:return m.child!==y&&y!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return D(m.type,!1);case 11:return D(m.type.render,!1);case 1:return D(m.type,!0);case 31:return ye("Activity");default:return""}}function xe(m){try{var y="",S=null;do y+=re(m,S),S=m,m=m.return;while(m);return y}catch(R){return` +Error generating stack: `+R.message+` +`+R.stack}}var Te=Object.prototype.hasOwnProperty,Me=e.unstable_scheduleCallback,Ge=e.unstable_cancelCallback,Le=e.unstable_shouldYield,qe=e.unstable_requestPaint,je=e.unstable_now,Pe=e.unstable_getCurrentPriorityLevel,Ue=e.unstable_ImmediatePriority,at=e.unstable_UserBlockingPriority,Ke=e.unstable_NormalPriority,nt=e.unstable_LowPriority,ft=e.unstable_IdlePriority,St=e.log,xt=e.unstable_setDisableYieldValue,bt=null,Mt=null;function Xt(m){if(typeof St=="function"&&xt(m),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(bt,m)}catch{}}var Ut=Math.clz32?Math.clz32:kn,dn=Math.log,wn=Math.LN2;function kn(m){return m>>>=0,m===0?32:31-(dn(m)/wn|0)|0}var Zn=256,Dn=262144,ge=4194304;function W(m){var y=m&42;if(y!==0)return y;switch(m&-m){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 m&261888;case 262144:case 524288:case 1048576:case 2097152:return m&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return m&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return m}}function U(m,y,S){var R=m.pendingLanes;if(R===0)return 0;var Y=0,$=m.suspendedLanes,be=m.pingedLanes;m=m.warmLanes;var Ve=R&134217727;return Ve!==0?(R=Ve&~$,R!==0?Y=W(R):(be&=Ve,be!==0?Y=W(be):S||(S=Ve&~m,S!==0&&(Y=W(S))))):(Ve=R&~$,Ve!==0?Y=W(Ve):be!==0?Y=W(be):S||(S=R&~m,S!==0&&(Y=W(S)))),Y===0?0:y!==0&&y!==Y&&(y&$)===0&&($=Y&-Y,S=y&-y,$>=S||$===32&&(S&4194048)!==0)?y:Y}function V(m,y){return(m.pendingLanes&~(m.suspendedLanes&~m.pingedLanes)&y)===0}function z(m,y){switch(m){case 1:case 2:case 4:case 8:case 64:return y+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 y+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 se(){var m=ge;return ge<<=1,(ge&62914560)===0&&(ge=4194304),m}function ke(m){for(var y=[],S=0;31>S;S++)y.push(m);return y}function we(m,y){m.pendingLanes|=y,y!==268435456&&(m.suspendedLanes=0,m.pingedLanes=0,m.warmLanes=0)}function Re(m,y,S,R,Y,$){var be=m.pendingLanes;m.pendingLanes=S,m.suspendedLanes=0,m.pingedLanes=0,m.warmLanes=0,m.expiredLanes&=S,m.entangledLanes&=S,m.errorRecoveryDisabledLanes&=S,m.shellSuspendCounter=0;var Ve=m.entanglements,ut=m.expirationTimes,Gt=m.hiddenUpdates;for(S=be&~S;0"u")return null;try{return m.activeElement||m.body}catch{return m.body}}var da=/[\n"\\]/g;function mo(m){return m.replace(da,function(y){return"\\"+y.charCodeAt(0).toString(16)+" "})}function ou(m,y,S,R,Y,$,be,Ve){m.name="",be!=null&&typeof be!="function"&&typeof be!="symbol"&&typeof be!="boolean"?m.type=be:m.removeAttribute("type"),y!=null?be==="number"?(y===0&&m.value===""||m.value!=y)&&(m.value=""+Si(y)):m.value!==""+Si(y)&&(m.value=""+Si(y)):be!=="submit"&&be!=="reset"||m.removeAttribute("value"),y!=null?kc(m,be,Si(y)):S!=null?kc(m,be,Si(S)):R!=null&&m.removeAttribute("value"),Y==null&&$!=null&&(m.defaultChecked=!!$),Y!=null&&(m.checked=Y&&typeof Y!="function"&&typeof Y!="symbol"),Ve!=null&&typeof Ve!="function"&&typeof Ve!="symbol"&&typeof Ve!="boolean"?m.name=""+Si(Ve):m.removeAttribute("name")}function il(m,y,S,R,Y,$,be,Ve){if($!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(m.type=$),y!=null||S!=null){if(!($!=="submit"&&$!=="reset"||y!=null)){Go(m);return}S=S!=null?""+Si(S):"",y=y!=null?""+Si(y):S,Ve||y===m.value||(m.value=y),m.defaultValue=y}R=R??Y,R=typeof R!="function"&&typeof R!="symbol"&&!!R,m.checked=Ve?m.checked:!!R,m.defaultChecked=!!R,be!=null&&typeof be!="function"&&typeof be!="symbol"&&typeof be!="boolean"&&(m.name=be),Go(m)}function kc(m,y,S){y==="number"&&rl(m.ownerDocument)===m||m.defaultValue===""+S||(m.defaultValue=""+S)}function ts(m,y,S,R){if(m=m.options,y){y={};for(var Y=0;Y"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nc=!1;if(Do)try{var Wo={};Object.defineProperty(Wo,"passive",{get:function(){Nc=!0}}),window.addEventListener("test",Wo,Wo),window.removeEventListener("test",Wo,Wo)}catch{Nc=!1}var ys=null,Xc=null,su=null;function Ls(){if(su)return su;var m,y=Xc,S=y.length,R,Y="value"in ys?ys.value:ys.textContent,$=Y.length;for(m=0;m=mv),_k=" ",t1=!1;function n1(m,y){switch(m){case"keyup":return zf.indexOf(y.keyCode)!==-1;case"keydown":return y.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jw(m){return m=m.detail,typeof m=="object"&&"data"in m?m.data:null}var ug=!1;function r1(m,y){switch(m){case"compositionend":return jw(y);case"keypress":return y.which!==32?null:(t1=!0,_k);case"textInput":return m=y.data,m===_k&&t1?null:m;default:return null}}function i1(m,y){if(ug)return m==="compositionend"||!Yf&&n1(m,y)?(m=Ls(),su=Xc=ys=null,ug=!1,m):null;switch(m){case"paste":return null;case"keypress":if(!(y.ctrlKey||y.altKey||y.metaKey)||y.ctrlKey&&y.altKey){if(y.char&&1=y)return{node:S,offset:y-m};m=R}e:{for(;S;){if(S.nextSibling){S=S.nextSibling;break e}S=S.parentNode}S=void 0}S=qw(S)}}function l1(m,y){return m&&y?m===y?!0:m&&m.nodeType===3?!1:y&&y.nodeType===3?l1(m,y.parentNode):"contains"in m?m.contains(y):m.compareDocumentPosition?!!(m.compareDocumentPosition(y)&16):!1:!1}function Bf(m){m=m!=null&&m.ownerDocument!=null&&m.ownerDocument.defaultView!=null?m.ownerDocument.defaultView:window;for(var y=rl(m.document);y instanceof m.HTMLIFrameElement;){try{var S=typeof y.contentWindow.location.href=="string"}catch{S=!1}if(S)m=y.contentWindow;else break;y=rl(m.document)}return y}function Tv(m){var y=m&&m.nodeName&&m.nodeName.toLowerCase();return y&&(y==="input"&&(m.type==="text"||m.type==="search"||m.type==="tel"||m.type==="url"||m.type==="password")||y==="textarea"||m.contentEditable==="true")}var $w=Do&&"documentMode"in document&&11>=document.documentMode,Lh=null,wv=null,pg=null,eS=!1;function c1(m,y,S){var R=S.window===S?S.document:S.nodeType===9?S:S.ownerDocument;eS||Lh==null||Lh!==rl(R)||(R=Lh,"selectionStart"in R&&Tv(R)?R={start:R.selectionStart,end:R.selectionEnd}:(R=(R.ownerDocument&&R.ownerDocument.defaultView||window).getSelection(),R={anchorNode:R.anchorNode,anchorOffset:R.anchorOffset,focusNode:R.focusNode,focusOffset:R.focusOffset}),pg&&fg(pg,R)||(pg=R,R=DR(wv,"onSelect"),0>=be,Y-=be,oe=1<<32-Ut(y)+Y|S<Xi?(ra=Xr,Xr=null):ra=Xr.sibling;var ga=Lt(Ct,Xr,Vt[Xi],cn);if(ga===null){Xr===null&&(Xr=ra);break}m&&Xr&&ga.alternate===null&&y(Ct,Xr),gt=$(ga,gt,Xi),ma===null?Fr=ga:ma.sibling=ga,ma=ga,Xr=ra}if(Xi===Vt.length)return S(Ct,Xr),ot&&ve(Ct,Xi),Fr;if(Xr===null){for(;XiXi?(ra=Xr,Xr=null):ra=Xr.sibling;var Wg=Lt(Ct,Xr,ga.value,cn);if(Wg===null){Xr===null&&(Xr=ra);break}m&&Xr&&Wg.alternate===null&&y(Ct,Xr),gt=$(Wg,gt,Xi),ma===null?Fr=Wg:ma.sibling=Wg,ma=Wg,Xr=ra}if(ga.done)return S(Ct,Xr),ot&&ve(Ct,Xi),Fr;if(Xr===null){for(;!ga.done;Xi++,ga=Vt.next())ga=pn(Ct,ga.value,cn),ga!==null&&(gt=$(ga,gt,Xi),ma===null?Fr=ga:ma.sibling=ga,ma=ga);return ot&&ve(Ct,Xi),Fr}for(Xr=R(Xr);!ga.done;Xi++,ga=Vt.next())ga=Bt(Xr,Ct,Xi,ga.value,cn),ga!==null&&(m&&ga.alternate!==null&&Xr.delete(ga.key===null?Xi:ga.key),gt=$(ga,gt,Xi),ma===null?Fr=ga:ma.sibling=ga,ma=ga);return m&&Xr.forEach(function(EFe){return y(Ct,EFe)}),ot&&ve(Ct,Xi),Fr}function Qa(Ct,gt,Vt,cn){if(typeof Vt=="object"&&Vt!==null&&Vt.type===g&&Vt.key===null&&(Vt=Vt.props.children),typeof Vt=="object"&&Vt!==null){switch(Vt.$$typeof){case f:e:{for(var Fr=Vt.key;gt!==null;){if(gt.key===Fr){if(Fr=Vt.type,Fr===g){if(gt.tag===7){S(Ct,gt.sibling),cn=Y(gt,Vt.props.children),cn.return=Ct,Ct=cn;break e}}else if(gt.elementType===Fr||typeof Fr=="object"&&Fr!==null&&Fr.$$typeof===Z&&Av(Fr)===gt.type){S(Ct,gt.sibling),cn=Y(gt,Vt.props),sS(cn,Vt),cn.return=Ct,Ct=cn;break e}S(Ct,gt);break}else y(Ct,gt);gt=gt.sibling}Vt.type===g?(cn=Od(Vt.props.children,Ct.mode,cn,Vt.key),cn.return=Ct,Ct=cn):(cn=f1(Vt.type,Vt.key,Vt.props,null,Ct.mode,cn),sS(cn,Vt),cn.return=Ct,Ct=cn)}return be(Ct);case p:e:{for(Fr=Vt.key;gt!==null;){if(gt.key===Fr)if(gt.tag===4&>.stateNode.containerInfo===Vt.containerInfo&>.stateNode.implementation===Vt.implementation){S(Ct,gt.sibling),cn=Y(gt,Vt.children||[]),cn.return=Ct,Ct=cn;break e}else{S(Ct,gt);break}else y(Ct,gt);gt=gt.sibling}cn=Zv(Vt,Ct.mode,cn),cn.return=Ct,Ct=cn}return be(Ct);case Z:return Vt=Av(Vt),Qa(Ct,gt,Vt,cn)}if(ee(Vt))return Cr(Ct,gt,Vt,cn);if(E(Vt)){if(Fr=E(Vt),typeof Fr!="function")throw Error(r(150));return Vt=Fr.call(Vt),Kr(Ct,gt,Vt,cn)}if(typeof Vt.then=="function")return Qa(Ct,gt,oR(Vt),cn);if(Vt.$$typeof===w)return Qa(Ct,gt,Ts(Ct,Vt),cn);sR(Ct,Vt)}return typeof Vt=="string"&&Vt!==""||typeof Vt=="number"||typeof Vt=="bigint"?(Vt=""+Vt,gt!==null&>.tag===6?(S(Ct,gt.sibling),cn=Y(gt,Vt),cn.return=Ct,Ct=cn):(S(Ct,gt),cn=p1(Vt,Ct.mode,cn),cn.return=Ct,Ct=cn),be(Ct)):S(Ct,gt)}return function(Ct,gt,Vt,cn){try{oS=0;var Fr=Qa(Ct,gt,Vt,cn);return b1=null,Fr}catch(Xr){if(Xr===y1||Xr===iR)throw Xr;var ma=Ec(29,Xr,null,Ct.mode);return ma.lanes=cn,ma.return=Ct,ma}}}var Xv=Zq(!0),kq=Zq(!1),xg=!1;function Q5(m){m.updateQueue={baseState:m.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function K5(m,y){m=m.updateQueue,y.updateQueue===m&&(y.updateQueue={baseState:m.baseState,firstBaseUpdate:m.firstBaseUpdate,lastBaseUpdate:m.lastBaseUpdate,shared:m.shared,callbacks:null})}function Tg(m){return{lane:m,tag:0,payload:null,callback:null,next:null}}function wg(m,y,S){var R=m.updateQueue;if(R===null)return null;if(R=R.shared,(Ma&2)!==0){var Y=R.pending;return Y===null?y.next=y:(y.next=Y.next,Y.next=y),R.pending=y,y=h1(m),tR(m,null,S),y}return Iv(m,R,y,S),h1(m)}function lS(m,y,S){if(y=y.updateQueue,y!==null&&(y=y.shared,(S&4194048)!==0)){var R=y.lanes;R&=m.pendingLanes,S|=R,y.lanes=S,He(m,S)}}function J5(m,y){var S=m.updateQueue,R=m.alternate;if(R!==null&&(R=R.updateQueue,S===R)){var Y=null,$=null;if(S=S.firstBaseUpdate,S!==null){do{var be={lane:S.lane,tag:S.tag,payload:S.payload,callback:null,next:null};$===null?Y=$=be:$=$.next=be,S=S.next}while(S!==null);$===null?Y=$=y:$=$.next=y}else Y=$=y;S={baseState:R.baseState,firstBaseUpdate:Y,lastBaseUpdate:$,shared:R.shared,callbacks:R.callbacks},m.updateQueue=S;return}m=S.lastBaseUpdate,m===null?S.firstBaseUpdate=y:m.next=y,S.lastBaseUpdate=y}var q5=!1;function cS(){if(q5){var m=v1;if(m!==null)throw m}}function uS(m,y,S,R){q5=!1;var Y=m.updateQueue;xg=!1;var $=Y.firstBaseUpdate,be=Y.lastBaseUpdate,Ve=Y.shared.pending;if(Ve!==null){Y.shared.pending=null;var ut=Ve,Gt=ut.next;ut.next=null,be===null?$=Gt:be.next=Gt,be=ut;var en=m.alternate;en!==null&&(en=en.updateQueue,Ve=en.lastBaseUpdate,Ve!==be&&(Ve===null?en.firstBaseUpdate=Gt:Ve.next=Gt,en.lastBaseUpdate=ut))}if($!==null){var pn=Y.baseState;be=0,en=Gt=ut=null,Ve=$;do{var Lt=Ve.lane&-536870913,Bt=Lt!==Ve.lane;if(Bt?(na&Lt)===Lt:(R&Lt)===Lt){Lt!==0&&Lt===g1&&(q5=!0),en!==null&&(en=en.next={lane:0,tag:Ve.tag,payload:Ve.payload,callback:null,next:null});e:{var Cr=m,Kr=Ve;Lt=y;var Qa=S;switch(Kr.tag){case 1:if(Cr=Kr.payload,typeof Cr=="function"){pn=Cr.call(Qa,pn,Lt);break e}pn=Cr;break e;case 3:Cr.flags=Cr.flags&-65537|128;case 0:if(Cr=Kr.payload,Lt=typeof Cr=="function"?Cr.call(Qa,pn,Lt):Cr,Lt==null)break e;pn=d({},pn,Lt);break e;case 2:xg=!0}}Lt=Ve.callback,Lt!==null&&(m.flags|=64,Bt&&(m.flags|=8192),Bt=Y.callbacks,Bt===null?Y.callbacks=[Lt]:Bt.push(Lt))}else Bt={lane:Lt,tag:Ve.tag,payload:Ve.payload,callback:Ve.callback,next:null},en===null?(Gt=en=Bt,ut=pn):en=en.next=Bt,be|=Lt;if(Ve=Ve.next,Ve===null){if(Ve=Y.shared.pending,Ve===null)break;Bt=Ve,Ve=Bt.next,Bt.next=null,Y.lastBaseUpdate=Bt,Y.shared.pending=null}}while(!0);en===null&&(ut=pn),Y.baseState=ut,Y.firstBaseUpdate=Gt,Y.lastBaseUpdate=en,$===null&&(Y.shared.lanes=0),Zg|=be,m.lanes=be,m.memoizedState=pn}}function Rq(m,y){if(typeof m!="function")throw Error(r(191,m));m.call(y)}function Aq(m,y){var S=m.callbacks;if(S!==null)for(m.callbacks=null,m=0;m$?$:8;var be=q.T,Ve={};q.T=Ve,v9(m,!1,y,S);try{var ut=Y(),Gt=q.S;if(Gt!==null&&Gt(Ve,ut),ut!==null&&typeof ut=="object"&&typeof ut.then=="function"){var en=wHe(ut,R);fS(m,y,en,nd(m))}else fS(m,y,R,nd(m))}catch(pn){fS(m,y,{then:function(){},status:"rejected",reason:pn},nd())}finally{te.p=$,be!==null&&Ve.types!==null&&(be.types=Ve.types),q.T=be}}function kHe(){}function m9(m,y,S,R){if(m.tag!==5)throw Error(r(476));var Y=l$(m).queue;s$(m,Y,y,P,S===null?kHe:function(){return c$(m),S(R)})}function l$(m){var y=m.memoizedState;if(y!==null)return y;y={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nm,lastRenderedState:P},next:null};var S={};return y.next={memoizedState:S,baseState:S,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nm,lastRenderedState:S},next:null},m.memoizedState=y,m=m.alternate,m!==null&&(m.memoizedState=y),y}function c$(m){var y=l$(m);y.next===null&&(y=m.alternate.memoizedState),fS(m,y.next.queue,{},nd())}function g9(){return Wi(AS)}function u$(){return Ss().memoizedState}function d$(){return Ss().memoizedState}function RHe(m){for(var y=m.return;y!==null;){switch(y.tag){case 24:case 3:var S=nd();m=Tg(S);var R=wg(y,m,S);R!==null&&(gu(R,y,S),lS(R,y,S)),y={cache:em()},m.payload=y;return}y=y.return}}function AHe(m,y,S){var R=nd();S={lane:R,revertLane:0,gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},vR(m)?f$(y,S):(S=iS(m,y,S,R),S!==null&&(gu(S,m,R),p$(S,y,R)))}function h$(m,y,S){var R=nd();fS(m,y,S,R)}function fS(m,y,S,R){var Y={lane:R,revertLane:0,gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null};if(vR(m))f$(y,Y);else{var $=m.alternate;if(m.lanes===0&&($===null||$.lanes===0)&&($=y.lastRenderedReducer,$!==null))try{var be=y.lastRenderedState,Ve=$(be,S);if(Y.hasEagerState=!0,Y.eagerState=Ve,Ml(Ve,be))return Iv(m,y,Y,0),ro===null&&Cv(),!1}catch{}if(S=iS(m,y,Y,R),S!==null)return gu(S,m,R),p$(S,y,R),!0}return!1}function v9(m,y,S,R){if(R={lane:2,revertLane:Q9(),gesture:null,action:R,hasEagerState:!1,eagerState:null,next:null},vR(m)){if(y)throw Error(r(479))}else y=iS(m,S,R,2),y!==null&&gu(y,m,2)}function vR(m){var y=m.alternate;return m===Ri||y!==null&&y===Ri}function f$(m,y){T1=uR=!0;var S=m.pending;S===null?y.next=y:(y.next=S.next,S.next=y),m.pending=y}function p$(m,y,S){if((S&4194048)!==0){var R=y.lanes;R&=m.pendingLanes,S|=R,y.lanes=S,He(m,S)}}var pS={readContext:Wi,use:fR,useCallback:rs,useContext:rs,useEffect:rs,useImperativeHandle:rs,useLayoutEffect:rs,useInsertionEffect:rs,useMemo:rs,useReducer:rs,useRef:rs,useState:rs,useDebugValue:rs,useDeferredValue:rs,useTransition:rs,useSyncExternalStore:rs,useId:rs,useHostTransitionStatus:rs,useFormState:rs,useActionState:rs,useOptimistic:rs,useMemoCache:rs,useCacheRefresh:rs};pS.useEffectEvent=rs;var m$={readContext:Wi,use:fR,useCallback:function(m,y){return Vc().memoizedState=[m,y===void 0?null:y],m},useContext:Wi,useEffect:qq,useImperativeHandle:function(m,y,S){S=S!=null?S.concat([m]):null,mR(4194308,4,n$.bind(null,y,m),S)},useLayoutEffect:function(m,y){return mR(4194308,4,m,y)},useInsertionEffect:function(m,y){mR(4,2,m,y)},useMemo:function(m,y){var S=Vc();y=y===void 0?null:y;var R=m();if(Ev){Xt(!0);try{m()}finally{Xt(!1)}}return S.memoizedState=[R,y],R},useReducer:function(m,y,S){var R=Vc();if(S!==void 0){var Y=S(y);if(Ev){Xt(!0);try{S(y)}finally{Xt(!1)}}}else Y=y;return R.memoizedState=R.baseState=Y,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:m,lastRenderedState:Y},R.queue=m,m=m.dispatch=AHe.bind(null,Ri,m),[R.memoizedState,m]},useRef:function(m){var y=Vc();return m={current:m},y.memoizedState=m},useState:function(m){m=u9(m);var y=m.queue,S=h$.bind(null,Ri,y);return y.dispatch=S,[m.memoizedState,S]},useDebugValue:f9,useDeferredValue:function(m,y){var S=Vc();return p9(S,m,y)},useTransition:function(){var m=u9(!1);return m=s$.bind(null,Ri,m.queue,!0,!1),Vc().memoizedState=m,[!1,m]},useSyncExternalStore:function(m,y,S){var R=Ri,Y=Vc();if(ot){if(S===void 0)throw Error(r(407));S=S()}else{if(S=y(),ro===null)throw Error(r(349));(na&127)!==0||Dq(R,y,S)}Y.memoizedState=S;var $={value:S,getSnapshot:y};return Y.queue=$,qq(Oq.bind(null,R,$,m),[m]),R.flags|=2048,S1(9,{destroy:void 0},Wq.bind(null,R,$,S,y),null),S},useId:function(){var m=Vc(),y=ro.identifierPrefix;if(ot){var S=fe,R=oe;S=(R&~(1<<32-Ut(R)-1)).toString(32)+S,y="_"+y+"R_"+S,S=dR++,0<\/script>",$=$.removeChild($.firstChild);break;case"select":$=typeof R.is=="string"?be.createElement("select",{is:R.is}):be.createElement("select"),R.multiple?$.multiple=!0:R.size&&($.size=R.size);break;default:$=typeof R.is=="string"?be.createElement(Y,{is:R.is}):be.createElement(Y)}}$[De]=y,$[yt]=R;e:for(be=y.child;be!==null;){if(be.tag===5||be.tag===6)$.appendChild(be.stateNode);else if(be.tag!==4&&be.tag!==27&&be.child!==null){be.child.return=be,be=be.child;continue}if(be===y)break e;for(;be.sibling===null;){if(be.return===null||be.return===y)break e;be=be.return}be.sibling.return=be.return,be=be.sibling}y.stateNode=$;e:switch(jl($,Y,R),Y){case"button":case"input":case"select":case"textarea":R=!!R.autoFocus;break e;case"img":R=!0;break e;default:R=!1}R&&im(y)}}return Zo(y),N9(y,y.type,m===null?null:m.memoizedProps,y.pendingProps,S),null;case 6:if(m&&y.stateNode!=null)m.memoizedProps!==R&&im(y);else{if(typeof R!="string"&&y.stateNode===null)throw Error(r(166));if(m=_.current,ln(y)){if(m=y.stateNode,S=y.memoizedProps,R=null,Y=it,Y!==null)switch(Y.tag){case 27:case 5:R=Y.memoizedProps}m[De]=y,m=!!(m.nodeValue===S||R!==null&&R.suppressHydrationWarning===!0||Vee(m.nodeValue,S)),m||At(y,!0)}else m=WR(m).createTextNode(R),m[De]=y,y.stateNode=m}return Zo(y),null;case 31:if(S=y.memoizedState,m===null||m.memoizedState!==null){if(R=ln(y),S!==null){if(m===null){if(!R)throw Error(r(318));if(m=y.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(r(557));m[De]=y}else on(),(y.flags&128)===0&&(y.memoizedState=null),y.flags|=4;Zo(y),m=!1}else S=yn(),m!==null&&m.memoizedState!==null&&(m.memoizedState.hydrationErrors=S),m=!0;if(!m)return y.flags&256?($u(y),y):($u(y),null);if((y.flags&128)!==0)throw Error(r(558))}return Zo(y),null;case 13:if(R=y.memoizedState,m===null||m.memoizedState!==null&&m.memoizedState.dehydrated!==null){if(Y=ln(y),R!==null&&R.dehydrated!==null){if(m===null){if(!Y)throw Error(r(318));if(Y=y.memoizedState,Y=Y!==null?Y.dehydrated:null,!Y)throw Error(r(317));Y[De]=y}else on(),(y.flags&128)===0&&(y.memoizedState=null),y.flags|=4;Zo(y),Y=!1}else Y=yn(),m!==null&&m.memoizedState!==null&&(m.memoizedState.hydrationErrors=Y),Y=!0;if(!Y)return y.flags&256?($u(y),y):($u(y),null)}return $u(y),(y.flags&128)!==0?(y.lanes=S,y):(S=R!==null,m=m!==null&&m.memoizedState!==null,S&&(R=y.child,Y=null,R.alternate!==null&&R.alternate.memoizedState!==null&&R.alternate.memoizedState.cachePool!==null&&(Y=R.alternate.memoizedState.cachePool.pool),$=null,R.memoizedState!==null&&R.memoizedState.cachePool!==null&&($=R.memoizedState.cachePool.pool),$!==Y&&(R.flags|=2048)),S!==m&&S&&(y.child.flags|=8192),wR(y,y.updateQueue),Zo(y),null);case 4:return J(),m===null&&$9(y.stateNode.containerInfo),Zo(y),null;case 10:return Jr(y.type),Zo(y),null;case 19:if(ie(ws),R=y.memoizedState,R===null)return Zo(y),null;if(Y=(y.flags&128)!==0,$=R.rendering,$===null)if(Y)gS(R,!1);else{if(is!==0||m!==null&&(m.flags&128)!==0)for(m=y.child;m!==null;){if($=cR(m),$!==null){for(y.flags|=128,gS(R,!1),m=$.updateQueue,y.updateQueue=m,wR(y,m),y.subtreeFlags=0,m=S,S=y.child;S!==null;)nR(S,m),S=S.sibling;return ce(ws,ws.current&1|2),ot&&ve(y,R.treeForkCount),y.child}m=m.sibling}R.tail!==null&&je()>ZR&&(y.flags|=128,Y=!0,gS(R,!1),y.lanes=4194304)}else{if(!Y)if(m=cR($),m!==null){if(y.flags|=128,Y=!0,m=m.updateQueue,y.updateQueue=m,wR(y,m),gS(R,!0),R.tail===null&&R.tailMode==="hidden"&&!$.alternate&&!ot)return Zo(y),null}else 2*je()-R.renderingStartTime>ZR&&S!==536870912&&(y.flags|=128,Y=!0,gS(R,!1),y.lanes=4194304);R.isBackwards?($.sibling=y.child,y.child=$):(m=R.last,m!==null?m.sibling=$:y.child=$,R.last=$)}return R.tail!==null?(m=R.tail,R.rendering=m,R.tail=m.sibling,R.renderingStartTime=je(),m.sibling=null,S=ws.current,ce(ws,Y?S&1|2:S&1),ot&&ve(y,R.treeForkCount),m):(Zo(y),null);case 22:case 23:return $u(y),e9(),R=y.memoizedState!==null,m!==null?m.memoizedState!==null!==R&&(y.flags|=8192):R&&(y.flags|=8192),R?(S&536870912)!==0&&(y.flags&128)===0&&(Zo(y),y.subtreeFlags&6&&(y.flags|=8192)):Zo(y),S=y.updateQueue,S!==null&&wR(y,S.retryQueue),S=null,m!==null&&m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(S=m.memoizedState.cachePool.pool),R=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(R=y.memoizedState.cachePool.pool),R!==S&&(y.flags|=2048),m!==null&&ie(Rv),null;case 24:return S=null,m!==null&&(S=m.memoizedState.cache),y.memoizedState.cache!==S&&(y.flags|=2048),Jr(Sa),Zo(y),null;case 25:return null;case 30:return null}throw Error(r(156,y.tag))}function GHe(m,y){switch(Fe(y),y.tag){case 1:return m=y.flags,m&65536?(y.flags=m&-65537|128,y):null;case 3:return Jr(Sa),J(),m=y.flags,(m&65536)!==0&&(m&128)===0?(y.flags=m&-65537|128,y):null;case 26:case 27:case 5:return le(y),null;case 31:if(y.memoizedState!==null){if($u(y),y.alternate===null)throw Error(r(340));on()}return m=y.flags,m&65536?(y.flags=m&-65537|128,y):null;case 13:if($u(y),m=y.memoizedState,m!==null&&m.dehydrated!==null){if(y.alternate===null)throw Error(r(340));on()}return m=y.flags,m&65536?(y.flags=m&-65537|128,y):null;case 19:return ie(ws),null;case 4:return J(),null;case 10:return Jr(y.type),null;case 22:case 23:return $u(y),e9(),m!==null&&ie(Rv),m=y.flags,m&65536?(y.flags=m&-65537|128,y):null;case 24:return Jr(Sa),null;case 25:return null;default:return null}}function L$(m,y){switch(Fe(y),y.tag){case 3:Jr(Sa),J();break;case 26:case 27:case 5:le(y);break;case 4:J();break;case 31:y.memoizedState!==null&&$u(y);break;case 13:$u(y);break;case 19:ie(ws);break;case 10:Jr(y.type);break;case 22:case 23:$u(y),e9(),m!==null&&ie(Rv);break;case 24:Jr(Sa)}}function vS(m,y){try{var S=y.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var Y=R.next;S=Y;do{if((S.tag&m)===m){R=void 0;var $=S.create,be=S.inst;R=$(),be.destroy=R}S=S.next}while(S!==Y)}}catch(Ve){La(y,y.return,Ve)}}function Cg(m,y,S){try{var R=y.updateQueue,Y=R!==null?R.lastEffect:null;if(Y!==null){var $=Y.next;R=$;do{if((R.tag&m)===m){var be=R.inst,Ve=be.destroy;if(Ve!==void 0){be.destroy=void 0,Y=y;var ut=S,Gt=Ve;try{Gt()}catch(en){La(Y,ut,en)}}}R=R.next}while(R!==$)}}catch(en){La(y,y.return,en)}}function P$(m){var y=m.updateQueue;if(y!==null){var S=m.stateNode;try{Aq(y,S)}catch(R){La(m,m.return,R)}}}function H$(m,y,S){S.props=Vv(m.type,m.memoizedProps),S.state=m.memoizedState;try{S.componentWillUnmount()}catch(R){La(m,y,R)}}function yS(m,y){try{var S=m.ref;if(S!==null){switch(m.tag){case 26:case 27:case 5:var R=m.stateNode;break;case 30:R=m.stateNode;break;default:R=m.stateNode}typeof S=="function"?m.refCleanup=S(R):S.current=R}}catch(Y){La(m,y,Y)}}function Jf(m,y){var S=m.ref,R=m.refCleanup;if(S!==null)if(typeof R=="function")try{R()}catch(Y){La(m,y,Y)}finally{m.refCleanup=null,m=m.alternate,m!=null&&(m.refCleanup=null)}else if(typeof S=="function")try{S(null)}catch(Y){La(m,y,Y)}else S.current=null}function F$(m){var y=m.type,S=m.memoizedProps,R=m.stateNode;try{e:switch(y){case"button":case"input":case"select":case"textarea":S.autoFocus&&R.focus();break e;case"img":S.src?R.src=S.src:S.srcSet&&(R.srcset=S.srcSet)}}catch(Y){La(m,m.return,Y)}}function X9(m,y,S){try{var R=m.stateNode;rFe(R,m.type,S,y),R[yt]=y}catch(Y){La(m,m.return,Y)}}function U$(m){return m.tag===5||m.tag===3||m.tag===26||m.tag===27&&Xg(m.type)||m.tag===4}function E9(m){e:for(;;){for(;m.sibling===null;){if(m.return===null||U$(m.return))return null;m=m.return}for(m.sibling.return=m.return,m=m.sibling;m.tag!==5&&m.tag!==6&&m.tag!==18;){if(m.tag===27&&Xg(m.type)||m.flags&2||m.child===null||m.tag===4)continue e;m.child.return=m,m=m.child}if(!(m.flags&2))return m.stateNode}}function V9(m,y,S){var R=m.tag;if(R===5||R===6)m=m.stateNode,y?(S.nodeType===9?S.body:S.nodeName==="HTML"?S.ownerDocument.body:S).insertBefore(m,y):(y=S.nodeType===9?S.body:S.nodeName==="HTML"?S.ownerDocument.body:S,y.appendChild(m),S=S._reactRootContainer,S!=null||y.onclick!==null||(y.onclick=to));else if(R!==4&&(R===27&&Xg(m.type)&&(S=m.stateNode,y=null),m=m.child,m!==null))for(V9(m,y,S),m=m.sibling;m!==null;)V9(m,y,S),m=m.sibling}function SR(m,y,S){var R=m.tag;if(R===5||R===6)m=m.stateNode,y?S.insertBefore(m,y):S.appendChild(m);else if(R!==4&&(R===27&&Xg(m.type)&&(S=m.stateNode),m=m.child,m!==null))for(SR(m,y,S),m=m.sibling;m!==null;)SR(m,y,S),m=m.sibling}function z$(m){var y=m.stateNode,S=m.memoizedProps;try{for(var R=m.type,Y=y.attributes;Y.length;)y.removeAttributeNode(Y[0]);jl(y,R,S),y[De]=m,y[yt]=S}catch($){La(m,m.return,$)}}var am=!1,Fs=!1,G9=!1,Y$=typeof WeakSet=="function"?WeakSet:Set,Cl=null;function DHe(m,y){if(m=m.containerInfo,nW=zR,m=Bf(m),Tv(m)){if("selectionStart"in m)var S={start:m.selectionStart,end:m.selectionEnd};else e:{S=(S=m.ownerDocument)&&S.defaultView||window;var R=S.getSelection&&S.getSelection();if(R&&R.rangeCount!==0){S=R.anchorNode;var Y=R.anchorOffset,$=R.focusNode;R=R.focusOffset;try{S.nodeType,$.nodeType}catch{S=null;break e}var be=0,Ve=-1,ut=-1,Gt=0,en=0,pn=m,Lt=null;t:for(;;){for(var Bt;pn!==S||Y!==0&&pn.nodeType!==3||(Ve=be+Y),pn!==$||R!==0&&pn.nodeType!==3||(ut=be+R),pn.nodeType===3&&(be+=pn.nodeValue.length),(Bt=pn.firstChild)!==null;)Lt=pn,pn=Bt;for(;;){if(pn===m)break t;if(Lt===S&&++Gt===Y&&(Ve=be),Lt===$&&++en===R&&(ut=be),(Bt=pn.nextSibling)!==null)break;pn=Lt,Lt=pn.parentNode}pn=Bt}S=Ve===-1||ut===-1?null:{start:Ve,end:ut}}else S=null}S=S||{start:0,end:0}}else S=null;for(rW={focusedElem:m,selectionRange:S},zR=!1,Cl=y;Cl!==null;)if(y=Cl,m=y.child,(y.subtreeFlags&1028)!==0&&m!==null)m.return=y,Cl=m;else for(;Cl!==null;){switch(y=Cl,$=y.alternate,m=y.flags,y.tag){case 0:if((m&4)!==0&&(m=y.updateQueue,m=m!==null?m.events:null,m!==null))for(S=0;S title"))),jl($,R,S),$[De]=m,En($),R=$;break e;case"link":var be=Jee("link","href",Y).get(R+(S.href||""));if(be){for(var Ve=0;VeQa&&(be=Qa,Qa=Kr,Kr=be);var Ct=xv(Ve,Kr),gt=xv(Ve,Qa);if(Ct&>&&(Bt.rangeCount!==1||Bt.anchorNode!==Ct.node||Bt.anchorOffset!==Ct.offset||Bt.focusNode!==gt.node||Bt.focusOffset!==gt.offset)){var Vt=pn.createRange();Vt.setStart(Ct.node,Ct.offset),Bt.removeAllRanges(),Kr>Qa?(Bt.addRange(Vt),Bt.extend(gt.node,gt.offset)):(Vt.setEnd(gt.node,gt.offset),Bt.addRange(Vt))}}}}for(pn=[],Bt=Ve;Bt=Bt.parentNode;)Bt.nodeType===1&&pn.push({element:Bt,left:Bt.scrollLeft,top:Bt.scrollTop});for(typeof Ve.focus=="function"&&Ve.focus(),Ve=0;VeS?32:S,q.T=null,S=F9,F9=null;var $=Rg,be=um;if(ol=0,k1=Rg=null,um=0,(Ma&6)!==0)throw Error(r(331));var Ve=Ma;if(Ma|=4,nee($.current),$$($,$.current,be,S),Ma=Ve,MS(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(bt,$)}catch{}return!0}finally{te.p=Y,q.T=R,xee(m,y)}}function wee(m,y,S){y=xs(S,y),y=T9(m.stateNode,y,2),m=wg(m,y,2),m!==null&&(we(m,2),qf(m))}function La(m,y,S){if(m.tag===3)wee(m,m,S);else for(;y!==null;){if(y.tag===3){wee(y,m,S);break}else if(y.tag===1){var R=y.stateNode;if(typeof y.type.getDerivedStateFromError=="function"||typeof R.componentDidCatch=="function"&&(kg===null||!kg.has(R))){m=xs(S,m),S=S$(2),R=wg(y,S,2),R!==null&&(M$(S,R,y,m),we(R,2),qf(R));break}}y=y.return}}function B9(m,y,S){var R=m.pingCache;if(R===null){R=m.pingCache=new LHe;var Y=new Set;R.set(y,Y)}else Y=R.get(y),Y===void 0&&(Y=new Set,R.set(y,Y));Y.has(S)||(O9=!0,Y.add(S),m=zHe.bind(null,m,y,S),y.then(m,m))}function zHe(m,y,S){var R=m.pingCache;R!==null&&R.delete(y),m.pingedLanes|=m.suspendedLanes&S,m.warmLanes&=~S,ro===m&&(na&S)===S&&(is===4||is===3&&(na&62914560)===na&&300>je()-IR?(Ma&2)===0&&R1(m,0):L9|=S,Z1===na&&(Z1=0)),qf(m)}function See(m,y){y===0&&(y=se()),m=$p(m,y),m!==null&&(we(m,y),qf(m))}function YHe(m){var y=m.memoizedState,S=0;y!==null&&(S=y.retryLane),See(m,S)}function BHe(m,y){var S=0;switch(m.tag){case 31:case 13:var R=m.stateNode,Y=m.memoizedState;Y!==null&&(S=Y.retryLane);break;case 19:R=m.stateNode;break;case 22:R=m.stateNode._retryCache;break;default:throw Error(r(314))}R!==null&&R.delete(y),See(m,S)}function _He(m,y){return Me(m,y)}var ER=null,N1=null,_9=!1,VR=!1,j9=!1,Ng=0;function qf(m){m!==N1&&m.next===null&&(N1===null?ER=N1=m:N1=N1.next=m),VR=!0,_9||(_9=!0,QHe())}function MS(m,y){if(!j9&&VR){j9=!0;do for(var S=!1,R=ER;R!==null;){if(m!==0){var Y=R.pendingLanes;if(Y===0)var $=0;else{var be=R.suspendedLanes,Ve=R.pingedLanes;$=(1<<31-Ut(42|m)+1)-1,$&=Y&~(be&~Ve),$=$&201326741?$&201326741|1:$?$|2:0}$!==0&&(S=!0,Zee(R,$))}else $=na,$=U(R,R===ro?$:0,R.cancelPendingCommit!==null||R.timeoutHandle!==-1),($&3)===0||V(R,$)||(S=!0,Zee(R,$));R=R.next}while(S);j9=!1}}function jHe(){Mee()}function Mee(){VR=_9=!1;var m=0;Ng!==0&&aFe()&&(m=Ng);for(var y=je(),S=null,R=ER;R!==null;){var Y=R.next,$=Cee(R,y);$===0?(R.next=null,S===null?ER=Y:S.next=Y,Y===null&&(N1=S)):(S=R,(m!==0||($&3)!==0)&&(VR=!0)),R=Y}ol!==0&&ol!==5||MS(m),Ng!==0&&(Ng=0)}function Cee(m,y){for(var S=m.suspendedLanes,R=m.pingedLanes,Y=m.expirationTimes,$=m.pendingLanes&-62914561;0<$;){var be=31-Ut($),Ve=1<Ve)break;var en=ut.transferSize,pn=ut.initiatorType;en&&Gee(pn)&&(ut=ut.responseEnd,be+=en*(ut"u"?null:document;function _ee(m,y,S){var R=X1;if(R&&typeof y=="string"&&y){var Y=mo(y);Y='link[rel="'+m+'"][href="'+Y+'"]',typeof S=="string"&&(Y+='[crossorigin="'+S+'"]'),Bee.has(Y)||(Bee.add(Y),m={rel:m,crossOrigin:S,href:y},R.querySelector(Y)===null&&(y=R.createElement("link"),jl(y,"link",m),En(y),R.head.appendChild(y)))}}function pFe(m){dm.D(m),_ee("dns-prefetch",m,null)}function mFe(m,y){dm.C(m,y),_ee("preconnect",m,y)}function gFe(m,y,S){dm.L(m,y,S);var R=X1;if(R&&m&&y){var Y='link[rel="preload"][as="'+mo(y)+'"]';y==="image"&&S&&S.imageSrcSet?(Y+='[imagesrcset="'+mo(S.imageSrcSet)+'"]',typeof S.imageSizes=="string"&&(Y+='[imagesizes="'+mo(S.imageSizes)+'"]')):Y+='[href="'+mo(m)+'"]';var $=Y;switch(y){case"style":$=E1(m);break;case"script":$=V1(m)}Hd.has($)||(m=d({rel:"preload",href:y==="image"&&S&&S.imageSrcSet?void 0:m,as:y},S),Hd.set($,m),R.querySelector(Y)!==null||y==="style"&&R.querySelector(kS($))||y==="script"&&R.querySelector(RS($))||(y=R.createElement("link"),jl(y,"link",m),En(y),R.head.appendChild(y)))}}function vFe(m,y){dm.m(m,y);var S=X1;if(S&&m){var R=y&&typeof y.as=="string"?y.as:"script",Y='link[rel="modulepreload"][as="'+mo(R)+'"][href="'+mo(m)+'"]',$=Y;switch(R){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":$=V1(m)}if(!Hd.has($)&&(m=d({rel:"modulepreload",href:m},y),Hd.set($,m),S.querySelector(Y)===null)){switch(R){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(S.querySelector(RS($)))return}R=S.createElement("link"),jl(R,"link",m),En(R),S.head.appendChild(R)}}}function yFe(m,y,S){dm.S(m,y,S);var R=X1;if(R&&m){var Y=Kt(R).hoistableStyles,$=E1(m);y=y||"default";var be=Y.get($);if(!be){var Ve={loading:0,preload:null};if(be=R.querySelector(kS($)))Ve.loading=5;else{m=d({rel:"stylesheet",href:m,"data-precedence":y},S),(S=Hd.get($))&&uW(m,S);var ut=be=R.createElement("link");En(ut),jl(ut,"link",m),ut._p=new Promise(function(Gt,en){ut.onload=Gt,ut.onerror=en}),ut.addEventListener("load",function(){Ve.loading|=1}),ut.addEventListener("error",function(){Ve.loading|=2}),Ve.loading|=4,LR(be,y,R)}be={type:"stylesheet",instance:be,count:1,state:Ve},Y.set($,be)}}}function bFe(m,y){dm.X(m,y);var S=X1;if(S&&m){var R=Kt(S).hoistableScripts,Y=V1(m),$=R.get(Y);$||($=S.querySelector(RS(Y)),$||(m=d({src:m,async:!0},y),(y=Hd.get(Y))&&dW(m,y),$=S.createElement("script"),En($),jl($,"link",m),S.head.appendChild($)),$={type:"script",instance:$,count:1,state:null},R.set(Y,$))}}function xFe(m,y){dm.M(m,y);var S=X1;if(S&&m){var R=Kt(S).hoistableScripts,Y=V1(m),$=R.get(Y);$||($=S.querySelector(RS(Y)),$||(m=d({src:m,async:!0,type:"module"},y),(y=Hd.get(Y))&&dW(m,y),$=S.createElement("script"),En($),jl($,"link",m),S.head.appendChild($)),$={type:"script",instance:$,count:1,state:null},R.set(Y,$))}}function jee(m,y,S,R){var Y=(Y=_.current)?OR(Y):null;if(!Y)throw Error(r(446));switch(m){case"meta":case"title":return null;case"style":return typeof S.precedence=="string"&&typeof S.href=="string"?(y=E1(S.href),S=Kt(Y).hoistableStyles,R=S.get(y),R||(R={type:"style",instance:null,count:0,state:null},S.set(y,R)),R):{type:"void",instance:null,count:0,state:null};case"link":if(S.rel==="stylesheet"&&typeof S.href=="string"&&typeof S.precedence=="string"){m=E1(S.href);var $=Kt(Y).hoistableStyles,be=$.get(m);if(be||(Y=Y.ownerDocument||Y,be={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},$.set(m,be),($=Y.querySelector(kS(m)))&&!$._p&&(be.instance=$,be.state.loading=5),Hd.has(m)||(S={rel:"preload",as:"style",href:S.href,crossOrigin:S.crossOrigin,integrity:S.integrity,media:S.media,hrefLang:S.hrefLang,referrerPolicy:S.referrerPolicy},Hd.set(m,S),$||TFe(Y,m,S,be.state))),y&&R===null)throw Error(r(528,""));return be}if(y&&R!==null)throw Error(r(529,""));return null;case"script":return y=S.async,S=S.src,typeof S=="string"&&y&&typeof y!="function"&&typeof y!="symbol"?(y=V1(S),S=Kt(Y).hoistableScripts,R=S.get(y),R||(R={type:"script",instance:null,count:0,state:null},S.set(y,R)),R):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,m))}}function E1(m){return'href="'+mo(m)+'"'}function kS(m){return'link[rel="stylesheet"]['+m+"]"}function Qee(m){return d({},m,{"data-precedence":m.precedence,precedence:null})}function TFe(m,y,S,R){m.querySelector('link[rel="preload"][as="style"]['+y+"]")?R.loading=1:(y=m.createElement("link"),R.preload=y,y.addEventListener("load",function(){return R.loading|=1}),y.addEventListener("error",function(){return R.loading|=2}),jl(y,"link",S),En(y),m.head.appendChild(y))}function V1(m){return'[src="'+mo(m)+'"]'}function RS(m){return"script[async]"+m}function Kee(m,y,S){if(y.count++,y.instance===null)switch(y.type){case"style":var R=m.querySelector('style[data-href~="'+mo(S.href)+'"]');if(R)return y.instance=R,En(R),R;var Y=d({},S,{"data-href":S.href,"data-precedence":S.precedence,href:null,precedence:null});return R=(m.ownerDocument||m).createElement("style"),En(R),jl(R,"style",Y),LR(R,S.precedence,m),y.instance=R;case"stylesheet":Y=E1(S.href);var $=m.querySelector(kS(Y));if($)return y.state.loading|=4,y.instance=$,En($),$;R=Qee(S),(Y=Hd.get(Y))&&uW(R,Y),$=(m.ownerDocument||m).createElement("link"),En($);var be=$;return be._p=new Promise(function(Ve,ut){be.onload=Ve,be.onerror=ut}),jl($,"link",R),y.state.loading|=4,LR($,S.precedence,m),y.instance=$;case"script":return $=V1(S.src),(Y=m.querySelector(RS($)))?(y.instance=Y,En(Y),Y):(R=S,(Y=Hd.get($))&&(R=d({},S),dW(R,Y)),m=m.ownerDocument||m,Y=m.createElement("script"),En(Y),jl(Y,"link",R),m.head.appendChild(Y),y.instance=Y);case"void":return null;default:throw Error(r(443,y.type))}else y.type==="stylesheet"&&(y.state.loading&4)===0&&(R=y.instance,y.state.loading|=4,LR(R,S.precedence,m));return y.instance}function LR(m,y,S){for(var R=S.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),Y=R.length?R[R.length-1]:null,$=Y,be=0;be title"):null)}function wFe(m,y,S){if(S===1||y.itemProp!=null)return!1;switch(m){case"meta":case"title":return!0;case"style":if(typeof y.precedence!="string"||typeof y.href!="string"||y.href==="")break;return!0;case"link":if(typeof y.rel!="string"||typeof y.href!="string"||y.href===""||y.onLoad||y.onError)break;return y.rel==="stylesheet"?(m=y.disabled,typeof y.precedence=="string"&&m==null):!0;case"script":if(y.async&&typeof y.async!="function"&&typeof y.async!="symbol"&&!y.onLoad&&!y.onError&&y.src&&typeof y.src=="string")return!0}return!1}function $ee(m){return!(m.type==="stylesheet"&&(m.state.loading&3)===0)}function SFe(m,y,S,R){if(S.type==="stylesheet"&&(typeof R.media!="string"||matchMedia(R.media).matches!==!1)&&(S.state.loading&4)===0){if(S.instance===null){var Y=E1(R.href),$=y.querySelector(kS(Y));if($){y=$._p,y!==null&&typeof y=="object"&&typeof y.then=="function"&&(m.count++,m=HR.bind(m),y.then(m,m)),S.state.loading|=4,S.instance=$,En($);return}$=y.ownerDocument||y,R=Qee(R),(Y=Hd.get(Y))&&uW(R,Y),$=$.createElement("link"),En($);var be=$;be._p=new Promise(function(Ve,ut){be.onload=Ve,be.onerror=ut}),jl($,"link",R),S.instance=$}m.stylesheets===null&&(m.stylesheets=new Map),m.stylesheets.set(S,y),(y=S.state.preload)&&(S.state.loading&3)===0&&(m.count++,S=HR.bind(m),y.addEventListener("load",S),y.addEventListener("error",S))}}var hW=0;function MFe(m,y){return m.stylesheets&&m.count===0&&UR(m,m.stylesheets),0hW?50:800)+y);return m.unsuspend=S,function(){m.unsuspend=null,clearTimeout(R),clearTimeout(Y)}}:null}function HR(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)UR(this,this.stylesheets);else if(this.unsuspend){var m=this.unsuspend;this.unsuspend=null,m()}}}var FR=null;function UR(m,y){m.stylesheets=null,m.unsuspend!==null&&(m.count++,FR=new Map,y.forEach(CFe,m),FR=null,HR.call(m))}function CFe(m,y){if(!(y.state.loading&4)){var S=FR.get(m);if(S)var R=S.get(null);else{S=new Map,FR.set(m,S);for(var Y=m.querySelectorAll("link[data-precedence],style[data-precedence]"),$=0;$"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),LY.exports=Icn(),LY.exports}var kcn=Zcn();const Rcn=document.getElementsByTagName("head")[0],bq=document.createElement("link");bq.rel="shortcut icon";bq.href=HFt;Rcn.appendChild(bq);kcn.createRoot(document.getElementById("root")??document.body).render(x.jsx(A.StrictMode,{children:x.jsx(Scn,{graphqlAddress:"/graphql"})})); +
diff --git a/raphtory-graphql/resources/json.worker-Bd5yaG-D.js b/raphtory-graphql/resources/json.worker-Bd5yaG-D.js deleted file mode 100644 index c055104c30..0000000000 --- a/raphtory-graphql/resources/json.worker-Bd5yaG-D.js +++ /dev/null @@ -1,44 +0,0 @@ -(function(){"use strict";var Nt,Jt,Ze,Ke,St,Ee,et,dt,At,we,tt,gt,kt,Ue,nt,We,xt,pt,K,ge,Rt;var Gn={exports:{}},H={};var ui;function cl(){if(ui)return H;ui=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),d=Symbol.iterator;function m(L){return L===null||typeof L!="object"?null:(L=d&&L[d]||L["@@iterator"],typeof L=="function"?L:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,_={};function w(L,F,$){this.props=L,this.context=F,this.refs=_,this.updater=$||g}w.prototype.isReactComponent={},w.prototype.setState=function(L,F){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,F,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function S(){}S.prototype=w.prototype;function b(L,F,$){this.props=L,this.context=F,this.refs=_,this.updater=$||g}var y=b.prototype=new S;y.constructor=b,p(y,w.prototype),y.isPureReactComponent=!0;var v=Array.isArray;function N(){}var k={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function V(L,F,$){var B=$.ref;return{$$typeof:e,type:L,key:F,ref:B!==void 0?B:null,props:$}}function q(L,F){return V(L.type,F,L.props)}function C(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function A(L){var F={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function($){return F[$]})}var R=/\/+/g;function E(L,F){return typeof L=="object"&&L!==null&&L.key!=null?A(""+L.key):F.toString(36)}function D(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(N,N):(L.status="pending",L.then(function(F){L.status==="pending"&&(L.status="fulfilled",L.value=F)},function(F){L.status==="pending"&&(L.status="rejected",L.reason=F)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function P(L,F,$,B,Q){var Z=typeof L;(Z==="undefined"||Z==="boolean")&&(L=null);var te=!1;if(L===null)te=!0;else switch(Z){case"bigint":case"string":case"number":te=!0;break;case"object":switch(L.$$typeof){case e:case t:te=!0;break;case h:return te=L._init,P(te(L._payload),F,$,B,Q)}}if(te)return Q=Q(L),te=B===""?"."+E(L,0):B,v(Q)?($="",te!=null&&($=te.replace(R,"$&/")+"/"),P(Q,F,$,"",function(Lf){return Lf})):Q!=null&&(C(Q)&&(Q=q(Q,$+(Q.key==null||L&&L.key===Q.key?"":(""+Q.key).replace(R,"$&/")+"/")+te)),F.push(Q)),1;te=0;var Te=B===""?".":B+":";if(v(L))for(var Se=0;Se"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Jn.exports=fl(),Jn.exports}hl();var Xn={exports:{}},Zt={};var di;function ml(){if(di)return Zt;di=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:s}}return Zt.Fragment=t,Zt.jsx=n,Zt.jsxs=n,Zt}var gi;function dl(){return gi||(gi=1,Xn.exports=ml()),Xn.exports}dl();var pi={},gl=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Qn.isErrorNoTelemetry(e)?new Qn(e.message+` - -`+e.stack):new Error(e.message+` - -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},pl=new gl;function Kt(e){yl(e)||pl.onUnexpectedError(e)}function yi(e){if(e instanceof Error){const{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:Qn.isErrorNoTelemetry(e)}}return e}var Yn="Canceled";function yl(e){return e instanceof bl?!0:e instanceof Error&&e.name===Yn&&e.message===Yn}var bl=class extends Error{constructor(){super(Yn),this.name=this.message}},Qn=class si extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof si)return t;const n=new si;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Ie=class tl extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,tl.prototype)}};function vl(e,t){const n=this;let r=!1,i;return function(){return r||(r=!0,i=e.apply(n,arguments)),i}}var gn;(function(e){function t(y){return y&&typeof y=="object"&&typeof y[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(y){yield y}e.single=i;function s(y){return t(y)?y:i(y)}e.wrap=s;function o(y){return y||n}e.from=o;function*l(y){for(let v=y.length-1;v>=0;v--)yield y[v]}e.reverse=l;function a(y){return!y||y[Symbol.iterator]().next().done===!0}e.isEmpty=a;function u(y){return y[Symbol.iterator]().next().value}e.first=u;function h(y,v){let N=0;for(const k of y)if(v(k,N++))return!0;return!1}e.some=h;function f(y,v){for(const N of y)if(v(N))return N}e.find=f;function*d(y,v){for(const N of y)v(N)&&(yield N)}e.filter=d;function*m(y,v){let N=0;for(const k of y)yield v(k,N++)}e.map=m;function*g(y,v){let N=0;for(const k of y)yield*v(k,N++)}e.flatMap=g;function*p(...y){for(const v of y)yield*v}e.concat=p;function _(y,v,N){let k=N;for(const T of y)k=v(k,T);return k}e.reduce=_;function*w(y,v,N=y.length){for(v<0&&(v+=y.length),N<0?N+=y.length:N>y.length&&(N=y.length);v1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function _l(...e){return pn(()=>bi(e))}function pn(e){return{dispose:vl(()=>{e()})}}var Zn=(Nt=class{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{bi(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Nt.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&this._toDispose.delete(t)}},Nt.DISABLE_DISPOSED_WARNING=!1,Nt),yn=(Jt=class{constructor(){this._store=new Zn,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}},Jt.None=Object.freeze({dispose(){}}),Jt),ie=(Ze=class{constructor(t){this.element=t,this.next=Ze.Undefined,this.prev=Ze.Undefined}},Ze.Undefined=new Ze(void 0),Ze),wl=class{constructor(){this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ie.Undefined}clear(){let e=this._first;for(;e!==ie.Undefined;){const t=e.next;e.prev=ie.Undefined,e.next=ie.Undefined,e=t}this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new ie(e);if(this._first===ie.Undefined)this._first=n,this._last=n;else if(t){const i=this._last;this._last=n,n.prev=i,i.next=n}else{const i=this._first;this._first=n,n.next=i,i.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==ie.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ie.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ie.Undefined&&e.next!==ie.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ie.Undefined&&e.next===ie.Undefined?(this._first=ie.Undefined,this._last=ie.Undefined):e.next===ie.Undefined?(this._last=this._last.prev,this._last.next=ie.Undefined):e.prev===ie.Undefined&&(this._first=this._first.next,this._first.prev=ie.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==ie.Undefined;)yield e.element,e=e.next}},Ll=globalThis.performance&&typeof globalThis.performance.now=="function",vi=class nl{static create(t){return new nl(t)}constructor(t){this._now=Ll&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},bn;(function(e){e.None=()=>yn.None;function t(R,E){return d(R,()=>{},0,void 0,!0,void 0,E)}e.defer=t;function n(R){return(E,D=null,P)=>{let I=!1,U;return U=R(j=>{if(!I)return U?U.dispose():I=!0,E.call(D,j)},null,P),I&&U.dispose(),U}}e.once=n;function r(R,E){return e.once(e.filter(R,E))}e.onceIf=r;function i(R,E,D){return h((P,I=null,U)=>R(j=>P.call(I,E(j)),null,U),D)}e.map=i;function s(R,E,D){return h((P,I=null,U)=>R(j=>{E(j),P.call(I,j)},null,U),D)}e.forEach=s;function o(R,E,D){return h((P,I=null,U)=>R(j=>E(j)&&P.call(I,j),null,U),D)}e.filter=o;function l(R){return R}e.signal=l;function a(...R){return(E,D=null,P)=>{const I=_l(...R.map(U=>U(j=>E.call(D,j))));return f(I,P)}}e.any=a;function u(R,E,D,P){let I=D;return i(R,U=>(I=E(I,U),I),P)}e.reduce=u;function h(R,E){let D;const P={onWillAddFirstListener(){D=R(I.fire,I)},onDidRemoveLastListener(){D?.dispose()}},I=new Me(P);return E?.add(I),I.event}function f(R,E){return E instanceof Array?E.push(R):E&&E.add(R),R}function d(R,E,D=100,P=!1,I=!1,U,j){let G,L,F,$=0,B;const Q={leakWarningThreshold:U,onWillAddFirstListener(){G=R(te=>{$++,L=E(L,te),P&&!F&&(Z.fire(L),L=void 0),B=()=>{const Te=L;L=void 0,F=void 0,(!P||$>1)&&Z.fire(Te),$=0},typeof D=="number"?(clearTimeout(F),F=setTimeout(B,D)):F===void 0&&(F=0,queueMicrotask(B))})},onWillRemoveListener(){I&&$>0&&B?.()},onDidRemoveLastListener(){B=void 0,G.dispose()}},Z=new Me(Q);return j?.add(Z),Z.event}e.debounce=d;function m(R,E=0,D){return e.debounce(R,(P,I)=>P?(P.push(I),P):[I],E,void 0,!0,void 0,D)}e.accumulate=m;function g(R,E=(P,I)=>P===I,D){let P=!0,I;return o(R,U=>{const j=P||!E(U,I);return P=!1,I=U,j},D)}e.latch=g;function p(R,E,D){return[e.filter(R,E,D),e.filter(R,P=>!E(P),D)]}e.split=p;function _(R,E=!1,D=[],P){let I=D.slice(),U=R(L=>{I?I.push(L):G.fire(L)});P&&P.add(U);const j=()=>{I?.forEach(L=>G.fire(L)),I=null},G=new Me({onWillAddFirstListener(){U||(U=R(L=>G.fire(L)),P&&P.add(U))},onDidAddFirstListener(){I&&(E?setTimeout(j):j())},onDidRemoveLastListener(){U&&U.dispose(),U=null}});return P&&P.add(G),G.event}e.buffer=_;function w(R,E){return(P,I,U)=>{const j=E(new b);return R(function(G){const L=j.evaluate(G);L!==S&&P.call(I,L)},void 0,U)}}e.chain=w;const S=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(E){return this.steps.push(E),this}forEach(E){return this.steps.push(D=>(E(D),D)),this}filter(E){return this.steps.push(D=>E(D)?D:S),this}reduce(E,D){let P=D;return this.steps.push(I=>(P=E(P,I),P)),this}latch(E=(D,P)=>D===P){let D=!0,P;return this.steps.push(I=>{const U=D||!E(I,P);return D=!1,P=I,U?I:S}),this}evaluate(E){for(const D of this.steps)if(E=D(E),E===S)break;return E}}function y(R,E,D=P=>P){const P=(...G)=>j.fire(D(...G)),I=()=>R.on(E,P),U=()=>R.removeListener(E,P),j=new Me({onWillAddFirstListener:I,onDidRemoveLastListener:U});return j.event}e.fromNodeEventEmitter=y;function v(R,E,D=P=>P){const P=(...G)=>j.fire(D(...G)),I=()=>R.addEventListener(E,P),U=()=>R.removeEventListener(E,P),j=new Me({onWillAddFirstListener:I,onDidRemoveLastListener:U});return j.event}e.fromDOMEventEmitter=v;function N(R){return new Promise(E=>n(R)(E))}e.toPromise=N;function k(R){const E=new Me;return R.then(D=>{E.fire(D)},()=>{E.fire(void 0)}).finally(()=>{E.dispose()}),E.event}e.fromPromise=k;function T(R,E){return R(D=>E.fire(D))}e.forward=T;function V(R,E,D){return E(D),R(P=>E(P))}e.runAndSubscribe=V;class q{constructor(E,D){this._observable=E,this._counter=0,this._hasChanged=!1;const P={onWillAddFirstListener:()=>{E.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{E.removeObserver(this)}};this.emitter=new Me(P),D&&D.add(this.emitter)}beginUpdate(E){this._counter++}handlePossibleChange(E){}handleChange(E,D){this._hasChanged=!0}endUpdate(E){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function C(R,E){return new q(R,E).emitter.event}e.fromObservable=C;function A(R){return(E,D,P)=>{let I=0,U=!1;const j={beginUpdate(){I++},endUpdate(){I--,I===0&&(R.reportChanges(),U&&(U=!1,E.call(D)))},handlePossibleChange(){},handleChange(){U=!0}};R.addObserver(j),R.reportChanges();const G={dispose(){R.removeObserver(j)}};return P instanceof Zn?P.add(G):Array.isArray(P)&&P.push(G),G}}e.fromObservableLight=A})(bn||(bn={}));var Nl=(Ke=class{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Ke._idPool++}`,Ke.all.add(this)}start(t){this._stopWatch=new vi,this.listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},Ke.all=new Set,Ke._idPool=0,Ke),Sl=-1,Al=(St=class{constructor(t,n,r=(St._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(const[r,i]of this._stacks)(!t||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],a=new Rl(`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Kt)(a),yn.None}if(this._disposed)return yn.None;t&&(e=e.bind(t));const r=new Kn(e);let i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=kl.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Kn?(this._deliveryQueue??=new Ml,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;const s=pn(()=>{i?.(),this._removeListener(r)});return n instanceof Zn?n.add(s):Array.isArray(n)&&n.push(s),s},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;const r=this._deliveryQueue.current===this;if(this._size*El<=t.length){let i=0;for(let s=0;s0}},Ml=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function Cl(){return globalThis._VSCODE_NLS_MESSAGES}function _i(){return globalThis._VSCODE_NLS_LANGUAGE}var Tl=_i()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function wi(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],o=t[s];let l=r;return typeof o=="string"?l=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(l=String(o)),l}),Tl&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function ne(e,t,...n){return wi(typeof e=="number"?Pl(e,t):t,n)}function Pl(e,t){const n=Cl()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var Mt="en",er=!1,tr=!1,nr=!1,Li=!1,rr=!1,vn=void 0,ir=Mt,Ni=Mt,Il=void 0,Ge=void 0,Je=globalThis,Ae=void 0;typeof Je.vscode<"u"&&typeof Je.vscode.process<"u"?Ae=Je.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Ae=process);var Fl=typeof Ae?.versions?.electron=="string",Dl=Fl&&Ae?.type==="renderer";if(typeof Ae=="object"){er=Ae.platform==="win32",tr=Ae.platform==="darwin",nr=Ae.platform==="linux",nr&&Ae.env.SNAP&&Ae.env.SNAP_REVISION,Ae.env.CI||Ae.env.BUILD_ARTIFACTSTAGINGDIRECTORY,vn=Mt,ir=Mt;const e=Ae.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);vn=t.userLocale,Ni=t.osLocale,ir=t.resolvedLanguage||Mt,Il=t.languagePack?.translationsConfigFile}catch{}Li=!0}else typeof navigator=="object"&&!Dl?(Ge=navigator.userAgent,er=Ge.indexOf("Windows")>=0,tr=Ge.indexOf("Macintosh")>=0,(Ge.indexOf("Macintosh")>=0||Ge.indexOf("iPad")>=0||Ge.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,nr=Ge.indexOf("Linux")>=0,Ge?.indexOf("Mobi")>=0,rr=!0,ir=_i()||Mt,vn=navigator.language.toLowerCase(),Ni=vn):console.error("Unable to resolve platform.");var en=er,Vl=tr,Ol=Li,Ul=rr,Bl=rr&&typeof Je.importScripts=="function",$l=Bl?Je.origin:void 0,Be=Ge,ql=typeof Je.postMessage=="function"&&!Je.importScripts;(()=>{if(ql){const e=[];Je.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{const r=++t;e.push({id:r,callback:n}),Je.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var jl=!!(Be&&Be.indexOf("Chrome")>=0);Be&&Be.indexOf("Firefox")>=0,!jl&&Be&&Be.indexOf("Safari")>=0,Be&&Be.indexOf("Edg/")>=0,Be&&Be.indexOf("Android")>=0;function Hl(e){return e}var Wl=class{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=Hl):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}},Si=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function zl(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Gl(e){return e.split(/\r\n|\r|\n/)}function Jl(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Ai(e){return e>=65&&e<=90}function sr(e){return 55296<=e&&e<=56319}function Yl(e){return 56320<=e&&e<=57343}function Ql(e,t){return(e-55296<<10)+(t-56320)+65536}function Zl(e,t,n){const r=e.charCodeAt(n);if(sr(r)&&n+1JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),Ee.cache=new Wl({getCacheKey:JSON.stringify},t=>{function n(h){const f=new Map;for(let d=0;d!h.startsWith("_")&&h in s);o.length===0&&(o=["_default"]);let l;for(const h of o){const f=n(s[h]);l=i(l,f)}const a=n(s._common),u=r(a,l);return new Ee(u)}),Ee._locales=new Si(()=>Object.keys(Ee.ambiguousCharacterData.value).filter(t=>!t.startsWith("_"))),Ee),ar=(et=class{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(et.getRawData())),this._data}static isInvisibleCharacter(t){return et.getData().has(t)}static get codePoints(){return et.getData()}},et._data=void 0,et),Ct,lr=globalThis.vscode;if(typeof lr<"u"&&typeof lr.process<"u"){const e=lr.process;Ct={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Ct={get platform(){return process.platform},get arch(){return process.arch},get env(){return pi},cwd(){return pi.VSCODE_CWD||process.cwd()}}:Ct={get platform(){return en?"win32":Vl?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var _n=Ct.cwd,tu=Ct.env,nu=Ct.platform,ru=65,iu=97,su=90,ou=122,st=46,me=47,Le=92,ot=58,au=63,ki=class extends Error{constructor(e,t,n){let r;typeof t=="string"&&t.indexOf("not ")===0?(r="must not be",t=t.replace(/^not /,"")):r="must be";const i=e.indexOf(".")!==-1?"property":"argument";let s=`The "${e}" ${i} ${r} of type ${t}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};function lu(e,t){if(e===null||typeof e!="object")throw new ki(t,"Object",e)}function oe(e,t){if(typeof e!="string")throw new ki(t,"string",e)}var Xe=nu==="win32";function W(e){return e===me||e===Le}function ur(e){return e===me}function at(e){return e>=ru&&e<=su||e>=iu&&e<=ou}function wn(e,t,n,r){let i="",s=0,o=-1,l=0,a=0;for(let u=0;u<=e.length;++u){if(u2){const h=i.lastIndexOf(n);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(n)),o=u,l=0;continue}else if(i.length!==0){i="",s=0,o=u,l=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,u)}`:i=e.slice(o+1,u),s=u-o-1;o=u,l=0}else a===st&&l!==-1?++l:l=-1}return i}function uu(e){return e?`${e[0]==="."?"":"."}${e}`:""}function xi(e,t){lu(t,"pathObject");const n=t.dir||t.root,r=t.base||`${t.name||""}${uu(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}var ye={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],oe(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=_n():(s=tu[`=${t}`]||_n(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===Le)&&(s=`${t}\\`));const o=s.length;let l=0,a="",u=!1;const h=s.charCodeAt(0);if(o===1)W(h)&&(l=1,u=!0);else if(W(h))if(u=!0,W(s.charCodeAt(1))){let f=2,d=f;for(;f2&&W(s.charCodeAt(2))&&(u=!0,l=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(r){if(t.length>0)break}else if(n=`${s.slice(l)}\\${n}`,r=u,u&&t.length>0)break}return n=wn(n,!r,"\\",W),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){oe(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const s=e.charCodeAt(0);if(t===1)return ur(s)?"\\":e;if(W(s))if(i=!0,W(e.charCodeAt(1))){let l=2,a=l;for(;l2&&W(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&W(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){oe(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return W(n)||t>2&&at(n)&&e.charCodeAt(1)===ot&&W(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&W(n.charCodeAt(0))){++i;const s=n.length;s>1&&W(n.charCodeAt(1))&&(++i,s>2&&(W(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ye.normalize(t)},relative(e,t){if(oe(e,"from"),oe(t,"to"),e===t)return"";const n=ye.resolve(e),r=ye.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===Le;)s--;const o=s-i;let l=0;for(;ll&&t.charCodeAt(a-1)===Le;)a--;const u=a-l,h=oh){if(t.charCodeAt(l+d)===Le)return r.slice(l+d+1);if(d===2)return r.slice(l+d)}o>h&&(e.charCodeAt(i+d)===Le?f=d:d===2&&(f=3)),f===-1&&(f=0)}let m="";for(d=i+f+1;d<=s;++d)(d===s||e.charCodeAt(d)===Le)&&(m+=m.length===0?"..":"\\..");return l+=f,m.length>0?`${m}${r.slice(l,a)}`:(r.charCodeAt(l)===Le&&++l,r.slice(l,a))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=ye.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===Le){if(t.charCodeAt(1)===Le){const n=t.charCodeAt(2);if(n!==au&&n!==st)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(at(t.charCodeAt(0))&&t.charCodeAt(1)===ot&&t.charCodeAt(2)===Le)return`\\\\?\\${t}`;return e},dirname(e){oe(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return W(i)?e:".";if(W(i)){if(n=r=1,W(e.charCodeAt(1))){let l=2,a=l;for(;l2&&W(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let l=t-1;l>=r;--l)if(W(e.charCodeAt(l))){if(!o){s=l;break}}else o=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&oe(t,"suffix"),oe(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&at(e.charCodeAt(0))&&e.charCodeAt(1)===ot&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=n;--s){const a=e.charCodeAt(s);if(W(a)){if(!i){n=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(a===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(W(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){oe(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===ot&&at(e.charCodeAt(0))&&(t=r=2);for(let l=e.length-1;l>=t;--l){const a=e.charCodeAt(l);if(W(a)){if(!s){r=l+1;break}continue}i===-1&&(s=!1,i=l+1),a===st?n===-1?n=l:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:xi.bind(null,"\\"),parse(e){oe(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return W(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(W(i)){if(r=1,W(e.charCodeAt(1))){let f=2,d=f;for(;f0&&(t.root=e.slice(0,r));let s=-1,o=r,l=-1,a=!0,u=e.length-1,h=0;for(;u>=r;--u){if(i=e.charCodeAt(u),W(i)){if(!a){o=u+1;break}continue}l===-1&&(a=!1,l=u+1),i===st?s===-1?s=u:h!==1&&(h=1):s!==-1&&(h=-1)}return l!==-1&&(s===-1||h===0||h===1&&s===l-1&&s===o+1?t.base=t.name=e.slice(o,l):(t.name=e.slice(o,s),t.base=e.slice(o,l),t.ext=e.slice(s,l))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},cu=(()=>{if(Xe){const e=/\\/g;return()=>{const t=_n().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>_n()})(),be={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:cu();oe(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===me)}return t=wn(t,!n,"/",ur),n?`/${t}`:t.length>0?t:"."},normalize(e){if(oe(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===me,n=e.charCodeAt(e.length-1)===me;return e=wn(e,!t,"/",ur),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return oe(e,"path"),e.length>0&&e.charCodeAt(0)===me},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":be.normalize(t)},relative(e,t){if(oe(e,"from"),oe(t,"to"),e===t||(e=be.resolve(e),t=be.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,s=1,o=t.length-s,l=il){if(t.charCodeAt(s+u)===me)return t.slice(s+u+1);if(u===0)return t.slice(s+u)}else i>l&&(e.charCodeAt(n+u)===me?a=u:u===0&&(a=0));let h="";for(u=n+a+1;u<=r;++u)(u===r||e.charCodeAt(u)===me)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(s+a)}`},toNamespacedPath(e){return e},dirname(e){if(oe(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===me;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===me){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&oe(t,"ext"),oe(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a===me){if(!i){n=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(a===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===me){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){oe(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const l=e.charCodeAt(o);if(l===me){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),l===st?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:xi.bind(null,"/"),parse(e){oe(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===me;let r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,l=!0,a=e.length-1,u=0;for(;a>=r;--a){const h=e.charCodeAt(a);if(h===me){if(!l){s=a+1;break}continue}o===-1&&(l=!1,o=a+1),h===st?i===-1?i=a:u!==1&&(u=1):i!==-1&&(u=-1)}if(o!==-1){const h=s===0&&n?1:s;i===-1||u===0||u===1&&i===o-1&&i===s+1?t.base=t.name=e.slice(h,o):(t.name=e.slice(h,i),t.base=e.slice(h,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};be.win32=ye.win32=ye,be.posix=ye.posix=be,Xe?ye.normalize:be.normalize;var fu=Xe?ye.join:be.join;Xe?ye.resolve:be.resolve,Xe?ye.relative:be.relative,Xe?ye.dirname:be.dirname,Xe?ye.basename:be.basename,Xe?ye.extname:be.extname,Xe?ye.sep:be.sep;var hu=/^\w[\w\d+.-]*$/,mu=/^\//,du=/^\/\//;function gu(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!hu.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!mu.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(du.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function pu(e,t){return!e&&!t?"file":e}function yu(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Fe&&(t=Fe+t):t=Fe;break}return t}var ee="",Fe="/",bu=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,$e=class Wn{static isUri(t){return t instanceof Wn?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,o=!1){typeof t=="object"?(this.scheme=t.scheme||ee,this.authority=t.authority||ee,this.path=t.path||ee,this.query=t.query||ee,this.fragment=t.fragment||ee):(this.scheme=pu(t,o),this.authority=n||ee,this.path=yu(this.scheme,r||ee),this.query=i||ee,this.fragment=s||ee,gu(this,o))}get fsPath(){return cr(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=ee),r===void 0?r=this.authority:r===null&&(r=ee),i===void 0?i=this.path:i===null&&(i=ee),s===void 0?s=this.query:s===null&&(s=ee),o===void 0?o=this.fragment:o===null&&(o=ee),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new Tt(n,r,i,s,o)}static parse(t,n=!1){const r=bu.exec(t);return r?new Tt(r[2]||ee,Ln(r[4]||ee),Ln(r[5]||ee),Ln(r[7]||ee),Ln(r[9]||ee),n):new Tt(ee,ee,ee,ee,ee)}static file(t){let n=ee;if(en&&(t=t.replace(/\\/g,Fe)),t[0]===Fe&&t[1]===Fe){const r=t.indexOf(Fe,2);r===-1?(n=t.substring(2),t=Fe):(n=t.substring(2,r),t=t.substring(r)||Fe)}return new Tt("file",n,t,ee,ee)}static from(t,n){return new Tt(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return en&&t.scheme==="file"?r=Wn.file(ye.join(cr(t,!0),...n)).path:r=be.join(t.path,...n),t.with({path:r})}toString(t=!1){return fr(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Wn)return t;{const n=new Tt(t);return n._formatted=t.external??null,n._fsPath=t._sep===Ri?t.fsPath??null:null,n}}else return t}},Ri=en?1:void 0,Tt=class extends $e{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=cr(this,!1)),this._fsPath}toString(e=!1){return e?fr(this,!0):(this._formatted||(this._formatted=fr(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Ri),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Ei={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Mi(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));const l=Ei[o];l!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=l):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function vu(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,en&&(n=n.replace(/\//g,"\\")),n}function fr(e,t){const n=t?vu:Mi;let r="",{scheme:i,authority:s,path:o,query:l,fragment:a}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=Fe,r+=Fe),s){let u=s.indexOf("@");if(u!==-1){const h=s.substr(0,u);s=s.substr(u+1),u=h.lastIndexOf(":"),u===-1?r+=n(h,!1,!1):(r+=n(h.substr(0,u),!1,!1),r+=":",r+=n(h.substr(u+1),!1,!0)),r+="@"}s=s.toLowerCase(),u=s.lastIndexOf(":"),u===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,u),!1,!0),r+=s.substr(u))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const u=o.charCodeAt(1);u>=65&&u<=90&&(o=`/${String.fromCharCode(u+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const u=o.charCodeAt(0);u>=65&&u<=90&&(o=`${String.fromCharCode(u+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return l&&(r+="?",r+=n(l,!1,!1)),a&&(r+="#",r+=t?a:Mi(a,!1,!1)),r}function Ci(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Ci(e.substr(3)):e}}var Ti=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ln(e){return e.match(Ti)?e.replace(Ti,t=>Ci(t)):e}var lt;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(lt||(lt={}));var _u="tkn",wu=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return be.join(this._serverRootPath,lt.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(o){return Kt(o),e}const t=e.authority;let n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);const r=this._ports[t],i=this._connectionTokens[t];let s=`path=${encodeURIComponent(e.path)}`;return typeof i=="string"&&(s+=`&${_u}=${encodeURIComponent(i)}`),$e.from({scheme:Ul?this._preferredWebSchema:lt.vscodeRemoteResource,authority:`${n}:${r}`,path:this._remoteResourcesPath,query:s})}},Lu=new wu,Nu="vscode-app",Su=(dt=class{asBrowserUri(t){const n=this.toUri(t);return this.uriToBrowserUri(n)}uriToBrowserUri(t){return t.scheme===lt.vscodeRemote?Lu.rewrite(t):t.scheme===lt.file&&(Ol||$l===`${lt.vscodeFileResource}://${dt.FALLBACK_AUTHORITY}`)?t.with({scheme:lt.vscodeFileResource,authority:t.authority||dt.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(t,n){if($e.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){const r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return $e.joinPath($e.parse(r,!0),t);const i=fu(r,t);return $e.file(i)}return $e.parse(n.toUrl(t))}},dt.FALLBACK_AUTHORITY=Nu,dt),Pi=new Su,Ii;(function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const n="vscode-coi";function r(s){let o;typeof s=="string"?o=new URL(s).searchParams:s instanceof URL?o=s.searchParams:$e.isUri(s)&&(o=new URL(s.toString(!0)).searchParams);const l=o?.get(n);if(l)return t.get(l)}e.getHeadersFromQuery=r;function i(s,o,l){if(!globalThis.crossOriginIsolated)return;const a=o&&l?"3":l?"2":"1";s instanceof URLSearchParams?s.set(n,a):s[n]=a}e.addSearchParam=i})(Ii||(Ii={}));var hr="default",Au="$initialize",ku=class{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.method=r,this.args=i,this.type=0}},Fi=class{constructor(e,t,n,r){this.vsWorker=e,this.seq=t,this.res=n,this.err=r,this.type=1}},xu=class{constructor(e,t,n,r,i){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=r,this.arg=i,this.type=2}},Ru=class{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}},Eu=class{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}},Mu=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t,n){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new ku(this._workerId,r,e,t,n))})}listen(e,t,n){let r=null;const i=new Me({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new xu(this._workerId,r,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new Eu(this._workerId,r)),r=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,t){const n={get:(r,i)=>(typeof i=="string"&&!r[i]&&(Vi(i)?r[i]=s=>this.listen(e,i,s):Di(i)?r[i]=this.listen(e,i,void 0):i.charCodeAt(0)===36&&(r[i]=async(...s)=>(await t?.(),this.sendMessage(e,i,s)))),r[i])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;e.err.$isError&&(n=new Error,n.name=e.err.name,n.message=e.err.message,n.stack=e.err.stack),t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(r=>{this._send(new Fi(this._workerId,t,r,void 0))},r=>{r.detail instanceof Error&&(r.detail=yi(r.detail)),this._send(new Fi(this._workerId,t,void 0,yi(r)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(r=>{this._send(new Ru(this._workerId,t,r))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let n=0;n{e(n,r)},handleMessage:(n,r,i)=>this._handleMessage(n,r,i),handleEvent:(n,r,i)=>this._handleEvent(n,r,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===hr&&t===Au)return this.initialize(n[0],n[1],n[2]);const r=e===hr?this._requestHandler:this._localChannels.get(e);if(!r)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if(typeof r[t]!="function")return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(r[t].apply(r,n))}catch(i){return Promise.reject(i)}}_handleEvent(e,t,n){const r=e===hr?this._requestHandler:this._localChannels.get(e);if(!r)throw new Error(`Missing channel ${e} on worker thread`);if(Vi(t)){const i=r[t].call(r,n);if(typeof i!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);return i}if(Di(t)){const i=r[t];if(typeof i!="function")throw new Error(`Missing event ${t} on request handler.`);return i}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,n){if(this._protocol.setWorkerId(e),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}return t&&(typeof t.baseUrl<"u"&&delete t.baseUrl,typeof t.paths<"u"&&typeof t.paths.vs<"u"&&delete t.paths.vs,typeof t.trustedTypesPolicy<"u"&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t)),import(`${Pi.asBrowserUri(`${n}.js`).toString(!0)}`).then(i=>{if(this._requestHandler=i.create(this),!this._requestHandler)throw new Error("No RequestHandler!")})}},ut=class{constructor(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function Oi(e,t){return(t<<5)-t+e|0}function Tu(e,t){t=Oi(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ut(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},$i=class Xt{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,s,o]=Xt._getElements(t),[l,a,u]=Xt._getElements(n);this._hasStrings=o&&u,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(Xt._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let f;return r<=i?(Pt.Assert(t===n+1,"originalStart should only be one more than originalEnd"),f=[new ut(t,0,r,i-r+1)]):t<=n?(Pt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new ut(t,n-t+1,r,0)]):(Pt.Assert(t===n+1,"originalStart should only be one more than originalEnd"),Pt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const o=[0],l=[0],a=this.ComputeRecursionPoint(t,n,r,i,o,l,s),u=o[0],h=l[0];if(a!==null)return a;if(!s[0]){const f=this.ComputeDiffRecursive(t,u,r,h,s);let d=[];return s[0]?d=[new ut(u+1,n-(u+1)+1,h+1,i-(h+1)+1)]:d=this.ComputeDiffRecursive(u+1,n,h+1,i,s),this.ConcatenateChanges(f,d)}return[new ut(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,o,l,a,u,h,f,d,m,g,p,_,w,S){let b=null,y=null,v=new Bi,N=n,k=r,T=m[0]-_[0]-i,V=-1073741824,q=this.m_forwardHistory.length-1;do{const C=T+t;C===N||C=0&&(u=this.m_forwardHistory[q],t=u[0],N=1,k=u.length-1)}while(--q>=-1);if(b=v.getReverseChanges(),S[0]){let C=m[0]+1,A=_[0]+1;if(b!==null&&b.length>0){const R=b[b.length-1];C=Math.max(C,R.getOriginalEnd()),A=Math.max(A,R.getModifiedEnd())}y=[new ut(C,d-C+1,A,p-A+1)]}else{v=new Bi,N=o,k=l,T=m[0]-_[0]-a,V=1073741824,q=w?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const C=T+s;C===N||C=h[C+1]?(f=h[C+1]-1,g=f-T-a,f>V&&v.MarkNextChange(),V=f+1,v.AddOriginalElement(f+1,g+1),T=C+1-s):(f=h[C-1],g=f-T-a,f>V&&v.MarkNextChange(),V=f,v.AddModifiedElement(f+1,g+1),T=C-1-s),q>=0&&(h=this.m_reverseHistory[q],s=h[0],N=1,k=h.length-1)}while(--q>=-1);y=v.getChanges()}return this.ConcatenateChanges(b,y)}ComputeRecursionPoint(t,n,r,i,s,o,l){let a=0,u=0,h=0,f=0,d=0,m=0;t--,r--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-t+(i-r),p=g+1,_=new Int32Array(p),w=new Int32Array(p),S=i-r,b=n-t,y=t-r,v=n-i,k=(b-S)%2===0;_[S]=t,w[b]=n,l[0]=!1;for(let T=1;T<=g/2+1;T++){let V=0,q=0;h=this.ClipDiagonalBound(S-T,T,S,p),f=this.ClipDiagonalBound(S+T,T,S,p);for(let A=h;A<=f;A+=2){A===h||AV+q&&(V=a,q=u),!k&&Math.abs(A-b)<=T-1&&a>=w[A])return s[0]=a,o[0]=u,R<=w[A]&&T<=1448?this.WALKTRACE(S,h,f,y,b,d,m,v,_,w,a,n,s,u,i,o,k,l):null}const C=(V-t+(q-r)-T)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(V,C))return l[0]=!0,s[0]=V,o[0]=q,C>0&&T<=1448?this.WALKTRACE(S,h,f,y,b,d,m,v,_,w,a,n,s,u,i,o,k,l):(t++,r++,[new ut(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(b-T,T,b,p),m=this.ClipDiagonalBound(b+T,T,b,p);for(let A=d;A<=m;A+=2){A===d||A=w[A+1]?a=w[A+1]-1:a=w[A-1],u=a-(A-b)-v;const R=a;for(;a>t&&u>r&&this.ElementsAreEqual(a,u);)a--,u--;if(w[A]=a,k&&Math.abs(A-S)<=T&&a<=_[A])return s[0]=a,o[0]=u,R>=_[A]&&T<=1448?this.WALKTRACE(S,h,f,y,b,d,m,v,_,w,a,n,s,u,i,o,k,l):null}if(T<=1447){let A=new Int32Array(f-h+2);A[0]=S-h+1,It.Copy2(_,h,A,1,f-h+1),this.m_forwardHistory.push(A),A=new Int32Array(m-d+2),A[0]=b-d+1,It.Copy2(w,d,A,1,m-d+1),this.m_reverseHistory.push(A)}}return this.WALKTRACE(S,h,f,y,b,d,m,v,_,w,a,n,s,u,i,o,k,l)}PrettifyChanges(t){for(let n=0;n0,l=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,s=0;if(n>0){const f=t[n-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const o=r.originalLength>0,l=r.modifiedLength>0;let a=0,u=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let f=1;;f++){const d=r.originalStart-f,m=r.modifiedStart-f;if(du&&(u=p,a=f)}r.originalStart-=a,r.modifiedStart-=a;const h=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],h)){t[n-1]=h[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&m>a&&(a=m,u=f,h=d)}return a>0?[u,h]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const s=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+o}ConcatenateChanges(t,n){const r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return It.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],It.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return It.Copy(t,0,i,0,t.length),It.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(Pt.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Pt.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let s=t.originalLength;const o=t.modifiedStart;let l=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(l=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new ut(i,s,o,l),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return ue.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return ue.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return ue.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return ue.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return ue.plusRange(this,t)}static plusRange(t,n){let r,i,s,o;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,o=t.endColumn),new ue(r,i,s,o)}intersectRanges(t){return ue.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,o=t.endColumn;const l=n.startLineNumber,a=n.startColumn,u=n.endLineNumber,h=n.endColumn;return ru?(s=u,o=h):s===u&&(o=Math.min(o,h)),r>s||r===s&&i>o?null:new ue(r,i,s,o)}equalsRange(t){return ue.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return ue.getEndPosition(this)}static getEndPosition(t){return new ae(t.endLineNumber,t.endColumn)}getStartPosition(){return ue.getStartPosition(this)}static getStartPosition(t){return new ae(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new ue(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new ue(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return ue.collapseToStart(this)}static collapseToStart(t){return new ue(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return ue.collapseToEnd(this)}static collapseToEnd(t){return new ue(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new ue(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new ue(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new ue(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function qi(e){return e<0?0:e>255?255:e|0}function Ft(e){return e<0?0:e>4294967295?4294967295:e|0}var Iu=class il{constructor(t){const n=qi(t);this._defaultValue=n,this._asciiMap=il._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){const n=new Uint8Array(256);return n.fill(t),n}set(t,n){const r=qi(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}},Fu=class{constructor(e,t,n){const r=new Uint8Array(e*t);for(let i=0,s=e*t;it&&(t=l),o>n&&(n=o),a>n&&(n=a)}t++,n++;const r=new Fu(n,t,0);for(let i=0,s=e.length;i=this._maxCharCode?0:this._states.get(e,t)}},mr=null;function Vu(){return mr===null&&(mr=new Du([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),mr}var tn=null;function Ou(){if(tn===null){tn=new Iu(0);const e=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let n=0;ni);if(i>0){const l=n.charCodeAt(i-1),a=n.charCodeAt(o);(l===40&&a===41||l===91&&a===93||l===123&&a===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(t,n=Vu()){const r=Ou(),i=[];for(let s=1,o=t.getLineCount();s<=o;s++){const l=t.getLineContent(s),a=l.length;let u=0,h=0,f=0,d=1,m=!1,g=!1,p=!1,_=!1;for(;u=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}},At.INSTANCE=new At,At),ji=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),Nn;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Sn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:bn.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ji})})(Nn||(Nn={}));var Sn=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ji:(this._emitter||(this._emitter=new Me),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},qu=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Sn),this._token}cancel(){this._token?this._token instanceof Sn&&this._token.cancel():this._token=Nn.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Sn&&this._token.dispose():this._token=Nn.None}},dr=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},An=new dr,gr=new dr,pr=new dr,ju=new Array(230),Hu=Object.create(null),Wu=Object.create(null);(function(){const t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const i of t){const[s,o,l,a,u,h,f,d,m]=i;if(r[o]||(r[o]=!0,Hu[l]=o,Wu[l.toLowerCase()]=o),!n[a]){if(n[a]=!0,!u)throw new Error(`String representation missing for key code ${a} around scan code ${l}`);An.define(a,u),gr.define(a,d||u),pr.define(a,m||d||u)}h&&(ju[h]=a)}})();var Hi;(function(e){function t(l){return An.keyCodeToStr(l)}e.toString=t;function n(l){return An.strToKeyCode(l)}e.fromString=n;function r(l){return gr.keyCodeToStr(l)}e.toUserSettingsUS=r;function i(l){return pr.keyCodeToStr(l)}e.toUserSettingsGeneral=i;function s(l){return gr.strToKeyCode(l)||pr.strToKeyCode(l)}e.fromUserSettings=s;function o(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return An.keyCodeToStr(l)}e.toElectronAccelerator=o})(Hi||(Hi={}));function zu(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}var Gu=class Pe extends X{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return Pe.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new Pe(this.startLineNumber,this.startColumn,t,n):new Pe(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new ae(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new ae(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new Pe(t,n,this.endLineNumber,this.endColumn):new Pe(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new Pe(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new Pe(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new Pe(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new Pe(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const n=new Qu(this,e,t);return this._factories.set(e,n),pn(()=>{const r=this._factories.get(e);!r||r!==n||(this._factories.delete(e),r.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Qu=class extends yn{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}},Zu=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}},Gi;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Gi||(Gi={}));var Ji;(function(e){const t=new Map;t.set(0,O.symbolMethod),t.set(1,O.symbolFunction),t.set(2,O.symbolConstructor),t.set(3,O.symbolField),t.set(4,O.symbolVariable),t.set(5,O.symbolClass),t.set(6,O.symbolStruct),t.set(7,O.symbolInterface),t.set(8,O.symbolModule),t.set(9,O.symbolProperty),t.set(10,O.symbolEvent),t.set(11,O.symbolOperator),t.set(12,O.symbolUnit),t.set(13,O.symbolValue),t.set(15,O.symbolEnum),t.set(14,O.symbolConstant),t.set(15,O.symbolEnum),t.set(16,O.symbolEnumMember),t.set(17,O.symbolKeyword),t.set(27,O.symbolSnippet),t.set(18,O.symbolText),t.set(19,O.symbolColor),t.set(20,O.symbolFile),t.set(21,O.symbolReference),t.set(22,O.symbolCustomColor),t.set(23,O.symbolFolder),t.set(24,O.symbolTypeParameter),t.set(25,O.account),t.set(26,O.issues);function n(s){let o=t.get(s);return o||(console.info("No codicon found for CompletionItemKind "+s),o=O.symbolProperty),o}e.toIcon=n;const r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,o){let l=r.get(s);return typeof l>"u"&&!o&&(l=9),l}e.fromString=i})(Ji||(Ji={}));var Xi;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Xi||(Xi={}));var Yi;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(Yi||(Yi={}));var Qi;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Qi||(Qi={}));var Zi;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Zi||(Zi={})),ne("Array","array"),ne("Boolean","boolean"),ne("Class","class"),ne("Constant","constant"),ne("Constructor","constructor"),ne("Enum","enumeration"),ne("EnumMember","enumeration member"),ne("Event","event"),ne("Field","field"),ne("File","file"),ne("Function","function"),ne("Interface","interface"),ne("Key","key"),ne("Method","method"),ne("Module","module"),ne("Namespace","namespace"),ne("Null","null"),ne("Number","number"),ne("Object","object"),ne("Operator","operator"),ne("Package","package"),ne("Property","property"),ne("String","string"),ne("Struct","struct"),ne("TypeParameter","type parameter"),ne("Variable","variable");var Ki;(function(e){const t=new Map;t.set(0,O.symbolFile),t.set(1,O.symbolModule),t.set(2,O.symbolNamespace),t.set(3,O.symbolPackage),t.set(4,O.symbolClass),t.set(5,O.symbolMethod),t.set(6,O.symbolProperty),t.set(7,O.symbolField),t.set(8,O.symbolConstructor),t.set(9,O.symbolEnum),t.set(10,O.symbolInterface),t.set(11,O.symbolFunction),t.set(12,O.symbolVariable),t.set(13,O.symbolConstant),t.set(14,O.symbolString),t.set(15,O.symbolNumber),t.set(16,O.symbolBoolean),t.set(17,O.symbolArray),t.set(18,O.symbolObject),t.set(19,O.symbolKey),t.set(20,O.symbolNull),t.set(21,O.symbolEnumMember),t.set(22,O.symbolStruct),t.set(23,O.symbolEvent),t.set(24,O.symbolOperator),t.set(25,O.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=O.symbolProperty),i}e.toIcon=n})(Ki||(Ki={})),we=class{static fromValue(t){switch(t){case"comment":return we.Comment;case"imports":return we.Imports;case"region":return we.Region}return new we(t)}constructor(t){this.value=t}},we.Comment=new we("comment"),we.Imports=new we("imports"),we.Region=new we("region");var es;(function(e){e[e.AIGenerated=1]="AIGenerated"})(es||(es={}));var ts;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(ts||(ts={}));var ns;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(ns||(ns={}));var rs;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(rs||(rs={})),new zi,new zi;var is;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(is||(is={}));var ss;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(ss||(ss={}));var os;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(os||(os={}));var as;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(as||(as={}));var ls;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(ls||(ls={}));var us;(function(e){e[e.Deprecated=1]="Deprecated"})(us||(us={}));var cs;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(cs||(cs={}));var fs;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(fs||(fs={}));var hs;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(hs||(hs={}));var ms;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(ms||(ms={}));var ds;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(ds||(ds={}));var gs;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(gs||(gs={}));var ps;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(ps||(ps={}));var ys;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(ys||(ys={}));var bs;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(bs||(bs={}));var vs;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(vs||(vs={}));var _s;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(_s||(_s={}));var ws;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(ws||(ws={}));var Ls;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Ls||(Ls={}));var Ns;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Ns||(Ns={}));var Ss;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Ss||(Ss={}));var As;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(As||(As={}));var yr;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(yr||(yr={}));var br;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(br||(br={}));var vr;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(vr||(vr={}));var ks;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(ks||(ks={}));var xs;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(xs||(xs={}));var Rs;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Rs||(Rs={}));var Es;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Es||(Es={}));var Ms;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Ms||(Ms={}));var Cs;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(Cs||(Cs={}));var Ts;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Ts||(Ts={}));var Ps;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(Ps||(Ps={}));var Is;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(Is||(Is={}));var Fs;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(Fs||(Fs={}));var Ds;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Ds||(Ds={}));var Vs;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Vs||(Vs={}));var Os;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(Os||(Os={}));var _r;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(_r||(_r={}));var Us;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(Us||(Us={}));var Bs;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Bs||(Bs={}));var $s;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})($s||($s={}));var qs;(function(e){e[e.Deprecated=1]="Deprecated"})(qs||(qs={}));var js;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(js||(js={}));var Hs;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(Hs||(Hs={}));var Ws;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Ws||(Ws={}));var zs;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(zs||(zs={}));var Ku=(tt=class{static chord(t,n){return zu(t,n)}},tt.CtrlCmd=2048,tt.Shift=1024,tt.Alt=512,tt.WinCtrl=256,tt);function ec(){return{editor:void 0,languages:void 0,CancellationTokenSource:qu,Emitter:Me,KeyCode:yr,KeyMod:Ku,Position:ae,Range:X,Selection:Gu,SelectionDirection:_r,MarkerSeverity:br,MarkerTag:vr,Uri:$e,Token:Zu}}var tc=(gt=class{static getChannel(t){return t.getChannel(gt.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(gt.CHANNEL_NAME,n)}},gt.CHANNEL_NAME="editorWorkerHost",gt),Gs,nc=class{constructor(){this[Gs]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let r=this._map.get(e);if(r)r.value=t,n!==0&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Gs=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const n=e.next,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}},rc=class extends nc{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},ic=class extends rc{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}},sc=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){const n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){const n=this.map.get(e);n&&n.forEach(t)}get(e){const t=this.map.get(e);return t||new Set}};new ic(10);function oc(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function Js(e){const t=[];for(const n of oc(e))typeof e[n]=="function"&&t.push(n);return t}function ac(e,t){const n=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(const i of e)r[i]=n(i);return r}var Xs;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Xs||(Xs={}));var Ys;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Ys||(Ys={}));var Qs;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Qs||(Qs={}));function lc(e,t,n,r,i){if(r===0)return!0;const s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const o=t.charCodeAt(r);if(e.get(o)!==0)return!0}return!1}function uc(e,t,n,r,i){if(r+i===n)return!0;const s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){const o=t.charCodeAt(r+i-1);if(e.get(o)!==0)return!0}return!1}function cc(e,t,n,r,i){return lc(e,t,n,r,i)&&uc(e,t,n,r,i)}var fc=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;const r=n.index,i=n[0].length;if(r===this._prevMatchStartIndex&&i===this._prevMatchLength){if(i===0){Zl(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=i,!this._wordSeparators||cc(this._wordSeparators,e,t,r,i))return n}while(n);return null}};function hc(e,t="Unreachable"){throw new Error(t)}function kn(e){if(!e()){debugger;e(),Kt(new Ie("Assertion Failed"))}}function Zs(e,t){let n=0;for(;n/?";function dc(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of mc)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}var Ks=dc();function eo(e){let t=Ks;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var to=new wl;to.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function wr(e,t,n,r,i){if(t=eo(t),i||(i=gn.first(to)),n.length>i.maxLen){let u=e-i.maxLen/2;return u<0?u=0:r+=u,n=n.substring(u,e+i.maxLen/2),wr(e,t,n,r,i)}const s=Date.now(),o=e-1-r;let l=-1,a=null;for(let u=1;!(Date.now()-s>=i.timeBudget);u++){const h=o-i.windowSize*u;t.lastIndex=Math.max(0,h);const f=gc(t,n,o,l);if(!f&&a||(a=f,h<=0))break;l=h}if(a){const u={word:a[0],startColumn:r+1+a.index,endColumn:r+1+a.index+a[0].length};return t.lastIndex=0,u}return null}function gc(e,t,n,r){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var pc=class{static computeUnicodeHighlights(e,t,n){const r=n?n.startLineNumber:1,i=n?n.endLineNumber:e.getLineCount(),s=new no(t),o=s.getCandidateCodePoints();let l;o==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${yc(Array.from(o))}`,"g");const a=new fc(null,l),u=[];let h=!1,f,d=0,m=0,g=0;e:for(let p=r,_=i;p<=_;p++){const w=e.getLineContent(p),S=w.length;a.reset(0);do if(f=a.next(w),f){let b=f.index,y=f.index+f[0].length;if(b>0){const T=w.charCodeAt(b-1);sr(T)&&b--}if(y+1=1e3){h=!0;break e}u.push(new X(p,b+1,p,y+1))}}while(f)}return{ranges:u,hasMore:h,ambiguousCharacterCount:d,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,t){const n=new no(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const i=e.codePointAt(0),s=n.ambiguousCharacters.getPrimaryConfusable(i),o=or.getLocales().filter(l=>!or.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(i));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:o}}case 1:return{kind:2}}}};function yc(e,t){return`[${zl(e.map(r=>String.fromCodePoint(r)).join(""))}]`}var no=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=or.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of ar.codePoints)ro(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,i=!1;if(t)for(const s of t){const o=s.codePointAt(0),l=eu(s);r=r||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!ar.isInvisibleCharacter(o)&&(i=!0)}return!r&&i?0:this.options.invisibleCharacters&&!ro(e)&&ar.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}};function ro(e){return e===" "||e===` -`||e===" "}var xn=class{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}},bc=class{constructor(e,t){this.lineRangeMapping=e,this.changes=t}},re=class ze{static addRange(t,n){let r=0;for(;rn))return new ze(t,n)}static ofLength(t){return new ze(0,t)}static ofStartAndLength(t,n){return new ze(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new Ie(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new ze(this.start+t,this.endExclusive+t)}deltaStart(t){return new ze(this.start+t,this.endExclusive)}deltaEnd(t){return new ze(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new Ie(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new Ie(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new Ie(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=nn(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){const n=Dt(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){const n=Dt(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=o.startLineNumber?s=new Y(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(s),s=o)}return s!==null&&n.push(s),new Yt(n)}subtractFrom(t){const n=Lr(this._normalizedRanges,o=>o.endLineNumberExclusive>=t.startLineNumber),r=nn(this._normalizedRanges,o=>o.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new Yt([t]);const i=[];let s=t.startLineNumber;for(let o=n;os&&i.push(new Y(s,l.startLineNumber)),s=l.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){const n=[];let r=0,i=0;for(;rn.delta(t)))}};Ue=class{static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new Ue(0,n.column-t.column):new Ue(n.lineNumber-t.lineNumber,n.column-1)}static ofRange(t){return Ue.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(const i of t)i===` -`?(n++,r=0):r++;return new Ue(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}createRange(t){return this.lineCount===0?new X(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new X(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(t){return this.lineCount===0?new ae(t.lineNumber,t.column+this.columnCount):new ae(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}},Ue.zero=new Ue(0,0);var _c=class{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}},Vt=class Qt{static inverse(t,n,r){const i=[];let s=1,o=1;for(const a of t){const u=new Qt(new Y(s,a.original.startLineNumber),new Y(o,a.modified.startLineNumber));u.modified.isEmpty||i.push(u),s=a.original.endLineNumberExclusive,o=a.modified.endLineNumberExclusive}const l=new Qt(new Y(s,n+1),new Y(o,r+1));return l.modified.isEmpty||i.push(l),i}static clip(t,n,r){const i=[];for(const s of t){const o=s.original.intersect(n),l=s.modified.intersect(r);o&&!o.isEmpty&&l&&!l.isEmpty&&i.push(new Qt(o,l))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new Qt(this.modified,this.original)}join(t){return new Qt(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){const t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new Ye(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Ie("not a valid diff");return new Ye(new X(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new X(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ye(new X(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new X(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(so(this.original.endLineNumberExclusive,t)&&so(this.modified.endLineNumberExclusive,n))return new Ye(new X(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new X(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ye(X.fromPositions(new ae(this.original.startLineNumber,1),Ot(new ae(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),X.fromPositions(new ae(this.modified.startLineNumber,1),Ot(new ae(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ye(X.fromPositions(Ot(new ae(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Ot(new ae(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),X.fromPositions(Ot(new ae(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Ot(new ae(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new Ie}};function Ot(e,t){if(e.lineNumber<1)return new ae(1,1);if(e.lineNumber>t.length)return new ae(t.length,t[t.length-1].length+1);const n=t[e.lineNumber-1];return e.column>n.length+1?new ae(e.lineNumber,n.length+1):e}function so(e,t){return e>=1&&e<=t.length}var rn=class zn extends Vt{static fromRangeMappings(t){const n=Y.join(t.map(i=>Y.fromRangeInclusive(i.originalRange))),r=Y.join(t.map(i=>Y.fromRangeInclusive(i.modifiedRange)));return new zn(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new zn(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new zn(this.original,this.modified,[this.toRangeMapping()])}},Ye=class sl{static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new sl(this.modifiedRange,this.originalRange)}toTextEdit(t){const n=t.getValueOfRange(this.modifiedRange);return new _c(this.originalRange,n)}},wc=3,Lc=class{computeDiff(e,t,n){const i=new Ac(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[];let o=null;for(const l of i.changes){let a;l.originalEndLineNumber===0?a=new Y(l.originalStartLineNumber+1,l.originalStartLineNumber+1):a=new Y(l.originalStartLineNumber,l.originalEndLineNumber+1);let u;l.modifiedEndLineNumber===0?u=new Y(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):u=new Y(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let h=new rn(a,u,l.charChanges?.map(f=>new Ye(new X(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn),new X(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===h.modified.startLineNumber||o.original.endLineNumberExclusive===h.original.startLineNumber)&&(h=new rn(o.original.join(h.original),o.modified.join(h.modified),o.innerChanges&&h.innerChanges?o.innerChanges.concat(h.innerChanges):void 0),s.pop()),s.push(h),o=h}return kn(()=>Zs(s,(l,a)=>a.original.startLineNumber-l.original.endLineNumberExclusive===a.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},En=class ol{constructor(t,n,r,i,s,o,l,a){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=l,this.modifiedEndColumn=a}static createFromDiffChange(t,n,r){const i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),o=n.getEndLineNumber(t.originalStart+t.originalLength-1),l=n.getEndColumn(t.originalStart+t.originalLength-1),a=r.getStartLineNumber(t.modifiedStart),u=r.getStartColumn(t.modifiedStart),h=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new ol(i,s,o,l,a,u,h,f)}};function Sc(e){if(e.length<=1)return e;const t=[e[0]];let n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const m=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&g.getElements().length>0){let p=oo(m,g,s,!0).changes;l&&(p=Sc(p)),d=[];for(let _=0,w=p.length;_1&&g>1;){const p=f.charCodeAt(m-2),_=d.charCodeAt(g-2);if(p!==_)break;m--,g--}(m>1||g>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,m,s+1,1,g)}{let m=Ar(f,1),g=Ar(d,1);const p=f.length+1,_=d.length+1;for(;m!0;const t=Date.now();return()=>Date.now()-tr===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(kr||(kr={}));function Mn(e,t){return(n,r)=>t(e(n),e(r))}var Cn=(e,t)=>e-t;function Cc(e){return(t,n)=>-e(t,n)}nt=class{constructor(t){this.iterate=t}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new nt(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new nt(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||kr.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}},nt.empty=new nt(t=>{});var Ut=class ai{static trivial(t,n){return new ai([new Ne(re.ofLength(t.length),re.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new ai([new Ne(re.ofLength(t.length),re.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}},Ne=class it{static invert(t,n){const r=[];return Rc(t,(i,s)=>{r.push(it.fromOffsetPairs(i?i.getEndExclusives():yt.zero,s?s.getStarts():new yt(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new it(new re(t.offset1,n.offset1),new re(t.offset2,n.offset2))}static assertSorted(t){let n;for(const r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new Ie("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new it(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new it(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new it(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new it(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new it(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){const n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new it(n,r)}getStarts(){return new yt(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new yt(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},yt=(We=class{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new We(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}},We.zero=new We(0,0),We.max=new We(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),We),xr=(xt=class{isValid(){return!0}},xt.instance=new xt,xt),Tc=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Ie("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&g>0&&s.get(m-1,g-1)===3&&(w+=o.get(m-1,g-1)),w+=r?r(m,g):1):w=-1;const S=Math.max(p,_,w);if(S===w){const b=m>0&&g>0?o.get(m-1,g-1):0;o.set(m,g,b+1),s.set(m,g,3)}else S===p?(o.set(m,g,0),s.set(m,g,1)):S===_&&(o.set(m,g,0),s.set(m,g,2));i.set(m,g,S)}const l=[];let a=e.length,u=t.length;function h(m,g){(m+1!==a||g+1!==u)&&l.push(new Ne(new re(m+1,a),new re(g+1,u))),a=m,u=g}let f=e.length-1,d=t.length-1;for(;f>=0&&d>=0;)s.get(f,d)===3?(h(f,d),f--,d--):s.get(f,d)===1?f--:d--;return h(-1,-1),l.reverse(),new Ut(l,!1)}},co=class{compute(e,t,n=xr.instance){if(e.length===0||t.length===0)return Ut.trivial(e,t);const r=e,i=t;function s(g,p){for(;gr.length||b>i.length)continue;const y=s(S,b);l.set(u,y);const v=S===_?a.get(u+1):a.get(u-1);if(a.set(u,y!==S?new fo(v,S,b,y-S):v),l.get(u)===r.length&&l.get(u)-u===i.length)break e}}let h=a.get(u);const f=[];let d=r.length,m=i.length;for(;;){const g=h?h.x+h.length:0,p=h?h.y+h.length:0;if((g!==d||p!==m)&&f.push(new Ne(new re(g,d),new re(p,m))),!h)break;d=h.x,m=h.y,h=h.prev}return f.reverse(),new Ut(f,!1)}},fo=class{constructor(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}},Ic=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}},Fc=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}},Tn=class{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){let i=e[r-1],s=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,i=i.substring(s)),this.lineStartOffsets.push(s);let o=0;if(!n){const a=i.trimStart();o=i.length-a.length,i=a.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-o,i.length):i.length;for(let a=0;aString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=mo(e>0?this.elements[e-1]:-1),n=mo(ei<=e),r=e-this.firstElementOffsetByLineIdx[n];return new ae(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+r+(r===0&&t==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?X.fromPositions(n,n):X.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!Mr(this.elements[e]))return;let t=e;for(;t>0&&Mr(this.elements[t-1]);)t--;let n=e;for(;nr<=e.start)??0,n=vc(this.firstElementOffsetByLineIdx,r=>e.endExclusive<=r)??this.elements.length;return new re(t,n)}};function Mr(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}var Dc={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function ho(e){return Dc[e]}function mo(e){return e===10?8:e===13?7:Er(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Vc(e,t,n,r,i,s){let{moves:o,excludedChanges:l}=Uc(e,t,n,s);if(!s.isValid())return[];const a=e.filter(h=>!l.has(h)),u=Bc(a,r,i,t,n,s);return Mc(o,u),o=$c(o),o=o.filter(h=>{const f=h.original.toOffsetRange().slice(t).map(m=>m.trim());return f.join(` -`).length>=15&&Oc(f,m=>m.length>=2)>=2}),o=qc(e,o),o}function Oc(e,t){let n=0;for(const r of e)t(r)&&n++;return n}function Uc(e,t,n,r){const i=[],s=e.filter(a=>a.modified.isEmpty&&a.original.length>=3).map(a=>new uo(a.original,t,a)),o=new Set(e.filter(a=>a.original.isEmpty&&a.modified.length>=3).map(a=>new uo(a.modified,n,a))),l=new Set;for(const a of s){let u=-1,h;for(const f of o){const d=a.computeSimilarity(f);d>u&&(u=d,h=f)}if(u>.9&&h&&(o.delete(h),i.push(new Vt(a.range,h.range)),l.add(a.source),l.add(h.source)),!r.isValid())return{moves:i,excludedChanges:l}}return{moves:i,excludedChanges:l}}function Bc(e,t,n,r,i,s){const o=[],l=new sc;for(const d of e)for(let m=d.original.startLineNumber;md.modified.startLineNumber,Cn));for(const d of e){let m=[];for(let g=d.modified.startLineNumber;g{for(const y of m)if(y.originalLineRange.endLineNumberExclusive+1===S.endLineNumberExclusive&&y.modifiedLineRange.endLineNumberExclusive+1===_.endLineNumberExclusive){y.originalLineRange=new Y(y.originalLineRange.startLineNumber,S.endLineNumberExclusive),y.modifiedLineRange=new Y(y.modifiedLineRange.startLineNumber,_.endLineNumberExclusive),w.push(y);return}const b={modifiedLineRange:_,originalLineRange:S};a.push(b),w.push(b)}),m=w}if(!s.isValid())return[]}a.sort(Cc(Mn(d=>d.modifiedLineRange.length,Cn)));const u=new Rn,h=new Rn;for(const d of a){const m=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,g=u.subtractFrom(d.modifiedLineRange),p=h.subtractFrom(d.originalLineRange).getWithDelta(m),_=g.getIntersection(p);for(const w of _.ranges){if(w.length<3)continue;const S=w,b=w.delta(-m);o.push(new Vt(b,S)),u.addRange(S),h.addRange(b)}}o.sort(Mn(d=>d.original.startLineNumber,Cn));const f=new io(e);for(let d=0;dN.original.startLineNumber<=m.original.startLineNumber),p=Dt(e,N=>N.modified.startLineNumber<=m.modified.startLineNumber),_=Math.max(m.original.startLineNumber-g.original.startLineNumber,m.modified.startLineNumber-p.modified.startLineNumber),w=f.findLastMonotonous(N=>N.original.startLineNumberN.modified.startLineNumberr.length||k>i.length||u.contains(k)||h.contains(N)||!go(r[N-1],i[k-1],s))break}y>0&&(h.addRange(new Y(m.original.startLineNumber-y,m.original.startLineNumber)),u.addRange(new Y(m.modified.startLineNumber-y,m.modified.startLineNumber)));let v;for(v=0;vr.length||k>i.length||u.contains(k)||h.contains(N)||!go(r[N-1],i[k-1],s))break}v>0&&(h.addRange(new Y(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+v)),u.addRange(new Y(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+v))),(y>0||v>0)&&(o[d]=new Vt(new Y(m.original.startLineNumber-y,m.original.endLineNumberExclusive+v),new Y(m.modified.startLineNumber-y,m.modified.endLineNumberExclusive+v)))}return o}function go(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const i=new co().compute(new Tn([e],new X(1,1,1,e.length),!1),new Tn([t],new X(1,1,1,t.length),!1),n);let s=0;const o=Ne.invert(i.diffs,e.length);for(const h of o)h.seq1Range.forEach(f=>{Er(e.charCodeAt(f))||s++});function l(h){let f=0;for(let d=0;dt.length?e:t);return s/a>.6&&a>10}function $c(e){if(e.length===0)return e;e.sort(Mn(n=>n.original.startLineNumber,Cn));const t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function qc(e,t){const n=new io(e);return t=t.filter(r=>{const i=n.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber0&&(l=l.delta(u))}i.push(l)}return r.length>0&&i.push(r[r.length-1]),i}function jc(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+1=r.start&&e.seq2Range.start-o>=i.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let l=0;for(;e.seq1Range.start+lu&&(u=g,a=h)}return e.delta(a)}function Hc(e,t,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new Ne(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Wc(e,t,n){const r=Ne.invert(n,e.length),i=[];let s=new yt(0,0);function o(a,u){if(a.offset10;){const _=r[0];if(!(_.seq1Range.intersects(d.seq1Range)||_.seq2Range.intersects(d.seq2Range)))break;const S=e.findWordContaining(_.seq1Range.start),b=t.findWordContaining(_.seq2Range.start),y=new Ne(S,b),v=y.intersect(_);if(g+=v.seq1Range.length,p+=v.seq2Range.length,d=d.join(y),d.seq1Range.endExclusive>=_.seq1Range.endExclusive)r.shift();else break}g+p<(d.seq1Range.length+d.seq2Range.length)*2/3&&i.push(d),s=d.getEndExclusives()}for(;r.length>0;){const a=r.shift();a.seq1Range.isEmpty||(o(a.getStarts(),a),o(a.getEndExclusives().delta(-1),a))}return zc(n,i)}function zc(e,t){const n=[];for(;e.length>0||t.length>0;){const r=e[0],i=t[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Gc(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const o=[r[0]];for(let l=1;l5||m.seq1Range.length+m.seq2Range.length>5)};const u=r[l],h=o[o.length-1];a(h,u)?(s=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)}r=o}while(i++<10&&s);return r}function Jc(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const l=[r[0]];for(let a=1;a5||p.length>500)return!1;const w=e.getText(p).trim();if(w.length>20||w.split(/\r\n|\r|\n/).length>1)return!1;const S=e.countLinesIn(m.seq1Range),b=m.seq1Range.length,y=t.countLinesIn(m.seq2Range),v=m.seq2Range.length,N=e.countLinesIn(g.seq1Range),k=g.seq1Range.length,T=t.countLinesIn(g.seq2Range),V=g.seq2Range.length,q=130;function C(A){return Math.min(A,q)}return Math.pow(Math.pow(C(S*40+b),1.5)+Math.pow(C(y*40+v),1.5),1.5)+Math.pow(Math.pow(C(N*40+k),1.5)+Math.pow(C(T*40+V),1.5),1.5)>(q**1.5)**1.5*1.3};const h=r[a],f=l[l.length-1];u(f,h)?(s=!0,l[l.length-1]=l[l.length-1].join(h)):l.push(h)}r=l}while(i++<10&&s);const o=[];return Ec(r,(l,a,u)=>{let h=a;function f(w){return w.length>0&&w.trim().length<=3&&a.seq1Range.length+a.seq2Range.length>100}const d=e.extendToFullLines(a.seq1Range),m=e.getText(new re(d.start,a.seq1Range.start));f(m)&&(h=h.deltaStart(-m.length));const g=e.getText(new re(a.seq1Range.endExclusive,d.endExclusive));f(g)&&(h=h.deltaEnd(g.length));const p=Ne.fromOffsetPairs(l?l.getEndExclusives():yt.zero,u?u.getStarts():yt.max),_=h.intersect(p);o.length>0&&_.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(_):o.push(_)}),o}var vo=class{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:_o(this.lines[e-1]),n=e===this.lines.length?0:_o(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` -`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}};function _o(e){let t=0;for(;ty===v))return new xn([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new xn([new rn(new Y(1,e.length+1),new Y(1,t.length+1),[new Ye(new X(1,1,e.length,e[e.length-1].length+1),new X(1,1,t.length,t[t.length-1].length+1))])],[],!1);const r=n.maxComputationTimeMs===0?xr.instance:new Tc(n.maxComputationTimeMs),i=!n.ignoreTrimWhitespace,s=new Map;function o(y){let v=s.get(y);return v===void 0&&(v=s.size,s.set(y,v)),v}const l=e.map(y=>o(y.trim())),a=t.map(y=>o(y.trim())),u=new vo(l,e),h=new vo(a,t),f=u.length+h.length<1700?this.dynamicProgrammingDiffing.compute(u,h,r,(y,v)=>e[y]===t[v]?t[v].length===0?.1:1+Math.log(1+t[v].length):.99):this.myersDiffingAlgorithm.compute(u,h,r);let d=f.diffs,m=f.hitTimeout;d=po(u,h,d),d=Gc(u,h,d);const g=[],p=y=>{if(i)for(let v=0;vy.seq1Range.start-_===y.seq2Range.start-w);const v=y.seq1Range.start-_;p(v),_=y.seq1Range.endExclusive,w=y.seq2Range.endExclusive;const N=this.refineDiff(e,t,y,r,i);N.hitTimeout&&(m=!0);for(const k of N.mappings)g.push(k)}p(e.length-_);const S=wo(g,e,t);let b=[];return n.computeMoves&&(b=this.computeMoves(S,e,t,l,a,r,i)),kn(()=>{function y(N,k){if(N.lineNumber<1||N.lineNumber>k.length)return!1;const T=k[N.lineNumber-1];return!(N.column<1||N.column>T.length+1)}function v(N,k){return!(N.startLineNumber<1||N.startLineNumber>k.length+1||N.endLineNumberExclusive<1||N.endLineNumberExclusive>k.length+1)}for(const N of S){if(!N.innerChanges)return!1;for(const k of N.innerChanges)if(!(y(k.modifiedRange.getStartPosition(),t)&&y(k.modifiedRange.getEndPosition(),t)&&y(k.originalRange.getStartPosition(),e)&&y(k.originalRange.getEndPosition(),e)))return!1;if(!v(N.modified,t)||!v(N.original,e))return!1}return!0}),new xn(S,b,m)}computeMoves(e,t,n,r,i,s,o){return Vc(e,t,n,r,i,s).map(u=>{const h=this.refineDiff(t,n,new Ne(u.original.toOffsetRange(),u.modified.toOffsetRange()),s,o),f=wo(h.mappings,t,n,!0);return new bc(u,f)})}refineDiff(e,t,n,r,i){const o=Qc(n).toRangeMapping2(e,t),l=new Tn(e,o.originalRange,i),a=new Tn(t,o.modifiedRange,i),u=l.length+a.length<500?this.dynamicProgrammingDiffing.compute(l,a,r):this.myersDiffingAlgorithm.compute(l,a,r);let h=u.diffs;return h=po(l,a,h),h=Wc(l,a,h),h=Hc(l,a,h),h=Jc(l,a,h),{mappings:h.map(d=>new Ye(l.translateRange(d.seq1Range),a.translateRange(d.seq2Range))),hitTimeout:u.hitTimeout}}};function wo(e,t,n,r=!1){const i=[];for(const s of xc(e.map(o=>Yc(o,t,n)),(o,l)=>o.original.overlapOrTouch(l.original)||o.modified.overlapOrTouch(l.modified))){const o=s[0],l=s[s.length-1];i.push(new rn(o.original.join(l.original),o.modified.join(l.modified),s.map(a=>a.innerChanges[0])))}return kn(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)?!1:Zs(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);const s=new Y(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new Y(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new rn(s,o,[e])}function Qc(e){return new Vt(new Y(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new Y(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var Lo={getLegacy:()=>new Lc,getDefault:()=>new Xc};function ct(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var he=class{constructor(e,t,n,r=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,n))|0,this.a=ct(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}},bt=class dn{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=ct(Math.max(Math.min(1,n),0),3),this.l=ct(Math.max(Math.min(1,r),0),3),this.a=ct(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,o=Math.max(n,r,i),l=Math.min(n,r,i);let a=0,u=0;const h=(l+o)/2,f=o-l;if(f>0){switch(u=Math.min(h<=.5?f/(2*h):f/(2-2*h),1),o){case n:a=(r-i)/f+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){const n=t.h/360,{s:r,l:i,a:s}=t;let o,l,a;if(r===0)o=l=a=i;else{const u=i<.5?i*(1+r):i+r-i*r,h=2*i-u;o=dn._hue2rgb(h,u,n+1/3),l=dn._hue2rgb(h,u,n),a=dn._hue2rgb(h,u,n-1/3)}return new he(Math.round(o*255),Math.round(l*255),Math.round(a*255),s)}},Pn=class ll{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=ct(Math.max(Math.min(1,n),0),3),this.v=ct(Math.max(Math.min(1,r),0),3),this.a=ct(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),l=s-o,a=s===0?0:l/s;let u;return l===0?u=0:s===n?u=((r-i)/l%6+6)%6:s===r?u=(i-n)/l+2:u=(n-r)/l+4,new ll(Math.round(u*60),a,s,t.a)}static toRGBA(t){const{h:n,s:r,v:i,a:s}=t,o=i*r,l=o*(1-Math.abs(n/60%2-1)),a=i-o;let[u,h,f]=[0,0,0];return n<60?(u=o,h=l):n<120?(u=l,h=o):n<180?(h=o,f=l):n<240?(h=l,f=o):n<300?(u=l,f=o):n<=360&&(u=o,f=l),u=Math.round((u+a)*255),h=Math.round((h+a)*255),f=Math.round((f+a)*255),new he(u,h,f,s)}},In=(K=class{static fromHex(t){return K.Format.CSS.parseHex(t)||K.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:bt.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Pn.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof he)this.rgba=t;else if(t instanceof bt)this._hsla=t,this.rgba=bt.toRGBA(t);else if(t instanceof Pn)this._hsva=t,this.rgba=Pn.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&he.equals(this.rgba,t.rgba)&&bt.equals(this.hsla,t.hsla)&&Pn.equals(this.hsva,t.hsva)}getRelativeLuminance(){const t=K._relativeLuminanceForComponent(this.rgba.r),n=K._relativeLuminanceForComponent(this.rgba.g),r=K._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return ct(i,4)}static _relativeLuminanceForComponent(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){const n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(const i of r){const s=i.filter(u=>u!==void 0),o=s[1],l=s[2];if(!l)continue;let a;if(o==="rgb"){const u=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;a=So(sn(e,i),on(l,u),!1)}else if(o==="rgba"){const u=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;a=So(sn(e,i),on(l,u),!0)}else if(o==="hsl"){const u=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;a=Ao(sn(e,i),on(l,u),!1)}else if(o==="hsla"){const u=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;a=Ao(sn(e,i),on(l,u),!0)}else o==="#"&&(a=Zc(sn(e,i),o+l));a&&t.push(a)}return t}function e1(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:Kc(e)}var ko=new RegExp("\\bMARK:\\s*(.*)$","d"),t1=/^-+|-+$/g;function n1(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const r=r1(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){const r=i1(e);n=n.concat(r)}return n}function r1(e,t){const n=[],r=e.getLineCount();for(let i=1;i<=r;i++){const s=e.getLineContent(i),o=s.match(t.foldingRules.markers.start);if(o){const l={startLineNumber:i,startColumn:o[0].length+1,endLineNumber:i,endColumn:s.length+1};if(l.endColumn>l.startColumn){const a={range:l,...xo(s.substring(o[0].length)),shouldBeInComments:!1};(a.text||a.hasSeparatorLine)&&n.push(a)}}}return n}function i1(e){const t=[],n=e.getLineCount();for(let r=1;r<=n;r++){const i=e.getLineContent(r);s1(i,r,t)}return t}function s1(e,t,n){ko.lastIndex=0;const r=ko.exec(e);if(r){const i=r.indices[1][0]+1,s=r.indices[1][1]+1,o={startLineNumber:t,startColumn:i,endLineNumber:t,endColumn:s};if(o.endColumn>o.startColumn){const l={range:o,...xo(r[1]),shouldBeInComments:!0};(l.text||l.hasSeparatorLine)&&n.push(l)}}}function xo(e){e=e.trim();const t=e.startsWith("-");return e=e.replace(t1,""),{text:e,hasSeparatorLine:t}}var Ro;(function(e){async function t(r){let i;const s=await Promise.all(r.map(o=>o.then(l=>l,l=>{i||(i=l)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(o){s(o)}})}e.withAsyncBody=n})(Ro||(Ro={})),ge=class{static fromArray(t){return new ge(n=>{n.emitMany(t)})}static fromPromise(t){return new ge(async n=>{n.emitMany(await t)})}static fromPromises(t){return new ge(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new ge(async n=>{await Promise.all(t.map(async r=>{for await(const i of r)n.emitOne(i)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new Me,queueMicrotask(async()=>{const r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new ge(async r=>{for await(const i of t)r.emitOne(n(i))})}map(t){return ge.map(this,t)}static filter(t,n){return new ge(async r=>{for await(const i of t)n(i)&&r.emitOne(i)})}filter(t){return ge.filter(this,t)}static coalesce(t){return ge.filter(t,n=>!!n)}coalesce(){return ge.coalesce(this)}static async toPromise(t){const n=[];for await(const r of t)n.push(r);return n}toPromise(){return ge.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}},ge.EMPTY=ge.fromArray([]);var o1=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Ft(e);const n=this.values,r=this.prefixSum,i=t.length;return i===0?!1:(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Ft(e),t=Ft(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;const i=n.length-e;return t>=i&&(t=i),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Ft(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,r=0,i=0,s=0;for(;t<=n;)if(r=t+(n-t)/2|0,i=this.prefixSum[r],s=i-this.values[r],e=i)t=r+1;else break;return new a1(r,e-s)}},a1=class{constructor(e,t){this.index=e,this.remainder=t,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}},l1=class{constructor(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new ae(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let r=0;re.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new c1($e.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}},c1=class extends l1{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{const i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e}},f1=(Rt=class{constructor(){this._workerTextModelSyncServer=new u1}dispose(){}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){const i=this._getModel(t);return i?pc.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){const r=this._getModel(t);return r?n1(r,n):[]}async $computeDiff(t,n,r,i){const s=this._getModel(t),o=this._getModel(n);return!s||!o?null:Fn.computeDiff(s,o,r,i)}static computeDiff(t,n,r,i){const s=i==="advanced"?Lo.getDefault():Lo.getLegacy(),o=t.getLinesContent(),l=n.getLinesContent(),a=s.computeDiff(o,l,r),u=a.changes.length>0?!1:this._modelsAreIdentical(t,n);function h(f){return f.map(d=>[d.original.startLineNumber,d.original.endLineNumberExclusive,d.modified.startLineNumber,d.modified.endLineNumberExclusive,d.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:u,quitEarly:a.hitTimeout,changes:h(a.changes),moves:a.moves.map(f=>[f.lineRangeMapping.original.startLineNumber,f.lineRangeMapping.original.endLineNumberExclusive,f.lineRangeMapping.modified.startLineNumber,f.lineRangeMapping.modified.endLineNumberExclusive,h(f.changes)])}}static _modelsAreIdentical(t,n){const r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const o=t.getLineContent(s),l=n.getLineContent(s);if(o!==l)return!1}return!0}async $computeMoreMinimalEdits(t,n,r){const i=this._getModel(t);if(!i)return n;const s=[];let o;n=n.slice(0).sort((a,u)=>{if(a.range&&u.range)return X.compareRangesUsingStarts(a.range,u.range);const h=a.range?0:1,f=u.range?0:1;return h-f});let l=0;for(let a=1;aFn._diffLimit){s.push({range:a,text:u});continue}const d=Pu(f,u,r),m=i.offsetAt(X.lift(a).getStartPosition());for(const g of d){const p=i.positionAt(m+g.originalStart),_=i.positionAt(m+g.originalStart+g.originalLength),w={text:u.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:p.lineNumber,startColumn:p.column,endLineNumber:_.lineNumber,endColumn:_.column}};i.getValueInRange(w.range)!==w.text&&s.push(w)}}return typeof o=="number"&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(t){const n=this._getModel(t);return n?Bu(n):null}async $computeDefaultDocumentColors(t){const n=this._getModel(t);return n?e1(n):null}async $textualSuggest(t,n,r,i){const s=new vi,o=new RegExp(r,i),l=new Set;e:for(const a of t){const u=this._getModel(a);if(u){for(const h of u.words(o))if(!(h===n||!isNaN(Number(h)))&&(l.add(h),l.size>Fn._suggestionsLimit))break e}}return{words:Array.from(l),duration:s.elapsed()}}async $computeWordRanges(t,n,r,i){const s=this._getModel(t);if(!s)return Object.create(null);const o=new RegExp(r,i),l=Object.create(null);for(let a=n.startLineNumber;athis._host.$fhr(o,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve(Js(this._foreignModule))):new Promise((o,l)=>{const a=u=>{this._foreignModule=u.create(s,t),o(Js(this._foreignModule))};import(`${Pi.asBrowserUri(`${e}.js`).toString(!0)}`).then(a).catch(l)})}$fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}}};typeof importScripts=="function"&&(globalThis.monaco=ec());var Tr=!1;function Eo(e){if(Tr)return;Tr=!0;const t=new Cu(n=>{globalThis.postMessage(n)},n=>new Fn(tc.getChannel(n),e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{Tr||Eo(null)};function Pr(e,t=!1){const n=e.length;let r=0,i="",s=0,o=16,l=0,a=0,u=0,h=0,f=0;function d(b,y){let v=0,N=0;for(;v=48&&k<=57)N=N*16+k-48;else if(k>=65&&k<=70)N=N*16+k-65+10;else if(k>=97&&k<=102)N=N*16+k-97+10;else break;r++,v++}return v=n){b+=e.substring(y,r),f=2;break}const v=e.charCodeAt(r);if(v===34){b+=e.substring(y,r),r++;break}if(v===92){if(b+=e.substring(y,r),r++,r>=n){f=2;break}switch(e.charCodeAt(r++)){case 34:b+='"';break;case 92:b+="\\";break;case 47:b+="/";break;case 98:b+="\b";break;case 102:b+="\f";break;case 110:b+=` -`;break;case 114:b+="\r";break;case 116:b+=" ";break;case 117:const k=d(4);k>=0?b+=String.fromCharCode(k):f=4;break;default:f=5}y=r;continue}if(v>=0&&v<=31)if(an(v)){b+=e.substring(y,r),f=2;break}else f=6;r++}return b}function _(){if(i="",f=0,s=r,a=l,h=u,r>=n)return s=n,o=17;let b=e.charCodeAt(r);if(Ir(b)){do r++,i+=String.fromCharCode(b),b=e.charCodeAt(r);while(Ir(b));return o=15}if(an(b))return r++,i+=String.fromCharCode(b),b===13&&e.charCodeAt(r)===10&&(r++,i+=` -`),l++,u=r,o=14;switch(b){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=p(),o=10;case 47:const y=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&b<=15);return b}return{setPosition:m,getPosition:()=>r,scan:t?S:_,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>a,getTokenStartCharacter:()=>s-h,getTokenError:()=>f}}function Ir(e){return e===32||e===9}function an(e){return e===10||e===13}function Bt(e){return e>=48&&e<=57}var Mo;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Mo||(Mo={}));var Ce=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),$t=200,Co={" ":{"\n":new Array($t).fill(0).map((e,t)=>` -`+" ".repeat(t)),"\r":new Array($t).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array($t).fill(0).map((e,t)=>`\r -`+" ".repeat(t))}," ":{"\n":new Array($t).fill(0).map((e,t)=>` -`+" ".repeat(t)),"\r":new Array($t).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array($t).fill(0).map((e,t)=>`\r -`+" ".repeat(t))}},h1=[` -`,"\r",`\r -`];function m1(e,t,n){let r,i,s,o,l;if(t){for(o=t.offset,l=o+t.length,s=o;s>0&&!To(e,s-1);)s--;let v=l;for(;v1)return qt(a,h)+qt(d,r+f);const v=d.length*(r+f);return!u||v>Co[m][a].length?a+qt(d,r+f):v<=0?a:Co[m][a][v]}function w(){let v=g.scan();for(h=0;v===15||v===14;)v===14&&n.keepLines?h+=1:v===14&&(h=1),v=g.scan();return p=v===16||g.getTokenError()!==0,v}const S=[];function b(v,N,k){!p&&(!t||No)&&e.substring(N,k)!==v&&S.push({offset:N,length:k-N,content:v})}let y=w();if(n.keepLines&&h>0&&b(qt(a,h),0,0),y!==17){let v=g.getTokenOffset()+s,N=d.length*r<20&&n.insertSpaces?Ce[d.length*r]:qt(d,r);b(N,s,v)}for(;y!==17;){let v=g.getTokenOffset()+g.getTokenLength()+s,N=w(),k="",T=!1;for(;h===0&&(N===12||N===13);){let q=g.getTokenOffset()+s;b(Ce[1],v,q),v=g.getTokenOffset()+g.getTokenLength()+s,T=N===12,k=T?_():"",N=w()}if(N===2)y!==1&&f--,n.keepLines&&h>0||!n.keepLines&&y!==1?k=_():n.keepLines&&(k=Ce[1]);else if(N===4)y!==3&&f--,n.keepLines&&h>0||!n.keepLines&&y!==3?k=_():n.keepLines&&(k=Ce[1]);else{switch(y){case 3:case 1:f++,n.keepLines&&h>0||!n.keepLines?k=_():k=Ce[1];break;case 5:n.keepLines&&h>0||!n.keepLines?k=_():k=Ce[1];break;case 12:k=_();break;case 13:h>0?k=_():T||(k=Ce[1]);break;case 6:n.keepLines&&h>0?k=_():T||(k=Ce[1]);break;case 10:n.keepLines&&h>0?k=_():N===6&&!T&&(k="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&h>0?k=_():(N===12||N===13)&&!T?k=Ce[1]:N!==5&&N!==17&&(p=!0);break;case 16:p=!0;break}h>0&&(N===12||N===13)&&(k=_())}N===17&&(n.keepLines&&h>0?k=_():k=n.insertFinalNewline?a:"");const V=g.getTokenOffset()+s;b(k,v,V),y=N}return S}function qt(e,t){let n="";for(let r=0;r{const a={};o(a),s.push(i),i=a,r=null},onObjectProperty:a=>{r=a},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const a=[];o(a),s.push(i),i=a,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:o,onError:(a,u,h)=>{t.push({error:a,offset:u,length:h})}},n),i[0]}function Po(e){if(!e.parent||!e.parent.children)return[];const t=Po(e.parent);if(e.parent.type==="property"){const n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){const n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function Fr(e){switch(e.type){case"array":return e.children.map(Fr);case"object":const t=Object.create(null);for(let n of e.children){const r=n.children[1];r&&(t[n.children[0].value]=Fr(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function y1(e,t,n=!1){return t>=e.offset&&tA(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function o(A){return A?()=>A(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(A){return A?R=>A(R,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(A){return A?R=>A(R,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}const u=o(t.onObjectBegin),h=a(t.onObjectProperty),f=s(t.onObjectEnd),d=o(t.onArrayBegin),m=s(t.onArrayEnd),g=a(t.onLiteralValue),p=l(t.onSeparator),_=s(t.onComment),w=l(t.onError),S=n&&n.disallowComments,b=n&&n.allowTrailingComma;function y(){for(;;){const A=r.scan();switch(r.getTokenError()){case 4:v(14);break;case 5:v(15);break;case 3:v(13);break;case 1:S||v(11);break;case 2:v(12);break;case 6:v(16);break}switch(A){case 12:case 13:S?v(10):_();break;case 16:v(1);break;case 15:case 14:break;default:return A}}}function v(A,R=[],E=[]){if(w(A),R.length+E.length>0){let D=r.getToken();for(;D!==17;){if(R.indexOf(D)!==-1){y();break}else if(E.indexOf(D)!==-1)break;D=y()}}}function N(A){const R=r.getTokenValue();return A?g(R):(h(R),i.push(R)),y(),!0}function k(){switch(r.getToken()){case 11:const A=r.getTokenValue();let R=Number(A);isNaN(R)&&(v(2),R=0),g(R);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return y(),!0}function T(){return r.getToken()!==10?(v(3,[],[2,5]),!1):(N(!1),r.getToken()===6?(p(":"),y(),C()||v(4,[],[2,5])):v(5,[],[2,5]),i.pop(),!0)}function V(){u(),y();let A=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(A||v(4,[],[]),p(","),y(),r.getToken()===2&&b)break}else A&&v(6,[],[]);T()||v(4,[],[2,5]),A=!0}return f(),r.getToken()!==2?v(7,[2],[]):y(),!0}function q(){d(),y();let A=!0,R=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(R||v(4,[],[]),p(","),y(),r.getToken()===4&&b)break}else R&&v(6,[],[]);A?(i.push(0),A=!1):i[i.length-1]++,C()||v(4,[],[4,5]),R=!0}return m(),A||i.pop(),r.getToken()!==4?v(8,[4],[]):y(),!0}function C(){switch(r.getToken()){case 3:return q();case 1:return V();case 10:return N(!0);default:return k()}}return y(),r.getToken()===17?n.allowEmptyContent?!0:(v(4,[],[]),!1):C()?(r.getToken()!==17&&v(9,[],[]),!0):(v(4,[],[]),!1)}var vt=Pr,Fo;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Fo||(Fo={}));var Do;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Do||(Do={}));var v1=p1,_1=Io,w1=Po,L1=Fr,Vo;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Vo||(Vo={}));function N1(e,t,n){return m1(e,t,n)}function jt(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n0?e.lastIndexOf(t)===n:n===0?e===t:!1}function Vn(e){let t="";S1(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function Uo(e){let t=0;for(let n=0;n0&&(o.arguments=s),o}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.title)&&x.string(i.command)}e.is=n})(Wt||(Wt={}));var je;(function(e){function t(s,o){return{range:s,newText:o}}e.replace=t;function n(s,o){return{range:{start:s,end:s},newText:o}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){const o=s;return x.objectLiteral(o)&&x.string(o.newText)&&z.is(o.range)}e.is=i})(je||(je={}));var Ur;(function(e){function t(r,i,s){const o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}e.create=t;function n(r){const i=r;return x.objectLiteral(i)&&x.string(i.label)&&(x.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(x.string(i.description)||i.description===void 0)}e.is=n})(Ur||(Ur={}));var zt;(function(e){function t(n){const r=n;return x.string(r)}e.is=t})(zt||(zt={}));var Jo;(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}e.replace=t;function n(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}e.insert=n;function r(s,o){return{range:s,newText:"",annotationId:o}}e.del=r;function i(s){const o=s;return je.is(o)&&(Ur.is(o.annotationId)||zt.is(o.annotationId))}e.is=i})(Jo||(Jo={}));var Br;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&Wr.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(Br||(Br={}));var $r;(function(e){function t(r,i,s){let o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&x.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||x.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||x.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||zt.is(i.annotationId))}e.is=n})($r||($r={}));var qr;(function(e){function t(r,i,s,o){let l={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&x.string(i.oldUri)&&x.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||x.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||x.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||zt.is(i.annotationId))}e.is=n})(qr||(qr={}));var jr;(function(e){function t(r,i,s){let o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&x.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||x.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||x.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||zt.is(i.annotationId))}e.is=n})(jr||(jr={}));var Hr;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>x.string(i.kind)?$r.is(i)||qr.is(i)||jr.is(i):Br.is(i)))}e.is=t})(Hr||(Hr={}));var Xo;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.uri)}e.is=n})(Xo||(Xo={}));var Yo;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.uri)&&x.integer(i.version)}e.is=n})(Yo||(Yo={}));var Wr;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.uri)&&(i.version===null||x.integer(i.version))}e.is=n})(Wr||(Wr={}));var Qo;(function(e){function t(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.string(i.uri)&&x.string(i.languageId)&&x.integer(i.version)&&x.string(i.text)}e.is=n})(Qo||(Qo={}));var _t;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(_t||(_t={}));var cn;(function(e){function t(n){const r=n;return x.objectLiteral(n)&&_t.is(r.kind)&&x.string(r.value)}e.is=t})(cn||(cn={}));var xe;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(xe||(xe={}));var ce;(function(e){e.PlainText=1,e.Snippet=2})(ce||(ce={}));var Zo;(function(e){e.Deprecated=1})(Zo||(Zo={}));var Ko;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){const i=r;return i&&x.string(i.newText)&&z.is(i.insert)&&z.is(i.replace)}e.is=n})(Ko||(Ko={}));var ea;(function(e){e.asIs=1,e.adjustIndentation=2})(ea||(ea={}));var ta;(function(e){function t(n){const r=n;return r&&(x.string(r.detail)||r.detail===void 0)&&(x.string(r.description)||r.description===void 0)}e.is=t})(ta||(ta={}));var zr;(function(e){function t(n){return{label:n}}e.create=t})(zr||(zr={}));var na;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(na||(na={}));var Un;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return x.string(i)||x.objectLiteral(i)&&x.string(i.language)&&x.string(i.value)}e.is=n})(Un||(Un={}));var ra;(function(e){function t(n){let r=n;return!!r&&x.objectLiteral(r)&&(cn.is(r.contents)||Un.is(r.contents)||x.typedArray(r.contents,Un.is))&&(n.range===void 0||z.is(n.range))}e.is=t})(ra||(ra={}));var ia;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ia||(ia={}));var sa;(function(e){function t(n,r,...i){let s={label:n};return x.defined(r)&&(s.documentation=r),x.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(sa||(sa={}));var oa;(function(e){e.Text=1,e.Read=2,e.Write=3})(oa||(oa={}));var aa;(function(e){function t(n,r){let i={range:n};return x.number(r)&&(i.kind=r),i}e.create=t})(aa||(aa={}));var He;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(He||(He={}));var la;(function(e){e.Deprecated=1})(la||(la={}));var ua;(function(e){function t(n,r,i,s,o){let l={name:n,kind:r,location:{uri:s,range:i}};return o&&(l.containerName=o),l}e.create=t})(ua||(ua={}));var ca;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(ca||(ca={}));var fa;(function(e){function t(r,i,s,o,l,a){let u={name:r,detail:i,kind:s,range:o,selectionRange:l};return a!==void 0&&(u.children=a),u}e.create=t;function n(r){let i=r;return i&&x.string(i.name)&&x.number(i.kind)&&z.is(i.range)&&z.is(i.selectionRange)&&(i.detail===void 0||x.string(i.detail))&&(i.deprecated===void 0||x.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(fa||(fa={}));var ha;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(ha||(ha={}));var Bn;(function(e){e.Invoked=1,e.Automatic=2})(Bn||(Bn={}));var ma;(function(e){function t(r,i,s){let o={diagnostics:r};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}e.create=t;function n(r){let i=r;return x.defined(i)&&x.typedArray(i.diagnostics,Qe.is)&&(i.only===void 0||x.typedArray(i.only,x.string))&&(i.triggerKind===void 0||i.triggerKind===Bn.Invoked||i.triggerKind===Bn.Automatic)}e.is=n})(ma||(ma={}));var da;(function(e){function t(r,i,s){let o={title:r},l=!0;return typeof i=="string"?(l=!1,o.kind=i):Wt.is(i)?o.command=i:o.edit=i,l&&s!==void 0&&(o.kind=s),o}e.create=t;function n(r){let i=r;return i&&x.string(i.title)&&(i.diagnostics===void 0||x.typedArray(i.diagnostics,Qe.is))&&(i.kind===void 0||x.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Wt.is(i.command))&&(i.isPreferred===void 0||x.boolean(i.isPreferred))&&(i.edit===void 0||Hr.is(i.edit))}e.is=n})(da||(da={}));var ga;(function(e){function t(r,i){let s={range:r};return x.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return x.defined(i)&&z.is(i.range)&&(x.undefined(i.command)||Wt.is(i.command))}e.is=n})(ga||(ga={}));var pa;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return x.defined(i)&&x.uinteger(i.tabSize)&&x.boolean(i.insertSpaces)}e.is=n})(pa||(pa={}));var ya;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return x.defined(i)&&z.is(i.range)&&(x.undefined(i.target)||x.string(i.target))}e.is=n})(ya||(ya={}));var $n;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return x.objectLiteral(i)&&z.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})($n||($n={}));var ba;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(ba||(ba={}));var va;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(va||(va={}));var _a;(function(e){function t(n){const r=n;return x.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(_a||(_a={}));var wa;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&z.is(i.range)&&x.string(i.text)}e.is=n})(wa||(wa={}));var La;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){const i=r;return i!=null&&z.is(i.range)&&x.boolean(i.caseSensitiveLookup)&&(x.string(i.variableName)||i.variableName===void 0)}e.is=n})(La||(La={}));var Na;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&z.is(i.range)&&(x.string(i.expression)||i.expression===void 0)}e.is=n})(Na||(Na={}));var Sa;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return x.defined(i)&&z.is(r.stoppedLocation)}e.is=n})(Sa||(Sa={}));var Gr;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Gr||(Gr={}));var Jr;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return x.objectLiteral(i)&&(i.tooltip===void 0||x.string(i.tooltip)||cn.is(i.tooltip))&&(i.location===void 0||Ht.is(i.location))&&(i.command===void 0||Wt.is(i.command))}e.is=n})(Jr||(Jr={}));var Aa;(function(e){function t(r,i,s){const o={position:r,label:i};return s!==void 0&&(o.kind=s),o}e.create=t;function n(r){const i=r;return x.objectLiteral(i)&&se.is(i.position)&&(x.string(i.label)||x.typedArray(i.label,Jr.is))&&(i.kind===void 0||Gr.is(i.kind))&&i.textEdits===void 0||x.typedArray(i.textEdits,je.is)&&(i.tooltip===void 0||x.string(i.tooltip)||cn.is(i.tooltip))&&(i.paddingLeft===void 0||x.boolean(i.paddingLeft))&&(i.paddingRight===void 0||x.boolean(i.paddingRight))}e.is=n})(Aa||(Aa={}));var ka;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(ka||(ka={}));var xa;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(xa||(xa={}));var Ra;(function(e){function t(n){return{items:n}}e.create=t})(Ra||(Ra={}));var Ea;(function(e){e.Invoked=0,e.Automatic=1})(Ea||(Ea={}));var Ma;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Ma||(Ma={}));var Ca;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Ca||(Ca={}));var Ta;(function(e){function t(n){const r=n;return x.objectLiteral(r)&&Dr.is(r.uri)&&x.string(r.name)}e.is=t})(Ta||(Ta={}));var Pa;(function(e){function t(s,o,l,a){return new A1(s,o,l,a)}e.create=t;function n(s){let o=s;return!!(x.defined(o)&&x.string(o.uri)&&(x.undefined(o.languageId)||x.string(o.languageId))&&x.uinteger(o.lineCount)&&x.func(o.getText)&&x.func(o.positionAt)&&x.func(o.offsetAt))}e.is=n;function r(s,o){let l=s.getText(),a=i(o,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=l.length;for(let h=a.length-1;h>=0;h--){let f=a[h],d=s.offsetAt(f.range.start),m=s.offsetAt(f.range.end);if(m<=u)l=l.substring(0,d)+f.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");u=d}return l}e.applyEdits=r;function i(s,o){if(s.length<=1)return s;const l=s.length/2|0,a=s.slice(0,l),u=s.slice(l);i(a,o),i(u,o);let h=0,f=0,d=0;for(;h0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return se.create(0,e);for(;ne?r=s:n=s+1}let i=n-1;return se.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1"u"}e.undefined=r;function i(m){return m===!0||m===!1}e.boolean=i;function s(m){return t.call(m)==="[object String]"}e.string=s;function o(m){return t.call(m)==="[object Number]"}e.number=o;function l(m,g,p){return t.call(m)==="[object Number]"&&g<=m&&m<=p}e.numberRange=l;function a(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=a;function u(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=u;function h(m){return t.call(m)==="[object Function]"}e.func=h;function f(m){return m!==null&&typeof m=="object"}e.objectLiteral=f;function d(m,g){return Array.isArray(m)&&m.every(g)}e.typedArray=d})(x||(x={}));var Ia=class li{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(li.isIncremental(r)){const i=Da(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);const l=Math.max(i.start.line,0),a=Math.max(i.end.line,0);let u=this._lineOffsets;const h=Fa(r.text,!1,s);if(a-l===h.length)for(let d=0,m=h.length;dt?i=o:r=o+1}let s=r-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),a=0;const u=[];for(const h of l){let f=i.offsetAt(h.range.start);if(fa&&u.push(o.substring(a,f)),h.newText.length&&u.push(h.newText),a=i.offsetAt(h.range.end)}return u.push(o.substr(a)),u.join("")}e.applyEdits=r})(Ve||(Ve={}));function Xr(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Xr(r,t),Xr(i,t);let s=0,o=0,l=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function k1(e){const t=Da(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var J;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"})(J||(J={}));var Oe;(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(Oe||(Oe={}));var Yr;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[_t.Markdown,_t.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(Yr||(Yr={}));function M(...e){const t=e[0];let n,r,i;if(typeof t=="string")n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){const s=e.slice(1);if(t.length!==s.length+1)throw new Error("expected a string as the first argument to l10n.t");let o=t[0];for(let l=1;l0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};return R1(r,i)}var x1=/{([^}]+)}/g;function R1(e,t){return Object.keys(t).length===0?e:e.replace(x1,(n,r)=>t[r]??n)}var E1={"color-hex":{errorMessage:M("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:M("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:M("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:M("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:M("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:M("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:M("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:M("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},wt=class{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},M1=class extends wt{constructor(e,t){super(e,t),this.type="null",this.value=null}},Va=class extends wt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}},C1=class extends wt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}},T1=class extends wt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Qr=class extends wt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}},P1=class extends wt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},I1=class extends wt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}};function Re(e){return qe(e)?e?{}:{not:{}}:e}var Oa;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Oa||(Oa={}));var F1={"http://json-schema.org/draft-03/schema#":Oe.v3,"http://json-schema.org/draft-04/schema#":Oe.v4,"http://json-schema.org/draft-06/schema#":Oe.v6,"http://json-schema.org/draft-07/schema#":Oe.v7,"https://json-schema.org/draft/2019-09/schema":Oe.v2019_09,"https://json-schema.org/draft/2020-12/schema":Oe.v2020_12},Ua=class{constructor(e){this.schemaDraft=e}},D1=class ul{constructor(t=-1,n){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||Ba(t,this.focusOffset))&&t!==this.exclude}newSub(){return new ul(-1,this.exclude)}},fn=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};fn.instance=new fn;var _e=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const t of this.problems)t.code===J.EnumValueMismatch&&(t.message=M("Value is not accepted. Valid values: {0}.",this.enumValues.map(n=>JSON.stringify(n)).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(t=>this.processedProperties.add(t))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};function V1(e,t=[]){return new $a(e,t,[])}function Lt(e){return L1(e)}function Zr(e){return w1(e)}function Ba(e,t,n=!1){return t>=e.offset&&t{let r=e(n);const i=n.children;if(Array.isArray(i))for(let s=0;s{const o=z.create(e.positionAt(s.location.offset),e.positionAt(s.location.offset+s.location.length));return Qe.create(o,s.message,s.severity??n,s.code)})}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new D1(t,n),i=qa(e),s=new Ua(i);return de(this.root,e,new _e,r,s),r.schemas}return[]}};function qa(e,t=Oe.v2020_12){let n=e.$schema;return n?F1[n]??t:t}function de(e,t,n,r,i){if(!e||!r.include(e))return;if(e.type==="property")return de(e.valueNode,t,n,r,i);const s=e;switch(o(),s.type){case"object":h(s);break;case"array":u(s);break;case"string":a(s);break;case"number":l(s);break}r.add({node:s,schema:t});function o(){function f(S){return s.type===S||S==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(t.type)?t.type.some(f)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||M("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(f(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||M('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const S of t.allOf){const b=new _e,y=r.newSub();de(s,Re(S),b,y,i),n.merge(b),r.merge(y)}const d=Re(t.not);if(d){const S=new _e,b=r.newSub();de(s,d,S,b,i),S.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||M("Matches a schema that is not allowed.")});for(const y of b.schemas)y.inverted=!y.inverted,r.add(y)}const m=(S,b)=>{const y=[];let v;for(const N of S){const k=Re(N),T=new _e,V=r.newSub();if(de(s,k,T,V,i),T.hasProblems()||y.push(k),!v)v={schema:k,validationResult:T,matchingSchemas:V};else if(!b&&!T.hasProblems()&&!v.validationResult.hasProblems())v.matchingSchemas.merge(V),v.validationResult.propertiesMatches+=T.propertiesMatches,v.validationResult.propertiesValueMatches+=T.propertiesValueMatches,v.validationResult.mergeProcessedProperties(T);else{const q=T.compare(v.validationResult);q>0?v={schema:k,validationResult:T,matchingSchemas:V}:q===0&&(v.matchingSchemas.merge(V),v.validationResult.mergeEnumValues(T))}}return y.length>1&&b&&n.problems.push({location:{offset:s.offset,length:1},message:M("Matches multiple schemas when only one must validate.")}),v&&(n.merge(v.validationResult),r.merge(v.matchingSchemas)),y.length};Array.isArray(t.anyOf)&&m(t.anyOf,!1),Array.isArray(t.oneOf)&&m(t.oneOf,!0);const g=S=>{const b=new _e,y=r.newSub();de(s,Re(S),b,y,i),n.merge(b),r.merge(y)},p=(S,b,y)=>{const v=Re(S),N=new _e,k=r.newSub();de(s,v,N,k,i),r.merge(k),n.mergeProcessedProperties(N),N.hasProblems()?y&&g(y):b&&g(b)},_=Re(t.if);if(_&&p(_,Re(t.then),Re(t.else)),Array.isArray(t.enum)){const S=Lt(s);let b=!1;for(const y of t.enum)if(jt(S,y)){b=!0;break}n.enumValues=t.enum,n.enumValueMatch=b,b||n.problems.push({location:{offset:s.offset,length:s.length},code:J.EnumValueMismatch,message:t.errorMessage||M("Value is not accepted. Valid values: {0}.",t.enum.map(y=>JSON.stringify(y)).join(", "))})}if(De(t.const)){const S=Lt(s);jt(S,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:J.EnumValueMismatch,message:t.errorMessage||M("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let w=t.deprecationMessage;if(w||t.deprecated){w=w||M("Value is deprecated");let S=s.parent?.type==="property"?s.parent:s;n.problems.push({location:{offset:S.offset,length:S.length},severity:ke.Warning,message:w,code:J.Deprecated})}}function l(f){const d=f.value;function m(y){const v=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(y.toString());return v&&{value:Number(v[1]+(v[2]||"")),multiplier:(v[2]?.length||0)-(parseInt(v[3])||0)}}if(ve(t.multipleOf)){let y=-1;if(Number.isInteger(t.multipleOf))y=d%t.multipleOf;else{let v=m(t.multipleOf),N=m(d);if(v&&N){const k=10**Math.abs(N.multiplier-v.multiplier);N.multiplier=w&&n.problems.push({location:{offset:f.offset,length:f.length},message:M("Value is above the exclusive maximum of {0}.",w)});const S=p(t.minimum,t.exclusiveMinimum);ve(S)&&db&&n.problems.push({location:{offset:f.offset,length:f.length},message:M("Value is above the maximum of {0}.",b)})}function a(f){if(ve(t.minLength)&&Uo(f.value)t.maxLength&&n.problems.push({location:{offset:f.offset,length:f.length},message:M("String is longer than the maximum length of {0}.",t.maxLength)}),Oo(t.pattern)&&(Vn(t.pattern)?.test(f.value)||n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||M('String does not match the pattern of "{0}".',t.pattern)})),t.format)switch(t.format){case"uri":case"uri-reference":{let m;if(!f.value)m=M("URI expected.");else{const g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(f.value);g?!g[2]&&t.format==="uri"&&(m=M("URI with a scheme is expected.")):m=M("URI is expected.")}m&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||M("String is not a URI: {0}",m)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const d=E1[t.format];(!f.value||!d.pattern.exec(f.value))&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.patternErrorMessage||t.errorMessage||d.errorMessage})}}function u(f){let d,m;i.schemaDraft>=Oe.v2020_12?(d=t.prefixItems,m=Array.isArray(t.items)?void 0:t.items):(d=Array.isArray(t.items)?t.items:void 0,m=Array.isArray(t.items)?t.additionalItems:t.items);let g=0;if(d!==void 0){const w=Math.min(d.length,f.items.length);for(;g=Oe.v2020_12&&n.processedProperties.add(String(S)))}w===0&&!ve(t.minContains)&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||M("Array does not contain required item.")}),ve(t.minContains)&&wt.maxContains&&n.problems.push({location:{offset:f.offset,length:f.length},message:t.errorMessage||M("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const _=t.unevaluatedItems;if(_!==void 0)for(let w=0;wt.maxItems&&n.problems.push({location:{offset:f.offset,length:f.length},message:M("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let w=function(){for(let b=0;b{m.delete(b),n.processedProperties.add(b)};if(t.properties)for(const b of Object.keys(t.properties)){g(b);const y=t.properties[b],v=d[b];if(v)if(qe(y))if(y)n.propertiesMatches++,n.propertiesValueMatches++;else{const N=v.parent;n.problems.push({location:{offset:N.keyNode.offset,length:N.keyNode.length},message:t.errorMessage||M("Property {0} is not allowed.",b)})}else{const N=new _e;de(v,y,N,r,i),n.mergePropertyMatch(N)}}if(t.patternProperties)for(const b of Object.keys(t.patternProperties)){const y=Vn(b);if(y){const v=[];for(const N of m)if(y.test(N)){v.push(N);const k=d[N];if(k){const T=t.patternProperties[b];if(qe(T))if(T)n.propertiesMatches++,n.propertiesValueMatches++;else{const V=k.parent;n.problems.push({location:{offset:V.keyNode.offset,length:V.keyNode.length},message:t.errorMessage||M("Property {0} is not allowed.",N)})}else{const V=new _e;de(k,T,V,r,i),n.mergePropertyMatch(V)}}}v.forEach(g)}}const p=t.additionalProperties;if(p!==void 0)for(const b of m){g(b);const y=d[b];if(y){if(p===!1){const v=y.parent;n.problems.push({location:{offset:v.keyNode.offset,length:v.keyNode.length},message:t.errorMessage||M("Property {0} is not allowed.",b)})}else if(p!==!0){const v=new _e;de(y,p,v,r,i),n.mergePropertyMatch(v)}}}const _=t.unevaluatedProperties;if(_!==void 0){const b=[];for(const y of m)if(!n.processedProperties.has(y)){b.push(y);const v=d[y];if(v){if(_===!1){const N=v.parent;n.problems.push({location:{offset:N.keyNode.offset,length:N.keyNode.length},message:t.errorMessage||M("Property {0} is not allowed.",y)})}else if(_!==!0){const N=new _e;de(v,_,N,r,i),n.mergePropertyMatch(N)}}}b.forEach(g)}if(ve(t.maxProperties)&&f.properties.length>t.maxProperties&&n.problems.push({location:{offset:f.offset,length:f.length},message:M("Object has more properties than limit of {0}.",t.maxProperties)}),ve(t.minProperties)&&f.properties.length0){for(C--;C>0&&/\s/.test(i.charAt(C));)C--;A=C+1}if(a(N,k,C,A),T&&f(T,!1),V.length+q.length>0){let R=s.getToken();for(;R!==17;){if(V.indexOf(R)!==-1){l();break}else if(q.indexOf(R)!==-1)break;R=l()}}return T}function h(){switch(s.getTokenError()){case 4:return u(M("Invalid unicode sequence in string."),J.InvalidUnicode),!0;case 5:return u(M("Invalid escape character in string."),J.InvalidEscapeCharacter),!0;case 3:return u(M("Unexpected end of number."),J.UnexpectedEndOfNumber),!0;case 1:return u(M("Unexpected end of comment."),J.UnexpectedEndOfComment),!0;case 2:return u(M("Unexpected end of string."),J.UnexpectedEndOfString),!0;case 6:return u(M("Invalid characters in string. Control characters must be escaped."),J.InvalidCharacter),!0}return!1}function f(N,k){return N.length=s.getTokenOffset()+s.getTokenLength()-N.offset,k&&l(),N}function d(N){if(s.getToken()!==3)return;const k=new C1(N,s.getTokenOffset());l();let T=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){T||u(M("Value expected"),J.ValueExpected);const q=s.getTokenOffset();if(l(),s.getToken()===4){T&&a(M("Trailing comma"),J.TrailingComma,q,q+1);continue}}else T&&u(M("Expected comma"),J.CommaExpected);const V=b(k);V?k.items.push(V):u(M("Value expected"),J.ValueExpected,void 0,[],[4,5]),T=!0}return s.getToken()!==4?u(M("Expected comma or closing bracket"),J.CommaOrCloseBacketExpected,k):f(k,!0)}const m=new Qr(void 0,0,0);function g(N,k){const T=new P1(N,s.getTokenOffset(),m);let V=_(T);if(!V)if(s.getToken()===16){u(M("Property keys must be doublequoted"),J.PropertyKeysMustBeDoublequoted);const C=new Qr(T,s.getTokenOffset(),s.getTokenLength());C.value=s.getTokenValue(),V=C,l()}else return;if(T.keyNode=V,V.value!=="//"){const C=k[V.value];C?(a(M("Duplicate object key"),J.DuplicateKey,T.keyNode.offset,T.keyNode.offset+T.keyNode.length,ke.Warning),ft(C)&&a(M("Duplicate object key"),J.DuplicateKey,C.keyNode.offset,C.keyNode.offset+C.keyNode.length,ke.Warning),k[V.value]=!0):k[V.value]=T}if(s.getToken()===6)T.colonOffset=s.getTokenOffset(),l();else if(u(M("Colon expected"),J.ColonExpected),s.getToken()===10&&e.positionAt(V.offset+V.length).line=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const r=n(e);if(r)return r}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},i=e.getText(),s=e.offsetAt(t);let o=n.getNodeFromOffset(s,!0);if(this.isInComment(e,o?o.offset:0,s))return Promise.resolve(r);if(o&&s===o.offset+o.length&&s>0){const f=i[s-1];(o.type==="object"&&f==="}"||o.type==="array"&&f==="]")&&(o=o.parent)}const l=this.getCurrentWord(e,s);let a;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))a=z.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));else{let f=s-l.length;f>0&&i[f-1]==='"'&&f--,a=z.create(e.positionAt(f),t)}const u=new Map,h={add:f=>{let d=f.label;const m=u.get(d);if(m)m.documentation||(m.documentation=f.documentation),m.detail||(m.detail=f.detail),m.labelDetails||(m.labelDetails=f.labelDetails);else{if(d=d.replace(/[\n]/g,"↵"),d.length>60){const g=d.substr(0,57).trim()+"...";u.has(g)||(d=g)}f.textEdit=je.replace(a,f.insertText),f.label=d,u.set(d,f),r.items.push(f)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:f=>{console.error(f)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then(f=>{const d=[];let m=!0,g="",p;if(o&&o.type==="string"){const w=o.parent;w&&w.type==="property"&&w.keyNode===o&&(m=!w.valueNode,p=w,g=i.substr(o.offset+1,o.length-2),w&&(o=w.parent))}if(o&&o.type==="object"){if(o.offset===s)return r;o.properties.forEach(y=>{(!p||p!==y)&&u.set(y.keyNode.value,zr.create("__"))});let S="";m&&(S=this.evaluateSeparatorAfter(e,e.offsetAt(a.end))),f?this.getPropertyCompletions(f,n,o,m,S,h):this.getSchemaLessPropertyCompletions(n,o,g,h);const b=Zr(o);this.contributions.forEach(y=>{const v=y.collectPropertyCompletions(e.uri,b,l,m,S==="",h);v&&d.push(v)}),!f&&l.length>0&&i.charAt(s-l.length-1)!=='"'&&(h.add({kind:xe.Property,label:this.getLabelForValue(l),insertText:this.getInsertTextForProperty(l,void 0,!1,S),insertTextFormat:ce.Snippet,documentation:""}),h.setAsIncomplete())}const _={};return f?this.getValueCompletions(f,n,o,s,e,h,_):this.getSchemaLessValueCompletions(n,o,s,e,h),this.contributions.length>0&&this.getContributedValueCompletions(n,o,s,e,h,d),this.promiseConstructor.all(d).then(()=>{if(h.getNumberOfProposals()===0){let w=s;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(w=o.offset+o.length);const S=this.evaluateSeparatorAfter(e,w);this.addFillerValueCompletions(_,S,h)}return r})})}getPropertyCompletions(e,t,n,r,i,s){t.getMatchingSchemas(e.schema,n.offset).forEach(l=>{if(l.node===n&&!l.inverted){const a=l.schema.properties;a&&Object.keys(a).forEach(h=>{const f=a[h];if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){const d={kind:xe.Property,label:h,insertText:this.getInsertTextForProperty(h,f,r,i),insertTextFormat:ce.Snippet,filterText:this.getFilterTextForValue(h),documentation:this.fromMarkup(f.markdownDescription)||f.description||""};f.suggestSortText!==void 0&&(d.sortText=f.suggestSortText),d.insertText&&ln(d.insertText,`$1${i}`)&&(d.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(d)}});const u=l.schema.propertyNames;if(typeof u=="object"&&!u.deprecationMessage&&!u.doNotSuggest){const h=(f,d=void 0)=>{const m={kind:xe.Property,label:f,insertText:this.getInsertTextForProperty(f,void 0,r,i),insertTextFormat:ce.Snippet,filterText:this.getFilterTextForValue(f),documentation:d||this.fromMarkup(u.markdownDescription)||u.description||""};u.suggestSortText!==void 0&&(m.sortText=u.suggestSortText),m.insertText&&ln(m.insertText,`$1${i}`)&&(m.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(m)};if(u.enum)for(let f=0;f{s.properties.forEach(o=>{const l=o.keyNode.value;r.add({kind:xe.Property,label:l,insertText:this.getInsertTextForValue(l,""),insertTextFormat:ce.Snippet,filterText:this.getFilterTextForValue(l),documentation:""})})};if(t.parent)if(t.parent.type==="property"){const s=t.parent.keyNode.value;e.visit(o=>(o.type==="property"&&o!==t.parent&&o.keyNode.value===s&&o.valueNode&&o.valueNode.type==="object"&&i(o.valueNode),!0))}else t.parent.type==="array"&&t.parent.items.forEach(s=>{s.type==="object"&&s!==t&&i(s)});else t.type==="object"&&r.add({kind:xe.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:ce.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,i){let s=n;if(t&&(t.type==="string"||t.type==="number"||t.type==="boolean"||t.type==="null")&&(s=t.offset+t.length,t=t.parent),!t){i.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:ce.Snippet,documentation:""}),i.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:ce.Snippet,documentation:""});return}const o=this.evaluateSeparatorAfter(r,s),l=a=>{a.parent&&!Ba(a.parent,n,!0)&&i.add({kind:this.getSuggestionKind(a.type),label:this.getLabelTextForMatchingNode(a,r),insertText:this.getInsertTextForMatchingNode(a,r,o),insertTextFormat:ce.Snippet,documentation:""}),a.type==="boolean"&&this.addBooleanValueCompletion(!a.value,o,i)};if(t.type==="property"&&n>(t.colonOffset||0)){const a=t.valueNode;if(a&&(n>a.offset+a.length||a.type==="object"||a.type==="array"))return;const u=t.keyNode.value;e.visit(h=>(h.type==="property"&&h.keyNode.value===u&&h.valueNode&&l(h.valueNode),!0)),u==="$schema"&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(o,i)}if(t.type==="array")if(t.parent&&t.parent.type==="property"){const a=t.parent.keyNode.value;e.visit(u=>(u.type==="property"&&u.keyNode.value===a&&u.valueNode&&u.valueNode.type==="array"&&u.valueNode.items.forEach(l),!0))}else t.items.forEach(l)}getValueCompletions(e,t,n,r,i,s,o){let l=r,a,u;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(l=n.offset+n.length,u=n,n=n.parent),!n){this.addSchemaValueCompletions(e.schema,"",s,o);return}if(n.type==="property"&&r>(n.colonOffset||0)){const h=n.valueNode;if(h&&r>h.offset+h.length)return;a=n.keyNode.value,n=n.parent}if(n&&(a!==void 0||n.type==="array")){const h=this.evaluateSeparatorAfter(i,l),f=t.getMatchingSchemas(e.schema,n.offset,u);for(const d of f)if(d.node===n&&!d.inverted&&d.schema){if(n.type==="array"&&d.schema.items){let m=s;if(d.schema.uniqueItems){const g=new Set;n.children.forEach(p=>{p.type!=="array"&&p.type!=="object"&&g.add(this.getLabelForValue(Lt(p)))}),m={...s,add(p){g.has(p.label)||s.add(p)}}}if(Array.isArray(d.schema.items)){const g=this.findItemAtOffset(n,i,r);g{const l=o.collectDefaultCompletions(r.uri,i);l&&s.push(l)});else if((t.type==="string"||t.type==="number"||t.type==="boolean"||t.type==="null")&&(t=t.parent),t&&t.type==="property"&&n>(t.colonOffset||0)){const o=t.keyNode.value,l=t.valueNode;if((!l||n<=l.offset+l.length)&&t.parent){const a=Zr(t.parent);this.contributions.forEach(u=>{const h=u.collectValueCompletions(r.uri,a,o,i);h&&s.push(h)})}}}addSchemaValueCompletions(e,t,n,r){typeof e=="object"&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach(i=>this.addSchemaValueCompletions(i,t,n,r)),Array.isArray(e.anyOf)&&e.anyOf.forEach(i=>this.addSchemaValueCompletions(i,t,n,r)),Array.isArray(e.oneOf)&&e.oneOf.forEach(i=>this.addSchemaValueCompletions(i,t,n,r)))}addDefaultValueCompletions(e,t,n,r=0){let i=!1;if(De(e.default)){let s=e.type,o=e.default;for(let a=r;a>0;a--)o=[o],s="array";const l={kind:this.getSuggestionKind(s),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:ce.Snippet};this.doesSupportsLabelDetails()?l.labelDetails={description:M("Default value")}:l.detail=M("Default value"),n.add(l),i=!0}Array.isArray(e.examples)&&e.examples.forEach(s=>{let o=e.type,l=s;for(let a=r;a>0;a--)l=[l],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(l),insertText:this.getInsertTextForValue(l,t),insertTextFormat:ce.Snippet}),i=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(s=>{let o=e.type,l=s.body,a=s.label,u,h;if(De(l)){e.type;for(let f=r;f>0;f--)l=[l];u=this.getInsertTextForSnippetValue(l,t),h=this.getFilterTextForSnippetValue(l),a=a||this.getLabelForSnippetValue(l)}else if(typeof s.bodyText=="string"){let f="",d="",m="";for(let g=r;g>0;g--)f=f+m+`[ -`,d=d+` -`+m+"]",m+=" ",o="array";u=f+m+s.bodyText.split(` -`).join(` -`+m)+d+t,a=a||u,h=u.replace(/[\n]/g,"")}else return;n.add({kind:this.getSuggestionKind(o),label:a,documentation:this.fromMarkup(s.markdownDescription)||s.description,insertText:u,insertTextFormat:ce.Snippet,filterText:h}),i=!0}),!i&&typeof e.items=="object"&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(De(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:ce.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,i=e.enum.length;rt[r]=!0):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:ce.Snippet,detail:M("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:ce.Snippet,detail:M("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:ce.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:ce.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds(r=>r==="http"||r==="https").forEach(r=>{r.startsWith("http://json-schema.org/draft-")&&(r=r+"#"),t.add({kind:xe.Module,label:this.getLabelForValue(r),filterText:this.getFilterTextForValue(r),insertText:this.getInsertTextForValue(r,e),insertTextFormat:ce.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null," ");return n==="{}"?"{$1}"+t:n==="[]"?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return Kr(e,"",r=>typeof r=="string"&&r[0]==="^"?r.substr(1):JSON.stringify(r))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return e===null?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return xe.Value;switch(e){case"string":return xe.Value;case"object":return xe.Module;case"property":return xe.Property;default:return xe.Value}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const i=this.getInsertTextForValue(e,"");if(!n)return i;const s=i+": ";let o,l=0;if(t){if(Array.isArray(t.defaultSnippets)){if(t.defaultSnippets.length===1){const a=t.defaultSnippets[0].body;De(a)&&(o=this.getInsertTextForSnippetValue(a,""))}l+=t.defaultSnippets.length}if(t.enum&&(!o&&t.enum.length===1&&(o=this.getInsertTextForGuessedValue(t.enum[0],"")),l+=t.enum.length),De(t.const)&&(o||(o=this.getInsertTextForGuessedValue(t.const,"")),l++),De(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),l++),Array.isArray(t.examples)&&t.examples.length&&(o||(o=this.getInsertTextForGuessedValue(t.examples[0],"")),l+=t.examples.length),l===0){let a=Array.isArray(t.type)?t.type[0]:t.type;switch(a||(t.properties?a="object":t.items&&(a="array")),a){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return i}}}return(!o||l>1)&&(o="$1"),s+o+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&` -\r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=vt(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=vt(t.getText(),!0),i=e.items;for(let s=i.length-1;s>=0;s--){const o=i[s];if(n>o.offset+o.length)return r.setPosition(o.offset+o.length),r.scan()===5&&n>=r.getTokenOffset()+r.getTokenLength()?s+1:s;if(n>=o.offset)return s}return 0}isInComment(e,t,n){const r=vt(e.getText(),!1);r.setPosition(t);let i=r.scan();for(;i!==17&&r.getTokenOffset()+r.getTokenLength()i.offset+1&&r({contents:u,range:o}),a=Zr(i);for(let u=this.contributions.length-1;u>=0;u--){const f=this.contributions[u].getInfoContribution(e.uri,a);if(f)return f.then(d=>l(d))}return this.schemaService.getSchemaForResource(e.uri,n).then(u=>{if(u&&i){const h=n.getMatchingSchemas(u.schema,i.offset);let f,d,m,g;h.every(_=>{if(_.node===i&&!_.inverted&&_.schema&&(f=f||_.schema.title,d=d||_.schema.markdownDescription||ei(_.schema.description),_.schema.enum)){const w=_.schema.enum.indexOf(Lt(i));_.schema.markdownEnumDescriptions?m=_.schema.markdownEnumDescriptions[w]:_.schema.enumDescriptions&&(m=ei(_.schema.enumDescriptions[w])),m&&(g=_.schema.enum[w],typeof g!="string"&&(g=JSON.stringify(g)))}return!0});let p="";return f&&(p=ei(f)),d&&(p.length>0&&(p+=` - -`),p+=d),m&&(p.length>0&&(p+=` - -`),p+=`\`${$1(g)}\`: ${m}`),l([p])}return null})}};function ei(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 - -$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function $1(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var q1=class{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:ke.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const i=[],s={},o=a=>{const u=a.range.start.line+" "+a.range.start.character+" "+a.message;s[u]||(s[u]=!0,i.push(a))},l=a=>{let u=n?.trailingCommas?qn(n.trailingCommas):ke.Error,h=n?.comments?qn(n.comments):this.commentSeverity,f=n?.schemaValidation?qn(n.schemaValidation):ke.Warning,d=n?.schemaRequest?qn(n.schemaRequest):ke.Warning;if(a){const m=(g,p)=>{if(t.root&&d){const _=t.root,w=_.type==="object"?_.properties[0]:void 0;if(w&&w.keyNode.value==="$schema"){const S=w.valueNode||w,b=z.create(e.positionAt(S.offset),e.positionAt(S.offset+S.length));o(Qe.create(b,g,d,p))}else{const S=z.create(e.positionAt(_.offset),e.positionAt(_.offset+1));o(Qe.create(S,g,d,p))}}};if(a.errors.length)m(a.errors[0],J.SchemaResolveError);else if(f){for(const p of a.warnings)m(p,J.SchemaUnsupportedFeature);const g=t.validate(e,a.schema,f,n?.schemaDraft);g&&g.forEach(o)}ja(a.schema)&&(h=void 0),Ha(a.schema)&&(u=void 0)}for(const m of t.syntaxErrors){if(m.code===J.TrailingComma){if(typeof u!="number")continue;m.severity=u}o(m)}if(typeof h=="number"){const m=M("Comments are not permitted in JSON.");t.comments.forEach(g=>{o(Qe.create(g,m,h,J.CommentNotPermitted))})}return i};if(r){const a=r.id||"schemaservice://untitled/"+j1++;return this.jsonSchemaService.registerExternalSchema({uri:a,schema:r}).getResolvedSchema().then(h=>l(h))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(a=>l(a))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}},j1=0;function ja(e){if(e&&typeof e=="object"){if(qe(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const n=ja(t);if(qe(n))return n}}}function Ha(e){if(e&&typeof e=="object"){if(qe(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(qe(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const n of e.allOf){const r=Ha(n);if(qe(r))return r}}}function qn(e){switch(e){case"error":return ke.Error;case"warning":return ke.Warning;case"ignore":return}}var Wa=48,H1=57,W1=65,jn=97,z1=102;function le(e){return e=jn&&e<=z1?e-jn+10:0)}function G1(e){if(e[0]==="#")switch(e.length){case 4:return{red:le(e.charCodeAt(1))*17/255,green:le(e.charCodeAt(2))*17/255,blue:le(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:le(e.charCodeAt(1))*17/255,green:le(e.charCodeAt(2))*17/255,blue:le(e.charCodeAt(3))*17/255,alpha:le(e.charCodeAt(4))*17/255};case 7:return{red:(le(e.charCodeAt(1))*16+le(e.charCodeAt(2)))/255,green:(le(e.charCodeAt(3))*16+le(e.charCodeAt(4)))/255,blue:(le(e.charCodeAt(5))*16+le(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(le(e.charCodeAt(1))*16+le(e.charCodeAt(2)))/255,green:(le(e.charCodeAt(3))*16+le(e.charCodeAt(4)))/255,blue:(le(e.charCodeAt(5))*16+le(e.charCodeAt(6)))/255,alpha:(le(e.charCodeAt(7))*16+le(e.charCodeAt(8)))/255}}}var J1=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let i=n.resultLimit||Number.MAX_VALUE;const s=e.uri;if((s==="vscode://defaultsettings/keybindings.json"||ln(s.toLowerCase(),"/user/keybindings.json"))&&r.type==="array"){const f=[];for(const d of r.items)if(d.type==="object"){for(const m of d.properties)if(m.keyNode.value==="key"&&m.valueNode){const g=Ht.create(e.uri,ht(e,d));if(f.push({name:za(m.valueNode),kind:He.Function,location:g}),i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(s),f}}return f}const o=[{node:r,containerName:""}];let l=0,a=!1;const u=[],h=(f,d)=>{f.type==="array"?f.items.forEach(m=>{m&&o.push({node:m,containerName:d})}):f.type==="object"&&f.properties.forEach(m=>{const g=m.valueNode;if(g)if(i>0){i--;const p=Ht.create(e.uri,ht(e,m)),_=d?d+"."+m.keyNode.value:m.keyNode.value;u.push({name:this.getKeyLabel(m),kind:this.getSymbolKind(g.type),location:p,containerName:d}),o.push({node:g,containerName:_})}else a=!0})};for(;l{f.type==="array"?f.items.forEach((m,g)=>{if(m)if(i>0){i--;const p=ht(e,m),_=p,S={name:String(g),kind:this.getSymbolKind(m.type),range:p,selectionRange:_,children:[]};d.push(S),l.push({result:S.children,node:m})}else u=!0}):f.type==="object"&&f.properties.forEach(m=>{const g=m.valueNode;if(g)if(i>0){i--;const p=ht(e,m),_=ht(e,m.keyNode),w=[],S={name:this.getKeyLabel(m),kind:this.getSymbolKind(g.type),range:p,selectionRange:_,children:w,detail:this.getDetail(g)};d.push(S),l.push({result:w,node:g})}else u=!0})};for(;a{const i=[];if(r){let s=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE;const o=t.getMatchingSchemas(r.schema),l={};for(const a of o)if(!a.inverted&&a.schema&&(a.schema.format==="color"||a.schema.format==="color-hex")&&a.node&&a.node.type==="string"){const u=String(a.node.offset);if(!l[u]){const h=G1(Lt(a.node));if(h){const f=ht(e,a.node);i.push({color:h,range:f})}if(l[u]=!0,s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),i}}}return i})}getColorPresentations(e,t,n,r){const i=[],s=Math.round(n.red*255),o=Math.round(n.green*255),l=Math.round(n.blue*255);function a(h){const f=h.toString(16);return f.length!==2?"0"+f:f}let u;return n.alpha===1?u=`#${a(s)}${a(o)}${a(l)}`:u=`#${a(s)}${a(o)}${a(l)}${a(Math.round(n.alpha*255))}`,i.push({label:u,textEdit:je.replace(r,JSON.stringify(u))}),i}};function ht(e,t){return z.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function za(e){return Lt(e)||M("")}var ti={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},X1={id:M("A unique identifier for the schema."),$schema:M("The schema to verify this document against."),title:M("A descriptive title of the element."),description:M("A long description of the element. Used in hover menus and suggestions."),default:M("A default value. Used by suggestions."),multipleOf:M("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:M("The maximum numerical value, inclusive by default."),exclusiveMaximum:M("Makes the maximum property exclusive."),minimum:M("The minimum numerical value, inclusive by default."),exclusiveMinimum:M("Makes the minimum property exclusive."),maxLength:M("The maximum length of a string."),minLength:M("The minimum length of a string."),pattern:M("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:M("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:M("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:M("The maximum number of items that can be inside an array. Inclusive."),minItems:M("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:M("If all of the items in the array must be unique. Defaults to false."),maxProperties:M("The maximum number of properties an object can have. Inclusive."),minProperties:M("The minimum number of properties an object can have. Inclusive."),required:M("An array of strings that lists the names of all properties required on this object."),additionalProperties:M("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:M("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:M("A map of property names to schemas for each property."),patternProperties:M("A map of regular expressions on property names to schemas for matching properties."),dependencies:M("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:M("The set of literal values that are valid."),type:M("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:M("Describes the format expected for the value."),allOf:M("An array of schemas, all of which must match."),anyOf:M("An array of schemas, where at least one must match."),oneOf:M("An array of schemas, exactly one of which must match."),not:M("A schema which must not match."),$id:M("A unique identifier for the schema."),$ref:M("Reference a definition hosted on any location."),$comment:M("Comments from schema authors to readers or maintainers of the schema."),readOnly:M("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:M("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:M('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:M("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:M("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:M("Describes the media type of a string property."),contentEncoding:M("Describes the content encoding of a string property."),if:M('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:M('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:M('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in ti.schemas){const t=ti.schemas[e];for(const n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});const i=X1[n];i&&(r.description=i)}}var Ga;(()=>{var e={470:i=>{function s(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function o(a,u){for(var h,f="",d=0,m=-1,g=0,p=0;p<=a.length;++p){if(p2){var _=f.lastIndexOf("/");if(_!==f.length-1){_===-1?(f="",d=0):d=(f=f.slice(0,_)).length-1-f.lastIndexOf("/"),m=p,g=0;continue}}else if(f.length===2||f.length===1){f="",d=0,m=p,g=0;continue}}u&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+a.slice(m+1,p):f=a.slice(m+1,p),d=p-m-1;m=p,g=0}else h===46&&g!==-1?++g:g=-1}return f}var l={resolve:function(){for(var a,u="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(a===void 0&&(a=process.cwd()),d=a),s(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=o(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(a){if(s(a),a.length===0)return".";var u=a.charCodeAt(0)===47,h=a.charCodeAt(a.length-1)===47;return(a=o(a,!u)).length!==0||u||(a="."),a.length>0&&h&&(a+="/"),u?"/"+a:a},isAbsolute:function(a){return s(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,u=0;u0&&(a===void 0?a=h:a+="/"+h)}return a===void 0?".":l.normalize(a)},relative:function(a,u){if(s(a),s(u),a===u||(a=l.resolve(a))===(u=l.resolve(u)))return"";for(var h=1;hp){if(u.charCodeAt(m+w)===47)return u.slice(m+w+1);if(w===0)return u.slice(m+w)}else d>p&&(a.charCodeAt(h+w)===47?_=w:w===0&&(_=0));break}var S=a.charCodeAt(h+w);if(S!==u.charCodeAt(m+w))break;S===47&&(_=w)}var b="";for(w=h+_+1;w<=f;++w)w!==f&&a.charCodeAt(w)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+u.slice(m+_):(m+=_,u.charCodeAt(m)===47&&++m,u.slice(m))},_makeLong:function(a){return a},dirname:function(a){if(s(a),a.length===0)return".";for(var u=a.charCodeAt(0),h=u===47,f=-1,d=!0,m=a.length-1;m>=1;--m)if((u=a.charCodeAt(m))===47){if(!d){f=m;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":a.slice(0,f)},basename:function(a,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');s(a);var h,f=0,d=-1,m=!0;if(u!==void 0&&u.length>0&&u.length<=a.length){if(u.length===a.length&&u===a)return"";var g=u.length-1,p=-1;for(h=a.length-1;h>=0;--h){var _=a.charCodeAt(h);if(_===47){if(!m){f=h+1;break}}else p===-1&&(m=!1,p=h+1),g>=0&&(_===u.charCodeAt(g)?--g==-1&&(d=h):(g=-1,d=p))}return f===d?d=p:d===-1&&(d=a.length),a.slice(f,d)}for(h=a.length-1;h>=0;--h)if(a.charCodeAt(h)===47){if(!m){f=h+1;break}}else d===-1&&(m=!1,d=h+1);return d===-1?"":a.slice(f,d)},extname:function(a){s(a);for(var u=-1,h=0,f=-1,d=!0,m=0,g=a.length-1;g>=0;--g){var p=a.charCodeAt(g);if(p!==47)f===-1&&(d=!1,f=g+1),p===46?u===-1?u=g:m!==1&&(m=1):u!==-1&&(m=-1);else if(!d){h=g+1;break}}return u===-1||f===-1||m===0||m===1&&u===f-1&&u===h+1?"":a.slice(u,f)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return(function(u,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d})(0,a)},parse:function(a){s(a);var u={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return u;var h,f=a.charCodeAt(0),d=f===47;d?(u.root="/",h=1):h=0;for(var m=-1,g=0,p=-1,_=!0,w=a.length-1,S=0;w>=h;--w)if((f=a.charCodeAt(w))!==47)p===-1&&(_=!1,p=w+1),f===46?m===-1?m=w:S!==1&&(S=1):m!==-1&&(S=-1);else if(!_){g=w+1;break}return m===-1||p===-1||S===0||S===1&&m===p-1&&m===g+1?p!==-1&&(u.base=u.name=g===0&&d?a.slice(1,p):a.slice(g,p)):(g===0&&d?(u.name=a.slice(1,m),u.base=a.slice(1,p)):(u.name=a.slice(g,m),u.base=a.slice(g,p)),u.ext=a.slice(m,p)),g>0?u.dir=a.slice(0,g-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.d=(i,s)=>{for(var o in s)n.o(s,o)&&!n.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:s[o]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>q}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function a(C,A){if(!C.scheme&&A)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${C.authority}", path: "${C.path}", query: "${C.query}", fragment: "${C.fragment}"}`);if(C.scheme&&!s.test(C.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(C.path){if(C.authority){if(!o.test(C.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(C.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const u="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(A){return A instanceof d||!!A&&typeof A.authority=="string"&&typeof A.fragment=="string"&&typeof A.path=="string"&&typeof A.query=="string"&&typeof A.scheme=="string"&&typeof A.fsPath=="string"&&typeof A.with=="function"&&typeof A.toString=="function"}scheme;authority;path;query;fragment;constructor(A,R,E,D,P,I=!1){typeof A=="object"?(this.scheme=A.scheme||u,this.authority=A.authority||u,this.path=A.path||u,this.query=A.query||u,this.fragment=A.fragment||u):(this.scheme=(function(U,j){return U||j?U:"file"})(A,I),this.authority=R||u,this.path=(function(U,j){switch(U){case"https":case"http":case"file":j?j[0]!==h&&(j=h+j):j=h}return j})(this.scheme,E||u),this.query=D||u,this.fragment=P||u,a(this,I))}get fsPath(){return S(this)}with(A){if(!A)return this;let{scheme:R,authority:E,path:D,query:P,fragment:I}=A;return R===void 0?R=this.scheme:R===null&&(R=u),E===void 0?E=this.authority:E===null&&(E=u),D===void 0?D=this.path:D===null&&(D=u),P===void 0?P=this.query:P===null&&(P=u),I===void 0?I=this.fragment:I===null&&(I=u),R===this.scheme&&E===this.authority&&D===this.path&&P===this.query&&I===this.fragment?this:new g(R,E,D,P,I)}static parse(A,R=!1){const E=f.exec(A);return E?new g(E[2]||u,N(E[4]||u),N(E[5]||u),N(E[7]||u),N(E[9]||u),R):new g(u,u,u,u,u)}static file(A){let R=u;if(i&&(A=A.replace(/\\/g,h)),A[0]===h&&A[1]===h){const E=A.indexOf(h,2);E===-1?(R=A.substring(2),A=h):(R=A.substring(2,E),A=A.substring(E)||h)}return new g("file",R,A,u,u)}static from(A){const R=new g(A.scheme,A.authority,A.path,A.query,A.fragment);return a(R,!0),R}toString(A=!1){return b(this,A)}toJSON(){return this}static revive(A){if(A){if(A instanceof d)return A;{const R=new g(A);return R._formatted=A.external,R._fsPath=A._sep===m?A.fsPath:null,R}}return A}}const m=i?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=S(this)),this._fsPath}toString(A=!1){return A?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const A={$mid:1};return this._fsPath&&(A.fsPath=this._fsPath,A._sep=m),this._formatted&&(A.external=this._formatted),this.path&&(A.path=this.path),this.scheme&&(A.scheme=this.scheme),this.authority&&(A.authority=this.authority),this.query&&(A.query=this.query),this.fragment&&(A.fragment=this.fragment),A}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(C,A,R){let E,D=-1;for(let P=0;P=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===45||I===46||I===95||I===126||A&&I===47||R&&I===91||R&&I===93||R&&I===58)D!==-1&&(E+=encodeURIComponent(C.substring(D,P)),D=-1),E!==void 0&&(E+=C.charAt(P));else{E===void 0&&(E=C.substr(0,P));const U=p[I];U!==void 0?(D!==-1&&(E+=encodeURIComponent(C.substring(D,P)),D=-1),E+=U):D===-1&&(D=P)}}return D!==-1&&(E+=encodeURIComponent(C.substring(D))),E!==void 0?E:C}function w(C){let A;for(let R=0;R1&&C.scheme==="file"?`//${C.authority}${C.path}`:C.path.charCodeAt(0)===47&&(C.path.charCodeAt(1)>=65&&C.path.charCodeAt(1)<=90||C.path.charCodeAt(1)>=97&&C.path.charCodeAt(1)<=122)&&C.path.charCodeAt(2)===58?C.path[1].toLowerCase()+C.path.substr(2):C.path,i&&(R=R.replace(/\//g,"\\")),R}function b(C,A){const R=A?w:_;let E="",{scheme:D,authority:P,path:I,query:U,fragment:j}=C;if(D&&(E+=D,E+=":"),(P||D==="file")&&(E+=h,E+=h),P){let G=P.indexOf("@");if(G!==-1){const L=P.substr(0,G);P=P.substr(G+1),G=L.lastIndexOf(":"),G===-1?E+=R(L,!1,!1):(E+=R(L.substr(0,G),!1,!1),E+=":",E+=R(L.substr(G+1),!1,!0)),E+="@"}P=P.toLowerCase(),G=P.lastIndexOf(":"),G===-1?E+=R(P,!1,!0):(E+=R(P.substr(0,G),!1,!0),E+=P.substr(G))}if(I){if(I.length>=3&&I.charCodeAt(0)===47&&I.charCodeAt(2)===58){const G=I.charCodeAt(1);G>=65&&G<=90&&(I=`/${String.fromCharCode(G+32)}:${I.substr(3)}`)}else if(I.length>=2&&I.charCodeAt(1)===58){const G=I.charCodeAt(0);G>=65&&G<=90&&(I=`${String.fromCharCode(G+32)}:${I.substr(2)}`)}E+=R(I,!0,!1)}return U&&(E+="?",E+=R(U,!1,!1)),j&&(E+="#",E+=A?j:_(j,!1,!1)),E}function y(C){try{return decodeURIComponent(C)}catch{return C.length>3?C.substr(0,3)+y(C.substr(3)):C}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function N(C){return C.match(v)?C.replace(v,A=>y(A)):C}var k=n(470);const T=k.posix||k,V="/";var q;(function(C){C.joinPath=function(A,...R){return A.with({path:T.join(A.path,...R)})},C.resolvePath=function(A,...R){let E=A.path,D=!1;E[0]!==V&&(E=V+E,D=!0);let P=T.resolve(E,...R);return D&&P[0]===V&&!A.authority&&(P=P.substring(1)),A.with({path:P})},C.dirname=function(A){if(A.path.length===0||A.path===V)return A;let R=T.dirname(A.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),A.with({path:R})},C.basename=function(A){return T.basename(A.path)},C.extname=function(A){return T.extname(A.path)}})(q||(q={}))})(),Ga=r})();var{URI:Gt,Utils:Af}=Ga;function Y1(e,t){if(typeof e!="string")throw new TypeError("Expected a string");const n=String(e);let r="";const i=!!t,s=!!t;let o=!1;const l=t&&typeof t.flags=="string"?t.flags:"";let a;for(let u=0,h=n.length;u1&&(f==="/"||f===void 0||f==="{"||f===",")&&(m==="/"||m===void 0||m===","||m==="}")?(m==="/"?u++:f==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=a}return(!l||!~l.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,l)}var Q1="!",Z1="/",K1=class{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let r of e){const i=r[0]!==Q1;i||(r=r.substring(1)),r.length>0&&(r[0]===Z1&&(r=r.substring(1)),this.globWrappers.push({regexp:Y1("**/"+r,{extended:!0,globstar:!0}),include:i}))}t&&(t=Xa(t),t.endsWith("/")||(t=t+"/"),this.folderUri=t)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}},ef=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new hn(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},hn=class{constructor(e,t=[]){this.schema=e,this.errors=t}},Ja=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return Re(t)}getSectionRecursive(e,t){if(!t||typeof t=="boolean"||e.length===0)return t;const n=e.shift();if(t.properties&&typeof t.properties[n])return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties){for(const r of Object.keys(t.patternProperties))if(Vn(r)?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}},tf=class{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{const n=Gt.parse(t).scheme;return n!=="schemaservice"&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;e=mt(e);const n=[e],r=Object.keys(this.schemasById).map(i=>this.schemasById[i]);for(;n.length;){const i=n.pop();for(let s=0;s{if(!t){const s=M("Unable to load schema from '{0}': No content.",mn(e));return new hn({},[s])}const n=[];t.charCodeAt(0)===65279&&(n.push(M("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",mn(e))),t=t.trimStart());let r={};const i=[];return r=v1(t,i),i.length&&n.push(M("Unable to parse content from '{0}': Parse error at offset {1}.",mn(e),i[0].offset)),new hn(r,n)},t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),ln(n,".")&&(n=n.substr(0,n.length-1)),new hn({},[M("Unable to load schema from '{0}': {1}.",mn(e),n)])})}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let i=r.$schema?mt(r.$schema):void 0;if(i==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Ja({},[M("Draft-03 schemas are not supported.")],[],i));let s=new Set;const o=this.contextService,l=(g,p)=>{p=decodeURIComponent(p);let _=g;return p[0]==="/"&&(p=p.substring(1)),p.split("/").some(w=>(w=w.replace(/~1/g,"/").replace(/~0/g,"~"),_=_[w],!_)),_},a=(g,p,_)=>(p.anchors||(p.anchors=m(g)),p.anchors.get(_)),u=(g,p)=>{for(const _ in p)p.hasOwnProperty(_)&&_!=="id"&&_!=="$id"&&(g[_]=p[_])},h=(g,p,_,w)=>{let S;w===void 0||w.length===0?S=p:w.charAt(0)==="/"?S=l(p,w):S=a(p,_,w),S?u(g,S):n.push(M("$ref '{0}' in '{1}' can not be resolved.",w||"",_.uri))},f=(g,p,_,w)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(p)&&(p=o.resolveRelativePath(p,w.uri)),p=mt(p);const S=this.getOrAddSchemaHandle(p);return S.getUnresolvedSchema().then(b=>{if(w.dependencies.add(p),b.errors.length){const y=_?p+"#"+_:p;n.push(M("Problems loading reference '{0}': {1}",y,b.errors[0]))}return h(g,b.schema,S,_),d(g,b.schema,S)})},d=(g,p,_)=>{const w=[];return this.traverseNodes(g,S=>{const b=new Set;for(;S.$ref;){const y=S.$ref,v=y.split("#",2);if(delete S.$ref,v[0].length>0){w.push(f(S,v[0],v[1],_));return}else if(!b.has(y)){const N=v[1];h(S,p,_,N),b.add(y)}}S.$recursiveRef&&s.add("$recursiveRef"),S.$dynamicRef&&s.add("$dynamicRef")}),this.promise.all(w)},m=g=>{const p=new Map;return this.traverseNodes(g,_=>{const w=_.$id||_.id,S=Oo(w)&&w.charAt(0)==="#"?w.substring(1):_.$anchor;S&&(p.has(S)?n.push(M("Duplicate anchor declaration: '{0}'",S)):p.set(S,_)),_.$recursiveAnchor&&s.add("$recursiveAnchor"),_.$dynamicAnchor&&s.add("$dynamicAnchor")}),p};return d(r,r,t).then(g=>{let p=[];return s.size&&p.push(M("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", "))),new Ja(r,n,p,i)})}traverseNodes(e,t){if(!e||typeof e!="object")return Promise.resolve(null);const n=new Set,r=(...u)=>{for(const h of u)ft(h)&&l.push(h)},i=(...u)=>{for(const h of u)if(ft(h))for(const f in h){const m=h[f];ft(m)&&l.push(m)}},s=(...u)=>{for(const h of u)if(Array.isArray(h))for(const f of h)ft(f)&&l.push(f)},o=u=>{if(Array.isArray(u))for(const h of u)ft(h)&&l.push(h);else ft(u)&&l.push(u)},l=[e];let a=l.pop();for(;a;)n.has(a)||(n.add(a),t(a),r(a.additionalItems,a.additionalProperties,a.not,a.contains,a.propertyNames,a.if,a.then,a.else,a.unevaluatedItems,a.unevaluatedProperties),i(a.definitions,a.$defs,a.properties,a.patternProperties,a.dependencies,a.dependentSchemas),s(a.anyOf,a.allOf,a.oneOf,a.prefixItems),o(a.items)),a=l.pop()}getSchemaFromProperty(e,t){if(t.root?.type==="object"){for(const n of t.root.properties)if(n.keyNode.value==="$schema"&&n.valueNode?.type==="string"){let r=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(r)&&(r=this.contextService.resolveRelativePath(r,e)),r}}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=Xa(e);for(const i of this.filePatternAssociations)if(i.matchesPattern(r))for(const s of i.getURIs())t[s]||(n.push(s),t[s]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let i=this.getSchemaFromProperty(e,t);if(i){const s=mt(i);return this.getOrAddSchemaHandle(s).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(i=>({$ref:i}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const r=n.id||"schemaservice://untitled/matchingSchemas/"+nf++;return this.addSchemaHandle(r,n).getResolvedSchema().then(s=>t.getMatchingSchemas(s.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(e.uri,t).then(r=>r?t.getMatchingSchemas(r.schema).filter(i=>!i.inverted):[])}},nf=0;function mt(e){try{return Gt.parse(e).toString(!0)}catch{return e}}function Xa(e){try{return Gt.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function mn(e){try{const t=Gt.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function rf(e,t){const n=[],r=[],i=[];let s=-1;const o=vt(e.getText(),!1);let l=o.scan();function a(g){n.push(g),r.push(i.length)}for(;l!==17;){switch(l){case 1:case 3:{const g=e.positionAt(o.getTokenOffset()).line,p={startLine:g,endLine:g,kind:l===1?"object":"array"};i.push(p);break}case 2:case 4:{const g=l===2?"object":"array";if(i.length>0&&i[i.length-1].kind===g){const p=i.pop(),_=e.positionAt(o.getTokenOffset()).line;p&&_>p.startLine+1&&s!==p.startLine&&(p.endLine=_-1,a(p),s=p.startLine)}break}case 13:{const g=e.positionAt(o.getTokenOffset()).line,p=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&g+1=0&&i[w].kind!==un.Region;)w--;if(w>=0){const S=i[w];i.length=w,_>S.startLine&&s!==S.startLine&&(S.endLine=_,a(S),s=S.startLine)}}}break}}l=o.scan()}const u=t&&t.rangeLimit;if(typeof u!="number"||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const h=[];for(let g of r)g<30&&(h[g]=(h[g]||0)+1);let f=0,d=0;for(let g=0;gu){d=g;break}f+=p}}const m=[];for(let g=0;g=d&&a<=m&&h.push(i(d,m)),h.push(i(u.offset,u.offset+u.length));break;case"number":case"boolean":case"null":case"property":h.push(i(u.offset,u.offset+u.length));break}if(u.type==="property"||u.parent&&u.parent.type==="array"){const d=o(u.offset+u.length,5);d!==-1&&h.push(i(u.offset,d))}u=u.parent}let f;for(let d=h.length-1;d>=0;d--)f=$n.create(h[d],f);return f||(f=$n.create(z.create(l,l))),f}function i(l,a){return z.create(e.positionAt(l),e.positionAt(a))}const s=vt(e.getText(),!0);function o(l,a){return s.setPosition(l),s.scan()===a?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}function ni(e,t,n){let r;if(n){const s=e.offsetAt(n.start),o=e.offsetAt(n.end)-s;r={offset:s,length:o}}const i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:` -`,keepLines:t?.keepLines===!0};return N1(e.getText(),r,i).map(s=>je.replace(z.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var fe;(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(fe||(fe={}));var Hn=class{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;e.noKeyName?t=this.childrenProperties.length:t=af(this.childrenProperties,e,of),t<0&&(t=t*-1-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}};function of(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return nr?1:0}function af(e,t,n){const r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(rs)return e.length;let o=0,l=e.length-1;for(;o<=l;){let a=l+o>>1,u=n(t,e[a]);if(u>0)o=a+1;else if(u<0)l=a-1;else return a}return-o-1}function lf(e,t){const n={...t,keepLines:!1},r=Ve.applyEdits(e,ni(e,n,void 0)),i=Ve.create("test://test.json","json",0,r),s=uf(i),o=cf(i,s),l=ni(o,n,void 0),a=Ve.applyEdits(o,l);return[je.replace(z.create(se.create(0,0),e.positionAt(e.getText().length)),a)]}function uf(e){const t=e.getText(),n=vt(t,!1);let r=new Hn,i=r,s=r,o=r,l,a=0,u=0,h,f,d=-1,m=-1,g=0,p=0,_=[],w=!1,S=!1;for(;(l=n.scan())!==17;){if(w===!0&&l!==14&&l!==15&&l!==12&&l!==13&&s.endLineNumber===void 0){let b=n.getTokenStartLine();f===2||f===4?o.endLineNumber=b-1:s.endLineNumber=b-1,g=b,w=!1}if(S===!0&&l!==14&&l!==15&&l!==12&&l!==13&&(g=n.getTokenStartLine(),S=!1),n.getTokenStartLine()!==a){for(let b=a;b0;){const i=r.shift(),s=i.propertyTreeArray;let o=i.beginningLineNumber;for(let l=0;l{if(r.type==="property"&&r.keyNode.value==="$ref"&&r.valueNode?.type==="string"){const i=r.valueNode.value,s=mf(t,i);if(s){const o=e.positionAt(s.offset);n.push({target:`${e.uri}#${o.line+1},${o.character+1}`,range:hf(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function hf(e,t){return z.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function mf(e,t){const n=df(t);return n?ri(n,e.root):null}function ri(e,t){if(!t)return null;if(e.length===0)return t;const n=e.shift();if(t&&t.type==="object"){const r=t.properties.find(i=>i.keyNode.value===n);return r?ri(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),i=t.items[r];return i?ri(e,i):null}return null}function df(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(gf)}function gf(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function pf(e){const t=e.promiseConstructor||Promise,n=new tf(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(ti);const r=new U1(n,e.contributions,t,e.clientCapabilities),i=new B1(n,e.contributions,t),s=new J1(n),o=new q1(n,t);return{configure:l=>{n.clearExternalSchemas(),l.schemas?.forEach(n.registerExternalSchema.bind(n)),o.configure(l)},resetSchema:l=>n.onResourceChange(l),doValidation:o.doValidation.bind(o),getLanguageStatus:o.getLanguageStatus.bind(o),parseJSONDocument:l=>O1(l,{collectComments:!0}),newJSONDocument:(l,a)=>V1(l,a),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:rf,getSelectionRanges:sf,findDefinition:()=>Promise.resolve([]),findLinks:ff,format:(l,a,u)=>ni(l,u,a),sort:(l,a)=>lf(l,a)}}var Ka;typeof fetch<"u"&&(Ka=function(e){return fetch(e).then(t=>t.text())});var yf=class{constructor(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=pf({workspaceContext:{resolveRelativePath:(n,r)=>{const i=r.substr(0,r.lastIndexOf("/")+1);return _f(i,n)}},schemaRequestService:t.enableSchemaRequest?Ka:void 0,clientCapabilities:Yr.LATEST}),this._languageService.configure(this._languageSettings)}async doValidation(e){let t=this._getTextDocument(e);if(t){let n=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,n,this._languageSettings)}return Promise.resolve([])}async doComplete(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,r)}async doResolve(e){return this._languageService.doResolve(e)}async doHover(e,t){let n=this._getTextDocument(e);if(!n)return null;let r=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,r)}async format(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.format(r,t,n);return Promise.resolve(i)}async resetSchema(e){return Promise.resolve(this._languageService.resetSchema(e))}async findDocumentSymbols(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentSymbols2(t,n);return Promise.resolve(r)}async findDocumentColors(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Promise.resolve(r)}async getColorPresentations(e,t,n){let r=this._getTextDocument(e);if(!r)return[];let i=this._languageService.parseJSONDocument(r),s=this._languageService.getColorPresentations(r,i,t,n);return Promise.resolve(s)}async getFoldingRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.getFoldingRanges(n,t);return Promise.resolve(r)}async getSelectionRanges(e,t){let n=this._getTextDocument(e);if(!n)return[];let r=this._languageService.parseJSONDocument(n),i=this._languageService.getSelectionRanges(n,t,r);return Promise.resolve(i)}async parseJSONDocument(e){let t=this._getTextDocument(e);if(!t)return null;let n=this._languageService.parseJSONDocument(t);return Promise.resolve(n)}async getMatchingSchemas(e){let t=this._getTextDocument(e);if(!t)return[];let n=this._languageService.parseJSONDocument(t);return Promise.resolve(this._languageService.getMatchingSchemas(t,n))}_getTextDocument(e){let t=this._ctx.getMirrorModels();for(let n of t)if(n.uri.toString()===e)return Ve.create(e,this._languageId,n.version,n.getValue());return null}},bf=47,ii=46;function vf(e){return e.charCodeAt(0)===bf}function _f(e,t){if(vf(t)){const n=Gt.parse(e),r=t.split("/");return n.with({path:el(r)}).toString()}return wf(e,t)}function el(e){const t=[];for(const r of e)r.length===0||r.length===1&&r.charCodeAt(0)===ii||(r.length===2&&r.charCodeAt(0)===ii&&r.charCodeAt(1)===ii?t.pop():t.push(r));e.length>1&&e[e.length-1].length===0&&t.push("");let n=t.join("/");return e[0].length===0&&(n="/"+n),n}function wf(e,...t){const n=Gt.parse(e),r=n.path.split("/");for(let i of t)r.push(...i.split("/"));return n.with({path:el(r)}).toString()}self.onmessage=()=>{Eo((e,t)=>new yf(e,t))};})(); diff --git a/raphtory-graphql/resources/worker-BxOCMhZT.js b/raphtory-graphql/resources/worker-BxOCMhZT.js deleted file mode 100644 index fb6e9426f2..0000000000 --- a/raphtory-graphql/resources/worker-BxOCMhZT.js +++ /dev/null @@ -1,49 +0,0 @@ -(function(){"use strict";var xn={exports:{}},ve={};var Go;function Of(){if(Go)return ve;Go=1;var e=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),t=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),E=Symbol.iterator;function _(k){return k===null||typeof k!="object"?null:(k=E&&k[E]||k["@@iterator"],typeof k=="function"?k:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,A={};function F(k,T,ie){this.props=k,this.context=T,this.refs=A,this.updater=ie||x}F.prototype.isReactComponent={},F.prototype.setState=function(k,T){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,T,"setState")},F.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function I(){}I.prototype=F.prototype;function R(k,T,ie){this.props=k,this.context=T,this.refs=A,this.updater=ie||x}var U=R.prototype=new I;U.constructor=R,$(U,F.prototype),U.isPureReactComponent=!0;var Y=Array.isArray;function X(){}var K={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function ne(k,T,ie){var M=ie.ref;return{$$typeof:e,type:k,key:T,ref:M!==void 0?M:null,props:ie}}function ce(k,T){return ne(k.type,T,k.props)}function be(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function re(k){var T={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ie){return T[ie]})}var Ee=/\/+/g;function Ne(k,T){return typeof k=="object"&&k!==null&&k.key!=null?re(""+k.key):T.toString(36)}function Fe(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(X,X):(k.status="pending",k.then(function(T){k.status==="pending"&&(k.status="fulfilled",k.value=T)},function(T){k.status==="pending"&&(k.status="rejected",k.reason=T)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function Ae(k,T,ie,M,j){var oe=typeof k;(oe==="undefined"||oe==="boolean")&&(k=null);var ae=!1;if(k===null)ae=!0;else switch(oe){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(k.$$typeof){case e:case u:ae=!0;break;case g:return ae=k._init,Ae(ae(k._payload),T,ie,M,j)}}if(ae)return j=j(k),ae=M===""?"."+Ne(k,0):M,Y(j)?(ie="",ae!=null&&(ie=ae.replace(Ee,"$&/")+"/"),Ae(j,T,ie,"",function(We){return We})):j!=null&&(be(j)&&(j=ce(j,ie+(j.key==null||k&&k.key===j.key?"":(""+j.key).replace(Ee,"$&/")+"/")+ae)),T.push(j)),1;ae=0;var ye=M===""?".":M+":";if(Y(k))for(var Be=0;Be"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(u){console.error(u)}}return e(),bn.exports=Tf(),bn.exports}Pf();var $n={exports:{}},vu={};var Ho;function Uf(){if(Ho)return vu;Ho=1;var e=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function r(i,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var s in t)s!=="key"&&(n[s]=t[s])}else n=t;return t=n.ref,{$$typeof:e,type:i,key:o,ref:t!==void 0?t:null,props:n}}return vu.Fragment=u,vu.jsx=r,vu.jsxs=r,vu}var e0;function Zf(){return e0||(e0=1,$n.exports=Uf()),$n.exports}var nt=Zf(),Mf=Object.defineProperty,Et=(e,u)=>{for(var r in u)Mf(e,r,{get:u[r],enumerable:!0})},Oe={};Et(Oe,{$brand:()=>r0,$input:()=>Hs,$output:()=>Qs,NEVER:()=>u0,TimePrecision:()=>nc,ZodAny:()=>Li,ZodArray:()=>Wi,ZodBase64:()=>Lr,ZodBase64URL:()=>Jr,ZodBigInt:()=>Pu,ZodBigIntFormat:()=>Gr,ZodBoolean:()=>Tu,ZodCIDRv4:()=>Mr,ZodCIDRv6:()=>Rr,ZodCUID:()=>Nr,ZodCUID2:()=>jr,ZodCatch:()=>vo,ZodCodec:()=>rn,ZodCustom:()=>Vu,ZodCustomStringFormat:()=>cu,ZodDate:()=>Yr,ZodDefault:()=>co,ZodDiscriminatedUnion:()=>Ki,ZodE164:()=>qr,ZodEmail:()=>Fr,ZodEmoji:()=>Ir,ZodEnum:()=>lu,ZodError:()=>og,ZodExactOptional:()=>oo,ZodFile:()=>no,ZodFirstPartyTypeKind:()=>Ao,ZodFunction:()=>bo,ZodGUID:()=>Nu,ZodIPv4:()=>Ur,ZodIPv6:()=>Zr,ZodISODate:()=>zi,ZodISODateTime:()=>Ii,ZodISODuration:()=>ji,ZodISOTime:()=>Ni,ZodIntersection:()=>Yi,ZodIssueCode:()=>ag,ZodJWT:()=>Vr,ZodKSUID:()=>Pr,ZodLazy:()=>wo,ZodLiteral:()=>ro,ZodMAC:()=>Oi,ZodMap:()=>to,ZodNaN:()=>Eo,ZodNanoID:()=>zr,ZodNever:()=>qi,ZodNonOptional:()=>tn,ZodNull:()=>Mi,ZodNullable:()=>so,ZodNumber:()=>Ou,ZodNumberFormat:()=>Vt,ZodObject:()=>Zu,ZodOptional:()=>en,ZodPipe:()=>un,ZodPrefault:()=>fo,ZodPromise:()=>xo,ZodReadonly:()=>Do,ZodRealError:()=>lt,ZodRecord:()=>Ru,ZodSet:()=>uo,ZodString:()=>zu,ZodStringFormat:()=>ze,ZodSuccess:()=>go,ZodSymbol:()=>Ui,ZodTemplateLiteral:()=>_o,ZodTransform:()=>io,ZodTuple:()=>Qi,ZodType:()=>De,ZodULID:()=>Or,ZodURL:()=>ju,ZodUUID:()=>wt,ZodUndefined:()=>Zi,ZodUnion:()=>Mu,ZodUnknown:()=>Ji,ZodVoid:()=>Vi,ZodXID:()=>Tr,ZodXor:()=>Gi,_ZodString:()=>kr,_default:()=>lo,_function:()=>nn,any:()=>Ad,array:()=>Uu,base64:()=>dd,base64url:()=>fd,bigint:()=>Cd,boolean:()=>Pi,catch:()=>po,check:()=>Yd,cidrv4:()=>cd,cidrv6:()=>ld,clone:()=>mt,codec:()=>Wd,coerce:()=>i4,config:()=>tt,core:()=>t0,cuid:()=>td,cuid2:()=>ud,custom:()=>Xd,date:()=>Sd,decode:()=>Pl,decodeAsync:()=>Zl,describe:()=>Qd,discriminatedUnion:()=>Od,e164:()=>hd,email:()=>ql,emoji:()=>Hl,encode:()=>Tl,encodeAsync:()=>Ul,endsWith:()=>wr,enum:()=>Qr,exactOptional:()=>ao,file:()=>Ld,flattenError:()=>Fn,float32:()=>Dd,float64:()=>yd,formatError:()=>In,fromJSONSchema:()=>hg,function:()=>nn,getErrorMap:()=>cg,globalRegistry:()=>vt,gt:()=>Ot,gte:()=>st,guid:()=>Vl,hash:()=>Ed,hex:()=>pd,hostname:()=>vd,httpUrl:()=>Ql,includes:()=>yr,instanceof:()=>e4,int:()=>Wr,int32:()=>_d,int64:()=>xd,intersection:()=>Xi,ipv4:()=>od,ipv6:()=>sd,iso:()=>Fi,json:()=>u4,jwt:()=>md,keyof:()=>Fd,ksuid:()=>id,lazy:()=>Co,length:()=>Su,literal:()=>Rd,locales:()=>ti,looseObject:()=>Nd,looseRecord:()=>Pd,lowercase:()=>Er,lt:()=>jt,lte:()=>pt,mac:()=>ad,map:()=>Ud,maxLength:()=>ku,maxSize:()=>iu,meta:()=>Hd,mime:()=>Cr,minLength:()=>qt,minSize:()=>Tt,multipleOf:()=>nu,nan:()=>Vd,nanoid:()=>ed,nativeEnum:()=>Md,negative:()=>xi,never:()=>Kr,nonnegative:()=>$i,nonoptional:()=>mo,nonpositive:()=>bi,normalize:()=>xr,null:()=>Ri,nullable:()=>Ju,nullish:()=>Jd,number:()=>Ti,object:()=>Id,optional:()=>Lu,overwrite:()=>Bt,parse:()=>zl,parseAsync:()=>Nl,partialRecord:()=>Td,pipe:()=>qu,positive:()=>Ci,prefault:()=>ho,preprocess:()=>r4,prettifyError:()=>E0,promise:()=>Kd,property:()=>Bi,readonly:()=>yo,record:()=>eo,refine:()=>$o,regex:()=>pr,regexes:()=>Jt,registry:()=>ui,safeDecode:()=>Rl,safeDecodeAsync:()=>Jl,safeEncode:()=>Ml,safeEncodeAsync:()=>Ll,safeParse:()=>jl,safeParseAsync:()=>Ol,set:()=>Zd,setErrorMap:()=>sg,size:()=>Au,slugify:()=>Ar,startsWith:()=>_r,strictObject:()=>zd,string:()=>Sr,stringFormat:()=>gd,stringbool:()=>t4,success:()=>qd,superRefine:()=>Bo,symbol:()=>$d,templateLiteral:()=>Gd,toJSONSchema:()=>bl,toLowerCase:()=>$r,toUpperCase:()=>Br,transform:()=>Hr,treeifyError:()=>v0,trim:()=>br,tuple:()=>Hi,uint32:()=>wd,uint64:()=>bd,ulid:()=>rd,undefined:()=>Bd,union:()=>Xr,unknown:()=>Wt,uppercase:()=>Dr,url:()=>Xl,util:()=>xe,uuid:()=>Wl,uuidv4:()=>Gl,uuidv6:()=>Kl,uuidv7:()=>Yl,void:()=>kd,xid:()=>nd,xor:()=>jd});var t0={};Et(t0,{$ZodAny:()=>Qa,$ZodArray:()=>ns,$ZodAsyncError:()=>Zt,$ZodBase64:()=>Za,$ZodBase64URL:()=>Ra,$ZodBigInt:()=>Yn,$ZodBigIntFormat:()=>Ga,$ZodBoolean:()=>Kn,$ZodCIDRv4:()=>Pa,$ZodCIDRv6:()=>Ua,$ZodCUID:()=>$a,$ZodCUID2:()=>Ba,$ZodCatch:()=>zs,$ZodCheck:()=>Ue,$ZodCheckBigIntFormat:()=>ta,$ZodCheckEndsWith:()=>ha,$ZodCheckGreaterThan:()=>Vn,$ZodCheckIncludes:()=>da,$ZodCheckLengthEquals:()=>aa,$ZodCheckLessThan:()=>qn,$ZodCheckLowerCase:()=>ca,$ZodCheckMaxLength:()=>ia,$ZodCheckMaxSize:()=>ua,$ZodCheckMimeType:()=>va,$ZodCheckMinLength:()=>oa,$ZodCheckMinSize:()=>ra,$ZodCheckMultipleOf:()=>H0,$ZodCheckNumberFormat:()=>ea,$ZodCheckOverwrite:()=>pa,$ZodCheckProperty:()=>ga,$ZodCheckRegex:()=>sa,$ZodCheckSizeEquals:()=>na,$ZodCheckStartsWith:()=>fa,$ZodCheckStringFormat:()=>bu,$ZodCheckUpperCase:()=>la,$ZodCodec:()=>ei,$ZodCustom:()=>Rs,$ZodCustomStringFormat:()=>Va,$ZodDate:()=>us,$ZodDefault:()=>Bs,$ZodDiscriminatedUnion:()=>fs,$ZodE164:()=>La,$ZodEmail:()=>wa,$ZodEmoji:()=>xa,$ZodEncodeError:()=>tr,$ZodEnum:()=>ys,$ZodError:()=>Sn,$ZodExactOptional:()=>bs,$ZodFile:()=>ws,$ZodFunction:()=>Us,$ZodGUID:()=>ya,$ZodIPv4:()=>ja,$ZodIPv6:()=>Oa,$ZodISODate:()=>Ia,$ZodISODateTime:()=>Fa,$ZodISODuration:()=>Na,$ZodISOTime:()=>za,$ZodIntersection:()=>hs,$ZodJWT:()=>qa,$ZodKSUID:()=>Sa,$ZodLazy:()=>Ms,$ZodLiteral:()=>_s,$ZodMAC:()=>Ta,$ZodMap:()=>vs,$ZodNaN:()=>Ns,$ZodNanoID:()=>ba,$ZodNever:()=>es,$ZodNonOptional:()=>Ss,$ZodNull:()=>Xa,$ZodNullable:()=>$s,$ZodNumber:()=>Gn,$ZodNumberFormat:()=>Wa,$ZodObject:()=>as,$ZodObjectJIT:()=>ss,$ZodOptional:()=>Hn,$ZodPipe:()=>js,$ZodPrefault:()=>ks,$ZodPromise:()=>Zs,$ZodReadonly:()=>Os,$ZodRealError:()=>ct,$ZodRecord:()=>gs,$ZodRegistry:()=>ec,$ZodSet:()=>Es,$ZodString:()=>$u,$ZodStringFormat:()=>Ie,$ZodSuccess:()=>Is,$ZodSymbol:()=>Ka,$ZodTemplateLiteral:()=>Ps,$ZodTransform:()=>Cs,$ZodTuple:()=>Qn,$ZodType:()=>pe,$ZodULID:()=>Aa,$ZodURL:()=>Ca,$ZodUUID:()=>_a,$ZodUndefined:()=>Ya,$ZodUnion:()=>lr,$ZodUnknown:()=>Ha,$ZodVoid:()=>ts,$ZodXID:()=>ka,$ZodXor:()=>ds,$brand:()=>r0,$constructor:()=>N,$input:()=>Hs,$output:()=>Qs,Doc:()=>Ea,JSONSchema:()=>ig,JSONSchemaGenerator:()=>ng,NEVER:()=>u0,TimePrecision:()=>nc,_any:()=>bc,_array:()=>Ic,_base64:()=>Di,_base64url:()=>yi,_bigint:()=>Ec,_boolean:()=>vc,_catch:()=>Xm,_check:()=>Tc,_cidrv4:()=>pi,_cidrv6:()=>Ei,_coercedBigint:()=>Dc,_coercedBoolean:()=>pc,_coercedDate:()=>Sc,_coercedNumber:()=>lc,_coercedString:()=>uc,_cuid:()=>li,_cuid2:()=>di,_custom:()=>Nc,_date:()=>kc,_decode:()=>On,_decodeAsync:()=>Pn,_default:()=>Gm,_discriminatedUnion:()=>Om,_e164:()=>_i,_email:()=>ri,_emoji:()=>si,_encode:()=>jn,_encodeAsync:()=>Tn,_endsWith:()=>wr,_enum:()=>Rm,_file:()=>zc,_float32:()=>fc,_float64:()=>hc,_gt:()=>Ot,_gte:()=>st,_guid:()=>gr,_includes:()=>yr,_int:()=>dc,_int32:()=>mc,_int64:()=>yc,_intersection:()=>Tm,_ipv4:()=>gi,_ipv6:()=>vi,_isoDate:()=>oc,_isoDateTime:()=>ic,_isoDuration:()=>sc,_isoTime:()=>ac,_jwt:()=>wi,_ksuid:()=>mi,_lazy:()=>tg,_length:()=>Su,_literal:()=>Jm,_lowercase:()=>Er,_lt:()=>jt,_lte:()=>pt,_mac:()=>rc,_map:()=>Zm,_max:()=>pt,_maxLength:()=>ku,_maxSize:()=>iu,_mime:()=>Cr,_min:()=>st,_minLength:()=>qt,_minSize:()=>Tt,_multipleOf:()=>nu,_nan:()=>Fc,_nanoid:()=>ci,_nativeEnum:()=>Lm,_negative:()=>xi,_never:()=>Bc,_nonnegative:()=>$i,_nonoptional:()=>Km,_nonpositive:()=>bi,_normalize:()=>xr,_null:()=>xc,_nullable:()=>Wm,_number:()=>cc,_optional:()=>Vm,_overwrite:()=>Bt,_parse:()=>Du,_parseAsync:()=>yu,_pipe:()=>Qm,_positive:()=>Ci,_promise:()=>ug,_property:()=>Bi,_readonly:()=>Hm,_record:()=>Um,_refine:()=>jc,_regex:()=>pr,_safeDecode:()=>Zn,_safeDecodeAsync:()=>Rn,_safeEncode:()=>Un,_safeEncodeAsync:()=>Mn,_safeParse:()=>_u,_safeParseAsync:()=>wu,_set:()=>Mm,_size:()=>Au,_slugify:()=>Ar,_startsWith:()=>_r,_string:()=>tc,_stringFormat:()=>Fu,_stringbool:()=>Zc,_success:()=>Ym,_superRefine:()=>Oc,_symbol:()=>wc,_templateLiteral:()=>eg,_toLowerCase:()=>$r,_toUpperCase:()=>Br,_transform:()=>qm,_trim:()=>br,_tuple:()=>Pm,_uint32:()=>gc,_uint64:()=>_c,_ulid:()=>fi,_undefined:()=>Cc,_union:()=>Nm,_unknown:()=>$c,_uppercase:()=>Dr,_url:()=>vr,_uuid:()=>ni,_uuidv4:()=>ii,_uuidv6:()=>oi,_uuidv7:()=>ai,_void:()=>Ac,_xid:()=>hi,_xor:()=>jm,clone:()=>mt,config:()=>tt,createStandardJSONSchemaMethod:()=>Iu,createToJSONSchemaMethod:()=>Mc,decode:()=>gh,decodeAsync:()=>ph,describe:()=>Pc,encode:()=>mh,encodeAsync:()=>vh,extractDefs:()=>au,finalize:()=>su,flattenError:()=>Fn,formatError:()=>In,globalConfig:()=>ur,globalRegistry:()=>vt,initializeContext:()=>ou,isValidBase64:()=>Wn,isValidBase64URL:()=>Ma,isValidJWT:()=>Ja,locales:()=>ti,meta:()=>Uc,parse:()=>zn,parseAsync:()=>Nn,prettifyError:()=>E0,process:()=>Se,regexes:()=>Jt,registry:()=>ui,safeDecode:()=>Dh,safeDecodeAsync:()=>_h,safeEncode:()=>Eh,safeEncodeAsync:()=>yh,safeParse:()=>D0,safeParseAsync:()=>y0,toDotPath:()=>p0,toJSONSchema:()=>bl,treeifyError:()=>v0,util:()=>xe,version:()=>Da});var u0=Object.freeze({status:"aborted"});function N(e,u,r){function i(s,h){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:h,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),u(s,h);const f=o.prototype,g=Object.keys(f);for(let p=0;pr?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var r0=Symbol("zod_brand"),Zt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},tr=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},ur={};function tt(e){return e&&Object.assign(ur,e),ur}var xe={};Et(xe,{BIGINT_FORMAT_RANGES:()=>f0,Class:()=>hh,NUMBER_FORMAT_RANGES:()=>d0,aborted:()=>Lt,allowsEval:()=>a0,assert:()=>Vf,assertEqual:()=>Rf,assertIs:()=>Jf,assertNever:()=>qf,assertNotEqual:()=>Lf,assignProp:()=>Nt,base64ToUint8Array:()=>h0,base64urlToUint8Array:()=>ch,cached:()=>pu,captureStackTrace:()=>kn,cleanEnum:()=>sh,cleanRegex:()=>nr,clone:()=>mt,cloneDef:()=>Gf,createTransparentProxy:()=>eh,defineLazy:()=>_e,esc:()=>An,escapeRegex:()=>$t,extend:()=>rh,finalizeIssue:()=>gt,floatSafeRemainder:()=>n0,getElementAtPath:()=>Kf,getEnumValues:()=>Bn,getLengthableOrigin:()=>ar,getParsedType:()=>Hf,getSizableOrigin:()=>or,hexToUint8Array:()=>dh,isObject:()=>tu,isPlainObject:()=>Rt,issue:()=>sr,joinValues:()=>q,jsonStringifyReplacer:()=>rr,merge:()=>ih,mergeDefs:()=>bt,normalizeParams:()=>V,nullish:()=>Mt,numKeys:()=>Qf,objectClone:()=>Wf,omit:()=>uh,optionalKeys:()=>l0,parsedType:()=>fe,partial:()=>oh,pick:()=>th,prefixIssues:()=>Dt,primitiveTypes:()=>c0,promiseAllObject:()=>Yf,propertyKeyTypes:()=>ir,randomString:()=>Xf,required:()=>ah,safeExtend:()=>nh,shallowClone:()=>s0,slugify:()=>o0,stringifyPrimitive:()=>de,uint8ArrayToBase64:()=>m0,uint8ArrayToBase64url:()=>lh,uint8ArrayToHex:()=>fh,unwrapMessage:()=>Eu});function Rf(e){return e}function Lf(e){return e}function Jf(e){}function qf(e){throw new Error("Unexpected value in exhaustive check")}function Vf(e){}function Bn(e){const u=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>u.indexOf(+i)===-1).map(([i,t])=>t)}function q(e,u="|"){return e.map(r=>de(r)).join(u)}function rr(e,u){return typeof u=="bigint"?u.toString():u}function pu(e){return{get value(){{const u=e();return Object.defineProperty(this,"value",{value:u}),u}}}}function Mt(e){return e==null}function nr(e){const u=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(u,r)}function n0(e,u){const r=(e.toString().split(".")[1]||"").length,i=u.toString();let t=(i.split(".")[1]||"").length;if(t===0&&/\d?e-\d?/.test(i)){const h=i.match(/\d?e-(\d?)/);h?.[1]&&(t=Number.parseInt(h[1]))}const n=r>t?r:t,o=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(u.toFixed(n).replace(".",""));return o%s/10**n}var i0=Symbol("evaluating");function _e(e,u,r){let i;Object.defineProperty(e,u,{get(){if(i!==i0)return i===void 0&&(i=i0,i=r()),i},set(t){Object.defineProperty(e,u,{value:t})},configurable:!0})}function Wf(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Nt(e,u,r){Object.defineProperty(e,u,{value:r,writable:!0,enumerable:!0,configurable:!0})}function bt(...e){const u={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(u,i)}return Object.defineProperties({},u)}function Gf(e){return bt(e._zod.def)}function Kf(e,u){return u?u.reduce((r,i)=>r?.[i],e):e}function Yf(e){const u=Object.keys(e),r=u.map(i=>e[i]);return Promise.all(r).then(i=>{const t={};for(let n=0;n{};function tu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var a0=pu(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Rt(e){if(tu(e)===!1)return!1;const u=e.constructor;if(u===void 0||typeof u!="function")return!0;const r=u.prototype;return!(tu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function s0(e){return Rt(e)?{...e}:Array.isArray(e)?[...e]:e}function Qf(e){let u=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&u++;return u}var Hf=e=>{const u=typeof e;switch(u){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${u}`)}},ir=new Set(["string","number","symbol"]),c0=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mt(e,u,r){const i=new e._zod.constr(u??e._zod.def);return(!u||r?.parent)&&(i._zod.parent=e),i}function V(e){const u=e;if(!u)return{};if(typeof u=="string")return{error:()=>u};if(u?.message!==void 0){if(u?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");u.error=u.message}return delete u.message,typeof u.error=="string"?{...u,error:()=>u.error}:u}function eh(e){let u;return new Proxy({},{get(r,i,t){return u??(u=e()),Reflect.get(u,i,t)},set(r,i,t,n){return u??(u=e()),Reflect.set(u,i,t,n)},has(r,i){return u??(u=e()),Reflect.has(u,i)},deleteProperty(r,i){return u??(u=e()),Reflect.deleteProperty(u,i)},ownKeys(r){return u??(u=e()),Reflect.ownKeys(u)},getOwnPropertyDescriptor(r,i){return u??(u=e()),Reflect.getOwnPropertyDescriptor(u,i)},defineProperty(r,i,t){return u??(u=e()),Reflect.defineProperty(u,i,t)}})}function de(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function l0(e){return Object.keys(e).filter(u=>e[u]._zod.optin==="optional"&&e[u]._zod.optout==="optional")}var d0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},f0={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function th(e,u){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const n=bt(e._zod.def,{get shape(){const o={};for(const s in u){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);u[s]&&(o[s]=r.shape[s])}return Nt(this,"shape",o),o},checks:[]});return mt(e,n)}function uh(e,u){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const n=bt(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in u){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);u[s]&&delete o[s]}return Nt(this,"shape",o),o},checks:[]});return mt(e,n)}function rh(e,u){if(!Rt(u))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const o in u)if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const t=bt(e._zod.def,{get shape(){const n={...e._zod.def.shape,...u};return Nt(this,"shape",n),n}});return mt(e,t)}function nh(e,u){if(!Rt(u))throw new Error("Invalid input to safeExtend: expected a plain object");const r=bt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...u};return Nt(this,"shape",i),i}});return mt(e,r)}function ih(e,u){const r=bt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...u._zod.def.shape};return Nt(this,"shape",i),i},get catchall(){return u._zod.def.catchall},checks:[]});return mt(e,r)}function oh(e,u,r){const t=u._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=bt(u._zod.def,{get shape(){const s=u._zod.def.shape,h={...s};if(r)for(const f in r){if(!(f in s))throw new Error(`Unrecognized key: "${f}"`);r[f]&&(h[f]=e?new e({type:"optional",innerType:s[f]}):s[f])}else for(const f in s)h[f]=e?new e({type:"optional",innerType:s[f]}):s[f];return Nt(this,"shape",h),h},checks:[]});return mt(u,o)}function ah(e,u,r){const i=bt(u._zod.def,{get shape(){const t=u._zod.def.shape,n={...t};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new e({type:"nonoptional",innerType:t[o]}))}else for(const o in t)n[o]=new e({type:"nonoptional",innerType:t[o]});return Nt(this,"shape",n),n}});return mt(u,i)}function Lt(e,u=0){if(e.aborted===!0)return!0;for(let r=u;r{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Eu(e){return typeof e=="string"?e:e?.message}function gt(e,u,r){const i={...e,path:e.path??[]};if(!e.message){const t=Eu(e.inst?._zod.def?.error?.(e))??Eu(u?.error?.(e))??Eu(r.customError?.(e))??Eu(r.localeError?.(e))??"Invalid input";i.message=t}return delete i.inst,delete i.continue,u?.reportInput||delete i.input,i}function or(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ar(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function fe(e){const u=typeof e;switch(u){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return u}function sr(...e){const[u,r,i]=e;return typeof u=="string"?{message:u,code:"custom",input:r,inst:i}:{...u}}function sh(e){return Object.entries(e).filter(([u,r])=>Number.isNaN(Number.parseInt(u,10))).map(u=>u[1])}function h0(e){const u=atob(e),r=new Uint8Array(u.length);for(let i=0;iu.toString(16).padStart(2,"0")).join("")}var hh=class{constructor(...e){}},g0=(e,u)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:u,enumerable:!1}),e.message=JSON.stringify(u,rr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Sn=N("$ZodError",g0),ct=N("$ZodError",g0,{Parent:Error});function Fn(e,u=r=>r.message){const r={},i=[];for(const t of e.issues)t.path.length>0?(r[t.path[0]]=r[t.path[0]]||[],r[t.path[0]].push(u(t))):i.push(u(t));return{formErrors:i,fieldErrors:r}}function In(e,u=r=>r.message){const r={_errors:[]},i=t=>{for(const n of t.issues)if(n.code==="invalid_union"&&n.errors.length)n.errors.map(o=>i({issues:o}));else if(n.code==="invalid_key")i({issues:n.issues});else if(n.code==="invalid_element")i({issues:n.issues});else if(n.path.length===0)r._errors.push(u(n));else{let o=r,s=0;for(;sr.message){const r={errors:[]},i=(t,n=[])=>{var o,s;for(const h of t.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map(f=>i({issues:f},h.path));else if(h.code==="invalid_key")i({issues:h.issues},h.path);else if(h.code==="invalid_element")i({issues:h.issues},h.path);else{const f=[...n,...h.path];if(f.length===0){r.errors.push(u(h));continue}let g=r,p=0;for(;ptypeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?u.push(`[${i}]`):typeof i=="symbol"?u.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?u.push(`[${JSON.stringify(i)}]`):(u.length&&u.push("."),u.push(i));return u.join("")}function E0(e){const u=[],r=[...e.issues].sort((i,t)=>(i.path??[]).length-(t.path??[]).length);for(const i of r)u.push(`✖ ${i.message}`),i.path?.length&&u.push(` → at ${p0(i.path)}`);return u.join(` -`)}var Du=e=>(u,r,i,t)=>{const n=i?Object.assign(i,{async:!1}):{async:!1},o=u._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Zt;if(o.issues.length){const s=new(t?.Err??e)(o.issues.map(h=>gt(h,n,tt())));throw kn(s,t?.callee),s}return o.value},zn=Du(ct),yu=e=>async(u,r,i,t)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=u._zod.run({value:r,issues:[]},n);if(o instanceof Promise&&(o=await o),o.issues.length){const s=new(t?.Err??e)(o.issues.map(h=>gt(h,n,tt())));throw kn(s,t?.callee),s}return o.value},Nn=yu(ct),_u=e=>(u,r,i)=>{const t=i?{...i,async:!1}:{async:!1},n=u._zod.run({value:r,issues:[]},t);if(n instanceof Promise)throw new Zt;return n.issues.length?{success:!1,error:new(e??Sn)(n.issues.map(o=>gt(o,t,tt())))}:{success:!0,data:n.value}},D0=_u(ct),wu=e=>async(u,r,i)=>{const t=i?Object.assign(i,{async:!0}):{async:!0};let n=u._zod.run({value:r,issues:[]},t);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(o=>gt(o,t,tt())))}:{success:!0,data:n.value}},y0=wu(ct),jn=e=>(u,r,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Du(e)(u,r,t)},mh=jn(ct),On=e=>(u,r,i)=>Du(e)(u,r,i),gh=On(ct),Tn=e=>async(u,r,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return yu(e)(u,r,t)},vh=Tn(ct),Pn=e=>async(u,r,i)=>yu(e)(u,r,i),ph=Pn(ct),Un=e=>(u,r,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _u(e)(u,r,t)},Eh=Un(ct),Zn=e=>(u,r,i)=>_u(e)(u,r,i),Dh=Zn(ct),Mn=e=>async(u,r,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return wu(e)(u,r,t)},yh=Mn(ct),Rn=e=>async(u,r,i)=>wu(e)(u,r,i),_h=Rn(ct),Jt={};Et(Jt,{base64:()=>T0,base64url:()=>Ln,bigint:()=>q0,boolean:()=>W0,browserEmail:()=>kh,cidrv4:()=>j0,cidrv6:()=>O0,cuid:()=>_0,cuid2:()=>w0,date:()=>Z0,datetime:()=>L0,domain:()=>Ih,duration:()=>B0,e164:()=>P0,email:()=>k0,emoji:()=>F0,extendedDuration:()=>wh,guid:()=>A0,hex:()=>zh,hostname:()=>Fh,html5Email:()=>$h,idnEmail:()=>Ah,integer:()=>V0,ipv4:()=>I0,ipv6:()=>z0,ksuid:()=>b0,lowercase:()=>Y0,mac:()=>N0,md5_base64:()=>jh,md5_base64url:()=>Oh,md5_hex:()=>Nh,nanoid:()=>$0,null:()=>G0,number:()=>Jn,rfc5322Email:()=>Bh,sha1_base64:()=>Ph,sha1_base64url:()=>Uh,sha1_hex:()=>Th,sha256_base64:()=>Mh,sha256_base64url:()=>Rh,sha256_hex:()=>Zh,sha384_base64:()=>Jh,sha384_base64url:()=>qh,sha384_hex:()=>Lh,sha512_base64:()=>Wh,sha512_base64url:()=>Gh,sha512_hex:()=>Vh,string:()=>J0,time:()=>R0,ulid:()=>C0,undefined:()=>K0,unicodeEmail:()=>S0,uppercase:()=>X0,uuid:()=>uu,uuid4:()=>Ch,uuid6:()=>xh,uuid7:()=>bh,xid:()=>x0});var _0=/^[cC][^\s-]{8,}$/,w0=/^[0-9a-z]+$/,C0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,x0=/^[0-9a-vA-V]{20}$/,b0=/^[A-Za-z0-9]{27}$/,$0=/^[a-zA-Z0-9_-]{21}$/,B0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,wh=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,A0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,uu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ch=uu(4),xh=uu(6),bh=uu(7),k0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$h=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Bh=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,S0=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Ah=S0,kh=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Sh="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function F0(){return new RegExp(Sh,"u")}var I0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,N0=e=>{const u=$t(e??":");return new RegExp(`^(?:[0-9A-F]{2}${u}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${u}){5}[0-9a-f]{2}$`)},j0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,O0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,T0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ln=/^[A-Za-z0-9_-]*$/,Fh=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Ih=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,P0=/^\+[1-9]\d{6,14}$/,U0="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Z0=new RegExp(`^${U0}$`);function M0(e){const u="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${u}`:e.precision===0?`${u}:[0-5]\\d`:`${u}:[0-5]\\d\\.\\d{${e.precision}}`:`${u}(?::[0-5]\\d(?:\\.\\d+)?)?`}function R0(e){return new RegExp(`^${M0(e)}$`)}function L0(e){const u=M0({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${u}(?:${r.join("|")})`;return new RegExp(`^${U0}T(?:${i})$`)}var J0=e=>{const u=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${u}$`)},q0=/^-?\d+n?$/,V0=/^-?\d+$/,Jn=/^-?\d+(?:\.\d+)?$/,W0=/^(?:true|false)$/i,G0=/^null$/i,K0=/^undefined$/i,Y0=/^[^A-Z]*$/,X0=/^[^a-z]*$/,zh=/^[0-9a-fA-F]*$/;function Cu(e,u){return new RegExp(`^[A-Za-z0-9+/]{${e}}${u}$`)}function xu(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Nh=/^[0-9a-fA-F]{32}$/,jh=Cu(22,"=="),Oh=xu(22),Th=/^[0-9a-fA-F]{40}$/,Ph=Cu(27,"="),Uh=xu(27),Zh=/^[0-9a-fA-F]{64}$/,Mh=Cu(43,"="),Rh=xu(43),Lh=/^[0-9a-fA-F]{96}$/,Jh=Cu(64,""),qh=xu(64),Vh=/^[0-9a-fA-F]{128}$/,Wh=Cu(86,"=="),Gh=xu(86),Ue=N("$ZodCheck",(e,u)=>{var r;e._zod??(e._zod={}),e._zod.def=u,(r=e._zod).onattach??(r.onattach=[])}),Q0={number:"number",bigint:"bigint",object:"date"},qn=N("$ZodCheckLessThan",(e,u)=>{Ue.init(e,u);const r=Q0[typeof u.value];e._zod.onattach.push(i=>{const t=i._zod.bag,n=(u.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;u.value{(u.inclusive?i.value<=u.value:i.value{Ue.init(e,u);const r=Q0[typeof u.value];e._zod.onattach.push(i=>{const t=i._zod.bag,n=(u.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;u.value>n&&(u.inclusive?t.minimum=u.value:t.exclusiveMinimum=u.value)}),e._zod.check=i=>{(u.inclusive?i.value>=u.value:i.value>u.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof u.value=="object"?u.value.getTime():u.value,input:i.value,inclusive:u.inclusive,inst:e,continue:!u.abort})}}),H0=N("$ZodCheckMultipleOf",(e,u)=>{Ue.init(e,u),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=u.value)}),e._zod.check=r=>{if(typeof r.value!=typeof u.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%u.value===BigInt(0):n0(r.value,u.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:u.value,input:r.value,inst:e,continue:!u.abort})}}),ea=N("$ZodCheckNumberFormat",(e,u)=>{Ue.init(e,u),u.format=u.format||"float64";const r=u.format?.includes("int"),i=r?"int":"number",[t,n]=d0[u.format];e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=u.format,s.minimum=t,s.maximum=n,r&&(s.pattern=V0)}),e._zod.check=o=>{const s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:i,format:u.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!u.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!u.abort});return}}sn&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!u.abort})}}),ta=N("$ZodCheckBigIntFormat",(e,u)=>{Ue.init(e,u);const[r,i]=f0[u.format];e._zod.onattach.push(t=>{const n=t._zod.bag;n.format=u.format,n.minimum=r,n.maximum=i}),e._zod.check=t=>{const n=t.value;ni&&t.issues.push({origin:"bigint",input:n,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!u.abort})}}),ua=N("$ZodCheckMaxSize",(e,u)=>{var r;Ue.init(e,u),(r=e._zod.def).when??(r.when=i=>{const t=i.value;return!Mt(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;u.maximum{const t=i.value;t.size<=u.maximum||i.issues.push({origin:or(t),code:"too_big",maximum:u.maximum,inclusive:!0,input:t,inst:e,continue:!u.abort})}}),ra=N("$ZodCheckMinSize",(e,u)=>{var r;Ue.init(e,u),(r=e._zod.def).when??(r.when=i=>{const t=i.value;return!Mt(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;u.minimum>t&&(i._zod.bag.minimum=u.minimum)}),e._zod.check=i=>{const t=i.value;t.size>=u.minimum||i.issues.push({origin:or(t),code:"too_small",minimum:u.minimum,inclusive:!0,input:t,inst:e,continue:!u.abort})}}),na=N("$ZodCheckSizeEquals",(e,u)=>{var r;Ue.init(e,u),(r=e._zod.def).when??(r.when=i=>{const t=i.value;return!Mt(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag;t.minimum=u.size,t.maximum=u.size,t.size=u.size}),e._zod.check=i=>{const t=i.value,n=t.size;if(n===u.size)return;const o=n>u.size;i.issues.push({origin:or(t),...o?{code:"too_big",maximum:u.size}:{code:"too_small",minimum:u.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!u.abort})}}),ia=N("$ZodCheckMaxLength",(e,u)=>{var r;Ue.init(e,u),(r=e._zod.def).when??(r.when=i=>{const t=i.value;return!Mt(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;u.maximum{const t=i.value;if(t.length<=u.maximum)return;const o=ar(t);i.issues.push({origin:o,code:"too_big",maximum:u.maximum,inclusive:!0,input:t,inst:e,continue:!u.abort})}}),oa=N("$ZodCheckMinLength",(e,u)=>{var r;Ue.init(e,u),(r=e._zod.def).when??(r.when=i=>{const t=i.value;return!Mt(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;u.minimum>t&&(i._zod.bag.minimum=u.minimum)}),e._zod.check=i=>{const t=i.value;if(t.length>=u.minimum)return;const o=ar(t);i.issues.push({origin:o,code:"too_small",minimum:u.minimum,inclusive:!0,input:t,inst:e,continue:!u.abort})}}),aa=N("$ZodCheckLengthEquals",(e,u)=>{var r;Ue.init(e,u),(r=e._zod.def).when??(r.when=i=>{const t=i.value;return!Mt(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag;t.minimum=u.length,t.maximum=u.length,t.length=u.length}),e._zod.check=i=>{const t=i.value,n=t.length;if(n===u.length)return;const o=ar(t),s=n>u.length;i.issues.push({origin:o,...s?{code:"too_big",maximum:u.length}:{code:"too_small",minimum:u.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!u.abort})}}),bu=N("$ZodCheckStringFormat",(e,u)=>{var r,i;Ue.init(e,u),e._zod.onattach.push(t=>{const n=t._zod.bag;n.format=u.format,u.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(u.pattern))}),u.pattern?(r=e._zod).check??(r.check=t=>{u.pattern.lastIndex=0,!u.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:u.format,input:t.value,...u.pattern?{pattern:u.pattern.toString()}:{},inst:e,continue:!u.abort})}):(i=e._zod).check??(i.check=()=>{})}),sa=N("$ZodCheckRegex",(e,u)=>{bu.init(e,u),e._zod.check=r=>{u.pattern.lastIndex=0,!u.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:u.pattern.toString(),inst:e,continue:!u.abort})}}),ca=N("$ZodCheckLowerCase",(e,u)=>{u.pattern??(u.pattern=Y0),bu.init(e,u)}),la=N("$ZodCheckUpperCase",(e,u)=>{u.pattern??(u.pattern=X0),bu.init(e,u)}),da=N("$ZodCheckIncludes",(e,u)=>{Ue.init(e,u);const r=$t(u.includes),i=new RegExp(typeof u.position=="number"?`^.{${u.position}}${r}`:r);u.pattern=i,e._zod.onattach.push(t=>{const n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(i)}),e._zod.check=t=>{t.value.includes(u.includes,u.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:u.includes,input:t.value,inst:e,continue:!u.abort})}}),fa=N("$ZodCheckStartsWith",(e,u)=>{Ue.init(e,u);const r=new RegExp(`^${$t(u.prefix)}.*`);u.pattern??(u.pattern=r),e._zod.onattach.push(i=>{const t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(u.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:u.prefix,input:i.value,inst:e,continue:!u.abort})}}),ha=N("$ZodCheckEndsWith",(e,u)=>{Ue.init(e,u);const r=new RegExp(`.*${$t(u.suffix)}$`);u.pattern??(u.pattern=r),e._zod.onattach.push(i=>{const t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(u.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:u.suffix,input:i.value,inst:e,continue:!u.abort})}});function ma(e,u,r){e.issues.length&&u.issues.push(...Dt(r,e.issues))}var ga=N("$ZodCheckProperty",(e,u)=>{Ue.init(e,u),e._zod.check=r=>{const i=u.schema._zod.run({value:r.value[u.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>ma(t,r,u.property));ma(i,r,u.property)}}),va=N("$ZodCheckMimeType",(e,u)=>{Ue.init(e,u);const r=new Set(u.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=u.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:u.mime,input:i.value.type,inst:e,continue:!u.abort})}}),pa=N("$ZodCheckOverwrite",(e,u)=>{Ue.init(e,u),e._zod.check=r=>{r.value=u.tx(r.value)}}),Ea=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(` -`).filter(n=>n),i=Math.min(...r.map(n=>n.length-n.trimStart().length)),t=r.map(n=>n.slice(i)).map(n=>" ".repeat(this.indent*2)+n);for(const n of t)this.content.push(n)}compile(){const e=Function,u=this?.args,i=[...(this?.content??[""]).map(t=>` ${t}`)];return new e(...u,i.join(` -`))}},Da={major:4,minor:3,patch:6},pe=N("$ZodType",(e,u)=>{var r;e??(e={}),e._zod.def=u,e._zod.bag=e._zod.bag||{},e._zod.version=Da;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(o,s,h)=>{let f=Lt(o),g;for(const p of s){if(p._zod.def.when){if(!p._zod.def.when(o))continue}else if(f)continue;const E=o.issues.length,_=p._zod.check(o);if(_ instanceof Promise&&h?.async===!1)throw new Zt;if(g||_ instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await _,o.issues.length!==E&&(f||(f=Lt(o,E)))});else{if(o.issues.length===E)continue;f||(f=Lt(o,E))}}return g?g.then(()=>o):o},n=(o,s,h)=>{if(Lt(o))return o.aborted=!0,o;const f=t(s,i,h);if(f instanceof Promise){if(h.async===!1)throw new Zt;return f.then(g=>e._zod.parse(g,h))}return e._zod.parse(f,h)};e._zod.run=(o,s)=>{if(s.skipChecks)return e._zod.parse(o,s);if(s.direction==="backward"){const f=e._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return f instanceof Promise?f.then(g=>n(g,o,s)):n(f,o,s)}const h=e._zod.parse(o,s);if(h instanceof Promise){if(s.async===!1)throw new Zt;return h.then(f=>t(f,i,s))}return t(h,i,s)}}_e(e,"~standard",()=>({validate:t=>{try{const n=D0(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return y0(e,t).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),$u=N("$ZodString",(e,u)=>{pe.init(e,u),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??J0(e._zod.bag),e._zod.parse=(r,i)=>{if(u.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ie=N("$ZodStringFormat",(e,u)=>{bu.init(e,u),$u.init(e,u)}),ya=N("$ZodGUID",(e,u)=>{u.pattern??(u.pattern=A0),Ie.init(e,u)}),_a=N("$ZodUUID",(e,u)=>{if(u.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[u.version];if(i===void 0)throw new Error(`Invalid UUID version: "${u.version}"`);u.pattern??(u.pattern=uu(i))}else u.pattern??(u.pattern=uu());Ie.init(e,u)}),wa=N("$ZodEmail",(e,u)=>{u.pattern??(u.pattern=k0),Ie.init(e,u)}),Ca=N("$ZodURL",(e,u)=>{Ie.init(e,u),e._zod.check=r=>{try{const i=r.value.trim(),t=new URL(i);u.hostname&&(u.hostname.lastIndex=0,u.hostname.test(t.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:u.hostname.source,input:r.value,inst:e,continue:!u.abort})),u.protocol&&(u.protocol.lastIndex=0,u.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:u.protocol.source,input:r.value,inst:e,continue:!u.abort})),u.normalize?r.value=t.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!u.abort})}}}),xa=N("$ZodEmoji",(e,u)=>{u.pattern??(u.pattern=F0()),Ie.init(e,u)}),ba=N("$ZodNanoID",(e,u)=>{u.pattern??(u.pattern=$0),Ie.init(e,u)}),$a=N("$ZodCUID",(e,u)=>{u.pattern??(u.pattern=_0),Ie.init(e,u)}),Ba=N("$ZodCUID2",(e,u)=>{u.pattern??(u.pattern=w0),Ie.init(e,u)}),Aa=N("$ZodULID",(e,u)=>{u.pattern??(u.pattern=C0),Ie.init(e,u)}),ka=N("$ZodXID",(e,u)=>{u.pattern??(u.pattern=x0),Ie.init(e,u)}),Sa=N("$ZodKSUID",(e,u)=>{u.pattern??(u.pattern=b0),Ie.init(e,u)}),Fa=N("$ZodISODateTime",(e,u)=>{u.pattern??(u.pattern=L0(u)),Ie.init(e,u)}),Ia=N("$ZodISODate",(e,u)=>{u.pattern??(u.pattern=Z0),Ie.init(e,u)}),za=N("$ZodISOTime",(e,u)=>{u.pattern??(u.pattern=R0(u)),Ie.init(e,u)}),Na=N("$ZodISODuration",(e,u)=>{u.pattern??(u.pattern=B0),Ie.init(e,u)}),ja=N("$ZodIPv4",(e,u)=>{u.pattern??(u.pattern=I0),Ie.init(e,u),e._zod.bag.format="ipv4"}),Oa=N("$ZodIPv6",(e,u)=>{u.pattern??(u.pattern=z0),Ie.init(e,u),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!u.abort})}}}),Ta=N("$ZodMAC",(e,u)=>{u.pattern??(u.pattern=N0(u.delimiter)),Ie.init(e,u),e._zod.bag.format="mac"}),Pa=N("$ZodCIDRv4",(e,u)=>{u.pattern??(u.pattern=j0),Ie.init(e,u)}),Ua=N("$ZodCIDRv6",(e,u)=>{u.pattern??(u.pattern=O0),Ie.init(e,u),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[t,n]=i;if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${t}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!u.abort})}}});function Wn(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Za=N("$ZodBase64",(e,u)=>{u.pattern??(u.pattern=T0),Ie.init(e,u),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Wn(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!u.abort})}});function Ma(e){if(!Ln.test(e))return!1;const u=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=u.padEnd(Math.ceil(u.length/4)*4,"=");return Wn(r)}var Ra=N("$ZodBase64URL",(e,u)=>{u.pattern??(u.pattern=Ln),Ie.init(e,u),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Ma(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!u.abort})}}),La=N("$ZodE164",(e,u)=>{u.pattern??(u.pattern=P0),Ie.init(e,u)});function Ja(e,u=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const t=JSON.parse(atob(i));return!("typ"in t&&t?.typ!=="JWT"||!t.alg||u&&(!("alg"in t)||t.alg!==u))}catch{return!1}}var qa=N("$ZodJWT",(e,u)=>{Ie.init(e,u),e._zod.check=r=>{Ja(r.value,u.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!u.abort})}}),Va=N("$ZodCustomStringFormat",(e,u)=>{Ie.init(e,u),e._zod.check=r=>{u.fn(r.value)||r.issues.push({code:"invalid_format",format:u.format,input:r.value,inst:e,continue:!u.abort})}}),Gn=N("$ZodNumber",(e,u)=>{pe.init(e,u),e._zod.pattern=e._zod.bag.pattern??Jn,e._zod.parse=(r,i)=>{if(u.coerce)try{r.value=Number(r.value)}catch{}const t=r.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return r;const n=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...n?{received:n}:{}}),r}}),Wa=N("$ZodNumberFormat",(e,u)=>{ea.init(e,u),Gn.init(e,u)}),Kn=N("$ZodBoolean",(e,u)=>{pe.init(e,u),e._zod.pattern=W0,e._zod.parse=(r,i)=>{if(u.coerce)try{r.value=!!r.value}catch{}const t=r.value;return typeof t=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),r}}),Yn=N("$ZodBigInt",(e,u)=>{pe.init(e,u),e._zod.pattern=q0,e._zod.parse=(r,i)=>{if(u.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Ga=N("$ZodBigIntFormat",(e,u)=>{ta.init(e,u),Yn.init(e,u)}),Ka=N("$ZodSymbol",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value;return typeof t=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),r}}),Ya=N("$ZodUndefined",(e,u)=>{pe.init(e,u),e._zod.pattern=K0,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const t=r.value;return typeof t>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),r}}),Xa=N("$ZodNull",(e,u)=>{pe.init(e,u),e._zod.pattern=G0,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const t=r.value;return t===null||r.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),r}}),Qa=N("$ZodAny",(e,u)=>{pe.init(e,u),e._zod.parse=r=>r}),Ha=N("$ZodUnknown",(e,u)=>{pe.init(e,u),e._zod.parse=r=>r}),es=N("$ZodNever",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),ts=N("$ZodVoid",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value;return typeof t>"u"||r.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),r}}),us=N("$ZodDate",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{if(u.coerce)try{r.value=new Date(r.value)}catch{}const t=r.value,n=t instanceof Date;return n&&!Number.isNaN(t.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:t,...n?{received:"Invalid Date"}:{},inst:e}),r}});function rs(e,u,r){e.issues.length&&u.issues.push(...Dt(r,e.issues)),u.value[r]=e.value}var ns=N("$ZodArray",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value;if(!Array.isArray(t))return r.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),r;r.value=Array(t.length);const n=[];for(let o=0;ors(f,r,o))):rs(h,r,o)}return n.length?Promise.all(n).then(()=>r):r}});function cr(e,u,r,i,t){if(e.issues.length){if(t&&!(r in i))return;u.issues.push(...Dt(r,e.issues))}e.value===void 0?r in i&&(u.value[r]=void 0):u.value[r]=e.value}function is(e){const u=Object.keys(e.shape);for(const i of u)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=l0(e.shape);return{...e,keys:u,keySet:new Set(u),numKeys:u.length,optionalKeys:new Set(r)}}function os(e,u,r,i,t,n){const o=[],s=t.keySet,h=t.catchall._zod,f=h.def.type,g=h.optout==="optional";for(const p in u){if(s.has(p))continue;if(f==="never"){o.push(p);continue}const E=h.run({value:u[p],issues:[]},i);E instanceof Promise?e.push(E.then(_=>cr(_,r,p,u,g))):cr(E,r,p,u,g)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:u,inst:n}),e.length?Promise.all(e).then(()=>r):r}var as=N("$ZodObject",(e,u)=>{if(pe.init(e,u),!Object.getOwnPropertyDescriptor(u,"shape")?.get){const s=u.shape;Object.defineProperty(u,"shape",{get:()=>{const h={...s};return Object.defineProperty(u,"shape",{value:h}),h}})}const i=pu(()=>is(u));_e(e._zod,"propValues",()=>{const s=u.shape,h={};for(const f in s){const g=s[f]._zod;if(g.values){h[f]??(h[f]=new Set);for(const p of g.values)h[f].add(p)}}return h});const t=tu,n=u.catchall;let o;e._zod.parse=(s,h)=>{o??(o=i.value);const f=s.value;if(!t(f))return s.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),s;s.value={};const g=[],p=o.shape;for(const E of o.keys){const _=p[E],x=_._zod.optout==="optional",$=_._zod.run({value:f[E],issues:[]},h);$ instanceof Promise?g.push($.then(A=>cr(A,s,E,f,x))):cr($,s,E,f,x)}return n?os(g,f,s,h,i.value,e):g.length?Promise.all(g).then(()=>s):s}}),ss=N("$ZodObjectJIT",(e,u)=>{as.init(e,u);const r=e._zod.parse,i=pu(()=>is(u)),t=E=>{const _=new Ea(["shape","payload","ctx"]),x=i.value,$=R=>{const U=An(R);return`shape[${U}]._zod.run({ value: input[${U}], issues: [] }, ctx)`};_.write("const input = payload.value;");const A=Object.create(null);let F=0;for(const R of x.keys)A[R]=`key_${F++}`;_.write("const newResult = {};");for(const R of x.keys){const U=A[R],Y=An(R),K=E[R]?._zod?.optout==="optional";_.write(`const ${U} = ${$(R)};`),K?_.write(` - if (${U}.issues.length) { - if (${Y} in input) { - payload.issues = payload.issues.concat(${U}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${Y}, ...iss.path] : [${Y}] - }))); - } - } - - if (${U}.value === undefined) { - if (${Y} in input) { - newResult[${Y}] = undefined; - } - } else { - newResult[${Y}] = ${U}.value; - } - - `):_.write(` - if (${U}.issues.length) { - payload.issues = payload.issues.concat(${U}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${Y}, ...iss.path] : [${Y}] - }))); - } - - if (${U}.value === undefined) { - if (${Y} in input) { - newResult[${Y}] = undefined; - } - } else { - newResult[${Y}] = ${U}.value; - } - - `)}_.write("payload.value = newResult;"),_.write("return payload;");const I=_.compile();return(R,U)=>I(E,R,U)};let n;const o=tu,s=!ur.jitless,f=s&&a0.value,g=u.catchall;let p;e._zod.parse=(E,_)=>{p??(p=i.value);const x=E.value;return o(x)?s&&f&&_?.async===!1&&_.jitless!==!0?(n||(n=t(u.shape)),E=n(E,_),g?os([],x,E,_,p,e):E):r(E,_):(E.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),E)}});function cs(e,u,r,i){for(const n of e)if(n.issues.length===0)return u.value=n.value,u;const t=e.filter(n=>!Lt(n));return t.length===1?(u.value=t[0].value,t[0]):(u.issues.push({code:"invalid_union",input:u.value,inst:r,errors:e.map(n=>n.issues.map(o=>gt(o,i,tt())))}),u)}var lr=N("$ZodUnion",(e,u)=>{pe.init(e,u),_e(e._zod,"optin",()=>u.options.some(t=>t._zod.optin==="optional")?"optional":void 0),_e(e._zod,"optout",()=>u.options.some(t=>t._zod.optout==="optional")?"optional":void 0),_e(e._zod,"values",()=>{if(u.options.every(t=>t._zod.values))return new Set(u.options.flatMap(t=>Array.from(t._zod.values)))}),_e(e._zod,"pattern",()=>{if(u.options.every(t=>t._zod.pattern)){const t=u.options.map(n=>n._zod.pattern);return new RegExp(`^(${t.map(n=>nr(n.source)).join("|")})$`)}});const r=u.options.length===1,i=u.options[0]._zod.run;e._zod.parse=(t,n)=>{if(r)return i(t,n);let o=!1;const s=[];for(const h of u.options){const f=h._zod.run({value:t.value,issues:[]},n);if(f instanceof Promise)s.push(f),o=!0;else{if(f.issues.length===0)return f;s.push(f)}}return o?Promise.all(s).then(h=>cs(h,t,e,n)):cs(s,t,e,n)}});function ls(e,u,r,i){const t=e.filter(n=>n.issues.length===0);return t.length===1?(u.value=t[0].value,u):(t.length===0?u.issues.push({code:"invalid_union",input:u.value,inst:r,errors:e.map(n=>n.issues.map(o=>gt(o,i,tt())))}):u.issues.push({code:"invalid_union",input:u.value,inst:r,errors:[],inclusive:!1}),u)}var ds=N("$ZodXor",(e,u)=>{lr.init(e,u),u.inclusive=!1;const r=u.options.length===1,i=u.options[0]._zod.run;e._zod.parse=(t,n)=>{if(r)return i(t,n);let o=!1;const s=[];for(const h of u.options){const f=h._zod.run({value:t.value,issues:[]},n);f instanceof Promise?(s.push(f),o=!0):s.push(f)}return o?Promise.all(s).then(h=>ls(h,t,e,n)):ls(s,t,e,n)}}),fs=N("$ZodDiscriminatedUnion",(e,u)=>{u.inclusive=!1,lr.init(e,u);const r=e._zod.parse;_e(e._zod,"propValues",()=>{const t={};for(const n of u.options){const o=n._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${u.options.indexOf(n)}"`);for(const[s,h]of Object.entries(o)){t[s]||(t[s]=new Set);for(const f of h)t[s].add(f)}}return t});const i=pu(()=>{const t=u.options,n=new Map;for(const o of t){const s=o._zod.propValues?.[u.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${u.options.indexOf(o)}"`);for(const h of s){if(n.has(h))throw new Error(`Duplicate discriminator value "${String(h)}"`);n.set(h,o)}}return n});e._zod.parse=(t,n)=>{const o=t.value;if(!tu(o))return t.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),t;const s=i.value.get(o?.[u.discriminator]);return s?s._zod.run(t,n):u.unionFallback?r(t,n):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:u.discriminator,input:o,path:[u.discriminator],inst:e}),t)}}),hs=N("$ZodIntersection",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value,n=u.left._zod.run({value:t,issues:[]},i),o=u.right._zod.run({value:t,issues:[]},i);return n instanceof Promise||o instanceof Promise?Promise.all([n,o]).then(([h,f])=>ms(r,h,f)):ms(r,n,o)}});function Xn(e,u){if(e===u)return{valid:!0,data:e};if(e instanceof Date&&u instanceof Date&&+e==+u)return{valid:!0,data:e};if(Rt(e)&&Rt(u)){const r=Object.keys(u),i=Object.keys(e).filter(n=>r.indexOf(n)!==-1),t={...e,...u};for(const n of i){const o=Xn(e[n],u[n]);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};t[n]=o.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(u)){if(e.length!==u.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;is.l&&s.r).map(([s])=>s);if(n.length&&t&&e.issues.push({...t,keys:n}),Lt(e))return e;const o=Xn(u.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Qn=N("$ZodTuple",(e,u)=>{pe.init(e,u);const r=u.items;e._zod.parse=(i,t)=>{const n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const o=[],s=[...r].reverse().findIndex(g=>g._zod.optin!=="optional"),h=s===-1?0:r.length-s;if(!u.rest){const g=n.length>r.length,p=n.length=n.length&&f>=h)continue;const p=g._zod.run({value:n[f],issues:[]},t);p instanceof Promise?o.push(p.then(E=>dr(E,i,f))):dr(p,i,f)}if(u.rest){const g=n.slice(r.length);for(const p of g){f++;const E=u.rest._zod.run({value:p,issues:[]},t);E instanceof Promise?o.push(E.then(_=>dr(_,i,f))):dr(E,i,f)}}return o.length?Promise.all(o).then(()=>i):i}});function dr(e,u,r){e.issues.length&&u.issues.push(...Dt(r,e.issues)),u.value[r]=e.value}var gs=N("$ZodRecord",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value;if(!Rt(t))return r.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),r;const n=[],o=u.keyType._zod.values;if(o){r.value={};const s=new Set;for(const f of o)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){s.add(typeof f=="number"?f.toString():f);const g=u.valueType._zod.run({value:t[f],issues:[]},i);g instanceof Promise?n.push(g.then(p=>{p.issues.length&&r.issues.push(...Dt(f,p.issues)),r.value[f]=p.value})):(g.issues.length&&r.issues.push(...Dt(f,g.issues)),r.value[f]=g.value)}let h;for(const f in t)s.has(f)||(h=h??[],h.push(f));h&&h.length>0&&r.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:h})}else{r.value={};for(const s of Reflect.ownKeys(t)){if(s==="__proto__")continue;let h=u.keyType._zod.run({value:s,issues:[]},i);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Jn.test(s)&&h.issues.length){const p=u.keyType._zod.run({value:Number(s),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(h=p)}if(h.issues.length){u.mode==="loose"?r.value[s]=t[s]:r.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(p=>gt(p,i,tt())),input:s,path:[s],inst:e});continue}const g=u.valueType._zod.run({value:t[s],issues:[]},i);g instanceof Promise?n.push(g.then(p=>{p.issues.length&&r.issues.push(...Dt(s,p.issues)),r.value[h.value]=p.value})):(g.issues.length&&r.issues.push(...Dt(s,g.issues)),r.value[h.value]=g.value)}}return n.length?Promise.all(n).then(()=>r):r}}),vs=N("$ZodMap",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value;if(!(t instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),r;const n=[];r.value=new Map;for(const[o,s]of t){const h=u.keyType._zod.run({value:o,issues:[]},i),f=u.valueType._zod.run({value:s,issues:[]},i);h instanceof Promise||f instanceof Promise?n.push(Promise.all([h,f]).then(([g,p])=>{ps(g,p,r,o,t,e,i)})):ps(h,f,r,o,t,e,i)}return n.length?Promise.all(n).then(()=>r):r}});function ps(e,u,r,i,t,n,o){e.issues.length&&(ir.has(typeof i)?r.issues.push(...Dt(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:t,inst:n,issues:e.issues.map(s=>gt(s,o,tt()))})),u.issues.length&&(ir.has(typeof i)?r.issues.push(...Dt(i,u.issues)):r.issues.push({origin:"map",code:"invalid_element",input:t,inst:n,key:i,issues:u.issues.map(s=>gt(s,o,tt()))})),r.value.set(e.value,u.value)}var Es=N("$ZodSet",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value;if(!(t instanceof Set))return r.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),r;const n=[];r.value=new Set;for(const o of t){const s=u.valueType._zod.run({value:o,issues:[]},i);s instanceof Promise?n.push(s.then(h=>Ds(h,r))):Ds(s,r)}return n.length?Promise.all(n).then(()=>r):r}});function Ds(e,u){e.issues.length&&u.issues.push(...e.issues),u.value.add(e.value)}var ys=N("$ZodEnum",(e,u)=>{pe.init(e,u);const r=Bn(u.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(t=>ir.has(typeof t)).map(t=>typeof t=="string"?$t(t):t.toString()).join("|")})$`),e._zod.parse=(t,n)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:r,input:o,inst:e}),t}}),_s=N("$ZodLiteral",(e,u)=>{if(pe.init(e,u),u.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(u.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${u.values.map(i=>typeof i=="string"?$t(i):i?$t(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,t)=>{const n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:u.values,input:n,inst:e}),i}}),ws=N("$ZodFile",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{const t=r.value;return t instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),r}}),Cs=N("$ZodTransform",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new tr(e.constructor.name);const t=u.transform(r.value,r);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(o=>(r.value=o,r));if(t instanceof Promise)throw new Zt;return r.value=t,r}});function xs(e,u){return e.issues.length&&u===void 0?{issues:[],value:void 0}:e}var Hn=N("$ZodOptional",(e,u)=>{pe.init(e,u),e._zod.optin="optional",e._zod.optout="optional",_e(e._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,void 0]):void 0),_e(e._zod,"pattern",()=>{const r=u.innerType._zod.pattern;return r?new RegExp(`^(${nr(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(u.innerType._zod.optin==="optional"){const t=u.innerType._zod.run(r,i);return t instanceof Promise?t.then(n=>xs(n,r.value)):xs(t,r.value)}return r.value===void 0?r:u.innerType._zod.run(r,i)}}),bs=N("$ZodExactOptional",(e,u)=>{Hn.init(e,u),_e(e._zod,"values",()=>u.innerType._zod.values),_e(e._zod,"pattern",()=>u.innerType._zod.pattern),e._zod.parse=(r,i)=>u.innerType._zod.run(r,i)}),$s=N("$ZodNullable",(e,u)=>{pe.init(e,u),_e(e._zod,"optin",()=>u.innerType._zod.optin),_e(e._zod,"optout",()=>u.innerType._zod.optout),_e(e._zod,"pattern",()=>{const r=u.innerType._zod.pattern;return r?new RegExp(`^(${nr(r.source)}|null)$`):void 0}),_e(e._zod,"values",()=>u.innerType._zod.values?new Set([...u.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:u.innerType._zod.run(r,i)}),Bs=N("$ZodDefault",(e,u)=>{pe.init(e,u),e._zod.optin="optional",_e(e._zod,"values",()=>u.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return u.innerType._zod.run(r,i);if(r.value===void 0)return r.value=u.defaultValue,r;const t=u.innerType._zod.run(r,i);return t instanceof Promise?t.then(n=>As(n,u)):As(t,u)}});function As(e,u){return e.value===void 0&&(e.value=u.defaultValue),e}var ks=N("$ZodPrefault",(e,u)=>{pe.init(e,u),e._zod.optin="optional",_e(e._zod,"values",()=>u.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=u.defaultValue),u.innerType._zod.run(r,i))}),Ss=N("$ZodNonOptional",(e,u)=>{pe.init(e,u),_e(e._zod,"values",()=>{const r=u.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const t=u.innerType._zod.run(r,i);return t instanceof Promise?t.then(n=>Fs(n,e)):Fs(t,e)}});function Fs(e,u){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:u}),e}var Is=N("$ZodSuccess",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new tr("ZodSuccess");const t=u.innerType._zod.run(r,i);return t instanceof Promise?t.then(n=>(r.value=n.issues.length===0,r)):(r.value=t.issues.length===0,r)}}),zs=N("$ZodCatch",(e,u)=>{pe.init(e,u),_e(e._zod,"optin",()=>u.innerType._zod.optin),_e(e._zod,"optout",()=>u.innerType._zod.optout),_e(e._zod,"values",()=>u.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return u.innerType._zod.run(r,i);const t=u.innerType._zod.run(r,i);return t instanceof Promise?t.then(n=>(r.value=n.value,n.issues.length&&(r.value=u.catchValue({...r,error:{issues:n.issues.map(o=>gt(o,i,tt()))},input:r.value}),r.issues=[]),r)):(r.value=t.value,t.issues.length&&(r.value=u.catchValue({...r,error:{issues:t.issues.map(n=>gt(n,i,tt()))},input:r.value}),r.issues=[]),r)}}),Ns=N("$ZodNaN",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),js=N("$ZodPipe",(e,u)=>{pe.init(e,u),_e(e._zod,"values",()=>u.in._zod.values),_e(e._zod,"optin",()=>u.in._zod.optin),_e(e._zod,"optout",()=>u.out._zod.optout),_e(e._zod,"propValues",()=>u.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const n=u.out._zod.run(r,i);return n instanceof Promise?n.then(o=>fr(o,u.in,i)):fr(n,u.in,i)}const t=u.in._zod.run(r,i);return t instanceof Promise?t.then(n=>fr(n,u.out,i)):fr(t,u.out,i)}});function fr(e,u,r){return e.issues.length?(e.aborted=!0,e):u._zod.run({value:e.value,issues:e.issues},r)}var ei=N("$ZodCodec",(e,u)=>{pe.init(e,u),_e(e._zod,"values",()=>u.in._zod.values),_e(e._zod,"optin",()=>u.in._zod.optin),_e(e._zod,"optout",()=>u.out._zod.optout),_e(e._zod,"propValues",()=>u.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){const n=u.in._zod.run(r,i);return n instanceof Promise?n.then(o=>hr(o,u,i)):hr(n,u,i)}else{const n=u.out._zod.run(r,i);return n instanceof Promise?n.then(o=>hr(o,u,i)):hr(n,u,i)}}});function hr(e,u,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const t=u.transform(e.value,e);return t instanceof Promise?t.then(n=>mr(e,n,u.out,r)):mr(e,t,u.out,r)}else{const t=u.reverseTransform(e.value,e);return t instanceof Promise?t.then(n=>mr(e,n,u.in,r)):mr(e,t,u.in,r)}}function mr(e,u,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:u,issues:e.issues},i)}var Os=N("$ZodReadonly",(e,u)=>{pe.init(e,u),_e(e._zod,"propValues",()=>u.innerType._zod.propValues),_e(e._zod,"values",()=>u.innerType._zod.values),_e(e._zod,"optin",()=>u.innerType?._zod?.optin),_e(e._zod,"optout",()=>u.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return u.innerType._zod.run(r,i);const t=u.innerType._zod.run(r,i);return t instanceof Promise?t.then(Ts):Ts(t)}});function Ts(e){return e.value=Object.freeze(e.value),e}var Ps=N("$ZodTemplateLiteral",(e,u)=>{pe.init(e,u);const r=[];for(const i of u.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const n=t.startsWith("^")?1:0,o=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(n,o))}else if(i===null||c0.has(typeof i))r.push($t(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,t)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:u.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Us=N("$ZodFunction",(e,u)=>(pe.init(e,u),e._def=u,e._zod.def=u,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){const t=e._def.input?zn(e._def.input,i):i,n=Reflect.apply(r,this,t);return e._def.output?zn(e._def.output,n):n}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const t=e._def.input?await Nn(e._def.input,i):i,n=await Reflect.apply(r,this,t);return e._def.output?await Nn(e._def.output,n):n}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Qn({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Zs=N("$ZodPromise",(e,u)=>{pe.init(e,u),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(t=>u.innerType._zod.run({value:t,issues:[]},i))}),Ms=N("$ZodLazy",(e,u)=>{pe.init(e,u),_e(e._zod,"innerType",()=>u.getter()),_e(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),_e(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),_e(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),_e(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Rs=N("$ZodCustom",(e,u)=>{Ue.init(e,u),pe.init(e,u),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,t=u.fn(i);if(t instanceof Promise)return t.then(n=>Ls(n,r,i,e));Ls(t,r,i,e)}});function Ls(e,u,r,i){if(!e){const t={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),u.issues.push(sr(t))}}var ti={};Et(ti,{ar:()=>Yh,az:()=>Qh,be:()=>e1,bg:()=>u1,ca:()=>n1,cs:()=>o1,da:()=>s1,de:()=>l1,en:()=>qs,eo:()=>h1,es:()=>g1,fa:()=>p1,fi:()=>D1,fr:()=>_1,frCA:()=>C1,he:()=>b1,hu:()=>B1,hy:()=>k1,id:()=>F1,is:()=>z1,it:()=>j1,ja:()=>T1,ka:()=>U1,kh:()=>M1,km:()=>Ws,ko:()=>L1,lt:()=>q1,mk:()=>W1,ms:()=>K1,nl:()=>X1,no:()=>H1,ota:()=>tm,pl:()=>im,ps:()=>rm,pt:()=>am,ru:()=>cm,sl:()=>dm,sv:()=>hm,ta:()=>gm,th:()=>pm,tr:()=>Dm,ua:()=>_m,uk:()=>Ys,ur:()=>Cm,uz:()=>bm,vi:()=>Bm,yo:()=>zm,zhCN:()=>km,zhTW:()=>Fm});var Kh=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function u(t){return e[t]??null}const r={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${t.expected}، ولكن تم إدخال ${s}`:`مدخلات غير مقبولة: يفترض إدخال ${n}، ولكن تم إدخال ${s}`}case"invalid_value":return t.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${de(t.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?` أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${n} ${t.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${n} ${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${n} ${t.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${n} ${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${t.prefix}"`:n.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${n.suffix}"`:n.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${n.includes}"`:n.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${n.pattern}`:`${r[n.format]??t.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${t.divisor}`;case"unrecognized_keys":return`معرف${t.keys.length>1?"ات":""} غريب${t.keys.length>1?"ة":""}: ${q(t.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${t.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${t.origin}`;default:return"مدخل غير مقبول"}}};function Yh(){return{localeError:Kh()}}var Xh=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function u(t){return e[t]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Yanlış dəyər: gözlənilən instanceof ${t.expected}, daxil olan ${s}`:`Yanlış dəyər: gözlənilən ${n}, daxil olan ${s}`}case"invalid_value":return t.values.length===1?`Yanlış dəyər: gözlənilən ${de(t.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${n}${t.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Çox kiçik: gözlənilən ${t.origin} ${n}${t.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Yanlış mətn: "${n.prefix}" ilə başlamalıdır`:n.format==="ends_with"?`Yanlış mətn: "${n.suffix}" ilə bitməlidir`:n.format==="includes"?`Yanlış mətn: "${n.includes}" daxil olmalıdır`:n.format==="regex"?`Yanlış mətn: ${n.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[n.format]??t.format}`}case"not_multiple_of":return`Yanlış ədəd: ${t.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${t.keys.length>1?"lar":""}: ${q(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${t.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Qh(){return{localeError:Xh()}}function Js(e,u,r,i){const t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19?i:n===1?u:n>=2&&n<=4?r:i}var Hh=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function u(t){return e[t]??null}const r={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Няправільны ўвод: чакаўся instanceof ${t.expected}, атрымана ${s}`:`Няправільны ўвод: чакаўся ${n}, атрымана ${s}`}case"invalid_value":return t.values.length===1?`Няправільны ўвод: чакалася ${de(t.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);if(o){const s=Number(t.maximum),h=Js(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна ${o.verb} ${n}${t.maximum.toString()} ${h}`}return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна быць ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);if(o){const s=Number(t.minimum),h=Js(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${t.origin} павінна ${o.verb} ${n}${t.minimum.toString()} ${h}`}return`Занадта малы: чакалася, што ${t.origin} павінна быць ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${n.prefix}"`:n.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${n.suffix}"`:n.format==="includes"?`Няправільны радок: павінен змяшчаць "${n.includes}"`:n.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${n.pattern}`:`Няправільны ${r[n.format]??t.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${t.keys.length>1?"ключы":"ключ"}: ${q(t.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${t.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${t.origin}`;default:return"Няправільны ўвод"}}};function e1(){return{localeError:Hh()}}var t1=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function u(t){return e[t]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Невалиден вход: очакван instanceof ${t.expected}, получен ${s}`:`Невалиден вход: очакван ${n}, получен ${s}`}case"invalid_value":return t.values.length===1?`Невалиден вход: очакван ${de(t.values[0])}`:`Невалидна опция: очаквано едно от ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Твърде голямо: очаква се ${t.origin??"стойност"} да съдържа ${n}${t.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${t.origin??"стойност"} да бъде ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Твърде малко: очаква се ${t.origin} да съдържа ${n}${t.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${t.origin} да бъде ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;if(n.format==="starts_with")return`Невалиден низ: трябва да започва с "${n.prefix}"`;if(n.format==="ends_with")return`Невалиден низ: трябва да завършва с "${n.suffix}"`;if(n.format==="includes")return`Невалиден низ: трябва да включва "${n.includes}"`;if(n.format==="regex")return`Невалиден низ: трябва да съвпада с ${n.pattern}`;let o="Невалиден";return n.format==="emoji"&&(o="Невалидно"),n.format==="datetime"&&(o="Невалидно"),n.format==="date"&&(o="Невалидна"),n.format==="time"&&(o="Невалидно"),n.format==="duration"&&(o="Невалидна"),`${o} ${r[n.format]??t.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${t.divisor}`;case"unrecognized_keys":return`Неразпознат${t.keys.length>1?"и":""} ключ${t.keys.length>1?"ове":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${t.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${t.origin}`;default:return"Невалиден вход"}}};function u1(){return{localeError:t1()}}var r1=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function u(t){return e[t]??null}const r={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Tipus invàlid: s'esperava instanceof ${t.expected}, s'ha rebut ${s}`:`Tipus invàlid: s'esperava ${n}, s'ha rebut ${s}`}case"invalid_value":return t.values.length===1?`Valor invàlid: s'esperava ${de(t.values[0])}`:`Opció invàlida: s'esperava una de ${q(t.values," o ")}`;case"too_big":{const n=t.inclusive?"com a màxim":"menys de",o=u(t.origin);return o?`Massa gran: s'esperava que ${t.origin??"el valor"} contingués ${n} ${t.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${n} ${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?"com a mínim":"més de",o=u(t.origin);return o?`Massa petit: s'esperava que ${t.origin} contingués ${n} ${t.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${n} ${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Format invàlid: ha de començar amb "${n.prefix}"`:n.format==="ends_with"?`Format invàlid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format invàlid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${n.pattern}`:`Format invàlid per a ${r[n.format]??t.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${t.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${t.origin}`;default:return"Entrada invàlida"}}};function n1(){return{localeError:r1()}}var i1=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function u(t){return e[t]??null}const r={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Neplatný vstup: očekáváno instanceof ${t.expected}, obdrženo ${s}`:`Neplatný vstup: očekáváno ${n}, obdrženo ${s}`}case"invalid_value":return t.values.length===1?`Neplatný vstup: očekáváno ${de(t.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Hodnota je příliš velká: ${t.origin??"hodnota"} musí mít ${n}${t.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${t.origin??"hodnota"} musí být ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Hodnota je příliš malá: ${t.origin??"hodnota"} musí mít ${n}${t.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${t.origin??"hodnota"} musí být ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Neplatný řetězec: musí začínat na "${n.prefix}"`:n.format==="ends_with"?`Neplatný řetězec: musí končit na "${n.suffix}"`:n.format==="includes"?`Neplatný řetězec: musí obsahovat "${n.includes}"`:n.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${n.pattern}`:`Neplatný formát ${r[n.format]??t.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${t.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${q(t.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${t.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${t.origin}`;default:return"Neplatný vstup"}}};function o1(){return{localeError:i1()}}var a1=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function u(t){return e[t]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${s}`:`Ugyldigt input: forventede ${n}, fik ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig værdi: forventede ${de(t.values[0])}`:`Ugyldigt valg: forventede en af følgende ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin),s=i[t.origin]??t.origin;return o?`For stor: forventede ${s??"value"} ${o.verb} ${n} ${t.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${n} ${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin),s=i[t.origin]??t.origin;return o?`For lille: forventede ${s} ${o.verb} ${n} ${t.minimum.toString()} ${o.unit}`:`For lille: forventede ${s} havde ${n} ${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche mønsteret ${n.pattern}`:`Ugyldig ${r[n.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${q(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${t.origin}`;default:return"Ugyldigt input"}}};function s1(){return{localeError:a1()}}var c1=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function u(t){return e[t]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ungültige Eingabe: erwartet instanceof ${t.expected}, erhalten ${s}`:`Ungültige Eingabe: erwartet ${n}, erhalten ${s}`}case"invalid_value":return t.values.length===1?`Ungültige Eingabe: erwartet ${de(t.values[0])}`:`Ungültige Option: erwartet eine von ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Zu groß: erwartet, dass ${t.origin??"Wert"} ${n}${t.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${t.origin??"Wert"} ${n}${t.maximum.toString()} ist`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Zu klein: erwartet, dass ${t.origin} ${n}${t.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${n}${t.minimum.toString()} ist`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Ungültiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ungültiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ungültiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ungültiger String: muss dem Muster ${n.pattern} entsprechen`:`Ungültig: ${r[n.format]??t.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${q(t.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${t.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${t.origin}`;default:return"Ungültige Eingabe"}}};function l1(){return{localeError:c1()}}var d1=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function u(t){return e[t]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return`Invalid input: expected ${n}, received ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${de(t.values[0])}`:`Invalid option: expected one of ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Too big: expected ${t.origin??"value"} to have ${n}${t.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Too small: expected ${t.origin} to have ${n}${t.minimum.toString()} ${o.unit}`:`Too small: expected ${t.origin} to be ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function qs(){return{localeError:d1()}}var f1=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function u(t){return e[t]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendiĝis instanceof ${t.expected}, riceviĝis ${s}`:`Nevalida enigo: atendiĝis ${n}, riceviĝis ${s}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendiĝis ${de(t.values[0])}`:`Nevalida opcio: atendiĝis unu el ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${n}${t.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Tro malgranda: atendiĝis ke ${t.origin} havu ${n}${t.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${t.origin} estu ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} ŝlosilo${t.keys.length>1?"j":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function h1(){return{localeError:f1()}}var m1=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function u(t){return e[t]??null}const r={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Entrada inválida: se esperaba instanceof ${t.expected}, recibido ${s}`:`Entrada inválida: se esperaba ${n}, recibido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inválida: se esperaba ${de(t.values[0])}`:`Opción inválida: se esperaba una de ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin),s=i[t.origin]??t.origin;return o?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${n}${t.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin),s=i[t.origin]??t.origin;return o?`Demasiado pequeño: se esperaba que ${s} tuviera ${n}${t.minimum.toString()} ${o.unit}`:`Demasiado pequeño: se esperaba que ${s} fuera ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Cadena inválida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inválida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inválida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${n.pattern}`:`Inválido ${r[n.format]??t.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[t.origin]??t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[t.origin]??t.origin}`;default:return"Entrada inválida"}}};function g1(){return{localeError:m1()}}var v1=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function u(t){return e[t]??null}const r={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ورودی نامعتبر: می‌بایست instanceof ${t.expected} می‌بود، ${s} دریافت شد`:`ورودی نامعتبر: می‌بایست ${n} می‌بود، ${s} دریافت شد`}case"invalid_value":return t.values.length===1?`ورودی نامعتبر: می‌بایست ${de(t.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${q(t.values,"|")} می‌بود`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`خیلی بزرگ: ${t.origin??"مقدار"} باید ${n}${t.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${t.origin??"مقدار"} باید ${n}${t.maximum.toString()} باشد`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`خیلی کوچک: ${t.origin} باید ${n}${t.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${t.origin} باید ${n}${t.minimum.toString()} باشد`}case"invalid_format":{const n=t;return n.format==="starts_with"?`رشته نامعتبر: باید با "${n.prefix}" شروع شود`:n.format==="ends_with"?`رشته نامعتبر: باید با "${n.suffix}" تمام شود`:n.format==="includes"?`رشته نامعتبر: باید شامل "${n.includes}" باشد`:n.format==="regex"?`رشته نامعتبر: باید با الگوی ${n.pattern} مطابقت داشته باشد`:`${r[n.format]??t.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${t.divisor} باشد`;case"unrecognized_keys":return`کلید${t.keys.length>1?"های":""} ناشناس: ${q(t.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${t.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${t.origin}`;default:return"ورودی نامعتبر"}}};function p1(){return{localeError:v1()}}var E1=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function u(t){return e[t]??null}const r={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${s}`}case"invalid_value":return t.values.length===1?`Virheellinen syöte: täytyy olla ${de(t.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${n}${t.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${n}${t.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen syöte: täytyy sisältää "${n.includes}"`:n.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${n.pattern}`:`Virheellinen ${r[n.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${q(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function D1(){return{localeError:E1()}}var y1=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function u(t){return e[t]??null}const r={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Entrée invalide : instanceof ${t.expected} attendu, ${s} reçu`:`Entrée invalide : ${n} attendu, ${s} reçu`}case"invalid_value":return t.values.length===1?`Entrée invalide : ${de(t.values[0])} attendu`:`Option invalide : une valeur parmi ${q(t.values,"|")} attendue`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Trop grand : ${t.origin??"valeur"} doit ${o.verb} ${n}${t.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${t.origin??"valeur"} doit être ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Trop petit : ${t.origin} doit ${o.verb} ${n}${t.minimum.toString()} ${o.unit}`:`Trop petit : ${t.origin} doit être ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Chaîne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Chaîne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Chaîne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${n.pattern}`:`${r[n.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${q(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function _1(){return{localeError:y1()}}var w1=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function u(t){return e[t]??null}const r={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Entrée invalide : attendu instanceof ${t.expected}, reçu ${s}`:`Entrée invalide : attendu ${n}, reçu ${s}`}case"invalid_value":return t.values.length===1?`Entrée invalide : attendu ${de(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"≤":"<",o=u(t.origin);return o?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${n}${t.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?"≥":">",o=u(t.origin);return o?`Trop petit : attendu que ${t.origin} ait ${n}${t.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${t.origin} soit ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Chaîne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Chaîne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Chaîne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Chaîne invalide : doit correspondre au motif ${n.pattern}`:`${r[n.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${q(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function C1(){return{localeError:w1()}}var x1=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},u={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=f=>f?e[f]:void 0,i=f=>{const g=r(f);return g?g.label:f??e.unknown.label},t=f=>`ה${i(f)}`,n=f=>(r(f)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",o=f=>f?u[f]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},h={nan:"NaN"};return f=>{switch(f.code){case"invalid_type":{const g=f.expected,p=h[g??""]??i(g),E=fe(f.input),_=h[E]??e[E]?.label??E;return/^[A-Z]/.test(f.expected)?`קלט לא תקין: צריך להיות instanceof ${f.expected}, התקבל ${_}`:`קלט לא תקין: צריך להיות ${p}, התקבל ${_}`}case"invalid_value":{if(f.values.length===1)return`ערך לא תקין: הערך חייב להיות ${de(f.values[0])}`;const g=f.values.map(_=>de(_));if(f.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${g[0]} או ${g[1]}`;const p=g[g.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${g.slice(0,-1).join(", ")} או ${p}`}case"too_big":{const g=o(f.origin),p=t(f.origin??"value");if(f.origin==="string")return`${g?.longLabel??"ארוך"} מדי: ${p} צריכה להכיל ${f.maximum.toString()} ${g?.unit??""} ${f.inclusive?"או פחות":"לכל היותר"}`.trim();if(f.origin==="number"){const x=f.inclusive?`קטן או שווה ל-${f.maximum}`:`קטן מ-${f.maximum}`;return`גדול מדי: ${p} צריך להיות ${x}`}if(f.origin==="array"||f.origin==="set"){const x=f.origin==="set"?"צריכה":"צריך",$=f.inclusive?`${f.maximum} ${g?.unit??""} או פחות`:`פחות מ-${f.maximum} ${g?.unit??""}`;return`גדול מדי: ${p} ${x} להכיל ${$}`.trim()}const E=f.inclusive?"<=":"<",_=n(f.origin??"value");return g?.unit?`${g.longLabel} מדי: ${p} ${_} ${E}${f.maximum.toString()} ${g.unit}`:`${g?.longLabel??"גדול"} מדי: ${p} ${_} ${E}${f.maximum.toString()}`}case"too_small":{const g=o(f.origin),p=t(f.origin??"value");if(f.origin==="string")return`${g?.shortLabel??"קצר"} מדי: ${p} צריכה להכיל ${f.minimum.toString()} ${g?.unit??""} ${f.inclusive?"או יותר":"לפחות"}`.trim();if(f.origin==="number"){const x=f.inclusive?`גדול או שווה ל-${f.minimum}`:`גדול מ-${f.minimum}`;return`קטן מדי: ${p} צריך להיות ${x}`}if(f.origin==="array"||f.origin==="set"){const x=f.origin==="set"?"צריכה":"צריך";if(f.minimum===1&&f.inclusive){const A=(f.origin==="set","לפחות פריט אחד");return`קטן מדי: ${p} ${x} להכיל ${A}`}const $=f.inclusive?`${f.minimum} ${g?.unit??""} או יותר`:`יותר מ-${f.minimum} ${g?.unit??""}`;return`קטן מדי: ${p} ${x} להכיל ${$}`.trim()}const E=f.inclusive?">=":">",_=n(f.origin??"value");return g?.unit?`${g.shortLabel} מדי: ${p} ${_} ${E}${f.minimum.toString()} ${g.unit}`:`${g?.shortLabel??"קטן"} מדי: ${p} ${_} ${E}${f.minimum.toString()}`}case"invalid_format":{const g=f;if(g.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${g.prefix}"`;if(g.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${g.suffix}"`;if(g.format==="includes")return`המחרוזת חייבת לכלול "${g.includes}"`;if(g.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${g.pattern}`;const p=s[g.format],E=p?.label??g.format,x=(p?.gender??"m")==="f"?"תקינה":"תקין";return`${E} לא ${x}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${f.divisor}`;case"unrecognized_keys":return`מפתח${f.keys.length>1?"ות":""} לא מזוה${f.keys.length>1?"ים":"ה"}: ${q(f.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${t(f.origin??"array")}`;default:return"קלט לא תקין"}}};function b1(){return{localeError:x1()}}var $1=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function u(t){return e[t]??null}const r={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Érvénytelen bemenet: a várt érték instanceof ${t.expected}, a kapott érték ${s}`:`Érvénytelen bemenet: a várt érték ${n}, a kapott érték ${s}`}case"invalid_value":return t.values.length===1?`Érvénytelen bemenet: a várt érték ${de(t.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Túl nagy: ${t.origin??"érték"} mérete túl nagy ${n}${t.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${t.origin??"érték"} túl nagy: ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Túl kicsi: a bemeneti érték ${t.origin} mérete túl kicsi ${n}${t.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${t.origin} túl kicsi ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Érvénytelen string: "${n.prefix}" értékkel kell kezdődnie`:n.format==="ends_with"?`Érvénytelen string: "${n.suffix}" értékkel kell végződnie`:n.format==="includes"?`Érvénytelen string: "${n.includes}" értéket kell tartalmaznia`:n.format==="regex"?`Érvénytelen string: ${n.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[n.format]??t.format}`}case"not_multiple_of":return`Érvénytelen szám: ${t.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${t.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${t.origin}`;default:return"Érvénytelen bemenet"}}};function B1(){return{localeError:$1()}}function Vs(e,u,r){return Math.abs(e)===1?u:r}function ru(e){if(!e)return"";const u=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(u.includes(r)?"ն":"ը")}var A1=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function u(t){return e[t]??null}const r={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${t.expected}, ստացվել է ${s}`:`Սխալ մուտքագրում․ սպասվում էր ${n}, ստացվել է ${s}`}case"invalid_value":return t.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${de(t.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);if(o){const s=Number(t.maximum),h=Vs(s,o.unit.one,o.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ru(t.origin??"արժեք")} կունենա ${n}${t.maximum.toString()} ${h}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ru(t.origin??"արժեք")} լինի ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);if(o){const s=Number(t.minimum),h=Vs(s,o.unit.one,o.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ru(t.origin)} կունենա ${n}${t.minimum.toString()} ${h}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ru(t.origin)} լինի ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${n.prefix}"-ով`:n.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${n.suffix}"-ով`:n.format==="includes"?`Սխալ տող․ պետք է պարունակի "${n.includes}"`:n.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${n.pattern} ձևաչափին`:`Սխալ ${r[n.format]??t.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${t.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${t.keys.length>1?"ներ":""}. ${q(t.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${ru(t.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${ru(t.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function k1(){return{localeError:A1()}}var S1=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function u(t){return e[t]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${n}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${de(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${n}${t.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Terlalu kecil: diharapkan ${t.origin} memiliki ${n}${t.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${r[n.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function F1(){return{localeError:S1()}}var I1=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function u(t){return e[t]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Rangt gildi: Þú slóst inn ${s} þar sem á að vera instanceof ${t.expected}`:`Rangt gildi: Þú slóst inn ${s} þar sem á að vera ${n}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert ráð fyrir ${de(t.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} hafi ${n}${t.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} sé ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Of lítið: gert er ráð fyrir að ${t.origin} hafi ${n}${t.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${t.origin} sé ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Ógildur strengur: verður að byrja á "${n.prefix}"`:n.format==="ends_with"?`Ógildur strengur: verður að enda á "${n.suffix}"`:n.format==="includes"?`Ógildur strengur: verður að innihalda "${n.includes}"`:n.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??t.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`Óþekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${q(t.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${t.origin}`;default:return"Rangt gildi"}}};function z1(){return{localeError:I1()}}var N1=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function u(t){return e[t]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${s}`:`Input non valido: atteso ${n}, ricevuto ${s}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${de(t.values[0])}`:`Opzione non valida: atteso uno tra ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Troppo grande: ${t.origin??"valore"} deve avere ${n}${t.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Troppo piccolo: ${t.origin} deve avere ${n}${t.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${t.origin} deve essere ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Invalid ${r[n.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${q(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function j1(){return{localeError:N1()}}var O1=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function u(t){return e[t]??null}const r={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`無効な入力: instanceof ${t.expected}が期待されましたが、${s}が入力されました`:`無効な入力: ${n}が期待されましたが、${s}が入力されました`}case"invalid_value":return t.values.length===1?`無効な入力: ${de(t.values[0])}が期待されました`:`無効な選択: ${q(t.values,"、")}のいずれかである必要があります`;case"too_big":{const n=t.inclusive?"以下である":"より小さい",o=u(t.origin);return o?`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${o.unit??"要素"}${n}必要があります`:`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${n}必要があります`}case"too_small":{const n=t.inclusive?"以上である":"より大きい",o=u(t.origin);return o?`小さすぎる値: ${t.origin}は${t.minimum.toString()}${o.unit}${n}必要があります`:`小さすぎる値: ${t.origin}は${t.minimum.toString()}${n}必要があります`}case"invalid_format":{const n=t;return n.format==="starts_with"?`無効な文字列: "${n.prefix}"で始まる必要があります`:n.format==="ends_with"?`無効な文字列: "${n.suffix}"で終わる必要があります`:n.format==="includes"?`無効な文字列: "${n.includes}"を含む必要があります`:n.format==="regex"?`無効な文字列: パターン${n.pattern}に一致する必要があります`:`無効な${r[n.format]??t.format}`}case"not_multiple_of":return`無効な数値: ${t.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${t.keys.length>1?"群":""}: ${q(t.keys,"、")}`;case"invalid_key":return`${t.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${t.origin}内の無効な値`;default:return"無効な入力"}}};function T1(){return{localeError:O1()}}var P1=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function u(t){return e[t]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${t.expected}, მიღებული ${s}`:`არასწორი შეყვანა: მოსალოდნელი ${n}, მიღებული ${s}`}case"invalid_value":return t.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${de(t.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${q(t.values,"|")}-დან`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} ${o.verb} ${n}${t.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} იყოს ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${t.origin} ${o.verb} ${n}${t.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${t.origin} იყოს ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${n.prefix}"-ით`:n.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${n.suffix}"-ით`:n.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${n.includes}"-ს`:n.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${n.pattern}`:`არასწორი ${r[n.format]??t.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${t.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${t.keys.length>1?"ები":"ი"}: ${q(t.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${t.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${t.origin}-ში`;default:return"არასწორი შეყვანა"}}};function U1(){return{localeError:P1()}}var Z1=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function u(t){return e[t]??null}const r={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${t.expected} ប៉ុន្តែទទួលបាន ${s}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n} ប៉ុន្តែទទួលបាន ${s}`}case"invalid_value":return t.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${de(t.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${n} ${t.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${n} ${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`តូចពេក៖ ត្រូវការ ${t.origin} ${n} ${t.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${t.origin} ${n} ${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${n.prefix}"`:n.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${n.suffix}"`:n.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${n.includes}"`:n.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${n.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[n.format]??t.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${t.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${q(t.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Ws(){return{localeError:Z1()}}function M1(){return Ws()}var R1=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function u(t){return e[t]??null}const r={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`잘못된 입력: 예상 타입은 instanceof ${t.expected}, 받은 타입은 ${s}입니다`:`잘못된 입력: 예상 타입은 ${n}, 받은 타입은 ${s}입니다`}case"invalid_value":return t.values.length===1?`잘못된 입력: 값은 ${de(t.values[0])} 이어야 합니다`:`잘못된 옵션: ${q(t.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=t.inclusive?"이하":"미만",o=n==="미만"?"이어야 합니다":"여야 합니다",s=u(t.origin),h=s?.unit??"요소";return s?`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()}${h} ${n}${o}`:`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()} ${n}${o}`}case"too_small":{const n=t.inclusive?"이상":"초과",o=n==="이상"?"이어야 합니다":"여야 합니다",s=u(t.origin),h=s?.unit??"요소";return s?`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()}${h} ${n}${o}`:`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()} ${n}${o}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`잘못된 문자열: "${n.prefix}"(으)로 시작해야 합니다`:n.format==="ends_with"?`잘못된 문자열: "${n.suffix}"(으)로 끝나야 합니다`:n.format==="includes"?`잘못된 문자열: "${n.includes}"을(를) 포함해야 합니다`:n.format==="regex"?`잘못된 문자열: 정규식 ${n.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[n.format]??t.format}`}case"not_multiple_of":return`잘못된 숫자: ${t.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${q(t.keys,", ")}`;case"invalid_key":return`잘못된 키: ${t.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${t.origin}`;default:return"잘못된 입력"}}};function L1(){return{localeError:R1()}}var Bu=e=>e.charAt(0).toUpperCase()+e.slice(1);function Gs(e){const u=Math.abs(e),r=u%10,i=u%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var J1=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function u(t,n,o,s){const h=e[t]??null;return h===null?h:{unit:h.unit[n],verb:h.verb[s][o?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${s}, o tikėtasi - instanceof ${t.expected}`:`Gautas tipas ${s}, o tikėtasi - ${n}`}case"invalid_value":return t.values.length===1?`Privalo būti ${de(t.values[0])}`:`Privalo būti vienas iš ${q(t.values,"|")} pasirinkimų`;case"too_big":{const n=i[t.origin]??t.origin,o=u(t.origin,Gs(Number(t.maximum)),t.inclusive??!1,"smaller");if(o?.verb)return`${Bu(n??t.origin??"reikšmė")} ${o.verb} ${t.maximum.toString()} ${o.unit??"elementų"}`;const s=t.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Bu(n??t.origin??"reikšmė")} turi būti ${s} ${t.maximum.toString()} ${o?.unit}`}case"too_small":{const n=i[t.origin]??t.origin,o=u(t.origin,Gs(Number(t.minimum)),t.inclusive??!1,"bigger");if(o?.verb)return`${Bu(n??t.origin??"reikšmė")} ${o.verb} ${t.minimum.toString()} ${o.unit??"elementų"}`;const s=t.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Bu(n??t.origin??"reikšmė")} turi būti ${s} ${t.minimum.toString()} ${o?.unit}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Eilutė privalo prasidėti "${n.prefix}"`:n.format==="ends_with"?`Eilutė privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilutė privalo įtraukti "${n.includes}"`:n.format==="regex"?`Eilutė privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??t.format}`}case"not_multiple_of":return`Skaičius privalo būti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${q(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const n=i[t.origin]??t.origin;return`${Bu(n??t.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function q1(){return{localeError:J1()}}var V1=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function u(t){return e[t]??null}const r={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Грешен внес: се очекува instanceof ${t.expected}, примено ${s}`:`Грешен внес: се очекува ${n}, примено ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${de(t.values[0])}`:`Грешана опција: се очекува една ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Премногу голем: се очекува ${t.origin??"вредноста"} да има ${n}${t.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${t.origin??"вредноста"} да биде ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Премногу мал: се очекува ${t.origin} да има ${n}${t.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${t.origin} да биде ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Неважечка низа: мора да започнува со "${n.prefix}"`:n.format==="ends_with"?`Неважечка низа: мора да завршува со "${n.suffix}"`:n.format==="includes"?`Неважечка низа: мора да вклучува "${n.includes}"`:n.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${n.pattern}`:`Invalid ${r[n.format]??t.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${q(t.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${t.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${t.origin}`;default:return"Грешен внес"}}};function W1(){return{localeError:V1()}}var G1=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function u(t){return e[t]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${s}`:`Input tidak sah: dijangka ${n}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${de(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Terlalu besar: dijangka ${t.origin??"nilai"} ${o.verb} ${n}${t.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Terlalu kecil: dijangka ${t.origin} ${o.verb} ${n}${t.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${r[n.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${q(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function K1(){return{localeError:G1()}}var Y1=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function u(t){return e[t]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${n}, ontving ${s}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${de(t.values[0])}`:`Ongeldige optie: verwacht één van ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin),s=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return o?`Te ${s}: verwacht dat ${t.origin??"waarde"} ${n}${t.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${s}: verwacht dat ${t.origin??"waarde"} ${n}${t.maximum.toString()} is`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin),s=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return o?`Te ${s}: verwacht dat ${t.origin} ${n}${t.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${s}: verwacht dat ${t.origin} ${n}${t.minimum.toString()} is`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${r[n.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function X1(){return{localeError:Y1()}}var Q1=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function u(t){return e[t]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${s}`:`Ugyldig input: forventet ${n}, fikk ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${de(t.values[0])}`:`Ugyldig valg: forventet en av ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`For stor(t): forventet ${t.origin??"value"} til å ha ${n}${t.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til å ha ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`For lite(n): forventet ${t.origin} til å ha ${n}${t.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${t.origin} til å ha ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Ugyldig streng: må starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: må ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: må inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: må matche mønsteret ${n.pattern}`:`Ugyldig ${r[n.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${q(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function H1(){return{localeError:Q1()}}var em=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function u(t){return e[t]??null}const r={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Fâsit giren: umulan instanceof ${t.expected}, alınan ${s}`:`Fâsit giren: umulan ${n}, alınan ${s}`}case"invalid_value":return t.values.length===1?`Fâsit giren: umulan ${de(t.values[0])}`:`Fâsit tercih: mûteberler ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Fazla büyük: ${t.origin??"value"}, ${n}${t.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${t.origin??"value"}, ${n}${t.maximum.toString()} olmalıydı.`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Fazla küçük: ${t.origin}, ${n}${t.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${t.origin}, ${n}${t.minimum.toString()} olmalıydı.`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Fâsit metin: "${n.prefix}" ile başlamalı.`:n.format==="ends_with"?`Fâsit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`Fâsit metin: "${n.includes}" ihtivâ etmeli.`:n.format==="regex"?`Fâsit metin: ${n.pattern} nakşına uymalı.`:`Fâsit ${r[n.format]??t.format}`}case"not_multiple_of":return`Fâsit sayı: ${t.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`${t.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${t.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function tm(){return{localeError:em()}}var um=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function u(t){return e[t]??null}const r={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ناسم ورودي: باید instanceof ${t.expected} وای, مګر ${s} ترلاسه شو`:`ناسم ورودي: باید ${n} وای, مګر ${s} ترلاسه شو`}case"invalid_value":return t.values.length===1?`ناسم ورودي: باید ${de(t.values[0])} وای`:`ناسم انتخاب: باید یو له ${q(t.values,"|")} څخه وای`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`ډیر لوی: ${t.origin??"ارزښت"} باید ${n}${t.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${t.origin??"ارزښت"} باید ${n}${t.maximum.toString()} وي`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`ډیر کوچنی: ${t.origin} باید ${n}${t.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${t.origin} باید ${n}${t.minimum.toString()} وي`}case"invalid_format":{const n=t;return n.format==="starts_with"?`ناسم متن: باید د "${n.prefix}" سره پیل شي`:n.format==="ends_with"?`ناسم متن: باید د "${n.suffix}" سره پای ته ورسيږي`:n.format==="includes"?`ناسم متن: باید "${n.includes}" ولري`:n.format==="regex"?`ناسم متن: باید د ${n.pattern} سره مطابقت ولري`:`${r[n.format]??t.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${t.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${t.keys.length>1?"کلیډونه":"کلیډ"}: ${q(t.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${t.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${t.origin} کې`;default:return"ناسمه ورودي"}}};function rm(){return{localeError:um()}}var nm=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function u(t){return e[t]??null}const r={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${t.expected}, otrzymano ${s}`:`Nieprawidłowe dane wejściowe: oczekiwano ${n}, otrzymano ${s}`}case"invalid_value":return t.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${de(t.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Za duża wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${n}${t.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Za mała wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${n}${t.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${n.prefix}"`:n.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${n.suffix}"`:n.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${n.includes}"`:n.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${n.pattern}`:`Nieprawidłow(y/a/e) ${r[n.format]??t.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${t.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${t.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function im(){return{localeError:nm()}}var om=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function u(t){return e[t]??null}const r={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Tipo inválido: esperado instanceof ${t.expected}, recebido ${s}`:`Tipo inválido: esperado ${n}, recebido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inválida: esperado ${de(t.values[0])}`:`Opção inválida: esperada uma das ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${n}${t.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Muito pequeno: esperado que ${t.origin} tivesse ${n}${t.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Texto inválido: deve começar com "${n.prefix}"`:n.format==="ends_with"?`Texto inválido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inválido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inválido: deve corresponder ao padrão ${n.pattern}`:`${r[n.format]??t.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Chave inválida em ${t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${t.origin}`;default:return"Campo inválido"}}};function am(){return{localeError:om()}}function Ks(e,u,r,i){const t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19?i:n===1?u:n>=2&&n<=4?r:i}var sm=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function u(t){return e[t]??null}const r={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Неверный ввод: ожидалось instanceof ${t.expected}, получено ${s}`:`Неверный ввод: ожидалось ${n}, получено ${s}`}case"invalid_value":return t.values.length===1?`Неверный ввод: ожидалось ${de(t.values[0])}`:`Неверный вариант: ожидалось одно из ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);if(o){const s=Number(t.maximum),h=Ks(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет иметь ${n}${t.maximum.toString()} ${h}`}return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);if(o){const s=Number(t.minimum),h=Ks(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${t.origin} будет иметь ${n}${t.minimum.toString()} ${h}`}return`Слишком маленькое значение: ожидалось, что ${t.origin} будет ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Неверная строка: должна начинаться с "${n.prefix}"`:n.format==="ends_with"?`Неверная строка: должна заканчиваться на "${n.suffix}"`:n.format==="includes"?`Неверная строка: должна содержать "${n.includes}"`:n.format==="regex"?`Неверная строка: должна соответствовать шаблону ${n.pattern}`:`Неверный ${r[n.format]??t.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспознанн${t.keys.length>1?"ые":"ый"} ключ${t.keys.length>1?"и":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${t.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${t.origin}`;default:return"Неверные входные данные"}}};function cm(){return{localeError:sm()}}var lm=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function u(t){return e[t]??null}const r={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pričakovano instanceof ${t.expected}, prejeto ${s}`:`Neveljaven vnos: pričakovano ${n}, prejeto ${s}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pričakovano ${de(t.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} imelo ${n}${t.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Premajhno: pričakovano, da bo ${t.origin} imelo ${n}${t.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Neveljaven niz: mora se začeti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se končati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${r[n.format]??t.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i ključi":" ključ"}: ${q(t.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function dm(){return{localeError:lm()}}var fm=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function u(t){return e[t]??null}const r={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: förväntat instanceof ${t.expected}, fick ${s}`:`Ogiltig inmatning: förväntat ${n}, fick ${s}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: förväntat ${de(t.values[0])}`:`Ogiltigt val: förväntade en av ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`För stor(t): förväntade ${t.origin??"värdet"} att ha ${n}${t.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${t.origin??"värdet"} att ha ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`För lite(t): förväntade ${t.origin??"värdet"} att ha ${n}${t.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${t.origin??"värdet"} att ha ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Ogiltig sträng: måste börja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig sträng: måste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig sträng: måste innehålla "${n.includes}"`:n.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${n.pattern}"`:`Ogiltig(t) ${r[n.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${q(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${t.origin??"värdet"}`;default:return"Ogiltig input"}}};function hm(){return{localeError:fm()}}var mm=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function u(t){return e[t]??null}const r={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${t.expected}, பெறப்பட்டது ${s}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n}, பெறப்பட்டது ${s}`}case"invalid_value":return t.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${de(t.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${q(t.values,"|")} இல் ஒன்று`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${n}${t.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${n}${t.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${n}${t.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${n}${t.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const n=t;return n.format==="starts_with"?`தவறான சரம்: "${n.prefix}" இல் தொடங்க வேண்டும்`:n.format==="ends_with"?`தவறான சரம்: "${n.suffix}" இல் முடிவடைய வேண்டும்`:n.format==="includes"?`தவறான சரம்: "${n.includes}" ஐ உள்ளடக்க வேண்டும்`:n.format==="regex"?`தவறான சரம்: ${n.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[n.format]??t.format}`}case"not_multiple_of":return`தவறான எண்: ${t.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${t.keys.length>1?"கள்":""}: ${q(t.keys,", ")}`;case"invalid_key":return`${t.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${t.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function gm(){return{localeError:mm()}}var vm=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function u(t){return e[t]??null}const r={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${t.expected} แต่ได้รับ ${s}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n} แต่ได้รับ ${s}`}case"invalid_value":return t.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${de(t.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"ไม่เกิน":"น้อยกว่า",o=u(t.origin);return o?`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${n} ${t.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${n} ${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?"อย่างน้อย":"มากกว่า",o=u(t.origin);return o?`น้อยกว่ากำหนด: ${t.origin} ควรมี${n} ${t.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${t.origin} ควรมี${n} ${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${n.prefix}"`:n.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${n.suffix}"`:n.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${n.includes}" อยู่ในข้อความ`:n.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${n.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[n.format]??t.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${t.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${q(t.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${t.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${t.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function pm(){return{localeError:vm()}}var Em=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function u(t){return e[t]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Geçersiz değer: beklenen instanceof ${t.expected}, alınan ${s}`:`Geçersiz değer: beklenen ${n}, alınan ${s}`}case"invalid_value":return t.values.length===1?`Geçersiz değer: beklenen ${de(t.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Çok büyük: beklenen ${t.origin??"değer"} ${n}${t.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${t.origin??"değer"} ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Çok küçük: beklenen ${t.origin} ${n}${t.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??t.format}`}case"not_multiple_of":return`Geçersiz sayı: ${t.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${t.keys.length>1?"lar":""}: ${q(t.keys,", ")}`;case"invalid_key":return`${t.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${t.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Dm(){return{localeError:Em()}}var ym=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function u(t){return e[t]??null}const r={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Неправильні вхідні дані: очікується instanceof ${t.expected}, отримано ${s}`:`Неправильні вхідні дані: очікується ${n}, отримано ${s}`}case"invalid_value":return t.values.length===1?`Неправильні вхідні дані: очікується ${de(t.values[0])}`:`Неправильна опція: очікується одне з ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Занадто велике: очікується, що ${t.origin??"значення"} ${o.verb} ${n}${t.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${t.origin??"значення"} буде ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Занадто мале: очікується, що ${t.origin} ${o.verb} ${n}${t.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${t.origin} буде ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Неправильний рядок: повинен починатися з "${n.prefix}"`:n.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${n.suffix}"`:n.format==="includes"?`Неправильний рядок: повинен містити "${n.includes}"`:n.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${n.pattern}`:`Неправильний ${r[n.format]??t.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${t.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${t.keys.length>1?"і":""}: ${q(t.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${t.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${t.origin}`;default:return"Неправильні вхідні дані"}}};function Ys(){return{localeError:ym()}}function _m(){return Ys()}var wm=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function u(t){return e[t]??null}const r={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`غلط ان پٹ: instanceof ${t.expected} متوقع تھا، ${s} موصول ہوا`:`غلط ان پٹ: ${n} متوقع تھا، ${s} موصول ہوا`}case"invalid_value":return t.values.length===1?`غلط ان پٹ: ${de(t.values[0])} متوقع تھا`:`غلط آپشن: ${q(t.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`بہت بڑا: ${t.origin??"ویلیو"} کے ${n}${t.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${t.origin??"ویلیو"} کا ${n}${t.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`بہت چھوٹا: ${t.origin} کے ${n}${t.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${t.origin} کا ${n}${t.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const n=t;return n.format==="starts_with"?`غلط سٹرنگ: "${n.prefix}" سے شروع ہونا چاہیے`:n.format==="ends_with"?`غلط سٹرنگ: "${n.suffix}" پر ختم ہونا چاہیے`:n.format==="includes"?`غلط سٹرنگ: "${n.includes}" شامل ہونا چاہیے`:n.format==="regex"?`غلط سٹرنگ: پیٹرن ${n.pattern} سے میچ ہونا چاہیے`:`غلط ${r[n.format]??t.format}`}case"not_multiple_of":return`غلط نمبر: ${t.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${t.keys.length>1?"ز":""}: ${q(t.keys,"، ")}`;case"invalid_key":return`${t.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${t.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Cm(){return{localeError:wm()}}var xm=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function u(t){return e[t]??null}const r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${s}`:`Noto‘g‘ri kirish: kutilgan ${n}, qabul qilingan ${s}`}case"invalid_value":return t.values.length===1?`Noto‘g‘ri kirish: kutilgan ${de(t.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Juda katta: kutilgan ${t.origin??"qiymat"} ${n}${t.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Juda kichik: kutilgan ${t.origin} ${n}${t.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Noto‘g‘ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto‘g‘ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto‘g‘ri satr: "${n.includes}" ni o‘z ichiga olishi kerak`:n.format==="regex"?`Noto‘g‘ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${r[n.format]??t.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${t.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${t.keys.length>1?"lar":""}: ${q(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${t.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function bm(){return{localeError:xm()}}var $m=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function u(t){return e[t]??null}const r={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${t.expected}, nhận được ${s}`:`Đầu vào không hợp lệ: mong đợi ${n}, nhận được ${s}`}case"invalid_value":return t.values.length===1?`Đầu vào không hợp lệ: mong đợi ${de(t.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Quá lớn: mong đợi ${t.origin??"giá trị"} ${o.verb} ${n}${t.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${t.origin??"giá trị"} ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Quá nhỏ: mong đợi ${t.origin} ${o.verb} ${n}${t.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${n.prefix}"`:n.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${n.suffix}"`:n.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${n.includes}"`:n.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${n.pattern}`:`${r[n.format]??t.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${t.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${q(t.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${t.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${t.origin}`;default:return"Đầu vào không hợp lệ"}}};function Bm(){return{localeError:$m()}}var Am=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function u(t){return e[t]??null}const r={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`无效输入:期望 instanceof ${t.expected},实际接收 ${s}`:`无效输入:期望 ${n},实际接收 ${s}`}case"invalid_value":return t.values.length===1?`无效输入:期望 ${de(t.values[0])}`:`无效选项:期望以下之一 ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`数值过大:期望 ${t.origin??"值"} ${n}${t.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${t.origin??"值"} ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`数值过小:期望 ${t.origin} ${n}${t.minimum.toString()} ${o.unit}`:`数值过小:期望 ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`无效字符串:必须以 "${n.prefix}" 开头`:n.format==="ends_with"?`无效字符串:必须以 "${n.suffix}" 结尾`:n.format==="includes"?`无效字符串:必须包含 "${n.includes}"`:n.format==="regex"?`无效字符串:必须满足正则表达式 ${n.pattern}`:`无效${r[n.format]??t.format}`}case"not_multiple_of":return`无效数字:必须是 ${t.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${q(t.keys,", ")}`;case"invalid_key":return`${t.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${t.origin} 中包含无效值(value)`;default:return"无效输入"}}};function km(){return{localeError:Am()}}var Sm=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function u(t){return e[t]??null}const r={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`無效的輸入值:預期為 instanceof ${t.expected},但收到 ${s}`:`無效的輸入值:預期為 ${n},但收到 ${s}`}case"invalid_value":return t.values.length===1?`無效的輸入值:預期為 ${de(t.values[0])}`:`無效的選項:預期為以下其中之一 ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`數值過大:預期 ${t.origin??"值"} 應為 ${n}${t.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${t.origin??"值"} 應為 ${n}${t.maximum.toString()}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`數值過小:預期 ${t.origin} 應為 ${n}${t.minimum.toString()} ${o.unit}`:`數值過小:預期 ${t.origin} 應為 ${n}${t.minimum.toString()}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`無效的字串:必須以 "${n.prefix}" 開頭`:n.format==="ends_with"?`無效的字串:必須以 "${n.suffix}" 結尾`:n.format==="includes"?`無效的字串:必須包含 "${n.includes}"`:n.format==="regex"?`無效的字串:必須符合格式 ${n.pattern}`:`無效的 ${r[n.format]??t.format}`}case"not_multiple_of":return`無效的數字:必須為 ${t.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${t.keys.length>1?"們":""}:${q(t.keys,"、")}`;case"invalid_key":return`${t.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${t.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Fm(){return{localeError:Sm()}}var Im=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function u(t){return e[t]??null}const r={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return t=>{switch(t.code){case"invalid_type":{const n=i[t.expected]??t.expected,o=fe(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${t.expected}, àmọ̀ a rí ${s}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${n}, àmọ̀ a rí ${s}`}case"invalid_value":return t.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${de(t.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${q(t.values,"|")}`;case"too_big":{const n=t.inclusive?"<=":"<",o=u(t.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${t.origin??"iye"} ${o.verb} ${n}${t.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${t.maximum}`}case"too_small":{const n=t.inclusive?">=":">",o=u(t.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${t.origin} ${o.verb} ${n}${t.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${t.minimum}`}case"invalid_format":{const n=t;return n.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${n.prefix}"`:n.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${n.suffix}"`:n.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${n.includes}"`:n.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${n.pattern}`:`Aṣìṣe: ${r[n.format]??t.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${t.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${q(t.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${t.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${t.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function zm(){return{localeError:Im()}}var Xs,Qs=Symbol("ZodOutput"),Hs=Symbol("ZodInput"),ec=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...u){const r=u[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const u=this._map.get(e);return u&&typeof u=="object"&&"id"in u&&this._idmap.delete(u.id),this._map.delete(e),this}get(e){const u=e._zod.parent;if(u){const r={...this.get(u)??{}};delete r.id;const i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ui(){return new ec}(Xs=globalThis).__zod_globalRegistry??(Xs.__zod_globalRegistry=ui());var vt=globalThis.__zod_globalRegistry;function tc(e,u){return new e({type:"string",...V(u)})}function uc(e,u){return new e({type:"string",coerce:!0,...V(u)})}function ri(e,u){return new e({type:"string",format:"email",check:"string_format",abort:!1,...V(u)})}function gr(e,u){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(u)})}function ni(e,u){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...V(u)})}function ii(e,u){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(u)})}function oi(e,u){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(u)})}function ai(e,u){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(u)})}function vr(e,u){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(u)})}function si(e,u){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...V(u)})}function ci(e,u){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(u)})}function li(e,u){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...V(u)})}function di(e,u){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(u)})}function fi(e,u){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...V(u)})}function hi(e,u){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...V(u)})}function mi(e,u){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(u)})}function gi(e,u){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(u)})}function vi(e,u){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(u)})}function rc(e,u){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...V(u)})}function pi(e,u){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(u)})}function Ei(e,u){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(u)})}function Di(e,u){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...V(u)})}function yi(e,u){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...V(u)})}function _i(e,u){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...V(u)})}function wi(e,u){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...V(u)})}var nc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ic(e,u){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(u)})}function oc(e,u){return new e({type:"string",format:"date",check:"string_format",...V(u)})}function ac(e,u){return new e({type:"string",format:"time",check:"string_format",precision:null,...V(u)})}function sc(e,u){return new e({type:"string",format:"duration",check:"string_format",...V(u)})}function cc(e,u){return new e({type:"number",checks:[],...V(u)})}function lc(e,u){return new e({type:"number",coerce:!0,checks:[],...V(u)})}function dc(e,u){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(u)})}function fc(e,u){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...V(u)})}function hc(e,u){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...V(u)})}function mc(e,u){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...V(u)})}function gc(e,u){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...V(u)})}function vc(e,u){return new e({type:"boolean",...V(u)})}function pc(e,u){return new e({type:"boolean",coerce:!0,...V(u)})}function Ec(e,u){return new e({type:"bigint",...V(u)})}function Dc(e,u){return new e({type:"bigint",coerce:!0,...V(u)})}function yc(e,u){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...V(u)})}function _c(e,u){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...V(u)})}function wc(e,u){return new e({type:"symbol",...V(u)})}function Cc(e,u){return new e({type:"undefined",...V(u)})}function xc(e,u){return new e({type:"null",...V(u)})}function bc(e){return new e({type:"any"})}function $c(e){return new e({type:"unknown"})}function Bc(e,u){return new e({type:"never",...V(u)})}function Ac(e,u){return new e({type:"void",...V(u)})}function kc(e,u){return new e({type:"date",...V(u)})}function Sc(e,u){return new e({type:"date",coerce:!0,...V(u)})}function Fc(e,u){return new e({type:"nan",...V(u)})}function jt(e,u){return new qn({check:"less_than",...V(u),value:e,inclusive:!1})}function pt(e,u){return new qn({check:"less_than",...V(u),value:e,inclusive:!0})}function Ot(e,u){return new Vn({check:"greater_than",...V(u),value:e,inclusive:!1})}function st(e,u){return new Vn({check:"greater_than",...V(u),value:e,inclusive:!0})}function Ci(e){return Ot(0,e)}function xi(e){return jt(0,e)}function bi(e){return pt(0,e)}function $i(e){return st(0,e)}function nu(e,u){return new H0({check:"multiple_of",...V(u),value:e})}function iu(e,u){return new ua({check:"max_size",...V(u),maximum:e})}function Tt(e,u){return new ra({check:"min_size",...V(u),minimum:e})}function Au(e,u){return new na({check:"size_equals",...V(u),size:e})}function ku(e,u){return new ia({check:"max_length",...V(u),maximum:e})}function qt(e,u){return new oa({check:"min_length",...V(u),minimum:e})}function Su(e,u){return new aa({check:"length_equals",...V(u),length:e})}function pr(e,u){return new sa({check:"string_format",format:"regex",...V(u),pattern:e})}function Er(e){return new ca({check:"string_format",format:"lowercase",...V(e)})}function Dr(e){return new la({check:"string_format",format:"uppercase",...V(e)})}function yr(e,u){return new da({check:"string_format",format:"includes",...V(u),includes:e})}function _r(e,u){return new fa({check:"string_format",format:"starts_with",...V(u),prefix:e})}function wr(e,u){return new ha({check:"string_format",format:"ends_with",...V(u),suffix:e})}function Bi(e,u,r){return new ga({check:"property",property:e,schema:u,...V(r)})}function Cr(e,u){return new va({check:"mime_type",mime:e,...V(u)})}function Bt(e){return new pa({check:"overwrite",tx:e})}function xr(e){return Bt(u=>u.normalize(e))}function br(){return Bt(e=>e.trim())}function $r(){return Bt(e=>e.toLowerCase())}function Br(){return Bt(e=>e.toUpperCase())}function Ar(){return Bt(e=>o0(e))}function Ic(e,u,r){return new e({type:"array",element:u,...V(r)})}function Nm(e,u,r){return new e({type:"union",options:u,...V(r)})}function jm(e,u,r){return new e({type:"union",options:u,inclusive:!1,...V(r)})}function Om(e,u,r,i){return new e({type:"union",options:r,discriminator:u,...V(i)})}function Tm(e,u,r){return new e({type:"intersection",left:u,right:r})}function Pm(e,u,r,i){const t=r instanceof pe,n=t?i:r,o=t?r:null;return new e({type:"tuple",items:u,rest:o,...V(n)})}function Um(e,u,r,i){return new e({type:"record",keyType:u,valueType:r,...V(i)})}function Zm(e,u,r,i){return new e({type:"map",keyType:u,valueType:r,...V(i)})}function Mm(e,u,r){return new e({type:"set",valueType:u,...V(r)})}function Rm(e,u,r){const i=Array.isArray(u)?Object.fromEntries(u.map(t=>[t,t])):u;return new e({type:"enum",entries:i,...V(r)})}function Lm(e,u,r){return new e({type:"enum",entries:u,...V(r)})}function Jm(e,u,r){return new e({type:"literal",values:Array.isArray(u)?u:[u],...V(r)})}function zc(e,u){return new e({type:"file",...V(u)})}function qm(e,u){return new e({type:"transform",transform:u})}function Vm(e,u){return new e({type:"optional",innerType:u})}function Wm(e,u){return new e({type:"nullable",innerType:u})}function Gm(e,u,r){return new e({type:"default",innerType:u,get defaultValue(){return typeof r=="function"?r():s0(r)}})}function Km(e,u,r){return new e({type:"nonoptional",innerType:u,...V(r)})}function Ym(e,u){return new e({type:"success",innerType:u})}function Xm(e,u,r){return new e({type:"catch",innerType:u,catchValue:typeof r=="function"?r:()=>r})}function Qm(e,u,r){return new e({type:"pipe",in:u,out:r})}function Hm(e,u){return new e({type:"readonly",innerType:u})}function eg(e,u,r){return new e({type:"template_literal",parts:u,...V(r)})}function tg(e,u){return new e({type:"lazy",getter:u})}function ug(e,u){return new e({type:"promise",innerType:u})}function Nc(e,u,r){const i=V(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:u,...i})}function jc(e,u,r){return new e({type:"custom",check:"custom",fn:u,...V(r)})}function Oc(e){const u=Tc(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(sr(i,r.value,u._zod.def));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=r.value),t.inst??(t.inst=u),t.continue??(t.continue=!u._zod.def.abort),r.issues.push(sr(t))}},e(r.value,r)));return u}function Tc(e,u){const r=new Ue({check:"custom",...V(u)});return r._zod.check=e,r}function Pc(e){const u=new Ue({check:"describe"});return u._zod.onattach=[r=>{const i=vt.get(r)??{};vt.add(r,{...i,description:e})}],u._zod.check=()=>{},u}function Uc(e){const u=new Ue({check:"meta"});return u._zod.onattach=[r=>{const i=vt.get(r)??{};vt.add(r,{...i,...e})}],u._zod.check=()=>{},u}function Zc(e,u){const r=V(u);let i=r.truthy??["true","1","yes","on","y","enabled"],t=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(_=>typeof _=="string"?_.toLowerCase():_),t=t.map(_=>typeof _=="string"?_.toLowerCase():_));const n=new Set(i),o=new Set(t),s=e.Codec??ei,h=e.Boolean??Kn,f=e.String??$u,g=new f({type:"string",error:r.error}),p=new h({type:"boolean",error:r.error}),E=new s({type:"pipe",in:g,out:p,transform:((_,x)=>{let $=_;return r.case!=="sensitive"&&($=$.toLowerCase()),n.has($)?!0:o.has($)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...o],input:x.value,inst:E,continue:!1}),{})}),reverseTransform:((_,x)=>_===!0?i[0]||"true":t[0]||"false"),error:r.error});return E}function Fu(e,u,r,i={}){const t=V(i),n={...V(i),check:"string_format",type:"string",format:u,fn:typeof r=="function"?r:s=>r.test(s),...t};return r instanceof RegExp&&(n.pattern=r),new e(n)}function ou(e){let u=e?.target??"draft-2020-12";return u==="draft-4"&&(u="draft-04"),u==="draft-7"&&(u="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??vt,target:u,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Se(e,u,r={path:[],schemaPath:[]}){var i;const t=e._zod.def,n=u.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;const o={schema:{},count:1,cycle:void 0,path:r.path};u.seen.set(e,o);const s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{const g={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(u,o.schema,g);else{const E=o.schema,_=u.processors[t.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);_(e,u,E,g)}const p=e._zod.parent;p&&(o.ref||(o.ref=p),Se(p,u,g),u.seen.get(p).isParent=!0)}const h=u.metadataRegistry.get(e);return h&&Object.assign(o.schema,h),u.io==="input"&&it(e)&&(delete o.schema.examples,delete o.schema.default),u.io==="input"&&o.schema._prefault&&((i=o.schema).default??(i.default=o.schema._prefault)),delete o.schema._prefault,u.seen.get(e).schema}function au(e,u){const r=e.seen.get(u);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const o of e.seen.entries()){const s=e.metadataRegistry.get(o[0])?.id;if(s){const h=i.get(s);if(h&&h!==o[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,o[0])}}const t=o=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(o[0])?.id,E=e.external.uri??(x=>x);if(p)return{ref:E(p)};const _=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=_,{defId:_,ref:`${E("__shared")}#/${s}/${_}`}}if(o[1]===r)return{ref:"#"};const f=`#/${s}/`,g=o[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:f+g}},n=o=>{if(o[1].schema.$ref)return;const s=o[1],{ref:h,defId:f}=t(o);s.def={...s.schema},f&&(s.defId=f);const g=s.schema;for(const p in g)delete g[p];g.$ref=h};if(e.cycles==="throw")for(const o of e.seen.entries()){const s=o[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/ - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const s=o[1];if(u===o[0]){n(o);continue}if(e.external){const f=e.external.registry.get(o[0])?.id;if(u!==o[0]&&f){n(o);continue}}if(e.metadataRegistry.get(o[0])?.id){n(o);continue}if(s.cycle){n(o);continue}if(s.count>1&&e.reused==="ref"){n(o);continue}}}function su(e,u){const r=e.seen.get(u);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=o=>{const s=e.seen.get(o);if(s.ref===null)return;const h=s.def??s.schema,f={...h},g=s.ref;if(s.ref=null,g){i(g);const E=e.seen.get(g),_=E.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(_)):Object.assign(h,_),Object.assign(h,f),o._zod.parent===g)for(const $ in h)$==="$ref"||$==="allOf"||$ in f||delete h[$];if(_.$ref&&E.def)for(const $ in h)$==="$ref"||$==="allOf"||$ in E.def&&JSON.stringify(h[$])===JSON.stringify(E.def[$])&&delete h[$]}const p=o._zod.parent;if(p&&p!==g){i(p);const E=e.seen.get(p);if(E?.schema.$ref&&(h.$ref=E.schema.$ref,E.def))for(const _ in h)_==="$ref"||_==="allOf"||_ in E.def&&JSON.stringify(h[_])===JSON.stringify(E.def[_])&&delete h[_]}e.override({zodSchema:o,jsonSchema:h,path:s.path??[]})};for(const o of[...e.seen.entries()].reverse())i(o[0]);const t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(u)?.id;if(!o)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(o)}Object.assign(t,r.def??r.schema);const n=e.external?.defs??{};for(const o of e.seen.entries()){const s=o[1];s.def&&s.defId&&(n[s.defId]=s.def)}e.external||Object.keys(n).length>0&&(e.target==="draft-2020-12"?t.$defs=n:t.definitions=n);try{const o=JSON.parse(JSON.stringify(t));return Object.defineProperty(o,"~standard",{value:{...u["~standard"],jsonSchema:{input:Iu(u,"input",e.processors),output:Iu(u,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function it(e,u){const r=u??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return it(i.element,r);if(i.type==="set")return it(i.valueType,r);if(i.type==="lazy")return it(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return it(i.innerType,r);if(i.type==="intersection")return it(i.left,r)||it(i.right,r);if(i.type==="record"||i.type==="map")return it(i.keyType,r)||it(i.valueType,r);if(i.type==="pipe")return it(i.in,r)||it(i.out,r);if(i.type==="object"){for(const t in i.shape)if(it(i.shape[t],r))return!0;return!1}if(i.type==="union"){for(const t of i.options)if(it(t,r))return!0;return!1}if(i.type==="tuple"){for(const t of i.items)if(it(t,r))return!0;return!!(i.rest&&it(i.rest,r))}return!1}var Mc=(e,u={})=>r=>{const i=ou({...r,processors:u});return Se(e,i),au(i,e),su(i,e)},Iu=(e,u,r={})=>i=>{const{libraryOptions:t,target:n}=i??{},o=ou({...t??{},target:n,io:u,processors:r});return Se(e,o),au(o,e),su(o,e)},rg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Rc=(e,u,r,i)=>{const t=r;t.type="string";const{minimum:n,maximum:o,format:s,patterns:h,contentEncoding:f}=e._zod.bag;if(typeof n=="number"&&(t.minLength=n),typeof o=="number"&&(t.maxLength=o),s&&(t.format=rg[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),f&&(t.contentEncoding=f),h&&h.size>0){const g=[...h];g.length===1?t.pattern=g[0].source:g.length>1&&(t.allOf=[...g.map(p=>({...u.target==="draft-07"||u.target==="draft-04"||u.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Lc=(e,u,r,i)=>{const t=r,{minimum:n,maximum:o,format:s,multipleOf:h,exclusiveMaximum:f,exclusiveMinimum:g}=e._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number",typeof g=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(t.minimum=g,t.exclusiveMinimum=!0):t.exclusiveMinimum=g),typeof n=="number"&&(t.minimum=n,typeof g=="number"&&u.target!=="draft-04"&&(g>=n?delete t.minimum:delete t.exclusiveMinimum)),typeof f=="number"&&(u.target==="draft-04"||u.target==="openapi-3.0"?(t.maximum=f,t.exclusiveMaximum=!0):t.exclusiveMaximum=f),typeof o=="number"&&(t.maximum=o,typeof f=="number"&&u.target!=="draft-04"&&(f<=o?delete t.maximum:delete t.exclusiveMaximum)),typeof h=="number"&&(t.multipleOf=h)},Jc=(e,u,r,i)=>{r.type="boolean"},qc=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Vc=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Wc=(e,u,r,i)=>{u.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Gc=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Kc=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Yc=(e,u,r,i)=>{r.not={}},Xc=(e,u,r,i)=>{},Qc=(e,u,r,i)=>{},Hc=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},el=(e,u,r,i)=>{const t=e._zod.def,n=Bn(t.entries);n.every(o=>typeof o=="number")&&(r.type="number"),n.every(o=>typeof o=="string")&&(r.type="string"),r.enum=n},tl=(e,u,r,i)=>{const t=e._zod.def,n=[];for(const o of t.values)if(o===void 0){if(u.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(u.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(o))}else n.push(o);if(n.length!==0)if(n.length===1){const o=n[0];r.type=o===null?"null":typeof o,u.target==="draft-04"||u.target==="openapi-3.0"?r.enum=[o]:r.const=o}else n.every(o=>typeof o=="number")&&(r.type="number"),n.every(o=>typeof o=="string")&&(r.type="string"),n.every(o=>typeof o=="boolean")&&(r.type="boolean"),n.every(o=>o===null)&&(r.type="null"),r.enum=n},ul=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},rl=(e,u,r,i)=>{const t=r,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=n.source},nl=(e,u,r,i)=>{const t=r,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:h}=e._zod.bag;o!==void 0&&(n.minLength=o),s!==void 0&&(n.maxLength=s),h?h.length===1?(n.contentMediaType=h[0],Object.assign(t,n)):(Object.assign(t,n),t.anyOf=h.map(f=>({contentMediaType:f}))):Object.assign(t,n)},il=(e,u,r,i)=>{r.type="boolean"},ol=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},al=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},sl=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},cl=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},ll=(e,u,r,i)=>{if(u.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},dl=(e,u,r,i)=>{const t=r,n=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o=="number"&&(t.minItems=o),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=Se(n.element,u,{...i,path:[...i.path,"items"]})},fl=(e,u,r,i)=>{const t=r,n=e._zod.def;t.type="object",t.properties={};const o=n.shape;for(const f in o)t.properties[f]=Se(o[f],u,{...i,path:[...i.path,"properties",f]});const s=new Set(Object.keys(o)),h=new Set([...s].filter(f=>{const g=n.shape[f]._zod;return u.io==="input"?g.optin===void 0:g.optout===void 0}));h.size>0&&(t.required=Array.from(h)),n.catchall?._zod.def.type==="never"?t.additionalProperties=!1:n.catchall?n.catchall&&(t.additionalProperties=Se(n.catchall,u,{...i,path:[...i.path,"additionalProperties"]})):u.io==="output"&&(t.additionalProperties=!1)},Ai=(e,u,r,i)=>{const t=e._zod.def,n=t.inclusive===!1,o=t.options.map((s,h)=>Se(s,u,{...i,path:[...i.path,n?"oneOf":"anyOf",h]}));n?r.oneOf=o:r.anyOf=o},hl=(e,u,r,i)=>{const t=e._zod.def,n=Se(t.left,u,{...i,path:[...i.path,"allOf",0]}),o=Se(t.right,u,{...i,path:[...i.path,"allOf",1]}),s=f=>"allOf"in f&&Object.keys(f).length===1,h=[...s(n)?n.allOf:[n],...s(o)?o.allOf:[o]];r.allOf=h},ml=(e,u,r,i)=>{const t=r,n=e._zod.def;t.type="array";const o=u.target==="draft-2020-12"?"prefixItems":"items",s=u.target==="draft-2020-12"||u.target==="openapi-3.0"?"items":"additionalItems",h=n.items.map((E,_)=>Se(E,u,{...i,path:[...i.path,o,_]})),f=n.rest?Se(n.rest,u,{...i,path:[...i.path,s,...u.target==="openapi-3.0"?[n.items.length]:[]]}):null;u.target==="draft-2020-12"?(t.prefixItems=h,f&&(t.items=f)):u.target==="openapi-3.0"?(t.items={anyOf:h},f&&t.items.anyOf.push(f),t.minItems=h.length,f||(t.maxItems=h.length)):(t.items=h,f&&(t.additionalItems=f));const{minimum:g,maximum:p}=e._zod.bag;typeof g=="number"&&(t.minItems=g),typeof p=="number"&&(t.maxItems=p)},gl=(e,u,r,i)=>{const t=r,n=e._zod.def;t.type="object";const o=n.keyType,h=o._zod.bag?.patterns;if(n.mode==="loose"&&h&&h.size>0){const g=Se(n.valueType,u,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(const p of h)t.patternProperties[p.source]=g}else(u.target==="draft-07"||u.target==="draft-2020-12")&&(t.propertyNames=Se(n.keyType,u,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=Se(n.valueType,u,{...i,path:[...i.path,"additionalProperties"]});const f=o._zod.values;if(f){const g=[...f].filter(p=>typeof p=="string"||typeof p=="number");g.length>0&&(t.required=g)}},vl=(e,u,r,i)=>{const t=e._zod.def,n=Se(t.innerType,u,i),o=u.seen.get(e);u.target==="openapi-3.0"?(o.ref=t.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},pl=(e,u,r,i)=>{const t=e._zod.def;Se(t.innerType,u,i);const n=u.seen.get(e);n.ref=t.innerType},El=(e,u,r,i)=>{const t=e._zod.def;Se(t.innerType,u,i);const n=u.seen.get(e);n.ref=t.innerType,r.default=JSON.parse(JSON.stringify(t.defaultValue))},Dl=(e,u,r,i)=>{const t=e._zod.def;Se(t.innerType,u,i);const n=u.seen.get(e);n.ref=t.innerType,u.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},yl=(e,u,r,i)=>{const t=e._zod.def;Se(t.innerType,u,i);const n=u.seen.get(e);n.ref=t.innerType;let o;try{o=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},_l=(e,u,r,i)=>{const t=e._zod.def,n=u.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;Se(n,u,i);const o=u.seen.get(e);o.ref=n},wl=(e,u,r,i)=>{const t=e._zod.def;Se(t.innerType,u,i);const n=u.seen.get(e);n.ref=t.innerType,r.readOnly=!0},Cl=(e,u,r,i)=>{const t=e._zod.def;Se(t.innerType,u,i);const n=u.seen.get(e);n.ref=t.innerType},ki=(e,u,r,i)=>{const t=e._zod.def;Se(t.innerType,u,i);const n=u.seen.get(e);n.ref=t.innerType},xl=(e,u,r,i)=>{const t=e._zod.innerType;Se(t,u,i);const n=u.seen.get(e);n.ref=t},Si={string:Rc,number:Lc,boolean:Jc,bigint:qc,symbol:Vc,null:Wc,undefined:Gc,void:Kc,never:Yc,any:Xc,unknown:Qc,date:Hc,enum:el,literal:tl,nan:ul,template_literal:rl,file:nl,success:il,custom:ol,function:al,transform:sl,map:cl,set:ll,array:dl,object:fl,union:Ai,intersection:hl,tuple:ml,record:gl,nullable:vl,nonoptional:pl,default:El,prefault:Dl,catch:yl,pipe:_l,readonly:wl,promise:Cl,optional:ki,lazy:xl};function bl(e,u){if("_idmap"in e){const i=e,t=ou({...u,processors:Si}),n={};for(const h of i._idmap.entries()){const[f,g]=h;Se(g,t)}const o={},s={registry:i,uri:u?.uri,defs:n};t.external=s;for(const h of i._idmap.entries()){const[f,g]=h;au(t,g),o[f]=su(t,g)}if(Object.keys(n).length>0){const h=t.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[h]:n}}return{schemas:o}}const r=ou({...u,processors:Si});return Se(e,r),au(r,e),su(r,e)}var ng=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let u=e?.target??"draft-2020-12";u==="draft-4"&&(u="draft-04"),u==="draft-7"&&(u="draft-07"),this.ctx=ou({processors:Si,target:u,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,u={path:[],schemaPath:[]}){return Se(e,this.ctx,u)}emit(e,u){u&&(u.cycles&&(this.ctx.cycles=u.cycles),u.reused&&(this.ctx.reused=u.reused),u.external&&(this.ctx.external=u.external)),au(this.ctx,e);const r=su(this.ctx,e),{"~standard":i,...t}=r;return t}},ig={},$l={};Et($l,{ZodAny:()=>Li,ZodArray:()=>Wi,ZodBase64:()=>Lr,ZodBase64URL:()=>Jr,ZodBigInt:()=>Pu,ZodBigIntFormat:()=>Gr,ZodBoolean:()=>Tu,ZodCIDRv4:()=>Mr,ZodCIDRv6:()=>Rr,ZodCUID:()=>Nr,ZodCUID2:()=>jr,ZodCatch:()=>vo,ZodCodec:()=>rn,ZodCustom:()=>Vu,ZodCustomStringFormat:()=>cu,ZodDate:()=>Yr,ZodDefault:()=>co,ZodDiscriminatedUnion:()=>Ki,ZodE164:()=>qr,ZodEmail:()=>Fr,ZodEmoji:()=>Ir,ZodEnum:()=>lu,ZodExactOptional:()=>oo,ZodFile:()=>no,ZodFunction:()=>bo,ZodGUID:()=>Nu,ZodIPv4:()=>Ur,ZodIPv6:()=>Zr,ZodIntersection:()=>Yi,ZodJWT:()=>Vr,ZodKSUID:()=>Pr,ZodLazy:()=>wo,ZodLiteral:()=>ro,ZodMAC:()=>Oi,ZodMap:()=>to,ZodNaN:()=>Eo,ZodNanoID:()=>zr,ZodNever:()=>qi,ZodNonOptional:()=>tn,ZodNull:()=>Mi,ZodNullable:()=>so,ZodNumber:()=>Ou,ZodNumberFormat:()=>Vt,ZodObject:()=>Zu,ZodOptional:()=>en,ZodPipe:()=>un,ZodPrefault:()=>fo,ZodPromise:()=>xo,ZodReadonly:()=>Do,ZodRecord:()=>Ru,ZodSet:()=>uo,ZodString:()=>zu,ZodStringFormat:()=>ze,ZodSuccess:()=>go,ZodSymbol:()=>Ui,ZodTemplateLiteral:()=>_o,ZodTransform:()=>io,ZodTuple:()=>Qi,ZodType:()=>De,ZodULID:()=>Or,ZodURL:()=>ju,ZodUUID:()=>wt,ZodUndefined:()=>Zi,ZodUnion:()=>Mu,ZodUnknown:()=>Ji,ZodVoid:()=>Vi,ZodXID:()=>Tr,ZodXor:()=>Gi,_ZodString:()=>kr,_default:()=>lo,_function:()=>nn,any:()=>Ad,array:()=>Uu,base64:()=>dd,base64url:()=>fd,bigint:()=>Cd,boolean:()=>Pi,catch:()=>po,check:()=>Yd,cidrv4:()=>cd,cidrv6:()=>ld,codec:()=>Wd,cuid:()=>td,cuid2:()=>ud,custom:()=>Xd,date:()=>Sd,describe:()=>Qd,discriminatedUnion:()=>Od,e164:()=>hd,email:()=>ql,emoji:()=>Hl,enum:()=>Qr,exactOptional:()=>ao,file:()=>Ld,float32:()=>Dd,float64:()=>yd,function:()=>nn,guid:()=>Vl,hash:()=>Ed,hex:()=>pd,hostname:()=>vd,httpUrl:()=>Ql,instanceof:()=>e4,int:()=>Wr,int32:()=>_d,int64:()=>xd,intersection:()=>Xi,ipv4:()=>od,ipv6:()=>sd,json:()=>u4,jwt:()=>md,keyof:()=>Fd,ksuid:()=>id,lazy:()=>Co,literal:()=>Rd,looseObject:()=>Nd,looseRecord:()=>Pd,mac:()=>ad,map:()=>Ud,meta:()=>Hd,nan:()=>Vd,nanoid:()=>ed,nativeEnum:()=>Md,never:()=>Kr,nonoptional:()=>mo,null:()=>Ri,nullable:()=>Ju,nullish:()=>Jd,number:()=>Ti,object:()=>Id,optional:()=>Lu,partialRecord:()=>Td,pipe:()=>qu,prefault:()=>ho,preprocess:()=>r4,promise:()=>Kd,readonly:()=>yo,record:()=>eo,refine:()=>$o,set:()=>Zd,strictObject:()=>zd,string:()=>Sr,stringFormat:()=>gd,stringbool:()=>t4,success:()=>qd,superRefine:()=>Bo,symbol:()=>$d,templateLiteral:()=>Gd,transform:()=>Hr,tuple:()=>Hi,uint32:()=>wd,uint64:()=>bd,ulid:()=>rd,undefined:()=>Bd,union:()=>Xr,unknown:()=>Wt,url:()=>Xl,uuid:()=>Wl,uuidv4:()=>Gl,uuidv6:()=>Kl,uuidv7:()=>Yl,void:()=>kd,xid:()=>nd,xor:()=>jd});var Bl={};Et(Bl,{endsWith:()=>wr,gt:()=>Ot,gte:()=>st,includes:()=>yr,length:()=>Su,lowercase:()=>Er,lt:()=>jt,lte:()=>pt,maxLength:()=>ku,maxSize:()=>iu,mime:()=>Cr,minLength:()=>qt,minSize:()=>Tt,multipleOf:()=>nu,negative:()=>xi,nonnegative:()=>$i,nonpositive:()=>bi,normalize:()=>xr,overwrite:()=>Bt,positive:()=>Ci,property:()=>Bi,regex:()=>pr,size:()=>Au,slugify:()=>Ar,startsWith:()=>_r,toLowerCase:()=>$r,toUpperCase:()=>Br,trim:()=>br,uppercase:()=>Dr});var Fi={};Et(Fi,{ZodISODate:()=>zi,ZodISODateTime:()=>Ii,ZodISODuration:()=>ji,ZodISOTime:()=>Ni,date:()=>kl,datetime:()=>Al,duration:()=>Fl,time:()=>Sl});var Ii=N("ZodISODateTime",(e,u)=>{Fa.init(e,u),ze.init(e,u)});function Al(e){return ic(Ii,e)}var zi=N("ZodISODate",(e,u)=>{Ia.init(e,u),ze.init(e,u)});function kl(e){return oc(zi,e)}var Ni=N("ZodISOTime",(e,u)=>{za.init(e,u),ze.init(e,u)});function Sl(e){return ac(Ni,e)}var ji=N("ZodISODuration",(e,u)=>{Na.init(e,u),ze.init(e,u)});function Fl(e){return sc(ji,e)}var Il=(e,u)=>{Sn.init(e,u),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>In(e,r)},flatten:{value:r=>Fn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,rr,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,rr,2)}},isEmpty:{get(){return e.issues.length===0}}})},og=N("ZodError",Il),lt=N("ZodError",Il,{Parent:Error}),zl=Du(lt),Nl=yu(lt),jl=_u(lt),Ol=wu(lt),Tl=jn(lt),Pl=On(lt),Ul=Tn(lt),Zl=Pn(lt),Ml=Un(lt),Rl=Zn(lt),Ll=Mn(lt),Jl=Rn(lt),De=N("ZodType",(e,u)=>(pe.init(e,u),Object.assign(e["~standard"],{jsonSchema:{input:Iu(e,"input"),output:Iu(e,"output")}}),e.toJSONSchema=Mc(e,{}),e.def=u,e.type=u.type,Object.defineProperty(e,"_def",{value:u}),e.check=(...r)=>e.clone(xe.mergeDefs(u,{checks:[...u.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>mt(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>zl(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>jl(e,r,i),e.parseAsync=async(r,i)=>Nl(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Ol(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Tl(e,r,i),e.decode=(r,i)=>Pl(e,r,i),e.encodeAsync=async(r,i)=>Ul(e,r,i),e.decodeAsync=async(r,i)=>Zl(e,r,i),e.safeEncode=(r,i)=>Ml(e,r,i),e.safeDecode=(r,i)=>Rl(e,r,i),e.safeEncodeAsync=async(r,i)=>Ll(e,r,i),e.safeDecodeAsync=async(r,i)=>Jl(e,r,i),e.refine=(r,i)=>e.check($o(r,i)),e.superRefine=r=>e.check(Bo(r)),e.overwrite=r=>e.check(Bt(r)),e.optional=()=>Lu(e),e.exactOptional=()=>ao(e),e.nullable=()=>Ju(e),e.nullish=()=>Lu(Ju(e)),e.nonoptional=r=>mo(e,r),e.array=()=>Uu(e),e.or=r=>Xr([e,r]),e.and=r=>Xi(e,r),e.transform=r=>qu(e,Hr(r)),e.default=r=>lo(e,r),e.prefault=r=>ho(e,r),e.catch=r=>po(e,r),e.pipe=r=>qu(e,r),e.readonly=()=>yo(e),e.describe=r=>{const i=e.clone();return vt.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return vt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return vt.get(e);const i=e.clone();return vt.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),kr=N("_ZodString",(e,u)=>{$u.init(e,u),De.init(e,u),e._zod.processJSONSchema=(i,t,n)=>Rc(e,i,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(pr(...i)),e.includes=(...i)=>e.check(yr(...i)),e.startsWith=(...i)=>e.check(_r(...i)),e.endsWith=(...i)=>e.check(wr(...i)),e.min=(...i)=>e.check(qt(...i)),e.max=(...i)=>e.check(ku(...i)),e.length=(...i)=>e.check(Su(...i)),e.nonempty=(...i)=>e.check(qt(1,...i)),e.lowercase=i=>e.check(Er(i)),e.uppercase=i=>e.check(Dr(i)),e.trim=()=>e.check(br()),e.normalize=(...i)=>e.check(xr(...i)),e.toLowerCase=()=>e.check($r()),e.toUpperCase=()=>e.check(Br()),e.slugify=()=>e.check(Ar())}),zu=N("ZodString",(e,u)=>{$u.init(e,u),kr.init(e,u),e.email=r=>e.check(ri(Fr,r)),e.url=r=>e.check(vr(ju,r)),e.jwt=r=>e.check(wi(Vr,r)),e.emoji=r=>e.check(si(Ir,r)),e.guid=r=>e.check(gr(Nu,r)),e.uuid=r=>e.check(ni(wt,r)),e.uuidv4=r=>e.check(ii(wt,r)),e.uuidv6=r=>e.check(oi(wt,r)),e.uuidv7=r=>e.check(ai(wt,r)),e.nanoid=r=>e.check(ci(zr,r)),e.guid=r=>e.check(gr(Nu,r)),e.cuid=r=>e.check(li(Nr,r)),e.cuid2=r=>e.check(di(jr,r)),e.ulid=r=>e.check(fi(Or,r)),e.base64=r=>e.check(Di(Lr,r)),e.base64url=r=>e.check(yi(Jr,r)),e.xid=r=>e.check(hi(Tr,r)),e.ksuid=r=>e.check(mi(Pr,r)),e.ipv4=r=>e.check(gi(Ur,r)),e.ipv6=r=>e.check(vi(Zr,r)),e.cidrv4=r=>e.check(pi(Mr,r)),e.cidrv6=r=>e.check(Ei(Rr,r)),e.e164=r=>e.check(_i(qr,r)),e.datetime=r=>e.check(Al(r)),e.date=r=>e.check(kl(r)),e.time=r=>e.check(Sl(r)),e.duration=r=>e.check(Fl(r))});function Sr(e){return tc(zu,e)}var ze=N("ZodStringFormat",(e,u)=>{Ie.init(e,u),kr.init(e,u)}),Fr=N("ZodEmail",(e,u)=>{wa.init(e,u),ze.init(e,u)});function ql(e){return ri(Fr,e)}var Nu=N("ZodGUID",(e,u)=>{ya.init(e,u),ze.init(e,u)});function Vl(e){return gr(Nu,e)}var wt=N("ZodUUID",(e,u)=>{_a.init(e,u),ze.init(e,u)});function Wl(e){return ni(wt,e)}function Gl(e){return ii(wt,e)}function Kl(e){return oi(wt,e)}function Yl(e){return ai(wt,e)}var ju=N("ZodURL",(e,u)=>{Ca.init(e,u),ze.init(e,u)});function Xl(e){return vr(ju,e)}function Ql(e){return vr(ju,{protocol:/^https?$/,hostname:Jt.domain,...xe.normalizeParams(e)})}var Ir=N("ZodEmoji",(e,u)=>{xa.init(e,u),ze.init(e,u)});function Hl(e){return si(Ir,e)}var zr=N("ZodNanoID",(e,u)=>{ba.init(e,u),ze.init(e,u)});function ed(e){return ci(zr,e)}var Nr=N("ZodCUID",(e,u)=>{$a.init(e,u),ze.init(e,u)});function td(e){return li(Nr,e)}var jr=N("ZodCUID2",(e,u)=>{Ba.init(e,u),ze.init(e,u)});function ud(e){return di(jr,e)}var Or=N("ZodULID",(e,u)=>{Aa.init(e,u),ze.init(e,u)});function rd(e){return fi(Or,e)}var Tr=N("ZodXID",(e,u)=>{ka.init(e,u),ze.init(e,u)});function nd(e){return hi(Tr,e)}var Pr=N("ZodKSUID",(e,u)=>{Sa.init(e,u),ze.init(e,u)});function id(e){return mi(Pr,e)}var Ur=N("ZodIPv4",(e,u)=>{ja.init(e,u),ze.init(e,u)});function od(e){return gi(Ur,e)}var Oi=N("ZodMAC",(e,u)=>{Ta.init(e,u),ze.init(e,u)});function ad(e){return rc(Oi,e)}var Zr=N("ZodIPv6",(e,u)=>{Oa.init(e,u),ze.init(e,u)});function sd(e){return vi(Zr,e)}var Mr=N("ZodCIDRv4",(e,u)=>{Pa.init(e,u),ze.init(e,u)});function cd(e){return pi(Mr,e)}var Rr=N("ZodCIDRv6",(e,u)=>{Ua.init(e,u),ze.init(e,u)});function ld(e){return Ei(Rr,e)}var Lr=N("ZodBase64",(e,u)=>{Za.init(e,u),ze.init(e,u)});function dd(e){return Di(Lr,e)}var Jr=N("ZodBase64URL",(e,u)=>{Ra.init(e,u),ze.init(e,u)});function fd(e){return yi(Jr,e)}var qr=N("ZodE164",(e,u)=>{La.init(e,u),ze.init(e,u)});function hd(e){return _i(qr,e)}var Vr=N("ZodJWT",(e,u)=>{qa.init(e,u),ze.init(e,u)});function md(e){return wi(Vr,e)}var cu=N("ZodCustomStringFormat",(e,u)=>{Va.init(e,u),ze.init(e,u)});function gd(e,u,r={}){return Fu(cu,e,u,r)}function vd(e){return Fu(cu,"hostname",Jt.hostname,e)}function pd(e){return Fu(cu,"hex",Jt.hex,e)}function Ed(e,u){const r=u?.enc??"hex",i=`${e}_${r}`,t=Jt[i];if(!t)throw new Error(`Unrecognized hash format: ${i}`);return Fu(cu,i,t,u)}var Ou=N("ZodNumber",(e,u)=>{Gn.init(e,u),De.init(e,u),e._zod.processJSONSchema=(i,t,n)=>Lc(e,i,t),e.gt=(i,t)=>e.check(Ot(i,t)),e.gte=(i,t)=>e.check(st(i,t)),e.min=(i,t)=>e.check(st(i,t)),e.lt=(i,t)=>e.check(jt(i,t)),e.lte=(i,t)=>e.check(pt(i,t)),e.max=(i,t)=>e.check(pt(i,t)),e.int=i=>e.check(Wr(i)),e.safe=i=>e.check(Wr(i)),e.positive=i=>e.check(Ot(0,i)),e.nonnegative=i=>e.check(st(0,i)),e.negative=i=>e.check(jt(0,i)),e.nonpositive=i=>e.check(pt(0,i)),e.multipleOf=(i,t)=>e.check(nu(i,t)),e.step=(i,t)=>e.check(nu(i,t)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ti(e){return cc(Ou,e)}var Vt=N("ZodNumberFormat",(e,u)=>{Wa.init(e,u),Ou.init(e,u)});function Wr(e){return dc(Vt,e)}function Dd(e){return fc(Vt,e)}function yd(e){return hc(Vt,e)}function _d(e){return mc(Vt,e)}function wd(e){return gc(Vt,e)}var Tu=N("ZodBoolean",(e,u)=>{Kn.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Jc(e,r,i)});function Pi(e){return vc(Tu,e)}var Pu=N("ZodBigInt",(e,u)=>{Yn.init(e,u),De.init(e,u),e._zod.processJSONSchema=(i,t,n)=>qc(e,i),e.gte=(i,t)=>e.check(st(i,t)),e.min=(i,t)=>e.check(st(i,t)),e.gt=(i,t)=>e.check(Ot(i,t)),e.gte=(i,t)=>e.check(st(i,t)),e.min=(i,t)=>e.check(st(i,t)),e.lt=(i,t)=>e.check(jt(i,t)),e.lte=(i,t)=>e.check(pt(i,t)),e.max=(i,t)=>e.check(pt(i,t)),e.positive=i=>e.check(Ot(BigInt(0),i)),e.negative=i=>e.check(jt(BigInt(0),i)),e.nonpositive=i=>e.check(pt(BigInt(0),i)),e.nonnegative=i=>e.check(st(BigInt(0),i)),e.multipleOf=(i,t)=>e.check(nu(i,t));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Cd(e){return Ec(Pu,e)}var Gr=N("ZodBigIntFormat",(e,u)=>{Ga.init(e,u),Pu.init(e,u)});function xd(e){return yc(Gr,e)}function bd(e){return _c(Gr,e)}var Ui=N("ZodSymbol",(e,u)=>{Ka.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Vc(e,r)});function $d(e){return wc(Ui,e)}var Zi=N("ZodUndefined",(e,u)=>{Ya.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Gc(e,r)});function Bd(e){return Cc(Zi,e)}var Mi=N("ZodNull",(e,u)=>{Xa.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Wc(e,r,i)});function Ri(e){return xc(Mi,e)}var Li=N("ZodAny",(e,u)=>{Qa.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Xc()});function Ad(){return bc(Li)}var Ji=N("ZodUnknown",(e,u)=>{Ha.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Qc()});function Wt(){return $c(Ji)}var qi=N("ZodNever",(e,u)=>{es.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Yc(e,r,i)});function Kr(e){return Bc(qi,e)}var Vi=N("ZodVoid",(e,u)=>{ts.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Kc(e,r)});function kd(e){return Ac(Vi,e)}var Yr=N("ZodDate",(e,u)=>{us.init(e,u),De.init(e,u),e._zod.processJSONSchema=(i,t,n)=>Hc(e,i),e.min=(i,t)=>e.check(st(i,t)),e.max=(i,t)=>e.check(pt(i,t));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Sd(e){return kc(Yr,e)}var Wi=N("ZodArray",(e,u)=>{ns.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>dl(e,r,i,t),e.element=u.element,e.min=(r,i)=>e.check(qt(r,i)),e.nonempty=r=>e.check(qt(1,r)),e.max=(r,i)=>e.check(ku(r,i)),e.length=(r,i)=>e.check(Su(r,i)),e.unwrap=()=>e.element});function Uu(e,u){return Ic(Wi,e,u)}function Fd(e){const u=e._zod.def.shape;return Qr(Object.keys(u))}var Zu=N("ZodObject",(e,u)=>{ss.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>fl(e,r,i,t),xe.defineLazy(e,"shape",()=>u.shape),e.keyof=()=>Qr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Wt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Wt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Kr()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>xe.extend(e,r),e.safeExtend=r=>xe.safeExtend(e,r),e.merge=r=>xe.merge(e,r),e.pick=r=>xe.pick(e,r),e.omit=r=>xe.omit(e,r),e.partial=(...r)=>xe.partial(en,e,r[0]),e.required=(...r)=>xe.required(tn,e,r[0])});function Id(e,u){const r={type:"object",shape:e??{},...xe.normalizeParams(u)};return new Zu(r)}function zd(e,u){return new Zu({type:"object",shape:e,catchall:Kr(),...xe.normalizeParams(u)})}function Nd(e,u){return new Zu({type:"object",shape:e,catchall:Wt(),...xe.normalizeParams(u)})}var Mu=N("ZodUnion",(e,u)=>{lr.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Ai(e,r,i,t),e.options=u.options});function Xr(e,u){return new Mu({type:"union",options:e,...xe.normalizeParams(u)})}var Gi=N("ZodXor",(e,u)=>{Mu.init(e,u),ds.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Ai(e,r,i,t),e.options=u.options});function jd(e,u){return new Gi({type:"union",options:e,inclusive:!1,...xe.normalizeParams(u)})}var Ki=N("ZodDiscriminatedUnion",(e,u)=>{Mu.init(e,u),fs.init(e,u)});function Od(e,u,r){return new Ki({type:"union",options:u,discriminator:e,...xe.normalizeParams(r)})}var Yi=N("ZodIntersection",(e,u)=>{hs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>hl(e,r,i,t)});function Xi(e,u){return new Yi({type:"intersection",left:e,right:u})}var Qi=N("ZodTuple",(e,u)=>{Qn.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>ml(e,r,i,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Hi(e,u,r){const i=u instanceof pe,t=i?r:u,n=i?u:null;return new Qi({type:"tuple",items:e,rest:n,...xe.normalizeParams(t)})}var Ru=N("ZodRecord",(e,u)=>{gs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>gl(e,r,i,t),e.keyType=u.keyType,e.valueType=u.valueType});function eo(e,u,r){return new Ru({type:"record",keyType:e,valueType:u,...xe.normalizeParams(r)})}function Td(e,u,r){const i=mt(e);return i._zod.values=void 0,new Ru({type:"record",keyType:i,valueType:u,...xe.normalizeParams(r)})}function Pd(e,u,r){return new Ru({type:"record",keyType:e,valueType:u,mode:"loose",...xe.normalizeParams(r)})}var to=N("ZodMap",(e,u)=>{vs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>cl(e,r),e.keyType=u.keyType,e.valueType=u.valueType,e.min=(...r)=>e.check(Tt(...r)),e.nonempty=r=>e.check(Tt(1,r)),e.max=(...r)=>e.check(iu(...r)),e.size=(...r)=>e.check(Au(...r))});function Ud(e,u,r){return new to({type:"map",keyType:e,valueType:u,...xe.normalizeParams(r)})}var uo=N("ZodSet",(e,u)=>{Es.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>ll(e,r),e.min=(...r)=>e.check(Tt(...r)),e.nonempty=r=>e.check(Tt(1,r)),e.max=(...r)=>e.check(iu(...r)),e.size=(...r)=>e.check(Au(...r))});function Zd(e,u){return new uo({type:"set",valueType:e,...xe.normalizeParams(u)})}var lu=N("ZodEnum",(e,u)=>{ys.init(e,u),De.init(e,u),e._zod.processJSONSchema=(i,t,n)=>el(e,i,t),e.enum=u.entries,e.options=Object.values(u.entries);const r=new Set(Object.keys(u.entries));e.extract=(i,t)=>{const n={};for(const o of i)if(r.has(o))n[o]=u.entries[o];else throw new Error(`Key ${o} not found in enum`);return new lu({...u,checks:[],...xe.normalizeParams(t),entries:n})},e.exclude=(i,t)=>{const n={...u.entries};for(const o of i)if(r.has(o))delete n[o];else throw new Error(`Key ${o} not found in enum`);return new lu({...u,checks:[],...xe.normalizeParams(t),entries:n})}});function Qr(e,u){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new lu({type:"enum",entries:r,...xe.normalizeParams(u)})}function Md(e,u){return new lu({type:"enum",entries:e,...xe.normalizeParams(u)})}var ro=N("ZodLiteral",(e,u)=>{_s.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>tl(e,r,i),e.values=new Set(u.values),Object.defineProperty(e,"value",{get(){if(u.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return u.values[0]}})});function Rd(e,u){return new ro({type:"literal",values:Array.isArray(e)?e:[e],...xe.normalizeParams(u)})}var no=N("ZodFile",(e,u)=>{ws.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>nl(e,r,i),e.min=(r,i)=>e.check(Tt(r,i)),e.max=(r,i)=>e.check(iu(r,i)),e.mime=(r,i)=>e.check(Cr(Array.isArray(r)?r:[r],i))});function Ld(e){return zc(no,e)}var io=N("ZodTransform",(e,u)=>{Cs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>sl(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new tr(e.constructor.name);r.addIssue=n=>{if(typeof n=="string")r.issues.push(xe.issue(n,r.value,u));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push(xe.issue(o))}};const t=u.transform(r.value,r);return t instanceof Promise?t.then(n=>(r.value=n,r)):(r.value=t,r)}});function Hr(e){return new io({type:"transform",transform:e})}var en=N("ZodOptional",(e,u)=>{Hn.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>ki(e,r,i,t),e.unwrap=()=>e._zod.def.innerType});function Lu(e){return new en({type:"optional",innerType:e})}var oo=N("ZodExactOptional",(e,u)=>{bs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>ki(e,r,i,t),e.unwrap=()=>e._zod.def.innerType});function ao(e){return new oo({type:"optional",innerType:e})}var so=N("ZodNullable",(e,u)=>{$s.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>vl(e,r,i,t),e.unwrap=()=>e._zod.def.innerType});function Ju(e){return new so({type:"nullable",innerType:e})}function Jd(e){return Lu(Ju(e))}var co=N("ZodDefault",(e,u)=>{Bs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>El(e,r,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lo(e,u){return new co({type:"default",innerType:e,get defaultValue(){return typeof u=="function"?u():xe.shallowClone(u)}})}var fo=N("ZodPrefault",(e,u)=>{ks.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Dl(e,r,i,t),e.unwrap=()=>e._zod.def.innerType});function ho(e,u){return new fo({type:"prefault",innerType:e,get defaultValue(){return typeof u=="function"?u():xe.shallowClone(u)}})}var tn=N("ZodNonOptional",(e,u)=>{Ss.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>pl(e,r,i,t),e.unwrap=()=>e._zod.def.innerType});function mo(e,u){return new tn({type:"nonoptional",innerType:e,...xe.normalizeParams(u)})}var go=N("ZodSuccess",(e,u)=>{Is.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>il(e,r,i),e.unwrap=()=>e._zod.def.innerType});function qd(e){return new go({type:"success",innerType:e})}var vo=N("ZodCatch",(e,u)=>{zs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>yl(e,r,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function po(e,u){return new vo({type:"catch",innerType:e,catchValue:typeof u=="function"?u:()=>u})}var Eo=N("ZodNaN",(e,u)=>{Ns.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>ul(e,r)});function Vd(e){return Fc(Eo,e)}var un=N("ZodPipe",(e,u)=>{js.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>_l(e,r,i,t),e.in=u.in,e.out=u.out});function qu(e,u){return new un({type:"pipe",in:e,out:u})}var rn=N("ZodCodec",(e,u)=>{un.init(e,u),ei.init(e,u)});function Wd(e,u,r){return new rn({type:"pipe",in:e,out:u,transform:r.decode,reverseTransform:r.encode})}var Do=N("ZodReadonly",(e,u)=>{Os.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>wl(e,r,i,t),e.unwrap=()=>e._zod.def.innerType});function yo(e){return new Do({type:"readonly",innerType:e})}var _o=N("ZodTemplateLiteral",(e,u)=>{Ps.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>rl(e,r,i)});function Gd(e,u){return new _o({type:"template_literal",parts:e,...xe.normalizeParams(u)})}var wo=N("ZodLazy",(e,u)=>{Ms.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>xl(e,r,i,t),e.unwrap=()=>e._zod.def.getter()});function Co(e){return new wo({type:"lazy",getter:e})}var xo=N("ZodPromise",(e,u)=>{Zs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>Cl(e,r,i,t),e.unwrap=()=>e._zod.def.innerType});function Kd(e){return new xo({type:"promise",innerType:e})}var bo=N("ZodFunction",(e,u)=>{Us.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>al(e,r)});function nn(e){return new bo({type:"function",input:Array.isArray(e?.input)?Hi(e?.input):e?.input??Uu(Wt()),output:e?.output??Wt()})}var Vu=N("ZodCustom",(e,u)=>{Rs.init(e,u),De.init(e,u),e._zod.processJSONSchema=(r,i,t)=>ol(e,r)});function Yd(e){const u=new Ue({check:"custom"});return u._zod.check=e,u}function Xd(e,u){return Nc(Vu,e??(()=>!0),u)}function $o(e,u={}){return jc(Vu,e,u)}function Bo(e){return Oc(e)}var Qd=Pc,Hd=Uc;function e4(e,u={}){const r=new Vu({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...xe.normalizeParams(u)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var t4=(...e)=>Zc({Codec:rn,Boolean:Tu,String:zu},...e);function u4(e){const u=Co(()=>Xr([Sr(e),Ti(),Pi(),Ri(),Uu(u),eo(Sr(),u)]));return u}function r4(e,u){return qu(Hr(e),u)}var ag={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function sg(e){tt({customError:e})}function cg(){return tt().customError}var Ao;Ao||(Ao={});var Q={...$l,...Bl,iso:Fi},lg=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function dg(e,u){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":u??"draft-2020-12"}function fg(e,u){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return u.rootSchema;const i=u.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){const t=r[1];if(!t||!u.defs[t])throw new Error(`Reference not found: ${e}`);return u.defs[t]}throw new Error(`Reference not found: ${e}`)}function n4(e,u){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Q.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const t=e.$ref;if(u.refs.has(t))return u.refs.get(t);if(u.processing.has(t))return Q.lazy(()=>{if(!u.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return u.refs.get(t)});u.processing.add(t);const n=fg(t,u),o=ut(n,u);return u.refs.set(t,o),u.processing.delete(t),o}if(e.enum!==void 0){const t=e.enum;if(u.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return Q.null();if(t.length===0)return Q.never();if(t.length===1)return Q.literal(t[0]);if(t.every(o=>typeof o=="string"))return Q.enum(t);const n=t.map(o=>Q.literal(o));return n.length<2?n[0]:Q.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);const r=e.type;if(Array.isArray(r)){const t=r.map(n=>{const o={...e,type:n};return n4(o,u)});return t.length===0?Q.never():t.length===1?t[0]:Q.union(t)}if(!r)return Q.any();let i;switch(r){case"string":{let t=Q.string();if(e.format){const n=e.format;n==="email"?t=t.check(Q.email()):n==="uri"||n==="uri-reference"?t=t.check(Q.url()):n==="uuid"||n==="guid"?t=t.check(Q.uuid()):n==="date-time"?t=t.check(Q.iso.datetime()):n==="date"?t=t.check(Q.iso.date()):n==="time"?t=t.check(Q.iso.time()):n==="duration"?t=t.check(Q.iso.duration()):n==="ipv4"?t=t.check(Q.ipv4()):n==="ipv6"?t=t.check(Q.ipv6()):n==="mac"?t=t.check(Q.mac()):n==="cidr"?t=t.check(Q.cidrv4()):n==="cidr-v6"?t=t.check(Q.cidrv6()):n==="base64"?t=t.check(Q.base64()):n==="base64url"?t=t.check(Q.base64url()):n==="e164"?t=t.check(Q.e164()):n==="jwt"?t=t.check(Q.jwt()):n==="emoji"?t=t.check(Q.emoji()):n==="nanoid"?t=t.check(Q.nanoid()):n==="cuid"?t=t.check(Q.cuid()):n==="cuid2"?t=t.check(Q.cuid2()):n==="ulid"?t=t.check(Q.ulid()):n==="xid"?t=t.check(Q.xid()):n==="ksuid"&&(t=t.check(Q.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t=r==="integer"?Q.number().int():Q.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":{i=Q.boolean();break}case"null":{i=Q.null();break}case"object":{const t={},n=e.properties||{},o=new Set(e.required||[]);for(const[h,f]of Object.entries(n)){const g=ut(f,u);t[h]=o.has(h)?g:g.optional()}if(e.propertyNames){const h=ut(e.propertyNames,u),f=e.additionalProperties&&typeof e.additionalProperties=="object"?ut(e.additionalProperties,u):Q.any();if(Object.keys(t).length===0){i=Q.record(h,f);break}const g=Q.object(t).passthrough(),p=Q.looseRecord(h,f);i=Q.intersection(g,p);break}if(e.patternProperties){const h=e.patternProperties,f=Object.keys(h),g=[];for(const E of f){const _=ut(h[E],u),x=Q.string().regex(new RegExp(E));g.push(Q.looseRecord(x,_))}const p=[];if(Object.keys(t).length>0&&p.push(Q.object(t).passthrough()),p.push(...g),p.length===0)i=Q.object({}).passthrough();else if(p.length===1)i=p[0];else{let E=Q.intersection(p[0],p[1]);for(let _=2;_ut(h,u)),s=n&&typeof n=="object"&&!Array.isArray(n)?ut(n,u):void 0;s?i=Q.tuple(o).rest(s):i=Q.tuple(o),typeof e.minItems=="number"&&(i=i.check(Q.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(n)){const o=n.map(h=>ut(h,u)),s=e.additionalItems&&typeof e.additionalItems=="object"?ut(e.additionalItems,u):void 0;s?i=Q.tuple(o).rest(s):i=Q.tuple(o),typeof e.minItems=="number"&&(i=i.check(Q.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Q.maxLength(e.maxItems)))}else if(n!==void 0){const o=ut(n,u);let s=Q.array(o);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=Q.array(Q.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ut(e,u){if(typeof e=="boolean")return e?Q.any():Q.never();let r=n4(e,u);const i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const s=e.anyOf.map(f=>ut(f,u)),h=Q.union(s);r=i?Q.intersection(r,h):h}if(e.oneOf&&Array.isArray(e.oneOf)){const s=e.oneOf.map(f=>ut(f,u)),h=Q.xor(s);r=i?Q.intersection(r,h):h}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:Q.any();else{let s=i?r:ut(e.allOf[0],u);const h=i?0:1;for(let f=h;f0&&u.registry.add(r,t),r}function hg(e,u){if(typeof e=="boolean")return e?Q.any():Q.never();const r=dg(e,u?.defaultTarget),i=e.$defs||e.definitions||{},t={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:u?.registry??vt};return ut(e,t)}var i4={};Et(i4,{bigint:()=>pg,boolean:()=>vg,date:()=>Eg,number:()=>gg,string:()=>mg});function mg(e){return uc(zu,e)}function gg(e){return lc(Ou,e)}function vg(e){return pc(Tu,e)}function pg(e){return Dc(Pu,e)}function Eg(e){return Sc(Yr,e)}tt(qs());function At(e,u,r,i){function t(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function s(g){try{f(i.next(g))}catch(p){o(p)}}function h(g){try{f(i.throw(g))}catch(p){o(p)}}function f(g){g.done?n(g.value):t(g.value).then(s,h)}f((i=i.apply(e,[])).next())})}var Dg={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow},qe=class extends Error{constructor(e,u,r){super(e),this.position=u,this.token=r,this.name="ExpressionError"}},me;(function(e){e[e.STRING=0]="STRING",e[e.NUMBER=1]="NUMBER",e[e.BOOLEAN=2]="BOOLEAN",e[e.NULL=3]="NULL",e[e.IDENTIFIER=4]="IDENTIFIER",e[e.OPERATOR=5]="OPERATOR",e[e.FUNCTION=6]="FUNCTION",e[e.DOT=7]="DOT",e[e.BRACKET_LEFT=8]="BRACKET_LEFT",e[e.BRACKET_RIGHT=9]="BRACKET_RIGHT",e[e.PAREN_LEFT=10]="PAREN_LEFT",e[e.PAREN_RIGHT=11]="PAREN_RIGHT",e[e.COMMA=12]="COMMA",e[e.QUESTION=13]="QUESTION",e[e.COLON=14]="COLON",e[e.DOLLAR=15]="DOLLAR"})(me||(me={}));var yg=new Set([32,9,10,13]),_g=new Set([43,45,42,47,37,33,38,124,61,60,62]),wg=new Map([["true",me.BOOLEAN],["false",me.BOOLEAN],["null",me.NULL]]),ko=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),Cg=new Map([[46,me.DOT],[91,me.BRACKET_LEFT],[93,me.BRACKET_RIGHT],[40,me.PAREN_LEFT],[41,me.PAREN_RIGHT],[44,me.COMMA],[63,me.QUESTION],[58,me.COLON],[36,me.DOLLAR]]),o4=new Map;for(const[e,u]of Cg.entries())o4.set(e,{type:u,value:String.fromCharCode(e)});function Wu(e){return e>=48&&e<=57}function So(e){return e>=97&&e<=122||e>=65&&e<=90||e===95}function a4(e){return So(e)||Wu(e)}function xg(e){return _g.has(e)}var Le;(function(e){e[e.Program=0]="Program",e[e.Literal=1]="Literal",e[e.Identifier=2]="Identifier",e[e.MemberExpression=3]="MemberExpression",e[e.CallExpression=4]="CallExpression",e[e.BinaryExpression=5]="BinaryExpression",e[e.UnaryExpression=6]="UnaryExpression",e[e.ConditionalExpression=7]="ConditionalExpression"})(Le||(Le={}));var bg=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),$g={type:Le.Literal,value:null},Bg={type:Le.Literal,value:!0},Ag={type:Le.Literal,value:!1},kg=e=>{let u=0;const r=e.length,i=()=>u>=r?null:e[u],t=()=>e[u++],n=p=>{const E=i();return E!==null&&E.type===p},o=p=>p.type===me.OPERATOR?bg.get(p.value)||-1:p.type===me.DOT||p.type===me.BRACKET_LEFT?9:p.type===me.QUESTION?1:-1,s=p=>{let E,_;if(t().type===me.DOT){if(!n(me.IDENTIFIER)){const $=i();throw new qe("Expected property name",u,$?$.value:"")}const x=t();E={type:Le.Identifier,name:x.value},_=!1}else{if(E=f(0),!n(me.BRACKET_RIGHT)){const x=i();throw new qe("Expected closing bracket",u,x?x.value:"")}t(),_=!0}return{type:Le.MemberExpression,object:p,property:E,computed:_}},h=()=>{const p=i();if(!p)throw new qe("Unexpected end of input",u,"");if(p.type===me.OPERATOR&&(p.value==="!"||p.value==="-")){t();const E=h();return{type:Le.UnaryExpression,operator:p.value,argument:E,prefix:!0}}switch(p.type){case me.NUMBER:return t(),{type:Le.Literal,value:Number(p.value)};case me.STRING:return t(),{type:Le.Literal,value:p.value};case me.BOOLEAN:return t(),p.value==="true"?Bg:Ag;case me.NULL:return t(),$g;case me.IDENTIFIER:return t(),{type:Le.Identifier,name:p.value};case me.FUNCTION:return(()=>{const E=t(),_=[];if(!n(me.PAREN_LEFT)){const x=i();throw new qe("Expected opening parenthesis after function name",u,x?x.value:"")}for(t();;){if(n(me.PAREN_RIGHT)){t();break}if(!i()){const $=i();throw new qe("Expected closing parenthesis",u,$?$.value:"")}if(_.length>0){if(!n(me.COMMA)){const $=i();throw new qe("Expected comma between function arguments",u,$?$.value:"")}t()}const x=f(0);_.push(x)}return{type:Le.CallExpression,callee:{type:Le.Identifier,name:E.value},arguments:_}})();case me.PAREN_LEFT:{t();const E=f(0);if(!n(me.PAREN_RIGHT)){const _=i();throw new qe("Expected closing parenthesis",u,_?_.value:"")}return t(),E}default:throw new qe(`Unexpected token: ${p.type}`,u,p.value)}},f=(p=0)=>{let E=h();for(;u")}t();const A=f(0);E={type:Le.ConditionalExpression,test:E,consequent:$,alternate:A}}}return E},g=f();return{type:Le.Program,body:g}},Sg=(e,u,r)=>{let i=u;r&&(i={...u,context:{...u.context,...r}});const t=n=>{switch(n.type){case Le.Literal:return(o=>o.value)(n);case Le.Identifier:return(o=>{if(!(o.name in i.context))throw new qe(`Undefined variable: ${o.name}`);return i.context[o.name]})(n);case Le.MemberExpression:return(o=>{const s=t(o.object);if(s==null)throw new qe("Cannot access property of null or undefined");return s[o.computed?t(o.property):o.property.name]})(n);case Le.CallExpression:return(o=>{const s=i.functions[o.callee.name];if(!s)throw new qe(`Undefined function: ${o.callee.name}`);return s(...o.arguments.map((h=>t(h))))})(n);case Le.BinaryExpression:return(o=>{if(o.operator==="&&"){const f=t(o.left);return f&&t(o.right)}if(o.operator==="||")return t(o.left)||t(o.right);const s=t(o.left),h=t(o.right);switch(o.operator){case"+":return s+h;case"-":return s-h;case"*":return s*h;case"/":return s/h;case"%":return s%h;case"===":return s===h;case"!==":return s!==h;case">":return s>h;case">=":return s>=h;case"<":return s{const s=t(o.argument);if(o.prefix)switch(o.operator){case"!":return!s;case"-":if(typeof s!="number")throw new qe(`Cannot apply unary - to non-number: ${s}`);return-s;default:throw new qe(`Unknown operator: ${o.operator}`)}throw new qe(`Postfix operators are not supported: ${o.operator}`)})(n);case Le.ConditionalExpression:return(o=>{const s=t(o.test);return t(s?o.consequent:o.alternate)})(n);default:throw new qe(`Evaluation error: Unsupported node type: ${n.type}`)}};return t(e.body)};function s4(e){const u=(t=>{const n=t,o=n.length,s=new Array(Math.ceil(o/3));let h=0,f=0;function g(A){const F=f+1;f++;let I="",R=!1;for(;f({context:t,functions:n}))({},Dg);return(t={})=>Sg(r,i,t)}function Fg(e,u={}){return s4(e)(u)}function Ig(e,u){if(typeof e!="string")return;const r=e.trim();if(r)try{return s4(r),Fg(r,u)}catch{return}}function kt(e){return typeof e=="number"}function c4(e){if(!e)return[0,0,0];if(kt(e))return[e,e,e];if(Array.isArray(e)&&e.length===0)return[0,0,0];const[u,r=u,i=u]=e;return[u,r,i]}function zg(e){return kt(e)?!0:Array.isArray(e)?e.every(u=>kt(u)):!1}function rt(e){return e==null}function l4(e){return typeof e=="string"}function d4(e){return typeof e=="function"}function Ct(e,u){if(typeof e=="function")return e;if(typeof e=="string"){const r=e;return(...i)=>{const t={};for(let n=0;ne}function f4(e,u,r="node"){if(rt(e))return()=>u;if(l4(e)){const i=Ct(e,[r]);return t=>{const n=i(t);return kt(n)?n:u}}return d4(e)?e:kt(e)?()=>e:()=>u}function h4(e,u=10,r="node"){if(rt(e))return()=>u;if(l4(e)){const i=Ct(e,[r]);return t=>{const n=i(t);return zg(n)?n:u}}return d4(e)?e:kt(e)?()=>e:Array.isArray(e)?()=>e:()=>u}var on=(e,u,r=10,i=0)=>{const t=h4(u,i),n=h4(e,r);return o=>{const[s,h,f]=c4(n(o)),[g,p,E]=c4(t(o));return[s+g,h+p,f+E]}};function Ng(e){var u;return[e.x,e.y,(u=e.z)!==null&&u!==void 0?u:0]}var jg=class{constructor(e,u={}){this.edgeIdCounter=new Map,this.nodeMap=Pg(e.nodes,u.node),this.edgeMap=Ug(e.edges||[],u.edge,this.getEdgeId.bind(this))}data(){return{nodes:this.nodeMap,edges:this.edgeMap}}replace(e){this.nodeMap=e.nodes,this.edgeMap=e.edges,this.clearCache()}nodes(){return Array.from(this.nodeMap.values())}node(e){return this.nodeMap.get(e)}nodeAt(e){this.indexNodeCache||this.buildNodeIndexCache();const u=this.indexNodeCache.get(e);return u?this.nodeMap.get(u):void 0}nodeIndexOf(e){var u;return this.nodeIndexCache||this.buildNodeIndexCache(),(u=this.nodeIndexCache.get(e))!==null&&u!==void 0?u:-1}firstNode(){return this.nodeMap.values().next().value}forEachNode(e){let u=0;this.nodeMap.forEach(r=>e(r,u++))}originalNode(e){const u=this.nodeMap.get(e);return u?._original}nodeCount(){return this.nodeMap.size}edges(){return Array.from(this.edgeMap.values())}edge(e){return this.edgeMap.get(e)}firstEdge(){return this.edgeMap.values().next().value}forEachEdge(e){let u=0;this.edgeMap.forEach(r=>e(r,u++))}originalEdge(e){const u=this.edgeMap.get(e);return u?._original}edgeCount(){return this.edgeMap.size}getEdgeId(e){if(e.id)return e.id;const u=`${e.source}-${e.target}`,r=this.edgeIdCounter.get(u)||0,i=r===0?u:`${u}-${r}`;return this.edgeIdCounter.set(u,r+1),i}degree(e,u="both"){this.degreeCache||this.buildDegreeCache();const r=this.degreeCache.get(e);return r?r[u]:0}neighbors(e,u="both"){if((!this.outAdjacencyCache||!this.inAdjacencyCache)&&this.buildAdjacencyCache(),u==="out")return Array.from(this.outAdjacencyCache.get(e)||[]);if(u==="in")return Array.from(this.inAdjacencyCache.get(e)||[]);if(this.bothAdjacencyCache)return Array.from(this.bothAdjacencyCache.get(e)||[]);const r=this.inAdjacencyCache.get(e),i=this.outAdjacencyCache.get(e);if(!r&&!i)return[];if(!r)return Array.from(i);if(!i)return Array.from(r);const t=new Set;return r.forEach(n=>t.add(n)),i.forEach(n=>t.add(n)),Array.from(t)}successors(e){return this.neighbors(e,"out")}predecessors(e){return this.neighbors(e,"in")}setNodeOrder(e){const u=new Map;for(const r of e)u.set(r.id,r);this.nodeMap=u,this.nodeIndexCache=void 0,this.indexNodeCache=void 0}clearCache(){this.degreeCache=void 0,this.inAdjacencyCache=void 0,this.outAdjacencyCache=void 0,this.bothAdjacencyCache=void 0,this.nodeIndexCache=void 0,this.indexNodeCache=void 0}buildDegreeCache(){this.degreeCache=new Map;for(const e of this.edges()){const{source:u,target:r}=e;if(e.source===e.target)continue;this.degreeCache.has(u)||this.degreeCache.set(u,{in:0,out:0,both:0});const i=this.degreeCache.get(e.source);i&&(i.out++,i.both++),this.degreeCache.has(r)||this.degreeCache.set(r,{in:0,out:0,both:0});const t=this.degreeCache.get(e.target);t&&(t.in++,t.both++)}}buildAdjacencyCache(){this.inAdjacencyCache=new Map,this.outAdjacencyCache=new Map;for(const e of this.edges())!this.nodeMap.has(e.source)||!this.nodeMap.has(e.target)||(this.outAdjacencyCache.has(e.source)||this.outAdjacencyCache.set(e.source,new Set),this.outAdjacencyCache.get(e.source).add(e.target),this.inAdjacencyCache.has(e.target)||this.inAdjacencyCache.set(e.target,new Set),this.inAdjacencyCache.get(e.target).add(e.source))}buildNodeIndexCache(){this.nodeIndexCache=new Map,this.indexNodeCache=new Map;let e=0;this.nodeMap.forEach((u,r)=>{this.nodeIndexCache.set(r,e),this.indexNodeCache.set(e,r),e++})}destroy(){this.clearCache(),this.nodeMap.clear(),this.edgeMap.clear(),this.edgeIdCounter.clear()}},Og=["id","x","y","z","vx","vy","vz","fx","fy","fz","parentId"],Tg=["id","source","target","points"];function Pg(e,u){if(!e)throw new Error("Data.nodes is required");const r=new Map;for(const i of e){const t={_original:i};for(const n of Og){const o=i[n];rt(o)||(t[n]=o)}if(u){const n=u(i);for(const o in n){const s=n[o];rt(s)||(t[o]=s)}}if(rt(t.id))throw new Error("Node is missing id field");r.set(t.id,t)}return r}function Ug(e,u,r){const i=new Map;for(const t of e){const n={_original:t};for(const o of Tg){const s=t[o];rt(s)||(n[o]=s)}if(u){const o=u(t);for(const s in o){const h=o[s];rt(h)||(n[s]=h)}}if(rt(n.source)||rt(n.target))throw new Error("Edge is missing source or target field");rt(n.id)&&(n.id=r?.(t)),i.set(n.id,n)}return i}function Zg(e,u,r,i=2){e.forEachNode(t=>{rt(t.x)&&(t.x=Math.random()*u),rt(t.y)&&(t.y=Math.random()*r),i===3&&rt(t.z)&&(t.z=Math.random()*Math.min(u,r))})}var Mg=class{constructor(e,u={}){this.graph=new jg(e,u)}export(){return this.graph.data()}replace(e){this.graph.replace(e)}forEachNode(e){this.graph.forEachNode(e)}forEachEdge(e){this.graph.forEachEdge((u,r)=>{u.sourceNode=this.graph.node(u.source),u.targetNode=this.graph.node(u.target),e(u,r)})}destroy(){this.graph.destroy()}},m4=Symbol("Comlink.proxy"),Rg=Symbol("Comlink.endpoint"),Lg=Symbol("Comlink.releaseProxy"),Fo=Symbol("Comlink.finalizer"),an=Symbol("Comlink.thrown"),g4=e=>typeof e=="object"&&e!==null||typeof e=="function",Jg={canHandle:e=>g4(e)&&e[m4],serialize(e){const{port1:u,port2:r}=new MessageChannel;return p4(e,u),[r,[r]]},deserialize(e){return e.start(),D4(e)}},qg={canHandle:e=>g4(e)&&an in e,serialize({value:e}){let u;return e instanceof Error?u={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:u={isError:!1,value:e},[u,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},v4=new Map([["proxy",Jg],["throw",qg]]);function Vg(e,u){for(const r of e)if(u===r||r==="*"||r instanceof RegExp&&r.test(u))return!0;return!1}function p4(e,u=globalThis,r=["*"]){u.addEventListener("message",function i(t){if(!t||!t.data)return;if(!Vg(r,t.origin)){console.warn(`Invalid origin '${t.origin}' for comlink proxy`);return}const{id:n,type:o,path:s}=Object.assign({path:[]},t.data),h=(t.data.argumentList||[]).map(Gt);let f;try{const g=s.slice(0,-1).reduce((E,_)=>E[_],e),p=s.reduce((E,_)=>E[_],e);switch(o){case"GET":f=p;break;case"SET":g[s.slice(-1)[0]]=Gt(t.data.value),f=!0;break;case"APPLY":f=p.apply(g,h);break;case"CONSTRUCT":{const E=new p(...h);f=Qg(E)}break;case"ENDPOINT":{const{port1:E,port2:_}=new MessageChannel;p4(e,_),f=Xg(E,[E])}break;case"RELEASE":f=void 0;break;default:return}}catch(g){f={value:g,[an]:0}}Promise.resolve(f).catch(g=>({value:g,[an]:0})).then(g=>{const[p,E]=dn(g);u.postMessage(Object.assign(Object.assign({},p),{id:n}),E),o==="RELEASE"&&(u.removeEventListener("message",i),E4(u),Fo in e&&typeof e[Fo]=="function"&&e[Fo]())}).catch(g=>{const[p,E]=dn({value:new TypeError("Unserializable return value"),[an]:0});u.postMessage(Object.assign(Object.assign({},p),{id:n}),E)})}),u.start&&u.start()}function Wg(e){return e.constructor.name==="MessagePort"}function E4(e){Wg(e)&&e.close()}function D4(e,u){const r=new Map;return e.addEventListener("message",function(t){const{data:n}=t;if(!n||!n.id)return;const o=r.get(n.id);if(o)try{o(n)}finally{r.delete(n.id)}}),Io(e,r,[],u)}function sn(e){if(e)throw new Error("Proxy has been released and is not useable")}function y4(e){return du(e,new Map,{type:"RELEASE"}).then(()=>{E4(e)})}var cn=new WeakMap,ln="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const u=(cn.get(e)||0)-1;cn.set(e,u),u===0&&y4(e)});function Gg(e,u){const r=(cn.get(u)||0)+1;cn.set(u,r),ln&&ln.register(e,u,e)}function Kg(e){ln&&ln.unregister(e)}function Io(e,u,r=[],i=function(){}){let t=!1;const n=new Proxy(i,{get(o,s){if(sn(t),s===Lg)return()=>{Kg(n),y4(e),u.clear(),t=!0};if(s==="then"){if(r.length===0)return{then:()=>n};const h=du(e,u,{type:"GET",path:r.map(f=>f.toString())}).then(Gt);return h.then.bind(h)}return Io(e,u,[...r,s])},set(o,s,h){sn(t);const[f,g]=dn(h);return du(e,u,{type:"SET",path:[...r,s].map(p=>p.toString()),value:f},g).then(Gt)},apply(o,s,h){sn(t);const f=r[r.length-1];if(f===Rg)return du(e,u,{type:"ENDPOINT"}).then(Gt);if(f==="bind")return Io(e,u,r.slice(0,-1));const[g,p]=_4(h);return du(e,u,{type:"APPLY",path:r.map(E=>E.toString()),argumentList:g},p).then(Gt)},construct(o,s){sn(t);const[h,f]=_4(s);return du(e,u,{type:"CONSTRUCT",path:r.map(g=>g.toString()),argumentList:h},f).then(Gt)}});return Gg(n,e),n}function Yg(e){return Array.prototype.concat.apply([],e)}function _4(e){const u=e.map(dn);return[u.map(r=>r[0]),Yg(u.map(r=>r[1]))]}var w4=new WeakMap;function Xg(e,u){return w4.set(e,u),e}function Qg(e){return Object.assign(e,{[m4]:!0})}function dn(e){for(const[u,r]of v4)if(r.canHandle(e)){const[i,t]=r.serialize(e);return[{type:"HANDLER",name:u,value:i},t]}return[{type:"RAW",value:e},w4.get(e)||[]]}function Gt(e){switch(e.type){case"HANDLER":return v4.get(e.name).deserialize(e.value);case"RAW":return e.value}}function du(e,u,r,i){return new Promise(t=>{const n=Hg();u.set(n,t),e.start&&e.start(),e.postMessage(Object.assign({id:n},r),i)})}function Hg(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var ev=class{constructor(){this.worker=null,this.workerApi=null}execute(e,u,r){return At(this,void 0,void 0,function*(){if(this.worker||(yield this.initWorker()),!this.workerApi)throw new Error("Worker API not initialized");return yield this.workerApi.execute(e,u,r)})}destroy(){this.workerApi&&this.workerApi.destroy(),this.worker&&(this.worker.terminate(),this.worker=null,this.workerApi=null)}initWorker(){return At(this,void 0,void 0,function*(){const e=this.resolveWorkerPath(),r=e.includes("/lib/")||e.endsWith(".mjs")?"module":"classic";this.worker=new Worker(e,{type:r}),this.workerApi=D4(this.worker)})}resolveWorkerPath(){const e=(()=>{if(typeof document>"u")return null;const u=document.currentScript;if(u?.src)return u.src;const r=document.getElementsByTagName("script");for(let i=r.length-1;i>=0;i--){const t=r[i].src;if(t&&(t.includes("index.js")||t.includes("index.min.js")))return t}return null})();if(e){if(e.includes("index.js")||e.includes("index.min.js")){const i=e.replace(/index(\.min)?\.(m?js)(\?.*)?$/,"worker.js");if(i!==e)return i}const u=e.replace(/\/runtime\/[^/]+\.(m?js)(\?.*)?$/,"/worker.js");if(u!==e)return u;const r=e.replace(/\/[^/]+\.(m?js)(\?.*)?$/,"/worker.js");if(r!==e)return r}return"./worker.js"}},fn=class{constructor(e){this.supervisor=null,this.initialOptions=this.mergeOptions(this.getDefaultOptions(),e)}get options(){return this.runtimeOptions||this.initialOptions}mergeOptions(e,u){return Object.assign({},e,u||{})}execute(e,u){return At(this,void 0,void 0,function*(){this.runtimeOptions=this.mergeOptions(this.initialOptions,u);const{node:r,edge:i,enableWorker:t}=this.runtimeOptions;this.context=new Mg(e,{node:r,edge:i}),this.model=this.context.graph,t&&typeof Worker<"u"?yield this.layoutInWorker(e,this.runtimeOptions):yield this.layout(this.runtimeOptions)})}layoutInWorker(e,u){var r;return At(this,void 0,void 0,function*(){try{this.supervisor||(this.supervisor=new ev);const i=yield this.supervisor.execute(this.id,e,u);(r=this.context)===null||r===void 0||r.replace(i)}catch(i){console.error("Layout in worker failed, fallback to main thread layout.",i),yield this.layout(u)}})}forEachNode(e){this.context.forEachNode(e)}forEachEdge(e){this.context.forEachEdge(e)}destroy(){var e;(e=this.context)===null||e===void 0||e.destroy(),this.model=null,this.context=null,this.supervisor&&(this.supervisor.destroy(),this.supervisor=null)}},C4=class extends fn{};function tv(e){return!!e.tick&&!!e.stop}var yt=class{constructor(e={}){this.options=e,this.nodes=new Map,this.edges=new Map,this.inEdges=new Map,this.outEdges=new Map,this.parentMap=new Map,this.childrenMap=new Map,e.tree&&Array.isArray(e.tree)&&e.tree.length>0&&(typeof e.tree[0]=="string"?e.tree.forEach(u=>{this.parentMap.set(u,new Map),this.childrenMap.set(u,new Map)}):(this.attachTreeStructure("default"),this.addTree(e.tree))),e.nodes&&e.nodes.forEach(u=>this.addNode(u)),e.edges&&e.edges.forEach(u=>this.addEdge(u))}addNode(e){this.nodes.has(e.id)||(this.nodes.set(e.id,e),this.inEdges.set(e.id,new Set),this.outEdges.set(e.id,new Set))}addNodes(e){e.forEach(u=>this.addNode(u))}getNode(e){return this.nodes.get(e)}hasNode(e){return this.nodes.has(e)}removeNode(e){if(!this.nodes.has(e))return;const u=Array.from(this.inEdges.get(e)||[]),r=Array.from(this.outEdges.get(e)||[]);u.forEach(i=>this.removeEdge(i)),r.forEach(i=>this.removeEdge(i)),this.nodes.delete(e),this.inEdges.delete(e),this.outEdges.delete(e),this.parentMap.forEach(i=>{i.delete(e)}),this.childrenMap.forEach(i=>{i.delete(e)})}getAllNodes(){return Array.from(this.nodes.values())}addEdge(e){if(!this.nodes.has(e.source)||!this.nodes.has(e.target))throw new Error(`Cannot add edge ${e.id}: source ${e.source} or target ${e.target} does not exist`);this.edges.set(e.id,e),this.outEdges.get(e.source).add(e.id),this.inEdges.get(e.target).add(e.id)}addEdges(e){e.forEach(u=>this.addEdge(u))}getEdge(e){return this.edges.get(e)}hasEdge(e){return this.edges.has(e)}removeEdge(e){var u,r;const i=this.edges.get(e);i&&(this.edges.delete(e),(u=this.outEdges.get(i.source))===null||u===void 0||u.delete(e),(r=this.inEdges.get(i.target))===null||r===void 0||r.delete(e))}getAllEdges(){return Array.from(this.edges.values())}updateEdgeData(e,u){const r=this.edges.get(e);r&&Object.assign(r.data,u)}updateNodeData(e,u){const r=this.nodes.get(e);r&&Object.assign(r.data,u)}getRelatedEdges(e,u="both"){const r=[];if(u==="in"||u==="both"){const i=this.inEdges.get(e);i&&i.forEach(t=>{const n=this.edges.get(t);n&&r.push(n)})}if(u==="out"||u==="both"){const i=this.outEdges.get(e);i&&i.forEach(t=>{const n=this.edges.get(t);n&&r.push(n)})}return r}getSuccessors(e){const u=this.outEdges.get(e);if(!u||u.size===0)return[];const r=[];return u.forEach(i=>{const t=this.edges.get(i);if(t){const n=this.nodes.get(t.target);n&&r.push(n)}}),r.length>0?r:[]}getPredecessors(e){const u=this.inEdges.get(e);if(!u||u.size===0)return[];const r=[];return u.forEach(i=>{const t=this.edges.get(i);if(t){const n=this.nodes.get(t.source);n&&r.push(n)}}),r.length>0?r:[]}getNeighbors(e){const u=this.getSuccessors(e)||[],r=this.getPredecessors(e)||[],i=[...u,...r],t=Array.from(new Map(i.map(n=>[n.id,n])).values());return t.length>0?t:[]}attachTreeStructure(e){this.parentMap.has(e)||(this.parentMap.set(e,new Map),this.childrenMap.set(e,new Map))}addTree(e,u){var r,i;const t=u||((i=(r=this.options.tree)===null||r===void 0?void 0:r[0])!==null&&i!==void 0?i:"default");this.hasTreeStructure(t)||this.attachTreeStructure(t);const n=Array.isArray(e)?e:[e],o=(s,h)=>{this.addNode({id:s.id,data:s.data}),h!==void 0&&this.setParent(s.id,h,t),s.children&&s.children.length>0&&s.children.forEach(f=>{o(f,s.id)})};n.forEach(s=>o(s))}hasTreeStructure(e){return this.parentMap.has(e)}setParent(e,u,r){var i,t,n;const o=r||((t=(i=this.options.tree)===null||i===void 0?void 0:i[0])!==null&&t!==void 0?t:"default");this.parentMap.has(o)||this.attachTreeStructure(o);const s=this.parentMap.get(o),h=this.childrenMap.get(o),f=s.get(e);f!==void 0&&((n=h.get(f))===null||n===void 0||n.delete(e)),s.set(e,u),h.has(u)||h.set(u,new Set),h.get(u).add(e)}getParent(e,u){var r,i;const t=u||((i=(r=this.options.tree)===null||r===void 0?void 0:r[0])!==null&&i!==void 0?i:"default");this.parentMap.has(t)||this.attachTreeStructure(t);const n=this.parentMap.get(t);if(!n)return;const o=n.get(e);return o===void 0?null:this.nodes.get(o)}getChildren(e,u){var r,i;const t=u||((i=(r=this.options.tree)===null||r===void 0?void 0:r[0])!==null&&i!==void 0?i:"default"),n=this.childrenMap.get(t);if(!n)return[];const o=n.get(e);return o?Array.from(o).map(s=>this.nodes.get(s)).filter(s=>s!==void 0):[]}getRoots(e){var u,r;const i=e||((r=(u=this.options.tree)===null||u===void 0?void 0:u[0])!==null&&r!==void 0?r:"default"),t=this.parentMap.get(i),n=[];return this.nodes.forEach(o=>{t&&t.get(o.id)!==void 0||n.push(o)}),n}dfsTree(e,u){const r=[e],i=new Set;for(;r.length>0;){const t=r.pop();if(i.has(t))continue;const n=this.getNode(t);if(n){if(i.add(t),u(n)===!0)continue;const s=this.getChildren(t);for(let h=s.length-1;h>=0;h--)i.has(s[h].id)||r.push(s[h].id)}}}},uv=(e,u)=>{if(e!=="next"&&e!=="prev")return u},x4=e=>{e.prev.next=e.next,e.next.prev=e.prev,delete e.next,delete e.prev},rv=class{constructor(){const u={};u.prev=u,u.next=u.prev,this.shortcut=u}dequeue(){const u=this.shortcut,r=u.prev;if(r&&r!==u)return x4(r),r}enqueue(u){const r=this.shortcut;u.prev&&u.next&&x4(u),u.next=r.next,r.next.prev=u,r.next=u,u.prev=r}toString(){const u=[],r=this.shortcut;let i=r.prev;for(;i!==r;)u.push(JSON.stringify(i,uv)),i=i?.prev;return`[${u.join(", ")}]`}},nv=class extends rv{},iv=()=>1,ov=(e,u)=>{var r;if(e.getAllNodes().length<=1)return[];const i=sv(e,u||iv);return(r=av(i.graph,i.buckets,i.zeroIdx).map(n=>e.getRelatedEdges(n.v,"out").filter(({target:o})=>o===n.w)))===null||r===void 0?void 0:r.flat()},av=(e,u,r)=>{let i=[];const t=u[u.length-1],n=u[0];let o;for(;e.getAllNodes().length;){for(;o=n.dequeue();)zo(e,u,r,o);for(;o=t.dequeue();)zo(e,u,r,o);if(e.getAllNodes().length){for(let s=u.length-2;s>0;--s)if(o=u[s].dequeue(),o){i=i.concat(zo(e,u,r,o,!0));break}}}return i},zo=(e,u,r,i,t)=>{var n,o;const s=[];return e.hasNode(i.v)&&((n=e.getRelatedEdges(i.v,"in"))===null||n===void 0||n.forEach(h=>{const f=h.data.weight,g=e.getNode(h.source);t&&s.push({v:h.source,w:h.target,in:0,out:0}),g.data.out===void 0&&(g.data.out=0),g.data.out-=f,No(u,r,Object.assign({v:g.id},g.data))}),(o=e.getRelatedEdges(i.v,"out"))===null||o===void 0||o.forEach(h=>{const f=h.data.weight,g=h.target,p=e.getNode(g);p.data.in===void 0&&(p.data.in=0),p.data.in-=f,No(u,r,Object.assign({v:p.id},p.data))}),e.removeNode(i.v)),t?s:void 0},sv=(e,u)=>{const r=new yt;let i=0,t=0;e.getAllNodes().forEach(h=>{r.addNode({id:h.id,data:{v:h.id,in:0,out:0}})}),e.getAllEdges().forEach(h=>{const f=r.getRelatedEdges(h.source,"out").find(p=>p.target===h.target),g=u?.(h)||1;f?r.updateEdgeData(f?.id,Object.assign(Object.assign({},f.data),{weight:f.data.weight+g})):r.addEdge({id:h.id,source:h.source,target:h.target,data:{weight:g}}),t=Math.max(t,r.getNode(h.source).data.out+=g),i=Math.max(i,r.getNode(h.target).data.in+=g)});const n=[],o=t+i+3;for(let h=0;h{No(n,s,Object.assign({v:h.id},r.getNode(h.id).data))}),{buckets:n,zeroIdx:s,graph:r}},No=(e,u,r)=>{r.out?r.in?e[r.out-r.in+u].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)},cv=(e,u)=>{const i=ov(e,(t=>n=>n.data.weight||1)());i?.forEach(t=>{const n=t.data;e.removeEdge(t.id),n.forwardName=t.data.name,n.reversed=!0,e.addEdge({id:t.id,source:t.target,target:t.source,data:Object.assign({},n)})})},lv=e=>{e.getAllEdges().forEach(u=>{const r=u.data;if(r.reversed){e.removeEdge(u.id);const i=r.forwardName;delete r.reversed,delete r.forwardName,e.addEdge({id:u.id,source:u.target,target:u.source,data:Object.assign(Object.assign({},r),{forwardName:i})})}})},dv=(e,u)=>Number(e)-Number(u),fu=(e,u,r,i)=>{let t;do t=`${i}${Math.random()}`;while(e.hasNode(t));return r.dummy=u,e.addNode({id:t,data:r}),t},fv=e=>{const u=new yt;return e.getAllNodes().forEach(r=>{u.addNode(Object.assign({},r))}),e.getAllEdges().forEach(r=>{const i=u.getRelatedEdges(r.source,"out").find(t=>t.target===r.target);i?u.updateEdgeData(i?.id,Object.assign(Object.assign({},i.data),{weight:i.data.weight+r.data.weight||0,minlen:Math.max(i.data.minlen,r.data.minlen||1)})):u.addEdge({id:r.id,source:r.source,target:r.target,data:{weight:r.data.weight||0,minlen:r.data.minlen||1}})}),u},b4=e=>{const u=new yt;return e.getAllNodes().forEach(r=>{e.getChildren(r.id).length||u.addNode(Object.assign({},r))}),e.getAllEdges().forEach(r=>{u.addEdge(r)}),u},hv=(e,u)=>e?.reduce((r,i,t)=>(r[i]=u[t],r),{}),$4=(e,u)=>{const r=Number(e.x),i=Number(e.y),t=Number(u.x)-r,n=Number(u.y)-i;let o=Number(e.width)/2,s=Number(e.height)/2;if(!t&&!n)return{x:0,y:0};let h,f;return Math.abs(n)*o>Math.abs(t)*s?(n<0&&(s=-s),h=s*t/n,f=s):(t<0&&(o=-o),h=o,f=o*n/t),{x:r+h,y:i+f}},Gu=e=>{const u=[],r=A4(e)+1;for(let i=0;i{const t=i.data.rank;t!==void 0&&u[t]&&u[t].push(i.id)});for(let i=0;idv(e.getNode(t).data.order,e.getNode(n).data.order));return u},mv=e=>{const u=e.getAllNodes().filter(i=>i.data.rank!==void 0).map(i=>i.data.rank),r=Math.min(...u);e.getAllNodes().forEach(i=>{i.data.hasOwnProperty("rank")&&r!==1/0&&(i.data.rank-=r)})},gv=(e,u=0)=>{const r=e.getAllNodes(),i=r.filter(s=>s.data.rank!==void 0).map(s=>s.data.rank),t=Math.min(...i),n=[];r.forEach(s=>{const h=(s.data.rank||0)-t;n[h]||(n[h]=[]),n[h].push(s.id)});let o=0;for(let s=0;s{const g=e.getNode(f);g&&(g.data.rank=g.data.rank||0,g.data.rank+=o)})}},B4=(e,u,r,i)=>{const t={width:0,height:0};return kt(r)&&kt(i)&&(t.rank=r,t.order=i),fu(e,"border",t,u)},A4=e=>{let u;return e.getAllNodes().forEach(r=>{const i=r.data.rank;i!==void 0&&(u===void 0||i>u)&&(u=i)}),u||(u=0),u},vv=(e,u)=>{const r={lhs:[],rhs:[]};return e?.forEach(i=>{u(i)?r.lhs.push(i):r.rhs.push(i)}),r},jo=(e,u)=>e.reduce((r,i)=>{const t=u(r),n=u(i);return t>n?i:r}),k4=(e,u,r,i,t,n)=>{if(!i.includes(u.id)){i.push(u.id),r||n.push(u.id);const o=t(u.id);o&&o.forEach(s=>k4(e,s,r,i,t,n)),r&&n.push(u.id)}},S4=(e,u,r,i)=>{const t=Array.isArray(u)?u:[u],n=h=>e.getNeighbors(h),o=[],s=[];return t.forEach(h=>{if(e.hasNode(h.id))k4(e,h,r==="post",s,n,o);else throw new Error(`Graph does not have node: ${h}`)}),o},pv=e=>{const u=r=>{const i=e.getChildren(r),t=e.getNode(r);if(i?.length&&i.forEach(n=>u(n.id)),t.data.hasOwnProperty("minRank")){t.data.borderLeft=[],t.data.borderRight=[];for(let n=t.data.minRank,o=t.data.maxRank+1;nu(r.id))},F4=(e,u,r,i,t,n)=>{const o={rank:n,borderType:u,width:0,height:0},s=n-t.data.minRank,h=t.data[u][s-1],f=fu(e,"border",o,r);t.data[u][s]=f,e.setParent(f,i),h&&e.addEdge({id:`e${Math.random()}`,source:h,target:f,data:{weight:1}})},Ev=(e,u)=>{const r=u.toLowerCase();(r==="lr"||r==="rl")&&I4(e)},Dv=(e,u)=>{const r=u.toLowerCase();(r==="bt"||r==="rl")&&yv(e),(r==="lr"||r==="rl")&&(_v(e),I4(e))},I4=e=>{e.getAllNodes().forEach(u=>{z4(u)}),e.getAllEdges().forEach(u=>{z4(u)})},z4=e=>{const u=e.data.width;e.data.width=e.data.height,e.data.height=u},yv=e=>{e.getAllNodes().forEach(u=>{Oo(u.data)}),e.getAllEdges().forEach(u=>{var r;(r=u.data.points)===null||r===void 0||r.forEach(i=>Oo(i)),u.data.hasOwnProperty("y")&&Oo(u.data)})},Oo=e=>{e?.y&&(e.y=-e.y)},_v=e=>{e.getAllNodes().forEach(u=>{To(u.data)}),e.getAllEdges().forEach(u=>{var r;(r=u.data.points)===null||r===void 0||r.forEach(i=>To(i)),u.data.hasOwnProperty("x")&&To(u.data)})},To=e=>{const u=e.x;e.x=e.y,e.y=u},wv=e=>{const u=fu(e,"root",{},"_root"),r=Cv(e);let i=Math.max(...Object.values(r));Math.abs(i)===1/0&&(i=1);const t=i-1,n=2*t+1;e.getAllEdges().forEach(s=>{s.data.minlen*=n});const o=xv(e)+1;return e.getRoots().forEach(s=>{N4(e,u,n,o,t,r,s.id)}),{nestingRoot:u,nodeRankFactor:n}},N4=(e,u,r,i,t,n,o)=>{const s=e.getChildren(o);if(!s?.length){o!==u&&e.addEdge({id:`e${Math.random()}`,source:u,target:o,data:{weight:0,minlen:r}});return}const h=B4(e,"_bt"),f=B4(e,"_bb"),g=e.getNode(o);e.setParent(h,o),g.data.borderTop=h,e.setParent(f,o),g.data.borderBottom=f,s?.forEach(p=>{N4(e,u,r,i,t,n,p.id);const E=p.data.borderTop?p.data.borderTop:p.id,_=p.data.borderBottom?p.data.borderBottom:p.id,x=p.data.borderTop?i:2*i,$=E!==_?1:t-n[o]+1;e.addEdge({id:`e${Math.random()}`,source:h,target:E,data:{minlen:$,weight:x,nestingEdge:!0}}),e.addEdge({id:`e${Math.random()}`,source:_,target:f,data:{minlen:$,weight:x,nestingEdge:!0}})}),e.getParent(o)||e.addEdge({id:`e${Math.random()}`,source:u,target:h,data:{weight:0,minlen:t+n[o]}})},Cv=e=>{const u={},r=(i,t)=>{const n=e.getChildren(i);n?.forEach(o=>r(o.id,t+1)),u[i]=t};return e.getRoots().forEach(i=>r(i.id,1)),u},xv=e=>{let u=0;return e.getAllEdges().forEach(r=>{u+=r.data.weight}),u},bv=(e,u)=>{u&&e.removeNode(u),e.getAllEdges().forEach(r=>{r.data.nestingEdge&&e.removeEdge(r.id)})},$v="edge",j4="edge-label",Bv=(e,u)=>{e.getAllEdges().forEach(r=>Av(e,r,u))},Av=(e,u,r)=>{let i=u.source,t=e.getNode(i).data.rank;const n=u.target,o=e.getNode(n).data.rank,s=u.data.labelRank;if(o===t+1)return;e.removeEdge(u.id);let h,f,g;for(g=0,++t;t{u.forEach(r=>{let i=e.getNode(r);const{data:t}=i,n=t.originalEdge;let o;n&&e.addEdge(n);let s=r;for(;i.data.dummy;)o=e.getSuccessors(s)[0],e.removeNode(s),n.data.points.push({x:i.data.x,y:i.data.y}),i.data.dummy===j4&&(n.data.x=i.data.x,n.data.y=i.data.y,n.data.width=i.data.width,n.data.height=i.data.height),s=o.id,i=e.getNode(s)})},Sv=(e,u,r)=>{const i={};let t;r?.forEach(n=>{let o=e.getParent(n),s,h;for(;o;){if(s=e.getParent(o.id),s?(h=i[s.id],i[s.id]=o.id):(h=t,t=o.id),h&&h!==o.id){u.hasNode(h)||u.addNode({id:h,data:{}}),u.hasNode(o.id)||u.addNode({id:o.id,data:{}}),u.hasEdge(`e${h}-${o.id}`)||u.addEdge({id:`e${h}-${o.id}`,source:h,target:o.id,data:{}});return}o=s}})},Fv=(e,u,r)=>{const i=Iv(e),t=new yt;return t.addNode({id:i,data:{}}),e.getAllNodes().forEach(n=>{var o,s;const h=e.getParent(n.id);(n.data.rank===u||n.data.minRank<=u&&u<=n.data.maxRank)&&(t.hasNode(n.id)||t.addNode(Object.assign({},n)),h?.id&&!t.hasNode(h?.id)&&t.addNode(Object.assign({},h)),t.setParent(n.id,h?.id||i),e.getRelatedEdges(n.id,r).forEach(f=>{const g=f.source===n.id?f.target:f.source;t.hasNode(g)||t.addNode(Object.assign({},e.getNode(g)));const p=t.getRelatedEdges(g,"out").find(({target:_})=>_===n.id),E=p!==void 0?p.data.weight:0;p?t.updateEdgeData(p.id,Object.assign(Object.assign({},p.data),{weight:f.data.weight+E})):t.addEdge({id:f.id,source:g,target:n.id,data:{weight:f.data.weight+E}})}),n.data.hasOwnProperty("minRank")&&t.updateNodeData(n.id,Object.assign(Object.assign({},n.data),{borderLeft:[(o=n.data.borderLeft)===null||o===void 0?void 0:o[u-n.data.minRank]],borderRight:[(s=n.data.borderRight)===null||s===void 0?void 0:s[u-n.data.minRank]]})))}),t},Iv=e=>{let u;for(;e.hasNode(u=`_root${Math.random()}`););return u},zv=(e,u,r)=>{const i=hv(r,r.map((g,p)=>p)),n=u.map(g=>{const p=e.getRelatedEdges(g,"out").map(E=>({pos:i[E.target]||0,weight:E.data.weight}));return p?.sort((E,_)=>E.pos-_.pos)}).flat().filter(g=>g!==void 0);let o=1;for(;o{if(g){let p=g.pos+o;h[p]+=g.weight;let E=0;for(;p>0;)p%2&&(E+=h[p+1]),p=p-1>>1,h[p]+=g.weight;f+=g.weight*E}}),f},O4=(e,u)=>{let r=0;for(let i=1;i{const u={},r=e.getAllNodes(),i=r.map(f=>{var g;return(g=f.data.rank)!==null&&g!==void 0?g:-1/0}),t=Math.max(...i),n=[];for(let f=0;fe.getNode(f.id).data.rank-e.getNode(g.id).data.rank),h=o.filter(f=>e.getNode(f.id).data.fixorder!==void 0).sort((f,g)=>e.getNode(f.id).data.fixorder-e.getNode(g.id).data.fixorder);return h?.forEach(f=>{isNaN(e.getNode(f.id).data.rank)||n[e.getNode(f.id).data.rank].push(f.id),u[f.id]=!0}),o?.forEach(f=>e.dfsTree(f.id,g=>{if(u.hasOwnProperty(g.id))return!0;u[g.id]=!0,isNaN(g.data.rank)||n[g.data.rank].push(g.id)})),n},Nv=(e,u)=>u.map(r=>{const i=e.getRelatedEdges(r,"in");if(!i?.length)return{v:r};const t={sum:0,weight:0};return i?.forEach(n=>{const o=e.getNode(n.source);t.sum+=n.data.weight*o.data.order,t.weight+=n.data.weight}),{v:r,barycenter:t.sum/t.weight,weight:t.weight}}),jv=(e,u)=>{var r,i,t;const n={};e?.forEach((s,h)=>{n[s.v]={i:h,indegree:0,in:[],out:[],vs:[s.v]};const f=n[s.v];s.barycenter!==void 0&&(f.barycenter=s.barycenter,f.weight=s.weight)}),(r=u.getAllEdges())===null||r===void 0||r.forEach(s=>{const h=n[s.source],f=n[s.target];h!==void 0&&f!==void 0&&(f.indegree++,h.out.push(n[s.target]))});const o=(t=(i=Object.values(n)).filter)===null||t===void 0?void 0:t.call(i,s=>!s.indegree);return Ov(o)},Ov=e=>{var u,r;const i=[],t=h=>f=>{f.merged||(f.barycenter===void 0||h.barycenter===void 0||f.barycenter>=h.barycenter)&&Tv(h,f)},n=h=>f=>{f.in.push(h),--f.indegree===0&&e.push(f)};for(;e?.length;){const h=e.pop();i.push(h),(u=h.in.reverse())===null||u===void 0||u.forEach(f=>t(h)(f)),(r=h.out)===null||r===void 0||r.forEach(f=>n(h)(f))}const o=i.filter(h=>!h.merged),s=["vs","i","barycenter","weight"];return o.map(h=>{const f={};return s?.forEach(g=>{h[g]!==void 0&&(f[g]=h[g])}),f})},Tv=(e,u)=>{var r;let i=0,t=0;e.weight&&(i+=e.barycenter*e.weight,t+=e.weight),u.weight&&(i+=u.barycenter*u.weight,t+=u.weight),e.vs=(r=u.vs)===null||r===void 0?void 0:r.concat(e.vs),e.barycenter=i/t,e.weight=t,e.i=Math.min(u.i,e.i),u.merged=!0},Pv=(e,u,r,i)=>{const t=vv(e,E=>{const _=E.hasOwnProperty("fixorder")&&!isNaN(E.fixorder);return i?!_&&E.hasOwnProperty("barycenter"):_||E.hasOwnProperty("barycenter")}),n=t.lhs,o=t.rhs.sort((E,_)=>-E.i- -_.i),s=[];let h=0,f=0,g=0;n?.sort(Uv(!!u,!!r)),g=P4(s,o,g),n?.forEach(E=>{var _;g+=(_=E.vs)===null||_===void 0?void 0:_.length,s.push(E.vs),h+=E.barycenter*E.weight,f+=E.weight,g=P4(s,o,g)});const p={vs:s.flat()};return f&&(p.barycenter=h/f,p.weight=f),p},P4=(e,u,r)=>{let i=r,t;for(;u.length&&(t=u[u.length-1]).i<=i;)u.pop(),e?.push(t.vs),i++;return i},Uv=(e,u)=>(r,i)=>{if(r.fixorder!==void 0&&i.fixorder!==void 0)return r.fixorder-i.fixorder;if(r.barycenteri.barycenter)return 1;if(u&&r.order!==void 0&&i.order!==void 0){if(r.orderi.order)return 1}return e?i.i-r.i:r.i-i.i},U4=(e,u,r,i,t,n)=>{var o,s,h,f;let g=e.getChildren(u).map(I=>I.id);const p=e.getNode(u),E=p?p.data.borderLeft:void 0,_=p?p.data.borderRight:void 0,x={};E&&(g=g?.filter(I=>I!==E&&I!==_));const $=Nv(e,g||[]);$?.forEach(I=>{var R;if(!((R=e.getChildren(I.v))===null||R===void 0)&&R.length){const U=U4(e,I.v,r,i,n);x[I.v]=U,U.hasOwnProperty("barycenter")&&Mv(I,U)}});const A=jv($,r);Zv(A,x),(o=A.filter(I=>I.vs.length>0))===null||o===void 0||o.forEach(I=>{const R=e.getNode(I.vs[0]);R&&(I.fixorder=R.data.fixorder,I.order=R.data.order)});const F=Pv(A,i,t,n);if(E&&(F.vs=[E,F.vs,_].flat(),!((s=e.getPredecessors(E))===null||s===void 0)&&s.length)){const I=e.getNode(((h=e.getPredecessors(E))===null||h===void 0?void 0:h[0].id)||""),R=e.getNode(((f=e.getPredecessors(_))===null||f===void 0?void 0:f[0].id)||"");F.hasOwnProperty("barycenter")||(F.barycenter=0,F.weight=0),F.barycenter=(F.barycenter*F.weight+I.data.order+R.data.order)/(F.weight+2),F.weight+=2}return F},Zv=(e,u)=>{e?.forEach(r=>{var i;const t=(i=r.vs)===null||i===void 0?void 0:i.map(n=>u[n]?u[n].vs:n);r.vs=t.flat()})},Mv=(e,u)=>{e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+u.barycenter*u.weight)/(e.weight+u.weight),e.weight+=u.weight):(e.barycenter=u.barycenter,e.weight=u.weight)};function Z4(e){return Array.isArray(e)}var hn=function(e){if(typeof e!="object"||e===null)return e;var u;if(Z4(e)){u=[];for(var r=0,i=e.length;r{const r=A4(e),i=[],t=[];for(let g=1;g-1;g--)t.push(g);const n=M4(e,i,"in"),o=M4(e,t,"out");let s=T4(e);Po(e,s);let h=Number.POSITIVE_INFINITY,f;for(let g=0,p=0;p<4;++g,++p){R4(g%2?n:o,g%4>=2,!1,u),s=Gu(e);const E=O4(e,s);E=2,!0,u),s=Gu(e);const E=O4(e,s);Eu.map(i=>Fv(e,i,r)),R4=(e,u,r,i)=>{const t=new yt;e?.forEach(n=>{var o;const s=n.getRoots()[0].id,h=U4(n,s,t,u,r,i);for(let f=0;f<((o=h.vs)===null||o===void 0?void 0:o.length);f++){const g=n.getNode(h.vs[f]);g&&(g.data.order=f)}Sv(n,t,h.vs)})},Po=(e,u)=>{u?.forEach(r=>{r?.forEach((i,t)=>{e.getNode(i).data.order=t})})},Lv=(e,u)=>{const i=e.getAllNodes().filter(o=>{var s;return!(!((s=e.getChildren(o.id))===null||s===void 0)&&s.length)}).map(o=>o.data.rank),t=Math.max(...i),n=[];for(let o=0;o{const s=e.getNode(o);!s||s.data.dummy||isNaN(s.data.rank)||(s.data.fixorder=n[s.data.rank].length,n[s.data.rank].push(o))})},Jv=e=>{const u={};let r=0;const i=t=>{const n=r;e.getChildren(t).forEach(o=>i(o.id)),u[t]={low:n,lim:r++}};return e.getRoots().forEach(t=>i(t.id)),u},qv=(e,u,r,i)=>{var t,n;const o=[],s=[],h=Math.min(u[r].low,u[i].low),f=Math.max(u[r].lim,u[i].lim);let g,p;g=r;do g=(t=e.getParent(g))===null||t===void 0?void 0:t.id,o.push(g);while(g&&(u[g].low>h||f>u[g].lim));for(p=g,g=i;g&&g!==p;)s.push(g),g=(n=e.getParent(g))===null||n===void 0?void 0:n.id;return{lca:p,path:o.concat(s.reverse())}},Vv=(e,u)=>{const r=Jv(e);u.forEach(i=>{var t,n;let o=i,s=e.getNode(o);const h=s.data.originalEdge;if(!h)return;const f=qv(e,r,h.source,h.target),g=f.path,p=f.lca;let E=0,_=g[E],x=!0;for(;o!==h.target;){if(s=e.getNode(o),x){for(;_!==p&&((t=e.getNode(_))===null||t===void 0?void 0:t.data.maxRank){const r={},i=(t,n)=>{let o=0,s=0;const h=t.length,f=n?.[n?.length-1];return n?.forEach((g,p)=>{var E;const _=Kv(e,g),x=_?e.getNode(_.id).data.order:h;(_||g===f)&&((E=n.slice(s,p+1))===null||E===void 0||E.forEach($=>{var A;(A=e.getPredecessors($))===null||A===void 0||A.forEach(F=>{var I;const R=e.getNode(F.id),U=R.data.order;(U{const r={};function i(s,h,f,g,p){var E,_;let x;for(let $=h;${const F=e.getNode(A.id);F.data.dummy&&(F.data.orderp)&&L4(r,A.id,x)}))}function t(s){return JSON.stringify(s.slice(1))}function n(s,h){const f=t(s);h.get(f)||(i(...s),h.set(f,!0))}const o=(s,h)=>{let f=-1,g,p=0;const E=new Map;return h?.forEach((_,x)=>{var $;if((($=e.getNode(_))===null||$===void 0?void 0:$.data.dummy)==="border"){const A=e.getPredecessors(_)||[];A.length&&(g=e.getNode(A[0].id).data.order,n([h,p,x,f,g],E),p=x,f=g)}n([h,p,h.length,g,s.length],E)}),h};return u?.length&&u.reduce(o),r},Kv=(e,u)=>{var r,i;if(!((r=e.getNode(u))===null||r===void 0)&&r.data.dummy)return(i=e.getPredecessors(u))===null||i===void 0?void 0:i.find(t=>e.getNode(t.id).data.dummy)},L4=(e,u,r)=>{let i=u,t=r;if(i>t){const o=i;i=t,t=o}let n=e[i];n||(e[i]=n={}),n[t]=!0},Yv=(e,u,r)=>{let i=u,t=r;if(i>t){const n=u;i=t,t=n}return!!e[i]},Xv=(e,u,r,i)=>{const t={},n={},o={};return u?.forEach(s=>{s?.forEach((h,f)=>{t[h]=h,n[h]=h,o[h]=f})}),u?.forEach(s=>{let h=-1;s?.forEach(f=>{let g=i(f).map(p=>p.id);if(g.length){g=g.sort((E,_)=>o[E]-o[_]);const p=(g.length-1)/2;for(let E=Math.floor(p),_=Math.ceil(p);E<=_;++E){const x=g[E];n[f]===f&&h{var s;const h={},f=Hv(e,u,r,t,n,o),g=o?"borderLeft":"borderRight",p=(x,$)=>{let A=f.getAllNodes(),F=A.pop();const I={};for(;F;)I[F.id]?x(F.id):(I[F.id]=!0,A.push(F),A=A.concat($(F.id))),F=A.pop()},E=x=>{h[x]=(f.getRelatedEdges(x,"in")||[]).reduce(($,A)=>Math.max($,(h[A.source]||0)+A.data.weight),0)},_=x=>{const $=(f.getRelatedEdges(x,"out")||[]).reduce((F,I)=>Math.min(F,(h[I.target]||0)-I.data.weight),Number.POSITIVE_INFINITY),A=e.getNode(x);$!==Number.POSITIVE_INFINITY&&A.data.borderType!==g&&(h[x]=Math.max(h[x],$))};return p(E,f.getPredecessors.bind(f)),p(_,f.getSuccessors.bind(f)),(s=Object.values(i))===null||s===void 0||s.forEach(x=>{h[x]=h[r[x]]}),h},Hv=(e,u,r,i,t,n)=>{const o=new yt,s=rp(i,t,n);return u?.forEach(h=>{let f;h?.forEach(g=>{const p=r[g];if(o.hasNode(p)||o.addNode({id:p,data:{}}),f){const E=r[f],_=o.getRelatedEdges(E,"out").find(x=>x.target===p);_?o.updateEdgeData(_.id,Object.assign(Object.assign({},_.data),{weight:Math.max(s(e,g,f),_.data.weight||0)})):o.addEdge({id:`e${Math.random()}`,source:E,target:p,data:{weight:Math.max(s(e,g,f),0)}})}f=g})}),o},ep=(e,u)=>jo(Object.values(u),r=>{var i;let t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return(i=Object.keys(r))===null||i===void 0||i.forEach(o=>{const s=r[o],h=np(e,o)/2;t=Math.max(s+h,t),n=Math.min(s-h,n)}),t-n});function tp(e,u){const r=Object.values(u),i=Math.min(...r),t=Math.max(...r);["u","d"].forEach(n=>{["l","r"].forEach(o=>{const s=n+o,h=e[s];let f;if(h===u)return;const g=Object.values(h);f=o==="l"?i-Math.min(...g):t-Math.max(...g),f&&(e[s]={},Object.keys(h).forEach(p=>{e[s][p]=h[p]+f}))})})}var up=(e,u)=>{const r={};return Object.keys(e.ul).forEach(i=>{if(u)r[i]=e[u.toLowerCase()][i];else{const t=Object.values(e).map(n=>n[i]);r[i]=(t[0]+t[1])/2}}),r},rp=(e,u,r)=>(i,t,n)=>{const o=i.getNode(t),s=i.getNode(n);let h=0,f=0;if(h+=o.data.width/2,o.data.hasOwnProperty("labelpos"))switch((o.data.labelpos||"").toLowerCase()){case"l":f=-o.data.width/2;break;case"r":f=o.data.width/2;break}if(f&&(h+=r?f:-f),f=0,h+=(o.data.dummy?u:e)/2,h+=(s.data.dummy?u:e)/2,h+=s.data.width/2,s.data.labelpos)switch((s.data.labelpos||"").toLowerCase()){case"l":f=s.data.width/2;break;case"r":f=-s.data.width/2;break}return f&&(h+=r?f:-f),f=0,h},np=(e,u)=>e.getNode(u).data.width||0,ip=(e,u)=>{const{ranksep:r=0}=u||{},i=Gu(e);let t=0;i?.forEach(n=>{const o=n.map(h=>e.getNode(h).data.height),s=Math.max(...o,0);n?.forEach(h=>{e.getNode(h).data.y=t+s/2}),t+=s+r})},op=(e,u)=>{const{align:r,nodesep:i=0,edgesep:t=0}=u||{},n=Gu(e),o=Object.assign(Wv(e,n),Gv(e,n)),s={};let h=[];["u","d"].forEach(g=>{h=g==="u"?n:Object.values(n).reverse(),["l","r"].forEach(p=>{p==="r"&&(h=h.map($=>Object.values($).reverse()));const E=(g==="u"?e.getPredecessors:e.getSuccessors).bind(e),_=Xv(e,h,o,E),x=Qv(e,h,_.root,_.align,i,t,p==="r");p==="r"&&Object.keys(x).forEach($=>x[$]=-x[$]),s[g+p]=x})});const f=ep(e,s);return f&&tp(s,f),up(s,r)},ap=(e,u)=>{var r;const i=b4(e);ip(i,u);const t=op(i,u);(r=Object.keys(t))===null||r===void 0||r.forEach(n=>{i.getNode(n).data.x=t[n]})},J4=e=>{const u={},r=i=>{var t;const n=e.getNode(i);if(!n)return 0;if(u[i])return n.data.rank;u[i]=!0;let o;return(t=e.getRelatedEdges(i,"out"))===null||t===void 0||t.forEach(s=>{const h=r(s.target),f=s.data.minlen,g=h-f;g&&(o===void 0||ge.getRelatedEdges(i.id,"in").length===0).forEach(i=>r(i.id))},sp=e=>{const u={};let r;const i=o=>{var s;const h=e.getNode(o);if(!h)return 0;if(u[o])return h.data.rank;u[o]=!0;let f;return(s=e.getRelatedEdges(o,"out"))===null||s===void 0||s.forEach(g=>{const p=i(g.target),E=g.data.minlen,_=p-E;_&&(f===void 0||_e.getRelatedEdges(o.id,"in").length===0).forEach(o=>{o&&i(o.id)}),r===void 0&&(r=0);const t={},n=(o,s)=>{var h;const f=e.getNode(o),g=isNaN(f.data.layer)?s:f.data.layer;(f.data.rank===void 0||f.data.rank{n(p.target,g+p.data.minlen)}))};e.getAllNodes().forEach(o=>{const s=o.data;s&&(isNaN(s.layer)?s.rank-=r:n(o.id,s.layer))})},Pt=(e,u)=>e.getNode(u.target).data.rank-e.getNode(u.source).data.rank-u.data.minlen,cp=e=>{const u=new yt({tree:[]}),r=e.getAllNodes()[0],i=e.getAllNodes().length;u.addNode(r);let t,n;for(;lp(u,e){const r=i=>{u.getRelatedEdges(i,"both").forEach(t=>{const n=t.source,o=i===n?t.target:n;!e.hasNode(o)&&!Pt(u,t)&&(e.addNode({id:o,data:{}}),e.addEdge({id:t.id,source:i,target:o,data:{}}),r(o))})};return e.getAllNodes().forEach(i=>r(i.id)),e.getAllNodes().length},dp=e=>{const u=new yt({tree:[]}),r=e.getAllNodes()[0],i=e.getAllNodes().length;u.addNode(r);let t,n;for(;fp(u,e){const r=i=>{var t;(t=u.getRelatedEdges(i,"both"))===null||t===void 0||t.forEach(n=>{const o=n.source,s=i===o?n.target:o;!e.hasNode(s)&&(u.getNode(s).data.layer!==void 0||!Pt(u,n))&&(e.addNode({id:s,data:{}}),e.addEdge({id:n.id,source:i,target:s,data:{}}),r(s))})};return e.getAllNodes().forEach(i=>r(i.id)),e.getAllNodes().length},q4=(e,u)=>jo(u.getAllEdges(),r=>e.hasNode(r.source)!==e.hasNode(r.target)?Pt(u,r):1/0),V4=(e,u,r)=>{e.getAllNodes().forEach(i=>{const t=u.getNode(i.id);t.data.rank||(t.data.rank=0),t.data.rank+=r})},hp=e=>{const u=fv(e);J4(u);const r=cp(u);G4(r),W4(r,u);let i,t;for(;i=vp(r);)t=pp(r,u,i),Ep(r,u,i,t)},W4=(e,u)=>{let r=S4(e,e.getAllNodes(),"post");r=r.slice(0,r?.length-1),r.forEach(i=>{mp(e,u,i)})},mp=(e,u,r)=>{const t=e.getNode(r).data.parent,n=e.getRelatedEdges(r,"both").find(o=>o.target===t||o.source===t);n.data.cutvalue=gp(e,u,r)},gp=(e,u,r)=>{const t=e.getNode(r).data.parent;let n=!0,o=u.getRelatedEdges(r,"out").find(h=>h.target===t),s=0;return o||(n=!1,o=u.getRelatedEdges(t,"out").find(h=>h.target===r)),s=o.data.weight,u.getRelatedEdges(r,"both").forEach(h=>{const f=h.source===r,g=f?h.target:h.source;if(g!==t){const p=f===n,E=h.data.weight;if(s+=p?E:-E,yp(e,r,g)){const _=e.getRelatedEdges(r,"both").find(x=>x.source===g||x.target===g).data.cutvalue;s+=p?-_:_}}}),s},G4=(e,u=e.getAllNodes()[0].id)=>{K4(e,{},1,u)},K4=(e,u,r,i,t)=>{var n;const o=r;let s=r;const h=e.getNode(i);return u[i]=!0,(n=e.getNeighbors(i))===null||n===void 0||n.forEach(f=>{u[f.id]||(s=K4(e,u,s,f.id,i))}),h.data.low=o,h.data.lim=s++,t?h.data.parent=t:delete h.data.parent,s},vp=e=>e.getAllEdges().find(u=>u.data.cutvalue<0),pp=(e,u,r)=>{let i=r.source,t=r.target;u.getRelatedEdges(i,"out").find(g=>g.target===t)||(i=r.target,t=r.source);const n=e.getNode(i),o=e.getNode(t);let s=n,h=!1;n.data.lim>o.data.lim&&(s=o,h=!0);const f=u.getAllEdges().filter(g=>h===Y4(e.getNode(g.source),s)&&h!==Y4(e.getNode(g.target),s));return jo(f,g=>Pt(u,g))},Ep=(e,u,r,i)=>{const t=e.getRelatedEdges(r.source,"both").find(n=>n.source===r.target||n.target===r.target);t&&e.removeEdge(t.id),e.addEdge({id:`e${Math.random()}`,source:i.source,target:i.target,data:{}}),G4(e),W4(e,u),Dp(e,u)},Dp=(e,u)=>{const r=e.getAllNodes().find(t=>!t.data.parent);let i=S4(e,r,"pre");i=i.slice(1),i.forEach(t=>{const n=e.getNode(t).data.parent;let o=u.getRelatedEdges(t,"out").find(h=>h.target===n),s=!1;!o&&u.hasNode(n)&&(o=u.getRelatedEdges(n,"out").find(h=>h.target===t),s=!0),u.getNode(t).data.rank=(u.hasNode(n)&&u.getNode(n).data.rank||0)+(s?o?.data.minlen:-o?.data.minlen)})},yp=(e,u,r)=>e.getRelatedEdges(u,"both").find(i=>i.source===r||i.target===r),Y4=(e,u)=>u.data.low<=e.data.lim&&e.data.lim<=u.data.lim,_p=(e,u)=>{switch(u){case"network-simplex":Cp(e);break;case"tight-tree":X4(e);break;case"longest-path":wp(e);break;default:X4(e)}},wp=J4,X4=e=>{sp(e),dp(e)},Cp=e=>{hp(e)},xp=(e,u)=>{const{edgeLabelSpace:r,keepNodeOrder:i,prevGraph:t,rankdir:n,ranksep:o}=u;!i&&t&&$p(e,t);const s=Ip(e);r&&(u.ranksep=zp(s,{rankdir:n,ranksep:o}));let h;try{h=bp(s,u)}catch(f){if(f.message==="Not possible to find intersection inside of the rectangle"){console.error(`The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure: -`,f);return}throw f}return Bp(e,s),h},bp=(e,u)=>{const{ranker:r,rankdir:i="tb",nodeOrder:t,keepNodeOrder:n,align:o,nodesep:s=50,edgesep:h=20,ranksep:f=50}=u;Rp(e),cv(e);const{nestingRoot:g,nodeRankFactor:p}=wv(e);_p(b4(e),r),Np(e),gv(e,p),bv(e,g),mv(e),jp(e),Op(e);const E=[];Bv(e,E),Vv(e,E),pv(e),n&&Lv(e,t),Rv(e,n),Lp(e),Ev(e,i),ap(e,{align:o,nodesep:s,edgesep:h,ranksep:f}),Jp(e),Mp(e),kv(e,E),Up(e),Dv(e,i);const{width:_,height:x}=Tp(e);return Pp(e),Zp(e),lv(e),{width:_,height:x}},$p=(e,u)=>{e.getAllNodes().forEach(r=>{const i=e.getNode(r.id);if(u.hasNode(r.id)){const t=u.getNode(r.id);i.data.fixorder=t.data._order,delete t.data._order}else delete i.data.fixorder})},Bp=(e,u)=>{e.getAllNodes().forEach(r=>{var i;const t=e.getNode(r.id);if(t){const n=u.getNode(r.id);t.data.x=n.data.x,t.data.y=n.data.y,t.data._order=n.data.order,t.data._rank=n.data.rank,!((i=u.getChildren(r.id))===null||i===void 0)&&i.length&&(t.data.width=n.data.width,t.data.height=n.data.height)}}),e.getAllEdges().forEach(r=>{const i=e.getEdge(r.id),t=u.getEdge(r.id);i.data.points=t?t.data.points:[],t&&t.data.hasOwnProperty("x")&&(i.data.x=t.data.x,i.data.y=t.data.y)})},Ap=["width","height","layer","fixorder"],kp={width:0,height:0},Sp=["minlen","weight","width","height","labeloffset"],Fp={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Uo=["labelpos"],Ip=e=>{const u=new yt({tree:[]});return e.getAllNodes().forEach(r=>{const i=H4(e.getNode(r.id).data),t=Object.assign(Object.assign({},kp),i),n=Q4(t,Ap);u.hasNode(r.id)||u.addNode({id:r.id,data:Object.assign({},n)});const o=e.hasTreeStructure("combo")?e.getParent(r.id,"combo"):e.getParent(r.id);rt(o)||(u.hasNode(o.id)||u.addNode(Object.assign({},o)),u.setParent(r.id,o.id))}),e.getAllEdges().forEach(r=>{const i=H4(e.getEdge(r.id).data),t={};Uo?.forEach(n=>{i[n]!==void 0&&(t[n]=i[n])}),u.addEdge({id:r.id,source:r.source,target:r.target,data:Object.assign({},Fp,Q4(i,Sp),t)})}),u},zp=(e,u)=>{const{ranksep:r=0,rankdir:i}=u;return e.getAllNodes().forEach(t=>{isNaN(t.data.layer)||t.data.layer||(t.data.layer=0)}),e.getAllEdges().forEach(t=>{var n;t.data.minlen*=2,((n=t.data.labelpos)===null||n===void 0?void 0:n.toLowerCase())!=="c"&&(i==="TB"||i==="BT"?t.data.width+=t.data.labeloffset:t.data.height+=t.data.labeloffset)}),r/2},Np=e=>{e.getAllEdges().forEach(u=>{if(u.data.width&&u.data.height){const r=e.getNode(u.source),i=e.getNode(u.target),t={e:u,rank:(i.data.rank-r.data.rank)/2+r.data.rank};fu(e,"edge-proxy",t,"_ep")}})},jp=e=>{let u=0;return e.getAllNodes().forEach(r=>{var i,t;r.data.borderTop&&(r.data.minRank=(i=e.getNode(r.data.borderTop))===null||i===void 0?void 0:i.data.rank,r.data.maxRank=(t=e.getNode(r.data.borderBottom))===null||t===void 0?void 0:t.data.rank,u=Math.max(u,r.data.maxRank||-1/0))}),u},Op=e=>{e.getAllNodes().forEach(u=>{u.data.dummy==="edge-proxy"&&(e.getEdge(u.data.e.id).data.labelRank=u.data.rank,e.removeNode(u.id))})},Tp=(e,u)=>{let r,i=0,t,n=0;const{marginx:o=0,marginy:s=0}={},h=f=>{if(!f.data)return;const g=f.data.x,p=f.data.y,E=f.data.width,_=f.data.height;!isNaN(g)&&!isNaN(E)&&(r===void 0&&(r=g-E/2),r=Math.min(r,g-E/2),i=Math.max(i,g+E/2)),!isNaN(p)&&!isNaN(_)&&(t===void 0&&(t=p-_/2),t=Math.min(t,p-_/2),n=Math.max(n,p+_/2))};return e.getAllNodes().forEach(f=>{h(f)}),e.getAllEdges().forEach(f=>{f?.data.hasOwnProperty("x")&&h(f)}),r-=o,t-=s,e.getAllNodes().forEach(f=>{f.data.x-=r,f.data.y-=t}),e.getAllEdges().forEach(f=>{var g;(g=f.data.points)===null||g===void 0||g.forEach(p=>{p.x-=r,p.y-=t}),f.data.hasOwnProperty("x")&&(f.data.x-=r),f.data.hasOwnProperty("y")&&(f.data.y-=t)}),{width:i-r+o,height:n-t+s}},Pp=e=>{e.getAllEdges().forEach(u=>{const r=e.getNode(u.source),i=e.getNode(u.target);let t,n;u.data.points?(t=u.data.points[0],n=u.data.points[u.data.points.length-1]):(u.data.points=[],t={x:i.data.x,y:i.data.y},n={x:r.data.x,y:r.data.y}),u.data.points.unshift($4(r.data,t)),u.data.points.push($4(i.data,n))})},Up=e=>{e.getAllEdges().forEach(u=>{if(u.data.hasOwnProperty("x"))switch((u.data.labelpos==="l"||u.data.labelpos==="r")&&(u.data.width-=u.data.labeloffset),u.data.labelpos){case"l":u.data.x-=u.data.width/2+u.data.labeloffset;break;case"r":u.data.x+=u.data.width/2+u.data.labeloffset;break}})},Zp=e=>{e.getAllEdges().forEach(u=>{var r;u.data.reversed&&((r=u.data.points)===null||r===void 0||r.reverse())})},Mp=e=>{e.getAllNodes().forEach(u=>{var r,i,t;if(!((r=e.getChildren(u.id))===null||r===void 0)&&r.length){const n=e.getNode(u.id),o=e.getNode(n.data.borderTop),s=e.getNode(n.data.borderBottom),h=e.getNode(n.data.borderLeft[((i=n.data.borderLeft)===null||i===void 0?void 0:i.length)-1]),f=e.getNode(n.data.borderRight[((t=n.data.borderRight)===null||t===void 0?void 0:t.length)-1]);n.data.width=Math.abs(f?.data.x-h?.data.x)||10,n.data.height=Math.abs(s?.data.y-o?.data.y)||10,n.data.x=(h?.data.x||0)+n.data.width/2,n.data.y=(o?.data.y||0)+n.data.height/2}}),e.getAllNodes().forEach(u=>{u.data.dummy==="border"&&e.removeNode(u.id)})},Rp=e=>{e.getAllEdges().forEach(u=>{if(u.source===u.target){const r=e.getNode(u.source);r.data.selfEdges||(r.data.selfEdges=[]),r.data.selfEdges.push(u),e.removeEdge(u.id)}})},Lp=e=>{const u=Gu(e);u?.forEach(r=>{let i=0;r?.forEach((t,n)=>{var o;const s=e.getNode(t);s.data.order=n+i,(o=s.data.selfEdges)===null||o===void 0||o.forEach(h=>{fu(e,"selfedge",{width:h.data.width,height:h.data.height,rank:s.data.rank,order:n+ ++i,e:h},"_se")}),delete s.data.selfEdges})})},Jp=e=>{e.getAllNodes().forEach(u=>{const r=e.getNode(u.id);if(r.data.dummy==="selfedge"){const i=e.getNode(r.data.e.source),t=i.data.x+i.data.width/2,n=i.data.y,o=r.data.x-t,s=i.data.height/2;e.hasEdge(r.data.e.id)?e.updateEdgeData(r.data.e.id,r.data.e.data):e.addEdge({id:r.data.e.id,source:r.data.e.source,target:r.data.e.target,data:r.data.e.data}),e.removeNode(u.id),r.data.e.data.points=[{x:t+2*o/3,y:n-s},{x:t+5*o/6,y:n-s},{y:n,x:t+o},{x:t+5*o/6,y:n+s},{x:t+2*o/3,y:n+s}],r.data.e.data.x=r.data.x,r.data.e.data.y=r.data.y}})},Q4=(e,u)=>{const r={};return u?.forEach(i=>{e[i]!==void 0&&(r[i]=+e[i])}),r},H4=(e={})=>{const u={};return Object.keys(e).forEach(r=>{u[r.toLowerCase()]=e[r]}),u},Zo={nodeSize:10,nodeSpacing:0,rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null},ef=class extends fn{constructor(){super(...arguments),this.id="antv-dagre"}getDefaultOptions(){return Zo}layout(e){return At(this,void 0,void 0,function*(){const{nodeSize:u,nodeSpacing:r,align:i,rankdir:t="TB",ranksep:n,nodesep:o,edgeLabelSpace:s,ranker:h="tight-tree",nodeOrder:f,begin:g,controlPoints:p,radial:E,sortByCombo:_,preset:x,ranksepFunc:$,nodesepFunc:A}=e,F=f4($,n??50,"node"),I=f4(A,o??50,"node");let R=I,U=F;(t==="LR"||t==="RL")&&(R=F,U=I);const Y=new yt({tree:[]}),X=this.model.nodes(),K=this.model.edges(),H=on(u,r,Zo.nodeSize,Zo.nodeSpacing);X.forEach(re=>{var Ee;const Ne=re._original,Fe=H(Ne),Ae=U(Ne),Ve=R(Ne),Ce=Fe[0]+2*Ve,Te=Fe[1]+2*Ae,Je=(Ee=re.data)===null||Ee===void 0?void 0:Ee.layer;kt(Je)?Y.addNode({id:re.id,data:{width:Ce,height:Te,layer:Je,originalWidth:Fe[0],originalHeight:Fe[1]}}):Y.addNode({id:re.id,data:{width:Ce,height:Te,originalWidth:Fe[0],originalHeight:Fe[1]}})}),K.forEach(re=>{Y.addEdge({id:re.id,source:re.source,target:re.target,data:{}})}),_&&(Y.attachTreeStructure("combo"),X.forEach(re=>{const Ee=re?.parentId;Ee!==void 0&&Y.hasNode(Ee)&&Y.setParent(re.id,Ee,"combo")}));let ne=null;x?.length&&(ne=new yt,x.forEach(re=>{ne.addNode({id:re.id,data:re.data})})),xp(Y,{prevGraph:ne,edgeLabelSpace:s,keepNodeOrder:!!f,nodeOrder:f||[],acyclicer:"greedy",ranker:h,rankdir:t,nodesep:o,align:i});const ce=[0,0];if(g){let re=1/0,Ee=1/0;Y.getAllNodes().forEach(Ne=>{re>Ne.data.x&&(re=Ne.data.x),Ee>Ne.data.y&&(Ee=Ne.data.y)}),Y.getAllEdges().forEach(Ne=>{var Fe;(Fe=Ne.data.points)===null||Fe===void 0||Fe.forEach(Ae=>{re>Ae.x&&(re=Ae.x),Ee>Ae.y&&(Ee=Ae.y)})}),ce[0]=g[0]-re,ce[1]=g[1]-Ee}const be=t==="LR"||t==="RL";if(!E){const re=new Set,Ne=t==="BT"||t==="RL"?(Ce,Te)=>Te-Ce:(Ce,Te)=>Ce-Te;Y.getAllNodes().forEach(Ce=>{Ce.data.x=Ce.data.x+ce[0],Ce.data.y=Ce.data.y+ce[1],re.add(be?Ce.data.x:Ce.data.y)});const Fe=Array.from(re).sort(Ne),Ae=be?(Ce,Te)=>Ce.x!==Te.x:(Ce,Te)=>Ce.y!==Te.y,Ve=be?(Ce,Te,Je)=>{const k=Math.max(Te.y,Je.y),T=Math.min(Te.y,Je.y);return Ce.filter(ie=>ie.y<=k&&ie.y>=T)}:(Ce,Te,Je)=>{const k=Math.max(Te.x,Je.x),T=Math.min(Te.x,Je.x);return Ce.filter(ie=>ie.x<=k&&ie.x>=T)};Y.getAllEdges().forEach((Ce,Te)=>{var Je;s&&p&&Ce.data.type!=="loop"&&(Ce.data.controlPoints=qp((Je=Ce.data.points)===null||Je===void 0?void 0:Je.map(({x:k,y:T})=>({x:k+ce[0],y:T+ce[1]})),Y.getNode(Ce.source),Y.getNode(Ce.target),Fe,be,Ae,Ve))})}this.model.forEachNode(re=>{const Ee=Y.getNode(re.id);if(Ee){const{x:Ne,y:Fe,width:Ae,height:Ve,originalWidth:Ce,originalHeight:Te}=Ee.data,Je=_?Y.getChildren(re.id,"combo"):Y.getChildren(re.id);if(Je.length>0){let T=1/0,ie=-1/0,M=1/0,j=-1/0;Je.forEach(Be=>{const We=Be.id,Xe=Y.getNode(We);if(Xe?.data){const Ft=Xe.data.x,Qt=Xe.data.y,Ht=Xe.data.originalWidth||Xe.data.width||0,eu=Xe.data.originalHeight||Xe.data.height||0;T=Math.min(T,Ft-Ht/2),ie=Math.max(ie,Ft+Ht/2),M=Math.min(M,Qt-eu/2),j=Math.max(j,Qt+eu/2)}});const oe=20,ae=(ie-T||0)+oe*2,ye=(j-M||0)+oe*2;re.x=(T+ie)/2,re.y=(M+j)/2,re.size=[ae,ye]}else re.x=Ne,re.y=Fe,re.size=[Ce,Te]}}),this.model.forEachEdge(re=>{const Ee=Y.getEdge(re.id);Ee&&Ee.data.controlPoints&&(re.points=Ee.data.controlPoints.map(Ng))})})}},qp=(e,u,r,i,t,n,o)=>{let s=e?.slice(1,e.length-1)||[];if(u&&r){let{x:h,y:f}=u.data,{x:g,y:p}=r.data;if(t&&(h=u.data.y,f=u.data.x,g=r.data.y,p=r.data.x),p!==f&&h!==g){const E=i.indexOf(f),_=i[E+1];if(_){const A=s[0],F=t?{x:(f+_)/2,y:A?.y||g}:{x:A?.x||g,y:(f+_)/2};(!A||n(A,F))&&s.unshift(F)}const x=i.indexOf(p),$=Math.abs(x-E);if($===1)s=o(s,u.data,r.data),s.length||s.push(t?{x:(f+p)/2,y:h}:{x:h,y:(f+p)/2});else if($>1){const A=i[x-1];if(A){const F=s[s.length-1],I=t?{x:(p+A)/2,y:F?.y||g}:{x:F?.x||h,y:(p+A)/2};(!F||n(F,I))&&s.push(I)}}}}return s};function Mo(e,u,r=2){if(e.nodeCount()===1){const t=e.firstNode();t.x=u[0],t.y=u[1],r===3&&(t.z=u[2]||0)}}function tf(e,u){const r=e.nodes();return r.sort(u),e.setNodeOrder(r),e}function Vp(e,u="desc"){return tf(e,(r,i)=>{const t=e.degree(r.id),n=e.degree(i.id);return u==="asc"?t-n:n-t})}function Wp(e,u){return tf(e,(r,i)=>{const t=e.originalNode(r.id),n=e.originalNode(i.id);return u(t,n)})}var Ku=e=>{const{width:u,height:r,center:i}=e,t=u??(typeof window<"u"?window.innerWidth:0),n=r??(typeof window<"u"?window.innerHeight:0),o=i??[t/2,n/2];return{width:t,height:n,center:o}},mn={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"},Gp=class extends fn{constructor(){super(...arguments),this.id="concentric"}getDefaultOptions(){return mn}layout(){return At(this,void 0,void 0,function*(){const{width:e,height:u,center:r}=Ku(this.options),i=this.model.nodeCount();if(!i||i===1){Mo(this.model,r);return}const{sortBy:t,maxLevelDiff:n,sweep:o,clockwise:s,equidistant:h,preventOverlap:f,startAngle:g=mn.startAngle,nodeSize:p,nodeSpacing:E}=this.options,_=!t||t==="degree"?"degree":Ct(t,["node"]);if(_==="degree")Vp(this.model);else{const X=(K,H)=>{const ne=_(K),ce=_(H);return ne===ce?0:ne>ce?-1:1};Wp(this.model,X)}const x=this.model.nodes(),$=new Map;for(const X of x){const K=_==="degree"?this.model.degree(X.id):_(X._original);$.set(X.id,K)}const A=this.model.firstNode(),F=n||$.get(A.id)/4,I=on(p,E,mn.nodeSize,mn.nodeSpacing),R=new Map;for(const X of x)R.set(X.id,Math.max(...I(X._original)));const U=[{nodes:[]}];let Y=U[0];for(let X=0;X0){const H=Y.nodes[0],ne=Math.abs($.get(H.id)-$.get(K.id));F&&ne>=F&&(Y={nodes:[]},U.push(Y))}Y.nodes.push(K)}for(const X of U){const K=X.nodes.map(H=>R.get(H.id));X.nodeSizes=K,X.maxNodeSize=Math.max(...K)}if(U.forEach(X=>{const K=o===void 0?2*Math.PI-2*Math.PI/X.nodes.length:o;X.dTheta=K/Math.max(1,X.nodes.length-1)}),f){let X=0;for(let K=0;K1){const ne=H.nodeSizes||[];let ce=0;for(let Fe=0;Fe0?ce/Ee:0;X=Math.max(Ne,X)}if(H.r=X,K{ne===0&&(K=H.r||0),H.r=K,K+=X})}U.forEach(X=>{const K=X.dTheta||0,H=X.r||0;X.nodes.forEach((ne,ce)=>{const be=g+(s?1:-1)*K*ce;ne.x=r[0]+H*Math.cos(be),ne.y=r[1]+H*Math.sin(be)})})})}};function Kt(e,...u){return u.forEach(r=>{r&&Object.keys(r).forEach(i=>{const t=r[i];t!==void 0&&(e[i]=t)})}),e}var Kp=1664525,Yp=1013904223,uf=4294967296;function Xp(){let e=1;return()=>(e=(Kp*e+Yp)%uf)/uf}var hu=0,Yu=0,Xu=0,rf=1e3,gn,Qu,vn=0,Yt=0,pn=0,Hu=typeof performance=="object"&&performance.now?performance:Date,nf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function of(){return Yt||(nf(Qp),Yt=Hu.now()+pn)}function Qp(){Yt=0}function Ro(){this._call=this._time=this._next=null}Ro.prototype=af.prototype={constructor:Ro,restart:function(e,u,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?of():+r)+(u==null?0:+u),!this._next&&Qu!==this&&(Qu?Qu._next=this:gn=this,Qu=this),this._call=e,this._time=r,Lo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lo())}};function af(e,u,r){var i=new Ro;return i.restart(e,u,r),i}function Hp(){of(),++hu;for(var e=gn,u;e;)(u=Yt-e._time)>=0&&e._call.call(void 0,u),e=e._next;--hu}function sf(){Yt=(vn=Hu.now())+pn,hu=Yu=0;try{Hp()}finally{hu=0,t3(),Yt=0}}function e3(){var e=Hu.now(),u=e-vn;u>rf&&(pn-=u,vn=e)}function t3(){for(var e,u=gn,r,i=1/0;u;)u._call?(i>u._time&&(i=u._time),e=u,u=u._next):(r=u._next,u._next=null,u=e?e._next=r:gn=r);Qu=e,Lo(i)}function Lo(e){if(!hu){Yu&&(Yu=clearTimeout(Yu));var u=e-Yt;u>24?(e<1/0&&(Yu=setTimeout(sf,e-Hu.now()-pn)),Xu&&(Xu=clearInterval(Xu))):(Xu||(vn=Hu.now(),Xu=setInterval(e3,rf)),hu=1,nf(sf))}}var u3={value:()=>{}};function cf(){for(var e=0,u=arguments.length,r={},i;e=0&&(i=r.slice(t+1),r=r.slice(0,t)),r&&!u.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}En.prototype=cf.prototype={constructor:En,on:function(e,u){var r=this._,i=r3(e+"",r),t,n=-1,o=i.length;if(arguments.length<2){for(;++n0)for(var r=new Array(t),i=0,t,n;i1?(A==null?s.delete($):s.set($,x(A)),u):s.get($)},find:function($,A,F){var I=0,R=e.length,U,Y,X,K,H;for(F==null?F=1/0:F*=F,I=0;I1?(f.on($,A),u):f.on($)}}}function Ge(e){return function(){return e}}function ff(e){var u=Ge(.1),r,i,t;typeof e!="function"&&(e=Ge(e==null?0:+e));function n(s){for(var h=0,f=r.length,g;h=(p=(s+f)/2))?s=p:f=p,(A=r>=(E=(h+g)/2))?h=E:g=E,t=n,!(n=n[F=A<<1|$]))return t[F]=o,e;if(_=+e._x.call(null,n.data),x=+e._y.call(null,n.data),u===_&&r===x)return o.next=n,t?t[F]=o:e._root=o,e;do t=t?t[F]=new Array(4):e._root=new Array(4),($=u>=(p=(s+f)/2))?s=p:f=p,(A=r>=(E=(h+g)/2))?h=E:g=E;while((F=A<<1|$)===(I=(x>=E)<<1|_>=p));return t[I]=n,t[F]=o,e}function l3(e){var u,r,i=e.length,t,n,o=new Array(i),s=new Array(i),h=1/0,f=1/0,g=-1/0,p=-1/0;for(r=0;rg&&(g=t),np&&(p=n));if(h>g||f>p)return this;for(this.cover(h,f).cover(g,p),r=0;re||e>=t||i>u||u>=n;)switch(f=(ug||(s=x.y0)>p||(h=x.x1)=F)<<1|e>=A)&&(x=E[E.length-1],E[E.length-1]=E[E.length-1-$],E[E.length-1-$]=x)}else{var I=e-+this._x.call(null,_.data),R=u-+this._y.call(null,_.data),U=I*I+R*R;if(U=(E=(o+h)/2))?o=E:h=E,($=p>=(_=(s+f)/2))?s=_:f=_,u=r,!(r=r[A=$<<1|x]))return this;if(!r.length)break;(u[A+1&3]||u[A+2&3]||u[A+3&3])&&(i=u,F=A)}for(;r.data!==e;)if(t=r,!(r=r.next))return this;return(n=r.next)&&delete r.next,t?(n?t.next=n:delete t.next,this):u?(n?u[A]=n:delete u[A],(r=u[0]||u[1]||u[2]||u[3])&&r===(u[3]||u[2]||u[1]||u[0])&&!r.length&&(i?i[F]=r:this._root=r),this):(this._root=n,this)}function v3(e){for(var u=0,r=e.length;uE.index){var be=_-H.x-H.vx,re=x-H.y-H.vy,Ee=be*be+re*re;Ee_+ce||X<_-ce||Y>x+ce||Kf.r&&(f.r=f[g].r)}function h(){if(u){var f,g=u.length,p;for(r=new Array(g),f=0;f=s)return;(_.data!==u||_.next)&&(F===0&&(F=Ut(r),U+=F*F),I===0&&(I=Ut(r),U+=I*I),U[u(Y,X,o),Y])),U;for(A=0,s=new Array(F);Ae[u];function A3(){function e(M){return()=>M}let u=M=>M.cluster,r=e(1),i=e(-1),t=e(100),n=e(.1),o=[0,0],s=[],h={},f=[],g=100,p=100,E={none:{x:0,y:0}},_=[],x,$="force",A=!0,F=.1;function I(M){if(!A)return I;x.tick(),H();for(let j=0,oe=s.length,ae,ye=M*F;joe.r).iterations(4)).force("charge",pf().strength(i)).force("links",Df(j.nodes.length?j.links:[]).distance(t).strength(n)),_=x.nodes(),H()}function Y(){const M=[],j=[],oe={};let ae=[],ye={},Be=[];return ye=X(s),Be=K(f),ae=Object.keys(ye),ae.forEach((We,Xe)=>{const Ft=ye[We];M.push({id:We,size:Ft.count,r:Math.sqrt(Ft.sumforceNodeSize/Math.PI)}),oe[We]=Xe}),Be.forEach(We=>{const Xe=Dn(We,"source"),Ft=Dn(We,"target"),Qt=oe[Xe],Ht=oe[Ft];Qt!==void 0&&Ht!==void 0&&j.push({source:Qt,target:Ht,count:We.count})}),{nodes:M,links:j}}function X(M){const j={};return M.forEach(oe=>{const ae=u(oe._original);j[ae]||(j[ae]={count:0,sumforceNodeSize:0})}),M.forEach(oe=>{const ae=u(oe._original),ye=r(oe._original),Be=j[ae];Be.count=Be.count+1,Be.sumforceNodeSize=Be.sumforceNodeSize+Math.PI*(ye*ye)*1.3,j[ae]=Be}),j}function K(M){const j={},oe=[];return M.forEach(ye=>{const Be=ne(ye);let We=0;j[Be]!==void 0&&(We=j[Be]),We+=1,j[Be]=We}),Object.entries(j).forEach(([ye,Be])=>{const We=ye.split("~")[0],Xe=ye.split("~")[1];We!==void 0&&Xe!==void 0&&oe.push({source:We,target:Xe,count:Be})}),oe}function H(){return E={none:{x:0,y:0}},_.forEach(M=>{E[M.id]={x:M.x-o[0],y:M.y-o[1]}}),E}function ne(M){const j=Dn(M,"source"),oe=Dn(M,"target"),ae=u(h[j]._original),ye=u(h[oe]._original);return ae<=ye?`${ae}~${ye}`:`${ye}~${ae}`}function ce(M){h={},M.forEach(j=>{h[j.id]=j})}function be(M){return arguments.length?($=M,R(),I):$}function re(M){return arguments.length?typeof M=="string"?(u=j=>j[M],I):(u=M,I):u}function Ee(M){return arguments.length?(A=M,I):A}function Ne(M){return arguments.length?(F=M,I):F}function Fe(M){return arguments.length?(g=M,I):g}function Ae(M){return arguments.length?(p=M,I):p}function Ve(M){return arguments.length?(ce(M||[]),s=M||[],I):s}function Ce(M){return arguments.length?(f=M||[],R(),I):f}function Te(M){return arguments.length?(typeof M=="function"?r=M:r=e(+M),R(),I):r}function Je(M){return arguments.length?(typeof M=="function"?i=M:i=e(+M),R(),I):i}function k(M){return arguments.length?(typeof M=="function"?t=M:t=e(+M),R(),I):t}function T(M){return arguments.length?(typeof M=="function"?n=M:n=e(+M),R(),I):n}function ie(M){return arguments.length?(o=M,I):o}return I.initialize=M=>{s=M,R()},I.template=be,I.groupBy=re,I.enableGrouping=Ee,I.strength=Ne,I.centerX=Fe,I.centerY=Ae,I.nodes=Ve,I.links=Ce,I.forceNodeSize=Te,I.nodeSize=I.forceNodeSize,I.forceCharge=Je,I.forceLinkDistance=k,I.forceLinkStrength=T,I.offset=ie,I.getFocis=H,I}var k3=function(e){return typeof e=="object"&&e!==null},S3={}.toString,F3=function(e,u){return S3.call(e)==="[object "+u+"]"},yf=function(e){if(!k3(e)||!F3(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var u=e;Object.getPrototypeOf(u)!==null;)u=Object.getPrototypeOf(u);return Object.getPrototypeOf(e)===u},I3=5;function z3(e,u){if(Object.hasOwn)return Object.hasOwn(e,u);if(e==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),u)}function _f(e,u,r,i){r=r||0,i=i||I3;for(var t in u)if(z3(u,t)){var n=u[t];n!==null&&yf(n)?(yf(e[t])||(e[t]={}),rn.id===e),i=this.model.node(e);if(!i||!r)return;const t=["fx","fy","fz"];if(u===null){t.forEach(n=>{delete i[n],delete r[n]});return}u.forEach((n,o)=>{o{r.on("end",()=>{this.syncPositionsFromD3(),i()})})})}createD3Copies(){this.d3Nodes=[],this.d3Edges=[],this.model.forEachNode(e=>{this.d3Nodes.push(Object.assign({},e))}),this.model.forEachEdge(e=>{this.d3Edges.push(Object.assign({},e))})}syncPositionsFromD3(){this.d3Nodes.forEach(e=>{const u=this.model.node(e.id);u&&(u.x=e.x,u.y=e.y,e.z!==void 0&&(u.z=e.z),e.fx!==void 0&&(u.fx=e.fx),e.fy!==void 0&&(u.fy=e.fy),e.fz!==void 0&&(u.fz=e.fz),e.vx!==void 0&&(u.vx=e.vx),e.vy!==void 0&&(u.vy=e.vy),e.vz!==void 0&&(u.vz=e.vz))})}initSimulation(){return df()}setSimulation(e){const u=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=u.on("tick",()=>{var r;this.syncPositionsFromD3(),(r=e.onTick)===null||r===void 0||r.call(e,this)})),St(u,this.config.simulationAttrs.map(r=>[r,e[r]])),this.setupForces(u,e),u}setupForces(e,u){this.setupLinkForce(e,u),this.setupManyBodyForce(e,u),this.setupCenterForce(e,u),this.setupCollisionForce(e,u),this.setupXForce(e,u),this.setupYForce(e,u),this.setupRadialForce(e,u),this.setupClusterForce(e,u)}getCenterOptions(e){if(e.center===!1)return;const u=Ku({width:e.width,height:e.height});return Kt({},e.center||{},{x:u.width/2,y:u.height/2,strength:e.centerStrength})}setupCenterForce(e,u){const r=this.getCenterOptions(u);if(r){let i=e.force("center");i||(i=j3(r.x,r.y),e.force("center",i));const t=[];r.x!==void 0&&t.push(["x",r.x]),r.y!==void 0&&t.push(["y",r.y]),r.strength!==void 0&&t.push(["strength",r.strength]),St(i,t)}else e.force("center",null)}getManyBodyOptions(e){if(e.manyBody!==!1)return Kt({},e.manyBody||{},{strength:e.nodeStrength?Ct(e.nodeStrength,["node"]):void 0,distanceMin:e.distanceMin,distanceMax:e.distanceMax,theta:e.theta})}setupManyBodyForce(e,u){const r=this.getManyBodyOptions(u);if(r){let i=e.force("charge");i||(i=pf(),e.force("charge",i));const t=[];r.strength!==void 0&&t.push(["strength",r.strength]),r.distanceMin!==void 0&&t.push(["distanceMin",r.distanceMin]),r.distanceMax!==void 0&&t.push(["distanceMax",r.distanceMax]),r.theta!==void 0&&t.push(["theta",r.theta]),St(i,t)}else e.force("charge",null)}getLinkOptions(e){if(e.link!==!1)return Kt({},e.link||{},{id:e.edgeId?Ct(e.edgeId,["edge"]):void 0,distance:e.linkDistance?Ct(e.linkDistance,["edge"]):void 0,strength:e.edgeStrength?Ct(e.edgeStrength,["edge"]):void 0,iterations:e.edgeIterations})}setupLinkForce(e,u){const r=this.model.edges(),i=this.getLinkOptions(u);if(r.length>0&&i){let t=e.force("link");t||(t=Df(),e.force("link",t));const n=[];i.id!==void 0&&n.push(["id",i.id]),i.distance!==void 0&&n.push(["distance",i.distance]),i.strength!==void 0&&n.push(["strength",i.strength]),i.iterations!==void 0&&n.push(["iterations",i.iterations]),St(t,n)}else e.force("link",null)}getCollisionOptions(e){if(e.preventOverlap===!1&&(e.collide===!1||e.collide===void 0))return;const u=on(e.nodeSize,e.nodeSpacing,Vo.nodeSize,Vo.nodeSpacing),r=i=>Math.max(...u(i._original))/2;return Kt({},e.collide||{},{radius:e.collide&&e.collide.radius||r,strength:e.collideStrength,iterations:e.collideIterations})}setupCollisionForce(e,u){const r=this.getCollisionOptions(u);if(r){let i=e.force("collide");i||(i=vf(),e.force("collide",i));const t=[];r.radius!==void 0&&t.push(["radius",r.radius]),r.strength!==void 0&&t.push(["strength",r.strength]),r.iterations!==void 0&&t.push(["iterations",r.iterations]),St(i,t)}else e.force("collide",null)}getXForceOptions(e){var u;if(e.x===!1)return;const r=this.getCenterOptions(e);return Kt({},e.x||{},{x:(u=e.forceXPosition)!==null&&u!==void 0?u:r&&r.x,strength:e.forceXStrength})}setupXForce(e,u){const r=this.getXForceOptions(u);if(r){let i=e.force("x");i||(i=ff(),e.force("x",i));const t=[];r.x!==void 0&&t.push(["x",r.x]),r.strength!==void 0&&t.push(["strength",r.strength]),St(i,t)}else e.force("x",null)}getYForceOptions(e){var u;if(e.y===!1)return;const r=this.getCenterOptions(e);return Kt({},e.y||{},{y:(u=e.forceYPosition)!==null&&u!==void 0?u:r&&r.y,strength:e.forceYStrength})}setupYForce(e,u){const r=this.getYForceOptions(u);if(r){let i=e.force("y");i||(i=hf(),e.force("y",i));const t=[];r.y!==void 0&&t.push(["y",r.y]),r.strength!==void 0&&t.push(["strength",r.strength]),St(i,t)}else e.force("y",null)}getRadialOptions(e){var u,r,i;if(e.radial!==void 0||e.radialStrength!==void 0||e.radialRadius!==void 0||e.radialX!==void 0||e.radialY!==void 0){const t=this.getCenterOptions(e);return Kt({},e.radial||{},{strength:e.radialStrength,radius:(u=e.radialRadius)!==null&&u!==void 0?u:100,x:(r=e.radialX)!==null&&r!==void 0?r:t&&t.x,y:(i=e.radialY)!==null&&i!==void 0?i:t&&t.y})}}setupRadialForce(e,u){const r=this.getRadialOptions(u);if(r){let i=e.force("radial");i||(i=O3(r.radius||100,r.x,r.y),e.force("radial",i));const t=[];r.radius!==void 0&&t.push(["radius",r.radius]),r.strength!==void 0&&t.push(["strength",r.strength]),r.x!==void 0&&t.push(["x",r.x]),r.y!==void 0&&t.push(["y",r.y]),St(i,t)}else e.force("radial",null)}setupClusterForce(e,u){const{clustering:r}=u;if(r){const{clusterFociStrength:i,clusterEdgeDistance:t,clusterEdgeStrength:n,clusterNodeStrength:o,clusterNodeSize:s,clusterBy:h}=u,f=this.getCenterOptions(u);let g=e.force("group");g||(g=A3(),e.force("group",g)),St(g,[["centerX",f&&f.x],["centerY",f&&f.y],["template","force"],["strength",i],["groupBy",h?Ct(h,["node"]):void 0],["nodes",this.model.nodes()],["links",this.model.edges()],["forceLinkDistance",t],["forceLinkStrength",n],["forceCharge",o],["forceNodeSize",s]])}else e.force("group",null)}},St=(e,u)=>u.reduce((r,[i,t])=>!r[i]||t===void 0?r:r[i].call(e,t),e);function P3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wf(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var u=e.default;if(typeof u=="function"){var r=function i(){var t=!1;try{t=this instanceof i}catch{}return t?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};r.prototype=u.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var t=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,t.get?t:{enumerable:!0,get:function(){return e[i]}})}),r}var U3="*",Z3=(function(){function e(){this._events={}}return e.prototype.on=function(u,r,i){return this._events[u]||(this._events[u]=[]),this._events[u].push({callback:r,once:!!i}),this},e.prototype.once=function(u,r){return this.on(u,r,!0)},e.prototype.emit=function(u){for(var r=this,i=[],t=1;t"u"){for(;this.iterationu||this.iteration<1);)this.tick(1);return Promise.resolve().then(()=>{var i;(i=this.endCallback)===null||i===void 0||i.call(this)}),this}return this.running=!0,this.timer=window.setInterval(()=>{var i;this.tick(1),(this.iteration>=e||this.judgingDistance{delete r[t]});return}u.forEach((t,n)=>{n{this.isNodeFixed(i)&&(i.x=i.fx,i.y=i.fy,r&&i.fz!==void 0&&(i.z=i.fz))})}initDisplacements(){this.displacements||(this.displacements=new Map,this.model.forEachNode(e=>{this.displacements.set(e.id,{x:0,y:0,z:0})})),this.displacements.forEach(e=>{e.x=0,e.y=0,e.z=0})}calculateRepulsive(){const{model:e,options:u}=this,r=u.dimensions===3,i=e.nodes();for(let t=0;t{const{source:t,target:n}=i;if(!t||!n||t===n)return;const o=e.node(t),s=e.node(n),h=this.displacements.get(t),f=this.displacements.get(n),g=this.isNodeFixed(o),p=this.isNodeFixed(s),E=s.x-o.x,_=s.y-o.y,x=r?s.z-o.z:0,$=Math.sqrt(E*E+_*_+x*x);if($===0)return;const A=$/this.k,F=E*A,I=_*A,R=x*A;!g&&!p?(h.x+=F,h.y+=I,f.x-=F,f.y-=I,r&&(h.z+=R,f.z-=R)):g&&!p?(f.x-=F*2,f.y-=I*2,r&&(f.z-=R*2)):!g&&p&&(h.x+=F*2,h.y+=I*2,r&&(h.z+=R*2))})}applyClusterGravity(){const{model:e,options:u}=this,{nodeClusterBy:r,clusterGravity:i,dimensions:t,clustering:n}=u;if(!n||(this.clusterMap||(this.clusterMap=new Map,e.forEachNode(s=>{const h=r(e.originalNode(s.id));this.clusterMap.has(h)||this.clusterMap.set(h,{name:h,cx:0,cy:0,cz:0,count:0})})),this.clusterMap.size===0))return;const o=t===3;this.clusterMap.forEach(s=>{s.cx=0,s.cy=0,s.cz=0,s.count=0}),e.forEachNode(s=>{const h=r(e.originalNode(s.id)),f=this.clusterMap.get(h);f&&(f.cx+=s.x,f.cy+=s.y,o&&(f.cz+=s.z),f.count++)}),this.clusterMap.forEach(s=>{s.count>0&&(s.cx/=s.count,s.cy/=s.count,s.cz/=s.count)}),e.forEachNode(s=>{const{id:h}=s;if(this.isNodeFixed(s))return;const f=r(e.originalNode(h)),g=this.clusterMap.get(f);if(!g)return;const p=this.displacements.get(h),E=s.x-g.cx,_=s.y-g.cy,x=o?s.z-g.cz:0,$=Math.sqrt(E*E+_*_+x*x);if($===0)return;const A=this.k*i;p.x-=A*E/$,p.y-=A*_/$,o&&(p.z-=A*x/$)})}applyGlobalGravity(){const{model:e,options:u}=this,{gravity:r,center:i,dimensions:t}=u,n=t===3,o=.01*this.k*r;e.forEachNode(s=>{const{id:h}=s;if(this.isNodeFixed(s))return;const f=this.displacements.get(h);f.x-=o*(s.x-i[0]),f.y-=o*(s.y-i[1]),n&&(f.z-=o*(s.z-(i[2]||0)))})}updatePositions(){const{model:e,options:u}=this,{speed:r,dimensions:i,distanceThresholdMode:t="max"}=u,n=i===3;let o=0,s=1/0,h=0,f=0;if(e.forEachNode(g=>{const{id:p}=g;if(this.isNodeFixed(g))return;const E=this.displacements.get(p),_=Math.sqrt(E.x*E.x+E.y*E.y+(n?E.z*E.z:0));if(_===0)return;const x=Math.min(this.maxDisplace*(r/R3),_),$=x/_;g.x+=E.x*$,g.y+=E.y*$,n&&(g.z=g.z+E.z*$),o=Math.max(o,x),s=Math.min(s,x),h+=x,f++}),f===0)return 0;switch(t){case"min":return s===1/0?0:s;case"mean":return h/f;default:return o}}destroy(){var e,u;this.stop(),(e=this.displacements)===null||e===void 0||e.clear(),(u=this.clusterMap)===null||u===void 0||u.clear()}},J3={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"node.cluster",dimensions:2},q3=class extends C4{constructor(){super(...arguments),this.id="fruchterman",this.simulation=null}getDefaultOptions(){return J3}parseOptions(e={}){const{clustering:u,nodeClusterBy:r}=this.options,i=u&&!!r;return Object.assign(e,Ku(e),{clustering:i,nodeClusterBy:Ct(r,["node"])}),e}layout(){return At(this,void 0,void 0,function*(){const e=this.parseOptions(this.options),{dimensions:u,center:r,width:i,height:t}=e,n=this.model.nodeCount();if(!n||n===1){Mo(this.model,r,u);return}Zg(this.model,i,t,u);const o=this.setSimulation();return o.data(this.model),o.initialize(e),o.restart(),new Promise(s=>{o.on("end",()=>s())})})}setSimulation(){const e=this.simulation||new L3;return this.simulation||(this.simulation=e.on("tick",()=>{var u,r;return(r=(u=this.options).onTick)===null||r===void 0?void 0:r.call(u,this)})),this.simulation}restart(){var e;(e=this.simulation)===null||e===void 0||e.restart()}stop(){var e;(e=this.simulation)===null||e===void 0||e.stop()}tick(e=1){var u;(u=this.simulation)===null||u===void 0||u.tick(e)}setFixedPosition(e,u){var r;(r=this.simulation)===null||r===void 0||r.setFixedPosition(e,u)}destroy(){var e;super.destroy(),this.stop(),(e=this.simulation)===null||e===void 0||e.destroy(),this.simulation=null}},we={},Cf={};Et(Cf,{isAnyArray:()=>er});var V3=Object.prototype.toString;function er(e){const u=V3.call(e);return u.endsWith("Array]")&&!u.includes("Big")}var W3=wf(Cf),xf={};Et(xf,{default:()=>Y3});function G3(e){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!er(e))throw new TypeError("input must be an array");if(e.length===0)throw new TypeError("input must not be empty");var r=u.fromIndex,i=r===void 0?0:r,t=u.toIndex,n=t===void 0?e.length:t;if(i<0||i>=e.length||!Number.isInteger(i))throw new Error("fromIndex must be a positive integer smaller than length");if(n<=i||n>e.length||!Number.isInteger(n))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var o=e[i],s=i+1;so&&(o=e[s]);return o}function K3(e){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!er(e))throw new TypeError("input must be an array");if(e.length===0)throw new TypeError("input must not be empty");var r=u.fromIndex,i=r===void 0?0:r,t=u.toIndex,n=t===void 0?e.length:t;if(i<0||i>=e.length||!Number.isInteger(i))throw new Error("fromIndex must be a positive integer smaller than length");if(n<=i||n>e.length||!Number.isInteger(n))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var o=e[i],s=i+1;s1&&arguments[1]!==void 0?arguments[1]:{};if(er(e)){if(e.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var r;if(u.output!==void 0){if(!er(u.output))throw new TypeError("output option must be an array if specified");r=u.output}else r=new Array(e.length);var i=K3(e),t=G3(e);if(i===t)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var n=u.min,o=n===void 0?u.autoMinMax?i:0:n,s=u.max,h=s===void 0?u.autoMinMax?t:1:s;if(o>=h)throw new RangeError("min option must be smaller than max option");for(var f=(h-o)/(t-i),g=0;g=0&&l?` ${h(v,c-1)}`:h(v,c)).padEnd(c)}function h(v,c){let l=v.toString();if(l.length<=c)return l;let a=v.toFixed(c);if(a.length>c&&(a=v.toFixed(Math.max(0,c-(a.length-c)))),a.length<=c&&!a.startsWith("0.000")&&!a.startsWith("-0.000"))return a;let d=v.toExponential(c);return d.length>c&&(d=v.toExponential(Math.max(0,c-(d.length-c)))),d.slice(0)}function f(v,c){v.prototype.add=function(a){return typeof a=="number"?this.addS(a):this.addM(a)},v.prototype.addS=function(a){for(let d=0;d>a);return this},v.prototype.signPropagatingRightShiftM=function(a){if(a=c.checkMatrix(a),this.rows!==a.rows||this.columns!==a.columns)throw new RangeError("Matrices dimensions must be equal");for(let d=0;d>a.get(d,m));return this},v.signPropagatingRightShift=function(a,d){return new c(a).signPropagatingRightShift(d)},v.prototype.rightShift=function(a){return typeof a=="number"?this.rightShiftS(a):this.rightShiftM(a)},v.prototype.rightShiftS=function(a){for(let d=0;d>>a);return this},v.prototype.rightShiftM=function(a){if(a=c.checkMatrix(a),this.rows!==a.rows||this.columns!==a.columns)throw new RangeError("Matrices dimensions must be equal");for(let d=0;d>>a.get(d,m));return this},v.rightShift=function(a,d){return new c(a).rightShift(d)},v.prototype.zeroFillRightShift=v.prototype.rightShift,v.prototype.zeroFillRightShiftS=v.prototype.rightShiftS,v.prototype.zeroFillRightShiftM=v.prototype.rightShiftM,v.zeroFillRightShift=v.rightShift,v.prototype.not=function(){for(let a=0;aa)throw new RangeError("Row index out of range")}function p(v,c,l){let a=l?v.columns:v.columns-1;if(c<0||c>a)throw new RangeError("Column index out of range")}function E(v,c){if(c.to1DArray&&(c=c.to1DArray()),c.length!==v.columns)throw new RangeError("vector size must be the same as the number of columns");return c}function _(v,c){if(c.to1DArray&&(c=c.to1DArray()),c.length!==v.rows)throw new RangeError("vector size must be the same as the number of rows");return c}function x(v,c){if(!e.isAnyArray(c))throw new TypeError("row indices must be an array");for(let l=0;l=v.rows)throw new RangeError("row indices are out of range")}function $(v,c){if(!e.isAnyArray(c))throw new TypeError("column indices must be an array");for(let l=0;l=v.columns)throw new RangeError("column indices are out of range")}function A(v,c,l,a,d){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(I("startRow",c),I("endRow",l),I("startColumn",a),I("endColumn",d),c>l||a>d||c<0||c>=v.rows||l<0||l>=v.rows||a<0||a>=v.columns||d<0||d>=v.columns)throw new RangeError("Submatrix indices are out of range")}function F(v,c=0){let l=[];for(let a=0;a=m)throw new RangeError("min must be smaller than max");let y=m-d,w=new j(c,l);for(let C=0;Ca?(m=!0,a=l):(d=!1,m=!0);c++}return d}isReducedEchelonForm(){let c=0,l=0,a=-1,d=!0,m=!1;for(;ca?(m=!0,a=l):(d=!1,m=!0);for(let D=l+1;Dc.get(d,a)&&(d=m);if(c.get(d,a)===0)a++;else{c.swapRows(l,d);let m=c.get(l,a);for(let D=a;D=0;)if(c.maxRow(d)===0)d--;else{let m=0,D=!1;for(;ml[a]&&(l[a]=this.get(a,d));return l}case"column":{const l=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let a=0;al[d]&&(l[d]=this.get(a,d));return l}case void 0:{let l=this.get(0,0);for(let a=0;al&&(l=this.get(a,d));return l}default:throw new Error(`invalid option: ${c}`)}}maxIndex(){R(this);let c=this.get(0,0),l=[0,0];for(let a=0;ac&&(c=this.get(a,d),l[0]=a,l[1]=d);return l}min(c){if(this.isEmpty())return NaN;switch(c){case"row":{const l=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let a=0;al&&(l=this.get(c,a));return l}maxRowIndex(c){g(this,c),R(this);let l=this.get(c,0),a=[c,0];for(let d=1;dl&&(l=this.get(c,d),a[1]=d);return a}minRow(c){if(g(this,c),this.isEmpty())return NaN;let l=this.get(c,0);for(let a=1;al&&(l=this.get(a,c));return l}maxColumnIndex(c){p(this,c),R(this);let l=this.get(0,c),a=[0,c];for(let d=1;dl&&(l=this.get(d,c),a[0]=d);return a}minColumn(c){if(p(this,c),this.isEmpty())return NaN;let l=this.get(0,c);for(let a=1;a=1;d/=2)(d&1)!==0&&(l=l.mmul(a)),a=a.mmul(a);return l}strassen2x2(c){c=j.checkMatrix(c);let l=new j(2,2);const a=this.get(0,0),d=c.get(0,0),m=this.get(0,1),D=c.get(0,1),y=this.get(1,0),w=c.get(1,0),C=this.get(1,1),z=c.get(1,1),b=(a+C)*(d+z),P=(y+C)*d,G=a*(D-z),O=C*(w-d),Z=(a+m)*z,ee=(y-a)*(d+D),B=(m-C)*(w+z),W=b+O-Z+B,ue=G+Z,he=P+O,ge=b-P+G+ee;return l.set(0,0,W),l.set(0,1,ue),l.set(1,0,he),l.set(1,1,ge),l}strassen3x3(c){c=j.checkMatrix(c);let l=new j(3,3);const a=this.get(0,0),d=this.get(0,1),m=this.get(0,2),D=this.get(1,0),y=this.get(1,1),w=this.get(1,2),C=this.get(2,0),z=this.get(2,1),b=this.get(2,2),P=c.get(0,0),G=c.get(0,1),O=c.get(0,2),Z=c.get(1,0),ee=c.get(1,1),B=c.get(1,2),W=c.get(2,0),ue=c.get(2,1),he=c.get(2,2),ge=(a+d+m-D-y-z-b)*ee,Ze=(a-D)*(-G+ee),se=y*(-P+G+Z-ee-B-W+he),le=(-a+D+y)*(P-G+ee),je=(D+y)*(-P+G),S=a*P,L=(-a+C+z)*(P-O+B),te=(-a+C)*(O-B),J=(C+z)*(-P+O),Me=(a+d+m-y-w-C-z)*B,ke=z*(-P+O+Z-ee-B-W+ue),Pe=(-m+z+b)*(ee+W-ue),Re=(m-b)*(ee-ue),Qe=m*W,_t=(z+b)*(-W+ue),Ke=(-m+y+w)*(B+W-he),xt=(m-w)*(B-he),zt=(y+w)*(-W+he),$e=d*Z,He=w*ue,ft=D*O,ht=C*G,Ye=b*he,O6=S+Qe+$e,T6=ge+le+je+S+Pe+Qe+_t,P6=S+L+J+Me+Qe+Ke+zt,U6=Ze+se+le+S+Qe+Ke+xt,Z6=Ze+le+je+S+He,M6=Qe+Ke+xt+zt+ft,R6=S+L+te+ke+Pe+Re+Qe,L6=Pe+Re+Qe+_t+ht,J6=S+L+te+J+Ye;return l.set(0,0,O6),l.set(0,1,T6),l.set(0,2,P6),l.set(1,0,U6),l.set(1,1,Z6),l.set(1,2,M6),l.set(2,0,R6),l.set(2,1,L6),l.set(2,2,J6),l}mmulStrassen(c){c=j.checkMatrix(c);let l=this.clone(),a=l.rows,d=l.columns,m=c.rows,D=c.columns;d!==m&&console.warn(`Multiplying ${a} x ${d} and ${m} x ${D} matrix: dimensions do not match.`);function y(b,P,G){let O=b.rows,Z=b.columns;if(O===P&&Z===G)return b;{let ee=T.zeros(P,G);return ee=ee.setSubMatrix(b,0,0),ee}}let w=Math.max(a,m),C=Math.max(d,D);l=y(l,w,C),c=y(c,w,C);function z(b,P,G,O){if(G<=512||O<=512)return b.mmul(P);G%2===1&&O%2===1?(b=y(b,G+1,O+1),P=y(P,G+1,O+1)):G%2===1?(b=y(b,G+1,O),P=y(P,G+1,O)):O%2===1&&(b=y(b,G,O+1),P=y(P,G,O+1));let Z=parseInt(b.rows/2,10),ee=parseInt(b.columns/2,10),B=b.subMatrix(0,Z-1,0,ee-1),W=P.subMatrix(0,Z-1,0,ee-1),ue=b.subMatrix(0,Z-1,ee,b.columns-1),he=P.subMatrix(0,Z-1,ee,P.columns-1),ge=b.subMatrix(Z,b.rows-1,0,ee-1),Ze=P.subMatrix(Z,P.rows-1,0,ee-1),se=b.subMatrix(Z,b.rows-1,ee,b.columns-1),le=P.subMatrix(Z,P.rows-1,ee,P.columns-1),je=z(T.add(B,se),T.add(W,le),Z,ee),S=z(T.add(ge,se),W,Z,ee),L=z(B,T.sub(he,le),Z,ee),te=z(se,T.sub(Ze,W),Z,ee),J=z(T.add(B,ue),le,Z,ee),Me=z(T.sub(ge,B),T.add(W,he),Z,ee),ke=z(T.sub(ue,se),T.add(Ze,le),Z,ee),Pe=T.add(je,te);Pe.sub(J),Pe.add(ke);let Re=T.add(L,J),Qe=T.add(S,te),_t=T.sub(je,S);_t.add(L),_t.add(Me);let Ke=T.zeros(2*Pe.rows,2*Pe.columns);return Ke=Ke.setSubMatrix(Pe,0,0),Ke=Ke.setSubMatrix(Re,Pe.rows,0),Ke=Ke.setSubMatrix(Qe,0,Pe.columns),Ke=Ke.setSubMatrix(_t,Pe.rows,Pe.columns),Ke.subMatrix(0,G-1,0,O-1)}return z(l,c,w,C)}scaleRows(c={}){if(typeof c!="object")throw new TypeError("options must be an object");const{min:l=0,max:a=1}=c;if(!Number.isFinite(l))throw new TypeError("min must be a number");if(!Number.isFinite(a))throw new TypeError("max must be a number");if(l>=a)throw new RangeError("min must be smaller than max");let d=new j(this.rows,this.columns);for(let m=0;m0&&u(D,{min:l,max:a,output:D}),d.setRow(m,D)}return d}scaleColumns(c={}){if(typeof c!="object")throw new TypeError("options must be an object");const{min:l=0,max:a=1}=c;if(!Number.isFinite(l))throw new TypeError("min must be a number");if(!Number.isFinite(a))throw new TypeError("max must be a number");if(l>=a)throw new RangeError("min must be smaller than max");let d=new j(this.rows,this.columns);for(let m=0;ma||l<0||l>=this.columns||a<0||a>=this.columns)throw new RangeError("Argument out of range");let d=new j(c.length,a-l+1);for(let m=0;m=this.rows)throw new RangeError(`Row index out of range: ${c[m]}`);d.set(m,D-l,this.get(c[m],D))}return d}subMatrixColumn(c,l,a){if(l===void 0&&(l=0),a===void 0&&(a=this.rows-1),l>a||l<0||l>=this.rows||a<0||a>=this.rows)throw new RangeError("Argument out of range");let d=new j(a-l+1,c.length);for(let m=0;m=this.columns)throw new RangeError(`Column index out of range: ${c[m]}`);d.set(D-l,m,this.get(D,c[m]))}return d}setSubMatrix(c,l,a){if(c=j.checkMatrix(c),c.isEmpty())return this;let d=l+c.rows-1,m=a+c.columns-1;A(this,l,d,a,m);for(let D=0;Dtypeof c=="number")}T.random=T.rand,T.randomInt=T.randInt,T.diagonal=T.diag,T.prototype.diagonal=T.prototype.diag,T.identity=T.eye,T.prototype.negate=T.prototype.neg,T.prototype.tensorProduct=T.prototype.kroneckerProduct;class j extends T{data;#e(c,l){if(this.data=[],Number.isInteger(l)&&l>=0)for(let a=0;a=0)this.#e(c,l);else if(e.isAnyArray(c)){const a=c;if(c=a.length,l=c?a[0].length:0,typeof l!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let d=0;d"u"&&(l=c,c=this.columns),p(this,c,!0),l=_(this,l);for(let a=0;a=0)this.#e=new j(c,c);else if(this.#e=new j(c),!this.isSymmetric())throw new TypeError("not symmetric data")}clone(){const c=new oe(this.diagonalSize);for(const[l,a,d]of this.upperRightEntries())c.set(l,a,d);return c}toMatrix(){return new j(this)}get(c,l){return this.#e.get(c,l)}set(c,l,a){return this.#e.set(c,l,a),this.#e.set(l,c,a),this}removeCross(c){return this.#e.removeRow(c),this.#e.removeColumn(c),this}addCross(c,l){l===void 0&&(l=c,c=this.diagonalSize);const a=l.slice();return a.splice(c,1),this.#e.addRow(c,a),this.#e.addColumn(c,l),this}applyMask(c){if(c.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const l=[];for(const[a,d]of c.entries())d||l.push(a);l.reverse();for(const a of l)this.removeCross(a);return this}toCompact(){const{diagonalSize:c}=this,l=new Array(c*(c+1)/2);for(let a=0,d=0,m=0;m=c&&(a=++d);return l}static fromCompact(c){const l=c.length,a=(Math.sqrt(8*l+1)-1)/2;if(!Number.isInteger(a))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(c)}`);const d=new oe(a);for(let m=0,D=0,y=0;y=a&&(m=++D);return d}*upperRightEntries(){for(let c=0,l=0;c=this.diagonalSize&&(l=++c)}}*upperRightValues(){for(let c=0,l=0;c=this.diagonalSize&&(l=++c)}}oe.prototype.klassType="SymmetricMatrix";class ae extends oe{static isDistanceMatrix(c){return oe.isSymmetricMatrix(c)&&c.klassSubType==="DistanceMatrix"}constructor(c){if(super(c),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(c,l,a){return c===l&&(a=0),super.set(c,l,a)}addCross(c,l){return l===void 0&&(l=c,c=this.diagonalSize),l=l.slice(),l[c]=0,super.addCross(c,l)}toSymmetricMatrix(){return new oe(this)}clone(){const c=new ae(this.diagonalSize);for(const[l,a,d]of this.upperRightEntries())l!==a&&c.set(l,a,d);return c}toCompact(){const{diagonalSize:c}=this,l=(c-1)*c/2,a=new Array(l);for(let d=1,m=0,D=0;D=c&&(d=++m+1);return a}static fromCompact(c){const l=c.length;if(l===0)return new this(0);const a=(Math.sqrt(8*l+1)+1)/2;if(!Number.isInteger(a))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(c)}`);const d=new this(a);for(let m=1,D=0,y=0;y=a&&(m=++D+1);return d}}ae.prototype.klassSubType="DistanceMatrix";class ye extends T{constructor(c,l,a){super(),this.matrix=c,this.rows=l,this.columns=a}}class Be extends ye{constructor(c,l){p(c,l),super(c,c.rows,1),this.column=l}set(c,l,a){return this.matrix.set(c,this.column,a),this}get(c){return this.matrix.get(c,this.column)}}class We extends ye{constructor(c,l){$(c,l),super(c,c.rows,l.length),this.columnIndices=l}set(c,l,a){return this.matrix.set(c,this.columnIndices[l],a),this}get(c,l){return this.matrix.get(c,this.columnIndices[l])}}class Xe extends ye{constructor(c){super(c,c.rows,c.columns)}set(c,l,a){return this.matrix.set(c,this.columns-l-1,a),this}get(c,l){return this.matrix.get(c,this.columns-l-1)}}class Ft extends ye{constructor(c){super(c,c.rows,c.columns)}set(c,l,a){return this.matrix.set(this.rows-c-1,l,a),this}get(c,l){return this.matrix.get(this.rows-c-1,l)}}class Qt extends ye{constructor(c,l){g(c,l),super(c,1,c.columns),this.row=l}set(c,l,a){return this.matrix.set(this.row,l,a),this}get(c,l){return this.matrix.get(this.row,l)}}class Ht extends ye{constructor(c,l){x(c,l),super(c,l.length,c.columns),this.rowIndices=l}set(c,l,a){return this.matrix.set(this.rowIndices[c],l,a),this}get(c,l){return this.matrix.get(this.rowIndices[c],l)}}class eu extends ye{constructor(c,l,a){x(c,l),$(c,a),super(c,l.length,a.length),this.rowIndices=l,this.columnIndices=a}set(c,l,a){return this.matrix.set(this.rowIndices[c],this.columnIndices[l],a),this}get(c,l){return this.matrix.get(this.rowIndices[c],this.columnIndices[l])}}class w6 extends ye{constructor(c,l,a,d,m){A(c,l,a,d,m),super(c,a-l+1,m-d+1),this.startRow=l,this.startColumn=d}set(c,l,a){return this.matrix.set(this.startRow+c,this.startColumn+l,a),this}get(c,l){return this.matrix.get(this.startRow+c,this.startColumn+l)}}class C6 extends ye{constructor(c){super(c,c.columns,c.rows)}set(c,l,a){return this.matrix.set(l,c,a),this}get(c,l){return this.matrix.get(l,c)}}class Ff extends T{constructor(c,l={}){const{rows:a=1}=l;if(c.length%a!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=a,this.columns=c.length/a,this.data=c}set(c,l,a){let d=this._calculateIndex(c,l);return this.data[d]=a,this}get(c,l){let a=this._calculateIndex(c,l);return this.data[a]}_calculateIndex(c,l){return c*this.columns+l}}class dt extends T{constructor(c){super(),this.data=c,this.rows=c.length,this.columns=c[0].length}set(c,l,a){return this.data[c][l]=a,this}get(c,l){return this.data[c][l]}}function x6(v,c){if(e.isAnyArray(v))return v[0]&&e.isAnyArray(v[0])?new dt(v):new Ff(v,c);throw new Error("the argument is not an array")}class _n{constructor(c){c=dt.checkMatrix(c);let l=c.clone(),a=l.rows,d=l.columns,m=new Float64Array(a),D=1,y,w,C,z,b,P,G,O,Z;for(y=0;yMath.abs(O[z])&&(z=y);if(z!==w){for(C=0;C=0;C--){for(w=0;wD?d.set(m,D,c.get(m,D)):m===D?d.set(m,D,1):d.set(m,D,0);return d}get upperTriangularMatrix(){let c=this.LU,l=c.rows,a=c.columns,d=new j(l,a);for(let m=0;mMath.abs(c)?(l=c/v,Math.abs(v)*Math.sqrt(1+l*l)):c!==0?(l=v/c,Math.abs(c)*Math.sqrt(1+l*l)):0}class Wo{constructor(c){c=dt.checkMatrix(c);let l=c.clone(),a=c.rows,d=c.columns,m=new Float64Array(d),D,y,w,C;for(w=0;w=0;C--){for(w=0;w=0;y--){for(m=0;m=0;S--)if(O[S]!==0){for(let L=S+1;L=0;S--){if(S0;){let S,L;for(S=se-2;S>=-1&&S!==-1;S--){const te=Number.MIN_VALUE+je*Math.abs(O[S]+Math.abs(O[S+1]));if(Math.abs(B[S])<=te||Number.isNaN(B[S])){B[S]=0;break}}if(S===se-2)L=4;else{let te;for(te=se-1;te>=S&&te!==S;te--){let J=(te!==se?Math.abs(B[te]):0)+(te!==S+1?Math.abs(B[te-1]):0);if(Math.abs(O[te])<=je*J){O[te]=0;break}}te===S?L=3:te===se-1?L=1:(L=2,S=te)}switch(S++,L){case 1:{let te=B[se-2];B[se-2]=0;for(let J=se-2;J>=S;J--){let Me=It(O[J],te),ke=O[J]/Me,Pe=te/Me;if(O[J]=Me,J!==S&&(te=-Pe*B[J-1],B[J-1]=ke*B[J-1]),C)for(let Re=0;Re=O[S+1]);){let te=O[S];if(O[S]=O[S+1],O[S+1]=te,C&&Sl&&m.set(z,b,c.get(z,b)/this.s[b]);let D=this.U,y=D.rows,w=D.columns,C=new j(a,y);for(let z=0;zc&&l++;return l}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return j.diag(this.s)}}function b6(v,c=!1){return v=dt.checkMatrix(v),c?new mu(v).inverse():If(v,j.eye(v.rows))}function If(v,c,l=!1){return v=dt.checkMatrix(v),c=dt.checkMatrix(c),l?new mu(v).solve(c):v.isSquare()?new _n(v).solve(c):new Wo(v).solve(c)}function wn(v){if(v=j.checkMatrix(v),v.isSquare()){if(v.columns===0)return 1;let c,l,a,d;if(v.columns===2)return c=v.get(0,0),l=v.get(0,1),a=v.get(1,0),d=v.get(1,1),c*d-l*a;if(v.columns===3){let m,D,y;return m=new eu(v,[1,2],[1,2]),D=new eu(v,[1,2],[0,2]),y=new eu(v,[1,2],[0,1]),c=v.get(0,0),l=v.get(0,1),a=v.get(0,2),c*wn(m)-l*wn(D)+a*wn(y)}else return new _n(v).determinant}else throw Error("determinant can only be calculated for a square matrix")}function $6(v,c){let l=[];for(let a=0;ad)return new Array(c.rows+1).fill(0);{let m=c.addRow(l,[0]);for(let D=0;Dc?m[D]=1/m[D]:m[D]=0;return d.mmul(j.diag(m).mmul(a.transpose()))}function S6(v,c=v,l={}){v=new j(v);let a=!1;if(typeof c=="object"&&!j.isMatrix(c)&&!e.isAnyArray(c)?(l=c,c=v,a=!0):c=new j(c),v.rows!==c.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:d=!0}=l;d&&(v=v.center("column"),a||(c=c.center("column")));const m=v.transpose().mmul(c);for(let D=0;D0?d.set(m,m+1,l[m]):l[m]<0&&d.set(m,m-1,l[m])}return d}}function I6(v,c,l,a){let d,m,D,y,w,C,z,b;for(w=0;w0;y--){for(b=0,D=0,C=0;C0&&(m=-m),c[y]=b*m,D=D-d*m,l[y-1]=d-m,w=0;wC)do{for(d=l[C],b=(l[C+1]-d)/(2*c[C]),P=It(b,1),b<0&&(P=-P),l[C]=c[C]/(b+P),l[C+1]=c[C]*(b+P),G=l[C+1],m=d-l[C],D=C+2;D=C;D--)for(ee=Z,Z=O,ue=W,d=O*c[D],m=O*b,P=It(b,c[D]),c[D+1]=W*P,W=c[D]/P,O=b/P,b=O*l[D]-W*d,l[D+1]=m+W*(O*d+W*l[D]),w=0;wZe*ge);l[C]=l[C]+he,c[C]=0}for(D=0;D=b;C--)l[C]=c.get(C,b-1)/P,w+=l[C]*l[C];for(y=Math.sqrt(w),l[b]>0&&(y=-y),w=w-l[b]*y,l[b]=l[b]-y,z=b;z=b;C--)D+=l[C]*c.get(C,z);for(D=D/w,C=b;C<=m;C++)c.set(C,z,c.get(C,z)-D*l[C])}for(C=0;C<=m;C++){for(D=0,z=m;z>=b;z--)D+=l[z]*c.get(C,z);for(D=D/w,z=b;z<=m;z++)c.set(C,z,c.get(C,z)-D*l[z])}l[b]=P*l[b],c.set(b,b-1,P*y)}}for(C=0;C=d+1;b--)if(c.get(b,b-1)!==0){for(C=b+1;C<=m;C++)l[C]=c.get(C,b-1);for(z=b;z<=m;z++){for(y=0,C=b;C<=m;C++)y+=l[C]*a.get(C,z);for(y=y/l[b]/c.get(b,b-1),C=b;C<=m;C++)a.set(C,z,a.get(C,z)+y*l[C])}}}function j6(v,c,l,a,d){let m=v-1,D=0,y=v-1,w=Number.EPSILON,C=0,z=0,b=0,P=0,G=0,O=0,Z=0,ee=0,B,W,ue,he,ge,Ze,se,le,je,S,L,te,J,Me,ke;for(B=0;By)&&(l[B]=d.get(B,B),c[B]=0),W=Math.max(B-1,0);W=D;){for(he=m;he>D&&(O=Math.abs(d.get(he-1,he-1))+Math.abs(d.get(he,he)),O===0&&(O=z),!(Math.abs(d.get(he,he-1))=0){for(Z=b>=0?b+Z:b-Z,l[m-1]=le+Z,l[m]=l[m-1],Z!==0&&(l[m]=le-se/Z),c[m-1]=0,c[m]=0,le=d.get(m,m-1),O=Math.abs(le)+Math.abs(Z),b=le/O,P=Z/O,G=Math.sqrt(b*b+P*P),b=b/G,P=P/G,W=m-1;W0)){for(O=Math.sqrt(O),je=he&&(Z=d.get(ge,ge),G=le-Z,O=je-Z,b=(G*O-se)/d.get(ge+1,ge)+d.get(ge,ge+1),P=d.get(ge+1,ge+1)-Z-G-O,G=d.get(ge+2,ge+1),O=Math.abs(b)+Math.abs(P)+Math.abs(G),b=b/O,P=P/O,G=G/O,!(ge===he||Math.abs(d.get(ge,ge-1))*(Math.abs(P)+Math.abs(G))ge+2&&d.set(B,B-3,0);for(ue=ge;ue<=m-1&&(Me=ue!==m-1,ue!==ge&&(b=d.get(ue,ue-1),P=d.get(ue+1,ue-1),G=Me?d.get(ue+2,ue-1):0,le=Math.abs(b)+Math.abs(P)+Math.abs(G),le!==0&&(b=b/le,P=P/le,G=G/le)),le!==0);ue++)if(O=Math.sqrt(b*b+P*P+G*G),b<0&&(O=-O),O!==0){for(ue!==ge?d.set(ue,ue-1,-O*le):he!==ge&&d.set(ue,ue-1,-d.get(ue,ue-1)),b=b+O,le=b/O,je=P/O,Z=G/O,P=P/b,G=G/b,W=ue;W=0;m--)if(b=l[m],P=c[m],P===0)for(he=m,d.set(m,m,1),B=m-1;B>=0;B--){for(se=d.get(B,B)-b,G=0,W=he;W<=m;W++)G=G+d.get(B,W)*d.get(W,m);if(c[B]<0)Z=se,O=G;else if(he=B,c[B]===0?d.set(B,m,se!==0?-G/se:-G/(w*z)):(le=d.get(B,B+1),je=d.get(B+1,B),P=(l[B]-b)*(l[B]-b)+c[B]*c[B],Ze=(le*O-Z*G)/P,d.set(B,m,Ze),d.set(B+1,m,Math.abs(le)>Math.abs(Z)?(-G-se*Ze)/le:(-O-je*Ze)/Z)),Ze=Math.abs(d.get(B,m)),w*Ze*Ze>1)for(W=B;W<=m;W++)d.set(W,m,d.get(W,m)/Ze)}else if(P<0)for(he=m-1,Math.abs(d.get(m,m-1))>Math.abs(d.get(m-1,m))?(d.set(m-1,m-1,P/d.get(m,m-1)),d.set(m-1,m,-(d.get(m,m)-b)/d.get(m,m-1))):(ke=Cn(0,-d.get(m-1,m),d.get(m-1,m-1)-b,P),d.set(m-1,m-1,ke[0]),d.set(m-1,m,ke[1])),d.set(m,m-1,0),d.set(m,m,1),B=m-2;B>=0;B--){for(S=0,L=0,W=he;W<=m;W++)S=S+d.get(B,W)*d.get(W,m-1),L=L+d.get(B,W)*d.get(W,m);if(se=d.get(B,B)-b,c[B]<0)Z=se,G=S,O=L;else if(he=B,c[B]===0?(ke=Cn(-S,-L,se,P),d.set(B,m-1,ke[0]),d.set(B,m,ke[1])):(le=d.get(B,B+1),je=d.get(B+1,B),te=(l[B]-b)*(l[B]-b)+c[B]*c[B]-P*P,J=(l[B]-b)*2*P,te===0&&J===0&&(te=w*z*(Math.abs(se)+Math.abs(P)+Math.abs(le)+Math.abs(je)+Math.abs(Z))),ke=Cn(le*G-Z*S+P*L,le*O-Z*L-P*S,te,J),d.set(B,m-1,ke[0]),d.set(B,m,ke[1]),Math.abs(le)>Math.abs(Z)+Math.abs(P)?(d.set(B+1,m-1,(-S-se*d.get(B,m-1)+P*d.get(B,m))/le),d.set(B+1,m,(-L-se*d.get(B,m)-P*d.get(B,m-1))/le)):(ke=Cn(-G-je*d.get(B,m-1),-O-je*d.get(B,m),Z,P),d.set(B+1,m-1,ke[0]),d.set(B+1,m,ke[1]))),Ze=Math.max(Math.abs(d.get(B,m-1)),Math.abs(d.get(B,m))),w*Ze*Ze>1)for(W=B;W<=m;W++)d.set(W,m-1,d.get(W,m-1)/Ze),d.set(W,m,d.get(W,m)/Ze)}for(B=0;By)for(W=B;W=D;W--)for(B=D;B<=y;B++){for(Z=0,ue=D;ue<=Math.min(W,y);ue++)Z=Z+a.get(B,ue)*d.get(ue,W);a.set(B,W,Z)}}}function Cn(v,c,l,a){let d,m;return Math.abs(l)>Math.abs(a)?(d=a/l,m=l+d*a,[(v+d*c)/m,(c-d*v)/m]):(d=l/a,m=a+d*l,[(d*v+c)/m,(d*c-v)/m])}class Nf{constructor(c){if(c=dt.checkMatrix(c),!c.isSymmetric())throw new Error("Matrix is not symmetric");let l=c,a=l.rows,d=new j(a,a),m=!0,D,y,w;for(y=0;y0,d.set(y,y,Math.sqrt(Math.max(C,0))),w=y+1;w=0;w--)for(y=0;yD;G++)b=c.transpose().mmul(y).div(y.transpose().mmul(y).get(0,0)),b=b.div(b.norm()),C=c.mmul(b).div(b.transpose().mmul(b).get(0,0)),G>0&&(w=C.clone().sub(P).pow(2).sum()),P=C.clone(),a?(z=a.transpose().mmul(C).div(C.transpose().mmul(C).get(0,0)),z=z.div(z.norm()),y=a.mmul(z).div(z.transpose().mmul(z).get(0,0))):y=C;if(a){let G=c.transpose().mmul(C).div(C.transpose().mmul(C).get(0,0));G=G.div(G.norm());let O=c.clone().sub(C.clone().mmul(G.transpose())),Z=y.transpose().mmul(C).div(C.transpose().mmul(C).get(0,0)),ee=a.clone().sub(C.clone().mulS(Z.get(0,0)).mmul(z.transpose()));this.t=C,this.p=G.transpose(),this.w=b.transpose(),this.q=z,this.u=y,this.s=C.transpose().mmul(C),this.xResidual=O,this.yResidual=ee,this.betas=Z}else this.w=b.transpose(),this.s=C.transpose().mmul(C).sqrt(),d?this.t=C.clone().div(this.s.get(0,0)):this.t=C,this.xResidual=c.sub(C.mmul(b.transpose()))}}return we.AbstractMatrix=T,we.CHO=Nf,we.CholeskyDecomposition=Nf,we.DistanceMatrix=ae,we.EVD=zf,we.EigenvalueDecomposition=zf,we.LU=_n,we.LuDecomposition=_n,we.Matrix=j,we.MatrixColumnSelectionView=We,we.MatrixColumnView=Be,we.MatrixFlipColumnView=Xe,we.MatrixFlipRowView=Ft,we.MatrixRowSelectionView=Ht,we.MatrixRowView=Qt,we.MatrixSelectionView=eu,we.MatrixSubView=w6,we.MatrixTransposeView=C6,we.NIPALS=jf,we.Nipals=jf,we.QR=Wo,we.QrDecomposition=Wo,we.SVD=mu,we.SingularValueDecomposition=mu,we.SymmetricMatrix=oe,we.WrapperMatrix1D=Ff,we.WrapperMatrix2D=dt,we.correlation=F6,we.covariance=S6,we.default=j,we.determinant=wn,we.inverse=b6,we.linearDependencies=A6,we.pseudoInverse=k6,we.solve=If,we.wrap=x6,we}var yn=Q3(),$f=P3(yn),Bf=yn.Matrix,H3=yn.SingularValueDecomposition;$f.Matrix?$f.Matrix:yn.Matrix;var e6=(e,u)=>{const r=e.nodeCount(),i=Array.from({length:r},()=>[]),t={};let n=0;return e.forEachNode(o=>{t[o.id]=n++}),e.forEachEdge(o=>{const s=t[o.source],h=t[o.target];s==null||h==null||(i[s].push(h),i[h].push(s))}),i};function t6(e){const u=e.length;new Array(u).fill(0);const r=Array.from({length:u},()=>new Array(u).fill(1/0));for(let i=0;i0&&(this.data[0]=u,this.bubbleDown(0)),e}empty(){return this.data.length===0}bubbleUp(e){const u=this.data;for(;e>0;){const r=e-1>>1;if(u[r][0]<=u[e][0])break;[u[r],u[e]]=[u[e],u[r]],e=r}}bubbleDown(e){const u=this.data,r=u.length;for(;;){const i=e*2+1,t=e*2+2;let n=e;if(i{try{const i=e.length,t=new Bf(i,i);for(let _=0;_{const r=Object.assign(Object.assign({},Af),u),{maxIteration:i,width:t,k:n,speed:o=Af.speed,strictRadial:s,focusNode:h,radiiMap:f,nodeSizeFunc:g}=r,p=n*.002,E=new Map,_=t/10;for(let x=0;x{E.set(A.id,{x:0,y:0})}),s6(e,E,n,f,g),!(c6(e,E,o,s,h,_,f){let n=0;e.forEachNode(o=>{let s=0;e.forEachNode(h=>{if(s<=n){s++;return}if(o.id===h.id||i.get(o.id)!==i.get(h.id))return;let f=o.x-h.x,g=o.y-h.y,p=Math.sqrt(f*f+g*g);if(p===0){p=1;const x=n>s?1:-1;f=.01*x,g=.01*x}const E=Math.max(...t(o._original)),_=Math.max(...t(h._original));if(p<_/2+E/2){const x=r*r/p,$=u.get(o.id),A=u.get(h.id),F=f/p*x,I=g/p*x;u.set(o.id,{x:$.x+F,y:$.y+I}),u.set(h.id,{x:A.x-F,y:A.y-I})}s++}),n++})},c6=(e,u,r,i,t,n,o)=>{i&&e.forEachNode(f=>{const g=f.x-t.x,p=f.y-t.y,E=Math.sqrt(g*g+p*p);let _=p/E,x=-g/E;const $=u.get(f.id),A=Math.sqrt($.x*$.x+$.y*$.y);let F=Math.acos((_*$.x+x*$.y)/A);F>Math.PI/2&&(F-=Math.PI/2,_*=-1,x*=-1);const I=Math.cos(F)*A;u.set(f.id,{x:_*I,y:x*I})});let s=0,h=0;return e.forEachNode(f=>{if(f.id===t.id)return;const g=u.get(f.id),p=Math.sqrt(g.x*g.x+g.y*g.y);if(p>0){const E=Math.min(n*(r/o6),p);if(f.x+=g.x/p*E,f.y+=g.y/p*E,i){let _=f.x-t.x,x=f.y-t.y;const $=Math.sqrt(_*_+x*x);_=_/$*o.get(f.id),x=x/$*o.get(f.id),f.x=t.x+_,f.y=t.y+x}s+=E,h++}}),h>0?s/h:0},Xt={focusNode:null,linkDistance:50,maxIteration:1e3,maxPreventOverlapIteration:200,preventOverlap:!1,sortStrength:10,strictRadial:!0,unitRadius:null,nodeSize:10,nodeSpacing:0},l6=class extends fn{constructor(){super(...arguments),this.id="radial"}getDefaultOptions(){return Xt}layout(){return At(this,void 0,void 0,function*(){const{width:e,height:u,center:r}=Ku(this.options),i=this.model.nodeCount();if(!i||i===1)return Mo(this.model,r);const{focusNode:t,linkDistance:n=Xt.linkDistance,maxIteration:o=Xt.maxIteration,maxPreventOverlapIteration:s=Xt.maxPreventOverlapIteration,nodeSize:h,nodeSpacing:f,preventOverlap:g,sortBy:p,sortStrength:E=Xt.sortStrength,strictRadial:_,unitRadius:x}=this.options,$=t&&this.model.node(t)||this.model.firstNode(),A=this.model.nodeIndexOf($.id),F=e6(this.model),I=t6(F),R=m6(I,A);h6(I,A,R+1);const U=I[A],Y=(e-r[0]>r[0]?r[0]:e-r[0])||e/2,X=(u-r[1]>r[1]?r[1]:u-r[1])||u/2,K=Math.min(Y,X),H=Math.max(...U),ne=[],ce=new Map,be=x??K/H;U.forEach((Ae,Ve)=>{const Ce=Ae*be;ne.push(Ce),ce.set(this.model.nodeAt(Ve).id,Ce)});const re=d6(this.model,I,n,ne,be,p,E),Ee=i6(re,2,n),Ne=Ee[A];let Fe=0;if(this.model.forEachNode(Ae=>{const Ve=Ee[Fe];Ae.x=Ve[0]-Ne[0],Ae.y=Ve[1]-Ne[1],Fe++}),this.run(o,re,ne,A),this.model.forEachNode(Ae=>{Ae.x+=r[0],Ae.y+=r[1]}),g){const Ve={nodeSizeFunc:on(h,f,Xt.nodeSize,Xt.nodeSpacing),radiiMap:ce,width:e,strictRadial:!!_,focusNode:$,maxIteration:s,k:i/4.5};a6(this.model,Ve)}})}run(e,u,r,i){const t=f6(u),n=this.model.nodeCount(),o=this.model.nodes(),s=new Float64Array(n),h=new Float64Array(n);for(let f=0;f{const s=u.length,h=new Array(s),f=new Array(s);for(let x=0;x{const u=e.length,r=e[0].length,i=[];for(let t=0;t{const i=e.length;for(let t=0;t{const r=e[u];let i=0;for(let t=0;tnt.jsxs("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:i,"aria-labelledby":u,...r,children:[e?nt.jsx("title",{id:u,children:e}):null,nt.jsx("path",{fill:"currentColor",d:"M22 22H2v-2h20zM10 2H7v16h3zm7 6h-3v10h3z"})]});gu.forwardRef(g6);var v6=({title:e,titleId:u,...r},i)=>nt.jsxs("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:i,"aria-labelledby":u,...r,children:[e?nt.jsx("title",{id:u,children:e}):null,nt.jsx("path",{fill:"currentColor",d:"M8.4 18.2q.6.75.6 1.8c0 1.7-1.3 3-3 3s-3-1.3-3-3s1.3-3 3-3q.6 0 1.2.3l1.4-1.8c-.9-1-1.3-2.4-1.1-3.7l-2-.7c-.5.8-1.4 1.4-2.5 1.4c-1.7 0-3-1.3-3-3s1.3-3 3-3s3 1.3 3 3v.2l2 .7c.6-1.2 1.8-2.1 3.2-2.3V5.9C10 5.6 9 4.4 9 3c0-1.7 1.3-3 3-3s3 1.3 3 3c0 1.4-1 2.6-2.2 2.9v2.2c1.4.2 2.6 1.1 3.2 2.3l2-.7v-.2c0-1.7 1.3-3 3-3s3 1.3 3 3s-1.3 3-3 3c-1.1 0-2-.6-2.5-1.4l-2 .7c.2 1.3-.2 2.7-1.1 3.7l1.4 1.8q.6-.3 1.2-.3c1.7 0 3 1.3 3 3s-1.3 3-3 3s-3-1.3-3-3q0-1.05.6-1.8l-1.4-1.8c-1.4.8-3 .8-4.4 0z"})]});gu.forwardRef(v6);var p6=({title:e,titleId:u,...r},i)=>nt.jsxs("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:i,"aria-labelledby":u,...r,children:[e?nt.jsx("title",{id:u,children:e}):null,nt.jsx("path",{fill:"currentColor",d:"M21 6.5c-1.7 0-3 1.3-3 3v.2l-2 .7c-.6-1.2-1.8-2.1-3.2-2.3V5.9C14 5.6 15 4.4 15 3c0-1.7-1.3-3-3-3S9 1.3 9 3c0 1.4 1 2.6 2.2 2.9v2.2c-1.3.2-2.5 1.1-3.2 2.3l-2-.7v-.2c0-1.7-1.3-3-3-3s-3 1.3-3 3s1.3 3 3 3c1.1 0 2-.6 2.5-1.4l2 .7c-.2 1.3.2 2.7 1.1 3.7l-1.4 1.8Q6.6 17 6 17c-1.7 0-3 1.3-3 3s1.3 3 3 3s3-1.3 3-3q0-1.05-.6-1.8l1.4-1.8c1.4.8 3 .8 4.4 0l1.4 1.8q-.6.75-.6 1.8c0 1.7 1.3 3 3 3s3-1.3 3-3s-1.3-3-3-3c-.4 0-.9.1-1.2.3l-1.4-1.8c.9-1 1.3-2.4 1.1-3.7l2-.7c.5.8 1.5 1.4 2.5 1.4c1.7 0 3-1.3 3-3s-1.3-3-3-3m-18 4c-.5 0-1-.4-1-1s.5-1 1-1s1 .4 1 1s-.5 1-1 1M6 21c-.6 0-1-.5-1-1s.4-1 1-1s1 .5 1 1s-.4 1-1 1m5-18c0-.5.4-1 1-1s1 .5 1 1s-.4 1-1 1s-1-.5-1-1m1 12c-1.4 0-2.5-1.1-2.5-2.5S10.6 10 12 10s2.5 1.1 2.5 2.5S13.4 15 12 15m6 4c.5 0 1 .5 1 1s-.5 1-1 1s-1-.5-1-1s.5-1 1-1m3-8.5c-.5 0-1-.4-1-1s.5-1 1-1s1 .4 1 1s-.5 1-1 1"})]});gu.forwardRef(p6);var E6=({title:e,titleId:u,...r},i)=>nt.jsxs("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:i,"aria-labelledby":u,...r,children:[e?nt.jsx("title",{id:u,children:e}):null,nt.jsx("path",{fill:"currentColor",d:"m21 9l-4-4v3h-7v2h7v3M7 11l-4 4l4 4v-3h7v-2H7z"})]});gu.forwardRef(E6);var D6=({title:e,titleId:u,...r},i)=>nt.jsxs("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:i,"aria-labelledby":u,...r,children:[e?nt.jsx("title",{id:u,children:e}):null,nt.jsx("path",{fill:"currentColor",d:"m19.07 4.93l-1.41 1.41A8 8 0 0 1 20 12a8 8 0 0 1-8 8a8 8 0 0 1-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12a6 6 0 0 0 6 6a6 6 0 0 0 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12a4 4 0 0 1-4 4a4 4 0 0 1-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72a2 2 0 0 0 2 2a2 2 0 0 0 2-2c0-.74-.4-1.38-1-1.72V2h-1A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10c0-2.76-1.12-5.26-2.93-7.07"})]});gu.forwardRef(D6);function kf(e){switch(e.type){case"force":return{layout:new T3(e.options),scale:4};case"concentric":return{layout:new Gp(e.options),scale:1.5};case"fruchterman":return{layout:new q3(e.options),scale:3};case"dagre-tb":return{layout:new ef(e.options),scale:1};case"dagre-lr":return{layout:new ef(e.options),scale:1};case"radial":return{layout:new l6(e.options),scale:1}}}async function y6(e,u,r,i){const{layout:t,scale:n}=kf(e),{layout:o,scale:s}=e.preset!==void 0?kf(e.preset):{layout:void 0,scale:void 0},h=r.map(p=>({id:p,data:u?.get(p)??{x:0,y:0}})),f=o===void 0||u!==void 0?h:await Sf({layout:o,scale:s,nodes:r.map(p=>({id:p,data:{x:0,y:0}})),edges:i}),g=await Sf({layout:t,scale:n,nodes:f,edges:i});return new Map(g.map(({id:p,data:E})=>[p,E]))}async function Sf({layout:e,scale:u,nodes:r,edges:i}){const t={nodes:r.map(({id:o,data:s})=>({id:o,x:s?s.x/u:0,y:s?s.y/u:0})),edges:i.map(o=>({id:o.id,source:o.src.id,target:o.dst.id}))};if(tv(e)){const{iterations:o=300}=e.options;e.execute(t),e.stop(),e.tick(o)}else await e.execute(t);const n=[];return e.forEachNode(o=>{const{x:s,y:h}=o;n.push({id:String(o.id),data:{x:isNaN(s)?0:s*u,y:isNaN(h)?0:h*u}})}),n}onmessage=({data:e})=>{const{type:u,data:r}=e;u==="layout"&&_6(r).then(i=>{postMessage({type:"layout",data:i})})};async function _6(e){const u=Oe.object({layout:Oe.object({type:Oe.union([Oe.literal("force"),Oe.literal("concentric"),Oe.literal("fruchterman"),Oe.literal("dagre-tb"),Oe.literal("dagre-lr"),Oe.literal("radial")]),options:Oe.looseObject({})}),nodePositions:Oe.map(Oe.string(),Oe.object({x:Oe.number(),y:Oe.number()})).or(Oe.undefined()),nodeIds:Oe.array(Oe.string()),edges:Oe.array(Oe.object({id:Oe.string(),src:Oe.object({id:Oe.string()}),dst:Oe.object({id:Oe.string()})}))}).safeParse(e);if(!u.success)return{error:new Error(`Incorrect format for data passed to worker: -${u.error.message}`)};const{layout:r,nodeIds:i,edges:t,nodePositions:n}=u.data;return await y6(r,n,i,t)}})(); diff --git a/ui-tests b/ui-tests index ae682bd989..0a63bc7c2c 160000 --- a/ui-tests +++ b/ui-tests @@ -1 +1 @@ -Subproject commit ae682bd989d90bc73db4220b9df23191be1e406c +Subproject commit 0a63bc7c2cc0c7ab5ff0853312bf76d2f14d5a7e