@graphql-yoga/graphiql 4.4.2-alpha-20251101180658-121a0ec833dc525c425b15de2e8d6aba32e5e0a6 → 4.4.2-alpha-20251103012707-ac6946c441a4ccd09602caf554067c2928ed08ab

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167909,8 +167909,7 @@ var mT;
167909
167909
  i[i.NO_ACTION = 0] = "NO_ACTION", i[i.CLOSE_PICKER = 1] = "CLOSE_PICKER", i[i.REFRESH_PICKER = 2] = "REFRESH_PICKER", i[i.REMOVE_ITEM = 3] = "REMOVE_ITEM";
167910
167910
  })(mT || (mT = {}));
167911
167911
  function lY(i) {
167912
- const e = i;
167913
- return Array.isArray(e.items);
167912
+ return Array.isArray(i.items);
167914
167913
  }
167915
167914
  function cEe(i) {
167916
167915
  const e = i;
@@ -1342,7 +1342,7 @@ ${e.toString()}`}}class b7{constructor(e=new JT,t=!1,n,s=JIt){this._services=e,t
1342
1342
  `));const b=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return c9.fromFn(async()=>{const y=await b.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},Ii.None);if(!y.identical)return new rHt(fi.fromRangeInclusive(c),h(d),y.changes)})}),this._fetchStore=this._register(new Fe),this._inlineEditsFetchResult=rP(this,void 0),this._inlineEdits=pd({owner:this,equalsFn:a9},l=>this._inlineEditsFetchResult.read(l)?.completions.map(u=>new cHt(u))??[]),this._fetchInlineEditsPromise=sNe({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:Kf.Automatic}),handleChange:(l,u)=>(l.didChange(this._forceUpdateExplicitlySignal)&&(u.inlineCompletionTriggerKind=Kf.Explicit),!0)},async(l,u)=>{this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(l),this._textModelVersionId.read(l);function c(b,y){return y(b)}const d=this._pinnedRange.range.read(l)??c(this._selection.read(l),b=>b.isEmpty()?void 0:b);if(!d){this._inlineEditsFetchResult.set(void 0,void 0),this.userPrompt.set(void 0,void 0);return}const h={triggerKind:u.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(l)},f=ez(this._fetchStore);await U0(200,f);const g=await E3e(this.languageFeaturesService.inlineCompletionsProvider,d,this.textModel,h,f);f.isCancellationRequested||this._inlineEditsFetchResult.set(g,void 0)}),this._filteredInlineEditItems=pd({owner:this,equalsFn:o9()},l=>this._inlineEdits.read(l)),this.selectedInlineCompletionIndex=Ht(this,l=>{const u=this._selectedInlineCompletionId.read(l),c=this._filteredInlineEditItems.read(l),d=this._selectedInlineCompletionId===void 0?-1:c.findIndex(h=>h.semanticId===u);return d===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):d}),this.selectedInlineEdit=Ht(this,l=>{const u=this._filteredInlineEditItems.read(l),c=this.selectedInlineCompletionIndex.read(l);return u[c]}),this._register(LT(this._fetchInlineEditsPromise))}async triggerExplicitly(e){dw(e,t=>{this._isActive.set(!0,t),this._forceUpdateExplicitlySignal.trigger(t)}),await this._fetchInlineEditsPromise.get()}stop(e){dw(e,t=>{this.userPrompt.set(void 0,t),this._isActive.set(!1,t),this._inlineEditsFetchResult.set(void 0,t),this._pinnedRange.setRange(void 0,t)})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineEditItems.get()||[];if(t.length>0){const n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new kn;const t=this.selectedInlineEdit.get();t&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}},CR=kx,kx._modelId=0,kx);Jae=CR=uHt([Zae(4,Tt),Zae(5,yM),Zae(6,Ls)],Jae);class cHt{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}}class dHt extends ye{constructor(e,t){super(),this._textModel=e,this._versionId=t,this._decorations=Bi(this,[]),this.range=Ht(this,n=>{this._versionId.read(n);const s=this._decorations.read(n)[0];return s?this._textModel.getDecorationRange(s)??null:null}),this._register(zt(()=>{this._textModel.deltaDecorations(this._decorations.get(),[])}))}setRange(e,t){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),t)}}var hHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},wR=function(i,e){return function(t,n){e(t,n,i)}},ele;let B_=(Lx=class extends ye{static get(e){return e.getContribution(ele.ID)}constructor(e,t,n,s,r,o){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=n,this._debounceService=s,this._languageFeaturesService=r,this._configurationService=o,this._enabled=vFt("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=wc(this.editor),this._selection=Ht(this,a=>this._editorObs.cursorSelection.read(a)??new Pt(1,1,1,1)),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=Ml(this,a=>{if(!this._enabled.read(a)||this._editorObs.isReadonly.read(a))return;const l=this._editorObs.model.read(a);return l?this._instantiationService.createInstance(Cc(Jae,a),l,this._editorObs.versionId,this._selection,this._debounceValue):void 0}),this._hadInlineEdit=uP(this,(a,l)=>l||this.model.read(a)?.inlineEdit.read(a)!==void 0),this._widget=Ml(this,a=>{if(this._hadInlineEdit.read(a))return this._instantiationService.createInstance(Cc(Qae,a),this.editor,this.model.map((l,u)=>l?.inlineEdit.read(u)),fHt(l=>this.model.read(l)?.userPrompt??Bi("empty","")))}),this._register($p(sk,this._contextKeyService,a=>!!this.model.read(a)?.inlineEdit.read(a))),this._register($p(tHt,this._contextKeyService,a=>!!this.model.read(a)?.isPinned.read(a))),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}},ele=Lx,Lx.ID="editor.contrib.inlineEditsController",Lx);B_=ele=hHt([wR(1,jt),wR(2,ri),wR(3,cd),wR(4,Tt),wR(5,Fi)],B_);function fHt(i){return oP(void 0,e=>i(e).read(e),(e,t)=>{i(void 0).set(e,t)})}function SR(i){return{label:i.value,alias:i.original}}const r$=class r$ extends wt{constructor(){super({id:r$.ID,...SR(ui("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:Be.and(Q.writable,sk),kbOpts:{weight:100,primary:606}})}async run(e,t){B_.get(t)?.model.get()?.next()}};r$.ID=eHt;let tle=r$;const o$=class o$ extends wt{constructor(){super({id:o$.ID,...SR(ui("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:Be.and(Q.writable,sk),kbOpts:{weight:100,primary:604}})}async run(e,t){B_.get(t)?.model.get()?.previous()}};o$.ID=JWt;let ile=o$;class pHt extends wt{constructor(){super({id:"editor.action.inlineEdits.trigger",...SR(ui("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:Q.writable})}async run(e,t){const n=B_.get(t);await nNe(async s=>{await n?.model.get()?.triggerExplicitly(s)})}}class gHt extends wt{constructor(){super({id:ZWt,...SR(ui("action.inlineEdits.accept","Accept Inline Edit")),precondition:sk,menuOpts:{menuId:Nt.InlineEditsActions,title:w("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:et.check},kbOpts:{primary:2058,weight:2e4,kbExpr:sk}})}async run(e,t){t instanceof kf&&(t=t.getParentEditor());const n=B_.get(t);n&&(n.model.get()?.accept(n.editor),n.editor.focus())}}const a$=class a$ extends wt{constructor(){super({id:a$.ID,...SR(ui("action.inlineEdits.hide","Hide Inline Edit")),precondition:sk,kbOpts:{weight:100,primary:9}})}async run(e,t){const n=B_.get(t);dr(s=>{n?.model.get()?.stop(s)})}};a$.ID="editor.action.inlineEdits.hide";let nle=a$;fn(B_.ID,B_,3),Ye(pHt),Ye(tle),Ye(ile),Ye(gHt),Ye(nle);const yS={Visible:new gt("parameterHintsVisible",!1),MultipleSignatures:new gt("parameterHintsMultipleSignatures",!1)};async function y4e(i,e,t,n,s){const r=i.ordered(e);for(const o of r)try{const a=await o.provideSignatureHelp(e,t,s,n);if(a)return a}catch(a){kr(a)}}dn.registerCommand("_executeSignatureHelpProvider",async(i,...e)=>{const[t,n,s]=e;mn(Gt.isUri(t)),mn(me.isIPosition(n)),mn(typeof s=="string"||!s);const r=i.get(Tt),o=await i.get(Iu).createModelReference(t);try{const a=await y4e(r.signatureHelpProvider,o.object.textEditorModel,me.lift(n),{triggerKind:bg.Invoke,isRetrigger:!1,triggerCharacter:s},Ii.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{o.dispose()}});var dy;(function(i){i.Default={type:0};class e{constructor(s,r){this.request=s,this.previouslyActiveHints=r,this.type=2}}i.Pending=e;class t{constructor(s){this.hints=s,this.type=1}}i.Active=t})(dy||(dy={}));const l$=class l$ extends ye{constructor(e,t,n=l$.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new _e),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=dy.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Io),this.triggerChars=new o8,this.retriggerChars=new o8,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new th(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(s=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(s=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(s=>this.onCursorChange(s))),this._register(this.editor.onDidChangeModelContent(s=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(s=>this.onDidType(s))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=dy.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const n=this.editor.getModel();if(!n||!this.providers.has(n))return;const s=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(s),t).catch(bi)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,s=this.editor.getOption(86).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,s=this.editor.getOption(86).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new dy.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const s=this._pendingTriggers.reduce(mHt);this._pendingTriggers=[];const r={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),a=this.editor.getPosition();this.state=new dy.Pending(Bo(l=>y4e(this.providers,o,a,r,l)),n);try{const l=await this.state.request;return e!==this.triggerId?(l?.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new dy.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=dy.Default),bi(l),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const n of t.signatureHelpTriggerCharacters||[])if(n.length){const s=n.charCodeAt(0);this.triggerChars.add(s),this.retriggerChars.add(s)}for(const n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:bg.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:bg.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:bg.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};l$.DEFAULT_DELAY=120;let sle=l$;function mHt(i,e){switch(e.triggerKind){case bg.Invoke:return e;case bg.ContentChange:return i;case bg.TriggerCharacter:default:return e}}var _Ht=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},jV=function(i,e){return function(t,n){e(t,n,i)}},rle;const Td=it,bHt=Ps("parameter-hints-next",et.chevronDown,w("parameterHintsNextIcon","Icon for show next parameter hint.")),yHt=Ps("parameter-hints-previous",et.chevronUp,w("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let ole=(Ax=class extends ye{constructor(e,t,n,s,r,o){super(),this.editor=e,this.model=t,this.telemetryService=o,this.renderDisposeables=this._register(new Fe),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new l_({editor:e},r,s)),this.keyVisible=yS.Visible.bindTo(n),this.keyMultipleSignatures=yS.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){const e=Td(".editor-widget.parameter-hints-widget"),t=qe(e,Td(".phwrapper"));t.tabIndex=-1;const n=qe(t,Td(".controls")),s=qe(n,Td(".button"+ni.asCSSSelector(yHt))),r=qe(n,Td(".overloads")),o=qe(n,Td(".button"+ni.asCSSSelector(bHt)));this._register(Ie(s,"click",h=>{rn.stop(h),this.previous()})),this._register(Ie(o,"click",h=>{rn.stop(h),this.next()}));const a=Td(".body"),l=new UI(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());const u=qe(a,Td(".signature")),c=qe(a,Td(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:u,overloads:r,docs:c,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));const d=()=>{if(!this.domNodes)return;const h=this.editor.getOption(50),f=this.domNodes.element;f.style.fontSize=`${h.fontSize}px`,f.style.lineHeight=`${h.lineHeight/h.fontSize}`,f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",h.fontFamily),f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",eu.fontFamily)};d(),this._register(rt.chain(this.editor.onDidChangeConfiguration.bind(this.editor),h=>h.filter(f=>f.hasChanged(50)))(d)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes?.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=qe(this.domNodes.signature,Td(".code")),r=n.parameters.length>0,o=n.activeParameter??e.activeParameter;if(r)this.renderParameters(s,n,o);else{const u=qe(s,Td("span"));u.textContent=n.label}const a=n.parameters[o];if(a?.documentation){const u=Td("span.documentation");if(typeof a.documentation=="string")u.textContent=a.documentation;else{const c=this.renderMarkdownDocs(a.documentation);u.appendChild(c.element)}qe(this.domNodes.docs,Td("p",{},u))}if(n.documentation!==void 0)if(typeof n.documentation=="string")qe(this.domNodes.docs,Td("p",{},n.documentation));else{const u=this.renderMarkdownDocs(n.documentation);qe(this.domNodes.docs,u.element)}const l=this.hasDocs(n,a);if(this.domNodes.signature.classList.toggle("has-docs",l),this.domNodes.docs.classList.toggle("empty",!l),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,a){let u="";const c=n.parameters[o];Array.isArray(c.label)?u=n.label.substring(c.label[0],c.label[1]):u=c.label,c.documentation&&(u+=typeof c.documentation=="string"?`, ${c.documentation}`:`, ${c.documentation.value}`),n.documentation&&(u+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==u&&(au(w("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=new qo,n=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));n.element.classList.add("markdown-docs");const s=t.elapsed();return s>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:s}),n}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Ab(t.documentation).length>0||t&&typeof t.documentation=="object"&&Ab(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Ab(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Ab(e.documentation.value).length>0)}renderParameters(e,t,n){const[s,r]=this.getParameterLabelOffsets(t,n),o=document.createElement("span");o.textContent=t.label.substring(0,s);const a=document.createElement("span");a.textContent=t.label.substring(s,r),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(r),qe(e,o,a,l)}getParameterLabelOffsets(e,t){const n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){const s=new RegExp(`(\\W|^)${td(n.label)}(?=\\W|$)`,"g");s.test(e.label);const r=s.lastIndex-n.label.length;return r>=0?[r,s.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return rle.ID}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}},rle=Ax,Ax.ID="editor.widget.parameterHintsWidget",Ax);ole=rle=_Ht([jV(2,ri),jV(3,Fu),jV(4,Zs),jV(5,al)],ole),ie("editorHoverWidget.highlightForeground",UE,w("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var vHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},v4e=function(i,e){return function(t,n){e(t,n,i)}},ale;let ok=(Nx=class extends ye{static get(e){return e.getContribution(ale.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new sle(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(s=>{s?(this.widget.value.show(),this.widget.value.render(s)):this.widget.rawValue?.hide()})),this.widget=new gp(()=>this._register(t.createInstance(ole,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}},ale=Nx,Nx.ID="editor.controller.parameterHints",Nx);ok=ale=vHt([v4e(1,jt),v4e(2,Tt)],ok);class CHt extends wt{constructor(){super({id:"editor.action.triggerParameterHints",label:w("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:Q.hasSignatureHelpProvider,kbOpts:{kbExpr:Q.editorTextFocus,primary:3082,weight:100}})}run(e,t){ok.get(t)?.trigger({triggerKind:bg.Invoke})}}fn(ok.ID,ok,2),Ye(CHt);const lle=175,ule=ko.bindToContribution(ok.get);ht(new ule({id:"closeParameterHints",precondition:yS.Visible,handler:i=>i.cancel(),kbOpts:{weight:lle,kbExpr:Q.focus,primary:9,secondary:[1033]}})),ht(new ule({id:"showPrevParameterHint",precondition:Be.and(yS.Visible,yS.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:lle,kbExpr:Q.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),ht(new ule({id:"showNextParameterHint",precondition:Be.and(yS.Visible,yS.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:lle,kbExpr:Q.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var wHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},SHt=function(i,e){return function(t,n){e(t,n,i)}};class xHt{constructor(e){this.instantiationService=e}init(...e){}}function DHt(i,e){return class extends e{constructor(){super(...arguments),this._autorun=void 0}init(...n){this._autorun=Bu((s,r)=>{const o=Cc(i(),s);r.add(this.instantiationService.createInstance(o,...n))})}dispose(){this._autorun?.dispose()}}}function EHt(i){return Z7()?DHt(i,cle):i()}let cle=class extends xHt{constructor(e,t){super(t),this.init(e)}};cle=wHt([SHt(1,jt)],cle),fn(vR.ID,EHt(()=>vR),0),ie("editor.placeholder.foreground",Vkt,w("placeholderForeground","Foreground color of the placeholder text in the editor."));var THt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},qV=function(i,e){return function(t,n){e(t,n,i)}};const ak=new gt("renameInputVisible",!1,w("renameInputVisible","Whether the rename input widget is visible"));new gt("renameInputFocused",!1,w("renameInputFocused","Whether the rename input widget is focused"));let dle=class{constructor(e,t,n,s,r,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=s,this._logService=o,this.allowEditorOverflow=!0,this._disposables=new Fe,this._visibleContextKey=ak.bindTo(r),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new qo,this._inputWithButton=new kHt,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new hle(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{this._renameCandidateListView?.focusedCandidate!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),this._renameCandidateProvidersCts?.token.isCancellationRequested===!1&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const t=e.getColor(WE),n=e.getColor(l2e);this._domNode.style.backgroundColor=String(e.getColor(nd)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=n?`1px solid ${n}`:"",this._domNode.style.color=String(e.getColor(_2e)??"");const s=e.getColor(b2e);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(pZ)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(pZ)??""),this._inputWithButton.domNode.style.borderWidth=s?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=s?"solid":"none",this._inputWithButton.domNode.style.borderColor=s?.toString()??"none"}_updateFont(){if(this._domNode===void 0)return;mn(this._label!==void 0,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return e*.8}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=h1(this.getDomNode().ownerDocument.body),t=Ar(this._editor.getDomNode()),n=this._getTopForPosition();this._nPxAvailableAbove=n+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const s=this._editor.getOption(67),{totalHeight:r}=xR.getLayoutInfo({lineHeight:s}),o=this._nPxAvailableBelow>r*6?[2,1]:[1,2];return{position:this._position,preference:o}}beforeRender(){const[e,t]=this._acceptKeybindings;return this._label.innerText=w({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;mn(this._renameCandidateListView),mn(this._nPxAvailableAbove!==void 0),mn(this._nPxAvailableBelow!==void 0);const t=j0(this._inputWithButton.domNode),n=j0(this._label);let s;e===2?s=this._nPxAvailableBelow:s=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:s-n-t,width:lc(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,n,s,r){const{start:o,end:a}=this._getSelection(e,t);this._renameCts=r;const l=new Fe;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,s===void 0?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=s,this._requestRenameCandidates(t,!1),l.add(Ie(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),l.add(Ie(this._inputWithButton.button,tt.KEY_DOWN,c=>{const d=new ms(c);(d.equals(3)||d.equals(10))&&(d.stopPropagation(),d.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",n),this._position=new me(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",o.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),l.add(zt(()=>{this._renameCts=void 0,r.dispose(!0)})),l.add(zt(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),l.add(zt(()=>this._candidates.clear()));const u=new ME;return u.p.finally(()=>{l.dispose(),this._hide()}),this._currentCancelInput=c=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),u.complete(c),!0),this._currentAcceptInput=c=>{this._trace("invoking _currentAcceptInput"),mn(this._renameCandidateListView!==void 0);const d=this._renameCandidateListView.nCandidates;let h,f;const g=this._renameCandidateListView.focusedCandidate;if(g!==void 0?(this._trace("using new name from renameSuggestion"),h=g,f={k:"renameSuggestion"}):(this._trace("using new name from inputField"),h=this._inputWithButton.input.value,f=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),h===t||h.trim().length===0){this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),u.complete({newName:h,wantsPreview:n&&c,stats:{source:f,nRenameSuggestions:d,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},l.add(r.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),l.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget"))),this._show(),u.p}_requestRenameCandidates(e,t){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),mn(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new or;const n=t?YL.Invoke:YL.Automatic,s=this._requestRenameCandidatesOnce(n,this._renameCandidateProvidersCts.token);if(s.length===0){this._inputWithButton.setSparkleButton();return}t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(s,e,this._renameCts.token)}}_getSelection(e,t){mn(this._editor.hasModel());const n=this._editor.getSelection();let s=0,r=t.length;return!U.isEmpty(n)&&!U.spansMultipleLines(n)&&U.containsRange(e,n)&&(s=Math.max(0,n.startColumn-e.startColumn),r=Math.min(e.endColumn,n.endColumn)-e.startColumn),{start:s,end:r}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,n){const s=(...u)=>this._trace("_updateRenameCandidates",...u);s("start");const r=await HN(Promise.allSettled(e),n);if(this._inputWithButton.setSparkleButton(),r===void 0){s("returning early - received updateRenameCandidates results - undefined");return}const o=r.flatMap(u=>u.status==="fulfilled"&&_g(u.value)?u.value:[]);s(`received updateRenameCandidates results - total (unfiltered) ${o.length} candidates.`);const a=Z0(o,u=>u.newSymbolName);s(`distinct candidates - ${a.length} candidates.`);const l=a.filter(({newSymbolName:u})=>u.trim().length>0&&u!==this._inputWithButton.input.value&&u!==t&&!this._candidates.has(u));if(s(`valid distinct candidates - ${o.length} candidates.`),l.forEach(u=>this._candidates.add(u.newSymbolName)),l.length<1){s("returning early - no valid distinct candidates");return}s("setting candidates"),this._renameCandidateListView.setCandidates(l),s("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};dle=THt([qV(2,Lo),qV(3,In),qV(4,ri),qV(5,Oa)],dle);class hle{constructor(e,t){this._disposables=new Fe,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=hle._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus(n=>{n.elements.length===1&&t.onFocusChange(n.elements[0].newSymbolName)},this._disposables),this._listWidget.onDidChangeSelection(n=>{n.elements.length===1&&t.onSelectionChange()},this._disposables),this._disposables.add(this._listWidget.onDidBlur(n=>{this._listWidget.setFocus([])})),this._listWidget.style(_w({listInactiveFocusForeground:dI,listInactiveFocusBackground:hI}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),n=this._pickListWidth(e);this._listWidget.layout(t,n),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${n}px`,um(w("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(this._listWidget.length===0)return;const e=this._listWidget.getSelectedElements()[0];if(e!==void 0)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];if(t!==void 0)return t.newSymbolName}focusNext(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=xR.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map(s=>s.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,n){const s=new class{getTemplateId(o){return"candidate"}getHeight(o){return t}},r=new class{constructor(){this.templateId="candidate"}renderTemplate(o){return new xR(o,n)}renderElement(o,a,l){l.populate(o)}disposeTemplate(o){o.dispose()}};return new gd("NewSymbolNameCandidates",e,s,[r],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class kHt{constructor(){this._onDidInputChange=new _e,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new Fe}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",w("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=w("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=w("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=Np().setupManagedHover(lu("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(Ie(this.input,tt.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(Ie(this.input,tt.KEY_DOWN,e=>{const t=new ms(e);(t.keyCode===15||t.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(Ie(this.input,tt.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(Ie(this.input,tt.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(Ie(this.input,tt.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return mn(this._inputNode),this._inputNode}get button(){return mn(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=rw(et.sparkle),ma(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHover?.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=rw(et.primitiveSquare),ma(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHover?.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}const SO=class SO{constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${SO._PADDING}px`;const n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.width=n.style.height=`${t.lineHeight*.8}px`,this._domNode.appendChild(n),this._icon=rw(et.sparkle),this._icon.style.display="none",n.appendChild(this._icon),this._label=document.createElement("div"),ya(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){const t=!!e.tags?.includes(pz.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+SO._PADDING*2}}dispose(){}};SO._PADDING=2;let xR=SO;var LHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},hy=function(i,e){return function(t,n){e(t,n,i)}},fle;class ple{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const s=this._providers[this._providerRenameIdx];if(!s.resolveRenameLocation)break;const r=await s.resolveRenameLocation(this.model,this.position,e);if(r){if(r.rejectReason){t.push(r.rejectReason);continue}return r}}this._providerRenameIdx=0;const n=this.model.getWordAtPosition(this.position);return n?{range:new U(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word,rejectReason:t.length>0?t.join(`
1343
1343
  `):void 0}:{range:U.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
1344
1344
  `):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,n,s){const r=this._providers[t];if(!r)return{edits:[],rejectReason:n.join(`
1345
- `)};const o=await r.provideRenameEdits(this.model,this.position,e,s);if(o){if(o.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(o.rejectReason),s)}else return this._provideRenameEdits(e,t+1,n.concat(w("no result","No result.")),s);return o}}async function AHt(i,e,t,n){const s=new ple(e,t,i),r=await s.resolveRenameLocation(Ii.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:s.provideRenameEdits(n,Ii.None)}let fy=(Ix=class{static get(e){return e.getContribution(fle.ID)}constructor(e,t,n,s,r,o,a,l,u){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=s,this._progressService=r,this._logService=o,this._configService=a,this._languageFeaturesService=l,this._telemetryService=u,this._disposableStore=new Fe,this._cts=new or,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(dle,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new or,!this.editor.hasModel()){e("editor has no model");return}const t=this.editor.getPosition(),n=new ple(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!n.hasProvider()){e("skeleton has no provider");return}const s=new ey(this.editor,5,void 0,this._cts.token);let r;try{e("resolving rename location");const g=n.resolveRenameLocation(s.token);this._progressService.showWhile(g,250),r=await g,e("resolved rename location")}catch(g){g instanceof Wh?e("resolve rename location cancelled",JSON.stringify(g,null," ")):(e("resolve rename location failed",g instanceof Error?g:JSON.stringify(g,null," ")),(typeof g=="string"||Lp(g))&&Sc.get(this.editor)?.showMessage(g||w("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t));return}finally{s.dispose()}if(!r){e("returning early - no loc");return}if(r.rejectReason){e(`returning early - rejected with reason: ${r.rejectReason}`,r.rejectReason),Sc.get(this.editor)?.showMessage(r.rejectReason,t);return}if(s.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const o=new ey(this.editor,5,r.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),u=await Promise.all(l.map(async g=>[g,await g.supportsAutomaticNewSymbolNamesTriggerKind??!1])),c=(g,b)=>{let y=u.slice();return g===YL.Automatic&&(y=y.filter(([S,x])=>x)),y.map(([S])=>S.provideNewSymbolNames(a,r.range,g,b))};e("creating rename input field and awaiting its result");const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameWidget.getInput(r.range,r.text,d,l.length>0?c:void 0,o);if(e("received response from rename input field"),l.length>0&&this._reportTelemetry(l.length,a.getLanguageId(),h),typeof h=="boolean"){e(`returning early - rename input field response - ${h}`),h&&this.editor.focus(),o.dispose();return}this.editor.focus(),e("requesting rename edits");const f=HN(n.provideRenameEdits(h.newName,o.token),o.token).then(async g=>{if(!g){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(g.rejectReason){e(`returning early - rejected with reason: ${g.rejectReason}`),this._notificationService.info(g.rejectReason);return}this.editor.setSelection(U.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(g,{editor:this.editor,showPreview:h.wantsPreview,label:w("label","Renaming '{0}' to '{1}'",r?.text,h.newName),code:"undoredo.rename",quotableLabel:w("quotableLabel","Renaming {0} to {1}",r?.text,h.newName),respectAutoSaveConfig:!0}).then(b=>{e("edits applied"),b.ariaSummary&&au(w("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,h.newName,b.ariaSummary))}).catch(b=>{e(`error when applying edits ${JSON.stringify(b,null," ")}`),this._notificationService.error(w("rename.failedApply","Rename failed to apply edits")),this._logService.error(b)})},g=>{e("error when providing rename edits",JSON.stringify(g,null," ")),this._notificationService.error(w("rename.failed","Rename failed to compute edits")),this._logService.error(g)}).finally(()=>{o.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,n){const s=typeof n=="boolean"?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:n.stats.source.k,nRenameSuggestions:n.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:n.stats.timeBeforeFirstInputFieldEdit,wantsPreview:n.wantsPreview,nRenameSuggestionsInvocations:n.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:n.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",s)}},fle=Ix,Ix.ID="editor.contrib.renameController",Ix);fy=fle=LHt([hy(1,jt),hy(2,$r),hy(3,ZI),hy(4,I1),hy(5,Oa),hy(6,g8),hy(7,Tt),hy(8,al)],fy);class NHt extends wt{constructor(){super({id:"editor.action.rename",label:w("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:Be.and(Q.writable,Q.hasRenameProvider),kbOpts:{kbExpr:Q.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const n=e.get(yn),[s,r]=Array.isArray(t)&&t||[void 0,void 0];return Gt.isUri(s)&&me.isIPosition(r)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(o=>{o&&(o.setPosition(r),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},bi):super.runCommand(e,t)}run(e,t){const n=e.get(Oa),s=fy.get(t);return s?(n.trace("[RenameAction] got controller, running..."),s.run()):(n.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}fn(fy.ID,fy,4),Ye(NHt);const gle=ko.bindToContribution(fy.get);ht(new gle({id:"acceptRenameInput",precondition:ak,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:Be.and(Q.focus,Be.not("isComposing")),primary:3}})),ht(new gle({id:"acceptRenameInputWithPreview",precondition:Be.and(ak,Be.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:Be.and(Q.focus,Be.not("isComposing")),primary:2051}})),ht(new gle({id:"cancelRenameInput",precondition:ak,handler:i=>i.cancelRenameInput(),kbOpts:{weight:199,kbExpr:Q.focus,primary:9,secondary:[1033]}})),ys(class extends su{constructor(){super({id:"focusNextRenameSuggestion",title:{...ui("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:ak,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(yn).getFocusedCodeEditor();if(!t)return;const n=fy.get(t);n&&n.focusNextRenameSuggestion()}}),ys(class extends su{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...ui("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:ak,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(yn).getFocusedCodeEditor();if(!t)return;const n=fy.get(t);n&&n.focusPreviousRenameSuggestion()}}),Ru("_executeDocumentRenameProvider",function(i,e,t,...n){const[s]=n;mn(typeof s=="string");const{renameProvider:r}=i.get(Tt);return AHt(r,e,t,s)}),Ru("_executePrepareRename",async function(i,e,t){const{renameProvider:n}=i.get(Tt),r=await new ple(e,t,n).resolveRenameLocation(Ii.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r}),ar.as(yf.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:w("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var IHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},C4e=function(i,e){return function(t,n){e(t,n,i)}};let GV=(sL=class extends ye{constructor(e,t,n){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(s=>{const r=this.editor.getModel()?.getLanguageId();r&&s.affects(r)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(s=>{this.options&&!s.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(s=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(s=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new Jn(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const n=this.languageConfigurationService.getLanguageConfiguration(t).comments,s=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!n&&!s?.markers))return{foldingRules:s,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(n=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(n)})}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter(r=>{if(!r.shouldBeInComments)return!0;const o=t.validateRange(r.range),a=t.tokenization.getLineTokens(o.startLineNumber),l=a.findTokenIndexAtOffset(o.startColumn-1),u=a.getStandardTokenType(l);return a.getLanguageId(l)===t.getLanguageId()&&u===1}));const n=Object.values(this.currentOccurrences).map(r=>r.decorationId),s=e.map(r=>PHt(r));this.editor.changeDecorations(r=>{const o=r.deltaDecorations(n,s);this.currentOccurrences={};for(let a=0,l=o.length;a<l;a++){const u={sectionHeader:e[a],decorationId:o[a]};this.currentOccurrences[u.decorationId]=u}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}},sL.ID="editor.sectionHeaderDetector",sL);GV=IHt([C4e(1,lr),C4e(2,Wu)],GV);function PHt(i){return{range:i.range,options:xi.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:i.hasSeparatorLine?2:1,sectionHeaderText:i.text}})}}fn(GV.ID,GV,1);function MHt(i){for(let e=0,t=i.length;e<t;e+=4){const n=i[e+0],s=i[e+1],r=i[e+2],o=i[e+3];i[e+0]=o,i[e+1]=r,i[e+2]=s,i[e+3]=n}}function RHt(i){const e=new Uint8Array(i.buffer,i.byteOffset,i.length*4);return ife()||MHt(e),I6.wrap(e)}function w4e(i){const e=new Uint32Array(OHt(i));let t=0;if(e[t++]=i.id,i.type==="full")e[t++]=1,e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length;else{e[t++]=2,e[t++]=i.deltas.length;for(const n of i.deltas)e[t++]=n.start,e[t++]=n.deleteCount,n.data?(e[t++]=n.data.length,e.set(n.data,t),t+=n.data.length):e[t++]=0}return RHt(e)}function OHt(i){let e=0;if(e+=2,i.type==="full")e+=1+i.data.length;else{e+=1,e+=3*i.deltas.length;for(const t of i.deltas)t.data&&(e+=t.data.length)}return e}function KV(i){return i&&!!i.data}function S4e(i){return i&&Array.isArray(i.edits)}class FHt{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}}function x4e(i,e){return i.has(e)}function BHt(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function D4e(i,e,t,n,s){const r=BHt(i,e),o=await Promise.all(r.map(async a=>{let l,u=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?n:null,s)}catch(c){u=c,l=null}return(!l||!KV(l)&&!S4e(l))&&(l=null),new FHt(a,l,u)}));for(const a of o){if(a.error)throw a.error;if(a.tokens)return a}return o.length>0?o[0]:null}function VHt(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:null}class WHt{constructor(e,t){this.provider=e,this.tokens=t}}function HHt(i,e){return i.has(e)}function E4e(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function mle(i,e,t,n){const s=E4e(i,e),r=await Promise.all(s.map(async o=>{let a;try{a=await o.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){kr(l),a=null}return(!a||!KV(a))&&(a=null),new WHt(o,a)}));for(const o of r)if(o.tokens)return o;return r.length>0?r[0]:null}dn.registerCommand("_provideDocumentSemanticTokensLegend",async(i,...e)=>{const[t]=e;mn(t instanceof Gt);const n=i.get(Ls).getModel(t);if(!n)return;const{documentSemanticTokensProvider:s}=i.get(Tt),r=VHt(s,n);return r?r[0].getLegend():i.get(xs).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}),dn.registerCommand("_provideDocumentSemanticTokens",async(i,...e)=>{const[t]=e;mn(t instanceof Gt);const n=i.get(Ls).getModel(t);if(!n)return;const{documentSemanticTokensProvider:s}=i.get(Tt);if(!x4e(s,n))return i.get(xs).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());const r=await D4e(s,n,null,null,Ii.None);if(!r)return;const{provider:o,tokens:a}=r;if(!a||!KV(a))return;const l=w4e({id:0,type:"full",data:a.data});return a.resultId&&o.releaseDocumentSemanticTokens(a.resultId),l}),dn.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(i,...e)=>{const[t,n]=e;mn(t instanceof Gt);const s=i.get(Ls).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:r}=i.get(Tt),o=E4e(r,s);if(o.length===0)return;if(o.length===1)return o[0].getLegend();if(!n||!U.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),o[0].getLegend();const a=await mle(r,s,U.lift(n),Ii.None);if(a)return a.provider.getLegend()}),dn.registerCommand("_provideDocumentRangeSemanticTokens",async(i,...e)=>{const[t,n]=e;mn(t instanceof Gt),mn(U.isIRange(n));const s=i.get(Ls).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:r}=i.get(Tt),o=await mle(r,s,U.lift(n),Ii.None);if(!(!o||!o.tokens))return w4e({id:0,type:"full",data:o.tokens.data})});const _le="editor.semanticHighlighting";function YV(i,e,t){const n=t.getValue(_le,{overrideIdentifier:i.getLanguageId(),resource:i.uri})?.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var T4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Pm=function(i,e){return function(t,n){e(t,n,i)}},py;let ble=class extends ye{constructor(e,t,n,s,r,o){super(),this._watchers=Object.create(null);const a=c=>{this._watchers[c.uri.toString()]=new yle(c,e,n,r,o)},l=(c,d)=>{d.dispose(),delete this._watchers[c.uri.toString()]},u=()=>{for(const c of t.getModels()){const d=this._watchers[c.uri.toString()];YV(c,n,s)?d||a(c):d&&l(c,d)}};t.getModels().forEach(c=>{YV(c,n,s)&&a(c)}),this._register(t.onModelAdded(c=>{YV(c,n,s)&&a(c)})),this._register(t.onModelRemoved(c=>{const d=this._watchers[c.uri.toString()];d&&l(c,d)})),this._register(s.onDidChangeConfiguration(c=>{c.affectsConfiguration(_le)&&u()})),this._register(n.onDidColorThemeChange(u))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};ble=T4e([Pm(0,D8),Pm(1,Ls),Pm(2,Lo),Pm(3,Fi),Pm(4,cd),Pm(5,Tt)],ble);let yle=(Qy=class extends ye{constructor(e,t,n,s,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:py.REQUEST_MIN_DELAY,max:py.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Jn(()=>this._fetchDocumentSemanticTokensNow(),py.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const o=()=>{ls(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),ls(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!x4e(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new or,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,s=D4e(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const r=[],o=this._model.onDidChangeContent(l=>{r.push(l)}),a=new qo(!1);s.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,r);else{const{provider:u,tokens:c}=l,d=this._semanticTokensStylingService.getStyling(u);this._setDocumentSemanticTokens(u,c||null,d,r)}},l=>{l&&(zd(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||bi(l),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),(r.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,s,r){r=Math.min(r,n.length-s,e.length-t);for(let o=0;o<r;o++)n[s+o]=e[t+o]}_setDocumentSemanticTokens(e,t,n,s){const r=this._currentDocumentResponse,o=()=>{(s.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),o();return}if(S4e(t)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:r.data};else{let a=0;for(const h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=r.data,u=new Uint32Array(l.length+a);let c=l.length,d=u.length;for(let h=t.edits.length-1;h>=0;h--){const f=t.edits[h];if(f.start>l.length){n.warnInvalidEditStart(r.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const g=c-(f.start+f.deleteCount);g>0&&(py._copy(l,c-g,u,d-g,g),d-=g),f.data&&(py._copy(f.data,0,u,d-f.data.length,f.data.length),d-=f.data.length),c=f.start}c>0&&py._copy(l,0,u,0,c),t={resultId:t.resultId,data:u}}}if(KV(t)){this._currentDocumentResponse=new $Ht(e,t.resultId,t.data);const a=BLe(t,n,this._model.getLanguageId());if(s.length>0)for(const l of s)for(const u of a)for(const c of l.changes)u.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}},py=Qy,Qy.REQUEST_MIN_DELAY=300,Qy.REQUEST_MAX_DELAY=2e3,Qy);yle=py=T4e([Pm(1,D8),Pm(2,Lo),Pm(3,cd),Pm(4,Tt)],yle);class $Ht{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}e2(ble);var UHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},DR=function(i,e){return function(t,n){e(t,n,i)}};let XV=(rL=class extends ye{constructor(e,t,n,s,r,o){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=s,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Jn(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(_le)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;t<n;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!YV(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!HHt(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(n=>this._requestRange(e,n)))}_requestRange(e,t){const n=e.getVersionId(),s=Bo(o=>Promise.resolve(mle(this._provider,e,t,o))),r=new qo(!1);return s.then(o=>{if(this._debounceInformation.update(e,r.elapsed()),!o||!o.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:a,tokens:l}=o,u=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,BLe(l,u,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}},rL.ID="editor.contrib.viewportSemanticTokens",rL);XV=UHt([DR(1,D8),DR(2,Lo),DR(3,Fi),DR(4,cd),DR(5,Tt)],XV),fn(XV.ID,XV,1);class zHt{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const n=[];for(const s of t){const r=[];n.push(r),this.selectSubwords&&this._addInWordRanges(r,e,s),this._addWordRanges(r,e,s),this._addWhitespaceLine(r,e,s),r.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){const s=t.getWordAtPosition(n);if(!s)return;const{word:r,startColumn:o}=s,a=n.column-o;let l=a,u=a,c=0;for(;l>=0;l--){const d=r.charCodeAt(l);if(l!==a&&(d===95||d===45))break;if(u1(d)&&Gg(c))break;c=d}for(l+=1;u<r.length;u++){const d=r.charCodeAt(u);if(Gg(d)&&u1(c))break;if(d===95||d===45)break;c=d}l<u&&e.push({range:new U(n.lineNumber,o+l,n.lineNumber,o+u)})}_addWordRanges(e,t,n){const s=t.getWordAtPosition(n);s&&e.push({range:new U(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn)})}_addWhitespaceLine(e,t,n){t.getLineLength(n.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new U(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}var jHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},qHt=function(i,e){return function(t,n){e(t,n,i)}},vle;class Cle{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const n=new Cle(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}}let ER=(Px=class{static get(e){return e.getContribution(vle.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await L4e(this._languageFeaturesService.selectionRangeProvider,n,t.map(r=>r.getPosition()),this._editor.getOption(114),Ii.None).then(r=>{if(!(!Nl(r)||r.length!==t.length)&&!(!this._editor.hasModel()||!Qs(this._editor.getSelections(),t,(o,a)=>o.equalsSelection(a)))){for(let o=0;o<r.length;o++)r[o]=r[o].filter(a=>a.containsPosition(t[o].getStartPosition())&&a.containsPosition(t[o].getEndPosition())),r[o].unshift(t[o]);this._state=r.map(o=>new Cle(0,o)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(r=>r.mov(e));const s=this._state.map(r=>Pt.fromPositions(r.ranges[r.index].getStartPosition(),r.ranges[r.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}},vle=Px,Px.ID="editor.contrib.smartSelectController",Px);ER=vle=jHt([qHt(1,Tt)],ER);class k4e extends wt{constructor(e,t){super(t),this._forward=e}async run(e,t){const n=ER.get(t);n&&await n.run(this._forward)}}class GHt extends k4e{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:w("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:Q.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Nt.MenubarSelectionMenu,group:"1_basic",title:w({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}dn.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class KHt extends k4e{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:w("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:Q.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Nt.MenubarSelectionMenu,group:"1_basic",title:w({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}fn(ER.ID,ER,4),Ye(GHt),Ye(KHt);async function L4e(i,e,t,n,s){const r=i.all(e).concat(new zHt(n.selectSubwords));r.length===1&&r.unshift(new mV);const o=[],a=[];for(const l of r)o.push(Promise.resolve(l.provideSelectionRanges(e,t,s)).then(u=>{if(Nl(u)&&u.length===t.length)for(let c=0;c<t.length;c++){a[c]||(a[c]=[]);for(const d of u[c])U.isIRange(d.range)&&U.containsPosition(d.range,t[c])&&a[c].push(U.lift(d.range))}},kr));return await Promise.all(o),a.map(l=>{if(l.length===0)return[];l.sort((h,f)=>me.isBefore(h.getStartPosition(),f.getStartPosition())?1:me.isBefore(f.getStartPosition(),h.getStartPosition())||me.isBefore(h.getEndPosition(),f.getEndPosition())?-1:me.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);const u=[];let c;for(const h of l)(!c||U.containsRange(h,c)&&!U.equalsRange(h,c))&&(u.push(h),c=h);if(!n.selectLeadingAndTrailingWhitespace)return u;const d=[u[0]];for(let h=1;h<u.length;h++){const f=u[h-1],g=u[h];if(g.startLineNumber!==f.startLineNumber||g.endLineNumber!==f.endLineNumber){const b=new U(f.startLineNumber,e.getLineFirstNonWhitespaceColumn(f.startLineNumber),f.endLineNumber,e.getLineLastNonWhitespaceColumn(f.endLineNumber));b.containsRange(f)&&!b.equalsRange(f)&&g.containsRange(b)&&!g.equalsRange(b)&&d.push(b);const y=new U(f.startLineNumber,1,f.endLineNumber,e.getLineMaxColumn(f.endLineNumber));y.containsRange(f)&&!y.equalsRange(b)&&g.containsRange(y)&&!g.equalsRange(y)&&d.push(y)}d.push(g)}return d})}dn.registerCommand("_executeSelectionRangeProvider",async function(i,...e){const[t,n]=e;mn(Gt.isUri(t));const s=i.get(Tt).selectionRangeProvider,r=await i.get(Iu).createModelReference(t);try{return L4e(s,r.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},Ii.None)}finally{r.dispose()}});const YHt=Object.freeze({View:ui("view","View"),Help:ui("help","Help"),Test:ui("test","Test"),File:ui("file","File"),Preferences:ui("preferences","Preferences"),Developer:ui({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});class TR{constructor(e,t,n,s=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=n,this.showEndForLine=s}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&Qs(this.startLineNumbers,e.startLineNumbers)&&Qs(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new TR([],[],0)}}const A4e=n_("stickyScrollViewLayer",{createHTML:i=>i}),wle="data-sticky-line-index",N4e="data-sticky-is-line",XHt="data-sticky-is-line-number",I4e="data-sticky-is-folding-icon";class QHt extends ye{constructor(e){super(),this._editor=e,this._foldingIconStore=new Fe,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof kf),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(116)&&t(),n.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n){if(n===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const s=this._isWidgetHeightZero(e),r=s?void 0:e,o=s?0:this._findLineToRebuildWidgetFrom(e,n);this._renderRootNode(r,t,o),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const n=[...e.startLineNumbers];e.showEndForLine!==null&&(n[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=n}else this._lastLineRelativePosition=0,this._lineNumbers=[];return t===0}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(t!==void 0)return t;const n=this._previousState,s=e.startLineNumbers.findIndex(r=>!n.startLineNumbers.includes(r));return s===-1?0:s}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;t<this._renderedStickyLines.length;t++){const n=this._renderedStickyLines[t];n.lineNumberDomNode.remove(),n.lineDomNode.remove()}this._renderedStickyLines=this._renderedStickyLines.slice(0,e),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._renderedStickyLines){const n=t.foldingIcon;n&&n.setVisible(e?!0:n.isCollapsed)}}async _renderRootNode(e,t,n){if(this._clearStickyLinesFromLine(n),!e)return;for(const a of this._renderedStickyLines)this._updateTopAndZIndexOfStickyLine(a);const s=this._editor.getLayoutInfo(),r=this._lineNumbers.slice(n);for(const[a,l]of r.entries()){const u=this._renderChildNode(a+n,l,t,s);u&&(this._linesDomNode.appendChild(u.lineDomNode),this._lineNumbersDomNode.appendChild(u.lineNumberDomNode),this._renderedStickyLines.push(u))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const o=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${o}px`,this._linesDomNodeScrollable.style.height=`${o}px`,this._rootDomNode.style.height=`${o}px`,this._rootDomNode.style.marginLeft="0px",this._minContentWidthInPx=Math.max(...this._renderedStickyLines.map(a=>a.scrollWidth))+s.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(111)==="mouseover"&&(this._foldingIconStore.add(Ie(this._lineNumbersDomNode,tt.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(Ie(this._lineNumbersDomNode,tt.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,s){const r=this._editor._getViewModel();if(!r)return;const o=r.coordinatesConverter.convertModelPositionToViewPosition(new me(t,1)).lineNumber,a=r.getViewLineRenderingData(o),l=this._editor.getOption(68);let u;try{u=Zl.filter(a.inlineDecorations,o,a.minColumn,a.maxColumn)}catch{u=[]}const c=new _1(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,u,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new zE(2e3),h=pI(c,d);let f;A4e?f=A4e.createHTML(d.build()):f=d.build();const g=document.createElement("span");g.setAttribute(wle,String(e)),g.setAttribute(N4e,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=f;const b=document.createElement("span");b.setAttribute(wle,String(e)),b.setAttribute(XHt,""),b.className="sticky-line-number",b.style.lineHeight=`${this._lineHeight}px`;const y=s.contentLeft;b.style.width=`${y}px`;const S=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?S.innerText=t.toString():l.renderType===2&&(S.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),S.className="sticky-line-number-inner",S.style.lineHeight=`${this._lineHeight}px`,S.style.width=`${s.lineNumbersWidth}px`,S.style.paddingLeft=`${s.lineNumbersLeft}px`,b.appendChild(S);const x=this._renderFoldingIconForLine(n,t);x&&b.appendChild(x.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(S),b.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,b.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const E=new ZHt(e,t,g,b,x,h.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(E)}_updateTopAndZIndexOfStickyLine(e){const t=e.index,n=e.lineDomNode,s=e.lineNumberDomNode,r=t===this._lineNumbers.length-1,o="0",a="1";n.style.zIndex=r?o:a,s.style.zIndex=r?o:a;const l=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,u=`${t*this._lineHeight}px`;return n.style.top=r?l:u,s.style.top=r?l:u,e}_renderFoldingIconForLine(e,t){const n=this._editor.getOption(111);if(!e||n==="never")return;const s=e.regions,r=s.findRange(t),o=s.getStartLineNumber(r);if(!(t===o))return;const l=s.isCollapsed(r),u=new JHt(l,o,s.getEndLineNumber(r),this._lineHeight);return u.setVisible(this._isOnGlyphMargin?!0:l||n==="always"),u.domNode.setAttribute(I4e,""),u}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._renderedStickyLines.length&&this._renderedStickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const n=FZ(t.characterMapping,e,0);return new me(t.lineNumber,n)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,wle);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,N4e)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,I4e)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}}class ZHt{constructor(e,t,n,s,r,o,a){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=s,this.foldingIcon=r,this.characterMapping=o,this.scrollWidth=a}}class JHt{constructor(e,t,n,s){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=s,this.domNode=document.createElement("div"),this.domNode.style.width=`${s}px`,this.domNode.style.height=`${s}px`,this.domNode.className=ni.asClassName(e?eV:JB)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class kR{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class QV{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}}class P4e{constructor(e,t,n,s){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=s}}var ZV=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},LR=function(i,e){return function(t,n){e(t,n,i)}},AR;(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(AR||(AR={}));var gy;(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(gy||(gy={}));let Sle=class extends ye{constructor(e,t,n,s){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new th(300)),this._updateOperation=this._register(new Fe),this._editor.getOption(116).defaultModel){case AR.OUTLINE_MODEL:this._modelProviders.push(new xle(this._editor,s));case AR.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new Ele(this._editor,t,s));case AR.INDENTATION_MODEL:this._modelProviders.push(new Dle(this._editor,n));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const t of this._modelProviders){const{statusPromise:n,modelPromise:s}=t.computeStickyModel(e);this._modelPromise=s;const r=await n;if(this._modelPromise!==s)return null;switch(r){case gy.CANCELED:return this._updateOperation.clear(),null;case gy.VALID:return t.stickyModel}}return null}).catch(t=>(bi(t),null))}};Sle=ZV([LR(2,jt),LR(3,Tt)],Sle);class M4e extends ye{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,gy.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=Bo(n=>this.createModelFromProvider(n));return{statusPromise:t.then(n=>this.isModelValid(n)?e.isCancellationRequested?gy.CANCELED:(this._stickyModel=this.createStickyModel(e,n),gy.VALID):this._invalid()).then(void 0,n=>(bi(n),gy.CANCELED)),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let xle=class extends M4e{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return M_.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){const{stickyOutlineElement:n,providerID:s}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),r=this._editor.getModel();return new P4e(r.uri,r.getVersionId(),n,s)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(cn.first(e.children.values())instanceof b3e){const a=cn.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",u=-1,c;for(const[d,h]of e.children.entries()){const f=this._findSumOfRangesOfGroup(h);f>u&&(c=h,u=f,l=h.id)}t=l,n=c.children}}else n=e.children;const s=[],r=Array.from(n.values()).sort((a,l)=>{const u=new kR(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),c=new kR(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(u,c)});for(const a of r)s.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new QV(void 0,s,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const n=[];for(const r of e.children.values())if(r.symbol.selectionRange.startLineNumber!==r.symbol.range.endLineNumber)if(r.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));else for(const o of r.children.values())n.push(this._stickyModelFromOutlineElement(o,r.symbol.selectionRange.startLineNumber));n.sort((r,o)=>this._comparator(r.range,o.range));const s=new kR(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new QV(s,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Hoe?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};xle=ZV([LR(1,Tt)],xle);class R4e extends M4e{constructor(e){super(e),this._foldingLimitReporter=new g3e(e)}createStickyModel(e,t){const n=this._fromFoldingRegions(t),s=this._editor.getModel();return new P4e(s.uri,s.getVersionId(),n,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,n=[],s=new QV(void 0,[],void 0);for(let r=0;r<t;r++){const o=e.getParentIndex(r);let a;o!==-1?a=n[o]:a=s;const l=new QV(new kR(e.getStartLineNumber(r),e.getEndLineNumber(r)+1),[],a);a.children.push(l),n.push(l)}return s}}let Dle=class extends R4e{constructor(e,t){super(e),this._languageConfigurationService=t,this.provider=this._register(new Ooe(e.getModel(),this._languageConfigurationService,this._foldingLimitReporter))}async createModelFromProvider(e){return this.provider.compute(e)}};Dle=ZV([LR(1,lr)],Dle);let Ele=class extends R4e{constructor(e,t,n){super(e),this._languageFeaturesService=n;const s=oy.getFoldingRangeProviders(this._languageFeaturesService,e.getModel());s.length>0&&(this.provider=this._register(new Voe(e.getModel(),s,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){return this.provider?.compute(e)??null}};Ele=ZV([LR(2,Tt)],Ele);var e$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},O4e=function(i,e){return function(t,n){e(t,n,i)}};class t$t{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}}let Tle=class extends ye{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new _e),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new Fe),this._updateSoon=this._register(new Jn(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(116)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(zt(()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new Sle(e,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new or,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,s,r){if(t.children.length===0)return;let o=r;const a=[];for(let c=0;c<t.children.length;c++){const d=t.children[c];d.range&&a.push(d.range.startLineNumber)}const l=this.updateIndex(gI(a,e.startLineNumber,(c,d)=>c-d)),u=this.updateIndex(gI(a,e.startLineNumber+s,(c,d)=>c-d));for(let c=l;c<=u;c++){const d=t.children[c];if(!d)return;if(d.range){const h=d.range.startLineNumber,f=d.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==o&&(o=h,n.push(new t$t(h,f-1,s+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,s+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,s,r)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);const n=this._editor._getViewModel()?.getHiddenAreas();if(n)for(const s of n)t=t.filter(r=>!(r.startLineNumber>=s.startLineNumber&&r.endLineNumber<=s.endLineNumber+1));return t}};Tle=e$t([O4e(1,Tt),O4e(2,lr)],Tle);var i$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},lk=function(i,e){return function(t,n){e(t,n,i)}},kle;let V_=(Mx=class extends ye{constructor(e,t,n,s,r,o,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=s,this._contextKeyService=a,this._sessionStore=new Fe,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new QHt(this._editor),this._stickyLineCandidateProvider=new Tle(this._editor,n,r),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=TR.Empty,this._onDidResize(),this._readConfiguration();const l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(c=>{this._readConfigurationChange(c)})),this._register(Ie(l,tt.CONTEXT_MENU,async c=>{this._onContextMenu(Jt(l),c)})),this._stickyScrollFocusedContextKey=Q.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=Q.stickyScrollVisible.bindTo(this._contextKeyService);const u=this._register(_p(l));this._register(u.onDidBlur(c=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(u.onDidFocus(c=>{this.focus()})),this._registerMouseListeners(),this._register(Ie(l,tt.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(kle.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new Fe,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(U.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new Fe),t=this._register(new AB(this._editor,{extractLineNumberFromMouseEvent:r=>{const o=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);return o?o.lineNumber:0}})),n=r=>{if(!this._editor.hasModel()||r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return null;const o=r.target.element;if(!o||o.innerText!==o.innerHTML)return null;const a=this._stickyScrollWidget.getEditorPositionFromNode(o);return a?{range:new U(a.lineNumber,a.column,a.lineNumber,a.column+o.innerText.length),textElement:o}:null},s=this._stickyScrollWidget.getDomNode();this._register(_r(s,tt.CLICK,r=>{if(r.ctrlKey||r.altKey||r.metaKey||!r.leftButton)return;if(r.shiftKey){const u=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(u===null)return;const c=new me(this._endLineNumbers[u],1);this._revealLineInCenterIfOutsideViewport(c);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(r.target)){const u=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);this._toggleFoldingRegionForLine(u);return}if(!this._stickyScrollWidget.isInStickyLine(r.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(r.target);if(!l){const u=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);if(u===null)return;l=new me(u,1)}this._revealPosition(l)})),this._register(_r(s,tt.MOUSE_MOVE,r=>{if(r.shiftKey){const o=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(o===null||this._showEndForLine!==null&&this._showEndForLine===o)return;this._showEndForLine=o,this._renderStickyScroll();return}this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(Ie(s,tt.MOUSE_LEAVE,r=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([r,o])=>{const a=n(r);if(!a||!r.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:l,textElement:u}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(u.style.textDecoration==="underline")return;const c=new or;e.add(zt(()=>c.dispose(!0)));let d;qM(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new me(l.startLineNumber,l.startColumn+1),!1,c.token).then((h=>{if(!c.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const f=u;d!==f?(e.clear(),d=f,d.style.textDecoration="underline",e.add(zt(()=>{d.style.textDecoration="none"}))):d||(d=f,d.style.textDecoration="underline",e.add(zt(()=>{d.style.textDecoration="none"})))}else e.clear()}))})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async r=>{if(r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return;const o=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);o&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:o.lineNumber,column:1})),this._instaService.invokeFunction(NFe,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,t){const n=new cf(e,t);this._contextMenuService.showContextMenu({menuId:Nt.StickyScrollContext,getAnchor:()=>n})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),n=t?.foldingIcon;if(!n)return;Poe(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;const s=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(s),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(68).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const n of t)for(const s of e.ranges)if(n>=s.fromLineNumber&&n<=s.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(t*.25)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization()){this._resetState();return}const n=this._updateAndGetMinRebuildFromLine(e),s=this._stickyLineCandidateProvider.getVersionId();if(s===void 0||s===t.getVersionId())if(!this._focused)await this._updateState(n);else if(this._focusedStickyElementIndex===-1)await this._updateState(n),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const o=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(n),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(o)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){const t=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await oy.get(this._editor)?.getFoldingModel()??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=TR.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),n=this._editor.getScrollTop();let s=0;const r=[],o=[],a=this._editor.getVisibleRanges();if(a.length!==0){const l=new kR(a[0].startLineNumber,a[a.length-1].endLineNumber),u=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(const c of u){const d=c.startLineNumber,h=c.endLineNumber,f=c.nestingDepth;if(h-d>0){const g=(f-1)*e,b=f*e,y=this._editor.getBottomForLineNumber(d)-n,S=this._editor.getTopForLineNumber(h)-n,x=this._editor.getBottomForLineNumber(h)-n;if(g>S&&g<=x){r.push(d),o.push(h+1),s=x-b;break}else b>y&&b<=x&&(r.push(d),o.push(h+1));if(r.length===t)break}}}return this._endLineNumbers=o,new TR(r,o,s,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}},kle=Mx,Mx.ID="store.contrib.stickyScrollController",Mx);V_=kle=i$t([lk(1,pc),lk(2,Tt),lk(3,jt),lk(4,lr),lk(5,cd),lk(6,ri)],V_);class n$t extends su{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...ui("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:w({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:ui("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:YHt.View,toggled:{condition:Be.equals("config.editor.stickyScroll.enabled",!0),title:w("stickyScroll","Sticky Scroll"),mnemonicTitle:w({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:Nt.CommandPalette},{id:Nt.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Nt.StickyScrollContext}]})}async run(e){const t=e.get(Fi),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)}}const JV=100;class s$t extends Tp{constructor(){super({id:"editor.action.focusStickyScroll",title:{...ui("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:w({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:Be.and(Be.has("config.editor.stickyScroll.enabled"),Q.stickyScrollVisible),menu:[{id:Nt.CommandPalette}]})}runEditorCommand(e,t){V_.get(t)?.focus()}}class r$t extends Tp{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:ui("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:18}})}runEditorCommand(e,t){V_.get(t)?.focusNext()}}class o$t extends Tp{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:ui("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:16}})}runEditorCommand(e,t){V_.get(t)?.focusPrevious()}}class a$t extends Tp{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:ui("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:3}})}runEditorCommand(e,t){V_.get(t)?.goToFocused()}}class l$t extends Tp{constructor(){super({id:"editor.action.selectEditor",title:ui("selectEditor.title","Select Editor"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:9}})}runEditorCommand(e,t){V_.get(t)?.selectEditor()}}fn(V_.ID,V_,1),ys(n$t),ys(s$t),ys(o$t),ys(r$t),ys(a$t),ys(l$t);var F4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},NR=function(i,e){return function(t,n){e(t,n,i)}};class u$t{constructor(e,t,n,s,r,o){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=s,this.command=r,this.completion=o}}let Lle=class extends UHe{constructor(e,t,n,s,r,o){super(r.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=s,this._suggestMemoryService=o}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn<n.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){const e=[],{items:t}=this.completionModel,n=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},t),s=cn.slice(t,n),r=cn.slice(t,0,n);let o=5;for(const a of cn.concat(s,r)){if(a.score===kp.Default)continue;const l=new U(a.editStart.lineNumber,a.editStart.column,a.editInsertEnd.lineNumber,a.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),u=a.completion.insertTextRules&&a.completion.insertTextRules&4?{snippet:a.completion.insertText}:a.completion.insertText;e.push(new u$t(l,u,a.filterTextLow??a.labelLow,a.completion.additionalTextEdits,a.completion.command,a)),o-->=0&&a.resolve(Ii.None)}return e}};Lle=F4e([NR(5,pV)],Lle);let Ale=class extends ye{constructor(e,t,n,s){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=n,this._editorService=s,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,n,s){if(n.selectedSuggestionInfo)return;let r;for(const f of this._editorService.listCodeEditors())if(f.getModel()===e){r=f;break}if(!r)return;const o=r.getOption(90);if(G2.isAllOff(o))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(G2.valueFor(o,l)!=="inline")return;let u=e.getWordAtPosition(t),c;if(u?.word||(c=this._getTriggerCharacterInfo(e,t)),!u?.word&&!c||(u||(u=e.getWordUntilPosition(t)),u.endColumn!==t.column))return;let d;const h=e.getValueInRange(new U(t.lineNumber,1,t.lineNumber,t.column));if(!c&&this._lastResult?.canBeReused(e,t.lineNumber,u)){const f=new q3e(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),d=this._lastResult}else{const f=await Goe(this._languageFeatureService.completionProvider,e,t,new sR(void 0,bV.createSuggestFilter(r).itemKind,c?.providers),c&&{triggerKind:1,triggerCharacter:c.ch},s);let g;f.needsClipboard&&(g=await this._clipboardService.readText());const b=new ly(f.items,t.column,new q3e(h,0),_V.None,r.getOption(119),r.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},g);d=new Lle(e,t.lineNumber,u,b,f,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(Ii.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const n=e.getValueInRange(U.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const r of this._languageFeatureService.completionProvider.all(e))r.triggerCharacters?.includes(n)&&s.add(r);if(s.size!==0)return{providers:s,ch:n}}};Ale=F4e([NR(0,Tt),NR(1,w_),NR(2,pV),NR(3,yn)],Ale),e2(Ale);class c$t extends wt{constructor(){super({id:"editor.action.forceRetokenize",label:w("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getModel();n.tokenization.resetTokenization();const s=new qo;n.tokenization.forceTokenization(n.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}Ye(c$t);const u$=class u$ extends su{constructor(){super({id:u$.ID,title:ui({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:ui("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const t=!s2.getTabFocusMode();s2.setTabFocusMode(t),au(t?w("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):w("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};u$.ID="editor.action.toggleTabFocusMode";let Nle=u$;ys(Nle);var d$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},B4e=function(i,e){return function(t,n){e(t,n,i)}};let Ile=class extends ye{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}constructor(e,t,n={},s,r){super(),this._link=t,this._hoverService=s,this._enabled=!0,this.el=qe(e,it("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=n.hoverDelegate??lu("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const o=this._register(new nn(this.el,"click")),a=this._register(new nn(this.el,"keypress")),l=rt.chain(a.event,d=>d.map(h=>new ms(h)).filter(h=>h.keyCode===3)),u=this._register(new nn(this.el,Ds.Tap)).event;this._register(ll.addTarget(this.el));const c=rt.any(o.event,l,u);this._register(c(d=>{this.enabled&&(rn.stop(d,!0),n?.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};Ile=d$t([B4e(3,om),B4e(4,Fu)],Ile);var V4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},W4e=function(i,e){return function(t,n){e(t,n,i)}};const h$t=26;let Ple=class extends ye{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(Mle))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,h$t)}};Ple=V4e([W4e(1,jt)],Ple);let Mle=class extends ye{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(l_,{}),this.element=it("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=it("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){ma(this.element)}show(e){ma(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const n=qe(this.element,it("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(it(`div${ni.asCSSSelector(e.icon)}`));const s=qe(this.element,it("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=qe(this.element,it("div.message-actions-container")),e.actions)for(const o of e.actions)this._register(this.instantiationService.createInstance(Ile,this.messageActionsContainer,{...o,tabIndex:-1},{}));const r=qe(this.element,it("div.action-container"));this.actionBar=this._register(new md(r)),this.actionBar.push(this._register(new hc("banner.close","Close Banner",ni.asClassName(OPe),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Mle=V4e([W4e(0,jt)],Mle);var Rle=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},uk=function(i,e){return function(t,n){e(t,n,i)}};const f$t=Ps("extensions-warning-message",et.warning,w("warningIcon","Icon shown with a warning message in the extensions editor."));let IR=(oL=class extends ye{constructor(e,t,n,s){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;const o=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount);let a;if(r.nonBasicAsciiCharacterCount>=o)a={message:w("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new MR};else if(r.ambiguousCharacterCount>=o)a={message:w("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new vS};else if(r.invisibleCharacterCount>=o)a={message:w("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new PR};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:f$t,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(s.createInstance(Ple,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(126),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=p$t(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?r$e:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Ole(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new g$t(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}},oL.ID="editor.contrib.unicodeHighlighter",oL);IR=Rle([uk(1,Wu),uk(2,qAe),uk(3,jt)],IR);function p$t(i,e){return{nonBasicASCII:e.nonBasicASCII===rd?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===rd?!i:e.includeComments,includeStrings:e.includeStrings===rd?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let Ole=class extends ye{constructor(e,t,n,s){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Jn(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const n=[];if(!t.hasMore)for(const s of t.ranges)n.push({range:s,options:eW.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!ise(t,e))return null;const n=t.getValueInRange(e.range);return{reason:$4e(n,this._options),inComment:nse(t,e),inString:sse(t,e)}}};Ole=Rle([uk(3,Wu)],Ole);class g$t extends ye{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Jn(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const s of e){const r=dJ.computeUnicodeHighlights(this._model,this._options,s);for(const o of r.ranges)n.ranges.push(o);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(const s of n.ranges)t.push({range:s,options:eW.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),n=t.getValueInRange(e.range);return ise(t,e)?{reason:$4e(n,this._options),inComment:nse(t,e),inString:sse(t,e)}:null}}const H4e=w("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let Fle=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=this._editor.getContribution(IR.ID);if(!s)return[];const r=[],o=new Set;let a=300;for(const l of t){const u=s.getDecorationInfo(l);if(!u)continue;const d=n.getValueInRange(l.range).codePointAt(0),h=Vle(d);let f;switch(u.reason.kind){case 0:{ZN(u.reason.confusableWith)?f=w("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,Vle(u.reason.confusableWith.codePointAt(0))):f=w("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,Vle(u.reason.confusableWith.codePointAt(0)));break}case 1:f=w("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=w("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(o.has(f))continue;o.add(f);const g={codePoint:d,reason:u.reason,inComment:u.inComment,inString:u.inString},b=w("unicodeHighlight.adjustSettings","Adjust settings"),y=`command:${tW.ID}?${encodeURIComponent(JSON.stringify(g))}`,S=new ul("",!0).appendMarkdown(f).appendText(" ").appendLink(y,b,H4e);r.push(new Tf(this,l.range,[S],!1,a++))}return r}renderHoverParts(e,t){return q6t(e,t,this._editor,this._languageService,this._openerService)}};Fle=Rle([uk(1,Zs),uk(2,Fu)],Fle);function Ble(i){return`U+${i.toString(16).padStart(4,"0")}`}function Vle(i){let e=`\`${Ble(i)}\``;return MC.isInvisibleCharacter(i)||(e+=` "${`${m$t(i)}`}"`),e}function m$t(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function $4e(i,e){return dJ.computeUnicodeHighlightReason(i,e)}const c$=class c${constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const n=`${e}${t}`;let s=this.map.get(n);return s||(s=xi.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,s)),s}};c$.instance=new c$;let eW=c$;class _$t extends wt{constructor(){super({id:vS.ID,label:w("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.includeComments,!1,2)}}class b$t extends wt{constructor(){super({id:vS.ID,label:w("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.includeStrings,!1,2)}}const d$=class d$ extends wt{constructor(){super({id:d$.ID,label:w("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.ambiguousCharacters,!1,2)}};d$.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let vS=d$;const h$=class h$ extends wt{constructor(){super({id:h$.ID,label:w("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.invisibleCharacters,!1,2)}};h$.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let PR=h$;const f$=class f$ extends wt{constructor(){super({id:f$.ID,label:w("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.nonBasicASCII,!1,2)}};f$.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let MR=f$;const p$=class p$ extends wt{constructor(){super({id:p$.ID,label:w("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,n){const{codePoint:s,reason:r,inString:o,inComment:a}=n,l=String.fromCodePoint(s),u=e.get(fh),c=e.get(Fi);function d(g){return MC.isInvisibleCharacter(g)?w("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",Ble(g)):w("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${Ble(g)} "${l}"`)}const h=[];if(r.kind===0)for(const g of r.notAmbiguousInLocales)h.push({label:w("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',g),run:async()=>{v$t(c,[g])}});if(h.push({label:d(s),run:()=>y$t(c,[s])}),a){const g=new _$t;h.push({label:g.label,run:async()=>g.runAction(c)})}else if(o){const g=new b$t;h.push({label:g.label,run:async()=>g.runAction(c)})}if(r.kind===0){const g=new vS;h.push({label:g.label,run:async()=>g.runAction(c)})}else if(r.kind===1){const g=new PR;h.push({label:g.label,run:async()=>g.runAction(c)})}else if(r.kind===2){const g=new MR;h.push({label:g.label,run:async()=>g.runAction(c)})}else C$t(r);const f=await u.pick(h,{title:H4e});f&&await f.run()}};p$.ID="editor.action.unicodeHighlight.showExcludeOptions";let tW=p$;async function y$t(i,e){const t=i.getValue(Nu.allowedCharacters);let n;typeof t=="object"&&t?n=t:n={};for(const s of e)n[String.fromCodePoint(s)]=!0;await i.updateValue(Nu.allowedCharacters,n,2)}async function v$t(i,e){const t=i.inspect(Nu.allowedLocales).user?.value;let n;typeof t=="object"&&t?n=Object.assign({},t):n={};for(const s of e)n[s]=!0;await i.updateValue(Nu.allowedLocales,n,2)}function C$t(i){throw new Error(`Unexpected value: ${i}`)}Ye(vS),Ye(PR),Ye(MR),Ye(tW),fn(IR.ID,IR,1),oS.register(Fle);var w$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},U4e=function(i,e){return function(t,n){e(t,n,i)}};const z4e="ignoreUnusualLineTerminators";function S$t(i,e,t){i.setModelProperty(e.uri,z4e,t)}function x$t(i,e){return i.getModelProperty(e.uri,z4e)}let iW=(aL=class extends ye{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||x$t(this._codeEditorService,e)===!0||this._editor.getOption(92))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:w("unusualLineTerminators.title","Unusual Line Terminators"),message:w("unusualLineTerminators.message","Detected unusual line terminators"),detail:w("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",ch(e.uri)),primaryButton:w({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:w("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){S$t(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},aL.ID="editor.contrib.unusualLineTerminatorsDetector",aL);iW=w$t([U4e(1,VI),U4e(2,yn)],iW),fn(iW.ID,iW,1);var D$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},E$t=function(i,e){return function(t,n){e(t,n,i)}};class j4e{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,n){const s=[],r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return r?e.isDisposed()?void 0:e.findMatches(r.word,!0,!1,!0,B6,!1).map(a=>({range:a.range,kind:bD.Text})):Promise.resolve(s)}provideMultiDocumentHighlights(e,t,n,s){const r=new na,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(r);for(const a of[e,...n]){if(a.isDisposed())continue;const u=a.findMatches(o.word,!0,!1,!0,B6,!1).map(c=>({range:c.range,kind:bD.Text}));u&&r.set(a.uri,u)}return r}}let Wle=class extends ye{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new j4e)),this._register(e.multiDocumentHighlightProvider.register("*",new j4e))}};Wle=D$t([E$t(0,Tt)],Wle);var q4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},nW=function(i,e){return function(t,n){e(t,n,i)}},zr,Hle;const $le=new gt("hasWordHighlights",!1);function G4e(i,e,t,n){const s=i.ordered(e);return mQ(s.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,kr)),r=>r!=null).then(r=>{if(r){const o=new na;return o.set(e.uri,r),o}return new na})}function T$t(i,e,t,n,s,r){const o=i.ordered(e);return mQ(o.map(a=>()=>{const l=r.filter(u=>jke(u)).filter(u=>UJ(a.selector,u.uri,u.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,s)).then(void 0,kr)}),a=>a!=null)}class K4e{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Bo(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const n=e.getWordAtPosition(t.getPosition());return n?new U(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){const s=t.startLineNumber,r=t.startColumn,o=t.endColumn,a=this._getCurrentWordRange(e,t);let l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let u=0,c=n.length;!l&&u<c;u++){const d=n.getRange(u);d&&d.startLineNumber===s&&d.startColumn<=r&&d.endColumn>=o&&(l=!0)}return l}cancel(){this.result.cancel()}}class k$t extends K4e{constructor(e,t,n,s){super(e,t,n),this._providers=s}_compute(e,t,n,s){return G4e(this._providers,e,t.getPosition(),s).then(r=>r||new na)}}class L$t extends K4e{constructor(e,t,n,s,r){super(e,t,n),this._providers=s,this._otherModels=r}_compute(e,t,n,s){return T$t(this._providers,e,t.getPosition(),n,s,this._otherModels).then(r=>r||new na)}}function A$t(i,e,t,n,s){return new k$t(e,t,s,i)}function N$t(i,e,t,n,s,r){return new L$t(e,t,s,i,r)}Ru("_executeDocumentHighlights",async(i,e,t)=>{const n=i.get(Tt);return(await G4e(n.documentHighlightProvider,e,t,Ii.None))?.get(e.uri)});let Ule=(Zy=class{constructor(e,t,n,s,r){this.toUnhook=new Fe,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new na,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new th(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=n,this.codeEditorService=r,this._hasWordHighlights=$le.bindTo(s),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(o=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(o)})})),this.toUnhook.add(e.onDidFocusEditorText(o=>{this.occurrencesHighlight!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(o=>{i6(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(o=>{!o.newModelUrl&&o.oldModelUrl?this._stopSingular():zr.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(o=>{const a=this.editor.getOption(81);if(this.occurrencesHighlight!==a)switch(this.occurrencesHighlight=a,a){case"off":this._stopAll();break;case"singleFile":this._stopAll(zr.query?.modelInfo?.model);break;case"multiFile":zr.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",a);break}})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,zr.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(U.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const r=this._getWord();if(r){const o=this.editor.getModel().getLineContent(s.startLineNumber);au(`${o}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const r=this._getWord();if(r){const o=this.editor.getModel().getLineContent(s.startLineNumber);au(`${o}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=zr.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),zr.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),n=[];for(const s of t){if(!s.hasModel()||KI(s.getModel().uri,e?.uri))continue;const r=zr.storedDecorationIDs.get(s.getModel().uri);if(!r)continue;s.removeDecorations(r),n.push(s.getModel().uri);const o=my.get(s);o?.wordHighlighter&&o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter.workerRequest=null,o.wordHighlighter._hasWordHighlights.set(!1))}for(const s of n)zr.storedDecorationIDs.delete(s)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==vi.vscodeNotebookCell&&zr.query?.modelInfo?.model.uri.scheme!==vi.vscodeNotebookCell?(zr.query=null,this._run()):zr.query?.modelInfo&&(zr.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&this.editor.getModel()?.uri.scheme!==vi.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===vi.vscodeNotebookCell){const r=[],o=this.codeEditorService.listCodeEditors();for(const a of o){const l=a.getModel();l&&l!==e&&l.uri.scheme===vi.vscodeNotebookCell&&r.push(l)}return r}const n=[],s=this.codeEditorService.listCodeEditors();for(const r of s){if(!Gse(r))continue;const o=r.getModel();o&&e===o.modified&&n.push(o.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(const r of s){const o=r.getModel();o&&o!==e&&n.push(o)}return n}_run(e){let t;if(this.editor.hasTextFocus()){const s=this.editor.getSelection();if(!s||s.startLineNumber!==s.endLineNumber){zr.query=null,this._stopAll();return}const r=s.startColumn,o=s.endColumn,a=this._getWord();if(!a||a.startColumn>r||a.endColumn<o){zr.query=null,this._stopAll();return}t=this.workerRequest&&this.workerRequest.isValid(this.model,s,this.decorations),zr.query={modelInfo:{model:this.model,selection:s},word:a}}else if(!zr.query){this._stopAll();return}if(this.lastCursorPositionChangeTime=new Date().getTime(),t)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else if(KI(this.editor.getModel().uri,zr.query.modelInfo?.model.uri)){if(!e){const o=this.decorations.getRanges();for(const a of o)if(a.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model:void 0);const s=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const r=this.getOtherModelsToHighlight(this.editor.getModel());if(!zr.query||!zr.query.modelInfo||zr.query.modelInfo.model.isDisposed())return;this.workerRequest=this.computeWithModel(zr.query.modelInfo.model,zr.query.modelInfo.selection,zr.query.word,r),this.workerRequest?.result.then(o=>{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=o||[],this._beginRenderDecorations())},bi)}}computeWithModel(e,t,n,s){return s.length?N$t(this.multiDocumentProviders,e,t,n,this.editor.getOption(132),s):A$t(this.providers,e,t,n,this.editor.getOption(132))}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const t of e){const n=my.get(t);if(!n)continue;const s=[],r=t.getModel()?.uri;if(r&&this.workerRequestValue.has(r)){const o=zr.storedDecorationIDs.get(r),a=this.workerRequestValue.get(r);if(a)for(const u of a)u.range&&s.push({range:u.range,options:yWt(u.kind)});let l=[];t.changeDecorations(u=>{l=u.deltaDecorations(o??[],s)}),zr.storedDecorationIDs=zr.storedDecorationIDs.set(r,l),s.length>0&&(n.wordHighlighter?.decorations.set(s),n.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}},zr=Zy,Zy.storedDecorationIDs=new na,Zy.query=null,Zy);Ule=zr=q4e([nW(4,yn)],Ule);let my=(Rx=class extends ye{static get(e){return e.getContribution(Hle.ID)}constructor(e,t,n,s){super(),this._wordHighlighter=null;const r=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new Ule(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,t,s))};this._register(e.onDidChangeModel(o=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),r()})),r()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},Hle=Rx,Rx.ID="editor.contrib.wordHighlighter",Rx);my=Hle=q4e([nW(1,ri),nW(2,Tt),nW(3,yn)],my);class Y4e extends wt{constructor(e,t){super(t),this._isNext=e}run(e,t){const n=my.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}class I$t extends Y4e{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:w("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:$le,kbOpts:{kbExpr:Q.editorTextFocus,primary:65,weight:100}})}}class P$t extends Y4e{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:w("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:$le,kbOpts:{kbExpr:Q.editorTextFocus,primary:1089,weight:100}})}}class M$t extends wt{constructor(){super({id:"editor.action.wordHighlight.trigger",label:w("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:Q.editorTextFocus,primary:0,weight:100}})}run(e,t,n){const s=my.get(t);s&&s.restoreViewState(!0)}}fn(my.ID,my,0),Ye(I$t),Ye(P$t),Ye(M$t),e2(Wle);class sW extends ko{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const s=ah(t.getOption(132),t.getOption(131)),r=t.getModel(),o=t.getSelections(),a=o.length>1,l=o.map(u=>{const c=new me(u.positionLineNumber,u.positionColumn),d=this._move(s,r,c,this._wordNavigationType,a);return this._moveTo(u,d,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(u=>vn.fromModelSelection(u))),l.length===1){const u=new me(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(u,0)}}_moveTo(e,t,n){return n?new Pt(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Pt(t.lineNumber,t.column,t.lineNumber,t.column)}}class _y extends sW{_move(e,t,n,s,r){return Pn.moveWordLeft(e,t,n,s,r)}}class by extends sW{_move(e,t,n,s,r){return Pn.moveWordRight(e,t,n,s)}}class R$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class O$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class F$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class B$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class V$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class W$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class H$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class $$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class U$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class z$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class j$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class q$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class G$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class K$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class Y$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class X$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class rW extends ko{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){const s=e.get(lr);if(!t.hasModel())return;const r=ah(t.getOption(132),t.getOption(131)),o=t.getModel(),a=t.getSelections(),l=t.getOption(6),u=t.getOption(11),c=s.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),h=a.map(f=>{const g=this._delete({wordSeparators:r,model:o,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:u,autoClosingPairs:c,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new $a(g,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class zle extends rW{_delete(e,t){const n=Pn.deleteWordLeft(e,t);return n||new U(1,1,1,1)}}class jle extends rW{_delete(e,t){const n=Pn.deleteWordRight(e,t);if(n)return n;const s=e.model.getLineCount(),r=e.model.getLineMaxColumn(s);return new U(s,r,s,r)}}class Q$t extends zle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Q.writable})}}class Z$t extends zle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:Q.writable})}}class J$t extends zle{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class eUt extends jle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Q.writable})}}class tUt extends jle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:Q.writable})}}class iUt extends jle{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class nUt extends wt{constructor(){super({id:"deleteInsideWord",precondition:Q.writable,label:w("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;const s=ah(t.getOption(132),t.getOption(131)),r=t.getModel(),a=t.getSelections().map(l=>{const u=Pn.deleteInsideWord(s,r,l);return new $a(u,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}ht(new R$t),ht(new O$t),ht(new F$t),ht(new B$t),ht(new V$t),ht(new W$t),ht(new U$t),ht(new z$t),ht(new j$t),ht(new q$t),ht(new G$t),ht(new K$t),ht(new H$t),ht(new $$t),ht(new Y$t),ht(new X$t),ht(new Q$t),ht(new Z$t),ht(new J$t),ht(new eUt),ht(new tUt),ht(new iUt),Ye(nUt);class sUt extends rW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const n=L7.deleteWordPartLeft(e);return n||new U(1,1,1,1)}}class rUt extends rW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const n=L7.deleteWordPartRight(e);if(n)return n;const s=e.model.getLineCount(),r=e.model.getLineMaxColumn(s);return new U(s,r,s,r)}}class X4e extends sW{_move(e,t,n,s,r){return L7.moveWordPartLeft(e,t,n,r)}}class oUt extends X4e{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}dn.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class aUt extends X4e{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}dn.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class Q4e extends sW{_move(e,t,n,s,r){return L7.moveWordPartRight(e,t,n)}}class lUt extends Q4e{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class uUt extends Q4e{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}ht(new sUt),ht(new rUt),ht(new oUt),ht(new aUt),ht(new lUt),ht(new uUt);const Pce=class Pce extends ye{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=Sc.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(this.editor.isSimpleWidget?t=new ul(w("editor.simple.readonly","Cannot edit in read-only input")):t=new ul(w("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};Pce.ID="editor.contrib.readOnlyMessageController";let oW=Pce;fn(oW.ID,oW,2);var cUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Z4e=function(i,e){return function(t,n){e(t,n,i)}};let qle=class extends ye{constructor(e,t,n){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=n,this._currentModel=Bi(this,void 0);const s=Ba("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),r=Ba("_textModel.onDidChangeContent",rt.debounce(o=>this._textModel.onDidChangeContent(o),()=>{},100));this._register(Bu(async(o,a)=>{s.read(o),r.read(o);const l=a.add(new BOt),u=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(u,void 0)}))}getBreadcrumbItems(e,t){const n=this._currentModel.read(t);if(!n)return[];const s=n.asListOfDocumentSymbols().filter(r=>e.contains(r.range.startLineNumber)&&!e.contains(r.range.endLineNumber));return s.sort(j2e(Jl(r=>r.range.endLineNumber-r.range.startLineNumber,mf))),s.map(r=>({name:r.name,kind:r.kind,startLineNumber:r.range.startLineNumber}))}};qle=cUt([Z4e(1,Tt),Z4e(2,iR)],qle),sB.setBreadcrumbsSourceFactory((i,e)=>e.createInstance(qle,i));const Mce=class Mce extends ye{constructor(e){super(),this.editor=e,this.widget=null,jf&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new Gle(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};Mce.ID="editor.contrib.iPadShowKeyboard";let aW=Mce;const g$=class g$ extends ye{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Ie(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Ie(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return g$.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};g$.ID="editor.contrib.ShowKeyboardWidget";let Gle=g$;fn(aW.ID,aW,3);var dUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},J4e=function(i,e){return function(t,n){e(t,n,i)}},Kle;let RR=(Ox=class extends ye{static get(e){return e.getContribution(Kle.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(Cr.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Yle(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},Kle=Ox,Ox.ID="editor.contrib.inspectTokens",Ox);RR=Kle=dUt([J4e(1,Cd),J4e(2,Zs)],RR);class hUt extends wt{constructor(){super({id:"editor.action.inspectTokens",label:Mee.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){RR.get(t)?.launch()}}function fUt(i){let e="";for(let t=0,n=i.length;t<n;t++){const s=i.charCodeAt(t);switch(s){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(s)}}return e}function pUt(i,e){const t=Cr.get(e);if(t)return t;const n=i.encodeLanguageId(e);return{getInitialState:()=>yT,tokenize:(s,r,o)=>Cee(e,o),tokenizeEncoded:(s,r,o)=>z8(n,o)}}const m$=class m$ extends ye{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=pUt(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return m$._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let n=0;for(let l=t.tokens1.length-1;l>=0;l--){const u=t.tokens1[l];if(e.column-1>=u.offset){n=l;break}}let s=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){s=l;break}const r=this._model.getLineContent(e.lineNumber);let o="";if(n<t.tokens1.length){const l=t.tokens1[n].offset,u=n+1<t.tokens1.length?t.tokens1[n+1].offset:r.length;o=r.substring(l,u)}_a(this._domNode,it("h2.tm-token",void 0,fUt(o),it("span.tm-token-length",void 0,`${o.length} ${o.length===1?"char":"chars"}`))),qe(this._domNode,it("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(s<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(s<<1)+1]):null;qe(this._domNode,it("table.tm-metadata-table",void 0,it("tbody",void 0,it("tr",void 0,it("td.tm-metadata-key",void 0,"language"),it("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"token type"),it("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"font style"),it("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"foreground"),it("td.tm-metadata-value",void 0,`${a?We.Format.CSS.formatHex(a.foreground):"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"background"),it("td.tm-metadata-value",void 0,`${a?We.Format.CSS.formatHex(a.background):"-?-"}`))))),qe(this._domNode,it("hr.tokens-inspect-separator")),n<t.tokens1.length&&qe(this._domNode,it("span.tm-token-type",void 0,t.tokens1[n].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=Cr.getColorMap(),n=Ou.getLanguageId(e),s=Ou.getTokenType(e),r=Ou.getFontStyle(e),o=Ou.getForeground(e),a=Ou.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:s,fontStyle:r,foreground:t[o],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){const t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),s=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:n.tokens,tokens2:s.tokens,endState:n.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let n=1;n<e;n++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(n),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};m$._ID="editor.contrib.inspectTokensWidget";let Yle=m$;fn(RR.ID,RR,4),Ye(hUt);var gUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},e5e=function(i,e){return function(t,n){e(t,n,i)}},OR;let Xle=(Fx=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=ar.as(Ew.Quickaccess)}provide(e){const t=new Fe;return t.add(e.onDidAccept(()=>{const[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{const s=this.registry.getQuickAccessProvider(n.substr(OR.PREFIX.length));s&&s.prefix&&s.prefix!==OR.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==OR.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const n=t.prefix||e.prefix,s=n||"…";return{prefix:n,label:s,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:w("helpPickAriaLabel","{0}, {1}",s,t.description),description:t.description}})}},OR=Fx,Fx.PREFIX="?",Fx);Xle=OR=gUt([e5e(0,fh),e5e(1,In)],Xle),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:Xle,prefix:"",helpEntries:[{description:Ree.helpQuickAccessActionLabel}]});class t5e{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,n){const s=new Fe;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=s.add(new Io);return r.value=this.doProvide(e,t,n),s.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),s}doProvide(e,t,n){const s=new Fe,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const o={editor:r},a=MRe(r);if(a){let l=r.saveViewState()??void 0;s.add(a.onDidChangeCursorPosition(()=>{l=r.saveViewState()??void 0})),o.restoreViewState=()=>{l&&r===this.activeTextEditorControl&&r.restoreViewState(l)},s.add(xb(t.onCancellationRequested)(()=>o.restoreViewState?.()))}s.add(zt(()=>this.clearDecorations(r))),s.add(this.provideWithTextEditor(o,e,t,n))}else s.add(this.provideWithoutTextEditor(e,t));return s}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const n=e.getModel();n&&"getLineContent"in n&&um(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){return Gse(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:xr(PNe),position:ad.Full}}}],[o,a]=n.deltaDecorations(s,r);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const _$=class _$ extends t5e{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=w("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ye.None}provideWithTextEditor(e,t,n){const s=e.editor,r=new Fe;r.add(t.onDidAccept(l=>{const[u]=t.selectedItems;if(u){if(!this.isValidLineNumber(s,u.lineNumber))return;this.gotoLocation(e,{range:this.toRange(u.lineNumber,u.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const o=()=>{const l=this.parsePosition(s,t.value.trim().substr(_$.PREFIX.length)),u=this.getPickLabel(s,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:u}],t.ariaLabel=u,!this.isValidLineNumber(s,l.lineNumber)){this.clearDecorations(s);return}const c=this.toRange(l.lineNumber,l.column);s.revealRangeInCenter(c,0),this.addDecorations(s,c)};o(),r.add(t.onDidChangeValue(()=>o()));const a=MRe(s);return a&&a.getOptions().get(68).renderType===2&&(a.updateOptions({lineNumbers:"on"}),r.add(zt(()=>a.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const n=t.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),s=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:s+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?w("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):w("gotoLineLabel","Go to line {0}.",t);const s=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?w("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",s.lineNumber,s.column,r):w("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",s.lineNumber,s.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;const s=this.getModel(e);if(!s)return!1;const r={lineNumber:t,column:n};return s.validatePosition(r).equals(r)}lineCount(e){return this.getModel(e)?.getLineCount()??0}};_$.PREFIX=":";let Qle=_$;var mUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},_Ut=function(i,e){return function(t,n){e(t,n,i)}};let FR=class extends Qle{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=rt.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};FR=mUt([_Ut(0,yn)],FR);let i5e=(Bx=class extends wt{constructor(){super({id:Bx.ID,label:i9.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:Q.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(fh).quickAccess.show(FR.PREFIX)}},Bx.ID="editor.action.gotoLine",Bx);Ye(i5e),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:FR,prefix:FR.PREFIX,helpEntries:[{description:i9.gotoLineActionLabel,commandId:i5e.ID}]});const n5e=[void 0,[]];function Zle(i,e,t=0,n=0){const s=e;return s.values&&s.values.length>1?bUt(i,s.values,t,n):s5e(i,e,t,n)}function bUt(i,e,t,n){let s=0;const r=[];for(const o of e){const[a,l]=s5e(i,o,t,n);if(typeof a!="number")return n5e;s+=a,r.push(...l)}return[s,yUt(r)]}function s5e(i,e,t,n){const s=lw(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],jI(s)]:n5e}function yUt(i){const e=i.sort((s,r)=>s.start-r.start),t=[];let n;for(const s of e)!n||!vUt(n,s)?(n=s,t.push(s)):(n.start=Math.min(n.start,s.start),n.end=Math.max(n.end,s.end));return t}function vUt(i,e){return!(i.end<e.start||e.end<i.start)}function r5e(i){return i.startsWith('"')&&i.endsWith('"')}const o5e=" ";function Jle(i){typeof i!="string"&&(i="");const e=i.toLowerCase(),{pathNormalized:t,normalized:n,normalizedLowercase:s}=a5e(i),r=t.indexOf(qf)>=0,o=r5e(i);let a;const l=i.split(o5e);if(l.length>1)for(const u of l){const c=r5e(u),{pathNormalized:d,normalized:h,normalizedLowercase:f}=a5e(u);h&&(a||(a=[]),a.push({original:u,originalLowercase:u.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:f,expectContiguousMatch:c}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:s,values:a,containsPathSeparator:r,expectContiguousMatch:o}}function a5e(i){let e;ka?e=i.replace(/\//g,qf):e=i.replace(/\\/g,qf);const t=i1t(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function l5e(i){return Array.isArray(i)?Jle(i.map(e=>e.original).join(o5e)):Jle(i.original)}var CUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},u5e=function(i,e){return function(t,n){e(t,n,i)}},lW;let CS=(sg=class extends t5e{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,w("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ye.None}provideWithTextEditor(e,t,n,s){const r=e.editor,o=this.getModel(r);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,n,s):this.doProvideWithoutEditorSymbols(e,o,t,n):ye.None}doProvideWithoutEditorSymbols(e,t,n,s){const r=new Fe;return this.provideLabelPick(n,w("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,r)||s.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,s)))(),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const n=new ME,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),n.complete(!0))}));return t.add(zt(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,t,n,s,r){const o=e.editor,a=new Fe;a.add(n.onDidAccept(d=>{const[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:d.inBackground}),r?.handleAccept?.(h),d.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:d})=>{d&&d.range&&(this.gotoLocation(e,{range:d.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const l=this.getDocumentSymbols(t,s);let u;const c=async d=>{u?.dispose(!0),n.busy=!1,u=new or(s),n.busy=!0;try{const h=Jle(n.value.substr(lW.PREFIX.length).trim()),f=await this.doGetSymbolPicks(l,h,void 0,u.token,t);if(s.isCancellationRequested)return;if(f.length>0){if(n.items=f,d&&h.original.length===0){const g=NI(f,b=>!!(b.type!=="separator"&&b.range&&U.containsPosition(b.range.decoration,d)));g&&(n.activeItems=[g])}}else h.original.length>0?this.provideLabelPick(n,w("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,w("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}};return a.add(n.onDidChangeValue(()=>c(void 0))),c(o.getSelection()?.getPosition()),a.add(n.onDidChangeActive(()=>{const[d]=n.activeItems;d&&d.range&&(o.revealRangeInCenter(d.range.selection,0),this.addDecorations(o,d.range.decoration))})),a}async doGetSymbolPicks(e,t,n,s,r){const o=await e;if(s.isCancellationRequested)return[];const a=t.original.indexOf(lW.SCOPE_PREFIX)===0,l=a?1:0;let u,c;t.values&&t.values.length>1?(u=l5e(t.values[0]),c=l5e(t.values.slice(1))):u=t;let d;const h=this.options?.openSideBySideDirection?.();h&&(d=[{iconClass:h==="right"?ni.asClassName(et.splitHorizontal):ni.asClassName(et.splitVertical),tooltip:h==="right"?w("openToSide","Open to the Side"):w("openToBottom","Open to the Bottom")}]);const f=[];for(let y=0;y<o.length;y++){const S=o[y],x=e1t(S.name),E=`$(${OF.toIcon(S.kind).id}) ${x}`,k=E.length-x.length;let A=S.containerName;n?.extraContainerLabel&&(A?A=`${n.extraContainerLabel} • ${A}`:A=n.extraContainerLabel);let I,M,B,F;if(t.original.length>l){let q=!1;if(u!==t&&([I,M]=Zle(E,{...t,values:void 0},l,k),typeof I=="number"&&(q=!0)),typeof I!="number"&&([I,M]=Zle(E,u,l,k),typeof I!="number"))continue;if(!q&&c){if(A&&c.original.length>0&&([B,F]=Zle(A,c)),typeof B!="number")continue;typeof I=="number"&&(I+=B)}}const G=S.tags&&S.tags.indexOf(1)>=0;f.push({index:y,kind:S.kind,score:I,label:E,ariaLabel:W$e(S.name,S.kind),description:A,highlights:G?void 0:{label:M,description:F},range:{selection:U.collapseToStart(S.selectionRange),decoration:S.range},uri:r.uri,symbolName:x,strikethrough:G,buttons:d})}const g=f.sort((y,S)=>a?this.compareByKindAndScore(y,S):this.compareByScore(y,S));let b=[];if(a){let E=function(){S&&typeof y=="number"&&x>0&&(S.label=IC(tue[y]||eue,x))},y,S,x=0;for(const k of g)y!==k.kind?(E(),y=k.kind,x=1,S={type:"separator"},b.push(S)):x++,b.push(k);E()}else g.length>0&&(b=[{label:w("symbols","symbols ({0})",f.length),type:"separator"},...g]);return b}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const n=tue[e.kind]||eue,s=tue[t.kind]||eue,r=n.localeCompare(s);return r===0?this.compareByScore(e,t):r}async getDocumentSymbols(e,t){const n=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}},lW=sg,sg.PREFIX="@",sg.SCOPE_PREFIX=":",sg.PREFIX_BY_CATEGORY=`${sg.PREFIX}${sg.SCOPE_PREFIX}`,sg);CS=lW=CUt([u5e(0,Tt),u5e(1,iR)],CS);const eue=w("property","properties ({0})"),tue={5:w("method","methods ({0})"),11:w("function","functions ({0})"),8:w("_constructor","constructors ({0})"),12:w("variable","variables ({0})"),4:w("class","classes ({0})"),22:w("struct","structs ({0})"),23:w("event","events ({0})"),24:w("operator","operators ({0})"),10:w("interface","interfaces ({0})"),2:w("namespace","namespaces ({0})"),3:w("package","packages ({0})"),25:w("typeParameter","type parameters ({0})"),1:w("modules","modules ({0})"),6:w("property","properties ({0})"),9:w("enum","enumerations ({0})"),21:w("enumMember","enumeration members ({0})"),14:w("string","strings ({0})"),0:w("file","files ({0})"),17:w("array","arrays ({0})"),15:w("number","numbers ({0})"),16:w("boolean","booleans ({0})"),18:w("object","objects ({0})"),19:w("key","keys ({0})"),7:w("field","fields ({0})"),13:w("constant","constants ({0})")};var wUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},iue=function(i,e){return function(t,n){e(t,n,i)}};let nue=class extends CS{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=rt.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};nue=wUt([iue(0,yn),iue(1,Tt),iue(2,iR)],nue);const b$=class b$ extends wt{constructor(){super({id:b$.ID,label:nP.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Q.hasDocumentSymbolProvider,kbOpts:{kbExpr:Q.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(fh).quickAccess.show(CS.PREFIX,{itemActivation:Rp.NONE})}};b$.ID="editor.action.quickOutline";let uW=b$;Ye(uW),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:nue,prefix:CS.PREFIX,helpEntries:[{description:nP.quickOutlineActionLabel,prefix:CS.PREFIX,commandId:uW.ID},{description:nP.quickOutlineByCategoryActionLabel,prefix:CS.PREFIX_BY_CATEGORY}]});function SUt(i){const e=new Map;for(const t of i)e.set(t,(e.get(t)??0)+1);return e}class BR{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const n=this.computeEmbedding(e),s=new Map,r=[];for(const[o,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const u=this.computeSimilarityScore(l,n,s);u>0&&r.push({key:o,score:u})}}return r}static termFrequencies(e){return SUt(BR.splitTerms(e))}static*splitTerms(e){const t=n=>n.toLowerCase();for(const[n]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(n);const s=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(s.length>1)for(const r of s)r.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(r)&&(yield t(r))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const n=[];for(const s of t.textChunks){const r=BR.termFrequencies(s);for(const o of r.keys())this.chunkOccurrences.set(o,(this.chunkOccurrences.get(o)??0)+1);n.push({text:s,tf:r})}this.chunkCount+=n.length,this.documents.set(t.key,{chunks:n})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const n of t.chunks)for(const s of n.tf.keys()){const r=this.chunkOccurrences.get(s);if(typeof r=="number"){const o=r-1;o<=0?this.chunkOccurrences.delete(s):this.chunkOccurrences.set(s,o)}}}}computeSimilarityScore(e,t,n){let s=0;for(const[r,o]of Object.entries(t)){const a=e.tf.get(r);if(!a)continue;let l=n.get(r);typeof l!="number"&&(l=this.computeIdf(r),n.set(r,l));const u=a*l;s+=u*o}return s}computeEmbedding(e){const t=BR.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[n,s]of e){const r=this.computeIdf(n);r>0&&(t[n]=s*r)}return t}}function xUt(i){const e=i.slice(0);e.sort((n,s)=>s.score-n.score);const t=e[0]?.score??0;if(t>0)for(const n of e)n.score/=t;return e}var ck;(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(ck||(ck={}));function sue(i){const e=i;return Array.isArray(e.items)}function c5e(i){const e=i;return!!e.picks&&e.additionalPicks instanceof Promise}class DUt extends ye{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){const s=new Fe;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r;const o=s.add(new Io),a=async()=>{const u=o.value=new Fe;r?.dispose(!0),e.busy=!1,r=new or(t);const c=r.token;let d=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(d=d.trim());const h=this._getPicks(d,u,c,n),f=(b,y)=>{let S,x;if(sue(b)?(S=b.items,x=b.active):S=b,S.length===0){if(y)return!1;(d.length>0||e.hideInput)&&this.options?.noResultsPick&&(jL(this.options.noResultsPick)?S=[this.options.noResultsPick(d)]:S=[this.options.noResultsPick])}return e.items=S,x&&(e.activeItems=[x]),!0},g=async b=>{let y=!1,S=!1;await Promise.all([(async()=>{typeof b.mergeDelay=="number"&&(await U0(b.mergeDelay),c.isCancellationRequested)||S||(y=f(b.picks,!0))})(),(async()=>{e.busy=!0;try{const x=await b.additionalPicks;if(c.isCancellationRequested)return;let E,k;sue(b.picks)?(E=b.picks.items,k=b.picks.active):E=b.picks;let A,I;if(sue(x)?(A=x.items,I=x.active):A=x,A.length>0||!y){let M;if(!k&&!I){const B=e.activeItems[0];B&&E.indexOf(B)!==-1&&(M=B)}f({items:[...E,...A],active:k||I||M})}}finally{c.isCancellationRequested||(e.busy=!1),S=!0}})()])};if(h!==null)if(c5e(h))await g(h);else if(!(h instanceof Promise))f(h);else{e.busy=!0;try{const b=await h;if(c.isCancellationRequested)return;c5e(b)?await g(b):f(b)}finally{c.isCancellationRequested||(e.busy=!1)}}};s.add(e.onDidChangeValue(()=>a())),a(),s.add(e.onDidAccept(u=>{if(n?.handleAccept){u.inBackground||e.hide(),n.handleAccept?.(e.activeItems[0]);return}const[c]=e.selectedItems;typeof c?.accept=="function"&&(u.inBackground||e.hide(),c.accept(e.keyMods,u))}));const l=async(u,c)=>{if(typeof c.trigger!="function")return;const d=c.buttons?.indexOf(u)??-1;if(d>=0){const h=c.trigger(d,e.keyMods),f=typeof h=="number"?h:await h;if(t.isCancellationRequested)return;switch(f){case ck.NO_ACTION:break;case ck.CLOSE_PICKER:e.hide();break;case ck.REFRESH_PICKER:a();break;case ck.REMOVE_ITEM:{const g=e.items.indexOf(c);if(g!==-1){const b=e.items.slice(),y=b.splice(g,1),S=e.activeItems.filter(E=>E!==y[0]),x=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,S&&(e.activeItems=S),e.keepScrollPosition=x}break}}}};return s.add(e.onDidTriggerItemButton(({button:u,item:c})=>l(u,c))),s.add(e.onDidTriggerSeparatorButton(({button:u,separator:c})=>l(u,c))),s}}var d5e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},yy=function(i,e){return function(t,n){e(t,n,i)}},wS,vo;let rue=(Xm=class extends DUt{constructor(e,t,n,s,r,o){super(wS.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=s,this.telemetryService=r,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(oue)),this.options=e}async _getPicks(e,t,n,s){const r=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];const o=xb(()=>{const f=new BR;f.updateDocuments(r.map(b=>({key:b.commandId,textChunks:[this.getTfIdfChunk(b)]})));const g=f.calculateScores(e,n);return xUt(g).filter(b=>b.score>wS.TFIDF_THRESHOLD).slice(0,wS.TFIDF_MAX_RESULTS)}),a=[];for(const f of r){const g=wS.WORD_FILTER(e,f.label)??void 0,b=f.commandAlias?wS.WORD_FILTER(e,f.commandAlias)??void 0:void 0;if(g||b)f.highlights={label:g,detail:this.options.showAlias?b:void 0},a.push(f);else if(e===f.commandId)a.push(f);else if(e.length>=3){const y=o();if(n.isCancellationRequested)return[];const S=y.find(x=>x.key===f.commandId);S&&(f.tfIdfScore=S.score,a.push(f))}}const l=new Map;for(const f of a){const g=l.get(f.label);g?(f.description=f.commandId,g.description=g.commandId):l.set(f.label,f)}a.sort((f,g)=>{if(f.tfIdfScore&&g.tfIdfScore)return f.tfIdfScore===g.tfIdfScore?f.label.localeCompare(g.label):g.tfIdfScore-f.tfIdfScore;if(f.tfIdfScore)return 1;if(g.tfIdfScore)return-1;const b=this.commandsHistory.peek(f.commandId),y=this.commandsHistory.peek(g.commandId);if(b&&y)return b>y?-1:1;if(b)return-1;if(y)return 1;if(this.options.suggestedCommandIds){const S=this.options.suggestedCommandIds.has(f.commandId),x=this.options.suggestedCommandIds.has(g.commandId);if(S&&x)return 0;if(S)return-1;if(x)return 1}return f.label.localeCompare(g.label)});const u=[];let c=!1,d=!0,h=!!this.options.suggestedCommandIds;for(let f=0;f<a.length;f++){const g=a[f];f===0&&this.commandsHistory.peek(g.commandId)&&(u.push({type:"separator",label:w("recentlyUsed","recently used")}),c=!0),d&&g.tfIdfScore!==void 0&&(u.push({type:"separator",label:w("suggested","similar commands")}),d=!1),h&&g.tfIdfScore===void 0&&!this.commandsHistory.peek(g.commandId)&&this.options.suggestedCommandIds?.has(g.commandId)&&(u.push({type:"separator",label:w("commonlyUsed","commonly used")}),c=!0,h=!1),c&&g.tfIdfScore===void 0&&!this.commandsHistory.peek(g.commandId)&&!this.options.suggestedCommandIds?.has(g.commandId)&&(u.push({type:"separator",label:w("morecCommands","other commands")}),c=!1),u.push(this.toCommandPick(g,s))}return this.hasAdditionalCommandPicks(e,n)?{picks:u,additionalPicks:(async()=>{const f=await this.getAdditionalCommandPicks(r,a,e,n);if(n.isCancellationRequested)return[];const g=f.map(b=>this.toCommandPick(b,s));return d&&g[0]?.type!=="separator"&&g.unshift({type:"separator",label:w("suggested","similar commands")}),g})()}:u}toCommandPick(e,t){if(e.type==="separator")return e;const n=this.keybindingService.lookupKeybinding(e.commandId),s=n?w("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:s,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(r){zd(r)||this.dialogService.error(w("canNotRun","Command '{0}' resulted in an error",e.label),_B(r))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:n}){let s=e;return t&&t!==e&&(s+=` - ${t}`),n&&n.value!==e&&(s+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),s}},wS=Xm,Xm.PREFIX=">",Xm.TFIDF_THRESHOLD=.5,Xm.TFIDF_MAX_RESULTS=5,Xm.WORD_FILTER=ZJ(zI,aEt,cAe),Xm);rue=wS=d5e([yy(1,jt),yy(2,In),yy(3,xs),yy(4,al),yy(5,VI)],rue);let oue=(rg=class extends ye{constructor(e,t,n){super(),this.storageService=e,this.configurationService=t,this.logService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===_P.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=vo.getConfiguredCommandHistoryLength(this.configurationService),vo.cache&&vo.cache.limit!==this.configuredCommandsHistoryLength&&(vo.cache.limit=this.configuredCommandsHistoryLength,vo.hasChanges=!0))}load(){const e=this.storageService.get(vo.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(s){this.logService.error(`[CommandsHistory] invalid data: ${s}`)}const n=vo.cache=new nm(this.configuredCommandsHistoryLength,1);if(t){let s;t.usesLRU?s=t.entries:s=t.entries.sort((r,o)=>r.value-o.value),s.forEach(r=>n.set(r.key,r.value))}vo.counter=this.storageService.getNumber(vo.PREF_KEY_COUNTER,0,vo.counter)}push(e){vo.cache&&(vo.cache.set(e,vo.counter++),vo.hasChanges=!0)}peek(e){return vo.cache?.peek(e)}saveState(){if(!vo.cache||!vo.hasChanges)return;const e={usesLRU:!0,entries:[]};vo.cache.forEach((t,n)=>e.entries.push({key:n,value:t})),this.storageService.store(vo.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(vo.PREF_KEY_COUNTER,vo.counter,0,0),vo.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const n=e.getValue().workbench?.commandPalette?.history;return typeof n=="number"?n:vo.DEFAULT_COMMANDS_HISTORY_LENGTH}},vo=rg,rg.DEFAULT_COMMANDS_HISTORY_LENGTH=50,rg.PREF_KEY_CACHE="commandPalette.mru.cache",rg.PREF_KEY_COUNTER="commandPalette.mru.counter",rg.counter=1,rg.hasChanges=!1,rg);oue=vo=d5e([yy(0,xf),yy(1,Fi),yy(2,Oa)],oue);class EUt extends rue{constructor(e,t,n,s,r,o){super(e,t,n,s,r,o)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const n of e.getSupportedActions()){let s;n.metadata?.description&&(nkt(n.metadata.description)?s=n.metadata.description:s={original:n.metadata.description,value:n.metadata.description}),t.push({commandId:n.id,commandAlias:n.alias,commandDescription:s,label:uee(n.label)||n.id})}return t}}var TUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},dk=function(i,e){return function(t,n){e(t,n,i)}};let VR=class extends EUt{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,n,s,r,o){super({showAlias:!1},e,n,s,r,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};VR=TUt([dk(0,jt),dk(1,yn),dk(2,In),dk(3,xs),dk(4,al),dk(5,VI)],VR);const y$=class y$ extends wt{constructor(){super({id:y$.ID,label:n9.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:Q.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(fh).quickAccess.show(VR.PREFIX)}};y$.ID="editor.action.quickCommand";let cW=y$;Ye(cW),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:VR,prefix:VR.PREFIX,helpEntries:[{description:n9.quickCommandHelp,commandId:cW.ID}]});var kUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},hk=function(i,e){return function(t,n){e(t,n,i)}};let aue=class extends uS{constructor(e,t,n,s,r,o,a){super(!0,e,t,n,s,r,o,a)}};aue=kUt([hk(1,ri),hk(2,yn),hk(3,$r),hk(4,jt),hk(5,xf),hk(6,Fi)],aue),fn(uS.ID,aue,4);class LUt extends wt{constructor(){super({id:"editor.action.toggleHighContrast",label:Fee.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const n=e.get(Cd),s=n.getColorTheme();xp(s.type)?(n.setTheme(this._originalThemeName||(jE(s.type)?XT:C_)),this._originalThemeName=null):(n.setTheme(jE(s.type)?Mw:Rw),this._originalThemeName=s.themeName)}}Ye(LUt);const AUt=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:VRe,Emitter:Kse,KeyCode:WRe,KeyMod:HRe,MarkerSeverity:qRe,MarkerTag:GRe,Position:$Re,Range:URe,Selection:zRe,SelectionDirection:jRe,Token:KRe,Uri:Yse,editor:Up,languages:Dm},Symbol.toStringTag,{value:"Module"}));class h5e{_onDidChange=new Kse;_formattingOptions;_modeConfiguration;_diagnosticSettings;_completionSettings;_schemas=null;_schemasById=Object.create(null);_languageId;_externalFragmentDefinitions;constructor({languageId:e,schemas:t,modeConfiguration:n,formattingOptions:s,diagnosticSettings:r,completionSettings:o}){this._languageId=e,t&&this.setSchemaConfig(t),this._modeConfiguration=n,this._completionSettings=o,this._diagnosticSettings=r,this._formattingOptions=s}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get schemas(){return this._schemas}schemasById(){return this._schemasById}get formattingOptions(){return this._formattingOptions}get diagnosticSettings(){return this._diagnosticSettings}get completionSettings(){return{...this._completionSettings,fillLeafsOnComplete:this._completionSettings.__experimental__fillLeafsOnComplete??this._completionSettings.fillLeafsOnComplete}}get externalFragmentDefinitions(){return this._externalFragmentDefinitions}setSchemaConfig(e){this._schemas=e,this._schemasById=e.reduce((t,n)=>(t[n.uri]=n,t),Object.create(null)),this._onDidChange.fire(this)}setExternalFragmentDefinitions(e){this._externalFragmentDefinitions=e}setModeConfiguration(e){this._modeConfiguration=e,this._onDidChange.fire(this)}setFormattingOptions(e){this._formattingOptions=e,this._onDidChange.fire(this)}setDiagnosticSettings(e){this._diagnosticSettings=e,this._onDidChange.fire(this)}setCompletionSettings(e){this._completionSettings=e,this._onDidChange.fire(this)}}function NUt(i,e){if(!e)return new h5e({languageId:i,schemas:[],formattingOptions:lue,modeConfiguration:f5e,diagnosticSettings:p5e,completionSettings:g5e});const{schemas:t,formattingOptions:n,modeConfiguration:s,diagnosticSettings:r,completionSettings:o}=e;return new h5e({languageId:i,schemas:t,formattingOptions:{...lue,...n,prettierConfig:{...lue.prettierConfig,...n?.prettierConfig}},modeConfiguration:{...f5e,...s},diagnosticSettings:{...p5e,...r},completionSettings:{...g5e,...o}})}const f5e={documentFormattingEdits:!0,documentRangeFormattingEdits:!1,completionItems:!0,hovers:!0,documentSymbols:!1,tokens:!1,colors:!1,foldingRanges:!1,diagnostics:!0,selectionRanges:!1},lue={prettierConfig:{tabWidth:2}},p5e={jsonDiagnosticSettings:{schemaValidation:"error"}},g5e={__experimental__fillLeafsOnComplete:!1},m5e="graphql";let WR;function IUt(i){return WR||(WR=NUt(m5e,i),Dm.graphql={api:WR},PUt().then(e=>e.setupMode(WR))),WR}function PUt(){return Promise.resolve().then(()=>tQt)}const MUt=Object.freeze(Object.defineProperty({__proto__:null,LANGUAGE_ID:m5e,initializeMode:IUt},Symbol.toStringTag,{value:"Module"}));var RUt=Object.defineProperty,_5e=i=>{throw TypeError(i)},dW=(i,e)=>{for(var t in e)RUt(i,t,{get:e[t],enumerable:!0})},b5e=(i,e,t)=>e.has(i)||_5e("Cannot "+t),vy=(i,e,t)=>(b5e(i,e,"read from private field"),e.get(i)),OUt=(i,e,t)=>e.has(i)?_5e("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),FUt=(i,e,t,n)=>(b5e(i,e,"write to private field"),e.set(i,t),t),y5e={};dW(y5e,{languages:()=>e9e,options:()=>Z8e,printers:()=>J8e});var BUt=[{name:"JavaScript",type:"programming",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],tmScope:"source.js",aceMode:"javascript",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],filenames:["Jakefile","start.frag","end.frag"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",extensions:[".js.flow"],tmScope:"source.js",aceMode:"javascript",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],filenames:[],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",extensions:[".jsx"],tmScope:"source.js.jsx",aceMode:"javascript",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,filenames:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],v5e={};dW(v5e,{canAttachComment:()=>Kjt,embed:()=>Rqt,experimentalFeatures:()=>$Yt,getCommentChildNodes:()=>Yjt,getVisitorKeys:()=>E5e,handleComments:()=>J5e,insertPragma:()=>Yqt,isBlockComment:()=>Nf,isGap:()=>Xjt,massageAstNode:()=>qzt,print:()=>HYt,printComment:()=>fjt,willPrintOwnComments:()=>h6e});var VUt=(i,e,t,n)=>{if(!(i&&e==null))return e.replaceAll?e.replaceAll(t,n):t.global?e.replace(t,n):e.split(t).join(n)},mu=VUt,WUt=(i,e,t)=>{if(!(i&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},Tr=WUt;function HUt(i){return i!==null&&typeof i=="object"}var $Ut=HUt;function*UUt(i,e){let{getVisitorKeys:t,filter:n=()=>!0}=e,s=r=>$Ut(r)&&n(r);for(let r of t(i)){let o=i[r];if(Array.isArray(o))for(let a of o)s(a)&&(yield a);else s(o)&&(yield o)}}function*zUt(i,e){let t=[i];for(let n=0;n<t.length;n++){let s=t[n];for(let r of UUt(s,e))yield r,t.push(r)}}function jUt(i,{getVisitorKeys:e,predicate:t}){for(let n of zUt(i,{getVisitorKeys:e}))if(t(n))return!0;return!1}var qUt=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function GUt(i){return i===12288||i>=65281&&i<=65376||i>=65504&&i<=65510}function KUt(i){return i>=4352&&i<=4447||i===8986||i===8987||i===9001||i===9002||i>=9193&&i<=9196||i===9200||i===9203||i===9725||i===9726||i===9748||i===9749||i>=9776&&i<=9783||i>=9800&&i<=9811||i===9855||i>=9866&&i<=9871||i===9875||i===9889||i===9898||i===9899||i===9917||i===9918||i===9924||i===9925||i===9934||i===9940||i===9962||i===9970||i===9971||i===9973||i===9978||i===9981||i===9989||i===9994||i===9995||i===10024||i===10060||i===10062||i>=10067&&i<=10069||i===10071||i>=10133&&i<=10135||i===10160||i===10175||i===11035||i===11036||i===11088||i===11093||i>=11904&&i<=11929||i>=11931&&i<=12019||i>=12032&&i<=12245||i>=12272&&i<=12287||i>=12289&&i<=12350||i>=12353&&i<=12438||i>=12441&&i<=12543||i>=12549&&i<=12591||i>=12593&&i<=12686||i>=12688&&i<=12773||i>=12783&&i<=12830||i>=12832&&i<=12871||i>=12880&&i<=42124||i>=42128&&i<=42182||i>=43360&&i<=43388||i>=44032&&i<=55203||i>=63744&&i<=64255||i>=65040&&i<=65049||i>=65072&&i<=65106||i>=65108&&i<=65126||i>=65128&&i<=65131||i>=94176&&i<=94180||i===94192||i===94193||i>=94208&&i<=100343||i>=100352&&i<=101589||i>=101631&&i<=101640||i>=110576&&i<=110579||i>=110581&&i<=110587||i===110589||i===110590||i>=110592&&i<=110882||i===110898||i>=110928&&i<=110930||i===110933||i>=110948&&i<=110951||i>=110960&&i<=111355||i>=119552&&i<=119638||i>=119648&&i<=119670||i===126980||i===127183||i===127374||i>=127377&&i<=127386||i>=127488&&i<=127490||i>=127504&&i<=127547||i>=127552&&i<=127560||i===127568||i===127569||i>=127584&&i<=127589||i>=127744&&i<=127776||i>=127789&&i<=127797||i>=127799&&i<=127868||i>=127870&&i<=127891||i>=127904&&i<=127946||i>=127951&&i<=127955||i>=127968&&i<=127984||i===127988||i>=127992&&i<=128062||i===128064||i>=128066&&i<=128252||i>=128255&&i<=128317||i>=128331&&i<=128334||i>=128336&&i<=128359||i===128378||i===128405||i===128406||i===128420||i>=128507&&i<=128591||i>=128640&&i<=128709||i===128716||i>=128720&&i<=128722||i>=128725&&i<=128727||i>=128732&&i<=128735||i===128747||i===128748||i>=128756&&i<=128764||i>=128992&&i<=129003||i===129008||i>=129292&&i<=129338||i>=129340&&i<=129349||i>=129351&&i<=129535||i>=129648&&i<=129660||i>=129664&&i<=129673||i>=129679&&i<=129734||i>=129742&&i<=129756||i>=129759&&i<=129769||i>=129776&&i<=129784||i>=131072&&i<=196605||i>=196608&&i<=262141}var YUt=i=>!(GUt(i)||KUt(i)),XUt=/[^\x20-\x7F]/u;function QUt(i){if(!i)return 0;if(!XUt.test(i))return i.length;i=i.replace(qUt()," ");let e=0;for(let t of i){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(e+=YUt(n)?1:2)}return e}var fk=QUt;function uue(i){return(e,t,n)=>{let s=!!(n!=null&&n.backwards);if(t===!1)return!1;let{length:r}=e,o=t;for(;o>=0&&o<r;){let a=e.charAt(o);if(i instanceof RegExp){if(!i.test(a))return o}else if(!i.includes(a))return o;s?o--:o++}return o===-1||o===r?o:!1}}var pk=uue(" "),ZUt=uue(",; "),JUt=uue(/[^\n\r]/u);function ezt(i,e,t){let n=!!(t!=null&&t.backwards);if(e===!1)return!1;let s=i.charAt(e);if(n){if(i.charAt(e-1)==="\r"&&s===`
1345
+ `)};const o=await r.provideRenameEdits(this.model,this.position,e,s);if(o){if(o.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(o.rejectReason),s)}else return this._provideRenameEdits(e,t+1,n.concat(w("no result","No result.")),s);return o}}async function AHt(i,e,t,n){const s=new ple(e,t,i),r=await s.resolveRenameLocation(Ii.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:s.provideRenameEdits(n,Ii.None)}let fy=(Ix=class{static get(e){return e.getContribution(fle.ID)}constructor(e,t,n,s,r,o,a,l,u){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=s,this._progressService=r,this._logService=o,this._configService=a,this._languageFeaturesService=l,this._telemetryService=u,this._disposableStore=new Fe,this._cts=new or,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(dle,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new or,!this.editor.hasModel()){e("editor has no model");return}const t=this.editor.getPosition(),n=new ple(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!n.hasProvider()){e("skeleton has no provider");return}const s=new ey(this.editor,5,void 0,this._cts.token);let r;try{e("resolving rename location");const g=n.resolveRenameLocation(s.token);this._progressService.showWhile(g,250),r=await g,e("resolved rename location")}catch(g){g instanceof Wh?e("resolve rename location cancelled",JSON.stringify(g,null," ")):(e("resolve rename location failed",g instanceof Error?g:JSON.stringify(g,null," ")),(typeof g=="string"||Lp(g))&&Sc.get(this.editor)?.showMessage(g||w("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t));return}finally{s.dispose()}if(!r){e("returning early - no loc");return}if(r.rejectReason){e(`returning early - rejected with reason: ${r.rejectReason}`,r.rejectReason),Sc.get(this.editor)?.showMessage(r.rejectReason,t);return}if(s.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const o=new ey(this.editor,5,r.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),u=await Promise.all(l.map(async g=>[g,await g.supportsAutomaticNewSymbolNamesTriggerKind??!1])),c=(g,b)=>{let y=u.slice();return g===YL.Automatic&&(y=y.filter(([S,x])=>x)),y.map(([S])=>S.provideNewSymbolNames(a,r.range,g,b))};e("creating rename input field and awaiting its result");const d=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),h=await this._renameWidget.getInput(r.range,r.text,d,l.length>0?c:void 0,o);if(e("received response from rename input field"),l.length>0&&this._reportTelemetry(l.length,a.getLanguageId(),h),typeof h=="boolean"){e(`returning early - rename input field response - ${h}`),h&&this.editor.focus(),o.dispose();return}this.editor.focus(),e("requesting rename edits");const f=HN(n.provideRenameEdits(h.newName,o.token),o.token).then(async g=>{if(!g){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(g.rejectReason){e(`returning early - rejected with reason: ${g.rejectReason}`),this._notificationService.info(g.rejectReason);return}this.editor.setSelection(U.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(g,{editor:this.editor,showPreview:h.wantsPreview,label:w("label","Renaming '{0}' to '{1}'",r?.text,h.newName),code:"undoredo.rename",quotableLabel:w("quotableLabel","Renaming {0} to {1}",r?.text,h.newName),respectAutoSaveConfig:!0}).then(b=>{e("edits applied"),b.ariaSummary&&au(w("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,h.newName,b.ariaSummary))}).catch(b=>{e(`error when applying edits ${JSON.stringify(b,null," ")}`),this._notificationService.error(w("rename.failedApply","Rename failed to apply edits")),this._logService.error(b)})},g=>{e("error when providing rename edits",JSON.stringify(g,null," ")),this._notificationService.error(w("rename.failed","Rename failed to compute edits")),this._logService.error(g)}).finally(()=>{o.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,n){const s=typeof n=="boolean"?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:n.stats.source.k,nRenameSuggestions:n.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:n.stats.timeBeforeFirstInputFieldEdit,wantsPreview:n.wantsPreview,nRenameSuggestionsInvocations:n.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:n.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",s)}},fle=Ix,Ix.ID="editor.contrib.renameController",Ix);fy=fle=LHt([hy(1,jt),hy(2,$r),hy(3,ZI),hy(4,I1),hy(5,Oa),hy(6,g8),hy(7,Tt),hy(8,al)],fy);class NHt extends wt{constructor(){super({id:"editor.action.rename",label:w("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:Be.and(Q.writable,Q.hasRenameProvider),kbOpts:{kbExpr:Q.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const n=e.get(yn),[s,r]=Array.isArray(t)&&t||[void 0,void 0];return Gt.isUri(s)&&me.isIPosition(r)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(o=>{o&&(o.setPosition(r),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},bi):super.runCommand(e,t)}run(e,t){const n=e.get(Oa),s=fy.get(t);return s?(n.trace("[RenameAction] got controller, running..."),s.run()):(n.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}fn(fy.ID,fy,4),Ye(NHt);const gle=ko.bindToContribution(fy.get);ht(new gle({id:"acceptRenameInput",precondition:ak,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:Be.and(Q.focus,Be.not("isComposing")),primary:3}})),ht(new gle({id:"acceptRenameInputWithPreview",precondition:Be.and(ak,Be.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:Be.and(Q.focus,Be.not("isComposing")),primary:2051}})),ht(new gle({id:"cancelRenameInput",precondition:ak,handler:i=>i.cancelRenameInput(),kbOpts:{weight:199,kbExpr:Q.focus,primary:9,secondary:[1033]}})),ys(class extends su{constructor(){super({id:"focusNextRenameSuggestion",title:{...ui("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:ak,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(yn).getFocusedCodeEditor();if(!t)return;const n=fy.get(t);n&&n.focusNextRenameSuggestion()}}),ys(class extends su{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...ui("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:ak,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(yn).getFocusedCodeEditor();if(!t)return;const n=fy.get(t);n&&n.focusPreviousRenameSuggestion()}}),Ru("_executeDocumentRenameProvider",function(i,e,t,...n){const[s]=n;mn(typeof s=="string");const{renameProvider:r}=i.get(Tt);return AHt(r,e,t,s)}),Ru("_executePrepareRename",async function(i,e,t){const{renameProvider:n}=i.get(Tt),r=await new ple(e,t,n).resolveRenameLocation(Ii.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r}),ar.as(yf.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:w("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var IHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},C4e=function(i,e){return function(t,n){e(t,n,i)}};let GV=(sL=class extends ye{constructor(e,t,n){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(s=>{const r=this.editor.getModel()?.getLanguageId();r&&s.affects(r)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(s=>{this.options&&!s.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(s=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(s=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new Jn(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const n=this.languageConfigurationService.getLanguageConfiguration(t).comments,s=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!n&&!s?.markers))return{foldingRules:s,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(n=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(n)})}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter(r=>{if(!r.shouldBeInComments)return!0;const o=t.validateRange(r.range),a=t.tokenization.getLineTokens(o.startLineNumber),l=a.findTokenIndexAtOffset(o.startColumn-1),u=a.getStandardTokenType(l);return a.getLanguageId(l)===t.getLanguageId()&&u===1}));const n=Object.values(this.currentOccurrences).map(r=>r.decorationId),s=e.map(r=>PHt(r));this.editor.changeDecorations(r=>{const o=r.deltaDecorations(n,s);this.currentOccurrences={};for(let a=0,l=o.length;a<l;a++){const u={sectionHeader:e[a],decorationId:o[a]};this.currentOccurrences[u.decorationId]=u}})}stop(){this.computeSectionHeaders.cancel(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop(),this.decorations.clear()}},sL.ID="editor.sectionHeaderDetector",sL);GV=IHt([C4e(1,lr),C4e(2,Wu)],GV);function PHt(i){return{range:i.range,options:xi.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:i.hasSeparatorLine?2:1,sectionHeaderText:i.text}})}}fn(GV.ID,GV,1);function MHt(i){for(let e=0,t=i.length;e<t;e+=4){const n=i[e+0],s=i[e+1],r=i[e+2],o=i[e+3];i[e+0]=o,i[e+1]=r,i[e+2]=s,i[e+3]=n}}function RHt(i){const e=new Uint8Array(i.buffer,i.byteOffset,i.length*4);return ife()||MHt(e),I6.wrap(e)}function w4e(i){const e=new Uint32Array(OHt(i));let t=0;if(e[t++]=i.id,i.type==="full")e[t++]=1,e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length;else{e[t++]=2,e[t++]=i.deltas.length;for(const n of i.deltas)e[t++]=n.start,e[t++]=n.deleteCount,n.data?(e[t++]=n.data.length,e.set(n.data,t),t+=n.data.length):e[t++]=0}return RHt(e)}function OHt(i){let e=0;if(e+=2,i.type==="full")e+=1+i.data.length;else{e+=1,e+=3*i.deltas.length;for(const t of i.deltas)t.data&&(e+=t.data.length)}return e}function KV(i){return i&&!!i.data}function S4e(i){return i&&Array.isArray(i.edits)}class FHt{constructor(e,t,n){this.provider=e,this.tokens=t,this.error=n}}function x4e(i,e){return i.has(e)}function BHt(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function D4e(i,e,t,n,s){const r=BHt(i,e),o=await Promise.all(r.map(async a=>{let l,u=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?n:null,s)}catch(c){u=c,l=null}return(!l||!KV(l)&&!S4e(l))&&(l=null),new FHt(a,l,u)}));for(const a of o){if(a.error)throw a.error;if(a.tokens)return a}return o.length>0?o[0]:null}function VHt(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:null}class WHt{constructor(e,t){this.provider=e,this.tokens=t}}function HHt(i,e){return i.has(e)}function E4e(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function mle(i,e,t,n){const s=E4e(i,e),r=await Promise.all(s.map(async o=>{let a;try{a=await o.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){kr(l),a=null}return(!a||!KV(a))&&(a=null),new WHt(o,a)}));for(const o of r)if(o.tokens)return o;return r.length>0?r[0]:null}dn.registerCommand("_provideDocumentSemanticTokensLegend",async(i,...e)=>{const[t]=e;mn(t instanceof Gt);const n=i.get(Ls).getModel(t);if(!n)return;const{documentSemanticTokensProvider:s}=i.get(Tt),r=VHt(s,n);return r?r[0].getLegend():i.get(xs).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}),dn.registerCommand("_provideDocumentSemanticTokens",async(i,...e)=>{const[t]=e;mn(t instanceof Gt);const n=i.get(Ls).getModel(t);if(!n)return;const{documentSemanticTokensProvider:s}=i.get(Tt);if(!x4e(s,n))return i.get(xs).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());const r=await D4e(s,n,null,null,Ii.None);if(!r)return;const{provider:o,tokens:a}=r;if(!a||!KV(a))return;const l=w4e({id:0,type:"full",data:a.data});return a.resultId&&o.releaseDocumentSemanticTokens(a.resultId),l}),dn.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(i,...e)=>{const[t,n]=e;mn(t instanceof Gt);const s=i.get(Ls).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:r}=i.get(Tt),o=E4e(r,s);if(o.length===0)return;if(o.length===1)return o[0].getLegend();if(!n||!U.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),o[0].getLegend();const a=await mle(r,s,U.lift(n),Ii.None);if(a)return a.provider.getLegend()}),dn.registerCommand("_provideDocumentRangeSemanticTokens",async(i,...e)=>{const[t,n]=e;mn(t instanceof Gt),mn(U.isIRange(n));const s=i.get(Ls).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:r}=i.get(Tt),o=await mle(r,s,U.lift(n),Ii.None);if(!(!o||!o.tokens))return w4e({id:0,type:"full",data:o.tokens.data})});const _le="editor.semanticHighlighting";function YV(i,e,t){const n=t.getValue(_le,{overrideIdentifier:i.getLanguageId(),resource:i.uri})?.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var T4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Pm=function(i,e){return function(t,n){e(t,n,i)}},py;let ble=class extends ye{constructor(e,t,n,s,r,o){super(),this._watchers=Object.create(null);const a=c=>{this._watchers[c.uri.toString()]=new yle(c,e,n,r,o)},l=(c,d)=>{d.dispose(),delete this._watchers[c.uri.toString()]},u=()=>{for(const c of t.getModels()){const d=this._watchers[c.uri.toString()];YV(c,n,s)?d||a(c):d&&l(c,d)}};t.getModels().forEach(c=>{YV(c,n,s)&&a(c)}),this._register(t.onModelAdded(c=>{YV(c,n,s)&&a(c)})),this._register(t.onModelRemoved(c=>{const d=this._watchers[c.uri.toString()];d&&l(c,d)})),this._register(s.onDidChangeConfiguration(c=>{c.affectsConfiguration(_le)&&u()})),this._register(n.onDidColorThemeChange(u))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};ble=T4e([Pm(0,D8),Pm(1,Ls),Pm(2,Lo),Pm(3,Fi),Pm(4,cd),Pm(5,Tt)],ble);let yle=(Qy=class extends ye{constructor(e,t,n,s,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:py.REQUEST_MIN_DELAY,max:py.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Jn(()=>this._fetchDocumentSemanticTokensNow(),py.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const o=()=>{ls(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),ls(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!x4e(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new or,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,s=D4e(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const r=[],o=this._model.onDidChangeContent(l=>{r.push(l)}),a=new qo(!1);s.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,r);else{const{provider:u,tokens:c}=l,d=this._semanticTokensStylingService.getStyling(u);this._setDocumentSemanticTokens(u,c||null,d,r)}},l=>{l&&(zd(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||bi(l),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),(r.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,s,r){r=Math.min(r,n.length-s,e.length-t);for(let o=0;o<r;o++)n[s+o]=e[t+o]}_setDocumentSemanticTokens(e,t,n,s){const r=this._currentDocumentResponse,o=()=>{(s.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),o();return}if(S4e(t)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:r.data};else{let a=0;for(const h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=r.data,u=new Uint32Array(l.length+a);let c=l.length,d=u.length;for(let h=t.edits.length-1;h>=0;h--){const f=t.edits[h];if(f.start>l.length){n.warnInvalidEditStart(r.resultId,t.resultId,h,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const g=c-(f.start+f.deleteCount);g>0&&(py._copy(l,c-g,u,d-g,g),d-=g),f.data&&(py._copy(f.data,0,u,d-f.data.length,f.data.length),d-=f.data.length),c=f.start}c>0&&py._copy(l,0,u,0,c),t={resultId:t.resultId,data:u}}}if(KV(t)){this._currentDocumentResponse=new $Ht(e,t.resultId,t.data);const a=BLe(t,n,this._model.getLanguageId());if(s.length>0)for(const l of s)for(const u of a)for(const c of l.changes)u.applyEdit(c.range,c.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}},py=Qy,Qy.REQUEST_MIN_DELAY=300,Qy.REQUEST_MAX_DELAY=2e3,Qy);yle=py=T4e([Pm(1,D8),Pm(2,Lo),Pm(3,cd),Pm(4,Tt)],yle);class $Ht{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}e2(ble);var UHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},DR=function(i,e){return function(t,n){e(t,n,i)}};let XV=(rL=class extends ye{constructor(e,t,n,s,r,o){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=s,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Jn(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(l=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration(_le)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;t<n;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.tokenization.hasCompleteSemanticTokens())return;if(!YV(e,this._themeService,this._configurationService)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}if(!HHt(this._provider,e)){e.tokenization.hasSomeSemanticTokens()&&e.tokenization.setSemanticTokens(null,!1);return}const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map(n=>this._requestRange(e,n)))}_requestRange(e,t){const n=e.getVersionId(),s=Bo(o=>Promise.resolve(mle(this._provider,e,t,o))),r=new qo(!1);return s.then(o=>{if(this._debounceInformation.update(e,r.elapsed()),!o||!o.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:a,tokens:l}=o,u=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,BLe(l,u,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}},rL.ID="editor.contrib.viewportSemanticTokens",rL);XV=UHt([DR(1,D8),DR(2,Lo),DR(3,Fi),DR(4,cd),DR(5,Tt)],XV),fn(XV.ID,XV,1);class zHt{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const n=[];for(const s of t){const r=[];n.push(r),this.selectSubwords&&this._addInWordRanges(r,e,s),this._addWordRanges(r,e,s),this._addWhitespaceLine(r,e,s),r.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){const s=t.getWordAtPosition(n);if(!s)return;const{word:r,startColumn:o}=s,a=n.column-o;let l=a,u=a,c=0;for(;l>=0;l--){const d=r.charCodeAt(l);if(l!==a&&(d===95||d===45))break;if(u1(d)&&Gg(c))break;c=d}for(l+=1;u<r.length;u++){const d=r.charCodeAt(u);if(Gg(d)&&u1(c))break;if(d===95||d===45)break;c=d}l<u&&e.push({range:new U(n.lineNumber,o+l,n.lineNumber,o+u)})}_addWordRanges(e,t,n){const s=t.getWordAtPosition(n);s&&e.push({range:new U(n.lineNumber,s.startColumn,n.lineNumber,s.endColumn)})}_addWhitespaceLine(e,t,n){t.getLineLength(n.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new U(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}var jHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},qHt=function(i,e){return function(t,n){e(t,n,i)}},vle;class Cle{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const n=new Cle(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}}let ER=(Px=class{static get(e){return e.getContribution(vle.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await L4e(this._languageFeaturesService.selectionRangeProvider,n,t.map(r=>r.getPosition()),this._editor.getOption(114),Ii.None).then(r=>{if(!(!Nl(r)||r.length!==t.length)&&!(!this._editor.hasModel()||!Qs(this._editor.getSelections(),t,(o,a)=>o.equalsSelection(a)))){for(let o=0;o<r.length;o++)r[o]=r[o].filter(a=>a.containsPosition(t[o].getStartPosition())&&a.containsPosition(t[o].getEndPosition())),r[o].unshift(t[o]);this._state=r.map(o=>new Cle(0,o)),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(r=>r.mov(e));const s=this._state.map(r=>Pt.fromPositions(r.ranges[r.index].getStartPosition(),r.ranges[r.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}},vle=Px,Px.ID="editor.contrib.smartSelectController",Px);ER=vle=jHt([qHt(1,Tt)],ER);class k4e extends wt{constructor(e,t){super(t),this._forward=e}async run(e,t){const n=ER.get(t);n&&await n.run(this._forward)}}class GHt extends k4e{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:w("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:Q.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Nt.MenubarSelectionMenu,group:"1_basic",title:w({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}dn.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class KHt extends k4e{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:w("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:Q.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Nt.MenubarSelectionMenu,group:"1_basic",title:w({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}fn(ER.ID,ER,4),Ye(GHt),Ye(KHt);async function L4e(i,e,t,n,s){const r=i.all(e).concat(new zHt(n.selectSubwords));r.length===1&&r.unshift(new mV);const o=[],a=[];for(const l of r)o.push(Promise.resolve(l.provideSelectionRanges(e,t,s)).then(u=>{if(Nl(u)&&u.length===t.length)for(let c=0;c<t.length;c++){a[c]||(a[c]=[]);for(const d of u[c])U.isIRange(d.range)&&U.containsPosition(d.range,t[c])&&a[c].push(U.lift(d.range))}},kr));return await Promise.all(o),a.map(l=>{if(l.length===0)return[];l.sort((h,f)=>me.isBefore(h.getStartPosition(),f.getStartPosition())?1:me.isBefore(f.getStartPosition(),h.getStartPosition())||me.isBefore(h.getEndPosition(),f.getEndPosition())?-1:me.isBefore(f.getEndPosition(),h.getEndPosition())?1:0);const u=[];let c;for(const h of l)(!c||U.containsRange(h,c)&&!U.equalsRange(h,c))&&(u.push(h),c=h);if(!n.selectLeadingAndTrailingWhitespace)return u;const d=[u[0]];for(let h=1;h<u.length;h++){const f=u[h-1],g=u[h];if(g.startLineNumber!==f.startLineNumber||g.endLineNumber!==f.endLineNumber){const b=new U(f.startLineNumber,e.getLineFirstNonWhitespaceColumn(f.startLineNumber),f.endLineNumber,e.getLineLastNonWhitespaceColumn(f.endLineNumber));b.containsRange(f)&&!b.equalsRange(f)&&g.containsRange(b)&&!g.equalsRange(b)&&d.push(b);const y=new U(f.startLineNumber,1,f.endLineNumber,e.getLineMaxColumn(f.endLineNumber));y.containsRange(f)&&!y.equalsRange(b)&&g.containsRange(y)&&!g.equalsRange(y)&&d.push(y)}d.push(g)}return d})}dn.registerCommand("_executeSelectionRangeProvider",async function(i,...e){const[t,n]=e;mn(Gt.isUri(t));const s=i.get(Tt).selectionRangeProvider,r=await i.get(Iu).createModelReference(t);try{return L4e(s,r.object.textEditorModel,n,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},Ii.None)}finally{r.dispose()}});const YHt=Object.freeze({View:ui("view","View"),Help:ui("help","Help"),Test:ui("test","Test"),File:ui("file","File"),Preferences:ui("preferences","Preferences"),Developer:ui({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});class TR{constructor(e,t,n,s=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=n,this.showEndForLine=s}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&Qs(this.startLineNumbers,e.startLineNumbers)&&Qs(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new TR([],[],0)}}const A4e=n_("stickyScrollViewLayer",{createHTML:i=>i}),wle="data-sticky-line-index",N4e="data-sticky-is-line",XHt="data-sticky-is-line-number",I4e="data-sticky-is-folding-icon";class QHt extends ye{constructor(e){super(),this._editor=e,this._foldingIconStore=new Fe,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof kf),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(116)&&t(),n.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n){if(n===void 0&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const s=this._isWidgetHeightZero(e),r=s?void 0:e,o=s?0:this._findLineToRebuildWidgetFrom(e,n);this._renderRootNode(r,t,o),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const n=[...e.startLineNumbers];e.showEndForLine!==null&&(n[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=n}else this._lastLineRelativePosition=0,this._lineNumbers=[];return t===0}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(t!==void 0)return t;const n=this._previousState,s=e.startLineNumbers.findIndex(r=>!n.startLineNumbers.includes(r));return s===-1?0:s}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;t<this._renderedStickyLines.length;t++){const n=this._renderedStickyLines[t];n.lineNumberDomNode.remove(),n.lineDomNode.remove()}this._renderedStickyLines=this._renderedStickyLines.slice(0,e),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._renderedStickyLines){const n=t.foldingIcon;n&&n.setVisible(e?!0:n.isCollapsed)}}async _renderRootNode(e,t,n){if(this._clearStickyLinesFromLine(n),!e)return;for(const a of this._renderedStickyLines)this._updateTopAndZIndexOfStickyLine(a);const s=this._editor.getLayoutInfo(),r=this._lineNumbers.slice(n);for(const[a,l]of r.entries()){const u=this._renderChildNode(a+n,l,t,s);u&&(this._linesDomNode.appendChild(u.lineDomNode),this._lineNumbersDomNode.appendChild(u.lineNumberDomNode),this._renderedStickyLines.push(u))}t&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const o=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${o}px`,this._linesDomNodeScrollable.style.height=`${o}px`,this._rootDomNode.style.height=`${o}px`,this._rootDomNode.style.marginLeft="0px",this._minContentWidthInPx=Math.max(...this._renderedStickyLines.map(a=>a.scrollWidth))+s.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(111)==="mouseover"&&(this._foldingIconStore.add(Ie(this._lineNumbersDomNode,tt.MOUSE_ENTER,()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(Ie(this._lineNumbersDomNode,tt.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,s){const r=this._editor._getViewModel();if(!r)return;const o=r.coordinatesConverter.convertModelPositionToViewPosition(new me(t,1)).lineNumber,a=r.getViewLineRenderingData(o),l=this._editor.getOption(68);let u;try{u=Zl.filter(a.inlineDecorations,o,a.minColumn,a.maxColumn)}catch{u=[]}const c=new _1(!0,!0,a.content,a.continuesWithWrappedLine,a.isBasicASCII,a.containsRTL,0,a.tokens,u,a.tabSize,a.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new zE(2e3),h=pI(c,d);let f;A4e?f=A4e.createHTML(d.build()):f=d.build();const g=document.createElement("span");g.setAttribute(wle,String(e)),g.setAttribute(N4e,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=f;const b=document.createElement("span");b.setAttribute(wle,String(e)),b.setAttribute(XHt,""),b.className="sticky-line-number",b.style.lineHeight=`${this._lineHeight}px`;const y=s.contentLeft;b.style.width=`${y}px`;const S=document.createElement("span");l.renderType===1||l.renderType===3&&t%10===0?S.innerText=t.toString():l.renderType===2&&(S.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),S.className="sticky-line-number-inner",S.style.lineHeight=`${this._lineHeight}px`,S.style.width=`${s.lineNumbersWidth}px`,S.style.paddingLeft=`${s.lineNumbersLeft}px`,b.appendChild(S);const x=this._renderFoldingIconForLine(n,t);x&&b.appendChild(x.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(S),b.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,b.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const E=new ZHt(e,t,g,b,x,h.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(E)}_updateTopAndZIndexOfStickyLine(e){const t=e.index,n=e.lineDomNode,s=e.lineNumberDomNode,r=t===this._lineNumbers.length-1,o="0",a="1";n.style.zIndex=r?o:a,s.style.zIndex=r?o:a;const l=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,u=`${t*this._lineHeight}px`;return n.style.top=r?l:u,s.style.top=r?l:u,e}_renderFoldingIconForLine(e,t){const n=this._editor.getOption(111);if(!e||n==="never")return;const s=e.regions,r=s.findRange(t),o=s.getStartLineNumber(r);if(!(t===o))return;const l=s.isCollapsed(r),u=new JHt(l,o,s.getEndLineNumber(r),this._lineHeight);return u.setVisible(this._isOnGlyphMargin?!0:l||n==="always"),u.domNode.setAttribute(I4e,""),u}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e<this._renderedStickyLines.length&&this._renderedStickyLines[e].lineDomNode.focus()}getEditorPositionFromNode(e){if(!e||e.children.length>0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const n=FZ(t.characterMapping,e,0);return new me(t.lineNumber,n)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,wle);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,N4e)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,I4e)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}}class ZHt{constructor(e,t,n,s,r,o,a){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=s,this.foldingIcon=r,this.characterMapping=o,this.scrollWidth=a}}class JHt{constructor(e,t,n,s){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=s,this.domNode=document.createElement("div"),this.domNode.style.width=`${s}px`,this.domNode.style.height=`${s}px`,this.domNode.className=ni.asClassName(e?eV:JB)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class kR{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class QV{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}}class P4e{constructor(e,t,n,s){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=s}}var ZV=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},LR=function(i,e){return function(t,n){e(t,n,i)}},AR;(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(AR||(AR={}));var gy;(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(gy||(gy={}));let Sle=class extends ye{constructor(e,t,n,s){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new th(300)),this._updateOperation=this._register(new Fe),this._editor.getOption(116).defaultModel){case AR.OUTLINE_MODEL:this._modelProviders.push(new xle(this._editor,s));case AR.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new Ele(this._editor,t,s));case AR.INDENTATION_MODEL:this._modelProviders.push(new Dle(this._editor,n));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const t of this._modelProviders){const{statusPromise:n,modelPromise:s}=t.computeStickyModel(e);this._modelPromise=s;const r=await n;if(this._modelPromise!==s)return null;switch(r){case gy.CANCELED:return this._updateOperation.clear(),null;case gy.VALID:return t.stickyModel}}return null}).catch(t=>(bi(t),null))}};Sle=ZV([LR(2,jt),LR(3,Tt)],Sle);class M4e extends ye{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,gy.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=Bo(n=>this.createModelFromProvider(n));return{statusPromise:t.then(n=>this.isModelValid(n)?e.isCancellationRequested?gy.CANCELED:(this._stickyModel=this.createStickyModel(e,n),gy.VALID):this._invalid()).then(void 0,n=>(bi(n),gy.CANCELED)),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let xle=class extends M4e{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return M_.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){const{stickyOutlineElement:n,providerID:s}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),r=this._editor.getModel();return new P4e(r.uri,r.getVersionId(),n,s)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(cn.first(e.children.values())instanceof b3e){const a=cn.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",u=-1,c;for(const[d,h]of e.children.entries()){const f=this._findSumOfRangesOfGroup(h);f>u&&(c=h,u=f,l=h.id)}t=l,n=c.children}}else n=e.children;const s=[],r=Array.from(n.values()).sort((a,l)=>{const u=new kR(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),c=new kR(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(u,c)});for(const a of r)s.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new QV(void 0,s,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const n=[];for(const r of e.children.values())if(r.symbol.selectionRange.startLineNumber!==r.symbol.range.endLineNumber)if(r.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));else for(const o of r.children.values())n.push(this._stickyModelFromOutlineElement(o,r.symbol.selectionRange.startLineNumber));n.sort((r,o)=>this._comparator(r.range,o.range));const s=new kR(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new QV(s,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof Hoe?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};xle=ZV([LR(1,Tt)],xle);class R4e extends M4e{constructor(e){super(e),this._foldingLimitReporter=new g3e(e)}createStickyModel(e,t){const n=this._fromFoldingRegions(t),s=this._editor.getModel();return new P4e(s.uri,s.getVersionId(),n,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,n=[],s=new QV(void 0,[],void 0);for(let r=0;r<t;r++){const o=e.getParentIndex(r);let a;o!==-1?a=n[o]:a=s;const l=new QV(new kR(e.getStartLineNumber(r),e.getEndLineNumber(r)+1),[],a);a.children.push(l),n.push(l)}return s}}let Dle=class extends R4e{constructor(e,t){super(e),this._languageConfigurationService=t,this.provider=this._register(new Ooe(e.getModel(),this._languageConfigurationService,this._foldingLimitReporter))}async createModelFromProvider(e){return this.provider.compute(e)}};Dle=ZV([LR(1,lr)],Dle);let Ele=class extends R4e{constructor(e,t,n){super(e),this._languageFeaturesService=n;const s=oy.getFoldingRangeProviders(this._languageFeaturesService,e.getModel());s.length>0&&(this.provider=this._register(new Voe(e.getModel(),s,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){return this.provider?.compute(e)??null}};Ele=ZV([LR(2,Tt)],Ele);var e$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},O4e=function(i,e){return function(t,n){e(t,n,i)}};class t$t{constructor(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=n}}let Tle=class extends ye{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new _e),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new Fe),this._updateSoon=this._register(new Jn(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(116)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(zt(()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new Sle(e,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new or,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return e===-1?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,s,r){if(t.children.length===0)return;let o=r;const a=[];for(let c=0;c<t.children.length;c++){const d=t.children[c];d.range&&a.push(d.range.startLineNumber)}const l=this.updateIndex(gI(a,e.startLineNumber,(c,d)=>c-d)),u=this.updateIndex(gI(a,e.startLineNumber+s,(c,d)=>c-d));for(let c=l;c<=u;c++){const d=t.children[c];if(!d)return;if(d.range){const h=d.range.startLineNumber,f=d.range.endLineNumber;e.startLineNumber<=f+1&&h-1<=e.endLineNumber&&h!==o&&(o=h,n.push(new t$t(h,f-1,s+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,s+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,d,n,s,r)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);const n=this._editor._getViewModel()?.getHiddenAreas();if(n)for(const s of n)t=t.filter(r=>!(r.startLineNumber>=s.startLineNumber&&r.endLineNumber<=s.endLineNumber+1));return t}};Tle=e$t([O4e(1,Tt),O4e(2,lr)],Tle);var i$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},lk=function(i,e){return function(t,n){e(t,n,i)}},kle;let V_=(Mx=class extends ye{constructor(e,t,n,s,r,o,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=s,this._contextKeyService=a,this._sessionStore=new Fe,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new QHt(this._editor),this._stickyLineCandidateProvider=new Tle(this._editor,n,r),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=TR.Empty,this._onDidResize(),this._readConfiguration();const l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(c=>{this._readConfigurationChange(c)})),this._register(Ie(l,tt.CONTEXT_MENU,async c=>{this._onContextMenu(Jt(l),c)})),this._stickyScrollFocusedContextKey=Q.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=Q.stickyScrollVisible.bindTo(this._contextKeyService);const u=this._register(_p(l));this._register(u.onDidBlur(c=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(u.onDidFocus(c=>{this.focus()})),this._registerMouseListeners(),this._register(Ie(l,tt.MOUSE_DOWN,c=>{this._onMouseDown=!0}))}static get(e){return e.getContribution(kle.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new Fe,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(U.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new Fe),t=this._register(new AB(this._editor,{extractLineNumberFromMouseEvent:r=>{const o=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);return o?o.lineNumber:0}})),n=r=>{if(!this._editor.hasModel()||r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return null;const o=r.target.element;if(!o||o.innerText!==o.innerHTML)return null;const a=this._stickyScrollWidget.getEditorPositionFromNode(o);return a?{range:new U(a.lineNumber,a.column,a.lineNumber,a.column+o.innerText.length),textElement:o}:null},s=this._stickyScrollWidget.getDomNode();this._register(_r(s,tt.CLICK,r=>{if(r.ctrlKey||r.altKey||r.metaKey||!r.leftButton)return;if(r.shiftKey){const u=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(u===null)return;const c=new me(this._endLineNumbers[u],1);this._revealLineInCenterIfOutsideViewport(c);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(r.target)){const u=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);this._toggleFoldingRegionForLine(u);return}if(!this._stickyScrollWidget.isInStickyLine(r.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(r.target);if(!l){const u=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);if(u===null)return;l=new me(u,1)}this._revealPosition(l)})),this._register(_r(s,tt.MOUSE_MOVE,r=>{if(r.shiftKey){const o=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(o===null||this._showEndForLine!==null&&this._showEndForLine===o)return;this._showEndForLine=o,this._renderStickyScroll();return}this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(Ie(s,tt.MOUSE_LEAVE,r=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([r,o])=>{const a=n(r);if(!a||!r.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:l,textElement:u}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(u.style.textDecoration==="underline")return;const c=new or;e.add(zt(()=>c.dispose(!0)));let d;qM(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new me(l.startLineNumber,l.startColumn+1),!1,c.token).then((h=>{if(!c.token.isCancellationRequested)if(h.length!==0){this._candidateDefinitionsLength=h.length;const f=u;d!==f?(e.clear(),d=f,d.style.textDecoration="underline",e.add(zt(()=>{d.style.textDecoration="none"}))):d||(d=f,d.style.textDecoration="underline",e.add(zt(()=>{d.style.textDecoration="none"})))}else e.clear()}))})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async r=>{if(r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return;const o=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);o&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:o.lineNumber,column:1})),this._instaService.invokeFunction(NFe,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,t){const n=new cf(e,t);this._contextMenuService.showContextMenu({menuId:Nt.StickyScrollContext,getAnchor:()=>n})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),n=t?.foldingIcon;if(!n)return;Poe(this._foldingModel,Number.MAX_VALUE,[e]),n.isCollapsed=!n.isCollapsed;const s=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(s),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(68).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const n of t)for(const s of e.ranges)if(n>=s.fromLineNumber&&n<=s.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(t*.25)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization()){this._resetState();return}const n=this._updateAndGetMinRebuildFromLine(e),s=this._stickyLineCandidateProvider.getVersionId();if(s===void 0||s===t.getVersionId())if(!this._focused)await this._updateState(n);else if(this._focusedStickyElementIndex===-1)await this._updateState(n),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const o=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(n),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(o)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){const t=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await oy.get(this._editor)?.getFoldingModel()??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=TR.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),n=this._editor.getScrollTop();let s=0;const r=[],o=[],a=this._editor.getVisibleRanges();if(a.length!==0){const l=new kR(a[0].startLineNumber,a[a.length-1].endLineNumber),u=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(l);for(const c of u){const d=c.startLineNumber,h=c.endLineNumber,f=c.nestingDepth;if(h-d>0){const g=(f-1)*e,b=f*e,y=this._editor.getBottomForLineNumber(d)-n,S=this._editor.getTopForLineNumber(h)-n,x=this._editor.getBottomForLineNumber(h)-n;if(g>S&&g<=x){r.push(d),o.push(h+1),s=x-b;break}else b>y&&b<=x&&(r.push(d),o.push(h+1));if(r.length===t)break}}}return this._endLineNumbers=o,new TR(r,o,s,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}},kle=Mx,Mx.ID="store.contrib.stickyScrollController",Mx);V_=kle=i$t([lk(1,pc),lk(2,Tt),lk(3,jt),lk(4,lr),lk(5,cd),lk(6,ri)],V_);class n$t extends su{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...ui("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:w({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:ui("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:YHt.View,toggled:{condition:Be.equals("config.editor.stickyScroll.enabled",!0),title:w("stickyScroll","Sticky Scroll"),mnemonicTitle:w({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:Nt.CommandPalette},{id:Nt.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Nt.StickyScrollContext}]})}async run(e){const t=e.get(Fi),n=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",n)}}const JV=100;class s$t extends Tp{constructor(){super({id:"editor.action.focusStickyScroll",title:{...ui("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:w({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:Be.and(Be.has("config.editor.stickyScroll.enabled"),Q.stickyScrollVisible),menu:[{id:Nt.CommandPalette}]})}runEditorCommand(e,t){V_.get(t)?.focus()}}class r$t extends Tp{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:ui("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:18}})}runEditorCommand(e,t){V_.get(t)?.focusNext()}}class o$t extends Tp{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:ui("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:16}})}runEditorCommand(e,t){V_.get(t)?.focusPrevious()}}class a$t extends Tp{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:ui("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:3}})}runEditorCommand(e,t){V_.get(t)?.goToFocused()}}class l$t extends Tp{constructor(){super({id:"editor.action.selectEditor",title:ui("selectEditor.title","Select Editor"),precondition:Q.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:JV,primary:9}})}runEditorCommand(e,t){V_.get(t)?.selectEditor()}}fn(V_.ID,V_,1),ys(n$t),ys(s$t),ys(o$t),ys(r$t),ys(a$t),ys(l$t);var F4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},NR=function(i,e){return function(t,n){e(t,n,i)}};class u$t{constructor(e,t,n,s,r,o){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=s,this.command=r,this.completion=o}}let Lle=class extends UHe{constructor(e,t,n,s,r,o){super(r.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=s,this._suggestMemoryService=o}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn<n.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){const e=[],{items:t}=this.completionModel,n=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},t),s=cn.slice(t,n),r=cn.slice(t,0,n);let o=5;for(const a of cn.concat(s,r)){if(a.score===kp.Default)continue;const l=new U(a.editStart.lineNumber,a.editStart.column,a.editInsertEnd.lineNumber,a.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),u=a.completion.insertTextRules&&a.completion.insertTextRules&4?{snippet:a.completion.insertText}:a.completion.insertText;e.push(new u$t(l,u,a.filterTextLow??a.labelLow,a.completion.additionalTextEdits,a.completion.command,a)),o-->=0&&a.resolve(Ii.None)}return e}};Lle=F4e([NR(5,pV)],Lle);let Ale=class extends ye{constructor(e,t,n,s){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=n,this._editorService=s,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,n,s){if(n.selectedSuggestionInfo)return;let r;for(const f of this._editorService.listCodeEditors())if(f.getModel()===e){r=f;break}if(!r)return;const o=r.getOption(90);if(G2.isAllOff(o))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(G2.valueFor(o,l)!=="inline")return;let u=e.getWordAtPosition(t),c;if(u?.word||(c=this._getTriggerCharacterInfo(e,t)),!u?.word&&!c||(u||(u=e.getWordUntilPosition(t)),u.endColumn!==t.column))return;let d;const h=e.getValueInRange(new U(t.lineNumber,1,t.lineNumber,t.column));if(!c&&this._lastResult?.canBeReused(e,t.lineNumber,u)){const f=new q3e(h,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=f,this._lastResult.acquire(),d=this._lastResult}else{const f=await Goe(this._languageFeatureService.completionProvider,e,t,new sR(void 0,bV.createSuggestFilter(r).itemKind,c?.providers),c&&{triggerKind:1,triggerCharacter:c.ch},s);let g;f.needsClipboard&&(g=await this._clipboardService.readText());const b=new ly(f.items,t.column,new q3e(h,0),_V.None,r.getOption(119),r.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},g);d=new Lle(e,t.lineNumber,u,b,f,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(Ii.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const n=e.getValueInRange(U.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const r of this._languageFeatureService.completionProvider.all(e))r.triggerCharacters?.includes(n)&&s.add(r);if(s.size!==0)return{providers:s,ch:n}}};Ale=F4e([NR(0,Tt),NR(1,w_),NR(2,pV),NR(3,yn)],Ale),e2(Ale);class c$t extends wt{constructor(){super({id:"editor.action.forceRetokenize",label:w("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getModel();n.tokenization.resetTokenization();const s=new qo;n.tokenization.forceTokenization(n.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}Ye(c$t);const u$=class u$ extends su{constructor(){super({id:u$.ID,title:ui({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:ui("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const t=!s2.getTabFocusMode();s2.setTabFocusMode(t),au(t?w("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):w("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}};u$.ID="editor.action.toggleTabFocusMode";let Nle=u$;ys(Nle);var d$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},B4e=function(i,e){return function(t,n){e(t,n,i)}};let Ile=class extends ye{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}constructor(e,t,n={},s,r){super(),this._link=t,this._hoverService=s,this._enabled=!0,this.el=qe(e,it("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=n.hoverDelegate??lu("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const o=this._register(new nn(this.el,"click")),a=this._register(new nn(this.el,"keypress")),l=rt.chain(a.event,d=>d.map(h=>new ms(h)).filter(h=>h.keyCode===3)),u=this._register(new nn(this.el,Ds.Tap)).event;this._register(ll.addTarget(this.el));const c=rt.any(o.event,l,u);this._register(c(d=>{this.enabled&&(rn.stop(d,!0),n?.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};Ile=d$t([B4e(3,om),B4e(4,Fu)],Ile);var V4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},W4e=function(i,e){return function(t,n){e(t,n,i)}};const h$t=26;let Ple=class extends ye{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(Mle))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,h$t)}};Ple=V4e([W4e(1,jt)],Ple);let Mle=class extends ye{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(l_,{}),this.element=it("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=it("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){ma(this.element)}show(e){ma(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const n=qe(this.element,it("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(it(`div${ni.asCSSSelector(e.icon)}`));const s=qe(this.element,it("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=qe(this.element,it("div.message-actions-container")),e.actions)for(const o of e.actions)this._register(this.instantiationService.createInstance(Ile,this.messageActionsContainer,{...o,tabIndex:-1},{}));const r=qe(this.element,it("div.action-container"));this.actionBar=this._register(new md(r)),this.actionBar.push(this._register(new hc("banner.close","Close Banner",ni.asClassName(OPe),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};Mle=V4e([W4e(0,jt)],Mle);var Rle=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},uk=function(i,e){return function(t,n){e(t,n,i)}};const f$t=Ps("extensions-warning-message",et.warning,w("warningIcon","Icon shown with a warning message in the extensions editor."));let IR=(oL=class extends ye{constructor(e,t,n,s){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;const o=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount);let a;if(r.nonBasicAsciiCharacterCount>=o)a={message:w("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new MR};else if(r.ambiguousCharacterCount>=o)a={message:w("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new vS};else if(r.invisibleCharacterCount>=o)a={message:w("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new PR};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:f$t,actions:[{label:a.command.shortLabel,href:`command:${a.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(s.createInstance(Ple,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(126),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=p$t(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?new Intl.NumberFormat().resolvedOptions().locale:n==="_vscode"?r$e:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new Ole(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new g$t(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}},oL.ID="editor.contrib.unicodeHighlighter",oL);IR=Rle([uk(1,Wu),uk(2,qAe),uk(3,jt)],IR);function p$t(i,e){return{nonBasicASCII:e.nonBasicASCII===rd?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===rd?!i:e.includeComments,includeStrings:e.includeStrings===rd?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let Ole=class extends ye{constructor(e,t,n,s){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Jn(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const n=[];if(!t.hasMore)for(const s of t.ranges)n.push({range:s,options:eW.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!ise(t,e))return null;const n=t.getValueInRange(e.range);return{reason:$4e(n,this._options),inComment:nse(t,e),inString:sse(t,e)}}};Ole=Rle([uk(3,Wu)],Ole);class g$t extends ye{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Jn(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const s of e){const r=dJ.computeUnicodeHighlights(this._model,this._options,s);for(const o of r.ranges)n.ranges.push(o);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(const s of n.ranges)t.push({range:s,options:eW.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),n=t.getValueInRange(e.range);return ise(t,e)?{reason:$4e(n,this._options),inComment:nse(t,e),inString:sse(t,e)}:null}}const H4e=w("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let Fle=class{constructor(e,t,n){this._editor=e,this._languageService=t,this._openerService=n,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=this._editor.getContribution(IR.ID);if(!s)return[];const r=[],o=new Set;let a=300;for(const l of t){const u=s.getDecorationInfo(l);if(!u)continue;const d=n.getValueInRange(l.range).codePointAt(0),h=Vle(d);let f;switch(u.reason.kind){case 0:{ZN(u.reason.confusableWith)?f=w("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",h,Vle(u.reason.confusableWith.codePointAt(0))):f=w("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",h,Vle(u.reason.confusableWith.codePointAt(0)));break}case 1:f=w("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",h);break;case 2:f=w("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",h);break}if(o.has(f))continue;o.add(f);const g={codePoint:d,reason:u.reason,inComment:u.inComment,inString:u.inString},b=w("unicodeHighlight.adjustSettings","Adjust settings"),y=`command:${tW.ID}?${encodeURIComponent(JSON.stringify(g))}`,S=new ul("",!0).appendMarkdown(f).appendText(" ").appendLink(y,b,H4e);r.push(new Tf(this,l.range,[S],!1,a++))}return r}renderHoverParts(e,t){return q6t(e,t,this._editor,this._languageService,this._openerService)}};Fle=Rle([uk(1,Zs),uk(2,Fu)],Fle);function Ble(i){return`U+${i.toString(16).padStart(4,"0")}`}function Vle(i){let e=`\`${Ble(i)}\``;return MC.isInvisibleCharacter(i)||(e+=` "${`${m$t(i)}`}"`),e}function m$t(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function $4e(i,e){return dJ.computeUnicodeHighlightReason(i,e)}const c$=class c${constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const n=`${e}${t}`;let s=this.map.get(n);return s||(s=xi.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,s)),s}};c$.instance=new c$;let eW=c$;class _$t extends wt{constructor(){super({id:vS.ID,label:w("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.includeComments,!1,2)}}class b$t extends wt{constructor(){super({id:vS.ID,label:w("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.includeStrings,!1,2)}}const d$=class d$ extends wt{constructor(){super({id:d$.ID,label:w("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.ambiguousCharacters,!1,2)}};d$.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let vS=d$;const h$=class h$ extends wt{constructor(){super({id:h$.ID,label:w("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.invisibleCharacters,!1,2)}};h$.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let PR=h$;const f$=class f$ extends wt{constructor(){super({id:f$.ID,label:w("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=w("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,n){const s=e?.get(Fi);s&&this.runAction(s)}async runAction(e){await e.updateValue(Nu.nonBasicASCII,!1,2)}};f$.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let MR=f$;const p$=class p$ extends wt{constructor(){super({id:p$.ID,label:w("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,n){const{codePoint:s,reason:r,inString:o,inComment:a}=n,l=String.fromCodePoint(s),u=e.get(fh),c=e.get(Fi);function d(g){return MC.isInvisibleCharacter(g)?w("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",Ble(g)):w("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${Ble(g)} "${l}"`)}const h=[];if(r.kind===0)for(const g of r.notAmbiguousInLocales)h.push({label:w("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',g),run:async()=>{v$t(c,[g])}});if(h.push({label:d(s),run:()=>y$t(c,[s])}),a){const g=new _$t;h.push({label:g.label,run:async()=>g.runAction(c)})}else if(o){const g=new b$t;h.push({label:g.label,run:async()=>g.runAction(c)})}if(r.kind===0){const g=new vS;h.push({label:g.label,run:async()=>g.runAction(c)})}else if(r.kind===1){const g=new PR;h.push({label:g.label,run:async()=>g.runAction(c)})}else if(r.kind===2){const g=new MR;h.push({label:g.label,run:async()=>g.runAction(c)})}else C$t(r);const f=await u.pick(h,{title:H4e});f&&await f.run()}};p$.ID="editor.action.unicodeHighlight.showExcludeOptions";let tW=p$;async function y$t(i,e){const t=i.getValue(Nu.allowedCharacters);let n;typeof t=="object"&&t?n=t:n={};for(const s of e)n[String.fromCodePoint(s)]=!0;await i.updateValue(Nu.allowedCharacters,n,2)}async function v$t(i,e){const t=i.inspect(Nu.allowedLocales).user?.value;let n;typeof t=="object"&&t?n=Object.assign({},t):n={};for(const s of e)n[s]=!0;await i.updateValue(Nu.allowedLocales,n,2)}function C$t(i){throw new Error(`Unexpected value: ${i}`)}Ye(vS),Ye(PR),Ye(MR),Ye(tW),fn(IR.ID,IR,1),oS.register(Fle);var w$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},U4e=function(i,e){return function(t,n){e(t,n,i)}};const z4e="ignoreUnusualLineTerminators";function S$t(i,e,t){i.setModelProperty(e.uri,z4e,t)}function x$t(i,e){return i.getModelProperty(e.uri,z4e)}let iW=(aL=class extends ye{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||x$t(this._codeEditorService,e)===!0||this._editor.getOption(92))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:w("unusualLineTerminators.title","Unusual Line Terminators"),message:w("unusualLineTerminators.message","Detected unusual line terminators"),detail:w("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",ch(e.uri)),primaryButton:w({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:w("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){S$t(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},aL.ID="editor.contrib.unusualLineTerminatorsDetector",aL);iW=w$t([U4e(1,VI),U4e(2,yn)],iW),fn(iW.ID,iW,1);var D$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},E$t=function(i,e){return function(t,n){e(t,n,i)}};class j4e{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,n){const s=[],r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return r?e.isDisposed()?void 0:e.findMatches(r.word,!0,!1,!0,B6,!1).map(a=>({range:a.range,kind:bD.Text})):Promise.resolve(s)}provideMultiDocumentHighlights(e,t,n,s){const r=new na,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(r);for(const a of[e,...n]){if(a.isDisposed())continue;const u=a.findMatches(o.word,!0,!1,!0,B6,!1).map(c=>({range:c.range,kind:bD.Text}));u&&r.set(a.uri,u)}return r}}let Wle=class extends ye{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new j4e)),this._register(e.multiDocumentHighlightProvider.register("*",new j4e))}};Wle=D$t([E$t(0,Tt)],Wle);var q4e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},nW=function(i,e){return function(t,n){e(t,n,i)}},zr,Hle;const $le=new gt("hasWordHighlights",!1);function G4e(i,e,t,n){const s=i.ordered(e);return mQ(s.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,kr)),r=>r!=null).then(r=>{if(r){const o=new na;return o.set(e.uri,r),o}return new na})}function T$t(i,e,t,n,s,r){const o=i.ordered(e);return mQ(o.map(a=>()=>{const l=r.filter(u=>jke(u)).filter(u=>UJ(a.selector,u.uri,u.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(a.provideMultiDocumentHighlights(e,t,l,s)).then(void 0,kr)}),a=>a!=null)}class K4e{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Bo(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const n=e.getWordAtPosition(t.getPosition());return n?new U(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}isValid(e,t,n){const s=t.startLineNumber,r=t.startColumn,o=t.endColumn,a=this._getCurrentWordRange(e,t);let l=!!(this._wordRange&&this._wordRange.equalsRange(a));for(let u=0,c=n.length;!l&&u<c;u++){const d=n.getRange(u);d&&d.startLineNumber===s&&d.startColumn<=r&&d.endColumn>=o&&(l=!0)}return l}cancel(){this.result.cancel()}}class k$t extends K4e{constructor(e,t,n,s){super(e,t,n),this._providers=s}_compute(e,t,n,s){return G4e(this._providers,e,t.getPosition(),s).then(r=>r||new na)}}class L$t extends K4e{constructor(e,t,n,s,r){super(e,t,n),this._providers=s,this._otherModels=r}_compute(e,t,n,s){return T$t(this._providers,e,t.getPosition(),n,s,this._otherModels).then(r=>r||new na)}}function A$t(i,e,t,n,s){return new k$t(e,t,s,i)}function N$t(i,e,t,n,s,r){return new L$t(e,t,s,i,r)}Ru("_executeDocumentHighlights",async(i,e,t)=>{const n=i.get(Tt);return(await G4e(n.documentHighlightProvider,e,t,Ii.None))?.get(e.uri)});let Ule=(Zy=class{constructor(e,t,n,s,r){this.toUnhook=new Fe,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new na,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new th(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=n,this.codeEditorService=r,this._hasWordHighlights=$le.bindTo(s),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(o=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(o)})})),this.toUnhook.add(e.onDidFocusEditorText(o=>{this.occurrencesHighlight!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(o=>{i6(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(o=>{!o.newModelUrl&&o.oldModelUrl?this._stopSingular():zr.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(o=>{const a=this.editor.getOption(81);if(this.occurrencesHighlight!==a)switch(this.occurrencesHighlight=a,a){case"off":this._stopAll();break;case"singleFile":this._stopAll(zr.query?.modelInfo?.model);break;case"multiFile":zr.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",a);break}})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,zr.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(U.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const r=this._getWord();if(r){const o=this.editor.getModel().getLineContent(s.startLineNumber);au(`${o}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const r=this._getWord();if(r){const o=this.editor.getModel().getLineContent(s.startLineNumber);au(`${o}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=zr.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),zr.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),n=[];for(const s of t){if(!s.hasModel()||KI(s.getModel().uri,e?.uri))continue;const r=zr.storedDecorationIDs.get(s.getModel().uri);if(!r)continue;s.removeDecorations(r),n.push(s.getModel().uri);const o=my.get(s);o?.wordHighlighter&&o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter.workerRequest=null,o.wordHighlighter._hasWordHighlights.set(!1))}for(const s of n)zr.storedDecorationIDs.delete(s)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==vi.vscodeNotebookCell&&zr.query?.modelInfo?.model.uri.scheme!==vi.vscodeNotebookCell?(zr.query=null,this._run()):zr.query?.modelInfo&&(zr.query.modelInfo=null)),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlight==="off"){this._stopAll();return}if(e.reason!==3&&this.editor.getModel()?.uri.scheme!==vi.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===vi.vscodeNotebookCell){const r=[],o=this.codeEditorService.listCodeEditors();for(const a of o){const l=a.getModel();l&&l!==e&&l.uri.scheme===vi.vscodeNotebookCell&&r.push(l)}return r}const n=[],s=this.codeEditorService.listCodeEditors();for(const r of s){if(!Gse(r))continue;const o=r.getModel();o&&e===o.modified&&n.push(o.modified)}if(n.length)return n;if(this.occurrencesHighlight==="singleFile")return[];for(const r of s){const o=r.getModel();o&&o!==e&&n.push(o)}return n}_run(e){let t;if(this.editor.hasTextFocus()){const s=this.editor.getSelection();if(!s||s.startLineNumber!==s.endLineNumber){zr.query=null,this._stopAll();return}const r=s.startColumn,o=s.endColumn,a=this._getWord();if(!a||a.startColumn>r||a.endColumn<o){zr.query=null,this._stopAll();return}t=this.workerRequest&&this.workerRequest.isValid(this.model,s,this.decorations),zr.query={modelInfo:{model:this.model,selection:s},word:a}}else if(!zr.query){this._stopAll();return}if(this.lastCursorPositionChangeTime=new Date().getTime(),t)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else if(KI(this.editor.getModel().uri,zr.query.modelInfo?.model.uri)){if(!e){const o=this.decorations.getRanges();for(const a of o)if(a.containsPosition(this.editor.getPosition()))return}this._stopAll(e?this.model:void 0);const s=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const r=this.getOtherModelsToHighlight(this.editor.getModel());if(!zr.query||!zr.query.modelInfo||zr.query.modelInfo.model.isDisposed())return;this.workerRequest=this.computeWithModel(zr.query.modelInfo.model,zr.query.modelInfo.selection,zr.query.word,r),this.workerRequest?.result.then(o=>{s===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=o||[],this._beginRenderDecorations())},bi)}}computeWithModel(e,t,n,s){return s.length?N$t(this.multiDocumentProviders,e,t,n,this.editor.getOption(132),s):A$t(this.providers,e,t,n,this.editor.getOption(132))}_beginRenderDecorations(){const e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const t of e){const n=my.get(t);if(!n)continue;const s=[],r=t.getModel()?.uri;if(r&&this.workerRequestValue.has(r)){const o=zr.storedDecorationIDs.get(r),a=this.workerRequestValue.get(r);if(a)for(const u of a)u.range&&s.push({range:u.range,options:yWt(u.kind)});let l=[];t.changeDecorations(u=>{l=u.deltaDecorations(o??[],s)}),zr.storedDecorationIDs=zr.storedDecorationIDs.set(r,l),s.length>0&&(n.wordHighlighter?.decorations.set(s),n.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}},zr=Zy,Zy.storedDecorationIDs=new na,Zy.query=null,Zy);Ule=zr=q4e([nW(4,yn)],Ule);let my=(Rx=class extends ye{static get(e){return e.getContribution(Hle.ID)}constructor(e,t,n,s){super(),this._wordHighlighter=null;const r=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new Ule(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,t,s))};this._register(e.onDidChangeModel(o=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),r()})),r()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},Hle=Rx,Rx.ID="editor.contrib.wordHighlighter",Rx);my=Hle=q4e([nW(1,ri),nW(2,Tt),nW(3,yn)],my);class Y4e extends wt{constructor(e,t){super(t),this._isNext=e}run(e,t){const n=my.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}class I$t extends Y4e{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:w("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:$le,kbOpts:{kbExpr:Q.editorTextFocus,primary:65,weight:100}})}}class P$t extends Y4e{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:w("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:$le,kbOpts:{kbExpr:Q.editorTextFocus,primary:1089,weight:100}})}}class M$t extends wt{constructor(){super({id:"editor.action.wordHighlight.trigger",label:w("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:Q.editorTextFocus,primary:0,weight:100}})}run(e,t,n){const s=my.get(t);s&&s.restoreViewState(!0)}}fn(my.ID,my,0),Ye(I$t),Ye(P$t),Ye(M$t),e2(Wle);class sW extends ko{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const s=ah(t.getOption(132),t.getOption(131)),r=t.getModel(),o=t.getSelections(),a=o.length>1,l=o.map(u=>{const c=new me(u.positionLineNumber,u.positionColumn),d=this._move(s,r,c,this._wordNavigationType,a);return this._moveTo(u,d,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(u=>vn.fromModelSelection(u))),l.length===1){const u=new me(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(u,0)}}_moveTo(e,t,n){return n?new Pt(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Pt(t.lineNumber,t.column,t.lineNumber,t.column)}}class _y extends sW{_move(e,t,n,s,r){return Pn.moveWordLeft(e,t,n,s,r)}}class by extends sW{_move(e,t,n,s,r){return Pn.moveWordRight(e,t,n,s)}}class R$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class O$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class F$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}class B$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class V$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class W$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class H$t extends _y{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class $$t extends _y{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class U$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class z$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}class j$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class q$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class G$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:Be.and(Q.textInputFocus,Be.and(YI,X9)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class K$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class Y$t extends by{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class X$t extends by{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,s,r){return super._move(ah(Dp.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class rW extends ko{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){const s=e.get(lr);if(!t.hasModel())return;const r=ah(t.getOption(132),t.getOption(131)),o=t.getModel(),a=t.getSelections(),l=t.getOption(6),u=t.getOption(11),c=s.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),d=t._getViewModel(),h=a.map(f=>{const g=this._delete({wordSeparators:r,model:o,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:l,autoClosingQuotes:u,autoClosingPairs:c,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new $a(g,"")});t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class zle extends rW{_delete(e,t){const n=Pn.deleteWordLeft(e,t);return n||new U(1,1,1,1)}}class jle extends rW{_delete(e,t){const n=Pn.deleteWordRight(e,t);if(n)return n;const s=e.model.getLineCount(),r=e.model.getLineMaxColumn(s);return new U(s,r,s,r)}}class Q$t extends zle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:Q.writable})}}class Z$t extends zle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:Q.writable})}}class J$t extends zle{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class eUt extends jle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:Q.writable})}}class tUt extends jle{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:Q.writable})}}class iUt extends jle{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class nUt extends wt{constructor(){super({id:"deleteInsideWord",precondition:Q.writable,label:w("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,n){if(!t.hasModel())return;const s=ah(t.getOption(132),t.getOption(131)),r=t.getModel(),a=t.getSelections().map(l=>{const u=Pn.deleteInsideWord(s,r,l);return new $a(u,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}ht(new R$t),ht(new O$t),ht(new F$t),ht(new B$t),ht(new V$t),ht(new W$t),ht(new U$t),ht(new z$t),ht(new j$t),ht(new q$t),ht(new G$t),ht(new K$t),ht(new H$t),ht(new $$t),ht(new Y$t),ht(new X$t),ht(new Q$t),ht(new Z$t),ht(new J$t),ht(new eUt),ht(new tUt),ht(new iUt),Ye(nUt);class sUt extends rW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const n=L7.deleteWordPartLeft(e);return n||new U(1,1,1,1)}}class rUt extends rW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:Q.writable,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const n=L7.deleteWordPartRight(e);if(n)return n;const s=e.model.getLineCount(),r=e.model.getLineMaxColumn(s);return new U(s,r,s,r)}}class X4e extends sW{_move(e,t,n,s,r){return L7.moveWordPartLeft(e,t,n,r)}}class oUt extends X4e{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}dn.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class aUt extends X4e{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}dn.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class Q4e extends sW{_move(e,t,n,s,r){return L7.moveWordPartRight(e,t,n)}}class lUt extends Q4e{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class uUt extends Q4e{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:Q.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}ht(new sUt),ht(new rUt),ht(new oUt),ht(new aUt),ht(new lUt),ht(new uUt);const Pce=class Pce extends ye{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=Sc.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(this.editor.isSimpleWidget?t=new ul(w("editor.simple.readonly","Cannot edit in read-only input")):t=new ul(w("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};Pce.ID="editor.contrib.readOnlyMessageController";let oW=Pce;fn(oW.ID,oW,2);var cUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Z4e=function(i,e){return function(t,n){e(t,n,i)}};let qle=class extends ye{constructor(e,t,n){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=n,this._currentModel=Bi(this,void 0);const s=Ba("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),r=Ba("_textModel.onDidChangeContent",rt.debounce(o=>this._textModel.onDidChangeContent(o),()=>{},100));this._register(Bu(async(o,a)=>{s.read(o),r.read(o);const l=a.add(new BOt),u=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(u,void 0)}))}getBreadcrumbItems(e,t){const n=this._currentModel.read(t);if(!n)return[];const s=n.asListOfDocumentSymbols().filter(r=>e.contains(r.range.startLineNumber)&&!e.contains(r.range.endLineNumber));return s.sort(j2e(Jl(r=>r.range.endLineNumber-r.range.startLineNumber,mf))),s.map(r=>({name:r.name,kind:r.kind,startLineNumber:r.range.startLineNumber}))}};qle=cUt([Z4e(1,Tt),Z4e(2,iR)],qle),sB.setBreadcrumbsSourceFactory((i,e)=>e.createInstance(qle,i));const Mce=class Mce extends ye{constructor(e){super(),this.editor=e,this.widget=null,jf&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new Gle(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};Mce.ID="editor.contrib.iPadShowKeyboard";let aW=Mce;const g$=class g$ extends ye{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(Ie(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(Ie(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return g$.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};g$.ID="editor.contrib.ShowKeyboardWidget";let Gle=g$;fn(aW.ID,aW,3);var dUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},J4e=function(i,e){return function(t,n){e(t,n,i)}},Kle;let RR=(Ox=class extends ye{static get(e){return e.getContribution(Kle.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(Cr.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new Yle(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},Kle=Ox,Ox.ID="editor.contrib.inspectTokens",Ox);RR=Kle=dUt([J4e(1,Cd),J4e(2,Zs)],RR);class hUt extends wt{constructor(){super({id:"editor.action.inspectTokens",label:Mee.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){RR.get(t)?.launch()}}function fUt(i){let e="";for(let t=0,n=i.length;t<n;t++){const s=i.charCodeAt(t);switch(s){case 9:e+="→";break;case 32:e+="·";break;default:e+=String.fromCharCode(s)}}return e}function pUt(i,e){const t=Cr.get(e);if(t)return t;const n=i.encodeLanguageId(e);return{getInitialState:()=>yT,tokenize:(s,r,o)=>Cee(e,o),tokenizeEncoded:(s,r,o)=>z8(n,o)}}const m$=class m$ extends ye{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=pUt(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return m$._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let n=0;for(let l=t.tokens1.length-1;l>=0;l--){const u=t.tokens1[l];if(e.column-1>=u.offset){n=l;break}}let s=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){s=l;break}const r=this._model.getLineContent(e.lineNumber);let o="";if(n<t.tokens1.length){const l=t.tokens1[n].offset,u=n+1<t.tokens1.length?t.tokens1[n+1].offset:r.length;o=r.substring(l,u)}_a(this._domNode,it("h2.tm-token",void 0,fUt(o),it("span.tm-token-length",void 0,`${o.length} ${o.length===1?"char":"chars"}`))),qe(this._domNode,it("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(s<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(s<<1)+1]):null;qe(this._domNode,it("table.tm-metadata-table",void 0,it("tbody",void 0,it("tr",void 0,it("td.tm-metadata-key",void 0,"language"),it("td.tm-metadata-value",void 0,`${a?a.languageId:"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"token type"),it("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"font style"),it("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"foreground"),it("td.tm-metadata-value",void 0,`${a?We.Format.CSS.formatHex(a.foreground):"-?-"}`)),it("tr",void 0,it("td.tm-metadata-key",void 0,"background"),it("td.tm-metadata-value",void 0,`${a?We.Format.CSS.formatHex(a.background):"-?-"}`))))),qe(this._domNode,it("hr.tokens-inspect-separator")),n<t.tokens1.length&&qe(this._domNode,it("span.tm-token-type",void 0,t.tokens1[n].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){const t=Cr.getColorMap(),n=Ou.getLanguageId(e),s=Ou.getTokenType(e),r=Ou.getFontStyle(e),o=Ou.getForeground(e),a=Ou.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:s,fontStyle:r,foreground:t[o],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),e&8&&(t+="strikethrough "),t.length===0&&(t="---"),t}_getTokensAtLine(e){const t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t),s=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(e),!0,t);return{startState:t,tokens1:n.tokens,tokens2:s.tokens,endState:n.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let n=1;n<e;n++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(n),!0,t).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}};m$._ID="editor.contrib.inspectTokensWidget";let Yle=m$;fn(RR.ID,RR,4),Ye(hUt);var gUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},e5e=function(i,e){return function(t,n){e(t,n,i)}},OR;let Xle=(Fx=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=ar.as(Ew.Quickaccess)}provide(e){const t=new Fe;return t.add(e.onDidAccept(()=>{const[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{const s=this.registry.getQuickAccessProvider(n.substr(OR.PREFIX.length));s&&s.prefix&&s.prefix!==OR.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==OR.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const n=t.prefix||e.prefix,s=n||"…";return{prefix:n,label:s,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:w("helpPickAriaLabel","{0}, {1}",s,t.description),description:t.description}})}},OR=Fx,Fx.PREFIX="?",Fx);Xle=OR=gUt([e5e(0,fh),e5e(1,In)],Xle),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:Xle,prefix:"",helpEntries:[{description:Ree.helpQuickAccessActionLabel}]});class t5e{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,n){const s=new Fe;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=s.add(new Io);return r.value=this.doProvide(e,t,n),s.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),s}doProvide(e,t,n){const s=new Fe,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const o={editor:r},a=MRe(r);if(a){let l=r.saveViewState()??void 0;s.add(a.onDidChangeCursorPosition(()=>{l=r.saveViewState()??void 0})),o.restoreViewState=()=>{l&&r===this.activeTextEditorControl&&r.restoreViewState(l)},s.add(xb(t.onCancellationRequested)(()=>o.restoreViewState?.()))}s.add(zt(()=>this.clearDecorations(r))),s.add(this.provideWithTextEditor(o,e,t,n))}else s.add(this.provideWithoutTextEditor(e,t));return s}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const n=e.getModel();n&&"getLineContent"in n&&um(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){return Gse(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:xr(PNe),position:ad.Full}}}],[o,a]=n.deltaDecorations(s,r);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const _$=class _$ extends t5e{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=w("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,ye.None}provideWithTextEditor(e,t,n){const s=e.editor,r=new Fe;r.add(t.onDidAccept(l=>{const[u]=t.selectedItems;if(u){if(!this.isValidLineNumber(s,u.lineNumber))return;this.gotoLocation(e,{range:this.toRange(u.lineNumber,u.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const o=()=>{const l=this.parsePosition(s,t.value.trim().substr(_$.PREFIX.length)),u=this.getPickLabel(s,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:u}],t.ariaLabel=u,!this.isValidLineNumber(s,l.lineNumber)){this.clearDecorations(s);return}const c=this.toRange(l.lineNumber,l.column);s.revealRangeInCenter(c,0),this.addDecorations(s,c)};o(),r.add(t.onDidChangeValue(()=>o()));const a=MRe(s);return a&&a.getOptions().get(68).renderType===2&&(a.updateOptions({lineNumbers:"on"}),r.add(zt(()=>a.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const n=t.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),s=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:s+n[0],column:n[1]}}getPickLabel(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?w("gotoLineColumnLabel","Go to line {0} and character {1}.",t,n):w("gotoLineLabel","Go to line {0}.",t);const s=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?w("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",s.lineNumber,s.column,r):w("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",s.lineNumber,s.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,n){if(!n||typeof n!="number")return!1;const s=this.getModel(e);if(!s)return!1;const r={lineNumber:t,column:n};return s.validatePosition(r).equals(r)}lineCount(e){return this.getModel(e)?.getLineCount()??0}};_$.PREFIX=":";let Qle=_$;var mUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},_Ut=function(i,e){return function(t,n){e(t,n,i)}};let FR=class extends Qle{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=rt.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};FR=mUt([_Ut(0,yn)],FR);let i5e=(Bx=class extends wt{constructor(){super({id:Bx.ID,label:i9.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:Q.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(fh).quickAccess.show(FR.PREFIX)}},Bx.ID="editor.action.gotoLine",Bx);Ye(i5e),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:FR,prefix:FR.PREFIX,helpEntries:[{description:i9.gotoLineActionLabel,commandId:i5e.ID}]});const n5e=[void 0,[]];function Zle(i,e,t=0,n=0){const s=e;return s.values&&s.values.length>1?bUt(i,s.values,t,n):s5e(i,e,t,n)}function bUt(i,e,t,n){let s=0;const r=[];for(const o of e){const[a,l]=s5e(i,o,t,n);if(typeof a!="number")return n5e;s+=a,r.push(...l)}return[s,yUt(r)]}function s5e(i,e,t,n){const s=lw(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],jI(s)]:n5e}function yUt(i){const e=i.sort((s,r)=>s.start-r.start),t=[];let n;for(const s of e)!n||!vUt(n,s)?(n=s,t.push(s)):(n.start=Math.min(n.start,s.start),n.end=Math.max(n.end,s.end));return t}function vUt(i,e){return!(i.end<e.start||e.end<i.start)}function r5e(i){return i.startsWith('"')&&i.endsWith('"')}const o5e=" ";function Jle(i){typeof i!="string"&&(i="");const e=i.toLowerCase(),{pathNormalized:t,normalized:n,normalizedLowercase:s}=a5e(i),r=t.indexOf(qf)>=0,o=r5e(i);let a;const l=i.split(o5e);if(l.length>1)for(const u of l){const c=r5e(u),{pathNormalized:d,normalized:h,normalizedLowercase:f}=a5e(u);h&&(a||(a=[]),a.push({original:u,originalLowercase:u.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:f,expectContiguousMatch:c}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:s,values:a,containsPathSeparator:r,expectContiguousMatch:o}}function a5e(i){let e;ka?e=i.replace(/\//g,qf):e=i.replace(/\\/g,qf);const t=i1t(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function l5e(i){return Array.isArray(i)?Jle(i.map(e=>e.original).join(o5e)):Jle(i.original)}var CUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},u5e=function(i,e){return function(t,n){e(t,n,i)}},lW;let CS=(sg=class extends t5e{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,w("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),ye.None}provideWithTextEditor(e,t,n,s){const r=e.editor,o=this.getModel(r);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,n,s):this.doProvideWithoutEditorSymbols(e,o,t,n):ye.None}doProvideWithoutEditorSymbols(e,t,n,s){const r=new Fe;return this.provideLabelPick(n,w("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,r)||s.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,s)))(),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const n=new ME,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),n.complete(!0))}));return t.add(zt(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,t,n,s,r){const o=e.editor,a=new Fe;a.add(n.onDidAccept(d=>{const[h]=n.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:n.keyMods,preserveFocus:d.inBackground}),r?.handleAccept?.(h),d.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:d})=>{d&&d.range&&(this.gotoLocation(e,{range:d.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const l=this.getDocumentSymbols(t,s);let u;const c=async d=>{u?.dispose(!0),n.busy=!1,u=new or(s),n.busy=!0;try{const h=Jle(n.value.substr(lW.PREFIX.length).trim()),f=await this.doGetSymbolPicks(l,h,void 0,u.token,t);if(s.isCancellationRequested)return;if(f.length>0){if(n.items=f,d&&h.original.length===0){const g=NI(f,b=>!!(b.type!=="separator"&&b.range&&U.containsPosition(b.range.decoration,d)));g&&(n.activeItems=[g])}}else h.original.length>0?this.provideLabelPick(n,w("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(n,w("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}};return a.add(n.onDidChangeValue(()=>c(void 0))),c(o.getSelection()?.getPosition()),a.add(n.onDidChangeActive(()=>{const[d]=n.activeItems;d&&d.range&&(o.revealRangeInCenter(d.range.selection,0),this.addDecorations(o,d.range.decoration))})),a}async doGetSymbolPicks(e,t,n,s,r){const o=await e;if(s.isCancellationRequested)return[];const a=t.original.indexOf(lW.SCOPE_PREFIX)===0,l=a?1:0;let u,c;t.values&&t.values.length>1?(u=l5e(t.values[0]),c=l5e(t.values.slice(1))):u=t;let d;const h=this.options?.openSideBySideDirection?.();h&&(d=[{iconClass:h==="right"?ni.asClassName(et.splitHorizontal):ni.asClassName(et.splitVertical),tooltip:h==="right"?w("openToSide","Open to the Side"):w("openToBottom","Open to the Bottom")}]);const f=[];for(let y=0;y<o.length;y++){const S=o[y],x=e1t(S.name),E=`$(${OF.toIcon(S.kind).id}) ${x}`,k=E.length-x.length;let A=S.containerName;n?.extraContainerLabel&&(A?A=`${n.extraContainerLabel} • ${A}`:A=n.extraContainerLabel);let I,M,B,F;if(t.original.length>l){let q=!1;if(u!==t&&([I,M]=Zle(E,{...t,values:void 0},l,k),typeof I=="number"&&(q=!0)),typeof I!="number"&&([I,M]=Zle(E,u,l,k),typeof I!="number"))continue;if(!q&&c){if(A&&c.original.length>0&&([B,F]=Zle(A,c)),typeof B!="number")continue;typeof I=="number"&&(I+=B)}}const G=S.tags&&S.tags.indexOf(1)>=0;f.push({index:y,kind:S.kind,score:I,label:E,ariaLabel:W$e(S.name,S.kind),description:A,highlights:G?void 0:{label:M,description:F},range:{selection:U.collapseToStart(S.selectionRange),decoration:S.range},uri:r.uri,symbolName:x,strikethrough:G,buttons:d})}const g=f.sort((y,S)=>a?this.compareByKindAndScore(y,S):this.compareByScore(y,S));let b=[];if(a){let E=function(){S&&typeof y=="number"&&x>0&&(S.label=IC(tue[y]||eue,x))},y,S,x=0;for(const k of g)y!==k.kind?(E(),y=k.kind,x=1,S={type:"separator"},b.push(S)):x++,b.push(k);E()}else g.length>0&&(b=[{label:w("symbols","symbols ({0})",f.length),type:"separator"},...g]);return b}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const n=tue[e.kind]||eue,s=tue[t.kind]||eue,r=n.localeCompare(s);return r===0?this.compareByScore(e,t):r}async getDocumentSymbols(e,t){const n=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}},lW=sg,sg.PREFIX="@",sg.SCOPE_PREFIX=":",sg.PREFIX_BY_CATEGORY=`${sg.PREFIX}${sg.SCOPE_PREFIX}`,sg);CS=lW=CUt([u5e(0,Tt),u5e(1,iR)],CS);const eue=w("property","properties ({0})"),tue={5:w("method","methods ({0})"),11:w("function","functions ({0})"),8:w("_constructor","constructors ({0})"),12:w("variable","variables ({0})"),4:w("class","classes ({0})"),22:w("struct","structs ({0})"),23:w("event","events ({0})"),24:w("operator","operators ({0})"),10:w("interface","interfaces ({0})"),2:w("namespace","namespaces ({0})"),3:w("package","packages ({0})"),25:w("typeParameter","type parameters ({0})"),1:w("modules","modules ({0})"),6:w("property","properties ({0})"),9:w("enum","enumerations ({0})"),21:w("enumMember","enumeration members ({0})"),14:w("string","strings ({0})"),0:w("file","files ({0})"),17:w("array","arrays ({0})"),15:w("number","numbers ({0})"),16:w("boolean","booleans ({0})"),18:w("object","objects ({0})"),19:w("key","keys ({0})"),7:w("field","fields ({0})"),13:w("constant","constants ({0})")};var wUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},iue=function(i,e){return function(t,n){e(t,n,i)}};let nue=class extends CS{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=rt.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};nue=wUt([iue(0,yn),iue(1,Tt),iue(2,iR)],nue);const b$=class b$ extends wt{constructor(){super({id:b$.ID,label:nP.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:Q.hasDocumentSymbolProvider,kbOpts:{kbExpr:Q.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(fh).quickAccess.show(CS.PREFIX,{itemActivation:Rp.NONE})}};b$.ID="editor.action.quickOutline";let uW=b$;Ye(uW),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:nue,prefix:CS.PREFIX,helpEntries:[{description:nP.quickOutlineActionLabel,prefix:CS.PREFIX,commandId:uW.ID},{description:nP.quickOutlineByCategoryActionLabel,prefix:CS.PREFIX_BY_CATEGORY}]});function SUt(i){const e=new Map;for(const t of i)e.set(t,(e.get(t)??0)+1);return e}class BR{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const n=this.computeEmbedding(e),s=new Map,r=[];for(const[o,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const u=this.computeSimilarityScore(l,n,s);u>0&&r.push({key:o,score:u})}}return r}static termFrequencies(e){return SUt(BR.splitTerms(e))}static*splitTerms(e){const t=n=>n.toLowerCase();for(const[n]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(n);const s=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(s.length>1)for(const r of s)r.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(r)&&(yield t(r))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const n=[];for(const s of t.textChunks){const r=BR.termFrequencies(s);for(const o of r.keys())this.chunkOccurrences.set(o,(this.chunkOccurrences.get(o)??0)+1);n.push({text:s,tf:r})}this.chunkCount+=n.length,this.documents.set(t.key,{chunks:n})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const n of t.chunks)for(const s of n.tf.keys()){const r=this.chunkOccurrences.get(s);if(typeof r=="number"){const o=r-1;o<=0?this.chunkOccurrences.delete(s):this.chunkOccurrences.set(s,o)}}}}computeSimilarityScore(e,t,n){let s=0;for(const[r,o]of Object.entries(t)){const a=e.tf.get(r);if(!a)continue;let l=n.get(r);typeof l!="number"&&(l=this.computeIdf(r),n.set(r,l));const u=a*l;s+=u*o}return s}computeEmbedding(e){const t=BR.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[n,s]of e){const r=this.computeIdf(n);r>0&&(t[n]=s*r)}return t}}function xUt(i){const e=i.slice(0);e.sort((n,s)=>s.score-n.score);const t=e[0]?.score??0;if(t>0)for(const n of e)n.score/=t;return e}var ck;(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(ck||(ck={}));function sue(i){return Array.isArray(i.items)}function c5e(i){const e=i;return!!e.picks&&e.additionalPicks instanceof Promise}class DUt extends ye{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){const s=new Fe;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r;const o=s.add(new Io),a=async()=>{const u=o.value=new Fe;r?.dispose(!0),e.busy=!1,r=new or(t);const c=r.token;let d=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(d=d.trim());const h=this._getPicks(d,u,c,n),f=(b,y)=>{let S,x;if(sue(b)?(S=b.items,x=b.active):S=b,S.length===0){if(y)return!1;(d.length>0||e.hideInput)&&this.options?.noResultsPick&&(jL(this.options.noResultsPick)?S=[this.options.noResultsPick(d)]:S=[this.options.noResultsPick])}return e.items=S,x&&(e.activeItems=[x]),!0},g=async b=>{let y=!1,S=!1;await Promise.all([(async()=>{typeof b.mergeDelay=="number"&&(await U0(b.mergeDelay),c.isCancellationRequested)||S||(y=f(b.picks,!0))})(),(async()=>{e.busy=!0;try{const x=await b.additionalPicks;if(c.isCancellationRequested)return;let E,k;sue(b.picks)?(E=b.picks.items,k=b.picks.active):E=b.picks;let A,I;if(sue(x)?(A=x.items,I=x.active):A=x,A.length>0||!y){let M;if(!k&&!I){const B=e.activeItems[0];B&&E.indexOf(B)!==-1&&(M=B)}f({items:[...E,...A],active:k||I||M})}}finally{c.isCancellationRequested||(e.busy=!1),S=!0}})()])};if(h!==null)if(c5e(h))await g(h);else if(!(h instanceof Promise))f(h);else{e.busy=!0;try{const b=await h;if(c.isCancellationRequested)return;c5e(b)?await g(b):f(b)}finally{c.isCancellationRequested||(e.busy=!1)}}};s.add(e.onDidChangeValue(()=>a())),a(),s.add(e.onDidAccept(u=>{if(n?.handleAccept){u.inBackground||e.hide(),n.handleAccept?.(e.activeItems[0]);return}const[c]=e.selectedItems;typeof c?.accept=="function"&&(u.inBackground||e.hide(),c.accept(e.keyMods,u))}));const l=async(u,c)=>{if(typeof c.trigger!="function")return;const d=c.buttons?.indexOf(u)??-1;if(d>=0){const h=c.trigger(d,e.keyMods),f=typeof h=="number"?h:await h;if(t.isCancellationRequested)return;switch(f){case ck.NO_ACTION:break;case ck.CLOSE_PICKER:e.hide();break;case ck.REFRESH_PICKER:a();break;case ck.REMOVE_ITEM:{const g=e.items.indexOf(c);if(g!==-1){const b=e.items.slice(),y=b.splice(g,1),S=e.activeItems.filter(E=>E!==y[0]),x=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=b,S&&(e.activeItems=S),e.keepScrollPosition=x}break}}}};return s.add(e.onDidTriggerItemButton(({button:u,item:c})=>l(u,c))),s.add(e.onDidTriggerSeparatorButton(({button:u,separator:c})=>l(u,c))),s}}var d5e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},yy=function(i,e){return function(t,n){e(t,n,i)}},wS,vo;let rue=(Xm=class extends DUt{constructor(e,t,n,s,r,o){super(wS.PREFIX,e),this.instantiationService=t,this.keybindingService=n,this.commandService=s,this.telemetryService=r,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(oue)),this.options=e}async _getPicks(e,t,n,s){const r=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];const o=xb(()=>{const f=new BR;f.updateDocuments(r.map(b=>({key:b.commandId,textChunks:[this.getTfIdfChunk(b)]})));const g=f.calculateScores(e,n);return xUt(g).filter(b=>b.score>wS.TFIDF_THRESHOLD).slice(0,wS.TFIDF_MAX_RESULTS)}),a=[];for(const f of r){const g=wS.WORD_FILTER(e,f.label)??void 0,b=f.commandAlias?wS.WORD_FILTER(e,f.commandAlias)??void 0:void 0;if(g||b)f.highlights={label:g,detail:this.options.showAlias?b:void 0},a.push(f);else if(e===f.commandId)a.push(f);else if(e.length>=3){const y=o();if(n.isCancellationRequested)return[];const S=y.find(x=>x.key===f.commandId);S&&(f.tfIdfScore=S.score,a.push(f))}}const l=new Map;for(const f of a){const g=l.get(f.label);g?(f.description=f.commandId,g.description=g.commandId):l.set(f.label,f)}a.sort((f,g)=>{if(f.tfIdfScore&&g.tfIdfScore)return f.tfIdfScore===g.tfIdfScore?f.label.localeCompare(g.label):g.tfIdfScore-f.tfIdfScore;if(f.tfIdfScore)return 1;if(g.tfIdfScore)return-1;const b=this.commandsHistory.peek(f.commandId),y=this.commandsHistory.peek(g.commandId);if(b&&y)return b>y?-1:1;if(b)return-1;if(y)return 1;if(this.options.suggestedCommandIds){const S=this.options.suggestedCommandIds.has(f.commandId),x=this.options.suggestedCommandIds.has(g.commandId);if(S&&x)return 0;if(S)return-1;if(x)return 1}return f.label.localeCompare(g.label)});const u=[];let c=!1,d=!0,h=!!this.options.suggestedCommandIds;for(let f=0;f<a.length;f++){const g=a[f];f===0&&this.commandsHistory.peek(g.commandId)&&(u.push({type:"separator",label:w("recentlyUsed","recently used")}),c=!0),d&&g.tfIdfScore!==void 0&&(u.push({type:"separator",label:w("suggested","similar commands")}),d=!1),h&&g.tfIdfScore===void 0&&!this.commandsHistory.peek(g.commandId)&&this.options.suggestedCommandIds?.has(g.commandId)&&(u.push({type:"separator",label:w("commonlyUsed","commonly used")}),c=!0,h=!1),c&&g.tfIdfScore===void 0&&!this.commandsHistory.peek(g.commandId)&&!this.options.suggestedCommandIds?.has(g.commandId)&&(u.push({type:"separator",label:w("morecCommands","other commands")}),c=!1),u.push(this.toCommandPick(g,s))}return this.hasAdditionalCommandPicks(e,n)?{picks:u,additionalPicks:(async()=>{const f=await this.getAdditionalCommandPicks(r,a,e,n);if(n.isCancellationRequested)return[];const g=f.map(b=>this.toCommandPick(b,s));return d&&g[0]?.type!=="separator"&&g.unshift({type:"separator",label:w("suggested","similar commands")}),g})()}:u}toCommandPick(e,t){if(e.type==="separator")return e;const n=this.keybindingService.lookupKeybinding(e.commandId),s=n?w("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:s,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(r){zd(r)||this.dialogService.error(w("canNotRun","Command '{0}' resulted in an error",e.label),_B(r))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:n}){let s=e;return t&&t!==e&&(s+=` - ${t}`),n&&n.value!==e&&(s+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),s}},wS=Xm,Xm.PREFIX=">",Xm.TFIDF_THRESHOLD=.5,Xm.TFIDF_MAX_RESULTS=5,Xm.WORD_FILTER=ZJ(zI,aEt,cAe),Xm);rue=wS=d5e([yy(1,jt),yy(2,In),yy(3,xs),yy(4,al),yy(5,VI)],rue);let oue=(rg=class extends ye{constructor(e,t,n){super(),this.storageService=e,this.configurationService=t,this.logService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===_P.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=vo.getConfiguredCommandHistoryLength(this.configurationService),vo.cache&&vo.cache.limit!==this.configuredCommandsHistoryLength&&(vo.cache.limit=this.configuredCommandsHistoryLength,vo.hasChanges=!0))}load(){const e=this.storageService.get(vo.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(s){this.logService.error(`[CommandsHistory] invalid data: ${s}`)}const n=vo.cache=new nm(this.configuredCommandsHistoryLength,1);if(t){let s;t.usesLRU?s=t.entries:s=t.entries.sort((r,o)=>r.value-o.value),s.forEach(r=>n.set(r.key,r.value))}vo.counter=this.storageService.getNumber(vo.PREF_KEY_COUNTER,0,vo.counter)}push(e){vo.cache&&(vo.cache.set(e,vo.counter++),vo.hasChanges=!0)}peek(e){return vo.cache?.peek(e)}saveState(){if(!vo.cache||!vo.hasChanges)return;const e={usesLRU:!0,entries:[]};vo.cache.forEach((t,n)=>e.entries.push({key:n,value:t})),this.storageService.store(vo.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(vo.PREF_KEY_COUNTER,vo.counter,0,0),vo.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const n=e.getValue().workbench?.commandPalette?.history;return typeof n=="number"?n:vo.DEFAULT_COMMANDS_HISTORY_LENGTH}},vo=rg,rg.DEFAULT_COMMANDS_HISTORY_LENGTH=50,rg.PREF_KEY_CACHE="commandPalette.mru.cache",rg.PREF_KEY_COUNTER="commandPalette.mru.counter",rg.counter=1,rg.hasChanges=!1,rg);oue=vo=d5e([yy(0,xf),yy(1,Fi),yy(2,Oa)],oue);class EUt extends rue{constructor(e,t,n,s,r,o){super(e,t,n,s,r,o)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const n of e.getSupportedActions()){let s;n.metadata?.description&&(nkt(n.metadata.description)?s=n.metadata.description:s={original:n.metadata.description,value:n.metadata.description}),t.push({commandId:n.id,commandAlias:n.alias,commandDescription:s,label:uee(n.label)||n.id})}return t}}var TUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},dk=function(i,e){return function(t,n){e(t,n,i)}};let VR=class extends EUt{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,n,s,r,o){super({showAlias:!1},e,n,s,r,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};VR=TUt([dk(0,jt),dk(1,yn),dk(2,In),dk(3,xs),dk(4,al),dk(5,VI)],VR);const y$=class y$ extends wt{constructor(){super({id:y$.ID,label:n9.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:Q.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(fh).quickAccess.show(VR.PREFIX)}};y$.ID="editor.action.quickCommand";let cW=y$;Ye(cW),ar.as(Ew.Quickaccess).registerQuickAccessProvider({ctor:VR,prefix:VR.PREFIX,helpEntries:[{description:n9.quickCommandHelp,commandId:cW.ID}]});var kUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},hk=function(i,e){return function(t,n){e(t,n,i)}};let aue=class extends uS{constructor(e,t,n,s,r,o,a){super(!0,e,t,n,s,r,o,a)}};aue=kUt([hk(1,ri),hk(2,yn),hk(3,$r),hk(4,jt),hk(5,xf),hk(6,Fi)],aue),fn(uS.ID,aue,4);class LUt extends wt{constructor(){super({id:"editor.action.toggleHighContrast",label:Fee.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const n=e.get(Cd),s=n.getColorTheme();xp(s.type)?(n.setTheme(this._originalThemeName||(jE(s.type)?XT:C_)),this._originalThemeName=null):(n.setTheme(jE(s.type)?Mw:Rw),this._originalThemeName=s.themeName)}}Ye(LUt);const AUt=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:VRe,Emitter:Kse,KeyCode:WRe,KeyMod:HRe,MarkerSeverity:qRe,MarkerTag:GRe,Position:$Re,Range:URe,Selection:zRe,SelectionDirection:jRe,Token:KRe,Uri:Yse,editor:Up,languages:Dm},Symbol.toStringTag,{value:"Module"}));class h5e{_onDidChange=new Kse;_formattingOptions;_modeConfiguration;_diagnosticSettings;_completionSettings;_schemas=null;_schemasById=Object.create(null);_languageId;_externalFragmentDefinitions;constructor({languageId:e,schemas:t,modeConfiguration:n,formattingOptions:s,diagnosticSettings:r,completionSettings:o}){this._languageId=e,t&&this.setSchemaConfig(t),this._modeConfiguration=n,this._completionSettings=o,this._diagnosticSettings=r,this._formattingOptions=s}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get schemas(){return this._schemas}schemasById(){return this._schemasById}get formattingOptions(){return this._formattingOptions}get diagnosticSettings(){return this._diagnosticSettings}get completionSettings(){return{...this._completionSettings,fillLeafsOnComplete:this._completionSettings.__experimental__fillLeafsOnComplete??this._completionSettings.fillLeafsOnComplete}}get externalFragmentDefinitions(){return this._externalFragmentDefinitions}setSchemaConfig(e){this._schemas=e,this._schemasById=e.reduce((t,n)=>(t[n.uri]=n,t),Object.create(null)),this._onDidChange.fire(this)}setExternalFragmentDefinitions(e){this._externalFragmentDefinitions=e}setModeConfiguration(e){this._modeConfiguration=e,this._onDidChange.fire(this)}setFormattingOptions(e){this._formattingOptions=e,this._onDidChange.fire(this)}setDiagnosticSettings(e){this._diagnosticSettings=e,this._onDidChange.fire(this)}setCompletionSettings(e){this._completionSettings=e,this._onDidChange.fire(this)}}function NUt(i,e){if(!e)return new h5e({languageId:i,schemas:[],formattingOptions:lue,modeConfiguration:f5e,diagnosticSettings:p5e,completionSettings:g5e});const{schemas:t,formattingOptions:n,modeConfiguration:s,diagnosticSettings:r,completionSettings:o}=e;return new h5e({languageId:i,schemas:t,formattingOptions:{...lue,...n,prettierConfig:{...lue.prettierConfig,...n?.prettierConfig}},modeConfiguration:{...f5e,...s},diagnosticSettings:{...p5e,...r},completionSettings:{...g5e,...o}})}const f5e={documentFormattingEdits:!0,documentRangeFormattingEdits:!1,completionItems:!0,hovers:!0,documentSymbols:!1,tokens:!1,colors:!1,foldingRanges:!1,diagnostics:!0,selectionRanges:!1},lue={prettierConfig:{tabWidth:2}},p5e={jsonDiagnosticSettings:{schemaValidation:"error"}},g5e={__experimental__fillLeafsOnComplete:!1},m5e="graphql";let WR;function IUt(i){return WR||(WR=NUt(m5e,i),Dm.graphql={api:WR},PUt().then(e=>e.setupMode(WR))),WR}function PUt(){return Promise.resolve().then(()=>tQt)}const MUt=Object.freeze(Object.defineProperty({__proto__:null,LANGUAGE_ID:m5e,initializeMode:IUt},Symbol.toStringTag,{value:"Module"}));var RUt=Object.defineProperty,_5e=i=>{throw TypeError(i)},dW=(i,e)=>{for(var t in e)RUt(i,t,{get:e[t],enumerable:!0})},b5e=(i,e,t)=>e.has(i)||_5e("Cannot "+t),vy=(i,e,t)=>(b5e(i,e,"read from private field"),e.get(i)),OUt=(i,e,t)=>e.has(i)?_5e("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),FUt=(i,e,t,n)=>(b5e(i,e,"write to private field"),e.set(i,t),t),y5e={};dW(y5e,{languages:()=>e9e,options:()=>Z8e,printers:()=>J8e});var BUt=[{name:"JavaScript",type:"programming",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],tmScope:"source.js",aceMode:"javascript",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],filenames:["Jakefile","start.frag","end.frag"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",extensions:[".js.flow"],tmScope:"source.js",aceMode:"javascript",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],filenames:[],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",extensions:[".jsx"],tmScope:"source.js.jsx",aceMode:"javascript",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,filenames:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],v5e={};dW(v5e,{canAttachComment:()=>Kjt,embed:()=>Rqt,experimentalFeatures:()=>$Yt,getCommentChildNodes:()=>Yjt,getVisitorKeys:()=>E5e,handleComments:()=>J5e,insertPragma:()=>Yqt,isBlockComment:()=>Nf,isGap:()=>Xjt,massageAstNode:()=>qzt,print:()=>HYt,printComment:()=>fjt,willPrintOwnComments:()=>h6e});var VUt=(i,e,t,n)=>{if(!(i&&e==null))return e.replaceAll?e.replaceAll(t,n):t.global?e.replace(t,n):e.split(t).join(n)},mu=VUt,WUt=(i,e,t)=>{if(!(i&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},Tr=WUt;function HUt(i){return i!==null&&typeof i=="object"}var $Ut=HUt;function*UUt(i,e){let{getVisitorKeys:t,filter:n=()=>!0}=e,s=r=>$Ut(r)&&n(r);for(let r of t(i)){let o=i[r];if(Array.isArray(o))for(let a of o)s(a)&&(yield a);else s(o)&&(yield o)}}function*zUt(i,e){let t=[i];for(let n=0;n<t.length;n++){let s=t[n];for(let r of UUt(s,e))yield r,t.push(r)}}function jUt(i,{getVisitorKeys:e,predicate:t}){for(let n of zUt(i,{getVisitorKeys:e}))if(t(n))return!0;return!1}var qUt=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function GUt(i){return i===12288||i>=65281&&i<=65376||i>=65504&&i<=65510}function KUt(i){return i>=4352&&i<=4447||i===8986||i===8987||i===9001||i===9002||i>=9193&&i<=9196||i===9200||i===9203||i===9725||i===9726||i===9748||i===9749||i>=9776&&i<=9783||i>=9800&&i<=9811||i===9855||i>=9866&&i<=9871||i===9875||i===9889||i===9898||i===9899||i===9917||i===9918||i===9924||i===9925||i===9934||i===9940||i===9962||i===9970||i===9971||i===9973||i===9978||i===9981||i===9989||i===9994||i===9995||i===10024||i===10060||i===10062||i>=10067&&i<=10069||i===10071||i>=10133&&i<=10135||i===10160||i===10175||i===11035||i===11036||i===11088||i===11093||i>=11904&&i<=11929||i>=11931&&i<=12019||i>=12032&&i<=12245||i>=12272&&i<=12287||i>=12289&&i<=12350||i>=12353&&i<=12438||i>=12441&&i<=12543||i>=12549&&i<=12591||i>=12593&&i<=12686||i>=12688&&i<=12773||i>=12783&&i<=12830||i>=12832&&i<=12871||i>=12880&&i<=42124||i>=42128&&i<=42182||i>=43360&&i<=43388||i>=44032&&i<=55203||i>=63744&&i<=64255||i>=65040&&i<=65049||i>=65072&&i<=65106||i>=65108&&i<=65126||i>=65128&&i<=65131||i>=94176&&i<=94180||i===94192||i===94193||i>=94208&&i<=100343||i>=100352&&i<=101589||i>=101631&&i<=101640||i>=110576&&i<=110579||i>=110581&&i<=110587||i===110589||i===110590||i>=110592&&i<=110882||i===110898||i>=110928&&i<=110930||i===110933||i>=110948&&i<=110951||i>=110960&&i<=111355||i>=119552&&i<=119638||i>=119648&&i<=119670||i===126980||i===127183||i===127374||i>=127377&&i<=127386||i>=127488&&i<=127490||i>=127504&&i<=127547||i>=127552&&i<=127560||i===127568||i===127569||i>=127584&&i<=127589||i>=127744&&i<=127776||i>=127789&&i<=127797||i>=127799&&i<=127868||i>=127870&&i<=127891||i>=127904&&i<=127946||i>=127951&&i<=127955||i>=127968&&i<=127984||i===127988||i>=127992&&i<=128062||i===128064||i>=128066&&i<=128252||i>=128255&&i<=128317||i>=128331&&i<=128334||i>=128336&&i<=128359||i===128378||i===128405||i===128406||i===128420||i>=128507&&i<=128591||i>=128640&&i<=128709||i===128716||i>=128720&&i<=128722||i>=128725&&i<=128727||i>=128732&&i<=128735||i===128747||i===128748||i>=128756&&i<=128764||i>=128992&&i<=129003||i===129008||i>=129292&&i<=129338||i>=129340&&i<=129349||i>=129351&&i<=129535||i>=129648&&i<=129660||i>=129664&&i<=129673||i>=129679&&i<=129734||i>=129742&&i<=129756||i>=129759&&i<=129769||i>=129776&&i<=129784||i>=131072&&i<=196605||i>=196608&&i<=262141}var YUt=i=>!(GUt(i)||KUt(i)),XUt=/[^\x20-\x7F]/u;function QUt(i){if(!i)return 0;if(!XUt.test(i))return i.length;i=i.replace(qUt()," ");let e=0;for(let t of i){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(e+=YUt(n)?1:2)}return e}var fk=QUt;function uue(i){return(e,t,n)=>{let s=!!(n!=null&&n.backwards);if(t===!1)return!1;let{length:r}=e,o=t;for(;o>=0&&o<r;){let a=e.charAt(o);if(i instanceof RegExp){if(!i.test(a))return o}else if(!i.includes(a))return o;s?o--:o++}return o===-1||o===r?o:!1}}var pk=uue(" "),ZUt=uue(",; "),JUt=uue(/[^\n\r]/u);function ezt(i,e,t){let n=!!(t!=null&&t.backwards);if(e===!1)return!1;let s=i.charAt(e);if(n){if(i.charAt(e-1)==="\r"&&s===`
1346
1346
  `)return e-2;if(s===`
1347
1347
  `||s==="\r"||s==="\u2028"||s==="\u2029")return e-1}else{if(s==="\r"&&i.charAt(e+1)===`
1348
1348
  `)return e+2;if(s===`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-yoga/graphiql",
3
- "version": "4.4.2-alpha-20251101180658-121a0ec833dc525c425b15de2e8d6aba32e5e0a6",
3
+ "version": "4.4.2-alpha-20251103012707-ac6946c441a4ccd09602caf554067c2928ed08ab",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "repository": {