update 2026-07-28 14:21:36

This commit is contained in:
action committed 2026-07-28 14:21:36 +08:00
1 parent ce54ee1bb0
commit 9c289a7240
44 files changed
+19 -474

No files matched your search

-16
View File
@@ -1,16 +0,0 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for linkease file
LUCI_DEPENDS:=+linkease
LUCI_PKGARCH:=all
PKG_VERSION:=2.1.70-r3
# PKG_RELEASE MUST be empty for luci.mk
PKG_RELEASE:=
LUCI_MINIFY_CSS:=0
LUCI_MINIFY_JS:=0
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
@@ -1 +0,0 @@
import{ab as L,i as v,ac as M}from"./index.js";var N=/\s/;function $(n){for(var r=n.length;r--&&N.test(n.charAt(r)););return r}var B=/^\s+/;function R(n){return n&&n.slice(0,$(n)+1).replace(B,"")}var k=0/0,F=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,j=/^0o[0-7]+$/i,D=parseInt;function S(n){if(typeof n=="number")return n;if(L(n))return k;if(v(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=v(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=R(n);var t=_.test(n);return t||j.test(n)?D(n.slice(2),t?2:8):F.test(n)?k:+n}var H=function(){return M.Date.now()};const h=H;var P="Expected a function",U=Math.max,X=Math.min;function z(n,r,t){var u,c,l,s,i,f,o=0,b=!1,d=!1,T=!0;if(typeof n!="function")throw new TypeError(P);r=S(r)||0,v(t)&&(b=!!t.leading,d="maxWait"in t,l=d?U(S(t.maxWait)||0,r):l,T="trailing"in t?!!t.trailing:T);function x(e){var a=u,m=c;return u=c=void 0,o=e,s=n.apply(m,a),s}function W(e){return o=e,i=setTimeout(g,r),b?x(e):s}function O(e){var a=e-f,m=e-o,E=r-a;return d?X(E,l-m):E}function p(e){var a=e-f,m=e-o;return f===void 0||a>=r||a<0||d&&m>=l}function g(){var e=h();if(p(e))return y(e);i=setTimeout(g,O(e))}function y(e){return i=void 0,T&&u?x(e):(u=c=void 0,s)}function A(){i!==void 0&&clearTimeout(i),o=0,u=f=c=i=void 0}function C(){return i===void 0?s:y(h())}function I(){var e=h(),a=p(e);if(u=arguments,c=this,f=e,a){if(i===void 0)return W(f);if(d)return clearTimeout(i),i=setTimeout(g,r),x(f)}return i===void 0&&(i=setTimeout(g,r)),s}return I.cancel=A,I.flush=C,I}export{z as d};
@@ -1,757 +0,0 @@
var w9=Object.defineProperty,S9=Object.defineProperties;var y9=Object.getOwnPropertyDescriptors;var VN=Object.getOwnPropertySymbols;var L9=Object.prototype.hasOwnProperty,D9=Object.prototype.propertyIsEnumerable;var HN=(o,e,t)=>e in o?w9(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,I_=(o,e)=>{for(var t in e||(e={}))L9.call(e,t)&&HN(o,t,e[t]);if(VN)for(var t of VN(e))D9.call(e,t)&&HN(o,t,e[t]);return o},E_=(o,e)=>S9(o,y9(e));var io=(o,e,t)=>new Promise((i,n)=>{var s=l=>{try{a(t.next(l))}catch(c){n(c)}},r=l=>{try{a(t.throw(l))}catch(c){n(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,r);a((t=t.apply(o,e)).next())});import{a as uC}from"./chunk.6424c2fc.js";import{bJ as k9,b as gC,d as vx,m as qR,e as Un,aD as Nd,au as Cx,h as fC,r as ki,w as Ul,o as pC,b6 as GR,q as li,F as Wn,z as y0,A as si,R as x9,_ as ZR,as as wx,bK as I9,bL as E9,n as Ho,p as Sx,b7 as N9,v as Nt,E as fd,G as T9,H as M9,D as A9,W as Gb,ae as YR,aA as XR,al as R9,aC as uy,bM as O9,S as yx,ag as P9,c as F9,bk as zN,b1 as B9,bN as UN,bA as QR,P as JR,Q as eO,C as L0,Y as W9,aF as V9,az as tO,O as Lx,t as Ka,I as mC,a9 as Dx,av as _C,$ as bC,a1 as iO,y as Xn,a4 as H9,x as Hr,by as z9,aN as U9,a5 as nO,a6 as sO,a7 as Xr,a2 as oO,aa as $N,N as $9,bO as jN,bP as j9,aB as N_,L as K9,a0 as rO}from"./index.js";import{l as q9}from"./chunk.4a114b4a.js";const Gc=o=>k9(o),vC=Symbol("tabsRootContextKey"),G9=gC({tabs:{type:vx(Array),default:()=>qR([])}}),Z9={name:"ElTabBar"},Y9=Un(E_(I_({},Z9),{props:G9,setup(o,{expose:e}){const t=o,i="ElTabBar",n=wx(),s=Nd(vC);s||Cx(i,"<el-tabs><el-tab-bar /></el-tabs>");const r=fC("tabs"),a=ki(),l=ki(),c=()=>{let h=0,u=0;const g=["top","bottom"].includes(s.props.tabPosition)?"width":"height",f=g==="width"?"x":"y";return t.tabs.every(_=>{var b,v,C,w;const S=(v=(b=n.parent)==null?void 0:b.refs)==null?void 0:v[`tab-${_.uid}`];if(!S)return!1;if(!_.active)return!0;u=S[`client${Gc(g)}`];const k=f==="x"?"left":"top";h=S.getBoundingClientRect()[k]-((w=(C=S.parentElement)==null?void 0:C.getBoundingClientRect()[k])!=null?w:0);const x=window.getComputedStyle(S);return g==="width"&&(t.tabs.length>1&&(u-=Number.parseFloat(x.paddingLeft)+Number.parseFloat(x.paddingRight)),h+=Number.parseFloat(x.paddingLeft)),!1}),{[g]:`${u}px`,transform:`translate${Gc(f)}(${h}px)`}},d=()=>l.value=c();return Ul(()=>t.tabs,()=>io(this,null,function*(){yield pC(),d()}),{immediate:!0}),GR(a,()=>d()),e({ref:a,update:d}),(h,u)=>(li(),Wn("div",{ref_key:"barRef",ref:a,class:y0([si(r).e("active-bar"),si(r).is(si(s).props.tabPosition)]),style:x9(l.value)},null,6))}}));var X9=ZR(Y9,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);const Q9=gC({panes:{type:vx(Array),default:()=>qR([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),J9={tabClick:(o,e,t)=>t instanceof Event,tabRemove:(o,e)=>e instanceof Event},KN="ElTabNav",e8=Un({name:KN,props:Q9,emits:J9,setup(o,{expose:e,emit:t}){const i=wx(),n=Nd(vC);n||Cx(KN,"<el-tabs><tab-nav /></el-tabs>");const s=fC("tabs"),r=I9(),a=E9(),l=ki(),c=ki(),d=ki(),h=ki(!1),u=ki(0),g=ki(!1),f=ki(!0),_=Ho(()=>["top","bottom"].includes(n.props.tabPosition)?"width":"height"),b=Ho(()=>({transform:`translate${_.value==="width"?"X":"Y"}(-${u.value}px)`})),v=()=>{if(!l.value)return;const D=l.value[`offset${Gc(_.value)}`],I=u.value;if(!I)return;const R=I>D?I-D:0;u.value=R},C=()=>{if(!l.value||!c.value)return;const D=c.value[`offset${Gc(_.value)}`],I=l.value[`offset${Gc(_.value)}`],R=u.value;if(D-R<=I)return;const P=D-R>I*2?R+I:D-I;u.value=P},w=()=>io(this,null,function*(){const D=c.value;if(!h.value||!d.value||!l.value||!D)return;yield pC();const I=d.value.querySelector(".is-active");if(!I)return;const R=l.value,P=["top","bottom"].includes(n.props.tabPosition),H=I.getBoundingClientRect(),$=R.getBoundingClientRect(),ne=P?D.offsetWidth-$.width:D.offsetHeight-$.height,ae=u.value;let de=ae;P?(H.left<$.left&&(de=ae-($.left-H.left)),H.right>$.right&&(de=ae+H.right-$.right)):(H.top<$.top&&(de=ae-($.top-H.top)),H.bottom>$.bottom&&(de=ae+(H.bottom-$.bottom))),de=Math.max(de,0),u.value=Math.min(de,ne)}),S=()=>{if(!c.value||!l.value)return;const D=c.value[`offset${Gc(_.value)}`],I=l.value[`offset${Gc(_.value)}`],R=u.value;if(I<D){const P=u.value;h.value=h.value||{},h.value.prev=P,h.value.next=P+I<D,D-P<I&&(u.value=D-I)}else h.value=!1,R>0&&(u.value=0)},k=D=>{const I=D.code,{up:R,down:P,left:H,right:$}=Gb;if(![R,P,H,$].includes(I))return;const ne=Array.from(D.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),ae=ne.indexOf(D.target);let de;I===H||I===R?ae===0?de=ne.length-1:de=ae-1:ae<ne.length-1?de=ae+1:de=0,ne[de].focus(),ne[de].click(),x()},x=()=>{f.value&&(g.value=!0)},y=()=>g.value=!1;return Ul(r,D=>{D==="hidden"?f.value=!1:D==="visible"&&setTimeout(()=>f.value=!0,50)}),Ul(a,D=>{D?setTimeout(()=>f.value=!0,50):f.value=!1}),GR(d,S),Sx(()=>setTimeout(()=>wLine truncated
`+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)}}const dO=new T8;function Ee(o){ol(o)||dO.onUnexpectedError(o)}function Ai(o){ol(o)||dO.onUnexpectedExternalError(o)}function qN(o){if(o instanceof Error){const{name:e,message:t}=o,i=o.stacktrace||o.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:Yu.isErrorNoTelemetry(o)}}return o}const D0="Canceled";function ol(o){return o instanceof yc?!0:o instanceof Error&&o.name===D0&&o.message===D0}class yc extends Error{constructor(){super(D0),this.name=this.message}}function hO(){const o=new Error(D0);return o.name=o.message,o}function zo(o){return o?new Error(`Illegal argument: ${o}`):new Error("Illegal argument")}function M8(o){return o?new Error(`Illegal state: ${o}`):new Error("Illegal state")}class A8 extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Yu extends Error{constructor(e){super(e),this.name="ErrorNoTelemetry"}static fromError(e){if(e instanceof Yu)return e;const t=new Yu;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="ErrorNoTelemetry"}}class kx extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,kx.prototype);debugger}}function nc(o){const e=this;let t=!1,i;return function(){return t||(t=!0,i=o.apply(e,arguments)),i}}var Ue;(function(o){function e(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(S){yield S}o.single=n;function s(S){return S||t}o.from=s;function r(S){return!S||S[Symbol.iterator]().next().done===!0}o.isEmpty=r;function a(S){return S[Symbol.iterator]().next().value}o.first=a;function l(S,k){for(const x of S)if(k(x))return!0;return!1}o.some=l;function c(S,k){for(const x of S)if(k(x))return x}o.find=c;function*d(S,k){for(const x of S)k(x)&&(yield x)}o.filter=d;function*h(S,k){let x=0;for(const y of S)yield k(y,x++)}o.map=h;function*u(...S){for(const k of S)for(const x of k)yield x}o.concat=u;function*g(S){for(const k of S)for(const x of k)yield x}o.concatNested=g;function f(S,k,x){let y=x;for(const D of S)y=k(y,D);return y}o.reduce=f;function _(S,k){let x=0;for(const y of S)k(y,x++)}o.forEach=_;function*b(S,k,x=S.length){for(k<0&&(k+=S.length),x<0?x+=S.length:x>S.length&&(x=S.length);k<x;k++)yield S[k]}o.slice=b;function v(S,k=Number.POSITIVE_INFINITY){const x=[];if(k===0)return[x,S];const y=S[Symbol.iterator]();for(let D=0;D<k;D++){const I=y.next();if(I.done)return[x,o.empty()];x.push(I.value)}return[x,{[Symbol.iterator](){return y}}]}o.consume=v;function C(S){return v(S)[0]}o.collect=C;function w(S,k,x=(y,D)=>y===D){const y=S[Symbol.iterator](),D=k[Symbol.iterator]();for(;;){const I=y.next(),R=D.next();if(I.done!==R.done)return!1;if(I.done)return!0;if(!x(I.value,R.value))return!1}}o.equals=w})(Ue||(Ue={}));class R8 extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function xx(o){return typeof o.dispose=="function"&&o.dispose.length===0}function et(o){if(Ue.is(o)){const e=[];for(const t of o)if(t)try{t.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new R8(e);return Array.isArray(o)?[]:o}else if(o)return o.dispose(),o}function Pr(...o){return ze(()=>et(o))}function ze(o){return{dispose:nc(()=>{o()})}}class ee{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{et(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?ee.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(e),e}}ee.DISABLE_DISPOSED_WARNING=!1;class z{constructor(){this._store=new ee,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}z.None=Object.freeze({dispose(){}});class Vn{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class O8{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}class P8{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let t=e;return this.u Line truncated
`).slice(2).join(`
`))}}class G8{constructor(e,t,i){this.callback=e,this.callbackThis=t,this.stack=i,this.subscription=new P8}invoke(e){this.callback.call(this.callbackThis,e)}}class O{constructor(e){var t,i;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=!((t=this._options)===null||t===void 0)&&t._profName?new CC(this._options._profName):void 0,this._deliveryQueue=(i=this._options)===null||i===void 0?void 0:i.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),(e=this._deliveryQueue)===null||e===void 0||e.clear(this),(i=(t=this._options)===null||t===void 0?void 0:t.onLastListenerRemove)===null||i===void 0||i.call(t),(n=this._leakageMon)===null||n===void 0||n.dispose())}get event(){return this._event||(this._event=(e,t,i)=>{var n,s,r;this._listeners||(this._listeners=new wn);const a=this._listeners.isEmpty();a&&((n=this._options)===null||n===void 0?void 0:n.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this);let l,c;this._leakageMon&&this._listeners.size>=30&&(c=Nx.create(),l=this._leakageMon.check(c,this._listeners.size+1));const d=new G8(e,t,c),h=this._listeners.push(d);a&&((s=this._options)===null||s===void 0?void 0:s.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),!((r=this._options)===null||r===void 0)&&r.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const u=d.subscription.set(()=>{l==null||l(),this._disposed||(h(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return i instanceof ee?i.add(u):Array.isArray(i)&&i.push(u),u}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Z8);for(const n of this._listeners)this._deliveryQueue.push(this,n,e);(t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),(i=this._perfMon)===null||i===void 0||i.stop()}}}class mO{constructor(){this._queue=new wn}get size(){return this._queue.size}push(e,t,i){this._queue.push(new Y8(e,t,i))}clear(e){const t=new wn;for(const i of this._queue)i.emitter!==e&&t.push(i);this._queue=t}deliver(){for(;this._queue.size>0;){const e=this._queue.shift();try{e.listener.invoke(e.event)}catch(t){Ee(t)}}}}class Z8 extends mO{clear(e){this._queue.clear()}}class Y8{constructor(e,t,i){this.emitter=e,this.listener=t,this.event=i}}class I0 extends O{constructor(e){super(e),this._isPaused=0,this._eventQueue=new wn,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class X8 extends I0{constructor(e){var t;super(e),this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class Tx{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(s=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>t.call(i,s)):t.call(i,s)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(n=>n()),i}}class YN{constructor(){this.listening=!1,this.inputEvent=pe.None,this.inputEventListener=z.None,this.emitter=new O({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}class gy{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}gy.INSTANCE=new gy;class Q8 extends z{constructor(){super(),this._onDidChange=this._register(new O),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){var t;(t=this._mediaQueryList)===null||t===void 0||t.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class J8 extends z{constructor(){super(),this._onDidChange=this._register(new O),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new Q8);this._register(e.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}get value(){return this._value}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=e.webkitBack Line truncated
* 'to': A mandatory logical position value providing where to move the cursor.
\`\`\`
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
\`\`\`
* 'by': Unit to move. Default is computed based on 'to' value.
\`\`\`
'line', 'wrappedLine', 'character', 'halfLine'
\`\`\`
* 'value': Number of units to move. Default is '1'.
* 'select': If 'true' makes the selection. Default is 'false'.
`,constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},o.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},o.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let n;switch(i.to){case o.RawDirection.Left:n=0;break;case o.RawDirection.Right:n=1;break;case o.RawDirection.Up:n=2;break;case o.RawDirection.Down:n=3;break;case o.RawDirection.PrevBlankLine:n=4;break;case o.RawDirection.NextBlankLine:n=5;break;case o.RawDirection.WrappedLineStart:n=6;break;case o.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case o.RawDirection.WrappedLineColumnCenter:n=8;break;case o.RawDirection.WrappedLineEnd:n=9;break;case o.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case o.RawDirection.ViewPortTop:n=11;break;case o.RawDirection.ViewPortBottom:n=13;break;case o.RawDirection.ViewPortCenter:n=12;break;case o.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let s=0;switch(i.by){case o.RawUnit.Line:s=1;break;case o.RawUnit.WrappedLine:s=2;break;case o.RawUnit.Character:s=3;break;case o.RawUnit.HalfLine:s=4;break}return{direction:n,unit:s,select:!!i.select,value:i.value||1}}o.parse=t})(j0||(j0={}));var oi;(function(o){o[o.None=0]="None",o[o.Indent=1]="Indent",o[o.IndentOutdent=2]="IndentOutdent",o[o.Outdent=3]="Outdent"})(oi||(oi={}));class Lw{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(e){switch(e){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(e,t){if(e.getTokenCount()===0)return!0;const i=e.findTokenIndexAtOffset(t-2),n=e.getStandardTokenType(i);return this.isOK(n)}_findNeutralCharacterInRange(e,t){for(let i=e;i<=t;i++){const n=String.fromCharCode(i);if(!this.open.includes(n)&&!this.close.includes(n))return n}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}class hW{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)cf(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),cf(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),cf(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),cf(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),t.close.length===1&&t.open.length===1&&cf(this.autoClosingPairsCloseSingleChar,t.close,t)}}function cf(o,e,t){o.has(e)?o.get(e).push(t):o.set(e,[t])}const hP="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function uW(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of hP)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const eI=uW();function uP(o){let e=eI;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const gP=new wn;gP.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Mp(o,e,t,i,n){if(n||(n=Ue.first(gP)),t.length>n.maxLen){let c=o-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,o+n.maxLen/2),Mp(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){const d=r-n.windowSize*c;e.lastIndex=Math.max(0,d);const h=gW(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){const c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};returnLine truncated
`;function Ts(o,e=0){return o[o.length-(1+e)]}function fW(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function ys(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;i<n;i++)if(!t(o[i],e[i]))return!1;return!0}function pW(o,e){const t=o.length-1;e<t&&(o[e]=o[t]),o.pop()}function tI(o,e,t){return mW(o.length,i=>t(o[i],e))}function mW(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function fP(o,e){let t=0,i=o.length;if(i===0)return 0;for(;t<i;){const n=Math.floor((t+i)/2);e(o[n])?i=n:t=n+1}return t}function Iy(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o<n.length?Iy(o,n,t):o<n.length+r.length?r[0]:Iy(o-(n.length+r.length),s,t)}function bT(o,e){const t=[];let i;for(const n of o.slice(0).sort(e))!i||e(i[0],n)!==0?(i=[n],t.push(i)):i.push(n);return t}function BC(o){return o.filter(e=>!!e)}function pP(o){return!Array.isArray(o)||o.length===0}function en(o){return Array.isArray(o)&&o.length>0}function el(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function Ey(o,e){const t=_W(o,e);if(t!==-1)return o[t]}function _W(o,e){for(let t=o.length-1;t>=0;t--){const i=o[t];if(e(i))return t}return-1}function mP(o,e){return o.length>0?o[0]:e}function mn(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;n<e;n++)i.push(n);else for(let n=t;n>e;n--)i.push(n);return i}function WC(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function Dw(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function W_(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function vT(o,e){for(const t of e)o.push(t)}function iI(o){return Array.isArray(o)?o:[o]}function bW(o,e,t){const i=_P(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r<s;r++)o[r+i]=t[r]}function CT(o,e,t,i){const n=_P(o,e),s=o.splice(n,t);return bW(o,n,i),s}function _P(o,e){return e<0?Math.max(e+o.length,0):Math.min(e,o.length)}var wT;(function(o){function e(n){return n<0}o.isLessThan=e;function t(n){return n>0}o.isGreaterThan=t;function i(n){return n===0}o.isNeitherLessOrGreaterThan=i,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(wT||(wT={}));function Xf(o,e){return(t,i)=>e(o(t),o(i))}const vW=(o,e)=>o-e;function bP(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i<o.length;i++){const n=o[i];e(n,t)>0&&(t=n)}return t}function vP(o,e){if(o.length===0)return;let t=o[0];for(let i=1;i<o.length;i++){const n=o[i];e(n,t)>=0&&(t=n)}return t}function CW(o,e){return bP(o,(t,i)=>-e(t,i))}class Ap{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}const ST=typeof Buffer!="undefined";let kw;class VC{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return ST&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new VC(e)}toString(){return ST?this.buffer.toString():(kw||(kw=new TextDecoder),kw.decode(this.buffer))}}function wW(o,e){return o[e+0]<<0>>>0|o[e+1]<<8>>>0}function SW(o,e,t){o[t+0]=e&255,e=e>>>8,o[t+1]=e&255}function xo(o,e){return o[e]*Math.pow(2,24)+o[e+1]*Math.pow(2,16)+o[e+2]*Math.pow(2,8)+o[e+3]}function Io(o,e,t){o[t+3]=e,e=e>>>8,o[t+2]=e,e=e>>>8,o[t+1]=e,e=e>>>8,o[t]=e}function yT(o,e){return o[e]}function LT(o,e,t){o[t]=e}let xw;function CP(){return xw||(xw=new TextDecoder("UTF-16LE")),xw}let Iw;function yW(){return Iw||(Iw=new TextDecoder("UTF-16BE")),Iw}let Ew;function wP(){return Ew||(Ew=fO()?CP():yW()),Ew}const SP=typeof TextDecoder!="undefined";let lc,Ny;SP?(lc=o=>new DW(o),Ny=LW):(lc=o=>new kW,Ny=yP);function LW(o,e,t){const i=new Uint16Array(o.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?yP(o,e,t):CP().decode(i)}function yP(o,e,t){const i=[];let n=0;for(let s=0;s<t;s++){const r=wW(o,e);e+=2,i[n++]=String.fromCharCode(r)}return i.join("")}class DW{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flush Line truncated
`)!==n.length-1&&(s=!1),s){const h=new L(d.lineNumber,1,d.lineNumber,1);r[a]=new Jx(h,n,c,!0)}else r[a]=new Wi(c,n)}return new En(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n||t.length===1)return null;if(s&&s.length===t.length)return s;if(e.multiCursorPaste==="spread"){i.charCodeAt(i.length-1)===10&&(i=i.substr(0,i.length-1)),i.charCodeAt(i.length-1)===13&&(i=i.substr(0,i.length-1));const r=Ur(i);if(r.length===t.length)return r}return null}static paste(e,t,i,n,s,r){const a=this._distributePasteToCursors(e,i,n,s,r);return a?(i=i.sort(L.compareRangesUsingStarts),this._distributedPaste(e,t,i,a)):this._simplePaste(e,t,i,n,s)}static _goodIndentForLine(e,t,i){let n=null,s="";const r=$C(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,s=r.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const d=t.getLineContent(a);if(Fr(d)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),c=Nu(e.autoIndent,t,new L(a,l,a,l),e.languageConfigurationService);c&&(s=c.indentation+c.appendText)}return n&&(n===oi.Indent&&(s=Ot.shiftIndent(e,s)),n===oi.Outdent&&(s=Ot.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const r=i.getStartPosition();if(e.insertSpaces){const a=e.visibleColumnFromColumn(t,r),l=e.indentSize,c=l-a%l;for(let d=0;d<c;d++)s+=" "}else s=" ";return new Wi(i,s,n)}static tab(e,t,i){const n=[];for(let s=0,r=i.length;s<r;s++){const a=i[s];if(a.isEmpty()){const l=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(l)&&t.tokenization.isCheapToTokenize(a.startLineNumber)){let c=this._goodIndentForLine(e,t,a.startLineNumber);c=c||" ";const d=e.normalizeIndentation(c);if(!l.startsWith(d)){n[s]=new Wi(new L(a.startLineNumber,1,a.startLineNumber,l.length+1),d,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){const l=t.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==l){n[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new Fs(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static compositionType(e,t,i,n,s,r,a,l){const c=n.map(d=>this._compositionType(i,d,s,r,a,l));return new En(4,c,{shouldPushStackElementBefore:H_(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),d=new L(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(d)===i&&r===0?null:new e0(d,i,0,r)}static _typeCommand(e,t,i){return i?new F_(e,t,!0):new Wi(e,t,!0)}static _enter(e,t,i,n){if(e.autoIndent===0)return Ot._typeCommand(n,`
`,i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){const l=t.getLineContent(n.startLineNumber),c=pt(l).substring(0,n.startColumn-1);return Ot._typeCommand(n,`
`+e.normalizeIndentation(c),i)}const s=Nu(e.autoIndent,t,n,e.languageConfigurationService);if(s){if(s.indentAction===oi.None)return Ot._typeCommand(n,`
`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===oi.Indent)return Ot._typeCommand(n,`
`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===oi.IndentOutdent){const l=e.normalizeIndentation(s.indentation),c=e.normalizeIndentation(s.indentation+s.appendText),d=`
`+c+`
`+l;return i?new F_(n,d,!0):new e0(n,d,-1,c.length-l.length,!0)}else if(s.indentAction===oi.Outdent){const l=Ot.unshiftIndent(e,s.indentation);return Ot._typeCommand(n,`
`+e.normalizeIndentation(l+s.appendText),i)}}const r=t.getLineContent(n.startLineNumber),a=pt(r).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=aV(e.autoIndent,t,n,{unshiftIndent:c=>Ot.unshiftIndent(e,c),shiftIndent:c=>Ot.shiftIndent(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)},e.languageConfigurationService);if(l){let c=e.visibleColumnFromColumn(t,n.getEndPosition());const d=n.endColumn,h=t.getLineContent(n.endLineNumber),u=Sn(h);if(u>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,u+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new F_(n,`
`+e.normalizeIndentation(l.afterEnter),!0);{let g=0;return d<=u+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),g=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new e0(n,`
`+e.normalizeIndentation(l.afterEnter),0,g,!0)}}}return Ot._typeCommand(n,`
`+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;n<s;n++)if(!t.tokenization.isCheapToTokenize(i[n].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const s=MP(t,i.startLineNumber,i.startColumn),r=lV(e.autoIndent,t,i,n,{shiftIndent:a=>Ot.shiftIndent(e,a),unshiftIndent:a=>Ot.unshiftIndent(e,a)},e.languageConfigurationService);if(r===null)return null;if(r!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?Ot._typeCommand(new L(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):Ot._typeCommand(new L(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let r=0,a=i.length;r<a;r++){const l=i[r];if(!l.isEmpty())return!1;const c=l.getPosition(),d=t.getLineContent(c.lineNumber);if(d.charAt(c.column-1)!==s)return!1;const u=wl(s);if((c.column>2?d.charCodeAt(c.column-2):0)===92&&u)return!1;if(e.autoClosingOvertype==="auto"){let f=!1;for(let _=0,b=n.length;_<b;_++){const v=n[_];if(c.lineNumber===v.startLineNumber&&c.column===v.startColumn){f=!0;break}}if(!f)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,s){const r=[];for(let a=0,l=n.length;a<l;a++){const d=n[a].getPosition(),h=new L(d.lineNumber,d.column,d.lineNumber,d.column+1);r[a]=new Wi(h,s)}return new En(4,r,{shouldPushStackElementBefore:H_(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],r=n.some(l=>t.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!r&&a}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let r=null;for(const a of s)if(r===null||a.open.length>r.open.length){let l=!0;for(const c of i)if(t.getValueInRange(new L(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+n!==a.open){l=!1;break}l&&(r=a)}return r}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const r of n)r.open!==t.open&&t.open.includes(r.open)&&t.close.endsWith(r.close)&&(!s||r.open.length>s.open.length)&&(s=r);return s}static _getAutoClosingPairClose(e,t,i,n,s){const r=wl(n),a=r?e.autoClosingQuotes:e.autoClosingBrackets,l=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if(a==="never")return null;for(const f of i)if(!f.isEmpty())return null;const c=i.map(f=>{const _=f.getPosition();return s?{lineNumber:_.lineNumber,beforeColumn:_.column-n.length,afterColumn:_.column}:{lineNumber:_.lineNumber,beforeColumn:_.column,afterColumn:_.column}}),d=this._findAutoClosingPairOpen(e,t,c.map(f=>new B(f.lineNumber,f.beforeColumn)),n);if(!d)return null;const h=this._findContainedAutoClosingPair(e,d),u=h?h.close:"";let g=!0;for(const f of c){const{lineNumber:_,beforeColumn:b,afterColumn:v}=f,C=t.getLineContent(_),w=C.substring(0,b-1),S=C.substring(v-1);if(S.startsWith(u)||(g=!1),S.length>0){const D=S.charAt(0);if(!Ot._isBeforeClosingBrace(e,S)&&!l(D))return null}if(d.open.length===1&&(n==="'"||n==='"')&&a!=="always"){const D=Zs(e.wordSeparators);if(w.length>0){const I=w.charCodeAt(w.length-1);if(D.get(I)===0)return null}}if(!t.tokenization.isCheapToTokenize(_))return null;t.tokenization.forceTokenization(_);const k=t.tokenization.getLineTokens(_),x=OC(k,b-1);if(!d.shouldAutoClose(x,b-x.firstCharOffset))return null;const y=d.findNeutralCharacter();if(y){const D=t.tokenization.getTokenTypeIfInsertingCharacter(_,b,y);if(!d.isOK(D))return null}}return g?d.close.substring(0,d.close.length-u.length):d.close}static _runAutoClosingOpenCharType(e,t,i,n,s,r,a){const l=[];for(let c=0,d=n.length;c<d;c++){const h=n[c];l[c]=new OP(h,s,!r,a)}return new En(4,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return wl(t)?e.autoSurround==="quotes"||e.autoSurround==="languageDefined":e.autoSurround==="brackets"||e.autoSurround==="languageDefined"}static _isSurroundSelectionType(e,t,i,n){if(!Ot._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const s=wl(n);for(const r of i){if(r.isEmpty())return!1;let a=!0;for(let l=r.startLineNumber;l<=r.endLineNumber;l++){const c=t.getLineContent(l),d=l===r.startLineNumber?r.startColumn-1:0,h=l===r.endLineNumber?r.endColumn-1:c.length,u=c.substring(d,h);if(/[^ \t]/.test(u)){a=!1;break}}if(a)return!1;if(s&&r.startLineNumber===r.endLineNumber&&r.startColumn+1===r.endColumn){const l=t.getValueInRange(r);if(wl(l))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,s){const r Line truncated
`){const d=[];for(let h=0,u=s.length;h<u;h++)d[h]=Ot._enter(i,n,!1,s[h]);return new En(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,s)){const d=[];let h=!1;for(let u=0,g=s.length;u<g;u++)if(d[u]=this._runAutoIndentType(i,n,s[u],a),!d[u]){h=!0;break}if(!h)return new En(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(i,n,s,r,a))return this._runAutoClosingOvertype(t,i,n,s,a);if(!e){const d=this._getAutoClosingPairClose(i,n,s,a,!1);if(d)return this._runAutoClosingOpenCharType(t,i,n,s,a,!1,d)}if(!e&&this._isSurroundSelectionType(i,n,s,a))return this._runSurroundSelectionType(t,i,n,s,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,s)){const d=this._typeInterceptorElectricChar(t,i,n,s[0],a);if(d)return d}const l=[];for(let d=0,h=s.length;d<h;d++)l[d]=new Wi(s[d],a);const c=Mw(a,t);return new En(c,l,{shouldPushStackElementBefore:H_(t,c),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,s){const r=[];for(let l=0,c=n.length;l<c;l++)r[l]=new Wi(n[l],s);const a=Mw(s,e);return new En(a,r,{shouldPushStackElementBefore:H_(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s<r;s++){let a=i[s].positionLineNumber;if(a===1)n[s]=new F_(new L(1,1,1,1),`
`);else{a--;const l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new L(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];const n=[];for(let s=0,r=i.length;s<r;s++){const a=i[s].positionLineNumber,l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new L(a,l,a,l))}return n}static lineBreakInsert(e,t,i){const n=[];for(let s=0,r=i.length;s<r;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class OP extends e0{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new L(n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new L(n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,t)}}class cV{constructor(e,t,i,n,s,r){this.deletedText=e,this.deletedSelectionStart=t,this.deletedSelectionEnd=i,this.insertedText=n,this.insertedSelectionStart=s,this.insertedSelectionEnd=r}}function Mw(o,e){return o===" "?e===5||e===6?6:5:4}function H_(o,e){return OT(o)&&!OT(e)?!0:o===5?!1:RT(o)!==RT(e)}function RT(o){return o===6||o===5?"space":o}function OT(o){return o===4||o===5||o===6}var T;(function(o){o.editorSimpleInput=new ce("editorSimpleInput",!1,!0),o.editorTextFocus=new ce("editorTextFocus",!1,p("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),o.focus=new ce("editorFocus",!1,p("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),o.textInputFocus=new ce("textInputFocus",!1,p("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),o.readOnly=new ce("editorReadonly",!1,p("editorReadonly","Whether the editor is read only")),o.inDiffEditor=new ce("inDiffEditor",!1,p("inDiffEditor","Whether the context is a diff editor")),o.columnSelection=new ce("editorColumnSelection",!1,p("editorColumnSelection","Whether `editor.columnSelection` is enabled")),o.writable=o.readOnly.toNegated(),o.hasNonEmptySelection=new ce("editorHasSelection",!1,p("editorHasSelection","Whether the editor has text selected")),o.hasOnlyEmptySelection=o.hasNonEmptySelection.toNegated(),o.hasMultipleSelections=new ce("editorHasMultipleSelections",!1,p("editorHasMultipleSelections","Whether the editor has multiple selections")),o.hasSingleSelection=o.hasMultipleSelections.toNegated(),o.tabMovesFocus=new ce("editorTabMovesFocus",!1,p("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),o.tabDoesNotMoveFocus=o.tabMovesFocus.toNegated(),o.isInWalkThroughSnippet=new ce("isInEmbeddedEditor",!1,!0),o.canUndo=new ce("canUndo",!1,!0),o.canRedo=new ce("canRedo",!1,!0),o.hoverVisible=new ce("editorHoverVisible",!1,p("editorHoverVisible","Whether the editor hover is visible")),o.inCompositeEditor=new ce("inCompositeEditor",void 0,p("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),o.notInCompositeEditor=o.inCompositeEditor.toNegated(),o.languageId=new ce("editorLangId","",p("editorLangId","The language identifier of the editor")),o.hasCompletionItemProvider=new ce("editorHasCompletionItemProvider",!1,p("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),o.hasCodeActionsProvider=new ce("editorHasCodeActionsProvider",!1,p("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),o.hasCodeLensProvider=new ce("editorHasCodeLensProvider",!1,p("editorHasCodeLensProvider","Whether the editor has a code lens provider")),o.hasDefinitionProvider=new ce("editorHasDefinitionProvider",!1,p("editorHasDefinitionProvider","Whether the editor has a definition provider")),o.hasDeclarationProvider=new ce("editorHasDeclarationProvider",!1,p("editorHasDeclarationProvider","Whether the editor has a declaration provider")),o.hasImplementationProvider=new ce("editorHasImplementationProvider",!1,p("editorHasImplementationProvider","Whether the editor has an implementation provider")),o.hasTypeDefinitionProvider=new ce("editorHasTypeDefinitionProvider",!1,p("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),o.hasHoverProvider=new ce("editorHasHoverProvider",!1,p("editorHasHoverProvider","Whether the editor has a hover provider")),o.hasDocumentHighlightProvider=new ce("editorHasDocumentHighlightProvider",!1,p("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),o.hasDocumentSymbolProvider=new ce("editorHasDocumentSymbolProvider",!1,p("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),o.hasReferenceProvider=new ce("editorHasReferenceProvider",!1,p("editorHasReferenceProvider","Whether the editor has a reference provider")),o.hasRenameProvider=new ce("editorHasRenameProvider",!1,p("editorHasRenameProvider Line truncated
- Use 0 to automatically compute the line height from the font size.
- Values between 0 and 8 will be used as a multiplier with the font size.
- Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class MV extends hi{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(67,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:p("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:p("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),p("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:p("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:p("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:p("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:p("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:p("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:p("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ce(t.enabled,this.defaultValue.enabled),autohide:Ce(t.autohide,this.defaultValue.autohide),size:Ui(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Ui(t.side,this.defaultValue.side,["right","left"]),showSlider:Ui(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Ce(t.renderCharacters,this.defaultValue.renderCharacters),scale:Et.clampedInt(t.scale,1,1,3),maxColumn:Et.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function AV(o){return o==="ctrlCmd"?Ze?"metaKey":"ctrlKey":"altKey"}class RV extends hi{constructor(){super(77,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Et.clampedInt(t.top,0,0,1e3),bottom:Et.clampedInt(t.bottom,0,0,1e3)}}}class OV extends hi{constructor(){const e={enabled:!0,cycle:!1};super(78,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:p("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:p("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ce(t.enabled,this.defaultValue.enabled),cycle:Ce(t.cycle,this.defaultValue.cycle)}}}class PV extends Bg{constructor(){super(131)}compute(e,t,i){return e.pixelRatio}}class FV extends hi{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[p("on","Quick suggestions show inside the suggest widget"),p("inline","Quick suggestions show as ghost text"),p("off","Quick suggestions are disabled")]}];super(81,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:p("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:p("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:p("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:p("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the sug Line truncated
`)}}const KC=new vH;di.add(qP.ColorContribution,KC);function CH(o){return o===null||typeof o.hcLight=="undefined"&&(o.hcDark===null||typeof o.hcDark=="string"?o.hcLight=o.hcDark:o.hcLight=o.light),o}function N(o,e,t,i,n){return KC.registerColor(o,CH(e),t,i,n)}const X=N("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},p("foreground","Overall foreground color. This color is only used if not overridden by a component."));N("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},p("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));const wH=N("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},p("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));N("descriptionForeground",{light:"#717171",dark:fe(X,.7),hcDark:fe(X,.7),hcLight:fe(X,.7)},p("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));const z_=N("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},p("iconForeground","The default color for icons in the workbench.")),Hs=N("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#0F4A85"},p("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),Be=N("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},p("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),At=N("contrastActiveBorder",{light:null,dark:null,hcDark:Hs,hcLight:Hs},p("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));N("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},p("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));N("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:W.black,hcLight:"#292929"},p("textSeparatorForeground","Color for text separators."));const qC=N("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkForeground","Foreground color for links in text.")),GC=N("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},p("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));N("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},p("textPreformatForeground","Foreground color for preformatted text segments."));N("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},p("textBlockQuoteBackground","Background color for block quotes in text."));N("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:W.white,hcLight:"#292929"},p("textBlockQuoteBorder","Border color for block quotes in text."));const GP=N("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:W.black,hcLight:"#F2F2F2"},p("textCodeBlockBackground","Background color for code blocks in text.")),Tr=N("widget.shadow",{dark:fe(W.black,.36),light:fe(W.black,.16),hcDark:null,hcLight:null},p("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),ZC=N("input.background",{dark:"#3C3C3C",light:W.white,hcDark:W.black,hcLight:W.white},p("inputBoxBackground","Input box background.")),YC=N("input.foreground",{dark:X,light:X,hcDark:X,hcLight:X},p("inputBoxForeground","Input box foreground.")),XC=N("input.border",{dark:null,light:null,hcDark:Be,hcLight:Be},p("inputBoxBorder","Input box border.")),Y0=N("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hcDark:Be,hcLight:Be},p("inputBoxActiveOptionBorder","Border color of activated options in input fields."));N("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},p("inputOption.hoverBackground","Background color of activated options in input fields."));const X0=N("inputOption.activeBackground",{dark:fe(Hs,.4),light:fe(Hs,.2),hcDark:W.transparent,hcLight:W.transparent},p("inputOption.activeBackground","Background hover color of options in input fields.")),Q0=N("inputOption.activeForeground",{dark:W.white,light:W.black,hcDark:null,hcLight:X},p("inputOption.activeForeground","Foreground color of activated options in input fields."));N("input.placeholderForeground",{light:fe(X,.5),dark:fe(X,.5),hcDark:fe(X,.7),hcLight:fe(X,.7)},p("inputPlaceholderForeground","Input box foreground color for placeholder text."));const lI=N("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:W.black,hcLight:W.white},p("inputValidationInfoBackground","Input validation background color for information se Line truncated
${Qz(n)}: ${r};`}return i+=`
}`,i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function Qz(o){return o.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`)}class Zm extends z{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){const s=e[i];switch(s.type){case 0:this.onCompositionStart(s)&&(t=!0);break;case 1:this.onCompositionEnd(s)&&(t=!0);break;case 2:this.onConfigurationChanged(s)&&(t=!0);break;case 3:this.onCursorStateChanged(s)&&(t=!0);break;case 4:this.onDecorationsChanged(s)&&(t=!0);break;case 5:this.onFlushed(s)&&(t=!0);break;case 6:this.onFocusChanged(s)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(s)&&(t=!0);break;case 8:this.onLineMappingChanged(s)&&(t=!0);break;case 9:this.onLinesChanged(s)&&(t=!0);break;case 10:this.onLinesDeleted(s)&&(t=!0);break;case 11:this.onLinesInserted(s)&&(t=!0);break;case 12:this.onRevealRangeRequest(s)&&(t=!0);break;case 13:this.onScrollChanged(s)&&(t=!0);break;case 15:this.onTokensChanged(s)&&(t=!0);break;case 14:this.onThemeChanged(s)&&(t=!0);break;case 16:this.onTokensColorsChanged(s)&&(t=!0);break;case 17:this.onZonesChanged(s)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(s)}}t&&(this._shouldRender=!0)}}class Es extends Zm{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class jr{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){const i=[];let n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const s=new Uint8Array(n);for(let r=0;r<n;r++)s[r]=i[n-r-1];return s}}class Jz{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class eU extends Jz{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class tU{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class JC{constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const s=e[i];t[i]=new JC(s.left,s.width)}return t}toString(){return`[${this.left},${this.width}]`}}class Ru{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class iU{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class nU{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class Rw{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,s){const r=this._createRange();try{return r.setStart(e,t),r.setEnd(i,n),r.getClientRects()}catch(a){return null}finally{this._detachRange(r,s)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(Ru.compare);const t=[];let i=0,n=e[0];for(let s=1,r=e.length;s<r;s++){const a=e[s];n.left+n.width+.9>=a.left?n.width=Math.max(n.width,a.left+a.width-n.left):(t[i++]=n,n=a)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||e.length===0)re Line truncated
target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?_i.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return Tn.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return Tn.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return Tn.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return Tn.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return Tn.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return Tn.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return Tn.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return Tn.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return Tn.createOverlayWidget(this.target,this._getMouseColumn(),e)}withTarget(e){return new yI(this._ctx,this.editorPos,this.pos,this.relativePos,e)}}const JT={isAfterLines:!0};function Ow(o){return{isAfterLines:!1,horizontalDistanceToText:o}}class qi{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=jr.collect(t,this._viewHelper.viewDomNode);return!!(no.isChildOfContentWidgets(i)||no.isChildOfOverflowingContentWidgets(i)||no.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n,s){const r=new cg(this._context,this._viewHelper,e),a=new yI(r,t,i,n,s);try{return qi._createMouseTarget(r,a,!1)}catch(l){return a.fulfillUnknown()}}static _createMouseTarget(e,t,i){if(t.target===null){if(i)return t.fulfillUnknown();const r=qi._doHitTest(e,t);return r.type===1?qi.createMouseTargetFromHitTestPosition(e,t,r.spanNode,r.position,r.injectedText):this._createMouseTarget(e,t.withTarget(r.hitTarget),!0)}const n=t;let s=null;return s=s||qi._hitTestContentWidget(e,n),s=s||qi._hitTestOverlayWidget(e,n),s=s||qi._hitTestMinimap(e,n),s=s||qi._hitTestScrollbarSlider(e,n),s=s||qi._hitTestViewZone(e,n),s=s||qi._hitTestMargin(e,n),s=s||qi._hitTestViewCursor(e,n),s=s||qi._hitTestTextArea(e,n),s=s||qi._hitTestViewLines(e,n,i),s=s||qi._hitTestScrollbar(e,n),s||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(no.isChildOfContentWidgets(t.targetPath)||no.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(no.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const n of i)if(t.target===n.domNode)return t.fulfillContentText(n.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(const r of i){if(n<r.contentLeft||n>r.contentLeft+r.width)continue;const a=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(a<=s&&s<=a+r.height)return t.fulfillContentText(r.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfillViewZone(n,i.position,i)}return null}static _hitTestTextArea(e,t){return no.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};return s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,r):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,r):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!no.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new B(1,1),JT);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const s=e.viewModel.getLineCount(),r=e.viewModel.getLineMaxColumn(s);return t.fulfillContentEmpty(new B(s,r),JT)}if(i){if(no.isStrictChildOfViewLines(t.targetPath)){const s=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.viewModel.getLineLength(s)===0){const a=e.getLineWidth(s),l=Ow(t.mouse Line truncated
`,s+1))!==-1;)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(Pd(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min(Np(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-s);const r=t.value.substring(n,t.value.length-s),a=e.selectionStart-n,l=e.selectionEnd-n,c=t.selectionStart-n,d=t.selectionEnd-n;if(c===d){const u=e.selectionStart-n;return{text:r,replacePrevCharCnt:u,replaceNextCharCnt:0,positionDelta:0}}const h=l-a;return{text:r,replacePrevCharCnt:h,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(Pd(e.value,t.value),e.selectionEnd),n=Math.min(Np(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),r=t.value.substring(i,t.value.length-n);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const l=t.selectionEnd-i;return{text:r,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-r.length}}}Vi.EMPTY=new Vi("",0,0,null,null);class mu{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new L(n,1,s+1,1)}static fromEditorSelection(e,t,i,n,s){const r=mu._getPageOfLine(i.startLineNumber,n),a=mu._getRangeForPage(r,n),l=mu._getPageOfLine(i.endLineNumber,n),c=mu._getRangeForPage(l,n),d=a.intersectRanges(new L(1,1,i.startLineNumber,i.startColumn));let h=t.getValueInRange(d,1);const u=t.getLineCount(),g=t.getLineMaxColumn(u),f=c.intersectRanges(new L(i.endLineNumber,i.endColumn,u,g));let _=t.getValueInRange(f,1),b;if(r===l||r+1===l)b=t.getValueInRange(i,1);else{const v=a.intersectRanges(i),C=c.intersectRanges(i);b=t.getValueInRange(v,1)+String.fromCharCode(8230)+t.getValueInRange(C,1)}return s&&(h.length>500&&(h=h.substring(h.length-500,h.length)),_.length>500&&(_=_.substring(0,500)),b.length>2*500&&(b=b.substring(0,500)+String.fromCharCode(8230)+b.substring(b.length-500,b.length))),new Vi(h+b+_,h.length,h.length+b.length,new B(i.startLineNumber,i.startColumn),new B(i.endLineNumber,i.endColumn))}}var tv;(function(o){o.Tap="-monaco-textarea-synthetic-tap"})(tv||(tv={}));const Gy={forceCopyWithSyntaxHighlighting:!1};class Wp{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}Wp.INSTANCE=new Wp;class LU{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){e=e||"";const t={text:e,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class DU extends z{constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new O),this.onFocus=this._onFocus.event,this._onBlur=this._register(new O),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new O),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new O),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new O),this.onCut=this._onCut.event,this._onPaste=this._register(new O),this.onPaste=this._onPaste.event,this._onType=this._register(new O),this.onType=this._onType.event,this._onCompositionStart=this._register(new O),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new O),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new O),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new O),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new ft(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new ft(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=Vi.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let s=null;this._register(this._textArea.onKeyDown(r=>{const a=new Mt(r);(a.keyCode===109||this._currentComposition&&a.keyCode===1)&&a.stopPropagation(),a.equals(9)&&a.preventDefault(),s=a,this._onKeyDown.fire(a)})),this._register(this._textArea.onKeyUp(r=>{const a=new Mt(r);this._onKeyUp.fire(a)})),this._register(this._textArea.onCompositionStart(r=>{const a=new LU;if(this._currentComposition){this._currentComposition=a;return}if(this._currentComposition=a,this._OS===2&&s&&s.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===r.data&&(s.code==="ArrowRi Line truncated
`):t.text,i),e.preventDefault(),e.clipboardData&&e2.setTextData(e.clipboardData,t.text,t.html,i)}}class e2{static getTextData(e){const t=e.getData(Pn.text);let i=null;const n=e.getData("vscode-editor-data");if(typeof n=="string")try{i=JSON.parse(n),i.version!==1&&(i=null)}catch(s){}return t.length===0&&i===null&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map(r=>r.name).join(`
`),null]:[t,i]}static setTextData(e,t,i,n){e.setData(Pn.text,t),typeof i=="string"&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class kU extends z{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(ko(this._actual,"keydown")).event,this.onKeyUp=this._register(ko(this._actual,"keyup")).event,this.onCompositionStart=this._register(ko(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(ko(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(ko(this._actual,"compositionend")).event,this.onInput=this._register(ko(this._actual,"input")).event,this.onCut=this._register(ko(this._actual,"cut")).event,this.onCopy=this._register(ko(this._actual,"copy")).event,this.onPaste=this._register(ko(this._actual,"paste")).event,this.onFocus=this._register(ko(this._actual,"focus")).event,this.onBlur=this._register(ko(this._actual,"blur")).event,this._onSyntheticTap=this._register(new O),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(q(this._actual,tv.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const e=Md(this._actual);return e?e.activeElement===this._actual:Vx(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let s=null;const r=Md(n);r?s=r.activeElement:s=document.activeElement;const a=s===n,l=n.selectionStart,c=n.selectionEnd;if(a&&l===t&&c===i){Ls&&window.parent!==window&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),Ls&&window.parent!==window&&n.focus();return}try{const d=fB(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),pB(n,d)}catch(d){}}}class xU extends LI{constructor(e,t,i){super(e,t,i),this._register(ut.addTarget(this.viewHelper.linesContentDomNode)),this._register(q(this.viewHelper.linesContentDomNode,kt.Tap,s=>this.onTap(s))),this._register(q(this.viewHelper.linesContentDomNode,kt.Change,s=>this.onChange(s))),this._register(q(this.viewHelper.linesContentDomNode,kt.Contextmenu,s=>this._onContextMenu(new cc(s,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(q(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const r=s.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new Zz(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,s=>this._onMouseMove(s))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(s,r)=>this._onMouseDown(s,r)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new cc(e,!1,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:t.type===6&&t.detail.injectedText!==null})}onChange(e){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e,t){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e,t)}}class IU extends LI{constructor(e,t,i){super(e,t,i),this._register(ut.addTarget(this.viewHelper.linesContentDomNode)),this._register(q(this.viewHelper.linesContentDomNode,kt.Tap,n=>this.onTap(n))),this._register(q(this.viewHelper.linesContentDomNode,kt.Change,n=>this.onChange(n))),this._register(q(this.viewHelper.linesContentDomNode,kt.Contextmenu,n=>this._onContextMenu(new cc(n,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new cc(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const i=document.createEvent("CustomEvent");i.initEvent(tv.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(t.position)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class EU extends z{construct Line truncated
`),v=_.substring(b+1),C=v.lastIndexOf(" "),w=v.length-C-1,S=h.getStartPosition(),k=Math.min(S.column-1,w),x=S.column-1-k,y=v.substring(0,v.length-k),D=g$(y,this._fontInfo);return{distanceToModelLineStart:x,widthOfHiddenTextBefore:D}})(),{distanceToModelLineEnd:f}=(()=>{const _=d.value.substring(Math.max(d.selectionStart,d.selectionEnd)),b=_.indexOf(`
`),v=b===-1?_:_.substring(0,b),C=v.indexOf(" "),w=C===-1?v.length:v.length-C-1,S=h.getEndPosition(),k=Math.min(this._context.viewModel.model.getLineMaxColumn(S.lineNumber)-S.column,w);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(S.lineNumber)-S.column-k}})();this._context.viewModel.revealRange("keyboard",!0,L.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new h$(this._context,h.startLineNumber,u,g,f),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${vd} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(c=>{!this._visibleTextArea||(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${vd}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.viewModel.getLineContent(e.lineNumber),n=Zs(t);let s=!0,r=e.column,a=!0,l=e.column,c=0;for(;c<50&&(s||a);){if(s&&r<=1&&(s=!1),s){const d=i.charCodeAt(r-2);n.get(d)!==0?s=!1:r--}if(a&&l>i.length&&(a=!1),a){const d=i.charCodeAt(l-1);n.get(d)!==0?a=!1:l++}c++}return[i.substring(r-1,l-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=Zs(this._context.configuration.options.get(119));let n=e.column,s=0;for(;n>1;){const r=t.charCodeAt(n-2);if(i.get(r)!==0||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const i=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!wi(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){return e.get(2)===1?p("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",sn?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===Jo.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(133);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(46),this._lineHeight=t.get(61),this._emptySelectionClipboard=t.get(33),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(114))),(e.hasChanged(30)||e.hasChanged(83))&&(t.get(30)&&t.get(83)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){var t;this._primaryCursorPosition=new B(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)===null||t===void 0||t.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const i=this._visibleTextArea.visibleTextareaStart,n=this._visibleTextArea.visibleTextareaEnd,s=this._visibleTextArea.startPosition,r=this._visibleTextArea.endPosition;if(s&&r&&i&&n&&n.left>=this._scrollLeft&&i.left<=this._scrollLeft+this._contentWidth){const a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPLine truncated
`,i+1),i===-1)break;t++}while(!0);return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:uf?0:1,height:uf?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;tn(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?W.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(52)?i.setClassName("monaco-editor-background textAreaCover "+zd.OUTER_CLASS_NAME):n.get(62).renderType!==0?i.setClassName("monaco-editor-background textAreaCover "+dg.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}function g$(o,e){if(o.length===0)return 0;const t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";const i=document.createElement("span");tn(i,e),i.style.whiteSpace="pre",i.append(o),t.appendChild(i),document.body.appendChild(t);const n=i.offsetWidth;return document.body.removeChild(t),n}class f${constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){yi.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new B(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(72)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(72)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=sn&&t.get(98),n=t.get(18);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount===2?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){yi.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){yi.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),yi.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),yi.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){yi.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){yi.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){yi.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){yi.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){yi.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){yi.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){yi.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorL Line truncated
.monaco-scrollable-element > .shadow.top {
box-shadow: ${t} 0 6px 6px -6px inset;
}
.monaco-scrollable-element > .shadow.left {
box-shadow: ${t} 6px 0 6px -6px inset;
}
.monaco-scrollable-element > .shadow.top.left {
box-shadow: ${t} 6px 6px 6px -6px inset;
}
`);const i=o.getColor(rd);i&&e.addRule(`
.monaco-scrollable-element > .scrollbar > .slider {
background: ${i};
}
`);const n=o.getColor(ad);n&&e.addRule(`
.monaco-scrollable-element > .scrollbar > .slider:hover {
background: ${n};
}
`);const s=o.getColor(ld);s&&e.addRule(`
.monaco-scrollable-element > .scrollbar > .slider.active {
background: ${s};
}
`)});class sv{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class II extends zg{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=[]}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className<l.className?-1:1);let s=null,r=0;for(let a=0,l=i.length;a<l;a++){const c=i[a],d=c.className;let h=Math.max(c.startLineNumber,e)-e;const u=Math.min(c.endLineNumber,t)-e;s===d?(h=Math.max(r+1,h),r=Math.max(r,u)):(s=d,r=u);for(let g=h;g<=r;g++)n[g].push(s)}return n}}class P$ extends II{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(133);this._lineHeight=t.get(61),this._glyphMargin=t.get(52),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(133);return this._lineHeight=t.get(61),this._glyphMargin=t.get(52),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let s=0,r=t.length;s<r;s++){const a=t[s],l=a.options.glyphMarginClassName;l&&(i[n++]=new sv(a.range.startLineNumber,a.range.endLineNumber,l))}return i}prepareRender(e){if(!this._glyphMargin){this._renderResult=null;return}const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),a=this._glyphMarginWidth.toString(),l='" style="left:'+r+"px;width:"+a+"px;height:"+s+'px;"></div>',c=[];for(let d=t;d<=i;d++){const h=d-t,u=n[h];u.length===0?c[h]="":c[h]='<div class="cgmr codicon '+u.join(" ")+l}this._renderResult=c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class k4 extends z{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function s1(o,e){let t=0,i=0;const n=o.length;for(;i<n;){const s=o.charCodeAt(i);if(s===32)t++;else if(s===9)t=t-t%e+e;else break;i++}return i===n?-1:t}var Cd;(function(o){o[o.Disabled=0]="Disabled",o[o.EnabledForActive=1]="EnabledForActive",o[o.Enabled=2]="Enabled"})(Cd||(Cd={}));class hd{constructor(e,t,i,n,s,r){if(this.visibleColumn=e,this.column=t,this.className=i,this.horizontalLine=n,this.forWrappedLinesAfterColumn=s,this.forWrappedLinesBeforeOrAtColumn=r,e!==-1==(t!==-1))throw new Error}}class ep{constructor(e,t){this.top=e,this.endColumn=t}}class F$ extends k4{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return s1(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,r=Boolean(s&&s.offSide);let a=-2,l=-1,c=-2,d=-1;const h=y=>{if(a!==-1&&(a===-2||a>y-1)){a=-1,l=-1;for(let D=y-2;D>=0;D--){const I=this._computeIndentLevel(D);if(I>=0){a=D,l=I;break}}}if(c===-2){c=-1,d=-1;for(let D=y;D<n;D++){const I=this._computeIndentLevel(D);if(I>=0){c=D,d=I;break}}}};let u=-2,g=-1,f=-2,_=-1;const b=y=>{if(u===-2){u=-1,g=-1;for(let D=y-2;D>=0;D--){const I=this._computeIndentLevel(D);if(I>=0){u=D,g=I;break}}}if(f!==-1&&(f===-2||f<y-1)){f=-1,_=-1;for(let D=y;D<n;D++){const I=this._computeIndentLevel(D);if(I>=0){f=D,_=I;break}}}};let v=0,C=!0,w=0,S=!0,k=0,x=0;for(let y=0;C||S;y++){const D=e-y,I=e+y;y>1&&(D<1||D<t)&&(C=!1),y>1&&(I>n||I>i)&&(S=!1),y>5e4&&(C=!1,S=!1);let R=-1;if(C&&D>=1){const H=this._computeIndentLevel(D-1);H>=0?(c=D-1,d=H,R=Math.ceil(H/this.textModel.getOptions().indentSize)):(h(D),R=this._getIndentLevelForWhitespaceLine(r,l,d))}let P=-1;if(S&&I<=n){const H=this._computeIndentLevel(I-1);H>=0?(u=I-1,g=H,P=Math.ceil(H/this.textModel.getOptions().indentSize)):(b(I),P=this._getIndentLevelForWhitespaceLine(r,g,_))}if(y===0){x=R;continue}if(y===1){if(I<=n&&P>=0&&x+1===P){C=!1,v=I,w=I,k=P;continue}if(D>=1&&R>=0&&R-1===x){S=!1,v=D,w=D,k=R;continue}if(v=e,w=e,k=x,k===0)return{startLineNumber:v,endLineNumber:w,indent:k}}C&&(R>=k?v=D:C=!1),S&&(P>=k?w=I:S=!1)}return{startLineNumber:v,endLineNumber:w,indent:k}}g Line truncated
`)>=0)return null;const r=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const a=r[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,d=s.text.length-r[2].length-1,h=s.text.lastIndexOf(c,d-1);if(h===-1)return null;t.push([h,d])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const r=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(s)for(let h=0,u=s.length;h<u;h++){const[g,f]=s[h],_=c[h],b=_.range.startLineNumber,v=_.range.startColumn-1+g,C=_.range.startColumn-1+f;r.push(new L(b,C+1,b,C+2)),a.push(new L(b,v+1,b,C+2))}const d=n(c);return d&&(this._isHandling=!0),d});l&&(this._isHandling=!1,this.setSelections(e,t,l,0)),r.length>0&&this._pushAutoClosedAction(r,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=sp.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){Ee(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return _2.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new op(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Ot.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let s=0;for(;s<n;){const r=qx(t,s),a=t.substr(s,r);this._executeEditOperation(Ot.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),a)),s+=r}}else this._executeEditOperation(Ot.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,i)}compositionType(e,t,i,n,s,r){if(t.length===0&&i===0&&n===0){if(s!==0){const a=this.getSelections().map(l=>{const c=l.getPosition();return new oe(c.lineNumber,c.column+s,c.lineNumber,c.column+s)});this.setSelections(e,r,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Ot.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,r)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(Ot.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(Wd.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new En(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new En(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}ug.MAX_CURSOR_COUNT=1e4;class sp{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new sp(e.getVersionId(),t.getCursorStates())}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class _2{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){const t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(n&&(t.push(n),n.startLineNumber!==n.endLineNumber))return!1}t.sort(L.compareRangesUsingStarts),e.sort(L.compareRangesUsingStarts);for(let i=0;i<e.length;i++)if(i>=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class Kj{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let r=0,a=n.trackedRanges.length;r<a;r++)n.model._setTraLine truncated
`,"gi"):null,s=[];let r,a=0,l=0,c=0,d=0;const h=new Array;for(let f=0;f<60;f++)h.push(new El(Xt(0,f),0,-1,ri.getEmpty(),new Xh(Xt(0,f))));const u=new Array;for(let f=0;f<60;f++)u.push(new El(Xt(1,f),0,-1,ri.getEmpty(),new Xh(Xt(1,f))));if(n)for(n.lastIndex=0;(r=n.exec(e))!==null;){const f=r.index,_=r[0];if(_===`
`)a++,l=f+1;else{if(c!==f){let b;if(d===a){const v=f-c;if(v<h.length)b=h[v];else{const C=Xt(0,v);b=new El(C,0,-1,ri.getEmpty(),new Xh(C))}}else{const v=a-d,C=f-l;if(v===1&&C<u.length)b=u[C];else{const w=Xt(v,C);b=new El(w,0,-1,ri.getEmpty(),new Xh(w))}}s.push(b)}s.push(t.getToken(_)),c=f+_.length,d=a}}const g=e.length;if(c!==g){const f=d===a?Xt(0,g-c):Xt(a-d,g-l);s.push(new El(f,0,-1,ri.getEmpty(),new Xh(f)))}this.length=Xt(a,g-l),this.tokens=s}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new A8}}class FI{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function i(s){return t.getKey(`${s.languageId}:::${s.bracketText}`)}const n=new Map;for(const s of e.bracketsNew.openingBrackets){const r=Xt(0,s.bracketText.length),a=i(s),l=ri.getEmpty().add(a,v2);n.set(s.bracketText,new El(r,1,a,l,dv.create(r,s,l)))}for(const s of e.bracketsNew.closingBrackets){const r=Xt(0,s.bracketText.length);let a=ri.getEmpty();const l=s.getClosedBrackets();for(const c of l)a=a.add(i(c),v2);n.set(s.bracketText,new El(r,2,i(l[0]),a,dv.create(r,s,a)))}return new FI(n)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>lK(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(i.kind===2&&i.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function lK(o){let e=Ds(o);return/^[\w ]+/.test(o)&&(e=`\\b${e}`),/[\w ]+$/.test(o)&&(e=`${e}\\b`),e}class O4{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=FI.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function cK(o){if(o.length===0)return null;if(o.length===1)return o[0];let e=0;function t(){if(e>=o.length)return null;const r=e,a=o[r].listHeight;for(e++;e<o.length&&o[e].listHeight===a;)e++;return e-r>=2?P4(r===0&&e===o.length?o:o.slice(r,e),!1):o[r]}let i=t(),n=t();if(!n)return i;for(let r=t();r;r=t())C2(i,n)<=C2(n,r)?(i=Hw(i,n),n=r):n=Hw(n,r);return Hw(i,n)}function P4(o,e=!1){if(o.length===0)return null;if(o.length===1)return o[0];let t=o.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const s=n<<1;o[n]=Kr.create23(o[s],o[s+1],s+3===t?o[s+2]:null,e)}t=i}return Kr.create23(o[0],o[1],t>=3?o[2]:null,e)}function C2(o,e){return Math.abs(o.listHeight-e.listHeight)}function Hw(o,e){return o.listHeight===e.listHeight?Kr.create23(o,e,null,!1):o.listHeight>e.listHeight?dK(o,e):hK(e,o)}function dK(o,e){o=o.toMutable();let t=o;const i=new Array;let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Kr.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Kr.create23(o,n,null,!1):o}function hK(o,e){o=o.toMutable();let t=o;const i=new Array;for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const r=i[s];n?r.childrenLength>=3?n=Kr.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?Kr.create23(n,o,null,!1):o}class uK{constructor(e){this.lastOffset=go,this.nextNodes=[e],this.offsets=[go],this.idxs=[]}readLongestNodeAt(e,t){if(Fu(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=ff(this.nextNodes);if(!i)return;const n=ff(this.offsets);if(Fu(e,n))return;if(Fu(n,e))if(qt(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=zw(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=zw(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=ff(this.offsets),t=ff(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=ff(this.nextNodes),n=zw(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(qt(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function zw(o,e=-1){for(;;){if(e++,e>=o.childrenLength)return-1;if(o.getChild(e))return e}}function ff(o){return o.length>0?o[o.length-1]:void 0}function tL(o,e,t,i){return new gK(o,e,t,i).parseDocument()}class Line truncated
`?0:1}function Da(o){return o?o instanceof U4||o instanceof xK:!1}class WI{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Da(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Da(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(Da(t)&&t.canAppend(this._model))return t;const i=new U4(p("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],oL(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),s=this._model.applyEdits(t,!0),r=WI._computeCursorState(i,s),a=s.map((l,c)=>({index:c,textChange:l.textChange}));return a.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),n.append(this._model,a.map(l=>l.textChange),oL(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Ee(i),null}}}class IK{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function EK(o,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s<e&&s<i;s++){const u=o.charCodeAt(s),g=t.charCodeAt(s);if(u!==g)break}let r=0,a=0;for(let u=s;u<e;u++)o.charCodeAt(u)===32?r++:a++;let l=0,c=0;for(let u=s;u<i;u++)t.charCodeAt(u)===32?l++:c++;if(r>0&&a>0||l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(d===0){n.spacesDiff=h,h>0&&0<=l-1&&l-1<o.length&&l<t.length&&t.charCodeAt(l)!==32&&o.charCodeAt(l-1)===32&&o.charCodeAt(o.length-1)===44&&(n.looksLikeAlignment=!0);return}if(h%d===0){n.spacesDiff=h/d;return}}function D2(o,e,t){const i=Math.min(o.getLineCount(),1e4);let n=0,s=0,r="",a=0;const l=[2,4,6,8,3,5,7],c=8,d=[0,0,0,0,0,0,0,0,0],h=new IK;for(let f=1;f<=i;f++){const _=o.getLineLength(f),b=o.getLineContent(f),v=_<=65536;let C=!1,w=0,S=0,k=0;for(let y=0,D=_;y<D;y++){const I=v?b.charCodeAt(y):o.getLineCharCode(f,y);if(I===9)k++;else if(I===32)S++;else{C=!0,w=y;break}}if(!C||(k>0?n++:S>1&&s++,EK(r,a,b,w,h),h.looksLikeAlignment&&!(t&&e===h.spacesDiff)))continue;const x=h.spacesDiff;x<=c&&d[x]++,r=b,a=w}let u=t;n!==s&&(u=n<s);let g=e;if(u){let f=u?0:.1*i;l.forEach(_=>{const b=d[_];b>f&&(f=b,g=_)}),g===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(g=2)}return{insertSpaces:u,tabSize:g}}function Nn(o){return(o.metadata&1)>>>0}function yt(o,e){o.metadata=o.metadata&254|e<<0}function $i(o){return(o.metadata&2)>>>1===1}function wt(o,e){o.metadata=o.metadata&253|(e?1:0)<<1}function $4(o){return(o.metadata&4)>>>2===1}function k2(o,e){o.metadata=o.metadata&251|(e?1:0)<<2}function NK(o){return(o.metadata&24)>>>3}function x2(o,e){o.metadata=o.metadata&231|e<<3}function TK(o){return(o.metadata&32)>>>5===1}function I2(o,e){o.metadata=o.metadata&223|(e?1:0)<<5}class j4{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,yt(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,k2(this,!1),x2(this,1),I2(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,wt(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;k2(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),x2(this,this.options.stickiness),I2(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Ae=new j4(null,0,0);Ae.parent=Ae;Ae.left=Ae;Ae.right=Ae;yt(Ae,0);class $w{constructor(){this.root=Ae,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s){return this.root===Ae?[]:WK(this,e,t,i,n,s)}search(e,t,i){return this.root===Ae?[]:BK(this,e,t,i)}collectNodesFromOwner(e){return PK(this,e)}collectNodesPostOrder(){return FK(this)}insert(e){E2(this,e),this._normalizeDeltaIfNecessary()}delete(e){N2(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,r=i.end+n;i.setCachedOffsets(s,r,t)}acceptReplace(e,t,i,n){const s=RK(this,e,e+t);for(let r=0,a=s.length;r<a;r++){const l=s[r];N2(this,l)}this._normalizeDeltaIfNecessary(),OK(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,a=s.length;r<a;r++){const l=s[r];l.start=l.cachedAbsoluteStart,l.end=l.cachedAbsoluteEnd,AK(l,e,e+t,i,n),l.maxEnd=l.end,E2(this,l)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){!this.requestNormal Line truncated
`)>=0;let t=null;try{t=qO(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(n){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new Z$(t,this.wordSeparators?Zs(this.wordSeparators):null,i?this.searchString:null)}}function $K(o){if(!o||o.length===0)return!1;for(let e=0,t=o.length;e<t;e++){const i=o.charCodeAt(e);if(i===10)return!0;if(i===92){if(e++,e>=t)break;const n=o.charCodeAt(e);if(n===110||n===114||n===87)return!0}}return!1}function Qc(o,e,t){if(!t)return new Kp(o,null);const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return new Kp(o,i)}class M2{constructor(e){const t=[];let i=0;for(let n=0,s=e.length;n<s;n++)e.charCodeAt(n)===10&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(n===-1||e<=t[0])return 0;for(;i<n;){const s=i+((n-i)/2>>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class ib{static findMatches(e,t,i,n,s){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new _u(r.wordSeparators,r.regex),n,s):this._doFindMatchesLineByLine(e,i,r,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,r){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let c;if(n){const g=n.findLineFeedCountBeforeOffset(s+r.length)-l;c=a+r.length+g}else c=a+r.length;const d=e.getPositionAt(a),h=e.getPositionAt(c);return new L(d.lineNumber,d.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,s){const r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r
`?new M2(a):null,c=[];let d=0,h;for(i.reset(0);h=i.next(a);)if(c[d++]=Qc(this._getMultilineMatchRange(e,r,a,l,h.index,h[0]),h,n),d>=s)return c;return c}static _doFindMatchesLineByLine(e,t,i,n,s){const r=[];let a=0;if(t.startLineNumber===t.endLineNumber){const c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(i,c,t.startLineNumber,t.startColumn-1,a,r,n,s),r}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,a,r,n,s);for(let c=t.startLineNumber+1;c<t.endLineNumber&&a<s;c++)a=this._findMatchesInLine(i,e.getLineContent(c),c,0,a,r,n,s);if(a<s){const c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);a=this._findMatchesInLine(i,c,t.endLineNumber,0,a,r,n,s)}return r}static _findMatchesInLine(e,t,i,n,s,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const u=e.simpleSearch,g=u.length,f=t.length;let _=-g;for(;(_=t.indexOf(u,_+g))!==-1;)if((!c||UI(c,t,f,_,g))&&(r[s++]=new Kp(new L(i,_+1+n,i,_+1+g+n),null),s>=l))return s;return s}const d=new _u(e.wordSeparators,e.regex);let h;d.reset(0);do if(h=d.next(t),h&&(r[s++]=Qc(new L(i,h.index+1+n,i,h.index+1+h[0].length+n),h,a),s>=l))return s;while(h);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const r=new _u(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new B(t.lineNumber,1),r=e.getOffsetAt(s),a=e.getLineCount(),l=e.getValueInRange(new L(s.lineNumber,s.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r
`?new M2(l):null;i.reset(t.column-1);const d=i.next(l);return d?Qc(this._getMultilineMatchRange(e,r,l,c,d.index,d[0]),d,n):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new B(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r),l=this._findFirstMatchInLine(i,a,r,t.column,n);if(l)return l;for(let c=1;c<=s;c++){const d=(r+c-1)%s,h=e.getLineContent(d+1),u=this._findFirstMatchInLine(i,h,d+1,1,n);if(u)return u}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const r=e.next(t);return r?Qc(new L(i,r.index+1,i,r.index+1+r[0].length),r,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const r=new _u(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new L(1,1,t.lineNumber,t.column),i,n,10*UK);if(s.length>0)return s[s.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new B(r,e.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),r=t.lineNumber,a=e.getLineContent(r).substring(0,t.column-1),l=this._findLastMatchInLine(i,a,r,n);if(l)return l;for(let c=1;c<=s;c++){const d=(s+r-c-1)%s,h=e.getLineContent(d+1),u=this._findLastMatchInLine(i,h,d+1,n);if(u)return u}return null}static _findLastMatchInLine(e,t,i,n){let s=null,r;for(e.reset(0);r=e.next(t);)s=Qc(new L(i,r.index+1,i,r.index+1+r[0].length),r,n);return s}}function jK(o,e,t,i,n){if(i===0)return!0;const s=e.charCodeAt(i-1);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i);if(o.get(r)!==0)return!0}return!1}function KK(o,e,t,i,n){if(i+n===t)return!0;const s=e.charCodeAt(i+n);if(o.get(s)!==0||s===13||s===10)return!0;if(n>0){const r=e.charCodeAt(i+n-1);if(o.get(r)!==0)return!0}return!1}function UI(o,e,t,i,n){return jK(o,e,t,i,n)&&KK(o,e,t,i,n)}class _u{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 i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(i=this._searchRegex.exec(e),!i))return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){F0(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=s,!this._wordSeparators||UI(this._wordSeparators,e,t,n,s))return i}while(i);return null}}const la=65535;function G4(o){let e;return o[o.length-1]<65536?e=new Uint16Array(o.length):e=new Uint32Array(o.length),e.set(o,0),e}class qK{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function va(o,e=!0){const t=[0];let i=1;for(let n=0,s=o.length;n<s;n++){const r=o.charCodeAt(n);r===13?n+1<s&&o.charCodeAt(n+1)===10?(t[i++]=n+2,n++):t[i++]=n+1:r===10&&(t[i++]=n+1)}return e?G4(t):t}function GK(o,e){o.length=0,o[0]=0;let t=1,i=0,n=0,s=0,r=!0;for(let l=0,c=e.length;l<c;l++){const d=e.charCodeAt(l);d===13?l+1<c&&e.charCodeAt(l+1)===10?(s++,o[t++]=l+2,l++):(i++,o[t++]=l+1):d===10?(n++,o[t++]=l+1):r&&d!==9&&(d<32||d>126)&&(r=!1)}const a=new qK(G4(o),i,n,s,r);return o.length=0,a}class jn{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class Jc{constructor(e,t){this.buffer=e,this.lineStarts=t}}class ZK{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==ke&&e.iterate(e.root,i=>(i!==ke&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class YK{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n<i.length;n++){const s=i[n];if(s.node.parent===null||s.nodeStartOffset>=e){i[n]=null,t=!0;continue}}if(t){const n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class XK{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Jc("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ke,this._lineCnt=1,this._length=0,th Line truncated
`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){const _=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,_),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);const u=this.createNewPieces(t);h.length>0&&this.rbInsertRight(n,h);let g=n;for(let f=0;f<u.length;f++)g=this.rbInsertRight(g,u[f]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,n)}else{const n=this.createNewPieces(t);let s=this.rbInsertLeft(null,n[0]);for(let r=1;r<n.length;r++)s=this.rbInsertRight(s,n[r])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===ke)return;const i=this.nodeAt(e),n=this.nodeAt(e+t),s=i.node,r=n.node;if(s===r){const u=this.positionInBuffer(s,i.remainder),g=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===e){if(t===s.piece.length){const f=s.next();tb(this,s),this.validateCRLFWithPrevNode(f),this.computeBufferMetadata();return}this.deleteNodeHead(s,g),this._searchCache.validate(e),this.validateCRLFWithPrevNode(s),this.computeBufferMetadata();return}if(i.nodeStartOffset+s.piece.length===e+t){this.deleteNodeTail(s,u),this.validateCRLFWithNextNode(s),this.computeBufferMetadata();return}this.shrinkNode(s,u,g),this.computeBufferMetadata();return}const a=[],l=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,l),this._searchCache.validate(e),s.piece.length===0&&a.push(s);const c=this.positionInBuffer(r,n.remainder);this.deleteNodeHead(r,c),r.piece.length===0&&a.push(r);const d=s.next();for(let u=d;u!==ke&&u!==r;u=u.next())a.push(u);const h=s.piece.length===0?s.prev():s;this.deleteNodes(a),this.validateCRLFWithNextNode(h),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){const i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){const r=t.piece,a={line:r.start.line+1,column:0},l=new jn(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),r.length-1);t.piece=l,e+=`
`,pa(this,t,-1,-1),t.piece.length===0&&i.push(t)}const n=this.createNewPieces(e);let s=this.rbInsertLeft(t,n[n.length-1]);for(let r=n.length-2;r>=0;r--)s=this.rbInsertLeft(s,n[r]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=`
`);const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let r=1;r<i.length;r++)s=this.rbInsertRight(s,i[r]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){const n=e.piece,s=e.piece.bufferIndex,r=this._buffers[s].lineStarts,l=r[n.start.line]+n.start.column+t;let c=n.start.line,d=n.end.line,h=0,u=0,g=0;for(;c<=d&&(h=c+(d-c)/2|0,g=r[h],h!==d);)if(u=r[h+1],l<g)d=h-1;else if(l>=u)c=h+1;else break;return i?(i.line=h,i.column=l-g,null):{line:h,column:l-g}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],r=n[i.line]+i.column;if(s>r+1)return i.line-t.line;const a=r-1;return this._buffers[e].buffer.charCodeAt(a)===13?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)tb(this,e[t])}createNewPieces(e){if(e.length>la){const d=[];for(;e.length>la;){const u=e.charCodeAt(la-1);let g;u===13||u>=55296&&u<=56319?(g=e.substring(0,la-1),e=e.substring(la-1)):(g=e.substring(0,la),e=e.substring(la));const f=va(g);d.push(new jn(this._buffers.length,{line:0,column:0},{line:f.length-1,column:g.length-f[f.length-1]},f.length-1,g.length)),this._buffers.push(new Jc(g,f))}const h=va(e);return d.push(new jn(this._buffers.length,{line:0,column:0},{line:h.length-1,column:e.length-h[h.length-1]},h.length-1,e.length)),this._buffers.push(new Jc(e,h)),d}let t=this._buffers[0].buffer.length;const i=va(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let d=0;d<i.length;d++)i[d]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(t!==0)for(let d=0;d<i.length;d++)i[d]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const s=this._buffers[0].buffer.length,r=this._buffers[0].lineStarts.length-1,a=s-this._buffers[0].lineStarts[r],l={line:r,column:a},c=new jn(0,n,l,this.getLineFeedCnt(0,n,l),s-t);return this._lastChangeBufferPos=l,[c]}getLineRawContent(e,t=0){let i=this.root,n="";const s=this._searchCache.get2(e);if(s){i=s.node;const r=this.getAccumulatedValue(i,e-s.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt===e)n=a.substring(l+r,l+i.piece.length);else{const c=this.getAccumulatedValue(i,e-s.nodeStartLineNumber);return a.substring(l+r,l+c-t)}}else{let r=0;const a=e;for(;i!==ke;)if(i.left!==ke&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(h+l,h+c-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=c.substring(d+l,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==ke;){const r=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=r.substring(l,l+a-t),n}else{const a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=r.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==ke;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const r=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(r!==s)return{index:r,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),r=t,a=this.offsetInBuffer(i.bufferIndex,r),l=this.getLineFeedCnt(i.bufferIndex,i.start,r),c=l-n,d=a-s,h=i.length+d;e.piece=new jn(i.bufferIndex,i.start,r,l,h),pa(this,e,d,c)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex, Line truncated
`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=va(t,!1);for(let g=0;g<s.length;g++)s[g]+=n;if(i){const g=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-g}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const r=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[r],l={line:r,column:a},c=e.piece.length+t.length,d=e.piece.lineFeedCnt,h=this.getLineFeedCnt(0,e.piece.start,l),u=h-d;e.piece=new jn(e.piece.bufferIndex,e.piece.start,l,h,c),this._lastChangeBufferPos=l,pa(this,e,t.length,u)}nodeAt(e){let t=this.root;const i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==ke;)if(t.size_left>e)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;const s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==ke;)if(i.left!==ke&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,r),nodeStartOffset:n}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==ke;){if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),r=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:r}}else if(i.piece.length>=t-1){const s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===ke||e.piece.lineFeedCnt===0)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===ke||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new jn(e.piece.bufferIndex,e.piece.start,s,a,r),pa(this,e,-1,-1),e.piece.length===0&&i.push(e);const l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new jn(t.piece.bufferIndex,l,t.piece.end,d,c),pa(this,t,-1,-1),t.piece.length===0&&i.push(t);const h=this.createNewPieces(`\r
`);this.rbInsertRight(e,h[0]);for(let u=0;u<i.length;u++)tb(this,i[u])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const i=t.next();if(this.startWithLF(i)){if(e+=`
`,i.piece.length===1)tb(this,i);else{const n=i.piece,s={line:n.start.line+1,column:0},r=n.length-1,a=this.getLineFeedCnt(n.bufferIndex,s,n.end);i.piece=new jn(n.bufferIndex,s,n.end,a,r),pa(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===ke)return t(ke);const i=this.iterate(e.left,t);return i&&t(e)&&this.iterate(e.right,t)}getNodeContent(e){if(e===ke)return"";const t=this._buffers[e.piece.bufferIndex],i=e.piece,n=this.offsetInBuffer(i.bufferIndex,i.start),s=this.offsetInBuffer(i.bufferIndex,i.end);return t.buffer.substring(n,s)}getPieceContent(e){const t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){const i=new rL(t,1);if(i.left=ke,i.right=ke,i.parent=ke,i.size_left=0,i.lf_left=0,this.root===ke)this.root=i,i.color=0;else if(e.right===ke)e.right=i,i.parent=e;else{const s=VI(e.right);s.left=i,i.parent=s}return T2(this,i),i}rbInsertLeft(e,t){const i=new rL(t,1);if(i.left=ke,i.right=ke,i.parent=ke,i.size_left=0,i.lf_left=0,this.root===ke)this.root=i,i.color=0;else if(e.left===ke)e.left=i,i.parent=e;else{const n=q4(e.left);n.right=i,i.parent=n}return T2(this,i),i}}class Bu extends z{constructor(e,t,i,n,s,r,a){super(),this._onDidChangeContent=this._register(new O),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new XK(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){const i=e+t,n=this.getPositionAt(e),s=this.getPositionAt(i);return new L(n.lineNumber,n.column,s.lineNumber,s.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;const i=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let r=n;r<=s;r++){const a=this.getLineContent(r),l=r===n?e.startColumn-1:0,c=r===s?e.endColumn-1:a.length;for(let d=l;d<c;d++)wi(a.charCodeAt(d))?(i=i+1,d=d+1):i=i+1}return i+=this._getEndOfLine(t).length*(s-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=Sn(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Fr(this.getLineContent(e));return t===-1?0:t+2}_getEndOfLine(e){switch(e){case 1:return`
`;case 2:return`\r
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,a=!0,l=[];for(let _=0;_<e.length;_++){const b=e[_];a&&b._isTracked&&(a=!1);const v=b.range;if(b.text){let x=!0;r||(x=!DC(b.text),r=x),!n&&x&&(n=ig(b.text)),!s&&x&&(s=YO(b.text))}let C="",w=0,S=0,k=0;if(b.text){let x;[w,S,k,x]=Ud(b.text);const y=this.getEOL();x===0||x===(y===`\r
`?2:1)?C=b.text:C=b.text.replace(/\r\n|\r|\n/g,y)}l[_]={sortIndex:_,identifier:b.identifier||null,range:v,rangeOffset:this.getOffsetAt(v.startLineNumber,v.startColumn),rangeLength:this.getValueLengthInRange(v),text:C,eolCount:w,firstLineLength:S,lastLineLength:k,forceMoveMarkers:Boolean(b.forceMoveMarkers),isAutoWhitespaceEdit:b.isAutoWhitespaceEdit||!1}}l.sort(Bu._sortOpsAscending);let c=!1;for(let _=0,b=l.length-1;_<b;_++){const v=l[_].range.getEndPosition(),C=l[_+1].range.getStartPosition();if(C.isBeforeOrEqual(v)){if(C.isBefore(v))throw new Error("Overlapping ranges are not allowed!");c=!0}}a&&(l=this._reduceOperations(l));const d=i||t?Bu._getInverseEditRanges(l):[],h=[];if(t)for(let _=0;_<l.length;_++){const b=l[_],v=d[_];if(b.isAutoWhitespaceEdit&&b.range.isEmpty())for(let C=v.startLineNumber;C<=v.endLineNumber;C++){let w="";C===v.startLineNumber&&(w=this.getLineContent(b.range.startLineNumber),Sn(w)!==-1)||h.push({lineNumber:C,oldContent:w})}}let u=null;if(i){let _=0;u=[];for(let b=0;b<l.length;b++){const v=l[b],C=d[b],w=this.getValueInRange(v.range),S=v.rangeOffset+_;_+=v.text.length-w.length,u[b]={sortIndex:v.sortIndex,identifier:v.identifier,range:C,text:w,textChange:new Hi(v.rangeOffset,w,S,v.text)}}c||u.sort((b,v)=>b.sortIndex-v.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=r;const g=this._doApplyEdits(l);let f=null;if(t&&h.length>0){h.sort((_,b)=>b.lineNumber-_.lineNumber),f=[];for(let _=0,b=h.length;_<b;_++){const v=h[_].lineNumber;if(_>0&&h[_-1].lineNumber===v)continue;const C=h[_].oldContent,w=this.getLineContent(v);w.length===0||w===C||Sn(w)!==-1||f.push(v)}}return this._onDidChangeContent.fire(),new Y$(u,g,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new L(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,a=i.startColumn;const l=[];for(let g=0,f=e.length;g<f;g++){const _=e[g],b=_.range;t=t||_.forceMoveMarkers,l.push(this.getValueInRange(new L(r,a,b.startLineNumber,b.startColumn))),_.text.length>0&&l.push(_.text),r=b.endLineNumber,a=b.endColumn}const c=l.join(""),[d,h,u]=Ud(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:d,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Bu._sortOpsDescending);const t=[];for(let i=0;i<e.length;i++){const n=e[i],s=n.range.startLineNumber,r=n.range.startColumn,a=n.range.endLineNumber,l=n.range.endColumn;if(s===a&&r===l&&n.text.length===0)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const c=new L(s,r,a,l);t.push({range:c,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){const t=[];let i=0,n=0,s=null;for(let r=0,a=e.length;r<a;r++){const l=e[r];let c,d;s?s.range.endLineNumber===l.range.startLineNumber?(c=i,d=n+(l.range.startColumn-s.range.endColumn)):(c=i+(l.range.startLineNumber-s.range.endLineNumber),d=l.range.startColumn):(c=l.range.startLineNumber,d=l.range.startColumn);let h;if(l.text.length>0){const u=l.eolCount+1;u===1?h=new L(c,d,c,d+l.firstLineLength):h=new L(c,d,c+u-1,l.lastLineLength+1)}else h=new L(c,d,c,d);i=h.endLineNumber,n=h.endColumn,t.push(h),s=l}return t}static _sortOpsAscending(e,t){const i=L.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=L.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class QK{constructor(e,t,i,n,s,r,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=r,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?`
`:`\r
`:i>t/2?`\r
`:`
`}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&(t===`\r
`&&(this._cr>0||this._lf>0)||t===`
`&&(this._cr>0||this._crlf>0)))for(let s=0,r=i.length;s<r;s++){const a=i[s].buffer.replace(/\r\n|\r|\n/g,t),l=va(a);i[s]=new Jc(a,l)}const n=new Bu(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class Z4{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&Zx(e)&&(this.BOM=RB,e=e.substr(1));const t=e.charCodeAt(e.length-1);t===13||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=GK(this._tmpLineStarts,e);this.chunks.push(new Jc(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=ig(e)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=YO(e))}finish(e=!0){return this._finish(),new QK(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=va(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class Si{constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){const i=Si.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new Si(n,e,t)}equals(e){return e instanceof Si?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let r=n;r<s;r++)if(this._tokens[r]!==e._tokens[r])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1],i=Yn.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return Yn.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return Yn.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return Yn.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[(e<<1)+1];return Yn.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[(e<<1)+1];return Yn.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Si.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new $I(this,e,t,i)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let s=0;s<n;s++)e[s<<1]=e[s+1<<1];e[n<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){const s=i+Math.floor((n-i)/2),r=e[s<<1];if(r===t)return s+1;r<t?i=s+1:r>t&&(n=s)}return i}withInserted(e){if(e.length===0)return this;let t=0,i=0,n="";const s=new Array;let r=0;for(;;){const a=t<this._tokensCount?this._tokens[t<<1]:-1,l=i<e.length?e[i]:null;if(a!==-1&&(l===null||a<=l.offset)){n+=this._text.substring(r,a);const c=this._tokens[(t<<1)+1];s.push(n.length,c),t++,r=a}else if(l){if(l.offset>r){n+=this._text.substring(r,l.offset);const c=this._tokens[(t<<1)+1];s.push(n.length,c),r=l.offset}n+=l.text,s.push(n.length,l.tokenMetadata),i++}else break}return new Si(new Uint32Array(s),n,this._languageIdCodec)}}Si.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0;class $I{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,r=e.getCount();s<r&&!(e.getStartOffset(s)>=i);s++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof $I?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._fi Line truncated
`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=z.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new wd(e,t)))}setValue(e){if(this._assertNotDisposed(),e===null)return;const{textBuffer:t,disposable:i}=O2(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:s,isRedoing:r,isFlush:a}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new P2,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Pu([new Cj],this._versionId,!1,!1),this._createContentChanged2(new L(1,1,s,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r
`:`
`;if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),r=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Pu([new yj],this._versionId,!1,!1),this._createContentChanged2(new L(1,1,s,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const s=t[i],r=s.range,a=s.cachedAbsoluteStart-s.start,l=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),c=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);s.cachedAbsoluteStart=l,s.cachedAbsoluteEnd=c,s.cachedVersionId=e,s.start=l-a,s.end=c-a,hc(s)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const s=this._buffer.getLineLength(n);s>=aq?t+=s:e+=s}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize!="undefined"?e.tabSize:this._options.tabSize,i=typeof e.indentSize!="undefined"?e.indentSize:this._options.indentSize,n=typeof e.insertSpaces!="undefined"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace!="undefined"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=typeof e.bracketColorizationOptions!="undefined"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new n0({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:r});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const i=D2(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),U0(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(ZO.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new lq(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getChar Line truncated
`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor(typeof i=="number"&&!isNaN(i)?i:1),r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);if(s<1)s=1,r=1;else if(s>t)s=t,r=this.getLineMaxColumn(s);else if(r<=1)r=1;else{const h=this.getLineMaxColumn(s);r>=h&&(r=h)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,d=1;else if(c>t)c=t,d=this.getLineMaxColumn(c);else if(d<=1)d=1;else{const h=this.getLineMaxColumn(c);d>=h&&(d=h)}return i===s&&n===r&&a===c&&l===d&&e instanceof L&&!(e instanceof oe)?e:new L(s,r,c,d)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const r=this._buffer.getLineCharCode(e,t-2);if(wi(r))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),r=this._buffer.getLineCount();if(n<1)return new B(1,1);if(n>r)return new B(r,this.getLineMaxColumn(r));if(s<=1)return new B(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new B(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,s-2);if(wi(l))return new B(n,s-1)}return new B(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof B&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,r,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,c=wi(a),d=wi(l);return!c&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof L&&!(e instanceof oe)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,r=i.column,a=n.lineNumber,l=n.column;{const c=r>1?this._buffer.getLineCharCode(s,r-2):0,d=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,h=wi(c),u=wi(d);return!h&&!u?new L(s,r,a,l):s===a&&r===l?new L(s,r-1,a,l-1):h&&u?new L(s,r-1,a,l+1):h?new L(s,r-1,a,l):new L(s,r,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new L(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,r,a=rq){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(h=>L.isIRange(h))&&(l=t.map(h=>this.validateRange(h)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((h,u)=>h.startLineNumber-u.startLineNumber||h.startColumn-u.startColumn);const c=[];c.push(l.reduce((h,u)=>L.areIntersecting(h,u)?h.plusRange(u):(c.push(h),u)));let d;if(!i&&e.indexOf(`
`)<0){const u=new jc(e,i,n,s).parseSearchRequest();if(!u)return[];d=g=>this.findMatchesLineByLine(g,u,r,a)}else d=h=>ib.findMatches(this,new jc(e,i,n,s),h,r,a);return c.map(d).reduce((h,u)=>h.concat(u),[])}findNextMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(`
`)<0){const c=new jc(e,i,n,s).parseSearchRequest();if(!c)return null;const d=this.getLineCount();let h=new L(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),u=this.findMatchesLineByLine(h,c,r,1);return ib.findNextMatch(this,new jc(e,i,n,s),a,r),u.length>0||(h=new L(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),u=this.findMatchesLineByLine(h,c,r,1),u.length>0)?u[0]:null}return ib.findNextMatch(this,new jc(e,i,n,s),a,r)}findPreviousMatch(e,t,i,n,s,r){this._assertNotDisposed();const a=this.validatePosition(t);return ib.findPreviousMatch(this,new jc(e,i,n,s),a,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===`
`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Ww?e:new Ww(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const n=t.map(r=>({range:this.validateRange(r.range),text:r.text}));let s=!0;if(e)for(let r=0,a=e.length;r<a;r++){const l=e[r];let c=!1;for(let d=0,h=n.length;d<h;d++){const u=n[d].range,g=u.startLineNumber>l.endLineNumber,f=l.startLineNumber>u.endLineNumber;if(!g&&!f){c=!0;break}}if(!c){s=!1;break}}if(s)for(let r=0,a=this._trimAutoWhitespaceLines.length;r<a;r++){const l=this._trimAutoWhitespaceLines[r],c=this.getLineMaxColumn(l);let d=!0;for(let h=0,u=n.length;h<u;h++){const g=n[h].range,f=n[h].text;if(!(l<g.startLineNumber||l>g.endLineNumber)&&!(l===g.startLineNumber&&g.startColumn===c&&g.isEmpty()&&f&&f.length>0&&f.charAt(0)===`
`)&&!(l===g.startLineNumber&&g.startColumn===1&&g.isEmpty()&&f&&f.length>0&&f.charAt(f.length-1)===`
`)){d=!1;break}}if(d){const h=new L(l,1,l,c);t.push(new Ww(null,h,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.newPosition),l=this.getPositionAt(r.newEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(r=>{const a=this.getPositionAt(r.oldPosition),l=this.getPositionAt(r.oldEnd);return{range:new L(a.lineNumber,a.column,l.lineNumber,l.column),text:r.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,r.length!==0){for(let c=0,d=r.length;c<d;c++){const h=r[c],[u,g,f]=Ud(h.text);this._tokenizationTextModelPart.acceptEdit(h.range,h.text,u,g,f),this._decorationsTree.acceptReplace(h.rangeOffset,h.rangeLength,h.text.length,h.forceMoveMarkers)}const a=[];this._increaseVersionId();let l=i;for(let c=0,d=r.length;c<d;c++){const h=r[c],[u]=Ud(h.text);this._onDidChangeDecorations.fire();const g=h.range.startLineNumber,f=h.range.endLineNumber,_=f-g,b=u,v=Math.min(_,b),C=b-_,w=s-l-C+g,S=w,k=w+b,x=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new B(S,1)),this.getOffsetAt(new B(k,this.getLineMaxColumn(k))),0),y=Yo.fromDecorations(x),D=new Ap(y);for(let I=v;I>=0;I--){const R=g+I,P=w+I;D.takeFromEndWhile($=>$.lineNumber>P);const H=D.takeFromEndWhile($=>$.lineNumber===P);a.push(new m2(R,this.getLineContent(P),H))}if(v<_){const I=g+v;a.push(new wj(I+1,f))}if(v<b){const I=new Ap(y),R=g+v,P=b-v,H=s-l-P+R+1,$=[],ne=[];for(let ae=0;ae<P;ae++){const de=H+ae;ne[ae]=this.getLineContent(de),I.takeWhile(we=>we.lineNumber<de),$[ae]=I.takeWhile(we=>we.lineNumber===de)}a.push(new Sj(R+1,g+b,ne,$))}l+=C}this._emitContentChangedEvent(new Pu(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(e===null||e.size===0)return;const i=Array.from(e).map(n=>new m2(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeInjectedText.fire(new N4(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(s,r)=>this._deltaDecorationsImpl(e,[],[{range:s,options:r}])[0],changeDecoration:(s,r)=>{this._changeDecorationImpl(s,r)},changeDecorationOptions:(s,r)=>{this._changeDecorationOptionsImpl(s,B2(r))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,r)=>s.length===0&&r.length===0?[]:this._deltaDecorationsImpl(e,s,r)};let n=null;try{n=t(i)}catch(s){Ee(s)}return i.addDecoration=mf,i.changeDecoration=mf,i.changeDecorationOptions=mf,i.removeDecoration=mf,i.deltaDecorations=mf,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),Ee(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:F2[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;c Line truncated
`:this.model.getEOL();e=e.slice(0),e.sort(L.compareRangesUsingStarts);let s=!1,r=!1;for(const l of e)l.isEmpty()?s=!0:r=!0;if(!r){if(!t)return"";const l=e.map(d=>d.startLineNumber);let c="";for(let d=0;d<l.length;d++)d>0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+n);return c}if(s&&t){const l=[];let c=0;for(const d of e){const h=d.startLineNumber;d.isEmpty()?h!==c&&l.push(this.model.getLineContent(h)):l.push(this.model.getValueInRange(d,i?2:0)),c=h}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Us||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new L(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(46),r=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===ns.fontFamily;let c;return l?c=ns.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${ns.fontFamily}`),{mode:i,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${c};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,r)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,r=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=s;c++){const d=this.model.tokenization.getLineTokens(c),h=d.getLineContent(),u=c===i?n-1:0,g=c===s?r-1:h.length;h===""?l+="<br>":l+=mq(h,d.inflate(),t,u,g,a,nn)}return l}_getColorMap(){const e=Jt.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=W.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector(n=>this._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Wj);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(r=>this._cursor.compositionType(r,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new s0(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new L(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new s0(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(r=>r.emitViewEvent(new s0(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Rj),this._eventDispatcher.emitOutgoingEvent(new Fj))}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class YI{constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}static create(e){const t=e._setTrackedRange(null,new L(1,1,1,1),1);return new YI(e,1,!1,t,0)}get viewLineNumber( Line truncated
`?i=1:e&&e.lineEnding&&e.lineEnding===`\r
`&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){!this._modelData||this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(this._modelData===null&&t===null||this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(r.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?Qh._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Qh._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),r=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(r.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?Qh._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e){var t;(t=this._modelData)===null||t===void 0||t.viewModel.setHiddenAreas(e.map(i=>L.lift(i)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return _i.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(!!this._modelData){if(!B.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!L.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!B.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new L(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=oe.isISelection(e),n=L.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new oe(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new L(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange( Line truncated
`:`
`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=`
`,this.value+=t,this.value+="\n```\n",this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(Ds(t),"g");return e.replace(i,(n,s)=>e.charAt(s-1)!=="\\"?`\\${n}`:n)}}function pg(o){return g5(o)?!o.value:Array.isArray(o)?o.every(pg):!0}function g5(o){return o instanceof Rn?!0:o&&typeof o=="object"?typeof o.value=="string"&&(typeof o.isTrusted=="boolean"||o.isTrusted===void 0)&&(typeof o.supportThemeIcons=="boolean"||o.supportThemeIcons===void 0):!1}function RG(o){return o.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function cb(o){return o.replace(/"/g,"&quot;")}function nS(o){return o&&o.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function OG(o){const e=[],t=o.split("|").map(n=>n.trim());o=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),r=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(r));l&&e.push(`width="${a}"`),c&&e.push(`height="${r}"`)}return{href:o,dimensions:e}}var pL=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function PG(o,e){ts(e)?o.title=u5(e):e!=null&&e.markdownNotSupportedFallback?o.title=e.markdownNotSupportedFallback:o.removeAttribute("title")}class FG{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t,i){var n;return pL(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(e===void 0||ts(e)||e instanceof HTMLElement)s=e;else if(!E0(e.markdown))s=(n=e.markdown)!==null&&n!==void 0?n:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new gn;const r=this._cancellationTokenSource.token;if(s=yield e.markdown(r),s===void 0&&(s=e.markdownNotSupportedFallback),this.isDisposed||r.isCancellationRequested)return}this.show(s,t,i)})}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s=Object.assign({content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!n},i);this._hoverWidget=this.hoverDelegate.showHover(s,t)}n==null||n.dispose()}hasContent(e){return e?g5(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function f5(o,e,t,i){let n,s;const r=(h,u)=>{var g;h&&(s==null||s.dispose(),s=void 0),u&&(n==null||n.dispose(),n=void 0),(g=o.onDidHideHover)===null||g===void 0||g.call(o)},a=(h,u,g)=>new Is(()=>pL(this,void 0,void 0,function*(){(!s||s.isDisposed)&&(s=new FG(o,g||e,h>0),yield s.update(t,u,i))}),h),l=()=>{if(n)return;const h=new ee,u=_=>r(!1,_.fromElement===e);h.add(q(e,le.MOUSE_LEAVE,u,!0));const g=()=>r(!0,!0);h.add(q(e,le.MOUSE_DOWN,g,!0));const f={targetElements:[e],dispose:()=>{}};if(o.placement===void 0||o.placement==="mouse"){const _=b=>{f.x=b.x+10,b.target instanceof HTMLElement&&b.target.classList.contains("action-label")&&r(!0,!0)};h.add(q(e,le.MOUSE_MOVE,_,!0))}h.add(a(o.delay,!1,f)),n=h},c=q(e,le.MOUSE_OVER,l,!0);return{show:h=>{r(!1,!0),a(0,h)},hide:()=>{r(!0,!0)},update:(h,u)=>pL(this,void 0,void 0,function*(){t=h,yield s==null?void 0:s.update(t,void 0,u)}),dispose:()=>{c.dispose(),r(!0,!0)}}}class wr extends z{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof is&&this._register(t.onDidChange(n=>{!this.element||this.handleActionChangeEvent(n)}))}get action(){return this._action}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Ju)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(ut.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Ls&&this._register(q(e,le.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(i_.TEXT,this._action.label)}))),this._register(q(t,kt.Tap,n=>this.onClick(n,!0))),this._register(q(t,le.MOUSE_DOWN,n=>{i||ct.stop(n,!0),this._action.enaLine truncated
`)}}const vh=new VG;di.add(WG.IconContribution,vh);function fi(o,e,t,i){return vh.registerIcon(o,e,t,i)}function p5(){return vh}function HG(){for(const o of m.getAll())vh.registerIcon(o.id,o.definition,o.description)}HG();const m5="vscode://schemas/icons",_5=di.as(UC.JSONContribution);_5.registerSchema(m5,vh.getIconSchema());const iM=new ft(()=>_5.notifySchemaChanged(m5),200);vh.onDidChange(()=>{iM.isScheduled()||iM.schedule()});const b5=fi("widget-close",m.close,p("widgetClose","Icon for the close action in widgets."));fi("goto-previous-location",m.arrowUp,p("previousChangeIcon","Icon for goto previous editor location."));fi("goto-next-location",m.arrowDown,p("nextChangeIcon","Icon for goto next editor location."));nt.modify(m.sync,"spin");nt.modify(m.loading,"spin");var zG=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},UG=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},$G=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},sS;const db=3;class _f{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class oS{constructor(e){this.entries=e}}const jG=fi("diff-review-insert",m.add,p("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),KG=fi("diff-review-remove",m.remove,p("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),qG=fi("diff-review-close",m.close,p("diffReviewCloseIcon","Icon for 'Close' in diff review."));let _v=class Kc extends z{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=Je(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Je(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new qr(this.actionBarContainer.domNode)),this._actionBar.push(new is("diffreview.close",p("label.close","Close"),"close-diff-review "+nt.asClassName(qG),!0,()=>$G(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=Je(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Je(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new e_(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(Ei(this.domNode.domNode,"click",i=>{i.preventDefault();const n=WO(i.target,"diff-review-row");n&&this._goToRow(n)})),this._register(Ei(this.domNode.domNode,"keydown",i=>{(i.equals(18)||i.equals(2066)||i.equals(530))&&(i.preventDefault(),this._goToRow(this._getNextRow())),(i.equals(16)||i.equals(2064)||i.equals(528))&&(i.preventDefault(),this._goToRow(this._getPrevRow())),(i.equals(9)||i.equals(2057)||i.equals(521)||i.equals(1033))&&(i.preventDefault(),this.hide()),(i.equals(10)||i.equals(3))&&(i.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n<s;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=this._diffs.length+i-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new B(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n<s;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=i+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new B(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn: Line truncated
`:`\r
`)}else yield this._clipboardService.writeText(_)})),c.push(u)),i.getOption(83)||c.push(new is("diff.inline.revertChange",p("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>rS(this,void 0,void 0,function*(){const _=new L(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),b=n.originalModel.getValueInRange(_);if(n.modifiedEndLineNumber===0){const v=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,v,n.modifiedStartLineNumber,v),text:l+b}])}else{const v=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new L(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,v),text:b}])}})));const f=(_,b)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:_,y:b}),getActions:()=>(u&&(u.label=d?p("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+h):p("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+h)),c),autoSelectFirstItem:!0})};this._register(Ei(this._diffActions,"mousedown",_=>{const{top:b,height:v}=Qi(this._diffActions),C=Math.floor(a/3);_.preventDefault(),f(_.posx,b+v+C)})),this._register(i.onMouseMove(_=>{_.target.type===8||_.target.type===5?_.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(_=>{!_.event.rightButton||(_.target.type===8||_.target.type===5)&&_.target.detail.viewZoneId===this._viewZoneId&&(_.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,_.event.browserEvent.y,a),f(_.event.posx,_.event.posy+a))}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=Qi(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let l=0;for(let c=0;c<this.diff.viewLineCounts.length;c++)if(l+=this.diff.viewLineCounts[c],r<l)return c}return r}}const dl=qe("clipboardService"),C5=qe("progressService");Object.freeze({total(){},worked(){},done(){}});class wh{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}wh.None=Object.freeze({report(){}});const kc=qe("editorProgressService");var QG=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ua=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},aS;class nM{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(t=>!this._zonesMap[String(t.id)])}clean(e){this._zones.length>0&&e.changeViewZones(t=>{for(const i of this._zones)t.removeZone(i)}),this._zones=[],this._zonesMap={},e.changeDecorations(t=>{this._decorations=t.deltaDecorations(this._decorations,[])})}apply(e,t,i,n){const s=n?uc.capture(e):null;e.changeViewZones(r=>{var a;for(const l of this._zones)r.removeZone(l);for(const l of this._inlineDiffMargins)l.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let l=0,c=i.zones.length;l<c;l++){const d=i.zones[l];d.suppressMouseDown=!0;const h=r.addZone(d);this._zones.push(h),this._zonesMap[String(h)]=!0,i.zones[l].diff&&d.marginDomNode&&(d.suppressMouseDown=!1,((a=i.zones[l].diff)===null||a===void 0?void 0:a.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new XG(h,d.marginDomNode,e,i.zones[l].diff,this._contextMenuService,this._clipboardService)))}}),s==null||s.restore(e),e.changeDecorations(r=>{this._decorations=r.deltaDecorations(this._decorations,i.decorations)}),t==null||t.setZones(i.overviewZones)}}let JG=0;const eZ=fi("diff-insert",m.add,p("diffInsertIcon","Line decoration for inserts in the diff editor.")),w5=fi("diff-remove",m.remove,p("diffRemoveIcon","Line decoration for removals in the diff editor.")),sM=(aS=window.trustedTypes)===null||aS===void 0?void 0:aS.createPolicy("diffEditorWidget",{createHTML:o=>o});let gc=class Ki extends z{constructor(e,t,i,n,s,r,a,l,c,d,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new O),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new O),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new O),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorSe Line truncated
.monaco-diff-editor .diffViewport {
background: ${u};
}
`);const g=o.getColor(ad);g&&e.addRule(`
.monaco-diff-editor .diffViewport:hover {
background: ${g};
}
`);const f=o.getColor(ld);f&&e.addRule(`
.monaco-diff-editor .diffViewport:active {
background: ${f};
}
`);const _=o.getColor(az);e.addRule(`
.monaco-editor .diagonal-fill {
background-image: linear-gradient(
-45deg,
${_} 12.5%,
#0000 12.5%, #0000 50%,
${_} 50%, ${_} 62.5%,
#0000 62.5%, #0000 100%
);
background-size: 8px 8px;
}
`)});const rZ={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class aZ extends z{constructor(e,t={}){super(),this._onDidUpdate=this._register(new O),this._editor=e,this._options=ea(t,rZ,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(i=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(i=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(t=>{!this._options.ignoreCharChanges&&t.charChanges?t.charChanges.forEach(i=>{this.ranges.push({rhs:!0,range:new L(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn)})}):t.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new L(t.modifiedStartLineNumber,1,t.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new L(t.modifiedStartLineNumber,1,t.modifiedEndLineNumber+1,1)})}),this.ranges.sort((t,i)=>L.compareRangesUsingStarts(t.range,i.range)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,s=this.ranges.length;n<s&&!t;n++){const r=this.ranges[n].range;i.isBeforeOrEqual(r.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(e,t){if(Yf(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}var lZ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cZ=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},h1=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const u1=new ce("selectionAnchorSet",!1);let nl=class k5{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=u1.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution(k5.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(oe.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Rn().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),un(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(oe.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};nl.ID="editor.contrib.selectionAnchorController";nl=lZ([cZ(1,xe)],nl);class dZ extends he{constructor(){super({id:"editor.action.setSe Line truncated
.monaco-drag-image,
.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }
`),e.listFocusAndSelectionForeground&&i.push(`
.monaco-drag-image,
.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }
`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`
.monaco-drag-image,
.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }
`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`
.monaco-list${t}.drop-target,
.monaco-list${t} .monaco-list-rows.drop-target,
.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }
`),e.tableColumnsBorder&&i.push(`
.monaco-table:hover > .monaco-split-view2,
.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
border-color: ${e.tableColumnsBorder};
}`),e.tableOddRowsBackgroundColor&&i.push(`
.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,
.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,
.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
background-color: ${e.tableOddRowsBackgroundColor};
}
`),this.styleElement.textContent=i.join(`
`)}}const JZ={listFocusBackground:W.fromHex("#7FB0D0"),listActiveSelectionBackground:W.fromHex("#0E639C"),listActiveSelectionForeground:W.fromHex("#FFFFFF"),listActiveSelectionIconForeground:W.fromHex("#FFFFFF"),listFocusAndSelectionOutline:W.fromHex("#90C2F9"),listFocusAndSelectionBackground:W.fromHex("#094771"),listFocusAndSelectionForeground:W.fromHex("#FFFFFF"),listInactiveSelectionBackground:W.fromHex("#3F3F46"),listInactiveSelectionIconForeground:W.fromHex("#FFFFFF"),listHoverBackground:W.fromHex("#2A2D2E"),listDropBackground:W.fromHex("#383B3D"),treeIndentGuidesStroke:W.fromHex("#a9a9a9"),tableColumnsBorder:W.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:W.fromHex("#cccccc").transparent(.04)},eY={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function tY(o,e){const t=o.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&o[n]===e-(t-n);)i.push(o[n--]);for(i.reverse(),n=t;n<o.length&&o[n]===e+(n-t);)i.push(o[n++]);return i}function bL(o,e){const t=[];let i=0,n=0;for(;i<o.length||n<e.length;)if(i>=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){t.push(o[i]),i++,n++;continue}else o[i]<e[n]?t.push(o[i++]):t.push(e[n++]);return t}function iY(o,e){const t=[];let i=0,n=0;for(;i<o.length||n<e.length;)if(i>=o.length)t.push(e[n++]);else if(n>=e.length)t.push(o[i++]);else if(o[i]===e[n]){i++,n++;continue}else o[i]<e[n]?t.push(o[i++]):n++;return t}const fM=(o,e)=>o-e;class nY{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const r of this.renderers)r.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){var s;let r=0;for(const a of this.renderers)(s=a.disposeElement)===null||s===void 0||s.call(a,e,t,i[r],n),r+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class sY{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class oY{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;(n=(i=this.dnd).onDragStart)===null||n===void 0||n.call(i,e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,r;(r=(s=this.dnd).onDragLeave)===null||r===void 0||r.call(s,e,t,i,n)}onDragEnd(e){var t,i;(i=(t=this.dnd).onDragEnd)===null||i===void 0||i.call(t,e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class ir{constructor(e,t,i,n,s=eY){var r,a,l,c;this.user=e,this._options=s,this.focus=new Cv("focused"),this.anchor=new Cv("anchor"),this.eventBufferer=new Tx,this._ariaLabel="",this.disposables=new ee,this._onDidDispose=new O,this.onDidDispose=this._onDidDispose.event;const d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(r=this._options.accessibilityProvider)===null||r===void 0?void 0:r.getWidgetRole():"list";this.selection=new GZ(d!=="listbox"),ea(s,JZ,!1);const h=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(h.push(new sY(this.accessibilityProvider)),(l=(a=this.accessibilityProvider).onDidChangeActiveDescendant)===null||l===void 0||l.call(a,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(g=>new nY(g.templateId,[...h,g]));const u=Object.assign(Object.assign({},s),{dnd:s.dnd&&new oY(this,s.dnd)});if(this.view=new wo(t,i,n,u),this.view.domNode.setAttribute("role",d),s.styleController)this.styleController=s.styleController(this.view.domId);else{const g=qs(this.view.domNode);this.styleController=new z5(g,this.view.domId)}if(this.spliceable=new FZ([new cS(this.focus,this.view,s.identityProvider),new cS(this.selection,this.view,s.identityProvider),new cS(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new XZ(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new B5(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const g=s.keyboardNavigationDelegate||ZZ;this.typeNavigationController=new YZ(this,this.view,s.keyboardNavigationLabelProvider,(c=s.keyboardNavigati Line truncated
.monaco-editor .contentWidgets ${m.lightBulb.cssSelector} {
color: ${n};
background-color: ${i};
}`);const s=o.getColor(XH);s&&e.addRule(`
.monaco-editor .contentWidgets ${m.lightbulbAutofix.cssSelector} {
color: ${s};
background-color: ${i};
}`)});var hY=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uY=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},uS=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},gY=globalThis&&globalThis.__classPrivateFieldSet||function(o,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!n:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(o,t):n?n.value=t:e.set(o,t),t},fY=globalThis&&globalThis.__classPrivateFieldGet||function(o,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!i:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(o):i?i.value:e.get(o)},a0;let wL=class extends z{constructor(e,t,i,n,s){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new Vn),this.previewOn=!1,a0.set(this,!1),this._codeActionWidget=new eg(()=>this._register(s.createInstance(wv,this._editor,{onSelectCodeAction:(r,a)=>uS(this,void 0,void 0,function*(){this.previewOn?this.delegate.applyCodeAction(r,!0,Boolean(this.previewOn)):this.delegate.applyCodeAction(r,!0,Boolean(a.preview)),this.previewOn=!1})}))),this._lightBulbWidget=new eg(()=>{const r=this._register(s.createInstance(Sv,this._editor,t,i));return this._register(r.onClick(a=>this.showCodeActionList(a.trigger,a.actions,a,{includeDisabledActions:!1,fromLightbulb:!0}))),r})}dispose(){gY(this,a0,!0,"f"),super.dispose()}hideCodeActionWidget(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().hideCodeActionWidget()}onEnter(){this._codeActionWidget.hasValue()&&this._codeActionWidget.getValue().onEnterSet()}onPreviewEnter(){this.previewOn=!0,this.onEnter()}navigateList(e){this._codeActionWidget.hasValue()&&(e?this._codeActionWidget.getValue().navigateListWithKeysUp():this._codeActionWidget.getValue().navigateListWithKeysDown())}update(e){var t,i,n,s,r;return uS(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let a;try{a=yield e.actions}catch(l){Ee(l);return}if(!fY(this,a0,"f"))if(this._lightBulbWidget.getValue().update(a,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const c=this.tryGetValidActionToApply(e.trigger,a);if(c){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(c,!1,!1)}finally{a.dispose()}return}if(e.trigger.context){const d=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,a);if(d&&d.action.disabled){(n=rs.get(this._editor))===null||n===void 0||n.showMessage(d.action.disabled,e.trigger.context.position),a.dispose();return}}}const l=!!(!((s=e.trigger.filter)===null||s===void 0)&&s.include);if(e.trigger.context&&(!a.allActions.length||!l&&!a.validActions.length)){(r=rs.get(this._editor))===null||r===void 0||r.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=a,a.dispose();return}this._activeCodeActions.value=a,this._codeActionWidget.getValue().show(e.trigger,a,e.position,{includeDisabledActions:l,fromLightbulb:!1})}else this._codeActionWidget.getValue().isVisible?a.dispose():this._activeCodeActions.value=a})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i,n){return uS(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,i,n)})}};a0=new WeakMap;wL=hY([uY(4,Re)],wL);var Ft;(function(o){o[o.Hint=1]="Hint",o[o.Info=2]="Info",o[o.Warning=4]="Warning",o[o.Error=8]="Error"})(Ft||(Ft={}));(function(o){function e(r,a){return a-r}o.compare=e;const t=Object.create(null);t[o.Error]=p("sev.error","Error"),t[o.Warning]=p("sev.warning","Warning"),t[o.Info]=p("sev.info","Info");function i(r){return t[r]||""}o.toString=i;function n(r){switch(r){case Vt. Line truncated
.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(t*.5)}px; font-feature-settings: var(${r}) }
.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }
`;i&&(a+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${s}), ${ns.fontFamily}}`),this._styleElement.textContent=a,this._editor.getContainerDomNode().style.setProperty(s,i!=null?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(r,n.fontFeatureSettings),this._editor.changeViewZones(l=>{for(const c of this._lenses)c.updateHeight(e,l)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Hd(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new ft(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Ti(r=>Y5(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},Ee)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(ze(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(n=>{this._editor.changeViewZones(s=>{const r=[];let a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?r.push(c):(c.update(s),a=c.getLineNumber())});const l=new mS;r.forEach(c=>{c.dispose(l,s),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(n)})}),i.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ze(()=>{if(this._editor.getModel()){const n=uc.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const r of this._lenses){const a=r.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new mS;for(const n of this._lenses)n.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}const s=uc.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new mS;let d=0,h=0;for(;h<i.length&&d<this._lenses.length;){const u=i[h][0].symbol.range.startLineNumber,g=this._lenses[d].getLineNumber();g<u?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):g===u?(this._lenses[d].updateCodeLensSymbols(i[h],c),h++,d++):(this._lenses.splice(d,0,new bM(i[h],this._editor,this._styleClassName,c,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,h++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;h<i.length;)this._lenses.push(new bM(i[h],this._editor,this._styleClassName,c,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),h++;c.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),r=Ti(a=>{co Line truncated
[{1}] {2}`,s,SE.modifierLabels[Os].altKey,c)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&((t=e.toggled)===null||t===void 0?void 0:t.icon)?e.toggled.icon:e.icon;if(!!s)if(nt.isThemeIcon(s)){const r=nt.asClassNameArray(s);n.classList.add(...r),this._itemClassDispose.value=ze(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=Xx(this._themeService.getColorTheme().type)?Od(s.dark):Od(s.light),n.classList.add("icon"),this._itemClassDispose.value=Pr(ze(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};_g=yE([Rs(2,rn),Rs(3,gi),Rs(4,xe),Rs(5,vt),Rs(6,cl)],_g);let IL=class extends nF{constructor(e,t,i,n){var s,r;const a=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(s=t==null?void 0:t.menuAsChild)!==null&&s!==void 0?s:!1,classNames:(r=t==null?void 0:t.classNames)!==null&&r!==void 0?r:nt.isThemeIcon(e.item.icon)?nt.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,a),this._contextMenuService=i,this._themeService=n}render(e){super.render(e),gt(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!nt.isThemeIcon(i)){this.element.classList.add("icon");const n=()=>{this.element&&(this.element.style.backgroundImage=Xx(this._themeService.getColorTheme().type)?Od(i.dark):Od(i.light))};n(),this._register(this._themeService.onDidColorThemeChange(()=>{n()}))}}};IL=yE([Rs(2,cl),Rs(3,vt)],IL);let EL=class extends wr{constructor(e,t,i,n,s,r,a,l){var c,d,h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=r,this._instaService=a,this._storageService=l,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let u;const g=l.get(this._storageKey,1);g&&(u=e.actions.find(_=>g===_.id)),u||(u=e.actions[0]),this._defaultAction=this._instaService.createInstance(_g,u,{keybinding:this._getDefaultActionKeybindingLabel(u)});const f=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(c=t==null?void 0:t.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(d=t==null?void 0:t.classNames)!==null&&d!==void 0?d:["codicon","codicon-chevron-down"],actionRunner:(h=t==null?void 0:t.actionRunner)!==null&&h!==void 0?h:new Ju});this._dropdown=new nF(e,e.actions,this._contextMenuService,f),this._dropdown.actionRunner.onDidRun(_=>{_.action instanceof ac&&this.update(_.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(_g,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends Ju{runAction(t,i){return sF(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(mB(this._container,se(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(!((t=this._options)===null||t===void 0)&&t.renderKeybindingWithDefaultActionLabel){const n=this._keybindingService.lookupKeybinding(e.id);n&&(i=`(${n.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=se(".action-container");this._defaultAction.render(G(this._container,t)),this._register(q(t,le.KEY_DOWN,n=>{const s=new Mt(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=se(".dropdown-action-container");this._dropdown.render(G(this._container,i)),this._register(q(i,le.KEY_DOWN,n=>{var s;const r=new Mt(n);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),r.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};EL=yE([Rs(2,rn),Rs(3,gi),Rs(4,cl),Rs(5,fh),Rs(6,Re),Rs(7,ia)],EL);function yX(o,e,t){return e instanceof ac?o.createInstance(_g,e,t):e instanceof Qx?e.item.rememberDefaultAction?o.createInstance(EL,e,t):o.createInstance(IL,e,t):void 0}var oF=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Ref Line truncated
top: ${this.virtualDelegate.headerRowHeight+1}px;
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
}`),this.styleElement.textContent=t.join(`
`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}w1.InstanceCount=0;const BX={inputActiveOptionBorder:W.fromHex("#007ACC00"),inputActiveOptionForeground:W.fromHex("#FFFFFF"),inputActiveOptionBackground:W.fromHex("#0E639C50")};class h_ extends tr{constructor(e){super(),this._onChange=this._register(new O),this.onChange=this._onChange.event,this._onKeyDown=this._register(new O),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},BX),e),this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Cn.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,i=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault())}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault(),i.stopPropagation();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const WX=p("caseDescription","Match Case"),VX=p("wordsDescription","Match Whole Word"),HX=p("regexDescription","Use Regular Expression");class uF extends h_{constructor(e){super({icon:m.caseSensitive,title:WX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class gF extends h_{constructor(e){super({icon:m.wholeWord,title:VX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class fF extends h_{constructor(e){super({icon:m.regex,title:HX+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}function zX(o,e={}){const t=LE(e);return t.textContent=o,t}function UX(o,e={}){const t=LE(e);return pF(t,jX(o,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function LE(o){const e=o.inline?"span":"div",t=document.createElement(e);return o.className&&(t.className=o.className),t}class $X{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function pF(o,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");t.disposables.add(Ei(s,"click",r=>{t.callback(String(e.index),r)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=o);n&&o!==n&&o.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{pF(n,s,t,i)})}function jX(o,e){const t={type:1,children:[]};let i=0,n=t;const s=[],r=new $X(o);for(;!r.eos();){let a=r.next();const l=a==="\\"&&NL(r.peek(),e)!==0;if(l&&(a=r.next()),!l&&KX(a,e)&&a===r.peek()){r.advance(),n.type= Line truncated
`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function KX(o,e){return NL(o,e)!==0}function NL(o,e){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class qX{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class GX{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new qX(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const wf=se,ZX={inputBackground:W.fromHex("#3C3C3C"),inputForeground:W.fromHex("#CCCCCC"),inputValidationInfoBorder:W.fromHex("#55AAFF"),inputValidationInfoBackground:W.fromHex("#063B49"),inputValidationWarningBorder:W.fromHex("#B89500"),inputValidationWarningBackground:W.fromHex("#352A05"),inputValidationErrorBorder:W.fromHex("#BE1100"),inputValidationErrorBackground:W.fromHex("#5A1D1D")};class mF extends tr{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new O),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new O),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),ea(this.options,ZX,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=G(e,wf(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",r=G(this.element,wf(".ibwrapper"));if(this.input=G(r,wf(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=G(r,wf("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new D4(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),G(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const a=this._register(new _t(document,"selectionchange")),l=pe.filter(a.event,()=>{const c=document.getSelection();return(c==null?void 0:c.anchorNode)===r});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=thLine truncated
`),(t=this.findController)===null||t===void 0||t.style(e),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);i!==-1&&this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const r=this.model.getParentNodeLocation(n);if(!r)return;const a=this.model.getListIndex(r);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[r]=this.view.getFocus(),a=r+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){et(this.disposables),this.view.dispose()}}class IE{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new JX(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=Ue.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=Ue.empty(),i){const n=new Set,s=new Set,r=l=>{var c;if(l.element===null)return;const d=l;if(n.add(d.element),this.nodes.set(d.element,d),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.add(h),this.nodesByIdentity.set(h,d)}(c=i.onDidCreateNode)===null||c===void 0||c.call(i,d)},a=l=>{var c;if(l.element===null)return;const d=l;if(n.has(d.element)||this.nodes.delete(d.element),this.identityProvider){const h=this.identityProvider.getId(d.element).toString();s.has(h)||this.nodesByIdentity.delete(h)}(c=i.onDidDeleteNode)===null||c===void 0||c.call(i,d)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:r,onDidDeleteNode:a}))}preserveCollapseState(e=Ue.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),Ue.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const r=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(r)}if(!i)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,s=typeof t.collapsed!="undefined"?t.collapsed:i.collapsed;return Object.assign(Object.assign({},t),{collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Ws(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){re Line truncated
`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"\u23CE"})}}class LS{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class Tv extends z{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new LS(G(e,se(".monaco-icon-label")))),this.labelContainer=G(this.domNode.element,se(".monaco-icon-label-container"));const i=G(this.labelContainer,se("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new LS(G(this.labelContainer,se("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)||(t==null?void 0:t.supportIcons)?this.nameNode=new UQ(i,!!t.supportIcons):this.nameNode=new HQ(i),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new Qd(G(this.descriptionContainer.element,se("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new LS(G(this.descriptionContainer.element,se("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof Qd?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)PG(e,t);else{const n=f5(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class HQ{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=G(this.container,se("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const n=e[i],s=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${i}`;G(this.container,se("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&G(this.container,se("span.label-separator",void 0,(t==null?void 0:t.separator)||"/"))}}}}function zQ(o,e,t){if(!t)return;let i=0;return o.map(n=>{const s={start:i,end:i+n.length},r=t.map(a=>Gi.intersect(s,a)).filter(a=>!Gi.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,r})}class UQ{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&$s(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new Qd(G(this.container,se("a.label-name",{id:t==null?void 0:t.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=zQ(e,i,t==null?void 0:t.matches);for(let s=0;s<e.length;s++){const r=e[s],a=n?n[s]:void 0,l=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${s}`,c=se("a.label-name",{id:l,"data-icon-label-count":e.length,"data-icon-label-index":s,role:"treeitem"});new Qd(G(this.container,c),{supportIcons:this.supportIcons}).set(r,a,void 0,t==null?void 0:t.labelEscapeNewLines),s<e.length-1&&G(c,se("span.label-separator",void 0,i))}}}}const bg=qe("labelService");var I1=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3 Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults=a();function l(Z){e.defaults=Z}var c=/[&<>"']/,d=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f=function(U){return g[U]};function _(Z,U){if(U){if(c.test(Z))return Z.replace(d,f)}else if(h.test(Z))return Z.replace(u,f);return Z}var b=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(Z){return Z.replace(b,function(U,j){return j=j.toLowerCase(),j==="colon"?":":j.charAt(0)==="#"?j.charAt(1)==="x"?String.fromCharCode(parseInt(j.substring(2),16)):String.fromCharCode(+j.substring(1)):""})}var C=/(^|[^\[])\^/g;function w(Z,U){Z=typeof Z=="string"?Z:Z.source,U=U||"";var j={replace:function(M,V){return V=V.source||V,V=V.replace(C,"$1"),Z=Z.replace(M,V),j},getRegex:function(){return new RegExp(Z,U)}};return j}var S=/[^\w:]/g,k=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(Z,U,j){if(Z){var E;try{E=decodeURIComponent(v(j)).replace(S,"").toLowerCase()}catch(M){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}U&&!k.test(j)&&(j=P(U,j));try{j=encodeURI(j).replace(/%25/g,"%")}catch(M){return null}return j}var y={},D=/^[^:]+:\/*[^/]*$/,I=/^([^:]+:)[\s\S]*$/,R=/^([^:]+:\/*[^/]*)[\s\S]*$/;function P(Z,U){y[" "+Z]||(D.test(Z)?y[" "+Z]=Z+"/":y[" "+Z]=ae(Z,"/",!0)),Z=y[" "+Z];var j=Z.indexOf(":")===-1;return U.substring(0,2)==="//"?j?U:Z.replace(I,"$1")+U:U.charAt(0)==="/"?j?U:Z.replace(R,"$1")+U:Z+U}var H={exec:function(){}};function $(Z){for(var U=1,j,E;U<arguments.length;U++){j=arguments[U];for(E in j)Object.prototype.hasOwnProperty.call(j,E)&&(Z[E]=j[E])}return Z}function ne(Z,U){var j=Z.replace(/\|/g,function(V,F,Y){for(var ie=!1,ye=F;--ye>=0&&Y[ye]==="\\";)ie=!ie;return ie?"|":" |"}),E=j.split(/ \|/),M=0;if(E[0].trim()||E.shift(),E.length>0&&!E[E.length-1].trim()&&E.pop(),E.length>U)E.splice(U);else for(;E.length<U;)E.push("");for(;M<E.length;M++)E[M]=E[M].trim().replace(/\\\|/g,"|");return E}function ae(Z,U,j){var E=Z.length;if(E===0)return"";for(var M=0;M<E;){var V=Z.charAt(E-M-1);if(V===U&&!j)M++;else if(V!==U&&j)M++;else break}return Z.slice(0,E-M)}function de(Z,U){if(Z.indexOf(U[1])===-1)return-1;for(var j=Z.length,E=0,M=0;M<j;M++)if(Z[M]==="\\")M++;else if(Z[M]===U[0])E++;else if(Z[M]===U[1]&&(E--,E<0))return M;return-1}function we(Z){Z&&Z.sanitize&&!Z.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Se(Z,U){if(U<1)return"";for(var j="";U>1;)U&1&&(j+=Z),U>>=1,Z+=Z;return j+Z}function Me(Z,U,j,E){var M=U.href,V=U.title?_(U.title):null,F=Z[1].replace(/\\([\[\]])/g,"$1");if(Z[0].charAt(0)!=="!"){E.state.inLink=!0;var Y={type:"link",raw:j,href:M,title:V,text:F,tokens:E.inlineTokens(F,[])};return E.state.inLink=!1,Y}return{type:"image",raw:j,href:M,title:V,text:_(F)}}function St(Z,U){var j=Z.match(/^(\s+)(?:```)/);if(j===null)return U;var E=j[1];return U.split(`
`).map(function(M){var V=M.match(/^\s+/);if(V===null)return M;var F=V[0];return F.length>=E.length?M.slice(E.length):M}).join(`
`)}var mt=function(){function Z(j){this.options=j||e.defaults}var U=Z.prototype;return U.space=function(E){var M=this.rules.block.newline.exec(E);if(M&&M[0].length>0)return{type:"space",raw:M[0]}},U.code=function(E){var M=this.rules.block.code.exec(E);if(M){var V=M[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:M[0],codeBlockStyle:"indented",text:this.options.pedantic?V:ae(V,`
`)}}},U.fences=function(E){var M=this.rules.block.fences.exec(E);if(M){var V=M[0],F=St(V,M[3]||"");return{type:"code",raw:V,lang:M[2]?M[2].trim():M[2],text:F}}},U.heading=function(E){var M=this.rules.block.heading.exec(E);if(M){var V=M[2].trim();if(/#$/.test(V)){var F=ae(V,"#");(this.options.pedantic||!F||/ $/.test(F))&&(V=F.trim())}var Y={type:"heading",raw:M[0],depth:M[1].length,text:V,tokens:[]};return this.lexer.inline(Y.text,Y.tokens),Y}},U.hr=function(E){var M=this.rules.block.hr.exec(E);if(M)return{type:"hr",raw:M[0]}},U.blockquote=function(E){var M=this.rules.block.blockquote.exec(E);if(M){var V=M[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:M[0],tokens:this.lexer.blockTokens(V,[]),text:V}}},U.list=function(E){var M=this.rules.block.list.exec(E);if(M){var V,F,Y,ie,ye,ve,Fe,Pe,Ct,at,De,pi,Gt=M[1].trim(),Ns=Gt.length>1,zt={type:"list",raw:"",ordered:Ns,start:Ns?+Gt.slice(0,-1):"",loose:!1,items:[]};Gt=Ns?"\\d{1,9}\\"+Gt.slice(-1):"\\"+Gt,this.options.pedantic&&(Gt=Ns?Gt:"[*+-]");for(var Oi=new RegExp("^( {0,3}"+Gt+")((?:[ ][^\\n]*)?(?:\\n|$))");E&&(pi=!1,!(!(M=Oi.exec(E))||this.rules.block.hr.test(E)));){if(V=M[0],E=E.substring(V.length),Pe=M[2].split(`
`,1)[0],Ct=E.split(`
`,1)[0],this.options.pedantic?(ie=2,De=Pe.trimLeft()):(ie=M[2].search(/[^ ]/),ie=ie>4?1:ie,De=Pe.slice(ie),ie+=M[1].length),ve=!1,!Pe&&/^ *$/.test(Ct)&&(V+=Ct+`
`,E=E.substring(Ct.length+1),pi=!0),!pi)for(var Rc=new RegExp("^ {0,"+Math.min(3,ie-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),ds=new RegExp("^ {0,"+Math.min(3,ie-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");E&&(at=E.split(`
`,1)[0],Pe=at,this.options.pedantic&&(Pe=Pe.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Rc.test(Pe)||ds.test(E)));){if(Pe.search(/[^ ]/)>=ie||!Pe.trim())De+=`
`+Pe.slice(ie);else if(!ve)De+=`
`+Pe;else break;!ve&&!Pe.trim()&&(ve=!0),V+=at+`
`,E=E.substring(at.length+1)}zt.loose||(Fe?zt.loose=!0:/\n *\n *$/.test(V)&&(Fe=!0)),this.options.gfm&&(F=/^\[[ xX]\] /.exec(De),F&&(Y=F[0]!=="[ ] ",De=De.replace(/^\[[ xX]\] +/,""))),zt.items.push({type:"list_item",raw:V,task:!!F,checked:Y,loose:!1,text:De}),zt.raw+=V}zt.items[zt.items.length-1].raw=V.trimRight(),zt.items[zt.items.length-1].text=De.trimRight(),zt.raw=zt.raw.trimRight();var rr=zt.items.length;for(ye=0;ye<rr;ye++){this.lexer.state.top=!1,zt.items[ye].tokens=this.lexer.blockTokens(zt.items[ye].text,[]);var oa=zt.items[ye].tokens.filter(function(gl){return gl.type==="space"}),Oc=oa.every(function(gl){for(var Pc=gl.raw.split(""),to=0,k_=r(Pc),of;!(of=k_()).done;){var x_=of.value;if(x_===`
`&&(to+=1),to>1)return!0}return!1});!zt.loose&&oa.length&&Oc&&(zt.loose=!0,zt.items[ye].loose=!0)}return zt}},U.html=function(E){var M=this.rules.block.html.exec(E);if(M){var V={type:"html",raw:M[0],pre:!this.options.sanitizer&&(M[1]==="pre"||M[1]==="script"||M[1]==="style"),text:M[0]};return this.options.sanitize&&(V.type="paragraph",V.text=this.options.sanitizer?this.options.sanitizer(M[0]):_(M[0]),V.tokens=[],this.lexer.inline(V.text,V.tokens)),V}},U.def=function(E){var M=this.rules.block.def.exec(E);if(M){M[3]&&(M[3]=M[3].substring(1,M[3].length-1));var V=M[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:V,raw:M[0],href:M[2],title:M[3]}}},U.table=function(E){var M=this.rules.block.table.exec(E);if(M){var V={type:"table",header:ne(M[1]).map(function(Fe){return{text:Fe}}),align:M[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:M[3]&&M[3].trim()?M[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(V.header.length===V.align.length){V.raw=M[0];var F=V.align.length,Y,ie,ye,ve;for(Y=0;Y<F;Y++)/^ *-+: *$/.test(V.align[Y])?V.align[Y]="right":/^ *:-+: *$/.test(V.align[Y])?V.align[Y]="center":/^ *:-+ *$/.test(V.align[Y])?V.align[Y]="left":V.align[Y]=null;for(F=V.rows.length,Y=0;Y<F;Y++)V.rows[Y]=ne(V.rows[Y],V.header.length).map(function(Fe){return{text:Fe}});for(F=V.header.length,ie=0;ie<F;ie++)V.header[ie].tokens=[],this.lexer.inline(V.header[ie].text,V.header[ie].tokens);for(F=V.rows.length,ie=0;ie<F;ie++)for(ve=V.rows[ie],ye=0;ye<ve.length;ye++)ve[ye].tokens=[],this.lexer.inline(ve[ye].text,ve[ye].tokens);return V}}},U.lheading=function(E){var M=this.rules.block.lheading.exec(E);if(M){var V={type:"heading",raw:M[0],depth:M[2].charAt(0)==="="?1:2,text:M[1],tokens:[]};return this.lexer.inline(V.text,V.tokens),V}},U.paragraph=function(E){var M=this.rules.block.paragraph.exec(E);if(M){var V={type:"paragraph",raw:M[0],text:M[1].charAt(M[1].length-1)===`
`?M[1].slice(0,-1):M[1],tokens:[]};return this.lexer.inline(V.text,V.tokens),V}},U.text=function(E){var M=this.rules.block.text.exec(E);if(M){var V={type:"text",raw:M[0],text:M[0],tokens:[]};return this.lexer.inline(V.text,V.tokens),V}},U.escape=function(E){var M=this.rules.inline.escape.exec(E);if(M)return{type:"escape",raw:M[0],text:_(M[1])}},U.tag=function(E){var M=this.rules.inline.tag.exec(E);if(M)return!this.lexer.state.inLink&&/^<a /i.test(M[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(M[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(M[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(M[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:M[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(M[0]):_(M[0]):M[0]}},U.link=function(E){var M=this.rules.inline.link.exec(E);if(M){var V=M[2].trim();if(!this.options.pedantic&&/^</.test(V)){if(!/>$/.test(V))return;var F=ae(V.slice(0,-1),"\\");if((V.length-F.length)%2===0)return}else{var Y=de(M[2],"()");if(Y>-1){var ie=M[0].indexOf("!")===0?5:4,ye=ie+M[1].length+Y;M[2]=M[2].substring(0,Y),M[0]=M[0].substring(0,ye).trim(),M[3]=""}}var ve=M[2],Fe="";if(this.options.pedantic){var Pe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ve);Pe&&(ve=Pe[1],Fe=Pe[3])}else Fe=M[3]?M[3].slice(1,-1):"";return ve=ve.trim(),/^</.test(ve)&&(this.options.pedantic&&!/>$/.test(V)?ve=ve.slice(1):ve=ve.slice(1,-1)),Me(M,{href:ve&&ve.replace(this.rules.inline._escapes,"$1"),title:Fe&&Fe.replace(this.rules.inline._escapes,"$1")},M[0],this.lexer)}},U.reflink=function(E,M){var V;if((V=this.rules.inline.reflink.exec(E))||(V=this.rules.inline.nolink.exec(E))){var F=(V[2]||V[1]).replace(/\s+/g," ");if(F=M[F.toLowerCase()],!F||!F.href){var Y=V[0].charAt(0);return{type:"text",raw:Y,text:Y}}return Me(V,F,V[0],this.lexer)}},U.emStrong=function(E,M,V){V===void 0&&(V="");var F=this.rules.inline.emStrong.lDelim.exec(E);if(!!F&&!(F[3]&&V.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE- Line truncated
]`).replace("lheading",_e.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ge={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:H,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:H,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ge._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ge.punctuation=w(ge.punctuation).replace(/punctuation/g,ge._punctuation).getRegex(),ge.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ge.escapedEmSt=/\\\*|\\_/g,ge._comment=w(_e._comment).replace("(?:-->|$)","-->").getRegex(),ge.emStrong.lDelim=w(ge.emStrong.lDelim).replace(/punct/g,ge._punctuation).getRegex(),ge.emStrong.rDelimAst=w(ge.emStrong.rDelimAst,"g").replace(/punct/g,ge._punctuation).getRegex(),ge.emStrong.rDelimUnd=w(ge.emStrong.rDelimUnd,"g").replace(/punct/g,ge._punctuation).getRegex(),ge._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ge._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ge._email=/[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])?)+(?![-_])/,ge.autolink=w(ge.autolink).replace("scheme",ge._scheme).replace("email",ge._email).getRegex(),ge._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ge.tag=w(ge.tag).replace("comment",ge._comment).replace("attribute",ge._attribute).getRegex(),ge._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ge._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ge._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ge.link=w(ge.link).replace("label",ge._label).replace("href",ge._href).replace("title",ge._title).getRegex(),ge.reflink=w(ge.reflink).replace("label",ge._label).replace("ref",_e._label).getRegex(),ge.nolink=w(ge.nolink).replace("ref",_e._label).getRegex(),ge.reflinkSearch=w(ge.reflinkSearch,"g").replace("reflink",ge.reflink).replace("nolink",ge.nolink).getRegex(),ge.normal=$({},ge),ge.pedantic=$({},ge.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",ge._label).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge._label).getRegex()}),ge.gfm=$({},ge.normal,{escape:w(ge.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ge.gfm.url=w(ge.gfm.url,"i").replace("email",ge.gfm._extended_email).getRegex(),ge.breaks=$({},ge.gfm,{br:w(ge.br).replace("{2,}","*").getRegex(),text:w(ge.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function It(Z){return Z.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ri(Z){var U="",j,E,M=Z.length;for(j=0;j<M;j++)E=Z.charCodeAt(j),Math.random()>.5&&(E="x"+E.toString(16)),U+="&#"+E+";";return U}var Dn=function(){function Z(j){this.tokens=[],this.tokens.links=Object.create(null),this.options=j||e.defaults,this.options.tokenizer=this.options.tokenizer||new mt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var E={block:_e.normal,inline:ge.normal};this.options.pedantic?(ELine truncated
`),this.blockTokens(E,this.tokens);for(var M;M=this.inlineQueue.shift();)this.inlineTokens(M.src,M.tokens);return this.tokens},U.blockTokens=function(E,M){var V=this;M===void 0&&(M=[]),this.options.pedantic?E=E.replace(/\t/g," ").replace(/^ +$/gm,""):E=E.replace(/^( *)(\t+)/gm,function(Fe,Pe,Ct){return Pe+" ".repeat(Ct.length)});for(var F,Y,ie,ye;E;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Fe){return(F=Fe.call({lexer:V},E,M))?(E=E.substring(F.raw.length),M.push(F),!0):!1}))){if(F=this.tokenizer.space(E)){E=E.substring(F.raw.length),F.raw.length===1&&M.length>0?M[M.length-1].raw+=`
`:M.push(F);continue}if(F=this.tokenizer.code(E)){E=E.substring(F.raw.length),Y=M[M.length-1],Y&&(Y.type==="paragraph"||Y.type==="text")?(Y.raw+=`
`+F.raw,Y.text+=`
`+F.text,this.inlineQueue[this.inlineQueue.length-1].src=Y.text):M.push(F);continue}if(F=this.tokenizer.fences(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.heading(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.hr(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.blockquote(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.list(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.html(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.def(E)){E=E.substring(F.raw.length),Y=M[M.length-1],Y&&(Y.type==="paragraph"||Y.type==="text")?(Y.raw+=`
`+F.raw,Y.text+=`
`+F.raw,this.inlineQueue[this.inlineQueue.length-1].src=Y.text):this.tokens.links[F.tag]||(this.tokens.links[F.tag]={href:F.href,title:F.title});continue}if(F=this.tokenizer.table(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.lheading(E)){E=E.substring(F.raw.length),M.push(F);continue}if(ie=E,this.options.extensions&&this.options.extensions.startBlock&&function(){var Fe=1/0,Pe=E.slice(1),Ct=void 0;V.options.extensions.startBlock.forEach(function(at){Ct=at.call({lexer:this},Pe),typeof Ct=="number"&&Ct>=0&&(Fe=Math.min(Fe,Ct))}),Fe<1/0&&Fe>=0&&(ie=E.substring(0,Fe+1))}(),this.state.top&&(F=this.tokenizer.paragraph(ie))){Y=M[M.length-1],ye&&Y.type==="paragraph"?(Y.raw+=`
`+F.raw,Y.text+=`
`+F.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Y.text):M.push(F),ye=ie.length!==E.length,E=E.substring(F.raw.length);continue}if(F=this.tokenizer.text(E)){E=E.substring(F.raw.length),Y=M[M.length-1],Y&&Y.type==="text"?(Y.raw+=`
`+F.raw,Y.text+=`
`+F.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Y.text):M.push(F);continue}if(E){var ve="Infinite loop on byte: "+E.charCodeAt(0);if(this.options.silent){console.error(ve);break}else throw new Error(ve)}}return this.state.top=!0,M},U.inline=function(E,M){this.inlineQueue.push({src:E,tokens:M})},U.inlineTokens=function(E,M){var V=this;M===void 0&&(M=[]);var F,Y,ie,ye=E,ve,Fe,Pe;if(this.tokens.links){var Ct=Object.keys(this.tokens.links);if(Ct.length>0)for(;(ve=this.tokenizer.rules.inline.reflinkSearch.exec(ye))!=null;)Ct.includes(ve[0].slice(ve[0].lastIndexOf("[")+1,-1))&&(ye=ye.slice(0,ve.index)+"["+Se("a",ve[0].length-2)+"]"+ye.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ve=this.tokenizer.rules.inline.blockSkip.exec(ye))!=null;)ye=ye.slice(0,ve.index)+"["+Se("a",ve[0].length-2)+"]"+ye.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ve=this.tokenizer.rules.inline.escapedEmSt.exec(ye))!=null;)ye=ye.slice(0,ve.index)+"++"+ye.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;E;)if(Fe||(Pe=""),Fe=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(De){return(F=De.call({lexer:V},E,M))?(E=E.substring(F.raw.length),M.push(F),!0):!1}))){if(F=this.tokenizer.escape(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.tag(E)){E=E.substring(F.raw.length),Y=M[M.length-1],Y&&F.type==="text"&&Y.type==="text"?(Y.raw+=F.raw,Y.text+=F.text):M.push(F);continue}if(F=this.tokenizer.link(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.reflink(E,this.tokens.links)){E=E.substring(F.raw.length),Y=M[M.length-1],Y&&F.type==="text"&&Y.type==="text"?(Y.raw+=F.raw,Y.text+=F.text):M.push(F);continue}if(F=this.tokenizer.emStrong(E,ye,Pe)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.codespan(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.br(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.del(E)){E=E.substring(F.raw.length),M.push(F);continue}if(F=this.tokenizer.autolink(E,Ri)){E=E.substring(F.raw.length),M.push(F);continue}if(!this.state.inLink&&(F=this.tokenizer.url(E,Ri))){E=E.substring(F.raw.length),M.push(F);continue}if(ie=E,this.options.extensions&&this.options.extensions.startInline&&function(){var De=1/0,pi=E.slice(1),Gt=void 0;V.options.extensions.startInline.forEach(function(Ns){Gt=Ns.call({lexer:this},pi),typeof Gt=="number"&&Gt>=0&&(De=Math.min(De,Gt))}),De<1/0&&De>=0&&(ie=E.substring(0,De+1))}(),F=this.tokenizer.inlineText(ie,It)){E=E.substring(F.raw.length),F.raw.slice(-1)!=="_"&&(Pe=F.raw.slice(-1)),Fe=!0,Y=M[M.length-1],Y&&Y.type==="text"?(Y.raw+=F.raw,Y.text+=F.text):M.push(F);continue}if(E){var at="Infinite loop on byte: "+E.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return M},i(Z,null,[{key:"rules",get:function(){return{block:_e,inline:ge}}}]),Z}(),Lo=function(){function Z(j){this.options=j||e.defaults}var U=Z.prototype;return U.code=function(E,M,V){var F=(M||"").match(/\S*/)[0];if(this.options.highlight){var Y=this.options.highlight(E,F);Y!=null&&Y!==E&&(V=!0,E=Y)}return E=E.replace(/\n$/,"")+`
`,F?'<pre><code class="'+this.options.langPrefix+_(F,!0)+'">'+(V?E:_(E,!0))+`</code></pre>
`:"<pre><code>"+(V?E:_(E,!0))+`</code></pre>
`},U.blockquote=function(E){return`<blockquote>
`+E+`</blockquote>
`},U.html=function(E){return E},U.heading=function(E,M,V,F){if(this.options.headerIds){var Y=this.options.headerPrefix+F.slug(V);return"<h"+M+' id="'+Y+'">'+E+"</h"+M+`>
`}return"<h"+M+">"+E+"</h"+M+`>
`},U.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},U.list=function(E,M,V){var F=M?"ol":"ul",Y=M&&V!==1?' start="'+V+'"':"";return"<"+F+Y+`>
`+E+"</"+F+`>
`},U.listitem=function(E){return"<li>"+E+`</li>
`},U.checkbox=function(E){return"<input "+(E?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},U.paragraph=function(E){return"<p>"+E+`</p>
`},U.table=function(E,M){return M&&(M="<tbody>"+M+"</tbody>"),`<table>
<thead>
`+E+`</thead>
`+M+`</table>
`},U.tablerow=function(E){return`<tr>
`+E+`</tr>
`},U.tablecell=function(E,M){var V=M.header?"th":"td",F=M.align?"<"+V+' align="'+M.align+'">':"<"+V+">";return F+E+("</"+V+`>
`)},U.strong=function(E){return"<strong>"+E+"</strong>"},U.em=function(E){return"<em>"+E+"</em>"},U.codespan=function(E){return"<code>"+E+"</code>"},U.br=function(){return this.options.xhtml?"<br/>":"<br>"},U.del=function(E){return"<del>"+E+"</del>"},U.link=function(E,M,V){if(E=x(this.options.sanitize,this.options.baseUrl,E),E===null)return V;var F='<a href="'+_(E)+'"';return M&&(F+=' title="'+M+'"'),F+=">"+V+"</a>",F},U.image=function(E,M,V){if(E=x(this.options.sanitize,this.options.baseUrl,E),E===null)return V;var F='<img src="'+E+'" alt="'+V+'"';return M&&(F+=' title="'+M+'"'),F+=this.options.xhtml?"/>":">",F},U.text=function(E){return E},Z}(),sa=function(){function Z(){}var U=Z.prototype;return U.strong=function(E){return E},U.em=function(E){return E},U.codespan=function(E){return E},U.del=function(E){return E},U.html=function(E){return E},U.text=function(E){return E},U.link=function(E,M,V){return""+V},U.image=function(E,M,V){return""+V},U.br=function(){return""},Z}(),Do=function(){function Z(){this.seen={}}var U=Z.prototype;return U.serialize=function(E){return E.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},U.getNextSafeSlug=function(E,M){var V=E,F=0;if(this.seen.hasOwnProperty(V)){F=this.seen[E];do F++,V=E+"-"+F;while(this.seen.hasOwnProperty(V))}return M||(this.seen[E]=F,this.seen[V]=0),V},U.slug=function(E,M){M===void 0&&(M={});var V=this.serialize(E);return this.getNextSafeSlug(V,M.dryrun)},Z}(),or=function(){function Z(j){this.options=j||e.defaults,this.options.renderer=this.options.renderer||new Lo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new sa,this.slugger=new Do}Z.parse=function(E,M){var V=new Z(M);return V.parse(E)},Z.parseInline=function(E,M){var V=new Z(M);return V.parseInline(E)};var U=Z.prototype;return U.parse=function(E,M){M===void 0&&(M=!0);var V="",F,Y,ie,ye,ve,Fe,Pe,Ct,at,De,pi,Gt,Ns,zt,Oi,Rc,ds,rr,oa,Oc=E.length;for(F=0;F<Oc;F++){if(De=E[F],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[De.type]&&(oa=this.options.extensions.renderers[De.type].call({parser:this},De),oa!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(De.type))){V+=oa||"";continue}switch(De.type){case"space":continue;case"hr":{V+=this.renderer.hr();continue}case"heading":{V+=this.renderer.heading(this.parseInline(De.tokens),De.depth,v(this.parseInline(De.tokens,this.textRenderer)),this.slugger);continue}case"code":{V+=this.renderer.code(De.text,De.lang,De.escaped);continue}case"table":{for(Ct="",Pe="",ye=De.header.length,Y=0;Y<ye;Y++)Pe+=this.renderer.tablecell(this.parseInline(De.header[Y].tokens),{header:!0,align:De.align[Y]});for(Ct+=this.renderer.tablerow(Pe),at="",ye=De.rows.length,Y=0;Y<ye;Y++){for(Fe=De.rows[Y],Pe="",ve=Fe.length,ie=0;ie<ve;ie++)Pe+=this.renderer.tablecell(this.parseInline(Fe[ie].tokens),{header:!1,align:De.align[ie]});at+=this.renderer.tablerow(Pe)}V+=this.renderer.table(Ct,at);continue}case"blockquote":{at=this.parse(De.tokens),V+=this.renderer.blockquote(at);continue}case"list":{for(pi=De.ordered,Gt=De.start,Ns=De.loose,ye=De.items.length,at="",Y=0;Y<ye;Y++)Oi=De.items[Y],Rc=Oi.checked,ds=Oi.task,zt="",Oi.task&&(rr=this.renderer.checkbox(Rc),Ns?Oi.tokens.length>0&&Oi.tokens[0].type==="paragraph"?(Oi.tokens[0].text=rr+" "+Oi.tokens[0].text,Oi.tokens[0].tokens&&Oi.tokens[0].tokens.length>0&&Oi.tokens[0].tokens[0].type==="text"&&(Oi.tokens[0].tokens[0].text=rr+" "+Oi.tokens[0].tokens[0].text)):Oi.tokens.unshift({type:"text",text:rr}):zt+=rr),zt+=this.parse(Oi.tokens,Ns),at+=this.renderer.listitem(zt,ds,Rc);V+=this.renderer.list(at,pi,Gt);continue}case"html":{V+=this.renderer.html(De.text);continue}case"paragraph":{V+=this.renderer.paragraph(this.parseInline(De.tokens));continue}case"text":{for(at=De.tokens?this.parseInline(De.tokens):De.text;F+1<Oc&&E[F+1].type==="text";)De=E[++F],at+=`
`+(De.tokens?this.parseInline(De.tokens):De.text);V+=M?this.renderer.paragraph(at):at;continue}default:{var gl='Token with "'+De.type+'" type was not found.';if(this.options.silent){console.error(gl);return}else throw new Error(gl)}}}return V},U.parseInline=function(E,M){M=M||this.renderer;var V="",F,Y,ie,ye=E.length;for(F=0;F<ye;F++){if(Y=E[F],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Y.type]&&(ie=this.options.extensions.renderers[Y.type].call({parser:this},Y),ie!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Y.type))){V+=ie||"";continue}switch(Y.type){case"escape":{V+=M.text(Y.text);break}case"html":{V+=M.html(Y.text);break}case"link":{V+=M.link(Y.href,Y.title,this.parseInline(Y.tokens,M));break}case"image":{V+=M.image(Y.href,Y.title,Y.text);break}case"strong":{V+=M.strong(this.parseInline(Y.tokens,M));break}case"em":{V+=M.em(this.parseInline(Y.tokens,M));break}case"codespan":{V+=M.codespan(Y.text);break}case"br":{V+=M.br();break}case"del":{V+=M.del(this.parseInline(Y.tokens,M));break}case"text":{V+=M.text(Y.text);break}default:{var ve='Token with "'+Y.type+'" type was not found.';if(this.options.silent){console.error(ve);return}else throw new Error(ve)}}}return V},Z}();function Oe(Z,U,j){if(typeof Z=="undefined"||Z===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Z!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Z)+", string expected");if(typeof U=="function"&&(j=U,U=null),U=$({},Oe.defaults,U||{}),we(U),j){var E=U.highlight,M;try{M=Dn.lex(Z,U)}catch(ie){return j(ie)}var V=function(ye){var ve;if(!ye)try{U.walkTokens&&Oe.walkTokens(M,U.walkTokens),ve=or.parse(M,U)}catch(Fe){ye=Fe}return U.highlight=E,ye?j(ye):j(null,ve)};if(!E||E.length<3||(delete U.highlight,!M.length))return V();var F=0;Oe.walkTokens(M,function(ie){ie.type==="code"&&(F++,setTimeout(function(){E(ie.text,ie.lang,function(ye,ve){if(ye)return V(ye);ve!=null&&ve!==ie.text&&(ie.text=ve,ie.escaped=!0),F--,F===0&&V()})},0))}),F===0&&V();return}try{var Y=Dn.lex(Z,U);return U.walkTokens&&Oe.walkTokens(Y,U.walkTokens),or.parse(Y,U)}catch(ie){if(ie.message+=`
Please report this to https://github.com/markedjs/marked.`,U.silent)return"<p>An error occurred:</p><pre>"+_(ie.message+"",!0)+"</pre>";throw ie}}Oe.options=Oe.setOptions=function(Z){return $(Oe.defaults,Z),l(Oe.defaults),Oe},Oe.getDefaults=a,Oe.defaults=e.defaults,Oe.use=function(){for(var Z=arguments.length,U=new Array(Z),j=0;j<Z;j++)U[j]=arguments[j];var E=$.apply(void 0,[{}].concat(U)),M=Oe.defaults.extensions||{renderers:{},childTokens:{}},V;U.forEach(function(F){if(F.extensions&&(V=!0,F.extensions.forEach(function(ie){if(!ie.name)throw new Error("extension name required");if(ie.renderer){var ye=M.renderers?M.renderers[ie.name]:null;ye?M.renderers[ie.name]=function(){for(var ve=arguments.length,Fe=new Array(ve),Pe=0;Pe<ve;Pe++)Fe[Pe]=arguments[Pe];var Ct=ie.renderer.apply(this,Fe);return Ct===!1&&(Ct=ye.apply(this,Fe)),Ct}:M.renderers[ie.name]=ie.renderer}if(ie.tokenizer){if(!ie.level||ie.level!=="block"&&ie.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");M[ie.level]?M[ie.level].unshift(ie.tokenizer):M[ie.level]=[ie.tokenizer],ie.start&&(ie.level==="block"?M.startBlock?M.startBlock.push(ie.start):M.startBlock=[ie.start]:ie.level==="inline"&&(M.startInline?M.startInline.push(ie.start):M.startInline=[ie.start]))}ie.childTokens&&(M.childTokens[ie.name]=ie.childTokens)})),F.renderer&&function(){var ie=Oe.defaults.renderer||new Lo,ye=function(Pe){var Ct=ie[Pe];ie[Pe]=function(){for(var at=arguments.length,De=new Array(at),pi=0;pi<at;pi++)De[pi]=arguments[pi];var Gt=F.renderer[Pe].apply(ie,De);return Gt===!1&&(Gt=Ct.apply(ie,De)),Gt}};for(var ve in F.renderer)ye(ve);E.renderer=ie}(),F.tokenizer&&function(){var ie=Oe.defaults.tokenizer||new mt,ye=function(Pe){var Ct=ie[Pe];ie[Pe]=function(){for(var at=arguments.length,De=new Array(at),pi=0;pi<at;pi++)De[pi]=arguments[pi];var Gt=F.tokenizer[Pe].apply(ie,De);return Gt===!1&&(Gt=Ct.apply(ie,De)),Gt}};for(var ve in F.tokenizer)ye(ve);E.tokenizer=ie}(),F.walkTokens){var Y=Oe.defaults.walkTokens;E.walkTokens=function(ie){F.walkTokens.call(this,ie),Y&&Y.call(this,ie)}}V&&(E.extensions=M),Oe.setOptions(E)})},Oe.walkTokens=function(Z,U){for(var j=function(){var F=M.value;switch(U.call(Oe,F),F.type){case"table":{for(var Y=r(F.header),ie;!(ie=Y()).done;){var ye=ie.value;Oe.walkTokens(ye.tokens,U)}for(var ve=r(F.rows),Fe;!(Fe=ve()).done;)for(var Pe=Fe.value,Ct=r(Pe),at;!(at=Ct()).done;){var De=at.value;Oe.walkTokens(De.tokens,U)}break}case"list":{Oe.walkTokens(F.items,U);break}default:Oe.defaults.extensions&&Oe.defaults.extensions.childTokens&&Oe.defaults.extensions.childTokens[F.type]?Oe.defaults.extensions.childTokens[F.type].forEach(function(pi){Oe.walkTokens(F[pi],U)}):F.tokens&&Oe.walkTokens(F.tokens,U)}},E=r(Z),M;!(M=E()).done;)j()},Oe.parseInline=function(Z,U){if(typeof Z=="undefined"||Z===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Z!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Z)+", string expected");U=$({},Oe.defaults,U||{}),we(U);try{var j=Dn.lexInline(Z,U);return U.walkTokens&&Oe.walkTokens(j,U.walkTokens),or.parseInline(j,U)}catch(E){if(E.message+=`
Please report this to https://github.com/markedjs/marked.`,U.silent)return"<p>An error occurred:</p><pre>"+_(E.message+"",!0)+"</pre>";throw E}},Oe.Parser=or,Oe.parser=or.parse,Oe.Renderer=Lo,Oe.TextRenderer=sa,Oe.Lexer=Dn,Oe.lexer=Dn.lex,Oe.Tokenizer=mt,Oe.Slugger=Do,Oe.parse=Oe;var hl=Oe.options,nf=Oe.setOptions,sf=Oe.use,ul=Oe.walkTokens,Ih=Oe.parseInline,L_=Oe,Eh=or.parse,D_=Dn.lex;e.Lexer=Dn,e.Parser=or,e.Renderer=Lo,e.Slugger=Do,e.TextRenderer=sa,e.Tokenizer=mt,e.getDefaults=a,e.lexer=D_,e.marked=Oe,e.options=hl,e.parse=L_,e.parseInline=Ih,e.parser=Eh,e.setOptions=nf,e.use=sf,e.walkTokens=ul,Object.defineProperty(e,"__esModule",{value:!0})})})();var zM=s3||exports;function Ov(o){let e=JSON.parse(o);return e=JL(e),e}function JL(o,e=0){if(!o||e>200)return o;if(typeof o=="object"){switch(o.$mid){case 1:return me.revive(o);case 2:return new RegExp(o.source,o.flags);case 14:return new Date(o.source)}if(o instanceof VC||o instanceof Uint8Array)return o;if(Array.isArray(o))for(let t=0;t<o.length;++t)o[t]=JL(o[t],e+1);else for(const t in o)Object.hasOwnProperty.call(o,t)&&(o[t]=JL(o[t],e+1))}return o}function pJ(o,e={},t={}){var i;const n=new ee;let s=!1;const r=LE(e),a=function(_){let b;try{b=Ov(decodeURIComponent(_))}catch(v){}return b?(b=FP(b,v=>{if(o.uris&&o.uris[v])return me.revive(o.uris[v])}),encodeURIComponent(JSON.stringify(b))):_},l=function(_,b){const v=o.uris&&o.uris[_];let C=me.revive(v);return b?_.startsWith(Ne.data+":")?_:(C||(C=me.parse(_)),RO.asBrowserUri(C).toString(!0)):!C||me.parse(_).toString()===C.toString()?_:(C.query&&(C=C.with({query:a(C.query)})),C.toString())},c=new zM.Renderer;c.image=(_,b,v)=>{let C=[],w=[];return _&&({href:_,dimensions:C}=OG(_),w.push(`src="${cb(_)}"`)),v&&w.push(`alt="${cb(v)}"`),b&&w.push(`title="${cb(b)}"`),C.length&&(w=w.concat(C)),"<img "+w.join(" ")+">"},c.link=(_,b,v)=>typeof _!="string"?"":(_===v&&(v=nS(v)),b=typeof b=="string"?cb(nS(b)):"",_=nS(_),_=_.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),`<a href="${_}" title="${b||_}">${v}</a>`),c.paragraph=_=>`<p>${_}</p>`;const d=[];if(e.codeBlockRenderer&&(c.code=(_,b)=>{const v=iF.nextId(),C=e.codeBlockRenderer(b!=null?b:"",_);return d.push(C.then(w=>[v,w])),`<div class="code" data-code="${v}">${Hx(_)}</div>`}),e.actionHandler){const _=e.actionHandler.disposables.add(new _t(r,"click")),b=e.actionHandler.disposables.add(new _t(r,"auxclick"));e.actionHandler.disposables.add(pe.any(_.event,b.event)(v=>{const C=new Ir(v);if(!C.leftButton&&!C.middleButton)return;let w=C.target;if(!(w.tagName!=="A"&&(w=w.parentElement,!w||w.tagName!=="A")))try{let S=w.dataset.href;S&&(o.baseUri&&(S=OS(me.from(o.baseUri),S)),e.actionHandler.callback(S,C))}catch(S){Ee(S)}finally{C.preventDefault()}}))}o.supportHtml||(t.sanitizer=_=>(o.isTrusted?_.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?_:"",t.sanitize=!0,t.silent=!0),t.renderer=c;let h=(i=o.value)!==null&&i!==void 0?i:"";h.length>1e5&&(h=`${h.substr(0,1e5)}\u2026`),o.supportThemeIcons&&(h=TG(h));let u=zM.parse(h,t);o.supportThemeIcons&&(u=yd(u).map(b=>typeof b=="string"?b:b.outerHTML).join(""));const f=new DOMParser().parseFromString(UM(o,u),"text/html");if(f.body.querySelectorAll("img").forEach(_=>{const b=_.getAttribute("src");if(b){let v=b;try{o.baseUri&&(v=OS(me.from(o.baseUri),v))}catch(C){}_.src=l(v,!0)}}),f.body.querySelectorAll("a").forEach(_=>{const b=_.getAttribute("href");if(_.setAttribute("href",""),!b||/^data:|javascript:/i.test(b)||/^command:/i.test(b)&&!o.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(b))_.replaceWith(..._.childNodes);else{let v=l(b,!1);o.baseUri&&(v=OS(me.from(o.baseUri),b)),_.dataset.href=v}}),r.innerHTML=UM(o,f.body.innerHTML),d.length>0&&Promise.all(d).then(_=>{var b,v;if(s)return;const C=new Map(_),w=r.querySelectorAll("div[data-code]");for(const S of w){const k=C.get((b=S.dataset.code)!==null&&b!==void 0?b:"");k&&Rd(S,k)}(v=e.asyncRenderCallback)===null||v===void 0||v.call(e)}),e.asyncRenderCallback)for(const _ of r.getElementsByTagName("img")){const b=n.add(q(_,"load",()=>{b.dispose(),e.asyncRenderCallback()}))}return{element:r,dispose:()=>{s=!0,n.dispose()}}}function OS(o,e){return/^\w[\w\d+.-]*:/.test(e)?e:o.path.endsWith("/")?S2(o,e).toString():S2(a1(o),e).toString()}function UM(o,e){const{config:t,allowedSchemes:i}=mJ(o);LO("uponSanitizeAttribute",(s,r)=>{if(r.attrName==="style"||r.attrName==="class"){if(s.tagName==="SPAN"){if(r.attrName==="style"){r.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(r.attrValue);return}else if(r.attrName==="class"){r.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(r.attrValue);return}}r.keepAttr=!1;return}});const n=CB(i);try{return H6(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{DO("uponSanitizeAttribute"),n.dispose()}}function mJ(o){const e=[Ne.http,Ne.https,Ne.mailto,Ne.data,Ne.file,Ne.vscodeFileResource,Ne.vscodeRemote,Ne.vscodeRemoteRes Line truncated
.monaco-editor .zone-widget ${s},
.markers-panel .marker-icon${s},
.text-search-provider-messages .providerMessage ${s},
.extensions-viewlet > .extensions ${s} {
color: ${t};
}
`)}const i=o.getColor(zz);if(i){const s=m.warning.cssSelector;e.addRule(`
.monaco-editor .zone-widget ${s},
.markers-panel .marker-icon${s},
.extensions-viewlet > .extensions ${s},
.extension-editor ${s},
.text-search-provider-messages .providerMessage ${s},
.preferences-editor ${s} {
color: ${i};
}
`)}const n=o.getColor(Uz);if(n){const s=m.info.cssSelector;e.addRule(`
.monaco-editor .zone-widget ${s},
.markers-panel .marker-icon${s},
.extensions-viewlet > .extensions ${s},
.text-search-provider-messages .providerMessage ${s},
.extension-editor ${s} {
color: ${n};
}
`)}});var kJ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};class xJ{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new ee,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(Ei(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new D4(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){et(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=((t==null?void 0:t.length)||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=Ur(i);this._lines=a.length,this._longestLineLength=0;for(const u of a)this._longestLineLength=Math.max(u.length+r,this._longestLineLength);Ii(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const u of a)l=document.createElement("div"),l.innerText=u,u===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const u=document.createElement("span");if(u.classList.add("details"),l.appendChild(u),t){const g=document.createElement("span");g.innerText=t,g.classList.add("source"),u.appendChild(g)}if(s)if(typeof s=="string"){const g=document.createElement("span");g.innerText=`(${s})`,g.classList.add("code"),u.appendChild(g)}else{this._codeLink=se("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=f=>{this._openerService.open(s.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()};const g=G(this._codeLink,se("span"));g.innerText=s.value,u.appendChild(this._codeLink)}}if(Ii(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),en(n)){const u=this._relatedBlock.appendChild(document.createElement("div"));u.style.paddingTop=`${Math.floor(this._editor.getOption(61)*.66)}px`,this._lines+=1;for(const g of n){const f=document.createElement("div"),_=document.createElement("a");_.classList.add("filename"),_.innerText=`${this._labelService.getUriBasenameLabel(g.resource)}(${g.startLineNumber}, ${g.startColumn}): `,_.title=this._labelService.getUriLabel(g.resource),this._relatedDiagnostics.set(_,g);const b=document.createElement("span");b.innerText=g.message,f.appendChild(_),f.appendChild(b),this._lines+=1,u.appendChild(f)}}const c=this._editor.getOption(46),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Ft.Error:t=p("Error","Error");break;case Ft.Warning:t=p("Warning","Warning");break;case Ft.Info:t=p("Info","Info");break;case Ft.Hint:t=p("Hint","Hint");break}let i=p("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Cg=class c3 extends xv{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new ee,this._onDidSelectRelatedInformation=new O,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Ft.Warning,this._backgroundColor=W.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(TJ);let t=nD,i=IJ;this._severity===Ft.Warning?(t=g0,i=EJ):this._severit Line truncated
`),parse:o=>o.split(`\r
`).filter(e=>!e.startsWith("#"))});class Pt{static insert(e,t){return{range:new L(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}const bm=qe("contextService");function QM(o){const e=o;return typeof(e==null?void 0:e.id)=="string"&&me.isUri(e.uri)}function ZJ(o){if(o.configuration)return{id:o.id,configPath:o.configuration};if(o.folders.length===1)return{id:o.id,uri:o.folders[0].uri}}class YJ{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const lD="code-workspace";p("codeWorkspace","Code Workspace");function JM(o,e=nn){return wK(o,e)?o.charAt(0).toUpperCase()+o.slice(1):o}var XJ=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},QJ=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class eA{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(i!==void 0)return i}}}class tA{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const s=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);s&&(i=s.value,n=s.multiline)}if(i&&n&&e.snippet){const s=this._model.getLineContent(this._selection.startLineNumber),r=pt(s,0,this._selection.startColumn-1);let a=r;e.snippet.walk(c=>c===e?!1:(c instanceof On&&(a=pt(Ur(c.value).pop())),!0));const l=Pd(a,r);i=i.replace(/(\r\n|\r|\n)(.*)/g,(c,d,h)=>`${d}${a.substr(l)}${h}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class iA{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return pd(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=pd(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return EO(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(a1(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class nA{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(!!t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!KO(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}let Wv=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(!!n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}};Wv=XJ([QJ(2,ti)],Wv);class Vo{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice( Line truncated
`),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=Sa._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new oe(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n];r.ignore||i.push(Pt.delete(new L(t+n,r.commentStrOffset+1,t+n,r.commentStrOffset+r.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let s=0,r=e.length;s<r;s++){const a=e[s];a.ignore||i.push(Pt.insert(new B(t+s,a.commentStrOffset+1),a.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let s=1073741824,r,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let h=0;for(let u=0,g=t[l].commentStrOffset;h<s&&u<g;u++)h=Sa.nextVisibleColumn(h,n,d.charCodeAt(u)===9,1);h<s&&(s=h)}s=Math.floor(s/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let h=0;for(r=0,a=t[l].commentStrOffset;h<s&&r<a;r++)h=Sa.nextVisibleColumn(h,n,d.charCodeAt(r)===9,1);h>s?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class eN extends he{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(ti);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(19),l=t.getSelections().map((d,h)=>({selection:d,index:h,ignoreFirstLine:!1}));l.sort((d,h)=>L.compareRangesUsingStarts(d.selection,h.selection));let c=l[0];for(let d=1;d<l.length;d++){const h=l[d];c.selection.endLineNumber===h.selection.startLineNumber&&(c.index<h.index?h.ignoreFirstLine=!0:(c.ignoreFirstLine=!0,c=h))}for(const d of l)s.push(new Sa(i,d.selection,r.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,d.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class nee extends eN{constructor(){super(0,{id:"editor.action.commentLine",label:p("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:A.MenubarEditMenu,group:"5_insert",title:p({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class see extends eN{constructor(){super(1,{id:"editor.action.addCommentLine",label:p("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2081),weight:100}})}}class oee extends eN{constructor(){super(2,{id:"editor.action.removeCommentLine",label:p("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2099),weight:100}})}}class ree extends he{constructor(){super({id:"editor.action.blockComment",label:p("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:A.MenubarEditMenu,group:"5_insert",title:p({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(ti);if(!t.hasModel())return;const n=t.getOption(19),s=[],r=t.getSelections();for(const a of r)s.push(new Vl(a,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}te(nee);te(see);te(oee);te(ree);var aee=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Uh=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let wg=class b3{constructor(e,t,i,n,s,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._toDispose=new ee,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(l=>this._onContextMenu(l))),this._toDispose.add(this._editor.onMouseWheel(l=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=l.srcElement;d.shadowRoot&&Md(c)===d.shadowRoot||this._contextViewSer Line truncated
`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(r));break}continue}if(s===36){if(i++,i>=n)break;const r=o.charCodeAt(i);if(r===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(r===48||r===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=r&&r<=57){let a=r-48;if(i+1<n){const l=o.charCodeAt(i+1);if(48<=l&&l<=57){i++,a=a*10+(l-48),t.emitUnchanged(i-2),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}t.emitUnchanged(i-1),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}}return t.finalize()}const Ic=new ce("findWidgetVisible",!1);Ic.toNegated();const O1=new ce("findInputFocussed",!1),tN=new ce("replaceInputFocussed",!1),yb={primary:545,mac:{primary:2593}},Lb={primary:565,mac:{primary:2613}},Db={primary:560,mac:{primary:2608}},kb={primary:554,mac:{primary:2602}},xb={primary:558,mac:{primary:2606}},Dt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},Hl=19999,mee=240;class pp{constructor(e,t){this._toDispose=new ee,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new Is,this._decorations=new cn(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new ft(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,et(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||!this._editor.hasModel()||(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},mee)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;typeof t!="undefined"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new L(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const n=this._findMatches(i,!1,Hl);this._decorations.set(n,i);const s=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(s);if(r===0&&n.length>0){const a=fP(n.map(l=>l.range),l=>L.compareRangesUsingStarts(l,s)>=0);r=a>0?a-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(37).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new B(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}i Line truncated
`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return _A(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return bA(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(mA|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{nn&&Uo&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(p("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(pA,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return _A(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return bA(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new ZL(null,this._contextViewProvider,{width:Bee,label:Lee,placeholder:Dee,appendCaseSensitiveLabel:this._keybindingLabelFor(Dt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Dt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Dt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>hA(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),sn&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new jh({label:kee+this._keybindingLabelFor(Dt.PreviousMatchFindAction),icon:See,onTrigger:()=>{this._codeEditor.getAction(Dt.PreviousMatchFindAction).run().then(void 0,Ee)}})),this._nextBtn=this._register(new jh({label:xee+this._keybindingLabelFor(Dt.NextMatchFindAction),icon:yee,onTrigger:()=>{this._codeEditor.getAction(Dt.NextMatchFindAction).run().then(void 0,Ee)}}));const i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new h_({icon:vee,title:Iee+this._keybindingLabelFor(Dt.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new jh({label:Eee+this._keybindingLabelFor(Dt.CloseFindWidgetCommand),icon:b5,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new YL(null,void 0,{label:Nee,placeholder:Tee,appendPreserveCaseLabel:this._keybindingLabelFor(Dt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>hA(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._r Line truncated
.monaco-editor .find-widget .button:not(.disabled):hover,
.monaco-editor .find-widget .codicon-find-selection:hover {
background-color: ${u} !important;
}
`);const g=o.getColor(Hs);g&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${g}; }`)});var w3=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_r=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},th=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Vee=524288;function dD(o,e="single",t=!1){if(!o.hasModel())return null;const i=o.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=o.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(o.getModel().getValueLengthInRange(i)<Vee)return o.getModel().getValueInRange(i)}return null}let as=class S3 extends z{constructor(e,t,i,n){super(),this._editor=e,this._findWidgetVisible=Ic.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new $r(500),this._state=this._register(new _ee),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(s=>this._onStateChanged(s))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const s=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),s&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(37).loop})}))}get editor(){return this._editor}static get(e){return e.getContribution(S3.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!O1.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Ds(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return th(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const i=Object.assign(Object.assign({},t),{isRevealed:!0});if(e.seedSearchStringFromSelection== Line truncated
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:p("actions.find.wholeWordOverride",`Overrides "Match Whole Word" flag.
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:p("actions.find.matchCaseOverride",`Overrides "Math Case" flag.
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:p("actions.find.preserveCaseOverride",`Overrides "Preserve Case" flag.
The flag will not be saved for the future.
0: Do Nothing
1: True
2: False`)},findInSelection:{type:"boolean"}}}}]};class Uee extends he{constructor(){super({id:Dt.StartFindWithArgs,label:p("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:zee})}run(e,t,i){return th(this,void 0,void 0,function*(){const n=as.get(t);if(n){const s=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:i.replaceString!==void 0,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield n.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getState().searchString.length===0&&t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(i==null?void 0:i.findInSelection)||!1,loop:t.getOption(37).loop},s),n.setGlobalBufferTerm(n.getState().searchString)}})}}class $ee extends he{constructor(){super({id:Dt.StartFindWithSelection,label:p("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return th(this,void 0,void 0,function*(){const i=as.get(t);i&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),i.setGlobalBufferTerm(i.getState().searchString))})}}class y3 extends he{run(e,t){return th(this,void 0,void 0,function*(){const i=as.get(t);i&&!this._run(i)&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),this._run(i))})}}class jee extends y3{constructor(){super({id:Dt.NextMatchFindAction,label:p("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:T.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:re.and(T.focus,O1),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class Kee extends y3{constructor(){super({id:Dt.PreviousMatchFindAction,label:p("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:T.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:re.and(T.focus,O1),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class L3 extends he{run(e,t){return th(this,void 0,void 0,function*(){const i=as.get(t);if(!i)return;const n=t.getOption(37).seedSearchStringFromSelection==="selection";let s=null;t.getOption(37).seedSearchStringFromSelection!=="never"&&(s=dD(t,"single",n)),s&&i.setSearchString(s),this._run(i)||(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(37).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:n,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(37).loop}),this._run(i))})}}class qee extends L3{constructor(){super({id:Dt.NextSelectionMatchFindAction,label:p("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class Gee extends L3{constructor(){super({id:Dt.PreviousSelectionMatchFindAction,label:p("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:T.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const Zee=aP(new rP({id:Dt.StartFindReplaceAction,label:p("startReplace","Replace"),alias:"Replace",precondition:re.or(T.focus,re.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:A.MenubarEditMenu,group:"3_find",title:p({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Zee.addImplementation(0,(o,e,t)=>{if(!e.hasModel()||e.getOption(83))return!1;const i=as.get(e);if(!i)return!1;const n=e.getSelection(),s=i.isFindInputFocused(),r=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(37).seedSearchStringFromSelection!=="never"&&!s,a=s||r?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(37).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(37).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSea Line truncated
* 'levels': Number of levels to unfold. If not set, defaults to 1.
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
`,constraint:E3,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&n.direction==="up"?D3(t,!1,s,r):Zg(t,!1,s,r)}}class vte extends pn{constructor(){super({id:"editor.unfoldRecursively",label:p("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2137),weight:100}})}invoke(e,t,i,n){Zg(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class Cte extends pn{constructor(){super({id:"editor.fold",label:p("foldAction.label","Fold"),alias:"Fold",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
* 'levels': Number of levels to fold.
* 'direction': If 'up', folds given number of levels up otherwise folds down.
* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
`,constraint:E3,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),r=n&&n.levels,a=n&&n.direction;typeof r!="number"&&typeof a!="string"?Jee(t,!0,s):a==="up"?D3(t,!0,r||1,s):Zg(t,!0,r||1,s)}}class wte extends pn{constructor(){super({id:"editor.toggleFold",label:p("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);Qee(t,1,n)}}class Ste extends pn{constructor(){super({id:"editor.foldRecursively",label:p("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2135),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);Zg(t,!0,Number.MAX_VALUE,n)}}class yte extends pn{constructor(){super({id:"editor.foldAllBlockComments",label:p("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2133),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())nN(t,Zo.Comment.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+Ds(a.blockCommentStartToken));iN(t,l,!0)}}}}class Lte extends pn{constructor(){super({id:"editor.foldAllMarkerRegions",label:p("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())nN(t,Zo.Region.value,!0);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);iN(t,l,!0)}}}}class Dte extends pn{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:p("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())nN(t,Zo.Region.value,!1);else{const r=i.getModel();if(!r)return;const a=s.getLanguageConfiguration(r.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);iN(t,l,!1)}}}}class kte extends pn{constructor(){super({id:"editor.foldAllExcept",label:p("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2131),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);k3(t,!0,n)}}class xte extends pn{constructor(){super({id:"editor.unfoldAllExcept",label:p("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2129),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);k3(t,!1,n)}}class Ite extends pn{constructor(){super({id:"editor.foldAll",label:p("foldAllAction.label","Fold All"),alias:"Fold All",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2069),weight:100}})}invoke(e,t,i){Zg(t,!0)}}class Ete extends pn{constructor(){super({id:"editor.unfoldAll",label:p("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2088),weight:100}})}invoke(e,t,i){Zg(t,!1)}}class ih extends pn{getFoldingLevel(){return parseInt(this.id.substr(ih.ID_PREFIX.length))}invoke(e,t,i){ete(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}ih.ID_PREFIX="editor.foldLevel";ih.ID=o=>ih.ID_PREFIX+o;class Nte extends pn{constructor(){super({id:"editor.gotoParentFold",label:p("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=tte(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Tte extends pn{constructor(){super({id:"editor.gotoPreviousFold",label:p("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=ite(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Mte extends pn{constructor(){super({id:"editor.gotoNextFold",label:p("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:an,kbOpts:{kbExpr:T.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const s=nte(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}c Line truncated
.monaco-editor .cldr${nt.asCSSSelector(b_)},
.monaco-editor .cldr${nt.asCSSSelector(B1)},
.monaco-editor .cldr${nt.asCSSSelector(sN)},
.monaco-editor .cldr${nt.asCSSSelector(x3)} {
color: ${i} !important;
}
`)});class Fte extends he{constructor(){super({id:"editor.action.fontZoomIn",label:p("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){tl.setZoomLevel(tl.getZoomLevel()+1)}}class Bte extends he{constructor(){super({id:"editor.action.fontZoomOut",label:p("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){tl.setZoomLevel(tl.getZoomLevel()-1)}}class Wte extends he{constructor(){super({id:"editor.action.fontZoomReset",label:p("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){tl.setZoomLevel(0)}}te(Fte);te(Bte);te(Wte);class Lg{static _handleEolEdits(e,t){let i;const n=[];for(const s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=Lg._handleEolEdits(e,t);n.length===1&&Lg._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(s=>Pt.replace(L.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",n.map(s=>Pt.replaceMove(L.lift(s.range),s.text))),i&&e.pushUndoStop()}}class US{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var Qo=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function oN(o){if(o=o.filter(n=>n.range),!o.length)return;let{range:e}=o[0];for(let n=1;n<o.length;n++)e=L.plusRange(e,o[n].range);const{startLineNumber:t,endLineNumber:i}=e;t===i?o.length===1?un(p("hint11","Made 1 formatting edit on line {0}",t)):un(p("hintn1","Made {0} formatting edits on line {1}",o.length,t)):o.length===1?un(p("hint1n","Made 1 formatting edit between lines {0} and {1}",t,i)):un(p("hintnn","Made {0} formatting edits between lines {1} and {2}",o.length,t,i))}function N3(o,e,t){const i=[],n=new Set,s=o.ordered(t);for(const a of s)i.push(a),a.extensionId&&n.add(US.toKey(a.extensionId));const r=e.ordered(t);for(const a of r){if(a.extensionId){if(n.has(US.toKey(a.extensionId)))continue;n.add(US.toKey(a.extensionId))}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,d){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,d)}})}return i}class nh{static setFormatterSelector(e){return{dispose:nh._selectors.unshift(e)}}static select(e,t,i){return Qo(this,void 0,void 0,function*(){if(e.length===0)return;const n=Ue.first(nh._selectors);if(n)return yield n(e,t,i)})}}nh._selectors=new wn;function T3(o,e,t,i,n,s){return Qo(this,void 0,void 0,function*(){const r=o.get(Re),{documentRangeFormattingEditProvider:a}=o.get(ue),l=pc(e)?e.getModel():e,c=a.ordered(l),d=yield nh.select(c,l,i);d&&(n.report(d),yield r.invokeFunction(Vte,d,e,t,s))})}function Vte(o,e,t,i,n){return Qo(this,void 0,void 0,function*(){const s=o.get(Qs);let r,a;pc(t)?(r=t.getModel(),a=new Kd(t,5,void 0,n)):(r=t,a=new dE(t,n));const l=[];let c=0;for(const f of iI(i).sort(L.compareRangesUsingStarts))c>0&&L.areIntersectingOrTouching(l[c-1],f)?l[c-1]=L.fromPositions(l[c-1].getStartPosition(),f.getEndPosition()):c=l.push(f);const d=f=>Qo(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(r,f,r.getFormattingOptions(),a.token))||[]}),h=(f,_)=>{if(!f.length||!_.length)return!1;const b=f.reduce((v,C)=>L.plusRange(v,C.range),f[0].range);if(!_.some(v=>L.intersectRanges(b,v.range)))return!1;for(const v of f)for(const C of _)if(L.intersectRanges(v.range,C.range))return!0;return!1},u=[],g=[];try{for(const f of l){if(a.token.isCancellationRequested)return!0;g.push(yield d(f))}for(let f=0;f<l.length;++f)for(let _=f+1;_<l.length;++_){if(a.token.isCancellationRequested)return!0;if(h(g[f],g[_])){const b=L.plusRange(l[f],l[_]),v=yield d(b);l.splice(_,1),l.splice(f,1),l.push(b),g.splice(_,1),g.splice(f,1),g.push(v),f=0,_=0}}for(const f of g){if(a.token.isCancellationRequested)return!0;const _=yield s.computeMoreMinimalEdits(r.uri,f);_&&u.push(..._)}}finally{a.dispose()}if(u.length===0)return!1;if(pc(t))Lg.execute(t,u,!0),oN(u),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:f}]=u,_=new oe(f.startLineNumber,f.startColumn,f.endLineNumber,f.endColumn);r.pushEditOperations([_],u.map(b=>({text:b.text,range:L.lift(b.range),forceMoveMarkers:!0})),b=>{for(const{range:v}of b)if(L.areIntersectingOrTouching(v,_))return[new oe(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn)];return null})}return!0})}function Line truncated
`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}const eie=[];function tie(){return eie}class O3{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return Qte(i,this.parts.map(s=>({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(`
`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}}class gD{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class P3{constructor(e,t,i,n,s=0){this.lineNumber=e,this.columnStart=t,this.length=i,this.newLines=n,this.additionalReservedLineCount=s,this.parts=[new gD(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(e){return this.newLines.join(`
`)}}class F3 extends z{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new O,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(108)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}function $v(o,e){if(!e)return e;const t=o.getValueInRange(e.range),i=Pd(t,e.insertText),n=o.getOffsetAt(e.range.getStartPosition())+i,s=o.getPositionAt(n),r=t.substr(i),a=Np(r,e.insertText),l=o.getPositionAt(Math.max(n,o.getOffsetAt(e.range.getEndPosition())-a));return{range:L.fromPositions(s,l),insertText:e.insertText.substr(i,e.insertText.length-i-a),snippetInfo:e.snippetInfo,filterText:e.filterText,additionalTextEdits:e.additionalTextEdits}}function iie(o,e){return o===e?!0:!o||!e?!1:o.range.equalsRange(e.range)&&o.insertText===e.insertText&&o.command===e.command}function B3(o,e,t,i,n=0){if(o.range.startLineNumber!==o.range.endLineNumber)return;const s=e.getLineContent(o.range.startLineNumber),r=pt(s).length;if(o.range.startColumn-1<=r){const g=pt(o.insertText).length,f=s.substring(o.range.startColumn-1,r),_=L.fromPositions(o.range.getStartPosition().delta(0,f.length),o.range.getEndPosition()),b=o.insertText.startsWith(f)?o.insertText.substring(f.length):o.insertText.substring(g);o={range:_,insertText:b,command:o.command,snippetInfo:void 0,filterText:o.filterText,additionalTextEdits:o.additionalTextEdits}}const l=e.getValueInRange(o.range),c=nie(l,o.insertText);if(!c)return;const d=o.range.startLineNumber,h=new Array;if(t==="prefix"){const g=c.filter(f=>f.originalLength===0);if(g.length>1||g.length===1&&g[0].originalStart!==l.length)return}const u=o.insertText.length-n;for(const g of c){const f=o.range.startColumn+g.originalStart+g.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===o.range.startLineNumber&&f<i.column||g.originalLength>0)return;if(g.modifiedLength===0)continue;const _=g.modifiedStart+g.modifiedLength,b=Math.max(g.modifiedStart,Math.min(_,u)),v=o.insertText.substring(g.modifiedStart,b),C=o.insertText.substring(b,Math.max(g.modifiedStart,_));if(v.length>0){const w=Ur(v);h.push(new gD(f,w,!1))}if(C.length>0){const w=Ur(C);h.push(new gD(f,w,!0))}}return new O3(d,h,0)}let hr;function nie(o,e){if((hr==null?void 0:hr.originalValue)===o&&(hr==null?void 0:hr.newValue)===e)return hr==null?void 0:hr.changes;{let t=yA(o,e,!0);if(t){const i=SA(t);if(i>0){const n=yA(o,e,!1);n&&SA(n)<i&&(t=n)}}return hr={originalValue:o,newValue:e,changes:t},t}}function SA(o){let e=0;for(const t of o)e+=Math.max(t.originalLength-t.modifiedLength,0);return e}function yA(o,e,t){if(o.length>5e3||e.length>5e3)return;function i(c){let d=0;for(let h=0,u=c.length;h<u;h++){const g=c.charCodeAt(h);g>d&&(d=g)}return d}const n=Math.max(i(o),i(e));function s(c){if(c<0)throw new Error("unexpected");return n+c+1}function r(c){let d=0,h=0;const u=new Int32Array(c.length);for(let g=0,f=c.length;g<f;g++)if(t&&c[g]==="("){const _=h*100+d;u[g]=s(2*_),d++}else if(t&&c[g]===")"){d=Math.max(d-1,0);const _=h*100+d;u[g]=s(2*_+1),d===0&&h++}else u[g]=c.charCodeAt(g);return u}const a=r(o),l=r(e);return new kr({getElements:()=>a},{getElements:()=>l}).ComputeDiff(!1).changes}function sie(o,e){const t=new A4,i=new O4(t,c=>e.getLanguageConfiguration(c)),n=new R4(new oie([o]),i),s=tL(n,[],void 0,!0);let r="";const a=o.getLineContent();function l(c,d){if(c.kind===2)l(c.openingBracket,d),d=qt(d,c.openingBracket.length),c.child&&(l(c.child,d),d=qt(d,c.child.length)),c.closingBracket?(l(c.closingBracket,d),d=qt(d,c.closingBracket.length)):r+=i.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);else if(c.kind!==3){if(c.kind===0||c.kind===1)r+=a.substring(d,qt(d,c.length));else if(c.kind===4)for(const h of c.children)l(h,d),d=qt(d,h.length)}}return l(s,go),r}class oie{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var rie=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Ia=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let fD=class extends z{constructor(e,t,i,n,s,r,a){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurati Line truncated
`),0)}get currentCompletion(){const e=this.currentCachedCompletion;if(!!e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return Ia(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=Ti(r=>Ia(this,void 0,void 0,function*(){let a;try{a=yield V3(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},r,this.languageConfigurationService);const l=new Date;this.debounce.update(this.editor.getModel(),l.getTime()-i.getTime())}catch(l){Ee(l);return}r.isCancellationRequested||(this.cache.setValue(this.editor,a,e),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())})),s=new W3(n,e);this.updateOperation.value=s,yield n,this.updateOperation.value===s&&this.updateOperation.clear()})}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const t=this.currentCompletion;t&&this.commit(t)}commit(e){var t;const i=this.cache.clearAndLeak();e.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[Pt.replaceMove(e.range,""),...e.additionalTextEdits]),this.editor.setPosition(e.snippetInfo.range.getStartPosition()),(t=Mi.get(this.editor))===null||t===void 0||t.insert(e.snippetInfo.snippet)):this.editor.executeEdits("inlineSuggestion.accept",[Pt.replaceMove(e.range,e.insertText),...e.additionalTextEdits]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally(()=>{i==null||i.dispose()}).then(void 0,Ai):i==null||i.dispose(),this.onDidChangeEmitter.fire()}get commands(){var e;return[...new Set(((e=this.cache.value)===null||e===void 0?void 0:e.completions.map(i=>i.inlineCompletion.sourceInlineCompletions))||[])].flatMap(i=>i.commands||[])}}class W3{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class lie extends z{constructor(e,t,i,n){super(),this.editor=t,this.onChange=i,this.triggerKind=n,this.isDisposing=!1;const s=t.changeDecorations(r=>r.deltaDecorations([],e.items.map(a=>({range:a.range,options:{description:"inline-completion-tracking-range"}}))));this._register(ze(()=>{this.isDisposing=!0,t.removeDecorations(s)})),this.completions=e.items.map((r,a)=>new cie(r,s[a])),this._register(t.onDidChangeModelContent(()=>{this.updateRanges()})),this._register(e)}updateRanges(){if(this.isDisposing)return;let e=!1;const t=this.editor.getModel();for(const i of this.completions){const n=t.getDecorationRange(i.decorationId);if(!n){Ee(new Error("Decoration has no range"));continue}i.synchronizedRange.equalsRange(n)||(e=!0,i.synchronizedRange=n)}e&&this.onChange()}}class cie{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.insertText,abbreviation:this.inlineCompletion.filterText,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{insertText:this.inlineCompletion.insertText,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion,snippetInfo:this.inlineCompletion.snippetInfo,filterText:this.inlineCompletion.filterText,additionalTextEdits:this.inlineCompletion.additionalTextEdits}}}function V3(o,e,t,i,n=We.None,s){return Ia(this,void 0,void 0,function*(){const r=die(e,t),a=o.all(t),l=yield Promise.all(a.map(d=>Ia(this,void 0,void 0,function*(){const h=yield Promise.resolve(d.provideInlineCompletions(t,e,i,n)).catch(Ai);return{completions:h,provider:d,dispose:()=>{h&&d.freeInlineCompletions(h)}}}))),c=new Map;for(const d of l){const h=d.completions;if(!!h)for(const u of h.items){let g=u.range?L.lift(u.range):r;if(g.startLineNumber!==g.endLineNumber)continue;let f,_;if(typeof u.insertText=="string"){if(f=u.insertText,s&&u.completeBracketPairs){f=hie(f,g.getStartPosition(),t,s);const v=f.length-u.insertText.length;v!==0&&(g=new L(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+v))}_=void 0}else"snippet"in u.insertText?(f=new _c().parse(u.insertText.snippet).toString(),_={snippet:u.insertText.snippet,range:g}):wC(u.insertText);const b={insertText:f,snippetInfo:_,range:g,command:u.command,sourceProvider:d.provider,sourceInlineCompletions:h,sourceInlineCompletion:u,filterText:u.filterText||f,additionalTextEdits:u.additionalTextEdits||tie()};c.set(JSON.stringify({insertText:f,range:u.range}),b)}}return{items:[...c.values()],dispose:()=>{for(const d of l)d.dispose()}}})}function die(o,e){const t=e.getWordAtPosition(o),i=e.getLineMaxColumn(o.lineNumber);return t?new L(o.lineNumber,t.startColumn,o Line truncated
${m.symbolValue.cssSelector},${m.symbolEnum.cssSelector} { color: ${c}; }`);const d=o.getColor(Rie);d&&e.addRule(`${m.symbolEnumMember.cssSelector} { color: ${d}; }`);const h=o.getColor(Oie);h&&e.addRule(`${m.symbolEvent.cssSelector} { color: ${h}; }`);const u=o.getColor(Pie);u&&e.addRule(`${m.symbolField.cssSelector} { color: ${u}; }`);const g=o.getColor(Fie);g&&e.addRule(`${m.symbolFile.cssSelector} { color: ${g}; }`);const f=o.getColor(Bie);f&&e.addRule(`${m.symbolFolder.cssSelector} { color: ${f}; }`);const _=o.getColor(Wie);_&&e.addRule(`${m.symbolFunction.cssSelector} { color: ${_}; }`);const b=o.getColor(Vie);b&&e.addRule(`${m.symbolInterface.cssSelector} { color: ${b}; }`);const v=o.getColor(Hie);v&&e.addRule(`${m.symbolKey.cssSelector} { color: ${v}; }`);const C=o.getColor(zie);C&&e.addRule(`${m.symbolKeyword.cssSelector} { color: ${C}; }`);const w=o.getColor($ie);w&&e.addRule(`${m.symbolModule.cssSelector} { color: ${w}; }`);const S=o.getColor(jie);S&&e.addRule(`${m.symbolNamespace.cssSelector} { color: ${S}; }`);const k=o.getColor(Kie);k&&e.addRule(`${m.symbolNull.cssSelector} { color: ${k}; }`);const x=o.getColor(qie);x&&e.addRule(`${m.symbolNumber.cssSelector} { color: ${x}; }`);const y=o.getColor(Gie);y&&e.addRule(`${m.symbolObject.cssSelector} { color: ${y}; }`);const D=o.getColor(Zie);D&&e.addRule(`${m.symbolOperator.cssSelector} { color: ${D}; }`);const I=o.getColor(Yie);I&&e.addRule(`${m.symbolPackage.cssSelector} { color: ${I}; }`);const R=o.getColor(Xie);R&&e.addRule(`${m.symbolProperty.cssSelector} { color: ${R}; }`);const P=o.getColor(Qie);P&&e.addRule(`${m.symbolReference.cssSelector} { color: ${P}; }`);const H=o.getColor(Jie);H&&e.addRule(`${m.symbolSnippet.cssSelector} { color: ${H}; }`);const $=o.getColor(ene);$&&e.addRule(`${m.symbolString.cssSelector} { color: ${$}; }`);const ne=o.getColor(tne);ne&&e.addRule(`${m.symbolStruct.cssSelector} { color: ${ne}; }`);const ae=o.getColor(ine);ae&&e.addRule(`${m.symbolText.cssSelector} { color: ${ae}; }`);const de=o.getColor(nne);de&&e.addRule(`${m.symbolTypeParameter.cssSelector} { color: ${de}; }`);const we=o.getColor(sne);we&&e.addRule(`${m.symbolUnit.cssSelector} { color: ${we}; }`);const Se=o.getColor(one);Se&&e.addRule(`${m.symbolVariable.cssSelector} { color: ${Se}; }`)});class $3{constructor(){this._onDidWillResize=new O,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new O,this.onDidResize=this._onDidResize.event,this._sashListener=new ee,this._size=new bt(0,0),this._minSize=new bt(0,0),this._maxSize=new bt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Zi(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Zi(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Zi(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:pv.North}),this._southSash=new Zi(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:pv.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(pe.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(pe.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(pe.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(pe.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sash Line truncated
`,a+=`prefix: ${(i=e.word)!==null&&i!==void 0?i:"(no prefix)"}
`,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}
`,a+=`distance: ${e.distance} (localityBonus-setting)
`,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}
`,a+=`commit_chars: ${(n=e.completion.commitCharacters)===null||n===void 0?void 0:n.join("")}
`,r=new Rn().appendCodeblock("empty",a),s=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!cN(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),s){const a=s.length>1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=a,this._type.title=a,bs(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Ii(this._type),this._type.title="",An(this._type),this.domNode.classList.add("no-type");if(Ii(this._docs),typeof r=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),Ii(this._docs);const a=this._markdownRenderer.render(r);this._docs.appendChild(a.element),this._renderDisposeable.add(a),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new bt(e,t);bt.equals(i,this._size)||(this._size=i,dB(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};_D=rne([ane(1,Re)],_D);class lne{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new ee,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new $3,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,r=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(r=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+r})}a.done&&(i=void 0,n=void 0,s=0,r=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,(i=this._userSize)!==null&&i!==void 0?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const s=yC(document.body),r=this.widget.getLayoutInfo(),a=new bt(220,2*r.lineHeight),l=e.top,c=function(){const w=s.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),S=-r.borderWidth+e.left+e.width,k=new bt(w,s.height-e.top-r.borderHeight-r.verticalPadding),x=k.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:k,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),d=function(){const w=e.left-r.borderWidth-r.horizontalPadding,S=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),k=new bt(w,s.height-e.top-r.borderHeight-r.verticalPadding),x=k.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:l,left:S,fit:w-t.width,maxSizeTop:k,maxSizeBottom:x,minSize:a.with(Math.min(w,a.width))}}(),h=function(){const w=e.left,S=-r.borderWidth+e.top+e.height,k=new bt(e.width-r.borderHeight,s.height-e.top-e.height-r.verticalPadding);return{top:S,left:w,fit:k.height-t.height,maxSizeBottom:k,maxSizeTop:k,minSize:a.with(k.width)}}(),u=[c,d,h],g=(n=u.find(w=>w.fit>=0))!==null&&n!==void 0?n:u.sort((w,S)=>S.fit-w.fit)[0],f=e.top+e.height-r.borderHeight;let _,b=t.height;const v=Math.max(g.maxSizeTop.height,g.maxSizeBottom.height);b>v&&(b=v);let C;i?b<=g.maxSizeTop.height?(_=!0,C=g.maxSizeTop):(_=!1,C=g.maxSizeBottom):b<=g.maxSizeBottom.height?(_=!1,C=g.maxSizeBottom):(_=!0,C=g.maxSizeTop),this._applyTopLeft({left:g.left,top:_?g.top:f-b}),this. Line truncated
`);s===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new L(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":`
`):this._isCopyingDown?t.addEditOperation(new L(i.startLineNumber,1,i.startLineNumber,1),s+`
`):t.addEditOperation(new L(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),`
`+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=i.startLineNumber,s=i.startColumn,r=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,s=1),this._endLineNumberDelta!==0&&(r=r+this._endLineNumberDelta,a=1),i=oe.createWithDirection(n,s,r,a,this._selectionDirection)}return i}}var use=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gse=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let TD=class{constructor(e,t,i,n){this._languageConfigurationService=n,this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:s,indentSize:r,insertSpaces:a}=e.getOptions(),l=this.buildIndentConverter(s,r,a),c={tokenization:{getLineTokens:d=>e.tokenization.getLineTokens(d),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(d,h)=>e.getLanguageIdAtPosition(d,h)},getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){const d=n.startLineNumber,h=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(h)===1?t.addEditOperation(new L(1,1,1,1),null):(t.addEditOperation(new L(d,1,d,1),e.getLineContent(h)),t.addEditOperation(new L(h,1,h,e.getLineMaxColumn(h)),null)),n=new oe(h,1,h,1)}else{let d,h;if(this._isMovingDown){d=n.endLineNumber+1,h=e.getLineContent(d),t.addEditOperation(new L(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let u=h;if(this.shouldAutoIndent(e,n)){const g=this.matchEnterRule(e,l,s,d,n.startLineNumber-1);if(g!==null){const _=pt(e.getLineContent(d)),b=g+Kn(_,s);u=mp(b,s,a)+this.trimLeft(h)}else{c.getLineContent=b=>b===n.startLineNumber?e.getLineContent(d):e.getLineContent(b);const _=Qf(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber,l,this._languageConfigurationService);if(_!==null){const b=pt(e.getLineContent(d)),v=Kn(_,s),C=Kn(b,s);v!==C&&(u=mp(v,s,a)+this.trimLeft(h))}}t.addEditOperation(new L(n.startLineNumber,1,n.startLineNumber,1),u+`
`);const f=this.matchEnterRuleMovingDown(e,l,s,n.startLineNumber,d,u);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,f);else{c.getLineContent=b=>b===n.startLineNumber?u:b>=n.startLineNumber+1&&b<=n.endLineNumber+1?e.getLineContent(b-1):e.getLineContent(b);const _=Qf(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,l,this._languageConfigurationService);if(_!==null){const b=pt(e.getLineContent(n.startLineNumber)),v=Kn(_,s),C=Kn(b,s);if(v!==C){const w=v-C;this.getIndentEditsOfMovingBlock(e,t,n,s,a,w)}}}}else t.addEditOperation(new L(n.startLineNumber,1,n.startLineNumber,1),u+`
`)}else if(d=n.startLineNumber-1,h=e.getLineContent(d),t.addEditOperation(new L(d,1,d+1,1),null),t.addEditOperation(new L(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),`
`+h),this.shouldAutoIndent(e,n)){c.getLineContent=g=>g===d?e.getLineContent(n.startLineNumber):e.getLineContent(g);const u=this.matchEnterRule(e,l,s,n.startLineNumber,n.startLineNumber-2);if(u!==null)u!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,u);else{const g=Qf(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),d,l,this._languageConfigurationService);if(g!==null){const f=pt(e.getLineContent(n.startLineNumber)),_=Kn(g,s),b=Kn(f,s);if(_!==b){const v=_-b;this.getIndentEditsOfMovingBlock(e,t,n,s,a,v)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>Fs.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>Fs.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let r=s.indentation;s.indentAction===oi.None||s.indentAction===oi.Indent?r=s.indentation+s.appendText:s.indentAction===oi.IndentOutdent?r=s.indentation:s.indentAction===oi.Outdent&&(r=t.unshiftIndent(s.indentation)+s.appendText);const a=e.getLineContent(n);if(this.trimLeft(a).indexOf(this.trimLeft(r))>=0){const l=pt(e.getLineContent(n));let c=pt(r);const d=RP(e,n,this._languageConfigurationService);d!==null&&d&2&&(c=t.unshiftIndent(c));const h=Kn(c,i),u=Kn(l,i);return h-u}}return null}matchEnterRuleMovingDown(e,t,i,n,s,r){if(Fr(r)>=0){const a=e.getLineMaxColumn(s),l=Nu(this._autoIndent,e,new L(s,a,s,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}else{let a=n-1;for(;a>=1;){const d=e.getLineContent(a);if(Fr(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=Nu(this._autoIndent,e,new L(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}}matchEnterRule(e,t,i,n,s,r){let a=s;for(;a>=1;){let d;if(a===s&&r!==void 0?d=r:d=e.getLineContent(a),Fr(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=Nu(this._autoIndent,e,new L(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,i,n,s,r){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){const l=e.getLineContent(a),c=pt(l),h=Kn(c,n)+r,u=mp(h,n,s);u!==c&&(t.addEditOperation(new L(a,1,a,c.length+1),u),a===i.endLineNumber&&i.endColumn<=c.length+1&&u===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}};TD=use([gse(3,ti)],TD);class Jl{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return Jl._COLLATOR||(Jl._COLLATOR=new Intl.Collator),Jl._COLLATOR}getEditOperations(e,t){const i=fse(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(e===null)return!1;const n=i7(e,t,i);if(!n)return!1;for(let s=0,r=n.before.length;s<r;s++)if(n.before[s]!==n.after[s])return!0;return!1}}Jl._COLLATOR=null;function i7(o,e,t){const i=e.startLineNumber;let n=e.endLineNumber;if(e.endColumn===1&&n--,i>=n)return null;const s=[];for(let a=i;a<=n;a++)s.push(o.getLineContent(a));let r=s.slice(0);return r.sort(Jl.getCollator().compare),t===!0&&(r=r.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:r}}function fse(o,e,t){const i=i7(o,e,t);return i?Pt.replace(new L(i.startLineNumber,1,i.endLineNumber,o.getLineMaxColumn(i.endLineNumber)),i.after.join(`
`)):null}class n7 extends he{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((r,a)=>({selection:r,index:a,ignore:!1}));i.sort((r,a)=>L.compareRangesUsingStarts(r.selection,a.selection));let n=i[0];for(let r=1;r<i.length;r++){const a=i[r];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}const s=[];for(const r of i)s.push(new t7(r.selection,this.down,r.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class pse extends n7{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:p("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:A.MenubarSelectionMenu,group:"2_line",title:p({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class mse extends n7{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:p("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:A.MenubarSelectionMenu,group:"2_line",title:p({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class _se extends he{constructor(){super({id:"editor.action.duplicateSelection",label:p("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:T.writable,menuOpts:{menuId:A.MenubarSelectionMenu,group:"2_line",title:p({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],s=t.getSelections(),r=t.getModel();for(const a of s)if(a.isEmpty())n.push(new t7(a,!0));else{const l=new oe(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new lW(l,r.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class s7 extends he{constructor(e,t){super(t),this.down=e}run(e,t){const i=e.get(ti),n=[],s=t.getSelections()||[],r=t.getOption(9);for(const a of s)n.push(new TD(a,this.down,r,i));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class bse extends s7{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:p("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:A.MenubarSelectionMenu,group:"2_line",title:p({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class vse extends s7{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:p("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:A.MenubarSelectionMenu,group:"2_line",title:p({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class o7 extends he{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const s of i)if(!Jl.canRun(t.getModel(),s,this.descending))return;const n=[];for(let s=0,r=i.length;s<r;s++)n[s]=new Jl(i[s],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class Cse extends o7{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:p("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:T.writable})}}class wse extends o7{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:p("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:T.writable})}}class Sse extends he{constructor(){super({id:"editor.action.removeDuplicateLines",label:p("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:T.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;const n=[],s=[];let r=0;for(const a of t.getSelections()){const l=new Set,c=[];for(let g=a.startLineNumber;g<=a.endLineNumber;g++){const f=i.getLineContent(g);l.has(f)||(c.push(f),l.add(f))}const d=new oe(a.startLineNumber,1,a.endLineNumber,i.getLineMaxColumn(a.endLineNumber)),h=a.startLineNumber-r,u=new oe(h,1,h+c.length-1,c[c.length-1].length);n.push(Pt.replace(d,c.join(`
`))),s.push(u),r+=a.endLineNumber-a.startLineNumber+1-c.length}t.pushUndoStop(),t.executeEdits(this.id,n,s),t.pushUndoStop()}}class q1 extends he{constructor(){super({id:q1.ID,label:p("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:vi(2089,2102),weight:100}})}run(e,t,i){let n=[];i.reason==="auto-save"&&(n=(t.getSelections()||[]).map(a=>new B(a.positionLineNumber,a.positionColumn)));const s=t.getSelection();if(s===null)return;const r=new dse(s,n);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}}q1.ID="editor.action.trimTrailingWhitespace";class yse extends he{constructor(){super({id:"editor.action.deleteLines",label:p("lines.delete","Delete Line"),alias:"Delete Line",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s=0;const r=[],a=[];for(let l=0,c=i.length;l<c;l++){const d=i[l];let h=d.startLineNumber,u=d.endLineNumber,g=1,f=n.getLineMaxColumn(u);u<n.getLineCount()?(u+=1,f=1):h>1&&(h-=1,g=n.getLineMaxColumn(h)),r.push(Pt.replace(new oe(h,g,u,f),"")),a.push(new oe(h-s,d.positionColumn,h-s,d.positionColumn)),s+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,a),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(s=>{let r=s.endLineNumber;return s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(r-=1),{startLineNumber:s.startLineNumber,selectionStartColumn:s.selectionStartColumn,endLineNumber:r,positionColumn:s.positionColumn}});t.sort((s,r)=>s.startLineNumber===r.startLineNumber?s.endLineNumber-r.endLineNumber:s.startLineNumber-r.startLineNumber);const i=[];let n=t[0];for(let s=1;s<t.length;s++)n.endLineNumber+1>=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class Lse extends he{constructor(){super({id:"editor.action.indentLines",label:p("lines.indent","Indent Line"),alias:"Indent Line",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Ot.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class Dse extends he{constructor(){super({id:"editor.action.outdentLines",label:p("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2135,weight:100}})}run(e,t){Tu.Outdent.runEditorCommand(e,t,null)}}class kse extends he{constructor(){super({id:"editor.action.insertLineBefore",label:p("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Ot.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class xse extends he{constructor(){super({id:"editor.action.insertLineAfter",label:p("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:T.writable,kbOpts:{kbExpr:T.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Ot.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class r7 extends he{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let l=0,c=n.length-1;l<c;l++){const d=n[l],h=n[l+1];L.intersectRanges(d,h)===null?s.push(d):n[l+1]=L.plusRange(d,h)}s.push(n[n.length-1]);const r=this._getEndCursorState(i,s),a=s.map(l=>Pt.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,r),t.pushUndoStop()}}class Ise extends r7{constructor(){super({id:"deleteAllLeft",label:p("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:T.writable,kbOpts:{kbExpr:T.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach(r=>{let a;if(r.endColumn===1&&s>0){const l=r.startLineNumber-s;a=new oe(l,r.startColumn,l,r.startColumn)}else a=new oe(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn);s+=r.endLineNumber-r.startLineNumber,r.intersectRanges(e)?i=a:n.push(a)}),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let i=t;const n=e.getModel();return n===null?[]:(i.sort(L.compareRangesUsingStarts),i=i.map(s=>{if(s.isEmpty())if(s.startColumn===1){const r=Math.max(1,s.startLineNumber-1),a=s.startLineNumber===1?1:n.getLineContent(r).length+1;return new L(r,a,s.startLineNumber,1)}else return new L(s.startLineNumber,1,s.startLineNumber,s.startColumn);else return new L(s.startLineNumber,1,s.endLineNumber,s.endColumn)}),i)}}class Ese extends r7{constructor(){super({id:"deleteAllRight",label:p("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:T Line truncated
`);return new Em(e,t,n,c,s,r,d)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Ob(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new Ob(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return i?new oe(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Ob(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new Ob(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return i?new oe(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824)}}class rh extends z{constructor(e){super(),this._sessionDispose=this._register(new ee),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(rh.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=Em.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new oe(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){!e||(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(!!this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const n=e.getState().matchCase;if(!g7(this._editor.getModel(),t,n)){const r=this._editor.getModel(),a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(r,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex){const n=this._editor.getModel();i.searchScope?t=n.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(119):null,!1,10 Line truncated
`):void 0}:{range:L.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
`):void 0}})}provideRenameEdits(e,t){return Id(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return Id(this,void 0,void 0,function*(){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(`
`)};const r=yield s.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(p("no result","No result.")),n);return r})}}function moe(o,e,t,i){return Id(this,void 0,void 0,function*(){const n=new fN(e,t,o),s=yield n.resolveRenameLocation(We.None);return s!=null&&s.rejectReason?{edits:[],rejectReason:s.rejectReason}:n.provideRenameEdits(i,We.None)})}let dh=class v7{constructor(e,t,i,n,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new ee,this._cts=new gn,this._renameInputField=this._disposableStore.add(new ql(()=>this._disposableStore.add(this._instaService.createInstance(RD,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(v7.ID)}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var e,t;return Id(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const i=this.editor.getPosition(),n=new fN(this.editor.getModel(),i,this._languageFeaturesService.renameProvider);if(!n.hasProvider())return;this._cts=new Kd(this.editor,5);let s;try{const u=n.resolveRenameLocation(this._cts.token);this._progressService.showWhile(u,250),s=yield u}catch(u){(e=rs.get(this.editor))===null||e===void 0||e.showMessage(u||p("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),i);return}if(!s)return;if(s.rejectReason){(t=rs.get(this.editor))===null||t===void 0||t.showMessage(s.rejectReason,i);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new Kd(this.editor,5,s.range);const r=this.editor.getSelection();let a=0,l=s.text.length;!L.isEmpty(r)&&!L.spansMultipleLines(r)&&L.containsRange(s.range,r)&&(a=Math.max(0,r.startColumn-s.range.startColumn),l=Math.min(s.range.endColumn,r.endColumn)-s.range.startColumn);const c=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),d=yield this._renameInputField.value.getInput(s.range,s.text,a,l,c,this._cts.token);if(typeof d=="boolean"){d&&this.editor.focus();return}this.editor.focus();const h=aI(n.provideRenameEdits(d.newName,this._cts.token),this._cts.token).then(u=>Id(this,void 0,void 0,function*(){if(!(!u||!this.editor.hasModel())){if(u.rejectReason){this._notificationService.info(u.rejectReason);return}this.editor.setSelection(L.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply($g.convert(u),{editor:this.editor,showPreview:d.wantsPreview,label:p("label","Renaming '{0}' to '{1}'",s==null?void 0:s.text,d.newName),code:"undoredo.rename",quotableLabel:p("quotableLabel","Renaming {0} to {1}",s==null?void 0:s.text,d.newName),respectAutoSaveConfig:!0}).then(g=>{g.ariaSummary&&un(p("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",s.text,d.newName,g.ariaSummary))}).catch(g=>{this._notificationService.error(p("rename.failedApply","Rename failed to apply edits")),this._logService.error(g)})}}),u=>{this._notificationService.error(p("rename.failed","Rename failed to compute edits")),this._logService.error(u)});return this._progressService.showWhile(h,250),h})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};dh.ID="editor.contrib.renameController";dh=poe([zc(1,Re),zc(2,gi),zc(3,n_),zc(4,kc),zc(5,Co),zc(6,gN),zc(7,ue)],dh);class _oe extends he{constructor(){super({id:"editor.action.rename",label:p("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:re.and(T.writable,T.hasRenameProvider),kbOpts:{kbExpr:T.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(dt),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return me.isUri(n)&&B.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{!r||(r.setPosition(s),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},Ee):super.runCommand(e,t)}run(e,t){const i=dh.get(t);return i?i.run():Promise.resolve()}}rt(dh.ID,dh);te(_oe);const pN=ji.bindToContribution(dh.get);Q(new pN({id:"acceptRenameInput",precondition:Z1,handler:o=>o.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:T.focus,primary:3}}));Q(new pN({id:"acceptRenameInputWithPreview",precondition:re.and(Z1,re.has("config.editor.rename.enablePreview")),handler:o=>o.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:T.focus,primary:1024+3}}));Q(new pN({id:"cancelRenameInput",precondition:Z1,handler:o=>o.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:T.focus,primary:9,secondary:[1033]}}));Jr("_executeDocumentRenameProvider",function(o,e,t,...i){const[n]=i;gt(typeof n=="string");const{renameProvider:s}=o.get(ue);return mo Line truncated
`||o===" "}var Noe=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Toe=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Ck=class extends z{constructor(e,t,i={},n){var s;super(),this._link=t,this._enabled=!0,this.el=G(e,se("a.monaco-link",{tabIndex:(s=t.tabIndex)!==null&&s!==void 0?s:0,href:t.href,title:t.title},t.label)),this.el.setAttribute("role","button");const r=this._register(new _t(this.el,"click")),a=this._register(new _t(this.el,"keypress")),l=pe.chain(a.event).map(h=>new Mt(h)).filter(h=>h.keyCode===3).event,c=this._register(new _t(this.el,kt.Tap)).event;this._register(ut.addTarget(this.el));const d=pe.any(r.event,l,c);this._register(d(h=>{!this.enabled||(ct.stop(h,!0),i!=null&&i.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}};Ck=Noe([Toe(3,So)],Ck);Rt((o,e)=>{const t=o.getColor(qC);t&&e.addRule(`.monaco-link { color: ${t}; }`);const i=o.getColor(GC);i&&e.addRule(`.monaco-link:hover { color: ${i}; }`)});var y7=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},L7=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};const Moe=26;let wk=class extends z{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(Sk))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show(Object.assign(Object.assign({},e),{onClose:()=>{var t;this.hide(),(t=e.onClose)===null||t===void 0||t.call(e)}})),this._editor.setBanner(this.banner.element,Moe)}};wk=y7([L7(1,Re)],wk);let Sk=class extends z{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(sl,{}),this.element=se("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=se("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){Ii(this.element)}show(e){Ii(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=G(this.element,se("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(se(`div${nt.asCSSSelector(e.icon)}`));const n=G(this.element,se("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=G(this.element,se("div.message-actions-container")),e.actions)for(const r of e.actions)this._register(this.instantiationService.createInstance(Ck,this.messageActionsContainer,Object.assign(Object.assign({},r),{tabIndex:-1}),{}));const s=G(this.element,se("div.action-container"));this.actionBar=this._register(new qr(s)),this.actionBar.push(this._register(new is("banner.close","Close Banner",nt.asClassName(b5),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Sk=y7([L7(0,Re)],Sk);const D7=qe("workspaceTrustManagementService");var vN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$u=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},Yi=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const Aoe=fi("extensions-warning-message",m.warning,p("warningIcon","Icon shown with a warning message in the extension Line truncated
`?a=2:l===`
`&&(a=1);let c=Xi.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace!="undefined"&&(c=e.editor.trimAutoWhitespace==="false"?!1:Boolean(e.editor.trimAutoWhitespace));let d=Xi.detectIndentation;e.editor&&typeof e.editor.detectIndentation!="undefined"&&(d=e.editor.detectIndentation==="false"?!1:Boolean(e.editor.detectIndentation));let h=Xi.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations!="undefined"&&(h=e.editor.largeFileOptimizations==="false"?!1:Boolean(e.editor.largeFileOptimizations));let u=Xi.bracketPairColorizationOptions;return((i=e.editor)===null||i===void 0?void 0:i.bracketPairColorization)&&typeof e.editor.bracketPairColorization=="object"&&(u={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:r,detectIndentation:d,defaultEOL:a,trimAutoWhitespace:c,largeFileOptimizations:h,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:Os===3||Os===2?`
`:`\r
`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){let n=this._modelCreationOptionsByLanguageAndResource[e+t];if(!n){const s=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),r=this._getEOL(t,e);n=Gf._readModelOptions({editor:s,eol:r},i),this._modelCreationOptionsByLanguageAndResource[e+t]=n}return n}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i],r=this._models[s],a=r.model.getLanguageId(),l=r.model.uri,c=e[a+l],d=this.getCreationOptions(a,l,r.model.isForSimpleWidget);Gf._setModelOptionsForModel(r.model,d,c)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&e.getLineCount()===1&&e.setEOL(t.defaultEOL===1?0:1),!(i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&$s(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions))&&(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(vl(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(vl(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(vl(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),r=new il(e,t,s,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(vl(i))){const c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),h=UA(r)===c.sha1;if(h||c.sharesUndoRedoStack){for(const u of d.past)Da(u)&&u.matchesResource(i)&&u.setModel(r);for(const u of d.future)Da(u)&&u.matchesResource(i)&&u.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,u=>Da(u)&&u.matchesResource(i)),h&&(r._overwriteVersionId(c.versionId),r._overwriteAlternativeVersionId(c.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=vl(r.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new ire(r,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?(s=this._createModelData(e,t.languageId,i,n),this.setMode(s.model,t)):s=this._createModelData(e,Us,i,n),this._onModelAdded.fire(s.model),s.model}setMode(e,t){if(!t)return;const i=this._models[vl(e.uri)];!i||i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._models[s].model)}return e}getModel(e){const t=vl(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Ne.file||e.scheme===Ne.vscodeRemote||e.scheme===Ne.vscodeUserData||e.scheme===Ne.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const t=vl(e.uri),i=this._models[t],n=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let s=!1,r=0;if(n||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const l=this._undoRedoService.getElements(e.uri);if(l.past.length>0||l.future.length>0){for(const c of l.past)Da(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)Da(c)&&c.matchesResource(e.uri)&&(s=!0,r+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=Gf.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!n&&r>a){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>Da(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new sre(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,r,UA(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoServ Line truncated
`:e,l=a.length;let c=i.embeddedLanguageData,d=i.stack,h=0,u=null,g=!0;for(;g||h<l;){const f=h,_=d.depth,b=u?u.groups.length:0,v=d.state;let C=null,w=null,S=null,k=null,x=null;if(u){C=u.matches;const I=u.groups.shift();w=I.matched,S=I.action,k=u.rule,u.groups.length===0&&(u=null)}else{if(!g&&h>=l)break;g=!1;let I=this._lexer.tokenizer[v];if(!I&&(I=Fb(this._lexer,v),!I))throw Lt(this._lexer,"tokenizer state is not defined: "+v);const R=a.substr(h);for(const P of I)if((h===0||!P.matchOnlyAtLineStart)&&(C=R.match(P.regex),C)){w=C[0],S=P.action;break}}if(C||(C=[""],w=""),S||(h<l&&(C=[a.charAt(h)],w=C[0]),S=this._lexer.defaultToken),w===null)break;for(h+=w.length;Dae(S)&&rR(S)&&S.test;)S=S.test(w,C,v,h===l);let y=null;if(typeof S=="string"||Array.isArray(S))y=S;else if(S.group)y=S.group;else if(S.token!==null&&S.token!==void 0){if(S.tokenSubst?y=Tl(this._lexer,S.token,w,C,v):y=S.token,S.nextEmbedded)if(S.nextEmbedded==="@pop"){if(!c)throw Lt(this._lexer,"cannot pop embedded language if not inside one");c=null}else{if(c)throw Lt(this._lexer,"cannot enter embedded language from within an embedded language");x=Tl(this._lexer,S.nextEmbedded,w,C,v)}if(S.goBack&&(h=Math.max(0,h-S.goBack)),S.switchTo&&typeof S.switchTo=="string"){let I=Tl(this._lexer,S.switchTo,w,C,v);if(I[0]==="@"&&(I=I.substr(1)),Fb(this._lexer,I))d=d.switchTo(I);else throw Lt(this._lexer,"trying to switch to a state '"+I+"' that is undefined in rule: "+this._safeRuleName(k))}else{if(S.transform&&typeof S.transform=="function")throw Lt(this._lexer,"action.transform not supported");if(S.next)if(S.next==="@push"){if(d.depth>=this._lexer.maxStack)throw Lt(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(v)}else if(S.next==="@pop"){if(d.depth<=1)throw Lt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(k));d=d.pop()}else if(S.next==="@popall")d=d.popall();else{let I=Tl(this._lexer,S.next,w,C,v);if(I[0]==="@"&&(I=I.substr(1)),Fb(this._lexer,I))d=d.push(I);else throw Lt(this._lexer,"trying to set a next state '"+I+"' that is undefined in rule: "+this._safeRuleName(k))}}S.log&&typeof S.log=="string"&&kae(this._lexer,this._lexer.languageId+": "+Tl(this._lexer,S.log,w,C,v))}if(y===null)throw Lt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(k));const D=I=>{const R=this._languageService.getLanguageIdByLanguageName(I)||this._languageService.getLanguageIdByMimeType(I)||I,P=this._getNestedEmbeddedLanguageData(R);if(h<l){const H=e.substr(h);return this._nestedTokenize(H,t,Ml.create(d,P),n+h,s)}else return Ml.create(d,P)};if(Array.isArray(y)){if(u&&u.groups.length>0)throw Lt(this._lexer,"groups cannot be nested: "+this._safeRuleName(k));if(C.length!==y.length+1)throw Lt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(k));let I=0;for(let R=1;R<C.length;R++)I+=C[R].length;if(I!==w.length)throw Lt(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(k));u={rule:k,matches:C,groups:[]};for(let R=0;R<y.length;R++)u.groups[R]={action:y[R],matched:C[R+1]};h-=w.length;continue}else{if(y==="@rematch"&&(h-=w.length,w="",C=null,y="",x!==null))return D(x);if(w.length===0){if(l===0||_!==d.depth||v!==d.state||(u?u.groups.length:0)!==b)continue;throw Lt(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(k))}let I=null;if(j7(y)&&y.indexOf("@brackets")===0){const R=y.substr(9),P=Tae(this._lexer,w);if(!P)throw Lt(this._lexer,"@brackets token returned but no bracket defined as: "+w);I=aR(P.token+R)}else{const R=y===""?"":y+this._lexer.tokenPostfix;I=aR(R)}f<r&&s.emit(f+n,I)}if(x!==null)return D(x)}return Ml.create(d,c)}_getNestedEmbeddedLanguageData(e){if(!this._languageService.isRegisteredLanguageId(e))return new yu(e,Jp);e!==this._languageId&&(Jt.getOrCreate(e),this._embeddedLanguages[e]=!0);const t=Jt.get(e);return t?new yu(e,t.getInitialState()):new yu(e,Jp)}};Pm=Iae([Eae(4,ot)],Pm);function Tae(o,e){if(!e)return null;e=ic(o,e);const t=o.brackets;for(const i of t){if(i.open===e)return{token:i.token,bracketType:1};if(i.close===e)return{token:i.token,bracketType:-1}}return null}var Mae=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})},ty;const iy=(ty=window.trustedTypes)===null||ty===void 0?void 0:ty.createPolicy("standaloneColorizer",{createHTML:o=>o});class kN{static colorizeElement(e,t,i,n){n=n||{};const s=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(r)||r;e.setTheme(s);const l=i.firstChild?i.firstChild.nodeValue:"";i.className+=" " Line truncated
`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Hae{constructor(e,t,i,n,s,r,a){this.id=++Y7,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=r,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new uR),this.removedResources.has(t)||this.removedResources.set(t,new hR(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new uR),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new hR(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class X7{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(`
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new X4(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a<l;a++,n++){const c=this._past[a];i&&(n>=t||c.id!==e.elements[n])&&(i=!1,s=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,r=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),r!==-1&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class ny{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const Q7=new X7("","");Q7.locked=!0;let Wk=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);const t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join(`
`))}pushElement(e,t=gg.None,i=Lr.None){if(e.type===0){const n=Wb(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new Vb(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],r=[];for(const a of e.resources){const l=Wb(a),c=this.getUriComparisonKey(a);n.has(c)||(n.add(c),s.push(l),r.push(c))}s.length===1?this._pushElement(new Vb(e,s[0],r[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new Hae(e,s,r,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const n=e.resourceLabels[t],s=e.strResources[t];let r;this._editStacks.has(s)?r=this._editStacks.get(s):(r=new X7(n,s),this._editStacks.set(s,r)),r.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);if(i.hasFutureElements())return null;const n=i.getClosestPastElement();return n?n.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const r=Wb(s.resource),a=this.getUriComparisonKey(s.resource),l=new Vb(s,r,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const r=Wb(s.resource),a=this.getUriComparisonKey(s.resource),l=new Vb(s,r,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitFutureWorkspaceElement(e,n)}}removeElements(e){const t=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new X4(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),!i.hasPastElements()&&!i.hasFutureElements()&&(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const r=s.getClosestPastElement();!r||r.sourceId===e&&(!t||r.sourceOrder>t.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof Lr){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){Ee(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const r=this._acquireLocks(i);let a;try{a=t()}catch(l){return r(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(r(),n.dispose(),s()),l=>(r(),n.dispose(),this._onError(l,e))):(r(),n.dispose(),s())}_invokeWorkspacePrepare(e){return Bb(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo=="undefined")return z.None;const t=e.actual.prepareUndoRedo();return typeof t=="undefined"?z.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo=="undefined")return t(z.None);const i=e.actual.prepareUndoRedo();return i?xx(i)?t(i):i.then(n=>t(n)):t(z.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Q7);return new ny(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Hb(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new Hb}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,p({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,p({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because chang Line truncated
:host {
all: initial; /* 1st rule so subsequent properties are reset. */
}
@font-face {
font-family: "codicon";
font-display: block;
src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");
}
.codicon[class*='codicon-'] {
font: normal normal normal 16px/1 codicon;
display: inline-block;
text-decoration: none;
text-rendering: auto;
text-align: center;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
:host {
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
}
:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }
:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
`;var qae=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gae=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Hk=class extends z{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=z.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new Ng(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?(t!==this.container||this.shadowRoot!==i)&&(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=i,this.contextView.show(e);const n=ze(()=>{this.currentViewDisposable===n&&this.hideContextView()});return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};Hk=qae([Gae(0,tf)],Hk);var mR=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};const zb="**",_R="/",C0="[/\\\\]",w0="[^/\\\\]",Zae=/\//g;function bR(o,e){switch(o){case 0:return"";case 1:return`${w0}*?`;default:return`(?:${C0}|${w0}+${C0}${e?`|${C0}${w0}+`:""})*?`}}function vR(o,e){if(!o)return[];const t=[];let i=!1,n=!1,s="";for(const r of o){switch(r){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=r}return s&&t.push(s),t}function J7(o){if(!o)return"";let e="";const t=vR(o,_R);if(t.every(i=>i===zb))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===zb){if(i)return;e+=bR(2,s===t.length-1)}else{let r=!1,a="",l=!1,c="";for(const d of n){if(d!=="}"&&r){a+=d;continue}if(l&&(d!=="]"||!c)){let h;d==="-"?h=d:(d==="^"||d==="!")&&!c?h="^":d===_R?h="":h=Ds(d),c+=h;continue}switch(d){case"{":r=!0;continue;case"[":l=!0;continue;case"}":{e+=`(?:${vR(a,",").map(g=>J7(g)).join("|")})`,r=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=w0;continue;case"*":e+=bR(1);continue;default:e+=Ds(d)}}s<t.length-1&&(t[s+1]!==zb||s+2<t.length)&&(e+=C0)}i=n===zb})}return e}const Yae=/^\*\*\/\*\.[\w\.-]+$/,Xae=/^\*\*\/([\w\.-]+)\/?$/,Qae=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,Jae=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,ele=/^\*\*((\/[\w\.-]+)+)\/?$/,tle=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,CR=new bh(1e4),wR=function(){return!1},Vr=function(){return null};function xN(o,e){if(!o)return Vr;let t;typeof o!="string"?t=o.pattern:t=o,t=t.trim();const i=`${t}_${!!e.trimForExclusions}`;let n=CR.get(i);if(n)return SR(n,o);let s;return Yae.test(t)?n=ile(t.substr(4),t):(s=Xae.exec(sy(t,e)))?n=nle(s[1],t):(e.trimForExclusions?Jae:Qae).test(t)?n=sle(t,e):(s=ele.exec(sy(t,e)))?n=yR(s[1].substr(1),t,!0):(s=tle.exec(sy(t,e)))?n=yR(s[1],t,!1):n=ole(t),CR.set(i,n),SR(n,o)}function SR(o,e){if(typeof e=="string")return o;const t=function(i,n){return sL(i,e.base,!sn)?o(i.substr(e.base.length+1),n):null};return t.allBasenames=o.allBasenames,t.allPaths=o.allPaths,t.basenames=o.basenames,t.patterns=o.patterns,t}function sy(o,e){return e.trimForExclusions&&o.endsWith("/**")?o.substr(0,o.length-2):o}function ile(o,e){return function(t,i){return typeof t=="string"&&t.endsWith(o)?e:null}}function nle(o,e){const t=`/${o}`,i=`\\${o}`,n=function(r,a){return typeof r!="string"?null:a?a===o?e:null:r===o||r.endsWith(t)||r.endsWith(i)?e:null},s=[o];return n.basenames=s,n.patterns=[e],n.allBasenames=s,n}function sle(o,e){const t=t9(o.slice(1,-1).split(",").map(a=>xN(a,e)).filter(a=>a!==Vr),o),i=t.length;if(!i)return Vr;if(i===1)return t[0];const n=function(a,l){for(let c=0,d=t.length;c<d;c++)if(t[c](a,l))return o;return null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const r=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return r.length&&(n.allPaths=r),n}function yR(o,e,t){const i=md===ai.sep,n=i?o:o.replace(Zae,md),s=md+n,r=ai.sep+o;let a;return t?a=function(l,c){return typeof l=="string"&&(l===n||l.endsWith(s)||!i&&(l===o||l.endsWith(r)))?e:null}:a=function(l,c){return typeof l=="string"&&(l===n||!i&&l===o)?e:null},a.allPaths=[(t?"*/":"./")+o],a}function ole(o){try{const e=new RegExp(`^${J7(o)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?o:null}}catch(e){return Vr}}function rle(o,e,t Line truncated
.monaco-menu {
font-size: 13px;
border-radius: 5px;
min-width: 160px;
}
${kA(m.menuSelection)}
${kA(m.menuSubmenu)}
.monaco-menu .monaco-action-bar {
text-align: right;
overflow: hidden;
white-space: nowrap;
}
.monaco-menu .monaco-action-bar .actions-container {
display: flex;
margin: 0 auto;
padding: 0;
width: 100%;
justify-content: flex-end;
}
.monaco-menu .monaco-action-bar.vertical .actions-container {
display: inline-block;
}
.monaco-menu .monaco-action-bar.reverse .actions-container {
flex-direction: row-reverse;
}
.monaco-menu .monaco-action-bar .action-item {
cursor: pointer;
display: inline-block;
transition: transform 50ms ease;
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
}
.monaco-menu .monaco-action-bar .action-item.disabled {
cursor: default;
}
.monaco-menu .monaco-action-bar.animated .action-item.active {
transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */
}
.monaco-menu .monaco-action-bar .action-item .icon,
.monaco-menu .monaco-action-bar .action-item .codicon {
display: inline-block;
}
.monaco-menu .monaco-action-bar .action-item .codicon {
display: flex;
align-items: center;
}
.monaco-menu .monaco-action-bar .action-label {
font-size: 11px;
margin-right: 4px;
}
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
color: var(--vscode-disabledForeground);
}
/* Vertical actions */
.monaco-menu .monaco-action-bar.vertical {
text-align: left;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
display: block;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
display: block;
border-bottom: 1px solid var(--vscode-menu-separatorBackground);
padding-top: 1px;
padding: 30px;
}
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
margin-left: 6px;
}
/* Action Items */
.monaco-menu .monaco-action-bar .action-item.select-container {
overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
flex: 1;
max-width: 170px;
min-width: 60px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}
.monaco-menu .monaco-action-bar.vertical {
margin-left: 0;
overflow: visible;
}
.monaco-menu .monaco-action-bar.vertical .actions-container {
display: block;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
padding: 0;
transform: none;
display: flex;
}
.monaco-menu .monaco-action-bar.vertical .action-item.active {
transform: none;
}
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
flex: 1 1 auto;
display: flex;
height: 2em;
align-items: center;
position: relative;
}
.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,
.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {
opacity: unset;
}
.monaco-menu .monaco-action-bar.vertical .action-label {
flex: 1 1 auto;
text-decoration: none;
padding: 0 1em;
background: none;
font-size: 12px;
line-height: 1;
}
.monaco-menu .monaco-action-bar.vertical .keybinding,
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
display: inline-block;
flex: 2 1 auto;
padding: 0 1em;
text-align: right;
font-size: 12px;
line-height: 1;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
height: 100%;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
font-size: 16px !important;
display: flex;
align-items: center;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
margin-left: auto;
margin-right: -20px;
}
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
opacity: 0.4;
}
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
display: inline-block;
box-sizing: border-box;
margin: 0;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
position: static;
overflow: visible;
}
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
position: absolute;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
width: 100%;
height: 0px !important;
opacity: 1;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
padding: 0.7em 1em 0.1em 1em;
font-weight: bold;
opacity: 1;
}
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
color: inherit;
}
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
position: absolute;
visibility: hidden;
width: 1em;
height: 100%;
}
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
visibility: visible;
display: flex;
align-items: center;
justify-content: center;
}
/* Context Menu */
.context-view.monaco-menu-container {
outline: 0;
border: none;
animation: fadeIn 0.083s linear;
-webkit-app-region: no-drag;
}
.context-view.monaco-menu-container :focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
outline: 0;
}
.hc-black .context-view.monaco-menu-container,
.hc-light .context-view.monaco-menu-container,
:host-context(.hc-black) .context-view.monaco-menu-container,
:host-context(.hc-light) .context-view.monaco-menu-container {
box-shadow: none;
}
.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,
.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,
:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
background: none;
}
/* Vertical Action Bar Styles */
.monaco-menu .monaco-action-bar.vertical {
padding: .6em 0;
}
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
height: 2em;
}
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
.monaco-menu .monaco-action-bar.vertical .keybinding {
font-size: inherit;
padding: 0 2em;
}
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
font-size: inherit;
width: 2em;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
font-size: inherit;
margin: 5px 0 !important;
padding: 0;
border-radius: 0;
}
.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
margin-left: 0;
margin-right: 0;
}
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
font-size: 60%;
padding: 0 1.8em;
}
.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
height: 100%;
mask-size: 10px 10px;
-webkit-mask-size: 10px 10px;
}
.monaco-menu .action-item {
cursor: default;
}`;if(e){t+=`
/* Arrows */
.monaco-scrollable-element > .scrollbar > .scra {
cursor: pointer;
font-size: 11px !important;
}
.monaco-scrollable-element > .visible {
opacity: 1;
/* Background rule added for IE9 - to allow clicks on dom node */
background:rgba(0,0,0,0);
transition: opacity 100ms linear;
}
.monaco-scrollable-element > .invisible {
opacity: 0;
pointer-events: none;
}
.monaco-scrollable-element > .invisible.fade {
transition: opacity 800ms linear;
}
/* Scrollable Content Inset Shadow */
.monaco-scrollable-element > .shadow {
position: absolute;
display: none;
}
.monaco-scrollable-element > .shadow.top {
display: block;
top: 0;
left: 3px;
height: 3px;
width: 100%;
}
.monaco-scrollable-element > .shadow.left {
display: block;
top: 3px;
left: 0;
height: 100%;
width: 3px;
}
.monaco-scrollable-element > .shadow.top-left-corner {
display: block;
top: 0;
left: 0;
height: 3px;
width: 3px;
}
`;const i=o.scrollbarShadow;i&&(t+=`
.monaco-scrollable-element > .shadow.top {
box-shadow: ${i} 0 6px 6px -6px inset;
}
.monaco-scrollable-element > .shadow.left {
box-shadow: ${i} 6px 0 6px -6px inset;
}
.monaco-scrollable-element > .shadow.top.left {
box-shadow: ${i} 6px 6px 6px -6px inset;
}
`);const n=o.scrollbarSliderBackground;n&&(t+=`
.monaco-scrollable-element > .scrollbar > .slider {
background: ${n};
}
`);const s=o.scrollbarSliderHoverBackground;s&&(t+=`
.monaco-scrollable-element > .scrollbar > .slider:hover {
background: ${s};
}
`);const r=o.scrollbarSliderActiveBackground;r&&(t+=`
.monaco-scrollable-element > .scrollbar > .slider.active {
background: ${r};
}
`)}return t}class vle{constructor(e,t,i,n,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=s,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i;const n=zO(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{const r=e.getMenuClassName?e.getMenuClassName():"";r&&(s.className+=" "+r),this.options.blockMouse&&(this.block=s.appendChild(se(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",q(this.block,le.MOUSE_DOWN,c=>c.stopPropagation()));const a=new ee,l=e.actionRunner||new Ju;return l.onBeforeRun(this.onActionRun,this,a),l.onDidRun(this.onDidActionRun,this,a),i=new Ku(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)}),a.add(IQ(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a),a.add(q(window,le.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(q(window,le.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;const d=new Ir(c);let h=d.target;if(!d.rightButton){for(;h;){if(h===s)return;h=h.parentElement}this.contextViewService.hideContextView(!0)}})),Pr(a,i)},focus:()=>{i==null||i.focus(!!e.autoSelectFirstItem)},onHide:s=>{var r;(r=e.onHide)===null||r===void 0||r.call(e,!!s),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!ol(e.error)&&this.notificationService.error(e.error)}}var Cle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let $k=class extends z{constructor(e,t,i,n,s){super(),this._onDidShowContextMenu=new O,this._onDidHideContextMenu=new O,this.contextMenuHandler=new vle(i,e,t,n,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{var i;(i=e.onHide)===null||i===void 0||i.call(e,t),this._onDidHideContextMenu.fire()}})),Rl.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};$k=Cle([Nf(0,rl),Nf(1,gi),Nf(2,Ch),Nf(3,rn),Nf(4,vt)],$k);var rC;(function(o){o[o.API=0]="API",o[o.USER=1]="USER"})(rC||(rC={}));var EN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},aC=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}},id=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};let jk=class{constructor(e){this._commandService=e}open(e,t){return id(this,void 0,void 0,function*(){if(!vE(e,Ne.command))return!1;if(!(t!=null&&t.allowCommands))return!0;typeof e=="string"&&(e=me.parse(e));let i=[];try{i=Ov(decodeURIComponent(e.query))}catch(n){try{i=Ov(e.query)}catch(s){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0})}};jk=EN([aC(0,Ci)],jk);let Kk=class{constructor(e){this._editorService=e}open(e,t){return id(this,void 0,void 0,function*(){typeof e=="string"&&(e=me.parse(e));const{selection:i,uri:n}=Q5(e);return e=n,e.scheme===Ne.file&&(e=DK(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,source:t!=null&&t.fromUserGesture?rC.USER:rC.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEdit Line truncated
`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}rw.MAX_WIDTH=600;var Xk;(function(o){o[o.PRESERVE=0]="PRESERVE",o[o.LAST=1]="LAST"})(Xk||(Xk={}));const s9={Quickaccess:"workbench.contributions.quickaccess"};class Fle{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),ze(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return BC([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}di.add(s9.Quickaccess,new Fle);var Ble=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},PR=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Qk=class extends z{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=di.as(s9.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[s,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&r&&l===r){e!==r.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,r,i);return}if(r&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==r){const f=a.value.substr(l.prefix.length);f&&(g=`${r.prefix}${f}`)}if(!g){const f=s==null?void 0:s.defaultFilterValue;f===Xk.LAST?g=this.lastAcceptedPickerValues.get(r):typeof f=="string"&&(g=`${r.prefix}${f}`)}typeof g=="string"&&(e=g)}const c=new ee,d=c.add(this.quickInputService.createQuickPick());d.value=e,this.adjustValueSelection(d,r,i),d.placeholder=r==null?void 0:r.placeholder,d.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||(i==null?void 0:i.quickNavigateConfiguration))&&(d.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:Eo.SECOND),d.contextKey=r==null?void 0:r.contextKey,d.filterValue=g=>g.substring(r?r.prefix.length:0),r!=null&&r.placeholder&&(d.ariaLabel=r==null?void 0:r.placeholder);let h;t&&(h=new jP,c.add(nc(d.onWillAccept)(g=>{g.veto(),d.hide()}))),c.add(this.registerPickerListeners(d,s,r,e));const u=c.add(new gn);if(s&&c.add(s.provide(d,u.token)),nc(d.onDidHide)(()=>{d.selectedItems.length===0&&u.cancel(),c.dispose(),h==null||h.complete(d.selectedItems.slice(0))}),d.show(),t)return h==null?void 0:h.p}adjustValueSelection(e,t,i){var n;let s;i!=null&&i.preserveValue?s=[e.value.length,e.value.length]:s=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n){const s=new ee,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add(ze(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):r.value=a})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),s}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};Qk=Ble([PR(0,c_),PR(1,Re)],Qk);var Wle=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tf=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Jk=class extends KB{constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=s,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Qk))),this._quickAccess}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey: Line truncated
`)}const Zle={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[bi]:"#FFFFFE",[ws]:"#000000",[_I]:"#E5EBF1",[Xm]:"#D3D3D3",[Qm]:"#939393",[bI]:"#ADD6FF4D"}},Yle={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[bi]:"#1E1E1E",[ws]:"#D4D4D4",[_I]:"#3A3D41",[Xm]:"#404040",[Qm]:"#707070",[bI]:"#ADD6FF26"}},Xle={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"m Line truncated
`)}}}class a9{getIcon(e){const t=p5();let i=e.defaults;for(;nt.isThemeIcon(i);){const n=t.getIcon(i.id);if(!n)return;i=n.defaults}return i}}const Al="vs",Sp="vs-dark",qu="hc-black",Gu="hc-light",l9=di.as(qP.ColorContribution),ece=di.as(tP.ThemingContribution);class c9{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(S0(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,W.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=ix(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,W.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=l9.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Al:return Vs.LIGHT;case qu:return Vs.HIGH_CONTRAST_DARK;case Gu:return Vs.HIGH_CONTRAST_LIGHT;default:return Vs.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const s=ix(this.themeData.base);e=s.rules,s.encodedTokensColors&&(t=s.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const s={token:""};i&&(s.foreground=i),n&&(s.background=n),e.push(s)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=r9.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,r=Yn.getForeground(s),a=Yn.getFontStyle(s);return{foreground:r,italic:Boolean(a&1),bold:Boolean(a&2),underline:Boolean(a&4),strikethrough:Boolean(a&8)}}}function S0(o){return o===Al||o===Sp||o===qu||o===Gu}function ix(o){switch(o){case Al:return Zle;case Sp:return Yle;case qu:return Xle;case Gu:return Qle}}function Kb(o){const e=ix(o);return new c9(o,e)}class tce extends z{constructor(){super(),this._onColorThemeChange=this._register(new O),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new O),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new a9,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Al,Kb(Al)),this._knownThemes.set(Sp,Kb(Sp)),this._knownThemes.set(qu,Kb(qu)),this._knownThemes.set(Gu,Kb(Gu));const e=Jle(this);this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Al),this._onOSSchemeChanged(),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),Mx("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return Dp(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=qs(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),z.None}_registerShadowDomContainer(e){const t=qs(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===t){this._styleElements.splice(i,1);return}}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!S0(t.base)&&!S0(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new c9(e,t)),S0(e)&&this._knownThemes.forEach(i=>{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Al),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=window.matchMedia("(forced-colors: active)").matches;if(e!==yn(this._theme.type)){let t;Xx(this._theme.type)?t=e?qu:Sp:t=e?Gu:Al,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:r=>{t[r]||(e.push(r),t[r]=!0)}};ece.getThemingParticipants().forEach(r=>r(this._theme,i,this._environment));const n=[];for(const r of l9.getColors()){const a=this._theme.getColor(r.id,!0);a&&n.push(`${KP(r.id)}: ${a.toString()};`)}i.addRule(`.monaco-editor { ${n.join(`
`)} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(Gle(s)),this._themeCSS=e.join(`
`),this._updateCSS(),Jt.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}const yo=qe("themeService");var ice=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dy=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let nx=class extends z{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new O,this._onDidChangeReducedMotion=new O,this._accessibilityModeEnabledContext=Km.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(r=>{r.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),r.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),n(),this._register(this.onDidChangeScreenReaderOptimized(()=>n()));const s=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(s)}initReducedMotionListeners(e){if(!this._layoutService.hasContainer)return;this._register(q(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};nx=ice([dy(0,xe),dy(1,tf),dy(2,ot)],nx);var RN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zu=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let sx=class{constructor(e,t){this._commandService=e,this._hiddenStates=new lC(t)}createMenu(e,t,i){return new ox(e,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};sx=RN([Zu(0,Ci),Zu(1,ia)],sx);let lC=class Zf{constructor(e){this._storageService=e,this._disposables=new ee,this._onDidChange=new O,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1;try{const t=e.get(Zf._key,0,"{}");this._data=JSON.parse(t)}catch(t){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(t=>{if(t.key===Zf._key){if(!this._ignoreChangeEvent)try{const i=e.get(Zf._key,0,"{}");this._data=JSON.parse(i)}catch(i){console.log("FAILED to read storage after UPDATE",i)}this._onDidChange.fire()}}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}isHidden(e,t){var i,n;return(n=(i=this._data[e.id])===null||i===void 0?void 0:i.includes(t))!==null&&n!==void 0?n:!1}updateHidden(e,t,i){const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const s=n.indexOf(t);s>=0&&pW(n,s),n.length===0&&delete this._data[e.id]}this._persist()}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(Zf._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};lC._key="menu.hiddenCommands";lC=RN([Zu(0,ia)],lC);let ox=class nu{constructor(e,t,i,n,s,r){this._id=e,this._hiddenStates=t,this._options=i,this._commandService=n,this._contextKeyService=s,this._menuService=r,this._disposables=new ee,this._menuGroups=[],this._contextKeys=new Set,this._build();const a=new ft(()=>{this._build(),this._onDidChange.fire(this)},i.eventDebounceDelay);this._disposables.add(a),this._disposables.add(po.onDidChangeMenu(d=>{d.has(e)&&a.schedule()}));const l=this._disposa Line truncated
`)}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}class VR extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph:
${e.toString()}`}}class PN{constructor(e=new c1,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(Re,this)}createChild(e){return new PN(e,this._strict,this)}invokeFunction(e,...t){const i=co.traceInvocation(e);let n=!1;try{return e({get:r=>{if(n)throw M8("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(r,i);if(!a)throw new Error(`[invokeFunction] unknown service '${r}'`);return a}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof vr?(i=co.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=co.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=Po.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(const a of n){const l=this._getOrCreateServiceInstance(a.id,i);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),s.push(l)}const r=n.length>0?n[0].index:t.length;if(t.length!==r){console.trace(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);const a=r-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,r)}return new e(...t,...s)}_setServiceInstance(e,t){if(this._services.get(e)instanceof vr)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){const i=this._getServiceInstanceOrDescriptor(e);return i instanceof vr?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new pce(a=>a.id.toString());let s=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const a=r.pop();if(n.lookupOrInsertNode(a),s++>1e3)throw new VR(n);for(const l of Po.getServiceDependencies(a.desc.ctor)){const c=this._getServiceInstanceOrDescriptor(l.id);if(c||this._throwIfStrict(`[createInstance] ${e} depends on ${l.id} which is NOT registered.`,!0),c instanceof vr){const d={id:l.id,desc:c,_trace:a._trace.branch(l.id,!0)};n.insertEdge(a,d),r.push(d)}}}for(;;){const a=n.roots();if(a.length===0){if(!n.isEmpty())throw new VR(n);break}for(const{data:l}of a){if(this._getServiceInstanceOrDescriptor(l.id)instanceof vr){const d=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,d)}n.removeNode(l)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof vr)return this._createServiceInstance(t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i){const s=new ql(()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get(r,a){if(a in r)return r[a];const l=s.value;let c=l[a];return typeof c!="function"||(c=c.bind(l),r[a]=c),c},set(r,a,l){return s.value[a]=l,!0}})}else return this._createInstance(e,t,n)}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class co{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return co._None}static traceCreation(e){return co._None}branch(e,t){const i=new co(2,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;co._totals+=e;let t=!1;function i(s,r){const a=[],l=new Array(s+1).join(" ");for(const[c,d,h]of r._dep)if(d&&h){t=!0,a.push(`${l}CREATES -> ${c}`);const u=i(s+1,h);u&&a.push(u)}else a.push(`${l}uses -> ${c}`);return a.join(`
`)}const n=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${co._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join(`
`))}}co._None=new class extends co{constructor(){super(-1,null)}stop(){}branch(){return this}};co._totals=0;class mce{constructor(){this._byResource=new hn,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new hn,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){const i=this._byResource.get(e);return i==null?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return typeof e=="string"?(i=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&i!==void 0?i:Ue.empty():me.isUri(e)?(s=(n=this._byResource.get(e))===null||n===void 0?void 0:n.values())!==null&&s!==void 0?s:Ue.empty():Ue.map(Ue.concat(...this._byOwner.values()),r=>r[1])}}class _ce{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new hn,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===Ne.inMemory||e.scheme===Ne.walkThrough||e.scheme===Ne.walkThroughSnippet||e.scheme===Ne.vscodeSourceControl)return t;for(const{severity:i}of this._service.read({resource:e}))i===Ft.Error?t.errors+=1:i===Ft.Warning?t.warnings+=1:i===Ft.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class xl{constructor(){this._onMarkerChanged=new X8({delay:0,merge:xl._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new mce,this._stats=new _ce(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(pP(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const r=xl._toMarker(e,t,s);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,tags:g}=i;if(!!r)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,h=h>0?h:c,{resource:t,owner:e,code:n,severity:s,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:h,relatedInformation:u,tags:g}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const s of n){const r=Ue.first(s);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(en(t)){const s=new hn;for(const{resource:r,marker:a}of t){const l=xl._toMarker(e,r,a);if(!l)continue;const c=s.get(r);c?c.push(l):(s.set(r,[l]),i.push(r))}for(const[r,a]of s)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const r=this._data.get(i,t);if(r){const a=[];for(const l of r)if(xl._accept(l,n)){const c=a.push(l);if(s>0&&c===s)break}return a}else return[]}else if(!t&&!i){const r=[];for(const a of this._data.values())for(const l of a)if(xl._accept(l,n)){const c=r.push(l);if(s>0&&c===s)return r}return r}else{const r=this._data.values(i!=null?i:t),a=[];for(const l of r)for(const c of l)if(xl._accept(c,n)){const d=a.push(c);if(s>0&&d===s)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new hn;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}function h9(o,e,t,i,n,s){if(Array.isArray(o)){let r=0;for(const a of o){const l=h9(a,e,t,i,n,s);if(l===10)return l;l>r&&(r=l)}return r}else{if(typeof o=="string")return i?o==="*"?5:o===t?10:0:0;if(o){const{language:r,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:d}=o;if(!i&&!c)return 0;d&&n&&(e=n);let h=0;if(l)if(l===e.scheme)h=10;else if(l==="*")h=5;else return 0;if(r)if(r===t)h=10;else if(r==="*")h=Math.max(h,5);else return 0;if(d)if(d===s)h=10;else if(d==="*"&&s!==void 0)h=Math.max(h,5);else return 0;if(a){let u;if(typeof a=="string"?u=a:u=Object.assign(Object.assign({},a),{base:IO(a.base)}),u===e.fsPath||rle(u,e.fsPath))h=10;else return 0}return h}else return 0}}function u9(o){return typeof o=="string"?!1:Array.isArray(o)?o.every(u9):!!o.exclusive}class HR{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)===null||t===void 0?void 0:t.toString())===((i=e.notebookUri)===null||i===void 0?void 0:i.toString())}}class Wt{constructor(e){this._notebookInfoResolver=e,this._clock=0,thi Line truncated
`+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class cw{info(e){return this.notify({severity:Vt.Info,message:e})}warn(e){return this.notify({severity:Vt.Warning,message:e})}error(e){return this.notify({severity:Vt.Error,message:e})}notify(e){switch(e.severity){case Vt.Error:console.error(e.message);break;case Vt.Warning:console.warn(e.message);break;default:console.log(e.message);break}return cw.NO_OP}status(e,t){return z.None}}cw.NO_OP=new Rq;let cx=class{constructor(e){this._onWillExecuteCommand=new O,this._onDidExecuteCommand=new O,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Ye.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};cx=Ac([dn(0,Re)],cx);let cC=class extends $ae{constructor(e,t,i,n,s,r){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=g=>{const f=new ee;f.add(q(g,le.KEY_DOWN,_=>{const b=new Mt(_);this._dispatch(b,b.target)&&(b.preventDefault(),b.stopPropagation())})),f.add(q(g,le.KEY_UP,_=>{const b=new Mt(_);this._singleModifierDispatch(b,b.target)&&b.preventDefault()})),this._domNodeListeners.push(new yce(g,f))},l=g=>{for(let f=0;f<this._domNodeListeners.length;f++){const _=this._domNodeListeners[f];_.domNode===g&&(this._domNodeListeners.splice(f,1),_.dispose())}},c=g=>{g.getOption(56)||a(g.getContainerDomNode())},d=g=>{g.getOption(56)||l(g.getContainerDomNode())};this._register(r.onCodeEditorAdd(c)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(c);const h=g=>{a(g.getContainerDomNode())},u=g=>{l(g.getContainerDomNode())};this._register(r.onDiffEditorAdd(h)),this._register(r.onDiffEditorRemove(u)),r.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,i,n){const s=_y(t,Os),r=new ee;return s&&(this._dynamicKeybindings.push({keybinding:s.parts,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),r.add(ze(()=>{for(let a=0;a<this._dynamicKeybindings.length;a++)if(this._dynamicKeybindings[a].command===e){this._dynamicKeybindings.splice(a,1),this.updateResolver();return}}))),r.add(Ye.registerCommand(e,i)),this.updateResolver(),r}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(ls.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new wp(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const r=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new pR(void 0,s.command,s.commandArgs,r,t,null,!1);else{const l=Fm.resolveUserBinding(a,Os);for(const c of l)i[n++]=new pR(c,s.command,s.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new Td(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new Fm(t,Os)}};cC=Ac([dn(0,xe),dn(1,Ci),dn(2,rl),dn(3,gi),dn(4,Co),dn(5,dt)],cC);class yce extends z{constructor(e,t){super(),this.domNode=e,this._register(t)}}function zR(o){return o&&typeof o=="object"&&(!o.overrideIdentifier||typeof o.overrideIdentifier=="string")&&(!o.resource||o.resource instanceof me)}class f9{constructor(){this._onDidChangeConfiguration=new O,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new nw(new vce,new Zn,new Zn,new Zn)}getValue(e,t){const i=typeof e=="string"?e:void 0,n=zR(e)?e:zR(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[s,r]=n;this.getValue(s)!==r&&(this._configuration.updateValue(s,r),i.push(s))}if(i.length>0){const n=new zae({keys:i,overrides:[]},t,this._configuration);n.source=8,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let dx=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new O,this.configurationService.onDidChangeConfiguration(t=>{this._onDidChangeConfiguration.fire({affectedKeys:t.affectedKeys,affectsConfiguration:(i,n)=>t.affectsConfiguration(n)})})}getValue(e,t,i){const s=(B.isIPosition(t)?t:null)?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0;return typeof s=="undefined"?this.configurationService.getValue():this.configurationService.getValue(s)}};dx=Ac([dn(0,ot)],dx);let hx=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=thi Line truncated
`:`\r
`}};hx=Ac([dn(0,ot)],hx);class Lce{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class zm{constructor(){const e=me.from({scheme:zm.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new YJ({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===zm.SCHEME?this.workspace.folders[0]:null}}zm.SCHEME="inmemory";function dC(o,e,t){if(!e||!(o instanceof f9))return;const i=[];Object.keys(e).forEach(n=>{EY(n)&&i.push([`editor.${n}`,e[n]]),t&&NY(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&o.updateValues(i)}let ux=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return g9(this,void 0,void 0,function*(){const i=new Map;for(const r of e){if(!(r instanceof Sd))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(r.resource);if(!a)throw new Error("bad edit - model not found");if(typeof r.versionId=="number"&&a.getVersionId()!==r.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(a);l||(l=[],i.set(a,l)),l.push(Pt.replaceMove(L.lift(r.textEdit.range),r.textEdit.text))}let n=0,s=0;for(const[r,a]of i)r.pushStackElement(),r.pushEditOperations([],a,()=>[]),r.pushStackElement(),s+=1,n+=a.length;return{ariaSummary:tg(Nk.bulkEditServiceSummary,n,s)}})}};ux=Ac([dn(0,Bt)],ux);class Dce{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return Ys(e)}}let gx=class extends Hk{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const n=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();n&&(t=n.getContainerDomNode())}return super.showContextView(e,t,i)}};gx=Ac([dn(0,tf),dn(1,dt)],gx);class kce{constructor(){this._neverEmitter=new O,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class xce extends Wm{constructor(){super()}}class Ice extends QB{constructor(){super(new XB)}}let fx=class extends $k{constructor(e,t,i,n,s){super(e,t,i,n,s),this.configure({blockMouse:!1})}};fx=Ac([dn(0,rl),dn(1,gi),dn(2,Ch),dn(3,rn),dn(4,vt)],fx);Xe(ot,f9);Xe(gN,dx);Xe(b7,hx);Xe(bm,zm);Xe(bg,Dce);Xe(rl,Lce);Xe(CN,Sce);Xe(gi,cw);Xe(ta,xl);Xe(Ht,xce);Xe(yo,tce);Xe(Co,Ice);Xe(Bt,Jv);Xe(oI,Gk);Xe(xe,ax);Xe(C5,wce);Xe(kc,lw);Xe(ia,PY);Xe(Qs,Pk);Xe(n_,ux);Xe(D7,kce);Xe($n,lx);Xe(ll,nx);Xe(eo,RL);Xe(Ci,cx);Xe(rn,cC);Xe(c_,tx);Xe(Ch,gx);Xe(So,qk);Xe(dl,rx);Xe(cl,fx);Xe(fh,sx);var Le;(function(o){const e=new c1;for(const[r,a]of kT())e.set(r,a);const t=new PN(e,!0);e.set(Re,t);function i(r){const a=e.get(r);if(!a)throw new Error("Missing service "+r);return a instanceof vr?t.invokeFunction(l=>l.get(r)):a}o.get=i;let n=!1;function s(r){if(n)return t;n=!0;for(const[a,l]of kT())e.get(a)||e.set(a,l);for(const a in r)if(r.hasOwnProperty(a)){const l=qe(a);e.get(l)instanceof vr&&e.set(l,r[a])}return t}o.initialize=s})(Le||(Le={}));var FN=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tt=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Ece=0,UR=!1;function Nce(o){if(!o){if(UR)return;UR=!0}SB(o||document.body)}let hC=class extends fg{constructor(e,t,i,n,s,r,a,l,c,d,h,u){const g=Object.assign({},t);g.ariaLabel=g.ariaLabel||eC.editorViewAccessibleLabel,g.ariaLabel=g.ariaLabel+";"+eC.accessibilityHelpMessage,super(e,g,{},i,n,s,r,l,c,d,h,u),a instanceof cC?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,Nce(g.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++Ece,s=re.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),z.None;const t=e.id,i=e.label,n=re.and(re.equals("editorId",this.getId()),re.deserialize(e.precondition)),s=e.keybindings,r=re.and(n,re.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(g,...f)=>Promise.resolve(e.run(this,...f)),d=new ee,h=this.getId()+":"+t;if(d.add(Ye.registerCommand(h,c)),a){const g={command:{id:h,title:i},when:n,group:a,order:l};d.add(po.appendMenuItem(A.E Line truncated
`);let r=t;return s!==-1&&(r=t.substring(0,s)),$R(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return $R(o,t,e.createById(i),n)}function $R(o,e,t,i){return o.createModel(e,t,i)}function Tce(o,e,t){return Le.initialize(t||{}).createInstance(px,o,e)}function Mce(o){return Le.get(dt).onCodeEditorAdd(t=>{o(t)})}function Ace(o){return Le.get(dt).onDiffEditorAdd(t=>{o(t)})}function Rce(){return Le.get(dt).listCodeEditors()}function Oce(){return Le.get(dt).listDiffEditors()}function Pce(o,e,t){return Le.initialize(t||{}).createInstance(mx,o,e)}function Fce(o,e){return new aZ(o,e)}function Bce(o,e,t){const i=Le.get(Ht),n=i.getLanguageIdByMimeType(e)||e;return p9(Le.get(Bt),i,o,n,t)}function Wce(o,e){const t=Le.get(Ht);Le.get(Bt).setMode(o,t.createById(e))}function Vce(o,e,t){o&&Le.get(ta).changeOne(e,o.uri,t)}function Hce(o){Le.get(ta).changeAll(o,[])}function zce(o){return Le.get(ta).read(o)}function Uce(o){return Le.get(ta).onMarkerChanged(o)}function $ce(o){return Le.get(Bt).getModel(o)}function jce(){return Le.get(Bt).getModels()}function Kce(o){return Le.get(Bt).onModelAdded(o)}function qce(o){return Le.get(Bt).onModelRemoved(o)}function Gce(o){return Le.get(Bt).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function Zce(o){return Sae(Le.get(Bt),Le.get(ti),o)}function Yce(o,e){const t=Le.get(Ht),i=Le.get(yo);return i.registerEditorContainer(o),kN.colorizeElement(i,t,o,e)}function Xce(o,e,t){const i=Le.get(Ht);return Le.get(yo).registerEditorContainer(document.body),kN.colorize(i,o,e,t)}function Qce(o,e,t=4){return Le.get(yo).registerEditorContainer(document.body),kN.colorizeModelLine(o,e,t)}function Jce(o){const e=Jt.get(o);return e||{getInitialState:()=>Jp,tokenize:(t,i,n)=>Y4(o,n)}}function ede(o,e){Jt.getOrCreate(e);const t=Jce(e),i=Ur(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r<a;r++){const l=i[r],c=t.tokenize(l,!0,s);n[r]=c.tokens,s=c.endState}return n}function tde(o,e){Le.get(yo).defineTheme(o,e)}function ide(o){Le.get(yo).setTheme(o)}function nde(){By.clearAllFontInfos()}function sde(o,e){return Ye.registerCommand({id:o,handler:e})}function ode(){return{create:Tce,getEditors:Rce,getDiffEditors:Oce,onDidCreateEditor:Mce,onDidCreateDiffEditor:Ace,createDiffEditor:Pce,createDiffNavigator:Fce,createModel:Bce,setModelLanguage:Wce,setModelMarkers:Vce,getModelMarkers:zce,removeAllMarkers:Hce,onDidChangeMarkers:Uce,getModels:jce,getModel:$ce,onDidCreateModel:Kce,onWillDisposeModel:qce,onDidChangeModelLanguage:Gce,createWebWorker:Zce,colorizeElement:Yce,colorize:Xce,colorizeModelLine:Qce,tokenize:ede,defineTheme:tde,setTheme:ide,remeasureFonts:nde,registerCommand:sde,AccessibilitySupport:OD,ContentWidgetPositionPreference:VD,CursorChangeReason:HD,DefaultEndOfLine:zD,EditorAutoIndentStrategy:$D,EditorOption:jD,EndOfLinePreference:KD,EndOfLineSequence:qD,MinimapPosition:tk,MouseTargetType:ik,OverlayWidgetPositionPreference:nk,OverviewRulerLane:sk,RenderLineNumbersType:rk,RenderMinimap:ak,ScrollbarVisibility:ck,ScrollType:lk,TextEditorCursorBlinkingStyle:fk,TextEditorCursorStyle:pk,TrackedRangeStickiness:mk,WrappingIndent:_k,InjectedTextCursorStops:ZD,PositionAffinity:ok,ConfigurationChangedEvent:VP,BareFontInfo:bd,FontInfo:Fy,TextModelResolvedOptions:n0,FindMatch:Kp,ApplyUpdateResult:Jf,EditorType:r1,EditorOptions:Jo}}function rde(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function qb(o,e){return typeof o=="boolean"?o:e}function jR(o,e){return typeof o=="string"?o:e}function ade(o){const e={};for(const t of o)e[t]=!0;return e}function KR(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=ade(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function _x(o,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(s,r){i=!0;let a="";if(typeof o[r]=="string")a=o[r];else if(o[r]&&o[r]instanceof RegExp)a=o[r].source;else throw o[r]===void 0?Lt(o,"language definition does not contain attribute '"+r+"', used at: "+e):Lt(o,"attribute reference '"+r+"' must be a string, used at: "+e);return iu(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");const n=(o.ignoreCase?"i":"")+(o.unicode?"u":"");return new RegExp(e,n)}function lde(o,e,t,i){if(i<0)return o;if(i<e.length)return e[i];if(i>=100){i=i-100;const n=t.split(".");if(n.unshift(t),i<n.length)return n[i]}return null}function cde(o,e,t,i){let n=-1,s=t,r=t.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(n=parseInt(r[3]),r[2]&&(n=n+100)),s=r[4]);let a="~",l=s;!s||s.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(r=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(a=r[1],l=r[2]));let c;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){const d=KR(l.split("|"),o.ignoreCase);c=function(h){return a==="~"?d(h):!d(h)}}else if(a==="@"||a==="!@"){const d=o[l];if(!d)throw Lt(o,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!rde(function(u){return typeof u=="st Line truncated
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:ic(t,a.open),close:ic(t,a.close)});else throw Lt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}var hde=globalThis&&globalThis.__awaiter||function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(o,e||[])).next())})};function ude(o){sg.registerLanguage(o)}function gde(){let o=[];return o=o.concat(sg.getLanguages()),o}function fde(o){return Le.get(Ht).languageIdCodec.encodeLanguageId(o)}function pde(o,e){const i=Le.get(Ht).onDidEncounterLanguage(n=>{n===o&&(i.dispose(),e())});return i}function mde(o,e){if(!Le.get(Ht).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Le.get(ti).register(o,e,100)}class _de{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return Um.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new i1(n.tokens,n.endState)}}class Um{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,r=e.length;s<r;s++){const a=e[s];let l=a.startIndex;s===0?l=0:l<n&&(l=n),i[s]=new Vp(l,a.scopes,t),n=l}return i}static adaptTokenize(e,t,i,n){const s=t.tokenize(i,n),r=Um._toClassicTokens(s.tokens,e);let a;return s.endState.equals(n)?a=n:a=s.endState,new DI(r,a)}tokenize(e,t,i){return Um.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,s=[];let r=0,a=0;for(let c=0,d=t.length;c<d;c++){const h=t[c],u=n.match(i,h.scopes);if(r>0&&s[r-1]===u)continue;let g=h.startIndex;c===0?g=0:g<a&&(g=a),s[r++]=g,s[r++]=u,a=g}const l=new Uint32Array(r);for(let c=0;c<r;c++)l[c]=s[c];return l}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),s=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let r;return n.endState.equals(i)?r=i:r=n.endState,new i1(s,r)}}function bde(o){return typeof o.getInitialState=="function"}function vde(o){return"tokenizeEncoded"in o}function _9(o){return o&&typeof o.then=="function"}function Cde(o){const e=Le.get(yo);if(o){const t=[null];for(let i=1,n=o.length;i<n;i++)t[i]=W.fromHex(o[i]);e.setColorMapOverride(t)}else e.setColorMapOverride(null)}function b9(o,e){return vde(e)?new _de(o,e):new Um(o,e,Le.get(Ht),Le.get(yo))}function BN(o,e){const t={createTokenizationSupport:()=>hde(this,void 0,void 0,function*(){const i=yield Promise.resolve(e.create());return i?bde(i)?b9(o,i):new Pm(Le.get(Ht),Le.get(yo),o,m9(o,i),Le.get(ot)):null})};return Jt.registerFactory(o,t)}function wde(o,e){if(!Le.get(Ht).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return _9(e)?BN(o,{create:()=>e}):Jt.register(o,b9(o,e))}function Sde(o,e){const t=i=>new Pm(Le.get(Ht),Le.get(yo),o,m9(o,i),Le.get(ot));return _9(e)?BN(o,{create:()=>e}):Jt.register(o,t(e))}function yde(o,e){return Le.get(ue).referenceProvider.register(o,e)}function Lde(o,e){return Le.get(ue).renameProvider.register(o,e)}function Dde(o,e){return Le.get(ue).signatureHelpProvider.register(o,e)}function kde(o,e){return Le.get(ue).hoverProvider.register(o,{provideHover:(i,n,s)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(a=>{if(!!a)return!a.range&&r&&(a.range=new L(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),a.range||(a.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),a})}})}function xde(o,e){return Le.get(ue).documentSymbolProvider.register(o,e)}function Ide(o,e){return Le.get(ue).documentHighlightProvider.register(o,e)}function Ede(o,e){return Le.get(ue).linkedEditingRangeProvider.register(o,e)}function Nde(o,e){return Le.get(ue).definitionProvider.register(o,e)}function Tde(o,e){return Le.get(ue).implementationProvider.register(o,e)}function Mde(o,e){return Le.get(ue).typeDefinitionProvider.register(o,e)}function Ade(o,e){return Le.get(ue).codeLensProvider.register(o,e)}function Rde(o,e,t){return Le.get(ue).codeActionProvider.register(o,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(n,s,r,a)=>{const c=Le.get(ta).read({resource:n.uri}).filter(d=>L.areIntersectingOrTouching(d,s));return e.provideCodeAc Line truncated
@@ -1 +0,0 @@
import{e as t,r as a,F as _,y as s,S as o,q as n,a7 as c}from"./index.js";const r={class:"layout-conatiner"},d={class:"layout-f"},l={class:"layout-r"},i=t({__name:"index",setup(u){return a(!0),(e,p)=>(n(),_("div",r,[s("div",d,[o(e.$slots,"f",{},void 0,!0)]),s("div",l,[o(e.$slots,"r",{},void 0,!0)])]))}});const v=c(i,[["__scopeId","data-v-cbf72d2b"]]);export{v as l};
@@ -1 +0,0 @@
var be=Object.defineProperty,ye=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var ce=Object.getOwnPropertySymbols;var Ie=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var ue=(r,o,n)=>o in r?be(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,Y=(r,o)=>{for(var n in o||(o={}))Ie.call(o,n)&&ue(r,n,o[n]);if(ce)for(var n of ce(o))Ee.call(o,n)&&ue(r,n,o[n]);return r},U=(r,o)=>ye(r,xe(o));var de=(r,o,n)=>new Promise((c,_)=>{var L=k=>{try{u(n.next(k))}catch(w){_(w)}},R=k=>{try{u(n.throw(k))}catch(w){_(w)}},u=k=>k.done?c(k.value):Promise.resolve(k.value).then(L,R);u((n=n.apply(r,o)).next())});import{i as Ce,a as Ne,b as Te,d as Oe,m as ze,c as pe,e as Q,f as _e,g as Re,s as $e,u as Ae,h as De,j as Le,r as H,k as Fe,l as Se,n as v,w as fe,o as Be,p as Pe,q as m,t as D,v as l,x as f,y as t,z as p,A as e,B as Me,C as $,E as T,D as Ve,F as A,G as Xe,H as Ye,I as G,J as He,K as qe,L as ge,M as We,N as Ue,O as he,P as Ze,Q as je,R as me,S as Ge,T as Qe,U as Je,_ as Ke,V as Z,W as P,X as et,Y as tt,Z as st,$ as nt,a0 as at,a1 as O,a2 as ve,a3 as ot,a4 as j,a5 as lt,a6 as it,a7 as rt}from"./index.js";import{u as ke}from"./chunk.6424c2fc.js";import{d as ct}from"./chunk.22632dc4.js";import{l as ut}from"./chunk.4a114b4a.js";var dt="Expected a function";function ae(r,o,n){var c=!0,_=!0;if(typeof r!="function")throw new TypeError(dt);return Ce(n)&&(c="leading"in n?!!n.leading:c,_="trailing"in n?!!n.trailing:_),ct(r,o,{leading:c,maxWait:o,trailing:_})}const _t=()=>Ne&&/firefox/i.test(window.navigator.userAgent),ft=Te({urlList:{type:Oe(Array),default:()=>ze([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:{type:Boolean,default:!1},teleported:{type:Boolean,default:!1},closeOnPressEscape:{type:Boolean,default:!0}}),mt={close:()=>!0,switch:r=>pe(r)},vt=["src"],pt={name:"ElImageViewer"},gt=Q(U(Y({},pt),{props:ft,emits:mt,setup(r,{expose:o,emit:n}){const c=r,_={CONTAIN:{name:"contain",icon:_e(Re)},ORIGINAL:{name:"original",icon:_e($e)}},L=_t()?"DOMMouseScroll":"mousewheel",{t:R}=Ae(),u=De("image-viewer"),{nextZIndex:k}=Le(),w=H(),F=H([]),q=Fe(),E=H(!0),b=H(c.initialIndex),S=Se(_.CONTAIN),a=H({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),C=v(()=>{const{urlList:s}=c;return s.length<=1}),M=v(()=>b.value===0),W=v(()=>b.value===c.urlList.length-1),J=v(()=>c.urlList[b.value]),K=v(()=>{const{scale:s,deg:i,offsetX:d,offsetY:g,enableTransition:x}=a.value;let h=d/s,I=g/s;switch(i%360){case 90:case-270:[h,I]=[I,-h];break;case 180:case-180:[h,I]=[-h,-I];break;case 270:case-90:[h,I]=[-I,h];break}const B={transform:`scale(${s}) rotate(${i}deg) translate(${h}px, ${I}px)`,transition:x?"transform .3s":""};return S.value.name===_.CONTAIN.name&&(B.maxWidth=B.maxHeight="100%"),B}),V=v(()=>pe(c.zIndex)?c.zIndex:k());function X(){te(),n("close")}function ee(){const s=ae(d=>{switch(d.code){case P.esc:c.closeOnPressEscape&&X();break;case P.space:le();break;case P.left:ie();break;case P.up:N("zoomIn");break;case P.right:re();break;case P.down:N("zoomOut");break}}),i=ae(d=>{(d.wheelDelta?d.wheelDelta:-d.detail)>0?N("zoomIn",{zoomRate:1.2,enableTransition:!1}):N("zoomOut",{zoomRate:1.2,enableTransition:!1})});q.run(()=>{Z(document,"keydown",s),Z(document,L,i)})}function te(){q.stop()}function y(){E.value=!1}function se(s){E.value=!1,s.target.alt=R("el.image.error")}function we(s){if(E.value||s.button!==0||!w.value)return;a.value.enableTransition=!1;const{offsetX:i,offsetY:d}=a.value,g=s.pageX,x=s.pageY,h=ae(B=>{a.value=U(Y({},a.value),{offsetX:i+B.pageX-g,offsetY:d+B.pageY-x})}),I=Z(document,"mousemove",h);Z(document,"mouseup",()=>{I()}),s.preventDefault()}function oe(){a.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function le(){if(E.value)return;const s=et(_),i=Object.values(_),d=S.value.name,x=(i.findIndex(h=>h.name===d)+1)%s.length;S.value=_[s[x]],oe()}function ne(s){const i=c.urlList.length;b.value=(s+i)%i}function ie(){M.value&&!c.infinite||ne(b.value-1)}function re(){W.value&&!c.infinite||ne(b.value+1)}function N(s,i={}){if(E.value)return;const{zoomRate:d,rotateDeg:g,enableTransition:x}=Y({zoomRate:1.4,rotateDeg:90,enableTransition:!0},i);switch(s){case"zoomOut":a.value.scale>.2&&(a.value.scale=Number.parseFloat((a.value.scale/d).toFixed(3)));break;case"zoomIn":a.value.scale<7&&(a.value.scale=Number.parseFloat((a.value.scale*d).toFixed(3)));break;case"clockwise":a.value.deg+=g;break;case"anticlockwise":a.value.deg-=g;break}a.value.enableTransition=x}return fe(J,()=>{Be(()=>{const s=F.value[0];s!=null&&s.complete||(E.value=!0)})}),fe(b,s=>{oe(),n("switch",s)}),Pe(()=>{var s,i;ee(),(i=(s=w.value)==null?void 0:s.focus)==null||i.call(s)}),o({setActiveItem:ne}),(s,i)=>(m(),D(Je,{to:"body",disabled:!s.teleported},[l(Qe,{name:"viewer-fade",appear:""},{default:f(()=>[t("div",{ref_key:"wrapper",ref:w,tabindex:-1,class:p(e(u).e("wrapper")),style:me({zIndex:e(V)})},[t("div",{class:p(e(u).e("mask")),onClick:i[0]||(Line truncated
@@ -1 +0,0 @@
var g=(e,t,s)=>new Promise((a,l)=>{var c=i=>{try{n(s.next(i))}catch(d){l(d)}},u=i=>{try{n(s.throw(i))}catch(d){l(d)}},n=i=>i.done?a(i.value):Promise.resolve(i.value).then(c,u);n((s=s.apply(e,t)).next())});import{a8 as h,a9 as y,aa as f}from"./index.js";const o=e=>["linkease-file_web",e].join("/"),r={model:{get(){return localStorage.getItem(o("model"))=="true"},set(e){localStorage.setItem(o("model"),e)}},order:{get(){const e=localStorage.getItem(o("order"));return e||"date"},set(e){localStorage.setItem(o("order"),e)}},orderBy:{get(){return localStorage.getItem(o("orderBy"))||"asc"},set(e){localStorage.setItem(o("orderBy"),e)}},filter:{get(){return localStorage.getItem(o("filter"))||"default"},set(e){localStorage.setItem(o("filter"),e)}},copy:{get(){let e={type:"copy",values:[]};try{const t=localStorage.getItem(o("copy"));t&&(e=JSON.parse(t))}catch(t){}return e},set(e){const t=JSON.stringify(e);localStorage.setItem(o("copy"),t)}}},m=h("app",{state:()=>({keys:0,config:{model:r.model.get(),order:r.order.get(),orderBy:r.orderBy.get(),filter:r.filter.get()},menus:[],entries:[],checknoxEntries:[],previewImage:{enable:!1,values:[]},copy:r.copy.get(),task:0}),getters:{isCopy(){var e,t;return((t=(e=this.copy)==null?void 0:e.values)==null?void 0:t.length)>0}},actions:{reload(){this.keys++},taskIncr(e){e===void 0?this.task=0:this.task+=e},getEntries(){return g(this,null,function*(){try{const e=yield y.File.Basic.List.POST({path:"/local"});if(e.data){const{success:t,result:s,error:a}=e.data;t==0&&(this.menus=s.entries||[]),a&&f.Warning(a)}}catch(e){console.log(e),f.Error(`${e}`)}})},setConfigModel(){this.config.model=!this.config.model,r.model.set(`${this.config.model}`)},setConfigOrder(e){this.config.order=e,r.order.set(e)},setConfigOrderBy(e){this.config.orderBy=e,r.orderBy.set(e)},setConfigFilter(e){this.config.filter=e,r.filter.set(e)},setCopy(e){this.copy.type=e.type,this.copy.values=e.values||[],r.copy.set(e)}}}),S=h("editor",{state:()=>({entries:[],editableTabs:[],editableTabsValue:""}),actions:{addTab(e){for(let t=0;t<this.editableTabs.length;t++)if(this.editableTabs[t].rootPath===e.rootPath){this.editableTabsValue=e.rootPath||"";return}this.editableTabs.push(e),this.editableTabsValue=e.rootPath||""},removeTab(e){const t=this.editableTabs;let s=this.editableTabsValue;s===e&&t.forEach((a,l)=>{if(a.rootPath===e){const c=t[l+1]||t[l-1];c&&(s=c.rootPath||"")}}),this.editableTabsValue=s,this.editableTabs=t.filter(a=>a.rootPath!==e)}}});export{S as a,r as s,m as u};
@@ -1 +0,0 @@
var We=Object.defineProperty,Le=Object.defineProperties;var je=Object.getOwnPropertyDescriptors;var we=Object.getOwnPropertySymbols;var Ke=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var xe=(s,e,n)=>e in s?We(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n,K=(s,e)=>{for(var n in e||(e={}))Ke.call(e,n)&&xe(s,n,e[n]);if(we)for(var n of we(e))Ge.call(e,n)&&xe(s,n,e[n]);return s},le=(s,e)=>Le(s,je(e));var N=(s,e,n)=>new Promise((a,b)=>{var A=u=>{try{$(n.next(u))}catch(h){b(h)}},k=u=>{try{$(n.throw(u))}catch(h){b(h)}},$=u=>u.done?a(u.value):Promise.resolve(u.value).then(A,k);$((n=n.apply(s,e)).next())});import{b as He,ad as $e,d as Ye,ae as ye,af as ce,ag as he,c as pe,ah as ge,ai as Ee,e as j,aj as Ze,ak as Je,h as Qe,al as Xe,n as B,am as et,an as tt,r as Z,ao as at,w as me,ap as nt,p as ot,q as d,F as D,y as r,A as t,z as P,aq as st,t as x,x as _,L as ie,E as J,C as M,a4 as z,I as H,v as g,ar as ut,R as Se,B as Ie,_ as lt,as as De,o as it,at as Ae,au as ct,Y as rt,Z as ve,$ as re,a0 as ee,av as be,a9 as W,aa as v,aw as Pe,a1 as G,P as Ve,ax as Oe,ay as R,a5 as de,a6 as fe,a7 as te,az as dt,O as X,H as ft,a2 as Me,a3 as Ce,aA as ht,aB as pt}from"./index.js";import{u as ae,s as Te}from"./chunk.6424c2fc.js";import{c as Ne,d as mt,E as vt,a as _t,b as _e,e as Q,f as Fe,_ as Ft}from"./chunk.a0a5dece.js";import{i as yt,E as Y}from"./chunk.a6a47e72.js";const gt=He({modelValue:{type:[Boolean,String,Number],default:!1},value:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},activeIcon:{type:$e},inactiveIcon:{type:$e},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},id:String,loading:{type:Boolean,default:!1},beforeChange:{type:Ye(Function)},size:{type:String,validator:yt},tabindex:{type:[String,Number]}}),Et={[ye]:s=>ce(s)||he(s)||pe(s),[ge]:s=>ce(s)||he(s)||pe(s),[Ee]:s=>ce(s)||he(s)||pe(s)},bt=["onClick"],Ct=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],Dt=["aria-hidden"],Bt=["aria-hidden"],kt=["aria-hidden"],wt=["aria-hidden"],xt={name:"ElSwitch"},$t=j(le(K({},xt),{props:gt,emits:Et,setup(s,{expose:e,emit:n}){const a=s,b="ElSwitch",A=De(),{formItem:k}=Ze(),$=Je(),u=Qe("switch");Xe({from:'"value"',replacement:'"model-value" or "v-model"',scope:b,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},B(()=>{var i;return!!((i=A.vnode.props)!=null&&i.value)}));const{inputId:h}=et(a,{formItemContext:k}),f=tt(B(()=>a.loading)),o=Z(a.modelValue!==!1),p=Z(),F=Z(),w=B(()=>[u.b(),u.m($.value),u.is("disabled",f.value),u.is("checked",E.value)]),C=B(()=>({width:at(a.width)}));me(()=>a.modelValue,()=>{o.value=!0}),me(()=>a.value,()=>{o.value=!1});const m=B(()=>o.value?a.modelValue:a.value),E=B(()=>m.value===a.activeValue);[a.activeValue,a.inactiveValue].includes(m.value)||(n(ye,a.inactiveValue),n(ge,a.inactiveValue),n(Ee,a.inactiveValue)),me(E,i=>{var T;p.value.checked=i,a.validateEvent&&((T=k==null?void 0:k.validate)==null||T.call(k,"change").catch(I=>nt()))});const V=()=>{const i=E.value?a.inactiveValue:a.activeValue;n(ye,i),n(ge,i),n(Ee,i),it(()=>{p.value.checked=E.value})},O=()=>{if(f.value)return;const{beforeChange:i}=a;if(!i){V();return}const T=i();[Ae(T),ce(T)].includes(!0)||ct(b,"beforeChange must return type `Promise<boolean>` or `boolean`"),Ae(T)?T.then(ne=>{ne&&V()}).catch(ne=>{}):T&&V()},q=B(()=>u.cssVarBlock(K(K(K({},a.activeColor?{"on-color":a.activeColor}:null),a.inactiveColor?{"off-color":a.inactiveColor}:null),a.borderColor?{"border-color":a.borderColor}:null))),L=()=>{var i,T;(T=(i=p.value)==null?void 0:i.focus)==null||T.call(i)};return ot(()=>{p.value.checked=E.value}),e({focus:L,checked:E}),(i,T)=>(d(),D("div",{class:P(t(w)),style:Se(t(q)),onClick:Ie(O,["prevent"])},[r("input",{id:t(h),ref_key:"input",ref:p,class:P(t(u).e("input")),type:"checkbox",role:"switch","aria-checked":t(E),"aria-disabled":t(f),name:i.name,"true-value":i.activeValue,"false-value":i.inactiveValue,disabled:t(f),tabindex:i.tabindex,onChange:V,onKeydown:st(O,["enter"])},null,42,Ct),!i.inlinePrompt&&(i.inactiveIcon||i.inactiveText)?(d(),D("span",{key:0,class:P([t(u).e("label"),t(u).em("label","left"),t(u).is("active",!t(E))])},[i.inactiveIcon?(d(),x(t(J),{key:0},{default:_(()=>[(d(),x(ie(i.inactiveIcon)))]),_:1})):M("v-if",!0),!i.inactiveIcon&&i.inactiveText?(d(),D("span",{key:1,"aria-hidden":t(E)},z(i.inactiveText),9,Dt)):M("v-if",!0)],2)):M("v-if",!0),r("span",{ref_key:"core",ref:F,class:P(t(u).e("core")),style:Se(t(C))},[i.inlinePrompt?(d(),D("div",{key:0,class:P(t(u).eLine truncated
@@ -1 +0,0 @@
var Ae=Object.defineProperty,Ge=Object.defineProperties;var Ye=Object.getOwnPropertyDescriptors;var me=Object.getOwnPropertySymbols;var ze=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var ve=(e,n,s)=>n in e?Ae(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,P=(e,n)=>{for(var s in n||(n={}))ze.call(n,s)&&ve(e,s,n[s]);if(me)for(var s of me(n))He.call(n,s)&&ve(e,s,n[s]);return e},V=(e,n)=>Ge(e,Ye(n));import{b as W,ad as he,e as R,h as Z,r as h,aC as J,p as Ie,q as v,F as y,S as T,z as A,A as g,_ as L,d as K,aD as k,aE as Ue,y as ne,t as Y,x as E,L as Ee,E as le,a4 as se,as as ae,Y as Ce,aF as ie,aG as Je,W as _,n as S,aH as Ve,aI as X,w as je,V as We,a1 as $,v as N,aJ as qe,aK as Xe,aL as ye,o as Qe,aM as Te,a2 as Ze,aN as xe,u as en,ao as nn,ak as on,aO as tn,aP as Q,C as j,aQ as $e,I as ee,aR as rn,R as ke,a7 as Se,aA as sn,O as ge,B as re,a3 as ln,a5 as an,a6 as un}from"./index.js";import{c as M,u as cn,a as dn,b as pn,O as fn,w as be}from"./chunk.a6a47e72.js";const Oe=Symbol("breadcrumbKey"),mn=W({separator:{type:String,default:"/"},separatorIcon:{type:he}}),vn={name:"ElBreadcrumb"},gn=R(V(P({},vn),{props:mn,setup(e){const n=e,s=Z("breadcrumb"),r=h();return J(Oe,n),Ie(()=>{const l=r.value.querySelectorAll(`.${s.e("item")}`);l.length&&l[l.length-1].setAttribute("aria-current","page")}),(l,p)=>(v(),y("div",{ref_key:"breadcrumb",ref:r,class:A(g(s).b()),"aria-label":"Breadcrumb",role:"navigation"},[T(l.$slots,"default")],2))}}));var bn=L(gn,[["__file","/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb.vue"]]);const _n=W({to:{type:K([String,Object]),default:""},replace:{type:Boolean,default:!1}}),wn={name:"ElBreadcrumbItem"},hn=R(V(P({},wn),{props:_n,setup(e){const n=e,s=ae(),r=k(Oe,void 0),l=Z("breadcrumb"),{separator:p,separatorIcon:i}=Ue(r),t=s.appContext.config.globalProperties.$router,o=h(),d=()=>{!n.to||!t||(n.replace?t.replace(n.to):t.push(n.to))};return(u,c)=>(v(),y("span",{class:A(g(l).e("item"))},[ne("span",{ref_key:"link",ref:o,class:A([g(l).e("inner"),g(l).is("link",!!u.to)]),role:"link",onClick:d},[T(u.$slots,"default")],2),g(i)?(v(),Y(g(le),{key:0,class:A(g(l).e("separator"))},{default:E(()=>[(v(),Y(Ee(g(i))))]),_:1},8,["class"])):(v(),y("span",{key:1,class:A(g(l).e("separator")),role:"presentation"},se(g(p)),3))],2))}}));var De=L(hn,[["__file","/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);const ko=Ce(bn,{BreadcrumbItem:De}),So=ie(De),In={inheritAttrs:!1};function En(e,n,s,r,l,p){return T(e.$slots,"default")}var Cn=L(In,[["render",En],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);const yn={name:"ElCollectionItem",inheritAttrs:!1};function Tn(e,n,s,r,l,p){return T(e.$slots,"default")}var $n=L(yn,[["render",Tn],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);const Fe="data-el-collection-item",Ne=e=>{const n=`El${e}Collection`,s=`${n}Item`,r=Symbol(n),l=Symbol(s),p=V(P({},Cn),{name:n,setup(){const t=h(null),o=new Map;J(r,{itemMap:o,getItems:()=>{const u=g(t);if(!u)return[];const c=Array.from(u.querySelectorAll(`[${Fe}]`));return[...o.values()].sort((a,m)=>c.indexOf(a.ref)-c.indexOf(m.ref))},collectionRef:t})}}),i=V(P({},$n),{name:s,setup(t,{attrs:o}){const d=h(null),u=k(r,void 0);J(l,{collectionItemRef:d}),Ie(()=>{const c=g(d);c&&u.itemMap.set(c,P({ref:c},o))}),Je(()=>{const c=g(d);u.itemMap.delete(c)})}});return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:l,ElCollection:p,ElCollectionItem:i}},kn=W({style:{type:K([String,Array,Object])},currentTabId:{type:K(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:K(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Sn,ElCollectionItem:On,COLLECTION_INJECTION_KEY:ue,COLLECTION_ITEM_INJECTION_KEY:Dn}=Ne("RovingFocusGroup"),ce=Symbol("elRovingFocusGroup"),Re=Symbol("elRovingFocusGroupItem"),Fn={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Nn=(e,n)=>{if(n!=="rtl")return e;switch(e){case _.right:return _.left;case _.left:return _.right;default:return e}},Rn=(e,n,s)=>{const r=Nn(e.key,s);if(!(n==="vertical"&&[_.left,_.right].includes(r))&&!(n==="horizontal"&&[_.up,_.down].includes(r)))return Fn[r]},Bn=(e,n)=>e.map((s,r)=>e[(r+n)%e.length]),de=e=>{const{activeElement:n}=document;for(const s of e)if(s===n||(s.focus(),n!==document.activeElement))return},_e="currentTabIdChange",we="rovingFocusGroup.entryFocus",Pn={bubbles:!1,cancelable:!0},Kn=R({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:kn,emits:[_e,"entryFocus"],setup(e,{emit:n}){var s;const r=h((s=e.currentTabId||e.defaultCurrentTabId)!=null?s:null),l=h(!1),p=h(!1),i=h(null),{getItems:t}=k(ue,void 0),o=S(()=>[{outline:"none"},e.style]),d=f=>{n(_e,f)},u=Line truncated
@@ -1,9 +0,0 @@
var so=Object.defineProperty,io=Object.defineProperties;var lo=Object.getOwnPropertyDescriptors;var rn=Object.getOwnPropertySymbols;var uo=Object.prototype.hasOwnProperty,po=Object.prototype.propertyIsEnumerable;var an=(e,t,n)=>t in e?so(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))uo.call(t,n)&&an(e,n,t[n]);if(rn)for(var n of rn(t))po.call(t,n)&&an(e,n,t[n]);return e},ee=(e,t)=>io(e,lo(t));var ke=(e,t,n)=>new Promise((o,r)=>{var s=i=>{try{l(n.next(i))}catch(u){r(u)}},a=i=>{try{l(n.throw(i))}catch(u){r(u)}},l=i=>i.done?o(i.value):Promise.resolve(i.value).then(s,a);l((n=n.apply(e,t)).next())});import{aS as co,n as S,aT as fo,as as Kt,aU as Pn,d as X,aV as Ve,w as U,p as ct,a as Ne,af as Dt,aW as vo,aX as mo,aY as go,aZ as ho,a_ as bo,b as ye,A as p,aC as it,r as x,c as sn,a$ as yo,ad as ln,m as wo,ae as jt,ag as Ot,e as we,b0 as Eo,b1 as Co,aj as Oo,am as So,ak as kn,an as To,h as Re,l as xt,b2 as Ao,b3 as Bo,b4 as Po,b5 as Ut,b6 as ko,o as ue,ap as un,b7 as Io,aI as At,P as We,Q as ot,q as I,F as Y,C as j,I as St,z as $,S as oe,y as Z,t as V,x as W,L as Me,E as He,aP as rt,v as te,b8 as Mo,B as nt,b9 as Bt,a4 as ge,R as Pt,_ as Ae,ba as kt,Y as qt,aD as je,aG as ft,bb as Ro,bc as $o,bd as Lo,be as In,bf as It,bg as pn,j as Mn,aE as Rn,bh as $n,W as zt,bi as xo,a1 as ne,T as Ln,U as No,bj as Do,bk as Ft,aL as Ht,aH as jo,bl as zo,aM as Fo,bm as Ho,bn as Vo,u as Wo,aA as Ko,bo as cn,bp as Uo,bq as qo,br as Xo,aq as Et,a3 as Nt,bs as xn,bt as Nn,bu as fn}from"./index.js";const Yo='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Go=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,dn=e=>Array.from(e.querySelectorAll(Yo)).filter(t=>Zo(t)&&Go(t)),Zo=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Se=(e,t,{checkForDefaultPrevented:n=!0}={})=>r=>{const s=e==null?void 0:e(r);if(n===!1||!s)return t==null?void 0:t(r)},Ms=e=>t=>t.pointerType==="mouse"?e(t):void 0,Jo=e=>["",...co].includes(e),Qo=e=>/([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(e),_o=()=>Math.floor(Math.random()*1e4),er=["class","style"],tr=/^on[A-Z]/,nr=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,o=S(()=>((n==null?void 0:n.value)||[]).concat(er)),r=Kt();return r?S(()=>{var s;return fo(Object.entries((s=r.proxy)==null?void 0:s.$attrs).filter(([a])=>!o.value.includes(a)&&!(t&&tr.test(a))))}):S(()=>({}))},Xt=Symbol("popper"),Dn=Symbol("popperContent"),or=Pn({type:X(Boolean),default:null}),rr=Pn({type:X(Function)}),ar=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,o=[t],r={[e]:or,[n]:rr};return{useModelToggle:({indicator:a,toggleReason:l,shouldHideWhenRouteChanges:i,shouldProceed:u,onShow:d,onHide:v})=>{const m=Kt(),{emit:h}=m,g=m.props,c=S(()=>Ve(g[n])),E=S(()=>g[e]===null),b=C=>{a.value!==!0&&(a.value=!0,l&&(l.value=C),Ve(d)&&d(C))},y=C=>{a.value!==!1&&(a.value=!1,l&&(l.value=C),Ve(v)&&v(C))},T=C=>{if(g.disabled===!0||Ve(u)&&!u())return;const M=c.value&&Ne;M&&h(t,!0),(E.value||!M)&&b(C)},O=C=>{if(g.disabled===!0||!Ne)return;const M=c.value&&Ne;M&&h(t,!1),(E.value||!M)&&y(C)},k=C=>{!Dt(C)||(g.disabled&&C?c.value&&h(t,!1):a.value!==C&&(C?b():y()))},R=()=>{a.value?O():T()};return U(()=>g[e],k),i&&m.appContext.config.globalProperties.$route!==void 0&&U(()=>F({},m.proxy.$route),()=>{i.value&&a.value&&O()}),ct(()=>{k(g[e])}),{hide:O,show:T,toggle:R,hasUpdateHandler:c}},useModelToggleProps:r,useModelToggleEmits:o}},sr=(e,t)=>{let n;U(()=>e.value,o=>{var r,s;o?(n=document.activeElement,vo(t)&&((s=(r=t.value).focus)==null||s.call(r))):n.focus()})};function ir(){let e;const t=(o,r)=>{n(),e=window.setTimeout(o,r)},n=()=>window.clearTimeout(e);return mo(()=>n()),{registerTimeout:t,cancelTimeout:n}}let vn;const lr=go("namespace",ho),jn=`${lr.value}-popper-container-${_o()}`,zn=`#${jn}`,ur=()=>{const e=document.createElement("div");return e.id=jn,document.body.appendChild(e),e},pr=()=>{bo(()=>{!Ne||(!vn||!document.body.querySelector(zn))&&(vn=ur())})},cr=ye({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200}}),fr=({showAfter:e,hideAfter:t,open:n,close:o})=>{const{registerTimeout:r}=ir();return{onOpen:l=>{r(()=>{n(l)},p(e))},onClose:l=>{r(()=>{o(l)},p(t))}}},Fn=Symbol("elForwardRef"),dr=e=>{it(Fn,{setForwardRef:n=>{e.value=n}})},vr=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}});function mr(e){const t=x();function n(){if(e.value==null)return;const{selectionStart:r,selectionEnd:s,value:a}=e.value;if(r==null||s==null)return;const l=a.slice(0,Math.max(0,r)),i=a.slice(Math.max(0,s));t.value={selectionStart:r,selectionEnd:s,value:a,beforeTxt:l,afterTxt:i}}function o(){if(e.value==null||t.value==null)return;conLine truncated
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
`,hr=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function br(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),r=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:hr.map(a=>`${a}:${t.getPropertyValue(a)}`).join(";"),paddingSize:o,borderSize:r,boxSizing:n}}function mn(e,t=1,n){var o;le||(le=document.createElement("textarea"),document.body.appendChild(le));const{paddingSize:r,borderSize:s,boxSizing:a,contextStyle:l}=br(e);le.setAttribute("style",`${l};${gr}`),le.value=e.value||e.placeholder||"";let i=le.scrollHeight;const u={};a==="border-box"?i=i+s:a==="content-box"&&(i=i-r),le.value="";const d=le.scrollHeight-r;if(sn(t)){let v=d*t;a==="border-box"&&(v=v+r+s),i=Math.max(v,i),u.minHeight=`${v}px`}if(sn(n)){let v=d*n;a==="border-box"&&(v=v+r+s),i=Math.min(v,i)}return u.height=`${i}px`,(o=le.parentNode)==null||o.removeChild(le),le=void 0,u}const yr=ye({id:{type:String,default:void 0},size:yo,disabled:Boolean,modelValue:{type:X([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:X([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String,default:""},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:ln},prefixIcon:{type:ln},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:X([Object,Array,String]),default:()=>wo({})}}),wr={[jt]:e=>Ot(e),input:e=>Ot(e),change:e=>Ot(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Er=["role"],Cr=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder"],Or=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder"],Sr={name:"ElInput",inheritAttrs:!1},Tr=we(ee(F({},Sr),{props:yr,emits:wr,setup(e,{expose:t,emit:n}){const o=e,r={suffix:"append",prefix:"prepend"},s=Kt(),a=Eo(),l=Co(),i=S(()=>{const f={};return o.containerRole==="combobox"&&(f["aria-haspopup"]=a["aria-haspopup"],f["aria-owns"]=a["aria-owns"],f["aria-expanded"]=a["aria-expanded"]),f}),u=nr({excludeKeys:S(()=>Object.keys(i.value))}),{form:d,formItem:v}=Oo(),{inputId:m}=So(o,{formItemContext:v}),h=kn(),g=To(),c=Re("input"),E=Re("textarea"),b=xt(),y=xt(),T=x(!1),O=x(!1),k=x(!1),R=x(!1),C=x(),M=xt(o.inputStyle),z=S(()=>b.value||y.value),H=S(()=>{var f;return(f=d==null?void 0:d.statusIcon)!=null?f:!1}),N=S(()=>(v==null?void 0:v.validateState)||""),K=S(()=>N.value&&Ao[N.value]),A=S(()=>R.value?Bo:Po),w=S(()=>[a.style,o.inputStyle]),B=S(()=>[o.inputStyle,M.value,{resize:o.resize}]),P=S(()=>Ut(o.modelValue)?"":String(o.modelValue)),D=S(()=>o.clearable&&!g.value&&!o.readonly&&!!P.value&&(T.value||O.value)),G=S(()=>o.showPassword&&!g.value&&!o.readonly&&!!P.value&&(!!P.value||T.value)),q=S(()=>o.showWordLimit&&!!u.value.maxlength&&(o.type==="text"||o.type==="textarea")&&!g.value&&!o.readonly&&!o.showPassword),ce=S(()=>Array.from(P.value).length),Be=S(()=>!!q.value&&ce.value>Number(u.value.maxlength)),fe=S(()=>!!l.suffix||!!o.suffixIcon||D.value||o.showPassword||q.value||!!N.value&&H.value),[Ee,Ce]=mr(b);ko(y,f=>{if(!q.value||o.resize!=="both")return;const L=f[0],{width:ie}=L.contentRect;C.value={right:`calc(100% - ${ie+15+6}px)`}});const J=()=>{const{type:f,autosize:L}=o;if(!(!Ne||f!=="textarea"))if(L){const ie=kt(L)?L.minRows:void 0,me=kt(L)?L.maxRows:void 0;M.value=F({},mn(y.value,ie,me))}else M.value={minHeight:mn(y.value).minHeight}},de=()=>{const f=z.value;!f||f.value===P.value||(f.value=P.value)},Pe=f=>{const{el:L}=s.vnode;if(!L)return;const me=Array.from(L.querySelectorAll(`.${c.e(f)}`)).find(ao=>ao.parentNode===L);if(!me)return;const et=r[f];l[et]?me.style.transform=`translateX(${f==="suffix"?"-":""}${L.querySelector(`.${c.be("group",et)}`).offsetWidth}px)`:me.removeAttribute("style")},ve=()=>{Pe("prefix"),Pe("suffix")},Ze=f=>ke(this,null,function*(){Ee();let{value:L}=f.target;if(o.formatter&&(L=o.parser?o.parser(L):L,L=o.formatter(L)),!k.value){if(L===P.value){de();return}n(jt,L),n("input",L),yield ue(),de(),Ce()}}),mt=f=>{n("change", Line truncated
@@ -1 +0,0 @@
var re=Object.defineProperty,ie=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var J=Object.getOwnPropertySymbols;var fe=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var K=(n,e,t)=>e in n?re(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,j=(n,e)=>{for(var t in e||(e={}))fe.call(e,t)&&K(n,t,e[t]);if(J)for(var t of J(e))_e.call(e,t)&&K(n,t,e[t]);return n},G=(n,e)=>ie(n,de(e));var B=(n,e,t)=>new Promise((s,F)=>{var u=r=>{try{x(t.next(r))}catch(d){F(d)}},g=r=>{try{x(t.throw(r))}catch(d){F(d)}},x=r=>r.done?s(r.value):Promise.resolve(r.value).then(u,g);x((t=t.apply(n,e)).next())});import{e as S,Z as me,$ as ne,a0 as z,n as C,av as oe,a9 as T,aa as v,a1 as I,q as _,t as k,x as p,v as E,y as o,P as ae,ax as se,A as a,a4 as w,B as he,F as $,a5 as L,a6 as U,a7 as V,az as pe,I as O,O as q,z as N,r as ve,C as Ee,a3 as Q,H as ye,a2 as ue,aA as ge}from"./index.js";import{u as W,s as X}from"./chunk.6424c2fc.js";import{c as ce,d as Fe,a as Y,E as xe,b as ee,f as te,e as H,_ as be}from"./chunk.a0a5dece.js";import{E as M}from"./chunk.a6a47e72.js";const De={class:"file-checkbox"},Be=["value"],Ce=["title"],$e={class:"thumbnail"},ke={class:"file-name"},Ae={class:"file-date"},we={class:"file-type"},Re={class:"file-size"},Se=S({__name:"file",props:{file:{type:Object,required:!0},index:{type:Number,required:!0}},setup(n){const e=n,t=me.ComputeSize,s=W(),F=ne(),u=z(),g=C(()=>[{name:"\u4E0B\u8F7D",disabled:e.file.fileType==="dir",f:A},{name:"\u79FB\u9664\u6587\u4EF6",f:m},{name:"\u6062\u590D\u6587\u4EF6",f:c}]),x=C(()=>s.checknoxEntries.indexOf(e.file.rootPath)!=-1),r=C(()=>s.copy.type=="move"&&s.copy.values.indexOf(e.file.rootPath)!=-1),d=oe.getFileType,m=()=>{const f=e.file;M.confirm(`\u5220\u9664\u6240\u9009\u7684 ${f.name} \u6587\u4EF6, \u662F\u5426\u7EE7\u7EED?`,"\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>B(this,null,function*(){yield l([f.rootPath])})).catch(()=>{})},l=f=>B(this,null,function*(){try{const y={paths:f.filter(D=>D!=null).map(D=>`/local${D}`),force:!0},R=yield T.File.Basic.Recycle.Remove.POST(y);if(R.data){const{success:D,error:P}=R.data;P&&v.Warning(P),D===0&&(v.Success("\u5220\u9664\u6210\u529F"),s.reload())}}catch(y){v.Error(`${y}`)}}),c=()=>{const f=e.file;M.confirm(`\u6062\u590D\u6240\u9009\u7684 ${f.name} \u6587\u4EF6/\u6587\u4EF6\u5939, \u662F\u5426\u7EE7\u7EED?`,"\u63D0\u793A",{confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88"}).then(()=>B(this,null,function*(){yield i([f.rootPath])})).catch(()=>{})},i=f=>B(this,null,function*(){try{const y={paths:f.filter(D=>D!=null).map(D=>`/local${D}`),force:!0},R=yield T.File.Basic.Recycle.Restore.POST(y);if(R.data){const{success:D,error:P}=R.data;P&&v.Warning(P),D===0&&(v.Success("\u6062\u590D\u6210\u529F"),s.reload())}}catch(y){v.Error(`${y}`)}}),h=()=>{const f=e.file;if(f.fileType==="dir"){b(f);return}},A=()=>{const f=e.file;window.open(f.getDownloadUrl()+"?binary=true","_blank")},b=f=>{let y="/";f.rootPath===void 0?y=`/${f.name}`:y=f.rootPath,F.push({query:G(j({},u.query),{path:y})})};return(f,y)=>{const R=I("thumbnail");return _(),k(Fe,{class:"file",draggable:"true",checkbox:a(x),move:a(r),index:n.index},{default:p(()=>[E(ce,{class:"file-container",list:a(g)},{default:p(()=>[o("div",De,[ae(o("input",{type:"checkbox",value:n.file.rootPath,"onUpdate:modelValue":y[0]||(y[0]=D=>a(s).checknoxEntries=D)},null,8,Be),[[se,a(s).checknoxEntries]])]),o("div",{class:"file-info",onClick:y[1]||(y[1]=he(D=>h(),["prevent"])),title:n.file.name},[o("div",$e,[E(R,{file:n.file},null,8,["file"])]),o("div",ke,w(n.file.name),1)],8,Ce),o("div",Ae,w(n.file.modifiedTime),1),o("div",we,w(a(d)(n.file.iconType)),1),o("div",Re,w(a(t)(n.file.size)),1)]),_:1},8,["list"])]),_:1},8,["checkbox","move","index"])}}}),Te=n=>(L("data-v-582e2fad"),n=n(),U(),n),Oe={class:"notfound"},Pe=Te(()=>o("p",null,"\u5F53\u524D\u76EE\u5F55\u6CA1\u6709\u6587\u4EF6\u54E6",-1)),Ie=S({__name:"notfound",setup(n){const e="/luci-static/linkeasefile/icons/notfound.png";return(t,s)=>(_(),$("div",Oe,[o("img",{src:e,alt:""}),Pe]))}});const qe=V(Ie,[["__scopeId","data-v-582e2fad"]]),Me=S({__name:"files",setup(n){return B(this,null,function*(){let e,t;const s=W(),F=z(),{path:u}=F.query,g=C(()=>s.config),x=()=>B(this,null,function*(){s.checknoxEntries=[];let r=[];try{const d={path:`/local${u||"/"}`,order:X.order.get(),orderBy:X.orderBy.get()};s.config.filter&&s.config.filter!="default"&&(d.filter=s.config.filter);const m=yield T.File.Basic.Recycle.List.POST(d);if(m.data){const{success:l,result:c,error:i}=m.data;l==0&&(r=c.entries||[]),i&&v.Warning(i)}}catch(d){v.Error(`${d}`),console.log(d)}finally{s.entries=oe.FileBasicEntryArray(r),r=[]}});return[e,t]=pe(()=>x()),yield e,t(),(r,d)=>a(s).entries.length>0?(_(),$("div",{key:0,class:N(["files",a(g).model?"list":"model"])},[(_(!0),$(O,null,q(a(s).entries,(m,l)=>(_(),k(Se,{file:m,index:l},null,8,["file","index"]))),256))],2)):(_(),k(qe,{key:1,eLine truncated
@@ -1 +0,0 @@
var u=(c,d,n)=>new Promise((p,r)=>{var s=a=>{try{i(n.next(a))}catch(e){r(e)}},m=a=>{try{i(n.throw(a))}catch(e){r(e)}},i=a=>a.done?p(a.value):Promise.resolve(a.value).then(s,m);i((n=n.apply(c,d)).next())});import{e as S,r as x,aA as D,az as g,t as B,x as y,A as l,a2 as w,q as _,y as o,P as F,bH as I,F as f,O as C,I as b,v as V,a3 as k,bI as q,aM as A,B as N,a9 as P,a4 as T,C as L,a5 as M,a6 as O,aB as h,a7 as z}from"./index.js";import{u as G}from"./chunk.6424c2fc.js";const v=c=>(M("data-v-61900a83"),c=c(),O(),c),H=["onSubmit"],U={class:"form-item"},W=v(()=>o("div",{class:"form-item_label form-required"}," \u6570\u636E\u76EE\u5F55 ",-1)),$={class:"form-item_content"},j=v(()=>o("option",{value:"",selected:""},"\u9009\u62E9\u6570\u636E\u76EE\u5F55",-1)),J=["value"],K={class:"form-btns"},Q=v(()=>o("div",{class:"auto"},null,-1)),R=S({__name:"index",setup(c){return u(this,null,function*(){let d,n;const p=G(),r=x(!1),s=D({dataPath:""}),m=()=>u(this,null,function*(){try{const a=yield P.LocalDevice.Data.GET();if(a.data){const{success:e,result:t}=a.data;t!=null&&t.dataPath&&(s.dataPath=t.dataPath)}}catch(a){}});[d,n]=g(()=>m()),yield d,n();const i=()=>u(this,null,function*(){if(!(s.dataPath==""||s.dataPath==null)){r.value=!0;try{const a={dataPath:s.dataPath},e=yield P.LocalDevice.Data.POST(a);if(e.data){const{success:t,error:E}=e.data;E&&h.Warning(E),t===0&&h.Success("\u4FDD\u5B58\u6210\u529F")}}catch(a){h.Error(`${a}`)}finally{r.value=!1}}});return(a,e)=>(_(),B(l(w),{id:"page"},{default:y(()=>[o("form",{onSubmit:N(i,["prevent"])},[o("div",U,[W,o("div",$,[F(o("select",{placeholder:"\u9009\u62E9\u6570\u636E\u76EE\u5F55","onUpdate:modelValue":e[0]||(e[0]=t=>s.dataPath=t),required:""},[j,(_(!0),f(b,null,C(l(p).menus,t=>(_(),f(b,null,[t.name!="root"?(_(),f("option",{key:0,value:"/local/"+t.name},T(t.name),9,J)):L("",!0)],64))),256))],512),[[I,s.dataPath,void 0,{trim:!0}]])])]),o("div",K,[Q,V(l(A),{type:"primary","native-type":"submit",icon:l(q),loading:r.value,disabled:r.value},{default:y(()=>[k(" \u4FDD\u5B58 ")]),_:1},8,["icon","loading","disabled"])])],40,H)]),_:1}))})}});const aa=z(R,[["__scopeId","data-v-61900a83"]]);export{aa as default};
@@ -1,20 +0,0 @@
var ql=Object.defineProperty,Xl=Object.defineProperties;var Ql=Object.getOwnPropertyDescriptors;var Ft=Object.getOwnPropertySymbols;var Zl=Object.prototype.hasOwnProperty,Jl=Object.prototype.propertyIsEnumerable;var Nt=(e,t,l)=>t in e?ql(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,ae=(e,t)=>{for(var l in t||(t={}))Zl.call(t,l)&&Nt(e,l,t[l]);if(Ft)for(var l of Ft(t))Jl.call(t,l)&&Nt(e,l,t[l]);return e},Re=(e,t)=>Xl(e,Ql(t));var xe=(e,t,l)=>new Promise((n,s)=>{var i=o=>{try{r(l.next(o))}catch(a){s(a)}},c=o=>{try{r(l.throw(o))}catch(a){s(a)}},r=o=>o.done?n(o.value):Promise.resolve(o.value).then(i,c);r((l=l.apply(e,t)).next())});import{a as Te,bf as en,a$ as Xt,aj as tn,aD as me,n as $,am as Qt,ae as lt,ag as rt,c as it,af as At,bj as Ht,r as x,ak as Je,bv as ln,bw as nn,w as ce,ap as Zt,as as le,o as Ae,e as pe,b1 as Jt,h as ie,q as z,t as Se,x as q,y as _,P as ke,ax as et,A as C,F as j,aW as Ke,z as P,S as Me,I as Oe,a3 as Be,a4 as oe,C as we,L as el,_ as je,R as Le,aC as tl,aE as ll,Y as nl,aF as yt,bu as _e,au as on,j as sn,bx as $t,a2 as Ct,E as wt,aN as an,by as rn,u as ol,a1 as he,bz as sl,v as X,O as Wt,a_ as al,p as nt,b7 as un,bA as St,bB as rl,bC as Ye,bD as ut,ay as T,bE as Mt,bF as Ie,V as Tt,b6 as Ot,Q as Bt,bG as cn,H as il,ar as dn,bd as fn,aG as hn,Z as vn,az as pn,a9 as Pt,aB as mn,aa as zt,a7 as ul,a0 as gn,$ as bn}from"./index.js";import{y as yn,b as Cn,E as wn}from"./chunk.a6a47e72.js";import{d as tt}from"./chunk.22632dc4.js";const Ee=new Map;let Dt;Te&&(document.addEventListener("mousedown",e=>Dt=e),document.addEventListener("mouseup",e=>{for(const t of Ee.values())for(const{documentHandler:l}of t)l(e,Dt)}));function It(e,t){let l=[];return Array.isArray(t.arg)?l=t.arg:en(t.arg)&&l.push(t.arg),function(n,s){const i=t.instance.popperRef,c=n.target,r=s==null?void 0:s.target,o=!t||!t.instance,a=!c||!r,u=e.contains(c)||e.contains(r),h=e===c,d=l.length&&l.some(f=>f==null?void 0:f.contains(c))||l.length&&l.includes(r),p=i&&(i.contains(c)||i.contains(r));o||a||u||h||d||p||t.value(n,s)}}const Sn={beforeMount(e,t){Ee.has(e)||Ee.set(e,[]),Ee.get(e).push({documentHandler:It(e,t),bindingFn:t.value})},updated(e,t){Ee.has(e)||Ee.set(e,[]);const l=Ee.get(e),n=l.findIndex(i=>i.bindingFn===t.oldValue),s={documentHandler:It(e,t),bindingFn:t.value};n>=0?l.splice(n,1,s):l.push(s)},unmounted(e){Ee.delete(e)}};var Vt=!1,Fe,ct,dt,Ue,qe,cl,Xe,ft,ht,vt,dl,pt,mt,fl,hl;function re(){if(!Vt){Vt=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),l=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(pt=/\b(iPhone|iP[ao]d)/.exec(e),mt=/\b(iP[ao]d)/.exec(e),vt=/Android/i.exec(e),fl=/FBAN\/\w+;/i.exec(e),hl=/Mobile/i.exec(e),dl=!!/Win64/.exec(e),t){Fe=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Fe&&document&&document.documentMode&&(Fe=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);cl=n?parseFloat(n[1])+4:Fe,ct=t[2]?parseFloat(t[2]):NaN,dt=t[3]?parseFloat(t[3]):NaN,Ue=t[4]?parseFloat(t[4]):NaN,Ue?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),qe=t&&t[1]?parseFloat(t[1]):NaN):qe=NaN}else Fe=ct=dt=qe=Ue=NaN;if(l){if(l[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Xe=s?parseFloat(s[1].replace("_",".")):!0}else Xe=!1;ft=!!l[2],ht=!!l[3]}else Xe=ft=ht=!1}}var gt={ie:function(){return re()||Fe},ieCompatibilityMode:function(){return re()||cl>Fe},ie64:function(){return gt.ie()&&dl},firefox:function(){return re()||ct},opera:function(){return re()||dt},webkit:function(){return re()||Ue},safari:function(){return gt.webkit()},chrome:function(){return re()||qe},windows:function(){return re()||ft},osx:function(){return re()||Xe},linux:function(){return re()||ht},iphone:function(){return re()||pt},mobile:function(){return re()||pt||mt||vt||hl},nativeApp:function(){return re()||fl},android:function(){return re()||vt},ipad:function(){return re()||mt}},xn=gt,Ge=!!(typeof window<"u"&&window.document&&window.document.createElement),En={canUseDOM:Ge,canUseWorkers:typeof Worker<"u",canUseEventListeners:Ge&&!!(window.addEventListener||window.attachEvent),canUseViewport:Ge&&!!window.screen,isInWorker:!Ge},vl=En,pl;vl.canUseDOM&&(pl=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function kn(e,t){if(!vl.canUseDOM||t&&!("addEventListener"in document))return!1;var l="on"+e,n=l in document;if(!n){var s=document.createElement("div");s.setAttribute(l,"return;"),n=typeof s[l]=="function"}return!n&&pl&&e==="wheel"&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var Rn=kn,Kt=10,_t=40,jt=800;function ml(e){var t=0,l=0,n=0,s=0;return"detail"in e&&(l=e.detail),"wheelDelta"in e&&(l=-e.wheelDelta/120),"wheelDeltaY"in e&&(l=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=l,l=0),n=t*Kt,s=l*Kt,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(n=e.deltaX)Line truncated
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/const Fn=function(e,t){if(e&&e.addEventListener){const l=function(n){const s=Ln(n);t&&Reflect.apply(t,this,[n,s])};e.addEventListener("wheel",l,{passive:!0})}},Nn={beforeMount(e,t){Fn(e,t.value)}},An={modelValue:{type:Array,default:()=>[]},disabled:Boolean,min:{type:Number,default:void 0},max:{type:Number,default:void 0},size:Xt,id:{type:String,default:void 0},label:{type:String,default:void 0},fill:{type:String,default:void 0},textColor:{type:String,default:void 0},tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}},gl={modelValue:{type:[Number,String,Boolean],default:()=>{}},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Xt,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},De=()=>{const{form:e,formItem:t}=tn(),l=me("CheckboxGroup",{}),n=$(()=>l&&(l==null?void 0:l.name)==="ElCheckboxGroup"),s=$(()=>t==null?void 0:t.size);return{isGroup:n,checkboxGroup:l,elForm:e,elFormItemSize:s,elFormItem:t}},Hn=(e,{elFormItem:t})=>{const{inputId:l,isLabeledByFormItem:n}=Qt(e,{formItemContext:t});return{isLabeledByFormItem:n,groupId:l}},$n=e=>{const t=x(!1),{emit:l}=le(),{isGroup:n,checkboxGroup:s,elFormItem:i}=De(),c=x(!1);return{model:$({get(){var o,a;return n.value?(o=s.modelValue)==null?void 0:o.value:(a=e.modelValue)!=null?a:t.value},set(o){var a;n.value&&Array.isArray(o)?(c.value=s.max!==void 0&&o.length>s.max.value,c.value===!1&&((a=s==null?void 0:s.changeEvent)==null||a.call(s,o))):(l(lt,o),t.value=o)}}),isGroup:n,isLimitExceeded:c,elFormItem:i}},Wn=(e,t,{model:l})=>{const{isGroup:n,checkboxGroup:s}=De(),i=x(!1),c=Je(s==null?void 0:s.checkboxGroupSize,{prop:!0}),r=$(()=>{const u=l.value;return ln(u)==="[object Boolean]"?u:Array.isArray(u)?u.map(nn).includes(e.label):u!=null?u===e.trueLabel:!!u}),o=Je($(()=>{var u;return n.value?(u=s==null?void 0:s.checkboxGroupSize)==null?void 0:u.value:void 0})),a=$(()=>!!(t.default||e.label));return{isChecked:r,focus:i,size:c,checkboxSize:o,hasOwnLabel:a}},Mn=(e,{model:t,isChecked:l})=>{const{elForm:n,isGroup:s,checkboxGroup:i}=De(),c=$(()=>{var o,a;const u=(o=i.max)==null?void 0:o.value,h=(a=i.min)==null?void 0:a.value;return!!(u||h)&&t.value.length>=u&&!l.value||t.value.length<=h&&l.value});return{isDisabled:$(()=>{var o,a;const u=e.disabled||(n==null?void 0:n.disabled);return(a=s.value?((o=i.disabled)==null?void 0:o.value)||u||c.value:u)!=null?a:!1}),isLimitDisabled:c}},Tn=(e,{model:t})=>{function l(){Array.isArray(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&l()},On=(e,{model:t,isLimitExceeded:l,hasOwnLabel:n,isDisabled:s,isLabeledByFormItem:i})=>{const{elFormItem:c,checkboxGroup:r}=De(),{emit:o}=le();function a(f){var g,b;return f===e.trueLabel||f===!0?(g=e.trueLabel)!=null?g:!0:(b=e.falseLabel)!=null?b:!1}function u(f,g){o("change",a(f),g)}function h(f){if(l.value)return;const g=f.target;o("change",a(g.checked),f)}function d(f){return xe(this,null,function*(){l.value||!n.value&&!s.value&&i.value&&(t.value=a([!1,e.falseLabel].includes(t.value)),yield Ae(),u(t.value,f))})}const p=$(()=>{var f;return((f=r.validateEvent)==null?void 0:f.value)||e.validateEvent});return ce(()=>e.modelValue,()=>{p.value&&(c==null||c.validate("change").catch(f=>Zt()))}),{handleChange:h,onClickRoot:d}},bl={[lt]:e=>rt(e)||it(e)||At(e),change:e=>rt(e)||it(e)||At(e)},Bn={[lt]:e=>Ht(e),change:e=>Ht(e)},yl=(e,t)=>{const{model:l,isGroup:n,isLimitExceeded:s,elFormItem:i}=$n(e),{focus:c,size:r,isChecked:o,checkboxSize:a,hasOwnLabel:u}=Wn(e,t,{model:l}),{isDisabled:h}=Mn(e,{model:l,isChecked:o}),{inputId:d,isLabeledByFormItem:p}=Qt(e,{formItemContext:i,disableIdGeneration:u,disableIdManagement:n}),{handleChange:f,onClickRoot:g}=On(e,{model:l,isLimitExceeded:s,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return Tn(e,{model:l}),{elFormItem:i,inputId:d,isLabeledByFormItem:p,isChecked:o,isDisabled:h,isGroup:n,checkboxSize:a,hasOwnLabel:u,model:l,handleChange:f,onClickRoot:g,focus:c,size:r}},Pn=["tabindex","role","aria-checked"],zn=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],Dn=["id","aria-hidden","disabled","value","name","tabindex"],In={name:"ElCheckbox"},Vn=pe(Re(ae({},In),{props:gl,emits:bl,setup(e){const t=e,l=Jt(),{inputId:n,isLabeledByFormItem:s,isChecked:i,isDisabled:c,checkboxSize:r,hasOwnLabel:o,model:a,handleChange:u,onClickRoot:h,focus:d}=yl(t,l),p=ie("checkbox");return(f,g)=>(z(),Se(el(!C(o)&&C(s)?"span":"label"),{class:P([C(p).b(),C(p).m(C(r)),C(p).is("disabled",C(c)),C(p).is("bordered",f.border),C(p).is("checked",C(i))]),"aria-controls":f.indeterminate?f.controls:null,onClick:C(h)},{default:q(()=>[_("span",{class:P([C(p).e("input"),C(p).is("disabled",C(c)),C(p).is("checked",C(i)),C(p).is("indeterminate",Line truncated
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/var Xn=/["'&<>]/,Qn=Zn;function Zn(e){var t=""+e,l=Xn.exec(t);if(!l)return t;var n,s="",i=0,c=0;for(i=l.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}c!==i&&(s+=t.substring(c,i)),c=i+1,s+=n}return c!==i?s+t.substring(c,i):s}const at=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},Gt=function(e){return e!==null&&typeof e=="object"},Jn=function(e,t,l,n,s){if(!t&&!n&&(!s||Array.isArray(s)&&!s.length))return e;typeof l=="string"?l=l==="descending"?-1:1:l=l&&l<0?-1:1;const i=n?null:function(r,o){return s?(Array.isArray(s)||(s=[s]),s.map(a=>typeof a=="string"?$t(r,a):a(r,o,e))):(t!=="$key"&&Gt(r)&&"$value"in r&&(r=r.$value),[Gt(r)?$t(r,t):r])},c=function(r,o){if(n)return n(r.value,o.value);for(let a=0,u=r.key.length;a<u;a++){if(r.key[a]<o.key[a])return-1;if(r.key[a]>o.key[a])return 1}return 0};return e.map((r,o)=>({value:r,index:o,key:i?i(r,o):null})).sort((r,o)=>{let a=c(r,o);return a||(a=r.index-o.index),a*+l}).map(r=>r.value)},Sl=function(e,t){let l=null;return e.columns.forEach(n=>{n.id===t&&(l=n)}),l},eo=function(e,t){let l=null;for(let n=0;n<e.columns.length;n++){const s=e.columns[n];if(s.columnKey===t){l=s;break}}return l||on("ElTable",`No column matching with column-key: ${t}`),l},Yt=function(e,t,l){const n=(t.className||"").match(new RegExp(`${l}-table_[^\\s]+`,"gm"));return n?Sl(e,n[0]):null},Z=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const l=t.split(".");let n=e;for(const s of l)n=n[s];return`${n}`}else if(typeof t=="function")return t.call(null,e)},Ne=function(e,t){const l={};return(e||[]).forEach((n,s)=>{l[Z(n,t)]={row:n,index:s}}),l};function to(e,t){const l={};let n;for(n in e)l[n]=e[n];for(n in t)if(_e(t,n)){const s=t[n];typeof s!="undefined"&&(l[n]=s)}return l}function xt(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function xl(e){return e===""||e!==void 0&&(e=xt(e),Number.isNaN(e)&&(e=80)),e}function lo(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function no(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,l)=>(...n)=>t(l(...n)))}function Qe(e,t,l){let n=!1;const s=e.indexOf(t),i=s!==-1,c=()=>{e.push(t),n=!0},r=()=>{e.splice(s,1),n=!0};return typeof l=="boolean"?l&&!i?c():!l&&i&&r():i?r():c(),n}function oo(e,t,l="children",n="hasChildren"){const s=c=>!(Array.isArray(c)&&c.length);function i(c,r,o){t(c,r,o),r.forEach(a=>{if(a[n]){t(a,null,o+1);return}const u=a[l];s(u)||i(a,u,o+1)})}e.forEach(c=>{if(c[n]){t(c,null,0);return}const r=c[l];s(r)||i(c,r,0)})}let Ce;function so(e,t,l,n,s){const{nextZIndex:i}=sn(),c=e==null?void 0:e.dataset.prefix,r=e==null?void 0:e.querySelector(`.${c}-scrollbar__wrap`);function o(){const f=s==="light",g=document.createElement("div");return g.className=`${c}-popper ${f?"is-light":"is-dark"}`,l=Qn(l),g.innerHTML=l,g.style.zIndex=String(i()),e==null||e.appendChild(g),g}function a(){const f=document.createElement("div");return f.className=`${c}-popper__arrow`,f}function u(){h&&h.update()}Ce==null||Ce(),Ce=()=>{try{h&&h.destroy(),d&&(e==null||e.removeChild(d)),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseleave",Ce),r==null||r.removeEventListener("scroll",Ce),Ce=void 0}catch(f){}};let h=null;const d=o(),p=a();return d.appendChild(p),h=yn(t,d,ae({strategy:"absolute",modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:p,padding:10}}]},n)),t.addEventListener("mouseenter",u),t.addEventListener("mouseleave",Ce),r==null||r.addEventListener("scroll",Ce),h}const El=(e,t,l,n)=>{let s=0,i=e;if(n){if(n[e].colSpan>1)return{};for(let o=0;o<e;o++)s+=n[o].colSpan;i=s+n[e].colSpan-1}else s=e;let c;const r=l.states.columns;switch(t){case"left":i<l.states.fixedLeafColumnsLength.value&&(c="left");break;case"right":s>=r.value.length-l.states.rightFixedLeafColumnsLength.value&&(c="right");break;default:i<l.states.fixedLeafColumnsLength.value?c="left":s>=r.value.length-l.states.rightFixedLeafColumnsLength.value&&(c="right")}return c?{direction:c,start:s,after:i}:{}},Et=(e,t,l,n,s)=>{const i=[],{direction:c,start:r}=El(t,l,n,s);if(c){const o=c==="left";i.push(`${e}-fixed-column--${c}`),o&&r===n.states.fixedLeafColumnsLength.value-1?i.push("is-last-column"):!o&&r===n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value&&i.push("is-first-column")}return i};function Ut(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const kt=(e,t,l,n)=>{const{direction:s,start:i=0}=El(e,t,l,n);if(!s)return;const c={},r=s==="left",o=l.states.columns.value;return r?c.left=o.slice(0,e).reduce(Ut,0):c.right=o.slice(i+1).reverse().reduce(Ut,0),c},ze=(e,t)=>{!e||Number.isNaN(e[t])||(e[t]=`${e[t]}px`)};function ao(e){const t=le(),l=x(!1),n=x([]);return{updateExpandRowLine truncated
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

@@ -1,20 +0,0 @@
var Rp=Object.defineProperty,Ap=Object.defineProperties;var Lp=Object.getOwnPropertyDescriptors;var ro=Object.getOwnPropertySymbols;var Ha=Object.prototype.hasOwnProperty,ja=Object.prototype.propertyIsEnumerable;var oo=Math.pow,Da=(e,t,n)=>t in e?Rp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ee=(e,t)=>{for(var n in t||(t={}))Ha.call(t,n)&&Da(e,n,t[n]);if(ro)for(var n of ro(t))ja.call(t,n)&&Da(e,n,t[n]);return e},Ue=(e,t)=>Ap(e,Lp(t));var za=(e,t)=>{var n={};for(var r in e)Ha.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ro)for(var r of ro(e))t.indexOf(r)<0&&ja.call(e,r)&&(n[r]=e[r]);return n};var ft=(e,t,n)=>new Promise((r,o)=>{var s=l=>{try{a(n.next(l))}catch(u){o(u)}},i=l=>{try{a(n.throw(l))}catch(u){o(u)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);a((n=n.apply(e,t)).next())});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function Ri(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?o=>!!n[o.toLowerCase()]:o=>!!n[o]}const Up="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Mp=Ri(Up);function Sc(e){return!!e||e===""}function Ne(e){if(X(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=be(r)?Fp(r):Ne(r);if(o)for(const s in o)t[s]=o[s]}return t}else{if(be(e))return e;if(ve(e))return e}}const Ip=/;(?![^(]*\))/g,Bp=/:(.+)/;function Fp(e){const t={};return e.split(Ip).forEach(n=>{if(n){const r=n.split(Bp);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function J(e){let t="";if(be(e))t=e;else if(X(e))for(let n=0;n<e.length;n++){const r=J(e[n]);r&&(t+=r+" ")}else if(ve(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Ww(e){if(!e)return null;let{class:t,style:n}=e;return t&&!be(t)&&(e.class=J(t)),n&&(e.style=Ne(n)),e}function Np(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Yr(e[r],t[r]);return n}function Yr(e,t){if(e===t)return!0;let n=qa(e),r=qa(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Ar(e),r=Ar(t),n||r)return e===t;if(n=X(e),r=X(t),n||r)return n&&r?Np(e,t):!1;if(n=ve(e),r=ve(t),n||r){if(!n||!r)return!1;const o=Object.keys(e).length,s=Object.keys(t).length;if(o!==s)return!1;for(const i in e){const a=e.hasOwnProperty(i),l=t.hasOwnProperty(i);if(a&&!l||!a&&l||!Yr(e[i],t[i]))return!1}}return String(e)===String(t)}function Ai(e,t){return e.findIndex(n=>Yr(n,t))}const tt=e=>be(e)?e:e==null?"":X(e)||ve(e)&&(e.toString===kc||!te(e.toString))?JSON.stringify(e,Cc,2):String(e),Cc=(e,t)=>t&&t.__v_isRef?Cc(e,t.value):Jn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:cr(t)?{[`Set(${t.size})`]:[...t.values()]}:ve(t)&&!X(t)&&!$c(t)?String(t):t,Se={},Yn=[],me=()=>{},Dp=()=>!1,Hp=/^on[^a-z]/,jo=e=>Hp.test(e),Li=e=>e.startsWith("onUpdate:"),He=Object.assign,Ui=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},jp=Object.prototype.hasOwnProperty,ce=(e,t)=>jp.call(e,t),X=Array.isArray,Jn=e=>Jr(e)==="[object Map]",cr=e=>Jr(e)==="[object Set]",qa=e=>Jr(e)==="[object Date]",te=e=>typeof e=="function",be=e=>typeof e=="string",Ar=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",Mi=e=>ve(e)&&te(e.then)&&te(e.catch),kc=Object.prototype.toString,Jr=e=>kc.call(e),zp=e=>Jr(e).slice(8,-1),$c=e=>Jr(e)==="[object Object]",Ii=e=>be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,go=Ri(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},qp=/-(\w)/g,Ct=zo(e=>e.replace(qp,(t,n)=>n?n.toUpperCase():"")),Vp=/\B([A-Z])/g,xn=zo(e=>e.replace(Vp,"-$1").toLowerCase()),qo=zo(e=>e.charAt(0).toUpperCase()+e.slice(1)),gs=zo(e=>e?`on${qo(e)}`:""),Lr=(e,t)=>!Object.is(e,t),_o=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},xo=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Vo=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Va;const Kp=()=>Va||(Va=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let lt;class xc{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&lt&&(this.parent=lt,this.index=(lt.scopes||(lt.scopes=[])).push(this)-1)}run(t){if(this.active){const n=lt;try{return lt=this,t()}finally{lt=n}}Line truncated
`),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
`,...xh(o)),console.warn(...s)}Pn()}function $h(){let e=Sr[Sr.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function xh(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
`],...Oh(n))}),t}function Oh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${kf(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...Ph(e.props),s]:[o+s]}function Ph(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Yc(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Yc(e,t,n){return be(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Pe(t)?(t=Yc(e,de(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):te(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=de(t),n?t:[`${e}=`,t])}function Nt(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){Xr(s,t,n)}return o}function ht(e,t,n,r){if(te(e)){const s=Nt(e,t,n,r);return s&&Mi(s)&&s.catch(i=>{Xr(i,t,n)}),s}const o=[];for(let s=0;s<e.length;s++)o.push(ht(e[s],t,n,r));return o}function Xr(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,a=n;for(;s;){const u=s.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,i,a)===!1)return}s=s.parent}const l=t.appContext.config.errorHandler;if(l){Nt(l,null,10,[e,i,a]);return}}Th(e,n,o,r)}function Th(e,t,n,r=!0){console.error(e)}let Ir=!1,Zs=!1;const We=[];let Pt=0;const Xn=[];let Bt=null,_n=0;const Jc=Promise.resolve();let Vi=null;function jt(e){const t=Vi||Jc;return e?t.then(this?e.bind(this):e):t}function Rh(e){let t=Pt+1,n=We.length;for(;t<n;){const r=t+n>>>1;Br(We[r])<e?t=r+1:n=r}return t}function Ki(e){(!We.length||!We.includes(e,Ir&&e.allowRecurse?Pt+1:Pt))&&(e.id==null?We.push(e):We.splice(Rh(e.id),0,e),Xc())}function Xc(){!Ir&&!Zs&&(Zs=!0,Vi=Jc.then(Qc))}function Ah(e){const t=We.indexOf(e);t>Pt&&We.splice(t,1)}function Zc(e){X(e)?Xn.push(...e):(!Bt||!Bt.includes(e,e.allowRecurse?_n+1:_n))&&Xn.push(e),Xc()}function Qa(e,t=Ir?Pt+1:0){for(;t<We.length;t++){const n=We[t];n&&n.pre&&(We.splice(t,1),t--,n())}}function Gc(e){if(Xn.length){const t=[...new Set(Xn)];if(Xn.length=0,Bt){Bt.push(...t);return}for(Bt=t,Bt.sort((n,r)=>Br(n)-Br(r)),_n=0;_n<Bt.length;_n++)Bt[_n]();Bt=null,_n=0}}const Br=e=>e.id==null?1/0:e.id,Lh=(e,t)=>{const n=Br(e)-Br(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Qc(e){Zs=!1,Ir=!0,We.sort(Lh);const t=me;try{for(Pt=0;Pt<We.length;Pt++){const n=We[Pt];n&&n.active!==!1&&Nt(n,null,14)}}finally{Pt=0,We.length=0,Gc(),Ir=!1,Vi=null,(We.length||Xn.length)&&Qc()}}function Uh(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Se;let o=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in r){const c=`${i==="modelValue"?"model":i}Modifiers`,{number:d,trim:f}=r[c]||Se;f&&(o=n.map(p=>p.trim())),d&&(o=n.map(Vo))}let a,l=r[a=gs(t)]||r[a=gs(Ct(t))];!l&&s&&(l=r[a=gs(xn(t))]),l&&ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ht(u,e,6,o)}}function ef(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!te(e)){const l=u=>{const c=ef(u,t,!0);c&&(a=!0,He(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(ve(e)&&r.set(e,null),null):(X(s)?s.forEach(l=>i[l]=null):He(i,s),ve(e)&&r.set(e,i),i)}function Wo(e,t){return!e||!jo(t)?!1:(t=t.slice(2).replace(/Once$/,""),ce(e,t[0].toLowerCase()+t.slice(1))||ce(e,xn(t))||ce(e,t))}let Ye=null,Yo=null;function Po(e){const t=Ye;return Ye=e,Yo=e&&e.type.__scopeId||null,t}function Jo(e){Yo=e}function Xo(){Yo=null}function re(e,t=Ye,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&dl(-1);const s=Po(t),i=e(...o);return Po(s),r._d&&dl(1),i};return r._n=!0,r._c=!0,r._d=!0,r}function _s(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[i],slots:a,attrs:l,emit:u,render:c,renderCache:d,data:f,setupState:p,ctx:m,inheritAttrs:_}=e;let S,y;const E=Po(e);try{if(n.shapeFlag&4){const x=o||r;S=wt(c.call(x,x,d,s,p,f,m)),y=l}else{const x=t;S=wt(x.length>1?x(s,{attrs:l,slots:a,emit:u}):x(s,null)),y=t.props?l:Ih(l)}}catch(x){$r.length=0,Xr(x,e,1),S=ee(rt)}let w=S;if(y&&_!==!1){const x=Object.keys(y),{shapeFlag:b}=w;x.length&&b&7&&(i&&x.some(Li)&&(y=Bh(y,i)),w=an(w,y))}return n.dirs&&(w=an(w),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),S=w,Po(E),S}function Mh(e){let t;for(let n=0;n<e.length;n++){const r=e[n];if(kn(r)){if(r.type!==rt||r.children==="v-if"){if(t)return;t=r}}else return}return t}const Ih=e=>{let t;for(const n in e)(n==="class"||n==="style"||jo(n))&&((t||(t={}))[n]=e[n]);return t},Bh=(e,t)=>{const n={};for(const r in e)(!Li(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Fh(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?el(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!Wo(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?el(r,i,u):!0:!!i;return!1}function el(e,t,n){const r= Line truncated
* vue-router v4.1.5
* (c) 2022 Eduardo San Martin Morote
* @license MIT
*/const jn=typeof window!="undefined";function w1(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ge=Object.assign;function Es(e,t){const n={};for(const r in t){const o=t[r];n[r]=kt(o)?o.map(e):e(o)}return n}const xr=()=>{},kt=Array.isArray,E1=/\/$/,S1=e=>e.replace(E1,"");function Ss(e,t,n="/"){let r,o={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),o=e(s)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=x1(r!=null?r:t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:i}}function C1(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Pl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function k1(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&rr(t.matched[r],n.matched[o])&&Ff(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function rr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ff(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!$1(e[n],t[n]))return!1;return!0}function $1(e,t){return kt(e)?Tl(e,t):kt(t)?Tl(t,e):e===t}function Tl(e,t){return kt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function x1(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o=n.length-1,s,i;for(s=0;s<r.length;s++)if(i=r[s],i!==".")if(i==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(s-(s===r.length?1:0)).join("/")}var qr;(function(e){e.pop="pop",e.push="push"})(qr||(qr={}));var Or;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Or||(Or={}));function O1(e){if(!e)if(jn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),S1(e)}const P1=/^[^#]+#/;function T1(e,t){return e.replace(P1,"#")+t}function R1(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const ss=()=>({left:window.pageXOffset,top:window.pageYOffset});function A1(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=R1(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Rl(e,t){return(history.state?history.state.position-t:-1)+e}const li=new Map;function L1(e,t){li.set(e,t)}function U1(e){const t=li.get(e);return li.delete(e),t}let M1=()=>location.protocol+"//"+location.host;function Nf(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let a=o.includes(e.slice(s))?e.slice(s).length:1,l=o.slice(a);return l[0]!=="/"&&(l="/"+l),Pl(l,"")}return Pl(n,e)+r+o}function I1(e,t,n,r){let o=[],s=[],i=null;const a=({state:f})=>{const p=Nf(e,location),m=n.value,_=t.value;let S=0;if(f){if(n.value=p,t.value=f,i&&i===m){i=null;return}S=_?f.position-_.position:0}else r(p);o.forEach(y=>{y(n.value,m,{delta:S,type:qr.pop,direction:S?S>0?Or.forward:Or.back:Or.unknown})})};function l(){i=n.value}function u(f){o.push(f);const p=()=>{const m=o.indexOf(f);m>-1&&o.splice(m,1)};return s.push(p),p}function c(){const{history:f}=window;!f.state||f.replaceState(ge({},f.state,{scroll:ss()}),"")}function d(){for(const f of s)f();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c),{pauseListeners:l,listen:u,destroy:d}}function Al(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?ss():null}}function B1(e){const{history:t,location:n}=window,r={value:Nf(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:M1()+e+l;try{t[c?"replaceState":"pushState"](u,"",f),o.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function i(l,u){const c=ge({},t.state,Al(o.value.back,l,o.value.forward,!0),u,{position:o.value.position});s(l,c,!0),r.value=l}function a(l,u){const c=ge({},o.value,t.state,{forward:l,scroll:ss()});s(c.current,c,!0);const d=ge({},Al(r.value,l,null),{position:c.position+1},u);s(l,d,!1),r.value=l}return{location:r,state:o,push:a,replace:i}}function Df(e){e=O1(e);const t=B1(e),n=I1(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=ge({location:"",base:e,go:r,createHref:T1.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function FLine truncated
* pinia v2.0.23
* (c) 2022 Eduardo San Martin Morote
* @license MIT
*/let Xf;const as=e=>Xf=e,Zf=Symbol();function fi(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Pr;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Pr||(Pr={}));function $2(){const e=Oc(!0),t=e.run(()=>W({}));let n=[],r=[];const o=er({install(s){as(o),o._a=s,s.provide(Zf,o),s.config.globalProperties.$pinia=o,r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!k2?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Gf=()=>{};function Vl(e,t,n,r=Gf){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&mt()&&Qo(o),o}function Fn(e,...t){e.slice().forEach(n=>{n(...t)})}function di(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];fi(o)&&fi(r)&&e.hasOwnProperty(n)&&!Pe(r)&&!nn(r)?e[n]=di(o,r):e[n]=r}return e}const x2=Symbol();function O2(e){return!fi(e)||!e.hasOwnProperty(x2)}const{assign:Gt}=Object;function P2(e){return!!(Pe(e)&&e.effect)}function T2(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=o?o():{});const c=Eh(n.state.value[e]);return Gt(c,s,Object.keys(i||{}).reduce((d,f)=>(d[f]=er(K(()=>{as(n);const p=n._s.get(e);return i[f].call(p,p)})),d),{}))}return l=Qf(e,u,t,n,r,!0),l.$reset=function(){const d=o?o():{};this.$patch(f=>{Gt(f,d)})},l}function Qf(e,t,n={},r,o,s){let i;const a=Gt({actions:{}},n),l={deep:!0};let u,c,d=er([]),f=er([]),p;const m=r.state.value[e];!s&&!m&&(r.state.value[e]={}),W({});let _;function S(P){let C;u=c=!1,typeof P=="function"?(P(r.state.value[e]),C={type:Pr.patchFunction,storeId:e,events:p}):(di(r.state.value[e],P),C={type:Pr.patchObject,payload:P,storeId:e,events:p});const T=_=Symbol();jt().then(()=>{_===T&&(u=!0)}),c=!0,Fn(d,C,r.state.value[e])}const y=Gf;function E(){i.stop(),d=[],f=[],r._s.delete(e)}function w(P,C){return function(){as(r);const T=Array.from(arguments),N=[],q=[];function B(Te){N.push(Te)}function ne(Te){q.push(Te)}Fn(f,{args:T,name:P,store:b,after:B,onError:ne});let se;try{se=C.apply(this&&this.$id===e?this:b,T)}catch(Te){throw Fn(q,Te),Te}return se instanceof Promise?se.then(Te=>(Fn(N,Te),Te)).catch(Te=>(Fn(q,Te),Promise.reject(Te))):(Fn(N,se),se)}}const x={_p:r,$id:e,$onAction:Vl.bind(null,f),$patch:S,$reset:y,$subscribe(P,C={}){const T=Vl(d,P,C.detached,()=>N()),N=i.run(()=>Ae(()=>r.state.value[e],q=>{(C.flush==="sync"?c:u)&&P({storeId:e,type:Pr.direct,events:p},q)},Gt({},l,C)));return T},$dispose:E},b=un(x);r._s.set(e,b);const L=r._e.run(()=>(i=Oc(),i.run(()=>t())));for(const P in L){const C=L[P];if(Pe(C)&&!P2(C)||nn(C))s||(m&&O2(C)&&(Pe(C)?C.value=m[P]:di(C,m[P])),r.state.value[e][P]=C);else if(typeof C=="function"){const T=w(P,C);L[P]=T,a.actions[P]=C}}return Gt(b,L),Gt(de(b),L),Object.defineProperty(b,"$state",{get:()=>r.state.value[e],set:P=>{S(C=>{Gt(C,P)})}}),r._p.forEach(P=>{Gt(b,i.run(()=>P({store:b,app:r._a,pinia:r,options:a})))}),m&&s&&n.hydrate&&n.hydrate(b.$state,m),u=!0,c=!0,b}function e9(e,t,n){let r,o;const s=typeof t=="function";typeof e=="string"?(r=e,o=s?n:t):(o=e,r=e.id);function i(a,l){const u=mt();return a=a||u&&Oe(Zf),a&&as(a),a=Xf,a._s.has(r)||(s?Qf(r,t,o,a):T2(r,o,a)),a._s.get(r)}return i.$id=r,i}const R2={},A2={width:"20",height:"20",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L2=A("path",{d:"M44 44V20L24 4L4 20L4 44H16V26H32V44H44Z",fill:"none",stroke:"#333","stroke-width":"4","stroke-linejoin":"round"},null,-1),U2=A("path",{d:"M24 44V34",stroke:"#333","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),M2=[L2,U2];function I2(e,t){return $(),I("svg",A2,M2)}const B2=Le(R2,[["render",I2]]),F2={},N2={width:"20",height:"20",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D2=A("path",{d:"M4 9V41L9 21H39.5V15C39.5 13.8954 38.6046 13 37.5 13H24L19 7H6C4.89543 7 4 7.89543 4 9Z",stroke:"#333","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),H2=A("path",{d:"M40 41L44 21H8.8125L4 41H40Z",fill:"none",stroke:"#333","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),j2=[D2,H2];function z2(e,t){return $(),I("svg",N2,j2)}const q2=Le(F2,[["render",z2]]),V2={},K2={width:"20",height:"20",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},W2=ns('<path d="M5 10L8 13L14 7" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5 24L8 27L14 21" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5 38L8 41L14 35" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 24H43" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 38H43" stroke="#333" stroke-width="4" st Line truncated
M 50 50
m 0 ${x?"":"-"}${w}
a ${w} ${w} 0 1 1 0 ${x?"-":""}${w*2}
a ${w} ${w} 0 1 1 0 ${x?"":"-"}${w*2}
`}),l=K(()=>2*Math.PI*i.value),u=K(()=>t.type==="dashboard"?.75:1),c=K(()=>`${-1*l.value*(1-u.value)/2}px`),d=K(()=>({strokeDasharray:`${l.value*u.value}px, ${l.value}px`,strokeDashoffset:c.value})),f=K(()=>({strokeDasharray:`${l.value*u.value*(t.percentage/100)}px, ${l.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),p=K(()=>{let w;return t.color?w=E(t.percentage):w=n[t.status]||n.default,w}),m=K(()=>t.status==="warning"?ca:t.type==="line"?t.status==="success"?ua:nd:t.status==="success"?ed:Qr),_=K(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),S=K(()=>t.format(t.percentage));function y(w){const x=100/w.length;return w.map((L,P)=>be(L)?{color:L,percentage:(P+1)*x}:L).sort((L,P)=>L.percentage-P.percentage)}const E=w=>{var x;const{color:b}=t;if(te(b))return b(w);if(be(b))return b;{const L=y(b);for(const P of L)if(P.percentage>w)return P.color;return(x=L[L.length-1])==null?void 0:x.color}};return(w,x)=>($(),I("div",{class:J([v(r).b(),v(r).m(w.type),v(r).is(w.status),{[v(r).m("without-text")]:!w.showText,[v(r).m("text-inside")]:w.textInside}]),role:"progressbar","aria-valuenow":w.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[w.type==="line"?($(),I("div",{key:0,class:J(v(r).b("bar"))},[A("div",{class:J(v(r).be("bar","outer")),style:Ne({height:`${w.strokeWidth}px`})},[A("div",{class:J([v(r).be("bar","inner"),{[v(r).bem("bar","inner","indeterminate")]:w.indeterminate}]),style:Ne(v(o))},[(w.showText||w.$slots.default)&&w.textInside?($(),I("div",{key:0,class:J(v(r).be("bar","innerText"))},[pe(w.$slots,"default",{percentage:w.percentage},()=>[A("span",null,tt(v(S)),1)])],2)):le("v-if",!0)],6)],6)],2)):($(),I("div",{key:1,class:J(v(r).b("circle")),style:Ne({height:`${w.width}px`,width:`${w.width}px`})},[($(),I("svg",g6,[A("path",{class:J(v(r).be("circle","track")),d:v(a),stroke:`var(${v(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-width":v(s),fill:"none",style:Ne(v(d))},null,14,_6),A("path",{class:J(v(r).be("circle","path")),d:v(a),stroke:v(p),fill:"none",opacity:w.percentage?1:0,"stroke-linecap":w.strokeLinecap,"stroke-width":v(s),style:Ne(v(f))},null,14,y6)]))],6)),(w.showText||w.$slots.default)&&!w.textInside?($(),I("div",{key:2,class:J(v(r).e("text")),style:Ne({fontSize:`${v(_)}px`})},[pe(w.$slots,"default",{percentage:w.percentage},()=>[w.status?($(),ie(v(et),{key:1},{default:re(()=>[($(),ie(Cn(v(m))))]),_:1})):($(),I("span",b6,tt(v(S)),1))])],6)):le("v-if",!0)],10,v6))}}));var S6=Je(E6,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const Fd=An(S6),C6="ElUpload";class k6 extends Error{constructor(t,n,r,o){super(t),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=o}}function wu(e,t,n){let r;return n.response?r=`${n.response.error||n.response}`:n.responseText?r=`${n.responseText}`:r=`fail to ${t.method} ${e} ${n.status}`,new k6(r,n.status,t.method,e)}function $6(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}const x6=e=>{typeof XMLHttpRequest=="undefined"&&eo(C6,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",s=>{const i=s;i.percent=s.total>0?s.loaded/s.total*100:0,e.onProgress(i)});const r=new FormData;if(e.data)for(const[s,i]of Object.entries(e.data))Array.isArray(i)?r.append(s,...i):r.append(s,i);r.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(wu(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(wu(n,e,t));e.onSuccess($6(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};if(o instanceof Headers)o.forEach((s,i)=>t.setRequestHeader(i,s));else for(const[s,i]of Object.entries(o))pd(i)||t.setRequestHeader(s,String(i));return t.send(r),t},Nd=["text","picture","picture-card"];let O6=1;const Dd=()=>Date.now()+O6++,Hd=Ve({action:{type:String,default:"#"},headers:{type:fe(Object)},method:{type:String,default:"post"},data:{type:Object,default:()=>Io({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},type:{type:String,default:"select"},fileList:{type:fe(Array),default:()=>Io([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Nd,default:"text"},httpRequest:{type:fe(Function),default:x6},disabled:Boolean,limit:Number}),P6=Ve(Ue(Ee({},Hd),{beforeUpload:{type:fe(Function),default:me},beforeRemove:{type:fe(Function)},onRemove:{type:fe(Function),default:me},onChange:{type:fe(Function),default:me},onPreview:{type:fe(Function),default:me},onSuccess:{type:fe(Function),default:me},onProgress:{type:fe(Function),default:me},onError:{type:fe(Function),default:me},onExceed:{type:fe(Function),default:me}})),T6=Ve({files:{type:fe(Array),defau Line truncated
`),function(u){if(a=u.indexOf(":"),s=e.trim(u.substr(0,a)).toLowerCase(),i=e.trim(u.substr(a+1)),s){if(o[s]&&t.indexOf(s)>=0)return;s==="set-cookie"?o[s]=(o[s]?o[s]:[]).concat([i]):o[s]=o[s]?o[s]+", "+i:i}}),o},Us}var Ms,Pu;function u5(){if(Pu)return Ms;Pu=1;var e=Ke;return Ms=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function s(i){var a=i;return n&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=s(window.location.href),function(a){var l=e.isString(a)?s(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),Ms}var Is,Tu;function ps(){if(Tu)return Is;Tu=1;var e=hr,t=Ke;function n(r){e.call(this,r==null?"canceled":r,e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),Is=n,Is}var Bs,Ru;function c5(){return Ru||(Ru=1,Bs=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),Bs}var Fs,Au;function Lu(){if(Au)return Fs;Au=1;var e=Ke,t=n5(),n=r5(),r=Yd,o=ep,s=l5(),i=u5(),a=Gd,l=hr,u=ps(),c=c5();return Fs=function(f){return new Promise(function(m,_){var S=f.data,y=f.headers,E=f.responseType,w;function x(){f.cancelToken&&f.cancelToken.unsubscribe(w),f.signal&&f.signal.removeEventListener("abort",w)}e.isFormData(S)&&e.isStandardBrowserEnv()&&delete y["Content-Type"];var b=new XMLHttpRequest;if(f.auth){var L=f.auth.username||"",P=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";y.Authorization="Basic "+btoa(L+":"+P)}var C=o(f.baseURL,f.url);b.open(f.method.toUpperCase(),r(C,f.params,f.paramsSerializer),!0),b.timeout=f.timeout;function T(){if(!!b){var B="getAllResponseHeaders"in b?s(b.getAllResponseHeaders()):null,ne=!E||E==="text"||E==="json"?b.responseText:b.response,se={data:ne,status:b.status,statusText:b.statusText,headers:B,config:f,request:b};t(function(we){m(we),x()},function(we){_(we),x()},se),b=null}}if("onloadend"in b?b.onloadend=T:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(T)},b.onabort=function(){!b||(_(new l("Request aborted",l.ECONNABORTED,f,b)),b=null)},b.onerror=function(){_(new l("Network Error",l.ERR_NETWORK,f,b,b)),b=null},b.ontimeout=function(){var ne=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",se=f.transitional||a;f.timeoutErrorMessage&&(ne=f.timeoutErrorMessage),_(new l(ne,se.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,f,b)),b=null},e.isStandardBrowserEnv()){var N=(f.withCredentials||i(C))&&f.xsrfCookieName?n.read(f.xsrfCookieName):void 0;N&&(y[f.xsrfHeaderName]=N)}"setRequestHeader"in b&&e.forEach(y,function(ne,se){typeof S=="undefined"&&se.toLowerCase()==="content-type"?delete y[se]:b.setRequestHeader(se,ne)}),e.isUndefined(f.withCredentials)||(b.withCredentials=!!f.withCredentials),E&&E!=="json"&&(b.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&b.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(w=function(B){!b||(_(!B||B&&B.type?new u:B),b.abort(),b=null)},f.cancelToken&&f.cancelToken.subscribe(w),f.signal&&(f.signal.aborted?w():f.signal.addEventListener("abort",w))),S||(S=null);var q=c(C);if(q&&["http","https","file"].indexOf(q)===-1){_(new l("Unsupported protocol "+q+":",l.ERR_BAD_REQUEST,f));return}b.send(S)})},Fs}var Ns,Uu;function f5(){return Uu||(Uu=1,Ns=null),Ns}var Fe=Ke,Mu=e5,Iu=hr,d5=Gd,p5=Qd,h5={"Content-Type":"application/x-www-form-urlencoded"};function Bu(e,t){!Fe.isUndefined(e)&&Fe.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function m5(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Lu()),e}function v5(e,t,n){if(Fe.isString(e))try{return(t||JSON.parse)(e),Fe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var hs={transitional:d5,adapter:m5(),transformRequest:[function(t,n){if(Mu(n,"Accept"),Mu(n,"Content-Type"),Fe.isFormData(t)||Fe.isArrayBuffer(t)||Fe.isBuffer(t)||Fe.isStream(t)||Fe.isFile(t)||Fe.isBlob(t))return t;if(Fe.isArrayBufferView(t))return t.buffer;if(Fe.isURLSearchParams(t))return Bu(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r=Fe.isObject(t),o=n&&n["Content-Type"],s;if((s=Fe.isFileList(t))||r&&o==="multipart/form-data"){var i=this.env&&this.env.FormData;return p5(s?{"files[]":t}:t,i&&new i)}else if(r||o==="application/json")return Bu(n,"application/json"),v5(t);return t}],transformResponse:[function(t){var n=this.transitional||hs.transitional,r=n&&n.silentJSONParsing,o=n&&n.forc Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O7(e,t){if(!!e){if(typeof e=="string")return rc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rc(e,t)}}function rc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P7(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function T7(e){if(Array.isArray(e))return e}function oc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oc(Object(n),!0).forEach(function(r){R7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L7(e,t,n){return t&&sc(e.prototype,t),n&&sc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var U7={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,_onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},Do=function(){function e(t,n){A7(this,e),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return L7(e,[{key:"findPreviousUploads",value:function(){var n=this;return this.options.fingerprint(this.file,this.options).then(function(r){return n._urlStorage.findUploadsByFingerprint(r)})}},{key:"resumeFromPreviousUpload",value:function(n){this.url=n.uploadUrl||null,this._parallelUploadUrls=n.parallelUploadUrls||null,this._urlStorageKey=n.urlStorageKey}},{key:"start",value:function(){var n=this,r=this.file;if(!r){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var o=this.options.retryDelays;if(o!=null&&Object.prototype.toString.call(o)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var s=0,i=["uploadUrl","uploadSize","uploadLengthDeferred"];s<i.length;s++){var a=i[s];if(this.options[a]){this._emitError(new Error("tus: cannot use the ".concat(a," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(r,this.options).then(function(l){return n._fingerprint=l,n._source?n._source:n.options.fileReader.openFile(r,n.options.chunkSize)}).then(function(l){if(n._source=l,n.options.uploadLengthDeferred)n._size=null;else if(n.options.uploadSize!=null){if(n._size=Number(n.options.uploadSize),Number.isNaN(n._size)){n._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if(n._size=n._source.size, Line truncated
\u662F\u5426\u7EE7\u7EED\u91CD\u8BD5?`)){N.start();return}T(q)},onProgress(q,B){s.value=Number((q/B*100).toFixed(2))},onSuccess(){C(!0)}});N.findPreviousUploads().then(q=>{N.start(),E.value=!1}),S=N}))}),b=()=>{!S||(E.value?S.start():S.abort(),E.value=!E.value)};return(L,P)=>($(),ie(v(Bd),{draggable:"","close-on-press-escape":!1,"close-on-click-modal":!1,"destroy-on-close":"",modelValue:r.value,"onUpdate:modelValue":P[0]||(P[0]=C=>r.value=C),width:"800px","before-close":c},{default:re(()=>[ee(v(tb),{drag:"",multiple:"","show-file-list":!1,"on-change":d,"auto-upload":!1,disabled:o.value},{default:re(()=>[ee(v(et),{class:"el-icon--upload"},{default:re(()=>[ee(v(Y4))]),_:1}),_w]),_:1},8,["disabled"]),u.value?($(),I("div",yw,[ee(v(Fd),{"text-inside":!0,"stroke-width":16,percentage:s.value},null,8,["percentage"])])):le("",!0),ee(v(Rd),{"max-height":"400px",class:"files-list"},{default:re(()=>[($(!0),I(Ie,null,ea(i.value,(C,T)=>($(),I("li",bw,[A("span",ww," ["+tt(v(n)(C.size))+"] "+tt(C.name),1),A("button",{onClick:N=>f(T),disabled:o.value},[ee(v(et),null,{default:re(()=>[ee(v(Qr))]),_:1})],8,Ew)]))),256))]),_:1}),A("div",Sw,tt(l.value),1),A("div",Cw,[y.value?($(),ie(v(Tr),{key:0,type:"warning",onClick:b},{default:re(()=>[rn(tt(E.value?"\u6062\u590D":"\u6682\u505C"),1)]),_:1})):le("",!0),o.value?($(),ie(v(Tr),{key:1,type:"danger",disabled:!o.value,onClick:p},{default:re(()=>[rn("\u53D6\u6D88\u4E0A\u4F20")]),_:1},8,["disabled"])):le("",!0),i.value&&i.value.length>0?($(),ie(v(Tr),{key:2,type:"primary",disabled:o.value,onClick:m},{default:re(()=>[rn(" \u4E0A\u4F20")]),_:1},8,["disabled"])):le("",!0)])]),_:1},8,["modelValue"]))}});const $w=Le(kw,[["__scopeId","data-v-a70de484"]]),xw={install(e){const t=n=>{const r=document.createElement("div");document.body.appendChild(r);const o=()=>{nr(null,r),r.remove()},s=(n==null?void 0:n.files)||[],i=(n==null?void 0:n.destination)||"";return new Promise((a,l)=>{const u=ee($w,{files:s||[],destination:i,success:()=>{o(),a(!0)},close:()=>{o(),l()}});u.appContext=e._context,nr(u,r)})};e.config.globalProperties.$uploadFile=t}},Pp=e=>{let t=e.split("/"),n=t.length;for(let r=0;r<n;r++)t[r]=encodeURIComponent(t[r]);return t.join("/")},Ow=e=>{for(let t=0;t<e.length;t++)e[t].getDownloadUrl=()=>"/cgi-bin/luci/linkease/fileserve/local"+Pp(`${e[t].rootPath}`),e[t].getSuffixName=()=>e[t].name.split(".").splice(-1)[0],e[t].getAbsPath=()=>{var r;const n=((r=e[t].rootPath)==null?void 0:r.split("/"))||[];return n.splice(0,n.length-1).join("/")||"/"};return e},Ti=e=>{let t=e.split(".");return t.length>0?t[t.length-1]=="heic":!1},Pw=e=>{switch(e){case"video":return"\u89C6\u9891";case"music":return"\u97F3\u9891";case"doc":return"\u6587\u6863";case"dir":return"\u6587\u4EF6\u5939";case"image":return"\u56FE\u50CF";case"archive":return"\u538B\u7F29\u6587\u4EF6";case"other":return"\u5176\u4ED6\u6587\u4EF6";default:return""}},Tw=(e,t)=>{const n=[],r=e.length;for(let o=t;o<r;o++)if(e[o].iconType==="image"){let s=e[o].getDownloadUrl();Ti(e[o].name)&&(s+="?heic=yes"),n.push(s)}for(let o=0;o<r;o++)if(e[o].iconType==="image"){let s=e[o].getDownloadUrl();Ti(e[o].name)&&(s+="?heic=yes"),n.push(s)}return n},Rw=Object.freeze(Object.defineProperty({__proto__:null,EncodeURL:Pp,FileBasicEntryArray:Ow,isHeic:Ti,getFileType:Pw,getEntriesImages:Tw},Symbol.toStringTag,{value:"Module"})),Aw=Ee({},Rw),Lw={class:"f"},Uw={class:"r"},Mw={class:"children"},Iw=$e({__name:"file",props:{item:{type:Object,required:!0}},setup(e){const t=e,n=W(!1),r=W(!1),o=K(()=>t.item.rootPath||`/${t.item.name}`),s=Oe("select"),i=Oe("path"),a=l=>{n.value=!n.value,r.value=!0,s(l,o.value)};return(l,u)=>{const c=yo("thumbnail"),d=yo("icon-top"),f=yo("icon-down");return $(),I(Ie,null,[A("li",{class:J(["entrie-item",{on:v(i)==v(o)}]),onClick:u[0]||(u[0]=p=>a(e.item))},[A("div",Lw,[ee(c,{file:e.item},null,8,["file"]),A("span",null,tt(e.item.name),1)]),A("div",Uw,[n.value?($(),ie(d,{key:0})):($(),ie(f,{key:1}))])],2),Zr(A("div",Mw,[r.value?($(),ie(Tp,{key:0,path:v(o)},null,8,["path"])):le("",!0)],512),[[Gr,n.value]])],64)}}});const Bw=Le(Iw,[["__scopeId","data-v-f8376cdf"]]),Tp=$e({__name:"files",props:{path:{type:String,default:"/"}},setup(e){return ft(this,null,function*(){let t,n;const r=e,o=W([]),s=()=>ft(this,null,function*(){try{const i={path:`/local${r.path}`,filter:"dir"},a=yield N5.File.Basic.List.POST(i);if(a.data){const{success:l,result:u,error:c}=a.data;l==0&&(o.value=Aw.FileBasicEntryArray(u.entries||[]))}}catch(i){console.log(i)}finally{}});return[t,n]=M0(()=>s()),yield t,n(),(i,a)=>($(!0),I(Ie,null,ea(o.value,l=>($(),I("ul",{key:l.rootPath},[ee(Bw,{item:l},null,8,["item"])]))),128))})}}),Fw=e=>(Jo("data-v-537135b0"),e=e(),Xo(),e),Nw={class:"select-container"},Dw={class:"select-header"},Hw=Fw(()=>A("span",null," \u5DF2\u9009\u62E9:",-1)),jw={class:"select-footer"},zw=$e({__name:"app",props:{success:{type:Function,required:!0},close:{type:Function,required:!0}},setup(e){const t=e,n=W(!0);nt("success",t.success),nt("close",t.close);const r= Line truncated
@@ -1 +0,0 @@
@charset "UTF-8";#main[data-v-56bb5d38]{width:100%;height:100%;display:flex;flex-wrap:wrap}:root{--color: #fff;--text-color: #333;--desc-color: #999;--active-color: #409eff;--clear-color: #f89898}@media (prefers-color-scheme: light){:root{--color: #fff;--text-color: #333;--desc-color: #999;--active-color: #409eff;--clear-color: #f89898}}@media (prefers-color-scheme: dark){:root{--color: #fff;--text-color: #333;--desc-color: #999;--active-color: #409eff;--clear-color: #f89898}}@media (prefers-color-scheme: no-preference){:root{--color: #fff;--text-color: #333;--desc-color: #999;--active-color: #409eff;--clear-color: #f89898}}*{-webkit-box-sizing:border-box;-webkit-tap-highlight-color:transparent;box-sizing:border-box;word-wrap:break-word;outline:none;-webkit-font-smoothing:subpixel-antialiased}body{font-size:12px;font-weight:500;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0;-moz-osx-font-smoothing:grayscale}html,body,ul,p{margin:0;padding:0}html,body{width:100%;height:100%;position:relative;-webkit-overflow-scrolling:touch;overflow:hidden}a{color:#2271b1;cursor:pointer;text-decoration:none}i{font-style:normal}img{object-fit:cover}img:not([src]){opacity:0}li{list-style:none}input,button{outline:none;cursor:pointer;border:none}#app{width:100%;height:100%;position:relative}.auto{flex:auto}svg.icon{width:100%;height:100%}:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","\5fae\8f6f\96c5\9ed1",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier:cubic-bezier(.23, 1, .32, 1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px}:root{color-scheme:light;--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#ffffff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-bordeLine truncated
@@ -1,205 +0,0 @@
-- Copyright 2022 xiaobao <xiaobao@linkease.com>
-- Licensed to the public under the MIT License
local http = require "luci.http"
local nixio = require "nixio"
local ltn12 = require "luci.ltn12"
local table = require "table"
local util = require "luci.util"
module("luci.controller.linkease_file", package.seeall)
local BLOCKSIZE = 2048
local LINKEASE_UNIX = "/var/run/linkease.sock"
function index()
entry({"linkease"}, call("linkease_backend")).leaf=true
local e = entry({"admin", "services", "linkease", "file"}, call("linkease_file_template"))
e.leaf = true
e.dependent = false
end
function get_params(name)
local data = {
prefix=luci.dispatcher.build_url(unpack({"admin", "services", "linkease", name})),
}
return data
end
function linkease_file_template()
luci.template.render("linkease/file", get_params("file"))
end
local function sink_socket(sock, io_err)
if sock then
return function(chunk, err)
if not chunk then
return 1
else
return sock:send(chunk)
end
end
else
return ltn12.sink.error(io_err or "unable to send socket")
end
end
local function session_retrieve(sid, allowed_users)
local sdat = util.ubus("session", "get", { ubus_rpc_session = sid })
if type(sdat) == "table" and
type(sdat.values) == "table" and
type(sdat.values.token) == "string" and
(not allowed_users or
util.contains(allowed_users, sdat.values.username))
then
return sid, sdat.values
end
return nil, nil
end
local function get_session()
local sid
local key
local sdat
for _, key in ipairs({"sysauth_https", "sysauth_http", "sysauth"}) do
sid = http.getcookie(key)
if sid then
sid, sdat = session_retrieve(sid, nil)
if sid and sdat then
return sid, sdat
end
end
end
return nil, nil
end
local function chunksource(sock, buffer)
buffer = buffer or ""
return function()
local output
local _, endp, count = buffer:find("^([0-9a-fA-F]+);?.-\r\n")
while not count and #buffer <= 1024 do
local newblock, code = sock:recv(1024 - #buffer)
if not newblock then
return nil, code
end
buffer = buffer .. newblock
_, endp, count = buffer:find("^([0-9a-fA-F]+);?.-\r\n")
end
count = tonumber(count, 16)
if not count then
return nil, -1, "invalid encoding"
elseif count == 0 then
return nil
elseif count + 2 <= #buffer - endp then
output = buffer:sub(endp+1, endp+count)
buffer = buffer:sub(endp+count+3)
return output
else
output = buffer:sub(endp+1, endp+count)
buffer = ""
if count - #output > 0 then
local remain, code = sock:recvall(count-#output)
if not remain then
return nil, code
end
output = output .. remain
count, code = sock:recvall(2)
else
count, code = sock:recvall(count+2-#buffer+endp)
end
if not count then
return nil, code
end
return output
end
end
end
function linkease_backend()
local sock = nixio.socket("unix", "stream")
if sock:connect(LINKEASE_UNIX) ~= true then
http.status(500, "connect failed")
return
end
local input = {}
input[#input+1] = http.getenv("REQUEST_METHOD") .. " " .. http.getenv("REQUEST_URI") .. " HTTP/1.1"
local req = http.context.request
local start = "HTTP_"
local start_len = string.len(start)
local ctype = http.getenv("CONTENT_TYPE")
if ctype then
input[#input+1] = "Content-Type: " .. ctype
end
for k, v in pairs(req.message.env) do
if string.sub(k, 1, start_len) == start and not string.find(k, "FORWARDED") then
input[#input+1] = string.sub(k, start_len+1, string.len(k)) .. ": " .. v
end
end
local sid, sdat = get_session()
if sdat ~= nil then
input[#input+1] = "X-Forwarded-Sid: " .. sid
input[#input+1] = "X-Forwarded-Token: " .. sdat.token
end
-- input[#input+1] = "X-Forwarded-For: " .. http.getenv("REMOTE_HOST") ..":".. http.getenv("REMOTE_PORT")
local num = tonumber(http.getenv("CONTENT_LENGTH")) or 0
input[#input+1] = "Content-Length: " .. tostring(num)
input[#input+1] = "\r\n"
local source = ltn12.source.cat(ltn12.source.string(table.concat(input, "\r\n")), http.source())
local ret = ltn12.pump.all(source, sink_socket(sock, "write sock error"))
if ret ~= 1 then
sock:close()
http.status(500, "proxy error")
return
end
local linesrc = sock:linesource()
local line, code, error = linesrc()
if not line then
sock:close()
http.status(500, "response parse failed")
return
end
local protocol, status, msg = line:match("^([%w./]+) ([0-9]+) (.*)")
if not protocol then
sock:close()
http.status(500, "response protocol error")
return
end
num = tonumber(status) or 0
http.status(num, msg)
local allow_ranges = http.getenv("SERVER_SOFTWARE") ~= "uhttpd"
local chunked = 0
line = linesrc()
while line and line ~= "" do
local key, val = line:match("^([%w-]+)%s?:%s?(.*)")
if key and key ~= "Status" then
if key == "Transfer-Encoding" and val == "chunked" then
chunked = 1
end
if key ~= "Connection" and key ~= "Transfer-Encoding" and ( allow_ranges or (key ~= "Content-Length" and key ~= "Accept-Ranges") ) then
http.header(key, val)
end
end
line = linesrc()
end
if not line then
sock:close()
http.status(500, "parse header failed")
return
end
local body_buffer = linesrc(true)
if chunked == 1 then
ltn12.pump.all(chunksource(sock, body_buffer), http.write)
else
local body_source = ltn12.source.cat(ltn12.source.string(body_buffer), sock:blocksource())
ltn12.pump.all(body_source, http.write)
end
sock:close()
end
@@ -1,25 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
<meta name="viewport" content="width=1380" />
<title>易有云文件管理</title>
<script>
(function () {
var pathe_prefix = "<%=prefix%>"
window.path_base = pathe_prefix
window.ver = "<%# PKG_VERSION %>"
})();
</script>
<script type="module" crossorigin src="/luci-static/linkeasefile/index.js<%# ?v=PKG_VERSION %>"></script>
<link rel="stylesheet" href="/luci-static/linkeasefile/style.css<%# ?v=PKG_VERSION %>">
</head>
<body>
<div id="app"></div>
</body>
</html>
@@ -1,4 +0,0 @@
#!/bin/sh
rm -f /tmp/luci-indexcache /tmp/luci-indexcache.*
exit 0